Closed Bug 2079477 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63348 - [scroll-anchor] Change ScrollAnchor to hold a WeakMember to the anchor.

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Ian Kilpatrick <ikilpatrick@chromium.org> wrote:

[scroll-anchor] Change ScrollAnchor to hold a WeakMember to the anchor.

Previously ScrollAnchor held a strong reference to the appropriate
LayoutObject which was the scroll-anchor.

When an object was removed from the tree, it'd check if itself was a
scroll-anchor, and remove itself as appropriate.

We have various cases now where we may remove a sub-tree (which would
only call WillBeRemovedFromTree for the top level node in the tree).

These cases would leave a potentially invalid scroll-anchor, triggering
either a nullptr exception or a destroyed DCHECK.

The subtree was removed, then potentially destroyed, and the destroyed
nested object would never clear itself from the ScrollAnchor.

Switch ScrollAnchor to store a WeakMember\<LayoutObject> instead. We can
remove all the (relatively) complex book-keeping when we remove these
objects.

Bug: 511985285
Change-Id: Ie0b10e64a57a4880b2b2fc5b67c985834347eea4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8524255
Commit-Queue: Ian Kilpatrick \<ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne \<mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1713437}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 80 tests and 2 subtests

Status Summary

Firefox

OK : 69[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] 70[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]
PASS : 1[GitHub] 5[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 85[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] 92[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 95[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 96[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL : 3[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-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]
TIMEOUT: 1
ERROR : 1

Chrome

CRASH : 1

Safari

PASS : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

  • /css/css-scroll-anchoring/start-edge-in-block-layout-direction.html [wpt.fyi]: OK [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], SKIP [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]
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.