Title: [286732] branches/safari-612.4.2.1-branch/Source/WebKit
- Revision
- 286732
- Author
- alanc...@apple.com
- Date
- 2021-12-08 13:26:26 -0800 (Wed, 08 Dec 2021)
Log Message
Cherry-pick r286566. rdar://problem/85928816
Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
https://bugs.webkit.org/show_bug.cgi?id=233894
<rdar://problem/86111948>
Reviewed by Simon Fraser.
* WebProcess/WebPage/MomentumEventDispatcher.cpp:
(WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
Only flip the deltas if the trackpad is configured to use "natural"
scrolling (in which "directionInvertedFromDevice" is true).
(WebKit::MomentumEventDispatcher::computeNextDelta):
Fix initial queue state logging to log both axes before setting the "did log" bit.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog (286731 => 286732)
--- branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog 2021-12-08 21:26:23 UTC (rev 286731)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/ChangeLog 2021-12-08 21:26:26 UTC (rev 286732)
@@ -1,5 +1,42 @@
2021-12-06 Alan Coon <alanc...@apple.com>
+ Cherry-pick r286566. rdar://problem/85928816
+
+ Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
+ https://bugs.webkit.org/show_bug.cgi?id=233894
+ <rdar://problem/86111948>
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/WebPage/MomentumEventDispatcher.cpp:
+ (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
+ Only flip the deltas if the trackpad is configured to use "natural"
+ scrolling (in which "directionInvertedFromDevice" is true).
+
+ (WebKit::MomentumEventDispatcher::computeNextDelta):
+ Fix initial queue state logging to log both axes before setting the "did log" bit.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-12-06 Tim Horton <timothy_hor...@apple.com>
+
+ Momentum Event Dispatcher: Momentum phase runs backwards with natural scrolling disabled
+ https://bugs.webkit.org/show_bug.cgi?id=233894
+ <rdar://problem/86111948>
+
+ Reviewed by Simon Fraser.
+
+ * WebProcess/WebPage/MomentumEventDispatcher.cpp:
+ (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
+ Only flip the deltas if the trackpad is configured to use "natural"
+ scrolling (in which "directionInvertedFromDevice" is true).
+
+ (WebKit::MomentumEventDispatcher::computeNextDelta):
+ Fix initial queue state logging to log both axes before setting the "did log" bit.
+
+2021-12-06 Alan Coon <alanc...@apple.com>
+
Cherry-pick r286537. rdar://problem/85928816
Add trace points for generated momentum events
Modified: branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp (286731 => 286732)
--- branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp 2021-12-08 21:26:23 UTC (rev 286731)
+++ branches/safari-612.4.2.1-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp 2021-12-08 21:26:26 UTC (rev 286732)
@@ -306,7 +306,10 @@
m_currentGesture.currentOffset += delta;
- return -delta;
+ if (m_currentGesture.initiatingEvent->directionInvertedFromDevice())
+ delta.scale(-1);
+
+ return delta;
}
void MomentumEventDispatcher::displayWasRefreshed(WebCore::PlatformDisplayID displayID, const WebCore::DisplayUpdate&)
@@ -478,10 +481,8 @@
float averageDelta = totalDelta / count;
#if ENABLE(MOMENTUM_EVENT_DISPATCHER_TEMPORARY_LOGGING)
- if (!m_currentGesture.didLogInitialQueueState) {
+ if (!m_currentGesture.didLogInitialQueueState)
RELEASE_LOG(ScrollAnimations, "MomentumEventDispatcher initial historical deltas: average delta %f, average time %fms, event count %d", averageDelta, averageFrameIntervalMS, count);
- m_currentGesture.didLogInitialQueueState = true;
- }
#endif
constexpr float velocityGainA = fromFixedPoint(2.f);
@@ -502,6 +503,10 @@
accelerateAxis(m_deltaHistoryY, quantizedUnacceleratedDelta.height())
);
+#if ENABLE(MOMENTUM_EVENT_DISPATCHER_TEMPORARY_LOGGING)
+ m_currentGesture.didLogInitialQueueState = true;
+#endif
+
return { unacceleratedDelta, acceleratedDelta };
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes