Skip to content

Commit

Permalink
Cherry-pick 256843.10@webkit-2022.12-embargoed (b7f9b7f). rdar://1074…
Browse files Browse the repository at this point in the history
…99606

    Add test for element's display contents change on sibling removal
    https://bugs.webkit.org/show_bug.cgi?id=248772

    Reviewed by Tim Nguyen.

    This was already fixed with #248776, but add the test for completeness.

    * LayoutTests/fast/dom/element-clearing-display-contents-on-node-removal-expected.txt: Added.
    * LayoutTests/fast/dom/element-clearing-display-contents-on-node-removal.html: Added.

    Canonical link: https://commits.webkit.org/256843.10@webkit-2022.12-embargoed

Canonical link: https://commits.webkit.org/262474@main
  • Loading branch information
csaavedra authored and webkit-early-warning-system committed Apr 1, 2023
1 parent 03ee49b commit 7942359
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
@@ -0,0 +1 @@
This test passes if it doesn't crash.
@@ -0,0 +1,33 @@
<style>
p~div { display: contents; }
span { padding-block-end: 1em; float: left; }
</style>
<script>

if (window.testRunner)
testRunner.dumpAsText();

function gc() {
if (window.GCController)
return GCController.collect();
}
function runTest() {
video.addEventListener("DOMNodeRemovedFromDocument", () => { });
range = window.document.caretRangeFromPoint();
range.setEnd(video, 1);
range.extractContents();
document.getElementById("span").innerText="This test passes if it doesn't crash.";
}
</script>
<body id="body" onload="gc()">
<span id="span"></span>
<p></p>
<div>
foo
<a href="x"></a>
</div>
<video id="video" src="foo.png">
<kbd></kbd>
<details ontoggle="runTest()" open="">
</video>
</body>

0 comments on commit 7942359

Please sign in to comment.