mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Record whether an snapshot is recording a class attribute change or id change.
I'll use this information in order to get fewer dependencies out of the dependency set. Bug: 1368240 MozReview-Commit-ID: 5HlmKmSNO8p
This commit is contained in:
parent
8449eb4a62
commit
262f6adc30
3 changed files with 50 additions and 0 deletions
|
@ -62,6 +62,25 @@ impl GeckoElementSnapshot {
|
|||
self.has_any(Flags::OtherPseudoClassState)
|
||||
}
|
||||
|
||||
/// Returns true if the snapshot recorded an id change.
|
||||
#[inline]
|
||||
pub fn id_changed(&self) -> bool {
|
||||
self.mIdAttributeChanged()
|
||||
}
|
||||
|
||||
/// Returns true if the snapshot recorded a class attribute change.
|
||||
#[inline]
|
||||
pub fn class_changed(&self) -> bool {
|
||||
self.mClassAttributeChanged()
|
||||
}
|
||||
|
||||
/// Returns true if the snapshot recorded an attribute change which isn't a
|
||||
/// class or id change.
|
||||
#[inline]
|
||||
pub fn other_attr_changed(&self) -> bool {
|
||||
self.mOtherAttributeChanged()
|
||||
}
|
||||
|
||||
/// selectors::Element::attr_matches
|
||||
pub fn attr_matches(&self,
|
||||
ns: &NamespaceConstraint<&Namespace>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue