Title: [184589] trunk/Source/WebCore
Revision
184589
Author
[email protected]
Date
2015-05-19 14:27:34 -0700 (Tue, 19 May 2015)

Log Message

Scroll-snap animations should not start on axes with zero-delta
https://bugs.webkit.org/show_bug.cgi?id=145148

Reviewed by Dean Jackson.

Don't begin a scroll snap animation on an axis that had no change in position (on that axis)
during the gesture.

* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Don't begin a scroll snap
animation if no movement on this axis was ever made.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (184588 => 184589)


--- trunk/Source/WebCore/ChangeLog	2015-05-19 21:12:20 UTC (rev 184588)
+++ trunk/Source/WebCore/ChangeLog	2015-05-19 21:27:34 UTC (rev 184589)
@@ -1,3 +1,17 @@
+2015-05-19  Brent Fulgham  <[email protected]>
+
+        Scroll-snap animations should not start on axes with zero-delta
+        https://bugs.webkit.org/show_bug.cgi?id=145148
+
+        Reviewed by Dean Jackson.
+
+        Don't begin a scroll snap animation on an axis that had no change in position (on that axis)
+        during the gesture.
+
+        * platform/cocoa/ScrollController.mm:
+        (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Don't begin a scroll snap
+        animation if no movement on this axis was ever made.
+
 2015-05-19  Youenn Fablet  <[email protected]>
 
         AudioContext should resolve promises with jsUndefined() and not jsNull()

Modified: trunk/Source/WebCore/platform/cocoa/ScrollController.mm (184588 => 184589)


--- trunk/Source/WebCore/platform/cocoa/ScrollController.mm	2015-05-19 21:12:20 UTC (rev 184588)
+++ trunk/Source/WebCore/platform/cocoa/ScrollController.mm	2015-05-19 21:27:34 UTC (rev 184589)
@@ -547,7 +547,7 @@
             if (snapState.m_numWheelDeltasTracked < snapState.wheelDeltaWindowSize)
                 snapState.pushInitialWheelDelta(wheelDelta);
             
-            if (snapState.m_numWheelDeltasTracked == snapState.wheelDeltaWindowSize)
+            if ((snapState.m_numWheelDeltasTracked == snapState.wheelDeltaWindowSize) && snapState.averageInitialWheelDelta())
                 beginScrollSnapAnimation(axis, ScrollSnapState::Gliding);
         }
         break;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to