Title: [288140] branches/safari-613.1.14.1-branch/Source/WebKit
Revision
288140
Author
[email protected]
Date
2022-01-18 12:13:36 -0800 (Tue, 18 Jan 2022)

Log Message

Cherry-pick r287997. rdar://problem/87274541

    Sometimes cannot scroll after using internal trackpad
    https://bugs.webkit.org/show_bug.cgi?id=235206
    <rdar://problem/87274541>

    Reviewed by Simon Fraser.

    * WebProcess/WebPage/MomentumEventDispatcher.cpp:
    (WebKit::MomentumEventDispatcher::didStartMomentumPhase):
    (WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):
    * WebProcess/WebPage/MomentumEventDispatcher.h:
    We store std::optional<ScrollingAccelerationCurve> in a map, but then
    when looking at whether we have a curve (to decide whether or not to even
    use MomentumEventDispatcher), we check if the map has *any* value for the
    given page... even an unengaged optional. To fix, check if the optional is engaged.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287997 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613.1.14.1-branch/Source/WebKit/ChangeLog (288139 => 288140)


--- branches/safari-613.1.14.1-branch/Source/WebKit/ChangeLog	2022-01-18 20:13:27 UTC (rev 288139)
+++ branches/safari-613.1.14.1-branch/Source/WebKit/ChangeLog	2022-01-18 20:13:36 UTC (rev 288140)
@@ -1,3 +1,42 @@
+2022-01-18  Alan Coon  <[email protected]>
+
+        Cherry-pick r287997. rdar://problem/87274541
+
+    Sometimes cannot scroll after using internal trackpad
+    https://bugs.webkit.org/show_bug.cgi?id=235206
+    <rdar://problem/87274541>
+    
+    Reviewed by Simon Fraser.
+    
+    * WebProcess/WebPage/MomentumEventDispatcher.cpp:
+    (WebKit::MomentumEventDispatcher::didStartMomentumPhase):
+    (WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):
+    * WebProcess/WebPage/MomentumEventDispatcher.h:
+    We store std::optional<ScrollingAccelerationCurve> in a map, but then
+    when looking at whether we have a curve (to decide whether or not to even
+    use MomentumEventDispatcher), we check if the map has *any* value for the
+    given page... even an unengaged optional. To fix, check if the optional is engaged.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-13  Tim Horton  <[email protected]>
+
+            Sometimes cannot scroll after using internal trackpad
+            https://bugs.webkit.org/show_bug.cgi?id=235206
+            <rdar://problem/87274541>
+
+            Reviewed by Simon Fraser.
+
+            * WebProcess/WebPage/MomentumEventDispatcher.cpp:
+            (WebKit::MomentumEventDispatcher::didStartMomentumPhase):
+            (WebKit::MomentumEventDispatcher::setScrollingAccelerationCurve):
+            * WebProcess/WebPage/MomentumEventDispatcher.h:
+            We store std::optional<ScrollingAccelerationCurve> in a map, but then
+            when looking at whether we have a curve (to decide whether or not to even
+            use MomentumEventDispatcher), we check if the map has *any* value for the
+            given page... even an unengaged optional. To fix, check if the optional is engaged.
+
 2022-01-09  Sam Weinig  <[email protected]>
 
         Remove support for Direct2D

Modified: branches/safari-613.1.14.1-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp (288139 => 288140)


--- branches/safari-613.1.14.1-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp	2022-01-18 20:13:27 UTC (rev 288139)
+++ branches/safari-613.1.14.1-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp	2022-01-18 20:13:36 UTC (rev 288140)
@@ -59,7 +59,8 @@
     if (event.momentumPhase() != WebWheelEvent::PhaseBegan)
         return false;
 
-    if (!m_accelerationCurves.contains(pageIdentifier)) {
+    auto curveIterator = m_accelerationCurves.find(pageIdentifier);
+    if (curveIterator == m_accelerationCurves.end() || !curveIterator->value) {
         RELEASE_LOG(ScrollAnimations, "MomentumEventDispatcher not using synthetic momentum phase: no acceleration curve");
         return false;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to