⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286380 in webkit


Ignore:
Timestamp:
Dec 1, 2021, 1:05:22 PM (5 years ago)
Author:
Chris Dumez
Message:

Unreviewed build fixes after r286346.

  • WebProcess/WebPage/MomentumEventDispatcher.cpp:

(WebKit::MomentumEventDispatcher::startDisplayLink):
(WebKit::MomentumEventDispatcher::displayWasRefreshed):
(WebKit::MomentumEventDispatcher::didReceiveScrollEventWithInterval):
(WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
(WebKit::MomentumEventDispatcher::offsetAtTime):
(WebKit::momentumDecayRate):
(WebKit::MomentumEventDispatcher::computeNextDelta):

  • WebProcess/WebPage/MomentumEventDispatcher.h:
Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r286361 r286380  
     12021-12-01  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed build fixes after r286346.
     4
     5        * WebProcess/WebPage/MomentumEventDispatcher.cpp:
     6        (WebKit::MomentumEventDispatcher::startDisplayLink):
     7        (WebKit::MomentumEventDispatcher::displayWasRefreshed):
     8        (WebKit::MomentumEventDispatcher::didReceiveScrollEventWithInterval):
     9        (WebKit::MomentumEventDispatcher::buildOffsetTableWithInitialDelta):
     10        (WebKit::MomentumEventDispatcher::offsetAtTime):
     11        (WebKit::momentumDecayRate):
     12        (WebKit::MomentumEventDispatcher::computeNextDelta):
     13        * WebProcess/WebPage/MomentumEventDispatcher.h:
     14
    1152021-12-01  Youenn Fablet  <youenn@apple.com>
    216
  • trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp

    r286346 r286380  
    3131#include "EventDispatcher.h"
    3232#include "Logging.h"
     33#include "WebProcess.h"
    3334#include "WebProcessProxyMessages.h"
    3435#include <WebCore/DisplayRefreshMonitor.h>
     36#include <WebCore/Scrollbar.h>
    3537
    3638namespace WebKit {
     
    222224
    223225    // FIXME: Switch down to lower-than-full-speed frame rates for the tail end of the curve.
    224     WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessProxy::StartDisplayLink(m_observerID, displayID, FullSpeedFramesPerSecond), 0);
     226    WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessProxy::StartDisplayLink(m_observerID, displayID, WebCore::FullSpeedFramesPerSecond), 0);
    225227    RELEASE_LOG(ScrollAnimations, "MomentumEventDispatcher starting display link for display %d", displayID);
    226228}
     
    263265#if !USE(MOMENTUM_EVENT_DISPATCHER_PREMATURE_ROUNDING)
    264266    // Intentional delta rounding (but at the end!).
    265     FloatSize delta = roundedIntSize(desiredOffset - m_currentGesture.currentOffset);
     267    WebCore::FloatSize delta = roundedIntSize(desiredOffset - m_currentGesture.currentOffset);
    266268#else
    267     FloatSize delta = desiredOffset - m_currentGesture.currentOffset;
     269    WebCore::FloatSize delta = desiredOffset - m_currentGesture.currentOffset;
    268270#endif
    269271
     
    273275}
    274276
    275 void MomentumEventDispatcher::didReceiveScrollEventWithInterval(FloatSize size, Seconds frameInterval)
     277void MomentumEventDispatcher::didReceiveScrollEventWithInterval(WebCore::FloatSize size, Seconds frameInterval)
    276278{
    277279    auto push = [](HistoricalDeltas& deltas, Delta newDelta) {
     
    311313}
    312314
    313 void MomentumEventDispatcher::buildOffsetTableWithInitialDelta(FloatSize initialUnacceleratedDelta)
     315void MomentumEventDispatcher::buildOffsetTableWithInitialDelta(WebCore::FloatSize initialUnacceleratedDelta)
    314316{
    315317#if USE(MOMENTUM_EVENT_DISPATCHER_PREMATURE_ROUNDING)
     
    318320    m_currentGesture.offsetTable.clear();
    319321
    320     FloatSize accumulatedOffset;
    321     FloatSize unacceleratedDelta = initialUnacceleratedDelta;
     322    WebCore::FloatSize accumulatedOffset;
     323    WebCore::FloatSize unacceleratedDelta = initialUnacceleratedDelta;
    322324
    323325    do {
    324         FloatSize acceleratedDelta;
     326        WebCore::FloatSize acceleratedDelta;
    325327        std::tie(unacceleratedDelta, acceleratedDelta) = computeNextDelta(unacceleratedDelta);
    326328
     
    337339}
    338340
    339 FloatSize MomentumEventDispatcher::offsetAtTime(Seconds time)
     341WebCore::FloatSize MomentumEventDispatcher::offsetAtTime(Seconds time)
    340342{
    341343    if (!m_currentGesture.offsetTable.size())
     
    353355}
    354356
    355 static float momentumDecayRate(FloatSize delta, Seconds frameInterval)
     357static float momentumDecayRate(WebCore::FloatSize delta, Seconds frameInterval)
    356358{
    357359    constexpr float defaultDecay = 0.975f;
     
    374376}
    375377
    376 std::pair<FloatSize, FloatSize> MomentumEventDispatcher::computeNextDelta(FloatSize currentUnacceleratedDelta)
    377 {
    378     FloatSize unacceleratedDelta = currentUnacceleratedDelta;
     378std::pair<WebCore::FloatSize, WebCore::FloatSize> MomentumEventDispatcher::computeNextDelta(WebCore::FloatSize currentUnacceleratedDelta)
     379{
     380    WebCore::FloatSize unacceleratedDelta = currentUnacceleratedDelta;
    379381
    380382    float decayRate = momentumDecayRate(unacceleratedDelta, idealCurveFrameRate);
     
    446448    };
    447449
    448     FloatSize acceleratedDelta(
     450    WebCore::FloatSize acceleratedDelta(
    449451        accelerateAxis(m_deltaHistoryX, quantizedUnacceleratedDelta.width()),
    450452        accelerateAxis(m_deltaHistoryY, quantizedUnacceleratedDelta.height())
  • trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.h

    r286346 r286380  
    3232#define USE_MOMENTUM_EVENT_DISPATCHER_TEMPORARY_LOGGING 1
    3333
     34#include "DisplayLinkObserverID.h"
    3435#include "ScrollingAccelerationCurve.h"
    3536#include "WebWheelEvent.h"
     
    3839#include <WebCore/RectEdges.h>
    3940#include <memory>
     41#include <wtf/Deque.h>
    4042#include <wtf/Noncopyable.h>
    4143
     
    7779    void dispatchSyntheticMomentumEvent(WebWheelEvent::Phase, WebCore::FloatSize delta);
    7880
    79     void buildOffsetTableWithInitialDelta(FloatSize);
     81    void buildOffsetTableWithInitialDelta(WebCore::FloatSize);
    8082
    81     FloatSize offsetAtTime(Seconds);
    82     std::pair<FloatSize, FloatSize> computeNextDelta(FloatSize currentUnacceleratedDelta);
     83    WebCore::FloatSize offsetAtTime(Seconds);
     84    std::pair<WebCore::FloatSize, WebCore::FloatSize> computeNextDelta(WebCore::FloatSize currentUnacceleratedDelta);
    8385
    84     void didReceiveScrollEventWithInterval(FloatSize, Seconds);
     86    void didReceiveScrollEventWithInterval(WebCore::FloatSize, Seconds);
    8587    void didReceiveScrollEvent(const WebWheelEvent&);
    8688
     
    98100    WebCore::RectEdges<bool> m_lastRubberBandableEdges;
    99101#if !RELEASE_LOG_DISABLED
    100     FloatSize m_lastActivePhaseDelta;
     102    WebCore::FloatSize m_lastActivePhaseDelta;
    101103#endif
    102104
     
    108110        std::optional<WebWheelEvent> initiatingEvent;
    109111
    110         FloatSize currentOffset;
     112        WebCore::FloatSize currentOffset;
    111113        WallTime startTime;
    112114
    113         Vector<FloatSize> offsetTable;
     115        Vector<WebCore::FloatSize> offsetTable;
    114116
    115117#if !RELEASE_LOG_DISABLED
    116         FloatSize accumulatedEventOffset;
     118        WebCore::FloatSize accumulatedEventOffset;
    117119        bool didLogInitialQueueState { false };
    118120#endif
    119121
    120122#if USE(MOMENTUM_EVENT_DISPATCHER_PREMATURE_ROUNDING)
    121         FloatSize carryOffset;
     123        WebCore::FloatSize carryOffset;
    122124#endif
    123125    } m_currentGesture;
Note: See TracChangeset for help on using the changeset viewer.