Title: [286380] trunk/Source/WebKit
Revision
286380
Author
cdu...@apple.com
Date
2021-12-01 13:05:22 -0800 (Wed, 01 Dec 2021)

Log 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:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (286379 => 286380)


--- trunk/Source/WebKit/ChangeLog	2021-12-01 20:58:14 UTC (rev 286379)
+++ trunk/Source/WebKit/ChangeLog	2021-12-01 21:05:22 UTC (rev 286380)
@@ -1,3 +1,17 @@
+2021-12-01  Chris Dumez  <cdu...@apple.com>
+
+        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:
+
 2021-12-01  Youenn Fablet  <you...@apple.com>
 
         Reuse navigation preload if service worker is fetching the corresponding navigation request

Modified: trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp (286379 => 286380)


--- trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp	2021-12-01 20:58:14 UTC (rev 286379)
+++ trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp	2021-12-01 21:05:22 UTC (rev 286380)
@@ -30,8 +30,10 @@
 
 #include "EventDispatcher.h"
 #include "Logging.h"
+#include "WebProcess.h"
 #include "WebProcessProxyMessages.h"
 #include <WebCore/DisplayRefreshMonitor.h>
+#include <WebCore/Scrollbar.h>
 
 namespace WebKit {
 
@@ -221,7 +223,7 @@
     }
 
     // FIXME: Switch down to lower-than-full-speed frame rates for the tail end of the curve.
-    WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessProxy::StartDisplayLink(m_observerID, displayID, FullSpeedFramesPerSecond), 0);
+    WebProcess::singleton().parentProcessConnection()->send(Messages::WebProcessProxy::StartDisplayLink(m_observerID, displayID, WebCore::FullSpeedFramesPerSecond), 0);
     RELEASE_LOG(ScrollAnimations, "MomentumEventDispatcher starting display link for display %d", displayID);
 }
 
@@ -262,9 +264,9 @@
 
 #if !USE(MOMENTUM_EVENT_DISPATCHER_PREMATURE_ROUNDING)
     // Intentional delta rounding (but at the end!).
-    FloatSize delta = roundedIntSize(desiredOffset - m_currentGesture.currentOffset);
+    WebCore::FloatSize delta = roundedIntSize(desiredOffset - m_currentGesture.currentOffset);
 #else
-    FloatSize delta = desiredOffset - m_currentGesture.currentOffset;
+    WebCore::FloatSize delta = desiredOffset - m_currentGesture.currentOffset;
 #endif
 
     dispatchSyntheticMomentumEvent(WebWheelEvent::PhaseChanged, -delta);
@@ -272,7 +274,7 @@
     m_currentGesture.currentOffset += delta;
 }
 
-void MomentumEventDispatcher::didReceiveScrollEventWithInterval(FloatSize size, Seconds frameInterval)
+void MomentumEventDispatcher::didReceiveScrollEventWithInterval(WebCore::FloatSize size, Seconds frameInterval)
 {
     auto push = [](HistoricalDeltas& deltas, Delta newDelta) {
         bool directionChanged = deltas.size() && (deltas.first().rawPlatformDelta > 0) != (newDelta.rawPlatformDelta > 0);
@@ -310,7 +312,7 @@
     didReceiveScrollEventWithInterval(delta, frameInterval);
 }
 
-void MomentumEventDispatcher::buildOffsetTableWithInitialDelta(FloatSize initialUnacceleratedDelta)
+void MomentumEventDispatcher::buildOffsetTableWithInitialDelta(WebCore::FloatSize initialUnacceleratedDelta)
 {
 #if USE(MOMENTUM_EVENT_DISPATCHER_PREMATURE_ROUNDING)
     m_currentGesture.carryOffset = { };
@@ -317,11 +319,11 @@
 #endif
     m_currentGesture.offsetTable.clear();
 
-    FloatSize accumulatedOffset;
-    FloatSize unacceleratedDelta = initialUnacceleratedDelta;
+    WebCore::FloatSize accumulatedOffset;
+    WebCore::FloatSize unacceleratedDelta = initialUnacceleratedDelta;
 
     do {
-        FloatSize acceleratedDelta;
+        WebCore::FloatSize acceleratedDelta;
         std::tie(unacceleratedDelta, acceleratedDelta) = computeNextDelta(unacceleratedDelta);
 
         accumulatedOffset += acceleratedDelta;
@@ -336,7 +338,7 @@
     return a + t * (b - a);
 }
 
-FloatSize MomentumEventDispatcher::offsetAtTime(Seconds time)
+WebCore::FloatSize MomentumEventDispatcher::offsetAtTime(Seconds time)
 {
     if (!m_currentGesture.offsetTable.size())
         return { };
@@ -352,7 +354,7 @@
     };
 }
 
-static float momentumDecayRate(FloatSize delta, Seconds frameInterval)
+static float momentumDecayRate(WebCore::FloatSize delta, Seconds frameInterval)
 {
     constexpr float defaultDecay = 0.975f;
     constexpr float tailVelocity = 250.f;
@@ -373,9 +375,9 @@
     return value / 65536.0f;
 }
 
-std::pair<FloatSize, FloatSize> MomentumEventDispatcher::computeNextDelta(FloatSize currentUnacceleratedDelta)
+std::pair<WebCore::FloatSize, WebCore::FloatSize> MomentumEventDispatcher::computeNextDelta(WebCore::FloatSize currentUnacceleratedDelta)
 {
-    FloatSize unacceleratedDelta = currentUnacceleratedDelta;
+    WebCore::FloatSize unacceleratedDelta = currentUnacceleratedDelta;
 
     float decayRate = momentumDecayRate(unacceleratedDelta, idealCurveFrameRate);
     unacceleratedDelta.scale(decayRate);
@@ -445,7 +447,7 @@
         return value * multiplier;
     };
 
-    FloatSize acceleratedDelta(
+    WebCore::FloatSize acceleratedDelta(
         accelerateAxis(m_deltaHistoryX, quantizedUnacceleratedDelta.width()),
         accelerateAxis(m_deltaHistoryY, quantizedUnacceleratedDelta.height())
     );

Modified: trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.h (286379 => 286380)


--- trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.h	2021-12-01 20:58:14 UTC (rev 286379)
+++ trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.h	2021-12-01 21:05:22 UTC (rev 286380)
@@ -31,6 +31,7 @@
 #define USE_MOMENTUM_EVENT_DISPATCHER_PREMATURE_ROUNDING 0
 #define USE_MOMENTUM_EVENT_DISPATCHER_TEMPORARY_LOGGING 1
 
+#include "DisplayLinkObserverID.h"
 #include "ScrollingAccelerationCurve.h"
 #include "WebWheelEvent.h"
 #include <WebCore/FloatSize.h>
@@ -37,6 +38,7 @@
 #include <WebCore/PageIdentifier.h>
 #include <WebCore/RectEdges.h>
 #include <memory>
+#include <wtf/Deque.h>
 #include <wtf/Noncopyable.h>
 
 namespace WebCore {
@@ -76,12 +78,12 @@
 
     void dispatchSyntheticMomentumEvent(WebWheelEvent::Phase, WebCore::FloatSize delta);
 
-    void buildOffsetTableWithInitialDelta(FloatSize);
+    void buildOffsetTableWithInitialDelta(WebCore::FloatSize);
 
-    FloatSize offsetAtTime(Seconds);
-    std::pair<FloatSize, FloatSize> computeNextDelta(FloatSize currentUnacceleratedDelta);
+    WebCore::FloatSize offsetAtTime(Seconds);
+    std::pair<WebCore::FloatSize, WebCore::FloatSize> computeNextDelta(WebCore::FloatSize currentUnacceleratedDelta);
 
-    void didReceiveScrollEventWithInterval(FloatSize, Seconds);
+    void didReceiveScrollEventWithInterval(WebCore::FloatSize, Seconds);
     void didReceiveScrollEvent(const WebWheelEvent&);
 
     struct Delta {
@@ -97,7 +99,7 @@
     std::optional<WebWheelEvent> m_lastIncomingEvent;
     WebCore::RectEdges<bool> m_lastRubberBandableEdges;
 #if !RELEASE_LOG_DISABLED
-    FloatSize m_lastActivePhaseDelta;
+    WebCore::FloatSize m_lastActivePhaseDelta;
 #endif
 
     struct {
@@ -107,18 +109,18 @@
         std::optional<ScrollingAccelerationCurve> accelerationCurve;
         std::optional<WebWheelEvent> initiatingEvent;
 
-        FloatSize currentOffset;
+        WebCore::FloatSize currentOffset;
         WallTime startTime;
 
-        Vector<FloatSize> offsetTable;
+        Vector<WebCore::FloatSize> offsetTable;
 
 #if !RELEASE_LOG_DISABLED
-        FloatSize accumulatedEventOffset;
+        WebCore::FloatSize accumulatedEventOffset;
         bool didLogInitialQueueState { false };
 #endif
 
 #if USE(MOMENTUM_EVENT_DISPATCHER_PREMATURE_ROUNDING)
-        FloatSize carryOffset;
+        WebCore::FloatSize carryOffset;
 #endif
     } m_currentGesture;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to