Skip to content
Permalink
Browse files
Limit visited cascade for reparenting
The specialized cascade flow in `stylist::compute_style_with_inputs` (used with
reparenting) currently computes all properties for visited styles, but we only
need visited-dependent properties.

This adds the cascade flag to reduce the work to visited-dependent properties
only, like we do for the regular cascade flow.

MozReview-Commit-ID: FGCj6GPnQOB
  • Loading branch information
jryans committed Oct 12, 2017
1 parent 9f8514d commit 0eb7d65
Showing 1 changed file with 2 additions and 1 deletion.
@@ -25,6 +25,7 @@ use properties::{AnimationRules, PropertyDeclarationBlock};
#[cfg(feature = "servo")]
use properties::INHERIT_ALL;
use properties::IS_LINK;
use properties::VISITED_DEPENDENT_ONLY;
use rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource};
use selector_map::{PrecomputedHashMap, SelectorMap, SelectorMapEntry};
use selector_parser::{SelectorImpl, PerPseudoElementMap, PseudoElement};
@@ -924,7 +925,7 @@ impl Stylist {
Some(layout_parent_style_for_visited),
None,
font_metrics,
cascade_flags,
cascade_flags | VISITED_DEPENDENT_ONLY,
self.quirks_mode,
/* rule_cache = */ None,
&mut Default::default(),

0 comments on commit 0eb7d65

Please sign in to comment.