From ff702e23f57697ae5b2a2a79a6e0d0aa40632c20 Mon Sep 17 00:00:00 2001 From: David Awogbemila Date: Tue, 7 Jan 2025 08:44:02 +0000 Subject: [PATCH] Bug 1938639 [wpt PR 49802] - [carousel] Pin the selected scroll-marker for targeted scrolls, a=testonly Automatic update from web-platform-tests [carousel] Pin the selected scroll-marker for targeted scrolls The CSS working group resolved[1] that when a scroll operation is aimed at an element, i.e. Element.scrollIntoView, the associated scroll-marker-group should select the active scroll-marker based on the element which the operation is intending to scroll to. In such cases, the scroll-marker that should be selected is the scroll-marker associated with the first scroll target (a scroll target is an element which generates a scroll-marker) found through a search starting from the target of the scrollIntoView itself and backwards in tree-order. As soon as some other type of scroll occurs, e.g. Element.scrollTo, or a user gesture scroll, the scroll-marker-group should no longer consider its active marker pinned, i.e. it should be based on the scroll position. This patch implements this for elements in general, but not for ::column pseudo elements which may also act as scroll targets since ::column::scroll-marker is allowed. The ::column case needs to be handled specially as ::column pseudos are not parents of the elements which are flowed into them in the DOM tree. This will be done in a follow-up patch. [1] https://github.com/w3c/csswg-drafts/issues/10738#issuecomment-2489046785 Bug: 380062280 Change-Id: I363e0f055f9791ead0b35f4bbe037db91f299624 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6089232 Reviewed-by: Steve Kobes Commit-Queue: David Awogbemila Cr-Commit-Position: refs/heads/main@{#1399197} -- wpt-commits: 9bbcdbf23b7b1ba83b82211b46f84c488bfc98e9 wpt-pr: 49802 --- ...ted-scroll-marker-selection.tentative.html | 247 ++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 testing/web-platform/tests/css/css-overflow/targeted-scroll-marker-selection.tentative.html diff --git a/testing/web-platform/tests/css/css-overflow/targeted-scroll-marker-selection.tentative.html b/testing/web-platform/tests/css/css-overflow/targeted-scroll-marker-selection.tentative.html new file mode 100644 index 0000000000000..0f1f6640546cc --- /dev/null +++ b/testing/web-platform/tests/css/css-overflow/targeted-scroll-marker-selection.tentative.html @@ -0,0 +1,247 @@ + + + + + + CSS Test: scroll tracking for ::scroll-markers whose orignatin elements cannot be scroll-aligned + + + + + + + + + + + + +
+ +
+ + + + \ No newline at end of file