Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Split style resolution and dynamic change computation. #17688

Merged
merged 11 commits into from Jul 12, 2017

style: Remove unused AFFECTED_BY_PSEUDO_ELEMENTS StyleRelation.

MozReview-Commit-ID: yHldvHm87b
  • Loading branch information
emilio committed Jul 12, 2017
commit 95a2ac51c4da93c55b8f678dac35c7d640fb4a1b
@@ -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,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.