Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vertical scroll with mouse wheel in horizontal scroller fails to prop…
…agate to the document https://bugs.webkit.org/show_bug.cgi?id=228891 <rdar://81640239> Reviewed by Antti Koivisto. Source/WebCore: If a page has a horizontal scrolling carousel with a non-passive wheel event handler, and a user with a clicky scroll wheel mouse tries to vertically scroll over that carousel, then we'd fail to propagate the scroll to the page. This affects apple.com/store. This happened because we don't do latching for legacy mouse wheel events, so we hit the code in EventHandler::handleWheelEventInAppropriateEnclosingBox(); this finds the carousel and calls handleWheelEventInScrollableArea(), but that dispatches to the scrolling thread in way that does not propagate the event to the nearest ancestor that can handle it. The fix is to check that the ScrollableArea can handle the event, sharing some code that already exists and was used by findEnclosingScrollableContainer(). This is a conservative fix; it's possible that scrollableAreaCanHandleEvent() could be called down in handleWheelEventInScrollableArea() but that will affect other call sites. Test: fast/scrolling/mac/vertical-scroll-in-horizontal-scroller.html * page/EventHandler.cpp: (WebCore::EventHandler::handleWheelEventInAppropriateEnclosingBox): (WebCore::EventHandler::scrollableAreaCanHandleEvent): * page/EventHandler.h: * page/mac/EventHandlerMac.mm: (WebCore::findEnclosingScrollableContainer): LayoutTests: * fast/scrolling/mac/vertical-scroll-in-horizontal-scroller-expected.txt: Added. * fast/scrolling/mac/vertical-scroll-in-horizontal-scroller.html: Added. * tiled-drawing/scrolling/overflow-scroll-reduced-content.html: Convert this test to use async scrolling. webkit.org/b/228898 tracks an existing problem that caused the test to fail with non-async scrolling. Canonical link: https://commits.webkit.org/240377@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing with 165 additions and 11 deletions.
- +14 −0 LayoutTests/ChangeLog
- +9 −0 LayoutTests/fast/scrolling/mac/vertical-scroll-in-horizontal-scroller-expected.txt
- +83 −0 LayoutTests/fast/scrolling/mac/vertical-scroll-in-horizontal-scroller.html
- +1 −1 LayoutTests/tiled-drawing/scrolling/overflow-scroll-reduced-content.html
- +31 −0 Source/WebCore/ChangeLog
- +20 −3 Source/WebCore/page/EventHandler.cpp
- +2 −0 Source/WebCore/page/EventHandler.h
- +1 −6 Source/WebCore/page/mac/EventHandlerMac.mm
- +4 −1 Source/WebCore/rendering/RenderLayerScrollableArea.cpp