mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
Assert that style element has an owner in parse_own_css
(#39458)
The existing `assert!(node.is_connected())` is wrong. What it *wants* to assert is that the style element has an owner, which is either a Document or a ShadowRoot that the element is a descendant of. However, if the element is descendant of a ShadowRoot which is itself not connected to a document then the assertion would fail. Instead, we use `node.is_in_a_document_tree() || node.is_in_a_shadow_tree()`, which more accurately reflects the intent. Testing: This change adds the test case from https://github.com/servo/servo/issues/37781 as a crashtest Fixes https://github.com/servo/servo/issues/39457 Fixes https://github.com/servo/servo/issues/37781 --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
dd8e4f231c
commit
206dcff080
3 changed files with 27 additions and 1 deletions
7
tests/wpt/meta/MANIFEST.json
vendored
7
tests/wpt/meta/MANIFEST.json
vendored
|
@ -10380,6 +10380,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"modify-style-element-in-disconnected-shadow-crash.html": [
|
||||
"3808642a97451eef40573214fbe1d1c6273c557f",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"move-to-new-tree-1343016.html": [
|
||||
"853884b99301e22383e0fd0936cf154beab5e93e",
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue