Closed Bug 2078504 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63290 - Pin the activated ::column::scroll-marker as selected

Categories

(Core :: Layout: Scrolling and Overflow, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63290 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63290
Details from upstream follow.

Daniil Sakhapov <sakhapov@google.com> wrote:

Pin the activated ::column::scroll-marker as selected

Since crbug.com/529411428 the pin state of a ::scroll-marker-group is
updated from the scroll-into-view bubbling loop
(PerformBubblingScrollIntoViewWithResult()), which infers the targeted
scroll marker from the node of the box being scrolled.

For a ::column::scroll-marker activation that box is the scroll
container itself (see Element::ScrollIntoViewNoVisualUpdate()), so
FindScrollMarkerForTargetedScroll() started its backwards layout-order
search outside the scroller. With scroll-marker-group: before the
::scroll-marker-group box is laid out right before the scroller, so the
search walked into it, picked up its last ::scroll-marker and pinned
that one instead of the activated marker. With scroll-marker-group: after nothing was found, so the activated marker was selected but not
pinned anymore.

Fix this on two levels:

ScrollMarkerGroupPseudoElement::ActivateScrollMarker() now pins the
activated marker itself (passing along apply_snap_alignment) instead
of relying on the scroll-into-view machinery to infer it. Activation
is by definition a targeted scroll to that marker's target.
FindScrollMarkerForTargetedScroll() bails out when the target is the
scroll container owning the group. There is no scroll target inside
the scroller to map to a marker in that case, and the backwards walk
would otherwise leave the scroller and potentially end up in the
::scroll-marker-group box.

Bug: 566965154
Change-Id: Ia3da8c1708fe927dc5120ae25fa9db070f2d2302
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8498493
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Morten Stenshorne \<mstensho@chromium.org>
Auto-Submit: Daniil Sakhapov \<sakhapov@google.com>
Reviewed-by: Morten Stenshorne \<mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1711426}

Component: web-platform-tests → Layout: Scrolling and Overflow
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 191 tests and 4 subtests

Status Summary

Firefox

OK : 69
PASS : 18[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 35[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 44[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 47[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 1[GitHub] 140[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 219[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 220[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]
TIMEOUT: 3[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 4[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
ERROR : 1
NOTRUN : 1

Chrome

FAIL : 1

Safari

FAIL : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.