Bind/unbind shadow host children to/from tree

This commit is contained in:
Fernando Jiménez Moreno 2019-01-28 18:12:31 +01:00
parent df81debffc
commit 1b036355ce
2 changed files with 29 additions and 2 deletions

View file

@ -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>(),
);
}
}
}