[wpt-sync] Sync PR 57777 - Don't update the style recalc root for moveBefore() outside flat tree
Categories
(Core :: DOM: Core & HTML, task, P4)
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}
| Assignee | ||
Updated•12 hours ago
|
| Assignee | ||
Comment 1•12 hours ago
|
||
| Assignee | ||
Comment 2•11 hours ago
|
||
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
- /dom/nodes/moveBefore/preserve-render-blocking-script.html [wpt.fyi]
- A moved script should keep its render-blocking state:
FAIL
- A moved script should keep its render-blocking state:
- /dom/nodes/moveBefore/preserve-render-blocking-style.html [wpt.fyi]
- A moved script should keep its render-blocking state:
FAIL
- A moved script should keep its render-blocking state:
- /dom/nodes/moveBefore/selection-preserve.html [wpt.fyi]
- moveBefore should not reset selection with preceding text:
FAIL - moveBefore resets selection that enters a subtree, when the whole selection is moved:
FAIL - moveBefore anchor node moved up to expand selection and absorb nodes:
FAIL - moveBefore focus node moved up to shrink selection and exclude nodes; focus node gets reset:
FAIL - moveBefore selection is not preserved, especially when underlying range gets inverted:
FAIL
- moveBefore should not reset selection with preceding text:
Description
•