Scroll latching logic can get stuck in 'scrollable="no"' iframes
[WebKit-https.git] / Source / WebCore / platform / PlatformWheelEvent.h
index 1f11fed..3c622ea 100644 (file)
@@ -165,7 +165,8 @@ namespace WebCore {
         bool useLatchedEventElement() const
         {
             return m_phase == PlatformWheelEventPhaseBegan || m_phase == PlatformWheelEventPhaseChanged
-                || m_momentumPhase == PlatformWheelEventPhaseBegan || m_momentumPhase == PlatformWheelEventPhaseChanged;
+                || m_momentumPhase == PlatformWheelEventPhaseBegan || m_momentumPhase == PlatformWheelEventPhaseChanged
+                || (m_phase == PlatformWheelEventPhaseEnded && m_momentumPhase == PlatformWheelEventPhaseNone);
         }
         bool shouldConsiderLatching() const
         {