aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorFernando Jiménez Moreno <ferjmoreno@gmail.com>2019-04-29 12:15:16 +0200
committerFernando Jiménez Moreno <ferjmoreno@gmail.com>2019-04-29 12:15:16 +0200
commit37e88e77cdf00e3555599dd4004d03548bd95dcf (patch)
treef12f3989ea47d2b2744b4cb976ad39b8da96bd6d /components/script/dom/node.rs
parent68bee1c7717f6219bcace8f6be4de42629687eab (diff)
downloadservo-37e88e77cdf00e3555599dd4004d03548bd95dcf.tar.gz
servo-37e88e77cdf00e3555599dd4004d03548bd95dcf.zip
Set self as containing_shadow_root for shadow roots
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 630e16d6d0e..814378aca88 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -947,11 +947,6 @@ impl Node {
}
pub fn containing_shadow_root(&self) -> Option<DomRoot<ShadowRoot>> {
- // NodeRareData contains the shadow root the node belongs to,
- // but this node may be a shadow root itself.
- if let Some(ref shadow_root) = self.downcast::<ShadowRoot>() {
- return Some(DomRoot::from_ref(shadow_root));
- }
self.rare_data()
.as_ref()?
.containing_shadow_root
@@ -1281,9 +1276,6 @@ impl LayoutNodeHelpers for LayoutDom<Node> {
#[inline]
#[allow(unsafe_code)]
unsafe fn containing_shadow_root_for_layout(&self) -> Option<LayoutDom<ShadowRoot>> {
- if let Some(ref shadow_root) = self.downcast::<ShadowRoot>() {
- return Some(*shadow_root);
- }
(*self.unsafe_get())
.rare_data_for_layout()
.as_ref()?