style: Remove NODE_IS_ANONYMOUS_ROOT.

We no longer have multiple kinds of anonymous subtrees, so we can get back one
node bit.

Differential Revision: https://phabricator.services.mozilla.com/D53344
This commit is contained in:
Emilio Cobos Álvarez 2019-11-18 08:49:27 +00:00
parent 425025c230
commit 246433acfa
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A

View file

@ -761,13 +761,6 @@ 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 {
@ -775,11 +768,6 @@ impl<'le> GeckoElement<'le> {
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()
}
}