[wpt-sync] Sync PR 50128 - DOM: Fix moveBefore() style CharacterData style calculation crash
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox136 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 50128 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/50128
Details from upstream follow.
Dominic Farolino <dom@chromium.org> wrote:
DOM: Fix moveBefore() style CharacterData style calculation crash
When we decided to allow the moveBefore() API to move CharacterData
nodes around the DOM, https://crrev.com/c/5943680 was landed to ensure
we still callFlatTreeParentChanged()
on ALL CharacterData nodes.
This was a bug, since Comment nodes should never have this called on
them. A test was also added, but it did not properly test Comment nodes,
which should never haveFlatTreeParentChanged()
called.This CL ensures that we early-return from
ContainerNode::ChildrenChanged()
altogether in this case, and fixes
the test to properly test Comments.Bug: 40150299
Change-Id: Ia850b2d13eeaa4f34aa5f836e2697e600d006328
Reviewed-on: https://chromium-review.googlesource.com/6180060
WPT-Export-Revision: 3877f963cc4c7b021ca6d10f4e308298dc00fdb7
Assignee | ||
Updated•1 month ago
|
Assignee | ||
Comment 1•1 month ago
|
||
Assignee | ||
Comment 2•1 month ago
|
||
Assignee | ||
Comment 3•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI
Total 1 tests and 30 subtests
Status Summary
Firefox
OK
: 1
PASS
: 3
FAIL
: 27
Chrome
OK
: 1
PASS
: 30
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /dom/nodes/moveBefore/tentative/Node-moveBefore.html [wpt.fyi]
- If node is a host-including inclusive ancestor of parent, then throw a HierarchyRequestError DOMException.:
FAIL
(Chrome:PASS
) - If node is not a DocumentFragment, DocumentType, Element, Text, ProcessingInstruction, or Comment node, then throw a HierarchyRequestError DOMException.:
FAIL
(Chrome:PASS
) - If node is a Text node and parent is a document, then throw a HierarchyRequestError DOMException.:
FAIL
(Chrome:PASS
) - If node is a doctype and parent is not a document, then throw a HierarchyRequestError DOMException.:
FAIL
(Chrome:PASS
) - If node is a DocumentFragment with multiple elements and parent is a document, then throw a HierarchyRequestError DOMException.:
FAIL
(Chrome:PASS
) - If node is a DocumentFragment with an element and parent is a document with another element, then throw a HierarchyRequestError DOMException.:
FAIL
(Chrome:PASS
) - If node is an Element and parent is a document with another element, then throw a HierarchyRequestError DOMException.:
FAIL
(Chrome:PASS
) - If node is a doctype and parent is a document with another doctype, then throw a HierarchyRequestError DOMException.:
FAIL
(Chrome:PASS
) - If node is a doctype and parent is a document with an element, then throw a HierarchyRequestError DOMException.:
FAIL
(Chrome:PASS
) - moveBefore() on disconnected parent throws a HierarchyRequestError:
FAIL
(Chrome:PASS
) - moveBefore() with disconnected target node throws a HierarchyRequestError:
FAIL
(Chrome:PASS
) - moveBefore() on a cross-document target node throws a HierarchyRequestError:
FAIL
(Chrome:PASS
) - moveBefore() into a Document throws a HierarchyRequestError:
FAIL
(Chrome:PASS
) - moveBefore() CharacterData into a Document:
FAIL
(Chrome:PASS
) - moveBefore() with node being an inclusive ancestor of parent throws a HierarchyRequestError:
FAIL
(Chrome:PASS
) - moveBefore() with a non-{Element, CharacterData} throws a HierarchyRequestError:
FAIL
(Chrome:PASS
) - moveBefore with an Element or CharacterData succeeds:
FAIL
(Chrome:PASS
) - moveBefore on a paragraph's Text node child:
FAIL
(Chrome:PASS
) - moveBefore with reference child whose parent is NOT the destination parent (context node) throws a NotFoundError.:
FAIL
(Chrome:PASS
) - moveBefore() returns undefined:
FAIL
(Chrome:PASS
) - Moving a node before itself should not move the node:
FAIL
(Chrome:PASS
) - Moving a node from a disconnected container to a disconnected new parent without a shared ancestor throws a HIERARCHY_REQUEST_ERR:
FAIL
(Chrome:PASS
) - Moving a node from a disconnected container to a disconnected new parent in the same tree succeeds:
FAIL
(Chrome:PASS
) - Moving a node from a disconnected container to a disconnected new parent in the same tree succeeds,also across shadow-roots:
FAIL
(Chrome:PASS
) - Moving a node from disconnected->connected throws a HIERARCHY_REQUEST_ERR:
FAIL
(Chrome:PASS
) - Moving a node from connected->disconnected throws a HIERARCHY_REQUEST_ERR:
FAIL
(Chrome:PASS
) - No custom element callbacks are run during disconnected moveBefore():
FAIL
(Chrome:PASS
)
- If node is a host-including inclusive ancestor of parent, then throw a HierarchyRequestError DOMException.:
Description
•