servo: Merge #17889 - stylo: remove bogus optimization check in replace_rules() for visited styles (from chenpighead:fix-transition-visited); r=hiro
authorJeremy Chen <jeremychen@mozilla.com>
Thu, 27 Jul 2017 08:25:20 -0500
changeset 422570 5894beca0ec268b4ec9a592e9545b9c4039080ff
parent 422569 ac03995f81f74c68f77eb406ce2dfe04675d9ea1
child 422571 433c42e1980fd609bbe00e82c532af1731a4d8f7
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #17889 - stylo: remove bogus optimization check in replace_rules() for visited styles (from chenpighead:fix-transition-visited); r=hiro 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 Source-Repo: https://github.com/servo/servo Source-Revision: d429561aa2dba35cfaca498c589462942b4c1cc4
servo/components/style/matching.rs
--- a/servo/components/style/matching.rs
+++ b/servo/components/style/matching.rs
@@ -642,24 +642,22 @@ pub trait MatchMethods : TElement {
     ) -> bool {
         let mut result = false;
         result |= self.replace_rules_internal(
             replacements,
             context,
             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
     }
 
     /// Updates the rule nodes without re-running selector matching, using just
     /// the rule tree, for a specific visited mode.
     ///
     /// Returns true if an !important rule was replaced.
     fn replace_rules_internal(