haikuwebkit/LayoutTests/tiled-drawing
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
..
resources [LayoutTests] Delete unused LayoutTests/tiled-drawing resources 2021-06-11 23:39:23 +00:00
scrolling Vertical scroll with mouse wheel in horizontal scroller fails to propagate to the document 2021-08-09 23:41:29 +00:00
background-transparency-toggle-expected.txt
background-transparency-toggle.html
crash-reloading-with-position-fixed-content-expected.txt
crash-reloading-with-position-fixed-content.html
fixed-background-scroll-repaint-expected.txt
fixed-background-scroll-repaint.html
fixed-layout-size-fixed-attachment-cover-expected.html
fixed-layout-size-fixed-attachment-cover.html
fixed-layout-size-fixed-attachment-local-expected.html
fixed-layout-size-fixed-attachment-local.html
header-and-footer-hit-testing-expected.txt
header-and-footer-hit-testing-in-frame-expected.txt
header-and-footer-hit-testing-in-frame.html
header-and-footer-hit-testing-with-page-scale-expected.txt
header-and-footer-hit-testing-with-page-scale.html
header-and-footer-hit-testing.html
simple-document-with-dynamic-background-color-expected.txt
simple-document-with-dynamic-background-color.html
simple-document-with-margin-tiles-expected.txt
simple-document-with-margin-tiles.html
tile-coverage-after-scroll-expected.txt
tile-coverage-after-scroll-speculative-expected.txt
tile-coverage-after-scroll-speculative.html
tile-coverage-after-scroll.html
tile-coverage-iframe-to-zero-coverage-expected.txt
tile-coverage-iframe-to-zero-coverage.html
tile-coverage-scroll-to-bottom-expected.txt
tile-coverage-scroll-to-bottom.html
tile-coverage-scrolled-view-exposed-rect-expected.txt Books sometimes ends up with blank pages, especially after adjusting font size 2020-05-02 04:57:13 +00:00
tile-coverage-scrolled-view-exposed-rect.html Books sometimes ends up with blank pages, especially after adjusting font size 2020-05-02 04:57:13 +00:00
tile-coverage-slow-scrolling-expected.txt
tile-coverage-slow-scrolling.html
tile-coverage-speculative-expected.txt
tile-coverage-speculative.html
tile-coverage-view-exposed-rect-expected.txt
tile-coverage-view-exposed-rect.html
tile-size-both-scrollable-expected.txt
tile-size-both-scrollable.html
tile-size-horizontally-scrollable-expected.txt
tile-size-horizontally-scrollable.html
tile-size-slow-zoomed-expected.txt
tile-size-slow-zoomed.html
tile-size-unscrollable-expected.txt
tile-size-unscrollable.html
tile-size-vertically-scrollable-expected.txt
tile-size-vertically-scrollable.html
tile-size-view-exposed-rect-expected.txt
tile-size-view-exposed-rect.html
tiled-backing-in-window-expected.txt
tiled-backing-in-window.html
tiled-drawing-scroll-position-page-cache-restoration-expected.txt
tiled-drawing-scroll-position-page-cache-restoration.html [Testing] Rename test header commands to match names in WebPreferences*.yaml 2020-10-13 17:16:15 +00:00
tiled-drawing-zoom-expected.txt
tiled-drawing-zoom-scrolled-expected.txt
tiled-drawing-zoom-scrolled.html
tiled-drawing-zoom.html
toggle-to-fixed-background-expected.txt
toggle-to-fixed-background.html
top-content-inset-fixed-attachment-body-expected.html
top-content-inset-fixed-attachment-body.html
top-content-inset-fixed-attachment-cover-expected.html
top-content-inset-fixed-attachment-cover-local-expected.html
top-content-inset-fixed-attachment-cover-local.html
top-content-inset-fixed-attachment-cover.html
top-content-inset-fixed-attachment-expected.html
top-content-inset-fixed-attachment-local-expected.html
top-content-inset-fixed-attachment-local.html
top-content-inset-fixed-attachment-positioned-expected.html
top-content-inset-fixed-attachment-positioned.html
top-content-inset-fixed-attachment.html
use-tiled-drawing-expected.txt
use-tiled-drawing.html
visible-rect-content-inset-expected.txt
visible-rect-content-inset.html
window-server-snapshots-work-expected-mismatch.html
window-server-snapshots-work.html