Skip to content

merge_pr_49803

Compare
Choose a tag to compare
@github-actions github-actions released this 20 Dec 17:33

[carousel] Implement targeted scroll-marker selection for ::column

::column pseudos[1] may create ::scroll-markers, but do not exist in the
DOM tree as parents of the elements which are flowed into them.
They also do not appear to have LayoutObjects and are not found[2]
in the layout tree. So, when searching for the appropriate scroll-marker
to select for a targeted scroll we need to consider whether the
scroll-marker-generating element (marker-generating-element) found in
the layout tree is also flowed into the same scroll-marker-generating
::column (marker-generating-column) as the target of the scrollIntoView
operation. If the target and marker-generating-element are both in
marker-generating-column, marker-generating-element is the preferred[3]
choice. The only means we have of checking whether an element is flowed
into a ::column is by looking at the rect associated with that ::column.

[1] https://drafts.csswg.org/css-multicol-2/#column-pseudo
[2] https://source.chromium.org/chromium/chromium/src/+/165f5ddad25b289f886a248ca810d075b1e7bb87:third_party/blink/renderer/core/page/scrolling/snap_coordinator.cc;l=254-255
[3] w3c/csswg-drafts#10738 (comment)

Bug: 380062280
Change-Id: Ie2ad58c3beca13a4945325d9aa9c4aec6a5fc332
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6088285
Commit-Queue: David Awogbemila [email protected]
Reviewed-by: Steve Kobes [email protected]
Cr-Commit-Position: refs/heads/main@{#1399198}