haikuwebkit/LayoutTests/tiled-drawing/scrolling/scroll-snap
Martin Robinson ce15fc2dae CSS scroll snap should allow scrolling to the middle of snap areas that overflow the snapport
https://bugs.webkit.org/show_bug.cgi?id=223021
<rdar://problem/75518606>

Patch by Martin Robinson <mrobinson@igalia.com> on 2021-06-29
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-scroll-snap/overflowing-snap-areas-expected.txt: Update test
expectations to reflect newly passing tests.

Source/WebCore:

No new tests. This is covered by existing tests and, in particular, a WPT test:
    - web-platform-tests/css/css-scroll-snap/overflowing-snap-areas.html

* page/scrolling/ScrollSnapOffsetsInfo.cpp:
(WebCore::searchForPotentialSnapPoints): Record when the target snap offset happens to
fall in the interior of a snap area that overflows the snap port.
(WebCore::closestSnapOffsetWithInfoAndAxis): When this happens and we are in a spec-compliant
sitaution, just snap to the original target offset.

LayoutTests:

Update some existing tests that were relying on non-spec compliant behavior. These tests
used snap areas that were larger than the snapport and didn't expect that the parent
scroller could scroll into them.

* css3/scroll-snap/scroll-snap-click-scrollbar-gutter.html: This test used snap areas that
overflow the snapport, thus meant that it relied on non-spec compliant behavior. Rework it so
that the snap areas do not overflow, maintaining the existing behavior.
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html: Ditto.
* tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow.html: Ditto.

Canonical link: https://commits.webkit.org/239230@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-06-29 07:14:08 +00:00
..
resources Clean up some mainframe scroll snap tests 2021-01-12 16:30:40 +00:00
scroll-snap-async-iframe-expected.txt
scroll-snap-async-iframe.html Remove experimental: and internal: prefixes from test header commands 2020-11-04 15:56:26 +00:00
scroll-snap-iframe-expected.txt
scroll-snap-iframe.html
scroll-snap-mandatory-2d-overflow-expected.txt
scroll-snap-mandatory-2d-overflow.html
scroll-snap-mandatory-async-overflow-expected.txt
scroll-snap-mandatory-async-overflow-stateless-expected.txt
scroll-snap-mandatory-async-overflow-stateless.html Remove experimental: and internal: prefixes from test header commands 2020-11-04 15:56:26 +00:00
scroll-snap-mandatory-async-overflow.html Remove experimental: and internal: prefixes from test header commands 2020-11-04 15:56:26 +00:00
scroll-snap-mandatory-borders-expected.txt
scroll-snap-mandatory-borders.html
scroll-snap-mandatory-hidden-scrollbars-expected.txt
scroll-snap-mandatory-hidden-scrollbars.html
scroll-snap-mandatory-mainframe-horizontal-expected.txt
scroll-snap-mandatory-mainframe-horizontal-legacy-expected.txt Scroll snap specified on :root doesn't work 2020-11-06 09:44:54 +00:00
scroll-snap-mandatory-mainframe-horizontal-legacy.html Clean up some mainframe scroll snap tests 2021-01-12 16:30:40 +00:00
scroll-snap-mandatory-mainframe-horizontal-with-keyboard-expected.txt CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-mandatory-mainframe-horizontal-with-keyboard-scaled-expected.txt CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-mandatory-mainframe-horizontal-with-keyboard-scaled.html CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-mandatory-mainframe-horizontal-with-keyboard.html CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-mandatory-mainframe-horizontal-with-margin-expected.txt Scroll-snap on the root aligns to the body margin edge, not the viewport edge 2020-11-10 09:28:40 +00:00
scroll-snap-mandatory-mainframe-horizontal-with-margin.html Clean up some mainframe scroll snap tests 2021-01-12 16:30:40 +00:00
scroll-snap-mandatory-mainframe-horizontal.html Clean up some mainframe scroll snap tests 2021-01-12 16:30:40 +00:00
scroll-snap-mandatory-mainframe-slow-horizontal-expected.txt
scroll-snap-mandatory-mainframe-slow-horizontal.html Clean up some mainframe scroll snap tests 2021-01-12 16:30:40 +00:00
scroll-snap-mandatory-mainframe-slow-vertical-expected.txt
scroll-snap-mandatory-mainframe-slow-vertical.html Clean up some mainframe scroll snap tests 2021-01-12 16:30:40 +00:00
scroll-snap-mandatory-mainframe-vertical-expected.txt
scroll-snap-mandatory-mainframe-vertical-legacy-expected.txt Scroll snap specified on :root doesn't work 2020-11-06 09:44:54 +00:00
scroll-snap-mandatory-mainframe-vertical-legacy.html Clean up some mainframe scroll snap tests 2021-01-12 16:30:40 +00:00
scroll-snap-mandatory-mainframe-vertical-then-horizontal-expected.txt
scroll-snap-mandatory-mainframe-vertical-then-horizontal.html CSS scroll snap should allow scrolling to the middle of snap areas that overflow the snapport 2021-06-29 07:14:08 +00:00
scroll-snap-mandatory-mainframe-vertical-with-keyboard-expected.txt CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-mandatory-mainframe-vertical-with-keyboard-scaled-expected.txt CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-mandatory-mainframe-vertical-with-keyboard-scaled.html CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-mandatory-mainframe-vertical-with-keyboard.html CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-mandatory-mainframe-vertical-with-margin-expected.txt Scroll-snap on the root aligns to the body margin edge, not the viewport edge 2020-11-10 09:28:40 +00:00
scroll-snap-mandatory-mainframe-vertical-with-margin.html Clean up some mainframe scroll snap tests 2021-01-12 16:30:40 +00:00
scroll-snap-mandatory-mainframe-vertical.html Clean up some mainframe scroll snap tests 2021-01-12 16:30:40 +00:00
scroll-snap-mandatory-overflow-expected.txt
scroll-snap-mandatory-overflow-stateless-expected.txt
scroll-snap-mandatory-overflow-stateless.html
scroll-snap-mandatory-overflow.html
scroll-snap-mandatory-padding-expected.txt
scroll-snap-mandatory-padding.html
scroll-snap-mandatory-rotated-expected.txt
scroll-snap-mandatory-rotated.html
scroll-snap-mandatory-then-proximity-expected.txt
scroll-snap-mandatory-then-proximity.html
scroll-snap-momentum-in-non-snapping-axis-expected.txt No scrolling momentum with 'scroll-snap-type: x mandatory' if the scroller scrolls vertically 2021-03-23 08:52:12 +00:00
scroll-snap-momentum-in-non-snapping-axis.html No scrolling momentum with 'scroll-snap-type: x mandatory' if the scroller scrolls vertically 2021-03-23 08:52:12 +00:00
scroll-snap-phase-change-relatching-expected.txt
scroll-snap-phase-change-relatching.html
scroll-snap-proximity-mainframe-expected.txt
scroll-snap-proximity-mainframe-horizontal-with-keyboard-expected.txt CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-proximity-mainframe-horizontal-with-keyboard.html CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-proximity-mainframe-legacy-expected.txt Scroll snap specified on :root doesn't work 2020-11-06 09:44:54 +00:00
scroll-snap-proximity-mainframe-legacy.html Scroll snap specified on :root doesn't work 2020-11-06 09:44:54 +00:00
scroll-snap-proximity-mainframe-vertical-with-keyboard-expected.txt CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-proximity-mainframe-vertical-with-keyboard.html CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-proximity-mainframe.html Scroll snap specified on :root doesn't work 2020-11-06 09:44:54 +00:00
scroll-snap-proximity-overflow-expected.txt
scroll-snap-proximity-overflow-rtl-with-keyboard-expected.txt CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-proximity-overflow-rtl-with-keyboard.html CSS Scroll Snap is not in effect when the user scrolls via the keyboard 2020-12-15 14:34:27 +00:00
scroll-snap-proximity-overflow-script-expected.txt Scroll-snap points should be triggered during programmatic scroll 2021-01-13 14:18:03 +00:00
scroll-snap-proximity-overflow-script.html Scroll-snap points should be triggered during programmatic scroll 2021-01-13 14:18:03 +00:00
scroll-snap-proximity-overflow.html CSS scroll snap should allow scrolling to the middle of snap areas that overflow the snapport 2021-06-29 07:14:08 +00:00
scroll-snap-scrolling-jumps-to-top-expected.txt
scroll-snap-scrolling-jumps-to-top.html
scroll-snap-stop-momentum-scroll-expected.txt scroll-snap-stop: always not respected during momentum scrolling 2021-03-19 17:48:11 +00:00
scroll-snap-stop-momentum-scroll.html scroll-snap-stop: always not respected during momentum scrolling 2021-03-19 17:48:11 +00:00