mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Make Element::attach_shadow() and ShadowRoot closer to spec (#36024)
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
This commit is contained in:
parent
11d47558b3
commit
db74179dc8
18 changed files with 117 additions and 158 deletions
|
@ -2731,13 +2731,16 @@ impl Node {
|
|||
copy_elem.attach_shadow(
|
||||
IsUserAgentWidget::No,
|
||||
shadow_root.Mode(),
|
||||
true,
|
||||
shadow_root.Clonable(),
|
||||
shadow_root.Serializable(),
|
||||
shadow_root.DelegatesFocus(),
|
||||
shadow_root.SlotAssignment(),
|
||||
can_gc
|
||||
)
|
||||
.expect("placement of attached shadow root must be valid, as this is a copy of an existing one");
|
||||
|
||||
// TODO: Step 7.3 Set copy’s shadow root’s declarative to node’s shadow root’s declarative.
|
||||
// Step 7.3 Set copy’s shadow root’s declarative to node’s shadow root’s declarative.
|
||||
copy_shadow_root.set_declarative(shadow_root.is_declarative());
|
||||
|
||||
// Step 7.4 For each child child of node’s shadow root, in tree order: append the result of
|
||||
// cloning child with document and the clone children flag set, to copy’s shadow root.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue