Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check displayContentsChanged in destroyRenderTreeIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=248776 rdar://102807985> Reviewed by Antti Koivisto. Check displayContentsChanged in destroyRenderTreeIfNeeded since display: contents may be removed due to focus removal while removing subtrees but we still need to clean up pseudo elements. * LayoutTests/fast/css/content/quote-display-contents-crash-expected.txt: Added. * LayoutTests/fast/css/content/quote-display-contents-crash.html: Added. * Source/WebCore/dom/ContainerNode.cpp: (WebCore::destroyRenderTreeIfNeeded): * Source/WebCore/dom/Element.cpp: (WebCore::Element::resolveComputedStyle): Canonical link: https://commits.webkit.org/256843.5@webkit-2022.12-embargoed
- Loading branch information
Showing
4 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
LayoutTests/fast/css/content/quote-display-contents-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 @@ | ||
Pass if no crash. |
18 changes: 18 additions & 0 deletions
18
LayoutTests/fast/css/content/quote-display-contents-crash.html
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,18 @@ | ||
<style> | ||
q { border-image: url(about:blank); } | ||
label:focus-within { display: contents; } | ||
</style> | ||
<script> | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
function runTest() { | ||
label.remove(); | ||
document.write("Pass if no crash."); | ||
} | ||
</script> | ||
<body onload="runTest()"> | ||
<label id="label" > | ||
<textarea autofocus></textarea> | ||
<q></q> | ||
</label> | ||
</body> |
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