diff --git a/components/selectors/context.rs b/components/selectors/context.rs index 12ebd977837..e27cd6811bb 100644 --- a/components/selectors/context.rs +++ b/components/selectors/context.rs @@ -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, } } diff --git a/components/style/matching.rs b/components/style/matching.rs index b10a3204e32..bb510840bea 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -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,