Closed Bug 2092817 Opened 16 days ago Closed 12 days ago

[wpt-sync] Sync PR 64572 - script: Use ensure_pre_insertion_validity in Node.replaceChild

Categories

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

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Gabriele Cabrini <gabriele@gabrielecabrini.it> wrote:

script: Use ensure_pre_insertion_validity in Node.replaceChild

ReplaceChild had its own copy of the pre-insertion checks. That copy used is_inclusive_ancestor_of
instead of is_host_including_inclusive_ancestor, so a shadow host's ancestor could be inserted
into the host's shadow root, and bind_to_tree then recursed forever.

As the spec now does ("ensure pre-insert validity given node, parent, child, and « child »"),
ReplaceChild now calls Node::ensure_pre_insertion_validity, which gets a children_to_exclude
parameter. moveBefore gets the same host-including check fix.

Testing: Added a WPT crashtest
Fixes: #<!-- nolink -->49533
Reviewed in servo/servo#49549

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

PASS: 1

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8d21823dcde3 https://hg.mozilla.org/integration/autoland/rev/a8d1e424b6d1 [wpt PR 64572] - script: Use ensure_pre_insertion_validity in Node.replaceChild, a=testonly
Status: NEW → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.