diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 0c5e283cee7..20e9f9f3860 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -959,7 +959,8 @@ impl<'le> TElement for GeckoElement<'le> { // ::before/::after, XBL bindings, or nsIAnonymousContentCreators. if self.is_in_anonymous_subtree() || self.has_xbl_binding_with_content() || - self.is_in_shadow_tree() || + self.is_html_slot_element() || + self.shadow_root().is_some() || self.may_have_anonymous_children() { unsafe { let mut iter: structs::StyleChildrenIterator = ::std::mem::zeroed();