Title: [288138] branches/safari-613.1.14.0-branch/Source/WebKit
Revision
288138
Author
alanc...@apple.com
Date
2022-01-18 12:13:22 -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.0-branch/Source/WebKit/ChangeLog (288137 => 288138)


--- branches/safari-613.1.14.0-branch/Source/WebKit/ChangeLog	2022-01-18 20:13:19 UTC (rev 288137)
+++ branches/safari-613.1.14.0-branch/Source/WebKit/ChangeLog	2022-01-18 20:13:22 UTC (rev 288138)
@@ -1,5 +1,44 @@
 2022-01-18  Russell Epstein  <repst...@apple.com>
 
+        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  <timothy_hor...@apple.com>
+
+            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-18  Russell Epstein  <repst...@apple.com>
+
         Cherry-pick r287957. rdar://problem/87327557
 
     [WebAuthn] Fix freebie call without user gesture not being given

Modified: branches/safari-613.1.14.0-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp (288137 => 288138)


--- branches/safari-613.1.14.0-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp	2022-01-18 20:13:19 UTC (rev 288137)
+++ branches/safari-613.1.14.0-branch/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp	2022-01-18 20:13:22 UTC (rev 288138)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to