mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Bind/unbind shadow host children to/from tree
This commit is contained in:
parent
df81debffc
commit
1b036355ce
2 changed files with 29 additions and 2 deletions
|
@ -643,7 +643,8 @@ impl Node {
|
|||
}
|
||||
|
||||
fn is_shadow_including_inclusive_ancestor_of(&self, node: &Node) -> bool {
|
||||
node.shadow_including_inclusive_ancestors().any(|ancestor| &*ancestor == self)
|
||||
node.shadow_including_inclusive_ancestors()
|
||||
.any(|ancestor| &*ancestor == self)
|
||||
}
|
||||
|
||||
pub fn following_siblings(&self) -> impl Iterator<Item = DomRoot<Node>> {
|
||||
|
@ -1117,7 +1118,13 @@ impl Node {
|
|||
return DomRoot::from_ref(&a);
|
||||
}
|
||||
|
||||
a = DomRoot::from_ref(a_root.downcast::<ShadowRoot>().unwrap().Host().upcast::<Node>());
|
||||
a = DomRoot::from_ref(
|
||||
a_root
|
||||
.downcast::<ShadowRoot>()
|
||||
.unwrap()
|
||||
.Host()
|
||||
.upcast::<Node>(),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue