-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 275221@main (9a1d1c7). https://bugs.webkit.org/show_bug.c…
…gi?id=269959 HTMLDataListElement::childrenChanged doesn't call HTMLElement::childrenChanged https://bugs.webkit.org/show_bug.cgi?id=269959 <rdar://123388053> Reviewed by Chris Dumez. This can lead to an inconsistent state in DOM so call that. * LayoutTests/fast/dom/datalist-children-changed-crash-expected.txt: Added. * LayoutTests/fast/dom/datalist-children-changed-crash.html: Added. * Source/WebCore/dom/ContainerNode.cpp: (WebCore::ContainerNode::removeAllChildrenWithScriptAssertion): Added a debug assertion to catch a similar mistake in the future. * Source/WebCore/html/HTMLDataListElement.cpp: (WebCore::HTMLDataListElement::childrenChanged): Canonical link: https://commits.webkit.org/275221@main Canonical link: https://commits.webkit.org/274313.180@webkitglib/2.44
- Loading branch information
Showing
4 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
LayoutTests/fast/dom/datalist-children-changed-crash-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This test passes if WebKit does not hit any ASAN assertions. | ||
PASS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
function runTest() { | ||
document.all.length; | ||
document.all[0]; | ||
span.cloneNode(false); | ||
document.getElementById('datalist').innerHTML = ''; | ||
if (window.GCController) | ||
GCController.collect(); | ||
document.all.length; | ||
document.body.innerHTML = 'This test passes if WebKit does not hit any ASAN assertions.<br>PASS'; | ||
} | ||
</script> | ||
<body onload=runTest()><span id="span">U<datalist id="datalist"><span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters