Open Bug 2016706 Opened 12 hours ago Updated 11 hours ago

[wpt-sync] Sync PR 57777 - Don't update the style recalc root for moveBefore() outside flat tree

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Rune Lillesveen <futhark@chromium.org> wrote:

Don't update the style recalc root for moveBefore() outside flat tree

StyleTraversalRoots are confused and inconsistent if we involve elements
outside the flat tree when updating them. There are assumptions that
elements with non-null ComputedStyle are part of the flat tree given the
current slot assignments, which does not hold for moveBefore() which
does not clear ComputedStyle when removing elements from the tree.

Add an extra check for elements without a GetStyleRecalcParent() which
are not the documentElement but still have a non-null ComputedStyle to
cover the case where moveBefore() does a move from inside to outside
the flat tree.

Also reverting the fix for issue 483298490, which is essentially the
same issue and will be fixed by this change instead.

Bug: 433696404, 483298490
Change-Id: I0538a2dabad93774c5fae41052434aa05635c73c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7571883
Reviewed-by: Anders Hartvoll Ruud \<andruud@chromium.org>
Commit-Queue: Rune Lillesveen \<futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1584564}

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 44 tests

Status Summary

Firefox

OK : 40
PASS: 1[GitHub] 3[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 101[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 102[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-64-24h2-debug, Gecko-windows11-64-24h2-opt]
FAIL: 7

Chrome

PASS: 1

Safari

PASS: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

You need to log in before you can comment on or make changes to this bug.