mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Let style elements remember which StyleSheetList they live in
Instead of trying to locate the relevant StyleSheetList on style element removal from the DOM, we now simply keep a pointer to the list instead. This fixes an issue where using attachShadow() on an element that had a declarative shadow DOM would cause any style elements present to use the wrong StyleSheetList when removing themselves from the tree.
This commit is contained in:
committed by
Andreas Kling
parent
2064be708f
commit
8543b8ad6a
Notes:
github-actions[bot]
2024-09-21 06:56:52 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/8543b8ad6a4 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1467
@@ -0,0 +1,9 @@
|
||||
<div id="hmmst"><template shadowrootmode="open"><div><style></style></div></template></div>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
hmmst.attachShadow({ mode: "open" });
|
||||
println("PASS (didn't crash)");
|
||||
hmmst.remove();
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user