github web-platform-tests/wpt merge_pr_48461

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
11 months ago

[css-scroll-snap-2] Resolve scroll-start-targets with reverse DOM order

Per CSSWG resolution[1], user agents should handle competing
scroll-start-targets by scrolling to each target in reverse-DOM-order.

This patch implements this and re-enables scroll-start-target tests.

Note that, for now, we only need to store the scroll-start-target which
is first-in-tree/DOM order and not the whole list. This is because when
we scroll to the scroll-start-targets (in reverse DOM order) we're
effectively only scrolling to the first-in-tree/DOM order
scroll-start-target. Scrolling to each target will only have an effect
when a "nearest" value is accepted by scroll-snap-align which will have
the same effect as "nearest" in scrollIntoView. So for now we can keep
track of just one element, the first in tree/DOM order.

[1] w3c/csswg-drafts#10774 (comment)

Bug: 40909052, 368038561
Change-Id: I029920bdb053ae258932e3e7579f28d8256baf70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5881923
Commit-Queue: David Awogbemila awogbemila@chromium.org
Reviewed-by: Ian Kilpatrick ikilpatrick@chromium.org
Cr-Commit-Position: refs/heads/main@{#1363980}

Don't miss a new wpt release

NewReleases is sending notifications on new releases.