From 000547b999c99cfdb267c39b4729769af080a192 Mon Sep 17 00:00:00 2001 From: Jeremy Chen Date: Wed, 26 Jul 2017 15:45:30 +0800 Subject: [PATCH] stylo: remove bogus optimization check in replace_rules() for visited 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 --- components/style/matching.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/components/style/matching.rs b/components/style/matching.rs index 24e16cff235..ccd18f75f7b 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -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 }