mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
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:
parent
425025c230
commit
246433acfa
1 changed files with 2 additions and 14 deletions
|
@ -761,13 +761,6 @@ impl<'le> GeckoElement<'le> {
|
||||||
data.damage |= damage;
|
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.
|
/// This logic is duplicated in Gecko's nsIContent::IsRootOfNativeAnonymousSubtree.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn is_root_of_native_anonymous_subtree(&self) -> bool {
|
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;
|
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.
|
/// Returns true if this node is the shadow root of an use-element shadow tree.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn is_root_of_use_element_shadow_tree(&self) -> bool {
|
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
|
// StyleChildrenIterator::IsNeeded does, except that it might return
|
||||||
// true if we used to (but no longer) have anonymous content from
|
// true if we used to (but no longer) have anonymous content from
|
||||||
// ::before/::after, or nsIAnonymousContentCreators.
|
// ::before/::after, or nsIAnonymousContentCreators.
|
||||||
if self.is_in_anonymous_subtree() ||
|
if self.is_in_native_anonymous_subtree() ||
|
||||||
self.is_html_slot_element() ||
|
self.is_html_slot_element() ||
|
||||||
self.shadow_root().is_some() ||
|
self.shadow_root().is_some() ||
|
||||||
self.may_have_anonymous_children()
|
self.may_have_anonymous_children()
|
||||||
|
@ -2243,7 +2231,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn ignores_nth_child_selectors(&self) -> bool {
|
fn ignores_nth_child_selectors(&self) -> bool {
|
||||||
self.is_root_of_anonymous_subtree()
|
self.is_root_of_native_anonymous_subtree()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue