Skip to content

Commit

Permalink
stylo: remove bogus optimization check in replace_rules() for visited…
Browse files Browse the repository at this point in the history
… styles.

We skipped updating the rule nodes for visited rules during animation-only restyle.
However, this causes isseus that visited style overrides animation styles on visited element.
So, it turns out that we should update the visited rules even during animation-only restyle.

Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1381235
  • Loading branch information
chenpighead committed Jul 27, 2017
1 parent 9370a0c commit 000547b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions components/style/matching.rs
Expand Up @@ -647,14 +647,12 @@ pub trait MatchMethods : TElement {
CascadeVisitedMode::Unvisited,
cascade_inputs,
);
if !context.shared.traversal_flags.for_animation_only() {
result |= self.replace_rules_internal(
replacements,
context,
CascadeVisitedMode::Visited,
cascade_inputs
);
}
result |= self.replace_rules_internal(
replacements,
context,
CascadeVisitedMode::Visited,
cascade_inputs
);
result
}

Expand Down

0 comments on commit 000547b

Please sign in to comment.