Latch does not clear when a scroll snap animation is triggered
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Oct 2015 19:31:22 +0000 (19:31 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Oct 2015 19:31:22 +0000 (19:31 +0000)
commit265dc8112bd70c29a6db11f2c708d31a9fd038a6
tree3482635a9cf619eceb617345354c4032d015691d
parentff9e296369ffbe82680d7ed9e1dbc7ebce48f053
Latch does not clear when a scroll snap animation is triggered
https://bugs.webkit.org/show_bug.cgi?id=149681
<rdar://problem/22733922>

Reviewed by Simon Fraser.

Source/WebCore:

Test: tiled-drawing/scrolling/latched-div-with-scroll-snap.html

The scroll snap animation logic bypasses some of the normal clean-up code used
for wheel event handling. When this happens, the scroll latching state is not
cleared. In some cases this "stale" latch state is used when starting a new
gesture in the same frame. This causes the wrong page element to receive the
mouse wheel events, and hilarity ensues.

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformNotifyIfEndGesture): Clear latched state when
ending the gesture.

LayoutTests:

Add a new test that confirms latched state is cleared when scroll snap animations
are triggered.

* tiled-drawing/scrolling/latched-div-with-scroll-snap-expected.txt: Added.
* tiled-drawing/scrolling/latched-div-with-scroll-snap.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190423 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/tiled-drawing/scrolling/latched-div-with-scroll-snap-expected.txt [new file with mode: 0644]
LayoutTests/tiled-drawing/scrolling/latched-div-with-scroll-snap.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/mac/EventHandlerMac.mm