mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
fix(parser): Set shadow’s available to element internals in attach_declarative_shadow (#36173)
Aligns the implementation with step 8.5 of the HTML spec for parsing a <template> element in the InHead state by setting shadow_root.set_available_to_element_internals(true) after assigning the shadow root to the template’s contents. Also removes tests/wpt/meta/shadow-dom/declarative/declarative-shadow-dom-available-to-element-internals.html.ini since the test expectations are now updated accordingly. Spec reference: https://html.spec.whatwg.org/multipage/#parsing-main-inhead Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
This commit is contained in:
parent
b4ac6e8ce2
commit
a8063b8b4b
2 changed files with 3 additions and 3 deletions
|
@ -1477,6 +1477,9 @@ impl TreeSink for Sink {
|
|||
let shadow = shadow_root.upcast::<DocumentFragment>();
|
||||
template_element.set_contents(Some(shadow));
|
||||
|
||||
// Step 8.5. Set shadow’s available to element internals to true.
|
||||
shadow_root.set_available_to_element_internals(true);
|
||||
|
||||
Ok(())
|
||||
},
|
||||
Err(_) => Err(String::from("Attaching shadow fails")),
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[declarative-shadow-dom-available-to-element-internals.html]
|
||||
[Declarative Shadow DOM: shadow root should be available to element internals]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue