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