mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Don't match native anonymous content to user/author rules.
This commit is contained in:
parent
210b1be1d0
commit
22b62e0913
5 changed files with 83 additions and 60 deletions
|
@ -28,6 +28,7 @@ use gecko_bindings::bindings::Gecko_StoreStyleDifference;
|
|||
use gecko_bindings::structs;
|
||||
use gecko_bindings::structs::{NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO, NODE_IS_DIRTY_FOR_SERVO};
|
||||
use gecko_bindings::structs::{nsIAtom, nsIContent, nsStyleContext};
|
||||
use gecko_bindings::structs::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE;
|
||||
use parking_lot::RwLock;
|
||||
use parser::ParserContextExtraData;
|
||||
use properties::{ComputedValues, parse_style_attribute};
|
||||
|
@ -624,4 +625,9 @@ impl<'le> ElementExt for GeckoElement<'le> {
|
|||
fn is_link(&self) -> bool {
|
||||
self.match_non_ts_pseudo_class(NonTSPseudoClass::AnyLink)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn matches_user_and_author_rules(&self) -> bool {
|
||||
self.flags() & (NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE as u32) == 0
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue