haikuwebkit/LayoutTests/tiled-drawing/scrolling
Simon Fraser 226390f3bc Vertical scroll with mouse wheel in horizontal scroller fails to propagate 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
2021-08-09 23:41:29 +00:00
..
fixed Standardize on "allows scrolling" terminology instead of asking about scrollbars 2020-12-23 17:00:45 +00:00
fixed-background
frames Standardize on "allows scrolling" terminology instead of asking about scrollbars 2020-12-23 17:00:45 +00:00
non-fast-region [LFC][Integration] REGRESSION: Event handler region is wrong 2020-12-15 17:47:26 +00:00
overflow Scrollbars are not clipped to layer bounds in RenderLayerBacking 2021-06-15 18:12:34 +00:00
resources
scroll-snap CSS scroll snap should allow scrolling to the middle of snap areas that overflow the snapport 2021-06-29 07:14:08 +00:00
sticky Standardize on "allows scrolling" terminology instead of asking about scrollbars 2020-12-23 17:00:45 +00:00
clamp-out-of-bounds-scrolls-expected.txt Standardize on "allows scrolling" terminology instead of asking about scrollbars 2020-12-23 17:00:45 +00:00
clamp-out-of-bounds-scrolls.html
fast-scroll-div-latched-div-expected.txt
fast-scroll-div-latched-div-with-handler-expected.txt
fast-scroll-div-latched-div-with-handler.html
fast-scroll-div-latched-div.html
fast-scroll-div-latched-mainframe-expected.txt
fast-scroll-div-latched-mainframe-with-handler-expected.txt
fast-scroll-div-latched-mainframe-with-handler.html
fast-scroll-div-latched-mainframe.html
fast-scroll-iframe-latched-iframe-expected.txt
fast-scroll-iframe-latched-iframe-with-handler-expected.txt
fast-scroll-iframe-latched-iframe-with-handler.html
fast-scroll-iframe-latched-iframe.html
fast-scroll-iframe-latched-mainframe-expected.txt
fast-scroll-iframe-latched-mainframe-with-handler-expected.txt
fast-scroll-iframe-latched-mainframe-with-handler.html
fast-scroll-iframe-latched-mainframe.html
fast-scroll-iframe-latched-select-expected.txt
fast-scroll-iframe-latched-select.html
fast-scroll-mainframe-zoom-expected.txt
fast-scroll-mainframe-zoom.html
fast-scroll-select-latched-mainframe-expected.txt
fast-scroll-select-latched-mainframe-with-handler-expected.txt
fast-scroll-select-latched-mainframe-with-handler.html
fast-scroll-select-latched-mainframe.html
fast-scroll-select-latched-select-expected.txt
fast-scroll-select-latched-select-with-handler-expected.txt
fast-scroll-select-latched-select-with-handler.html
fast-scroll-select-latched-select.html
iframe_in_iframe-expected.txt
iframe_in_iframe.html
latched-div-with-scroll-snap-expected.txt
latched-div-with-scroll-snap.html
latched-to-deleted-node-expected.txt
latched-to-deleted-node.html
null-parent-back-crash-expected.txt
null-parent-back-crash.html [Testing] Rename test header commands to match names in WebPreferences*.yaml 2020-10-13 17:16:15 +00:00
overflow-scroll-reduced-content-expected.txt
overflow-scroll-reduced-content.html Vertical scroll with mouse wheel in horizontal scroller fails to propagate to the document 2021-08-09 23:41:29 +00:00
overflow-scroll-zero-delta-wheel-events-expected.txt
overflow-scroll-zero-delta-wheel-events.html
root-overflow-with-mousewheel-expected.txt
root-overflow-with-mousewheel.html
scroll-iframe-latched-selects-expected.txt
scroll-iframe-latched-selects.html
scrolling-no-iframe-latching-expected.txt
scrolling-no-iframe-latching.html
scrolling-tree-after-scroll-expected.txt Standardize on "allows scrolling" terminology instead of asking about scrollbars 2020-12-23 17:00:45 +00:00
scrolling-tree-after-scroll.html
scrolling-tree-slow-scrolling-expected.txt Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
scrolling-tree-slow-scrolling.html
slow-scrolling-background-toggle-expected.txt
slow-scrolling-background-toggle.html Rename Internals.mainThreadScrollingReasons to synchronousScrollingReasons 2021-05-29 23:29:26 +00:00
slow-scrolling-expected.txt
slow-scrolling-hidden-background-toggle-expected.txt
slow-scrolling-hidden-background-toggle.html Rename Internals.mainThreadScrollingReasons to synchronousScrollingReasons 2021-05-29 23:29:26 +00:00
slow-scrolling.html Rename Internals.mainThreadScrollingReasons to synchronousScrollingReasons 2021-05-29 23:29:26 +00:00
stateless-scrolling-no-rubber-band-expected.txt
stateless-scrolling-no-rubber-band.html
wheel-events-with-no-delta-expected.txt
wheel-events-with-no-delta.html