mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Implement ElementInternals::shadowRoot
(#35923)
* Implement ElementInternals::shadowRoot Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
f527217bdc
commit
8034216d06
7 changed files with 44 additions and 12 deletions
|
@ -542,6 +542,16 @@ impl Element {
|
|||
clonable,
|
||||
can_gc,
|
||||
);
|
||||
|
||||
// Step 7. If element’s custom element state is "precustomized" or "custom",
|
||||
// then set shadow’s available to element internals to true.
|
||||
if matches!(
|
||||
self.get_custom_element_state(),
|
||||
CustomElementState::Precustomized | CustomElementState::Custom
|
||||
) {
|
||||
shadow_root.set_available_to_element_internals(true);
|
||||
}
|
||||
|
||||
self.ensure_rare_data().shadow_root = Some(Dom::from_ref(&*shadow_root));
|
||||
shadow_root
|
||||
.upcast::<Node>()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue