[Mac] WK1 Clients Only Latch on Momentum Scroll
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Feb 2014 00:17:05 +0000 (00:17 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Feb 2014 00:17:05 +0000 (00:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=128133

Reviewed by Simon Fraser.

* platform/PlatformWheelEvent.h:
(WebCore::PlatformWheelEvent::useLatchedEventElement): Update
predicate to recognize the start and change phases of the wheel
event as latchable (not just momentum start/change).

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

Source/WebCore/ChangeLog
Source/WebCore/platform/PlatformWheelEvent.h

index 3f9553a..87313f6 100644 (file)
@@ -1,3 +1,15 @@
+2014-02-03  Brent Fulgham  <bfulgham@apple.com>
+
+        [Mac] WK1 Clients Only Latch on Momentum Scroll
+        https://bugs.webkit.org/show_bug.cgi?id=128133
+
+        Reviewed by Simon Fraser.
+
+        * platform/PlatformWheelEvent.h:
+        (WebCore::PlatformWheelEvent::useLatchedEventElement): Update
+        predicate to recognize the start and change phases of the wheel
+        event as latchable (not just momentum start/change).
+
 2014-02-03  Dean Jackson  <dino@apple.com>
 
         Feature flag for shape-inside
index 81ea276..9d3925e 100644 (file)
@@ -162,7 +162,11 @@ namespace WebCore {
         unsigned scrollCount() const { return m_scrollCount; }
         float unacceleratedScrollingDeltaX() const { return m_unacceleratedScrollingDeltaX; }
         float unacceleratedScrollingDeltaY() const { return m_unacceleratedScrollingDeltaY; }
-        bool useLatchedEventElement() const { return m_momentumPhase == PlatformWheelEventPhaseBegan || m_momentumPhase == PlatformWheelEventPhaseChanged; }
+        bool useLatchedEventElement() const
+        {
+            return m_phase == PlatformWheelEventPhaseBegan || m_phase == PlatformWheelEventPhaseChanged
+                || m_momentumPhase == PlatformWheelEventPhaseBegan || m_momentumPhase == PlatformWheelEventPhaseChanged;
+        }
 #else
         bool useLatchedEventElement() const { return false; }
 #endif