diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2019-01-28 18:12:31 +0100 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2019-04-26 10:17:45 +0200 |
commit | 1b036355ced7cd6b8195970fef07383ba3561c4d (patch) | |
tree | b55825739af8dd296e911341c111ff9f497392b3 /components/script/dom/node.rs | |
parent | df81debffcdf2d73bfbc936392236fd82d61aeac (diff) | |
download | servo-1b036355ced7cd6b8195970fef07383ba3561c4d.tar.gz servo-1b036355ced7cd6b8195970fef07383ba3561c4d.zip |
Bind/unbind shadow host children to/from tree
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 25a0c4625e8..1585f81693e 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -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>(), + ); } } } |