|
@@ -761,25 +761,13 @@ impl<'le> GeckoElement<'le> { |
|
|
data.damage |= damage; |
|
|
} |
|
|
|
|
|
/// This logic is duplicated in Gecko's nsIContent::IsRootOfAnonymousSubtree. |
|
|
#[inline] |
|
|
fn is_root_of_anonymous_subtree(&self) -> bool { |
|
|
use crate::gecko_bindings::structs::NODE_IS_ANONYMOUS_ROOT; |
|
|
self.flags() & (NODE_IS_ANONYMOUS_ROOT as u32) != 0 |
|
|
} |
|
|
|
|
|
/// This logic is duplicated in Gecko's nsIContent::IsRootOfNativeAnonymousSubtree. |
|
|
#[inline] |
|
|
fn is_root_of_native_anonymous_subtree(&self) -> bool { |
|
|
use crate::gecko_bindings::structs::NODE_IS_NATIVE_ANONYMOUS_ROOT; |
|
|
return self.flags() & (NODE_IS_NATIVE_ANONYMOUS_ROOT as u32) != 0; |
|
|
} |
|
|
|
|
|
#[inline] |
|
|
fn is_in_anonymous_subtree(&self) -> bool { |
|
|
unsafe { bindings::Gecko_IsInAnonymousSubtree(self.0) } |
|
|
} |
|
|
|
|
|
/// Returns true if this node is the shadow root of an use-element shadow tree. |
|
|
#[inline] |
|
|
fn is_root_of_use_element_shadow_tree(&self) -> bool { |
|
@@ -1028,7 +1016,7 @@ impl<'le> TElement for GeckoElement<'le> { |
|
|
// StyleChildrenIterator::IsNeeded does, except that it might return |
|
|
// true if we used to (but no longer) have anonymous content from |
|
|
// ::before/::after, or nsIAnonymousContentCreators. |
|
|
if self.is_in_anonymous_subtree() || |
|
|
if self.is_in_native_anonymous_subtree() || |
|
|
self.is_html_slot_element() || |
|
|
self.shadow_root().is_some() || |
|
|
self.may_have_anonymous_children() |
|
@@ -2243,7 +2231,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { |
|
|
|
|
|
#[inline] |
|
|
fn ignores_nth_child_selectors(&self) -> bool { |
|
|
self.is_root_of_anonymous_subtree() |
|
|
self.is_root_of_native_anonymous_subtree() |
|
|
} |
|
|
} |
|
|
|
|
|
0 comments on commit
246433a