mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
style: Remove unused AFFECTED_BY_PSEUDO_ELEMENTS StyleRelation.
MozReview-Commit-ID: yHldvHm87b
This commit is contained in:
parent
a2f8af9203
commit
95a2ac51c4
2 changed files with 2 additions and 9 deletions
|
@ -15,8 +15,6 @@ bitflags! {
|
|||
/// Whether this element is affected by presentational hints. This is
|
||||
/// computed externally (that is, in Servo).
|
||||
const AFFECTED_BY_PRESENTATIONAL_HINTS = 1 << 0,
|
||||
/// Whether this element has pseudo-element styles. Computed externally.
|
||||
const AFFECTED_BY_PSEUDO_ELEMENTS = 1 << 1,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ use properties::longhands::display::computed_value as display;
|
|||
use rule_tree::{CascadeLevel, StrongRuleNode};
|
||||
use selector_parser::{PseudoElement, RestyleDamage, SelectorImpl};
|
||||
use selectors::matching::{ElementSelectorFlags, MatchingContext, MatchingMode, StyleRelations};
|
||||
use selectors::matching::{VisitedHandlingMode, AFFECTED_BY_PSEUDO_ELEMENTS};
|
||||
use selectors::matching::VisitedHandlingMode;
|
||||
use sharing::StyleSharingBehavior;
|
||||
use stylearc::Arc;
|
||||
use stylist::RuleInclusion;
|
||||
|
@ -1003,7 +1003,7 @@ pub trait MatchMethods : TElement {
|
|||
debug!("Match and cascade for {:?}", self);
|
||||
|
||||
// Perform selector matching for the primary style.
|
||||
let mut primary_results =
|
||||
let primary_results =
|
||||
self.match_primary(context, data, VisitedHandlingMode::AllLinksUnvisited);
|
||||
let important_rules_changed =
|
||||
primary_results.important_rules_overriding_animation_changed;
|
||||
|
@ -1051,11 +1051,6 @@ pub trait MatchMethods : TElement {
|
|||
self.cascade_pseudos(context, data, CascadeVisitedMode::Unvisited);
|
||||
}
|
||||
|
||||
// If we have any pseudo elements, indicate so in the primary StyleRelations.
|
||||
if !data.styles.pseudos.is_empty() {
|
||||
primary_results.relations |= AFFECTED_BY_PSEUDO_ELEMENTS;
|
||||
}
|
||||
|
||||
// If the style is shareable, add it to the LRU cache.
|
||||
if sharing == StyleSharingBehavior::Allow {
|
||||
// If we previously tried to match this element against the cache,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue