https://bugs.webkit.org/show_bug.cgi?id=219960
<rdar://problem/72595521>
Reviewed by Tim Horton.
Source/WebCore:
Scroll latching for momentum scrolls was too sticky; it would keep latching to the same
scroller within a 100ms of the last event that was handled, which was exacerbated by the
fact that ScrollController can go into "ignoreMomentumScrolls" mode which results in
no visible scrolling but continued consumption of momentum wheel events.
Fix by releasing the latch as soon as we see the end of a momentum scroll,
so that we always re-evaluate latching at the start of the next gesture.
Tested by fast/scrolling/latching/nested-cross-axis-latch-expiration.html
* page/scrolling/ScrollingTreeLatchingController.cpp:
(WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent):
LayoutTests:
Adjusted test for new behavior. No longer need WK1 result.
* fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt:
* fast/scrolling/latching/nested-cross-axis-latch-expiration.html:
* platform/mac-wk1/fast/scrolling/latching/nested-cross-axis-latch-expiration-expected.txt: Removed.
Canonical link: https://commits.webkit.org/233237@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271730 268f45cc-cd09-0410-ab3c-d52691b4dbfc