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

Limit visited cascade for reparenting #18844

Merged
merged 1 commit into from Oct 12, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

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
commit 0eb7d65e73d51bf3b85d2607fd0e4b4782781856
@@ -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(),
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.