Bug 1367225 - Process SMIL and CSS Transitions and Animations in the same restyle process. r?birtles draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 24 May 2017 06:21:12 +0900
changeset 583239 c3bbdeee1d7afe093a1b2d28869fa3c0bb1a9a32
parent 583238 c7025d419d35185d53cf58a9ab6b3cb8df6445c9
child 583240 4b3dbb483f79b69018f70ae4872ae7b4455d222d
push id60341
push userhikezoe@mozilla.com
push dateTue, 23 May 2017 21:21:45 +0000
reviewersbirtles
bugs1367225
milestone55.0a1
Bug 1367225 - Process SMIL and CSS Transitions and Animations in the same restyle process. r?birtles MozReview-Commit-ID: 6NNxFUZhYP6
servo/components/style/matching.rs
--- a/servo/components/style/matching.rs
+++ b/servo/components/style/matching.rs
@@ -1007,38 +1007,38 @@ pub trait MatchMethods : TElement {
         // Animation restyle hints are processed prior to other restyle
         // hints in the animation-only traversal.
         //
         // Non-animation restyle hints will be processed in a subsequent
         // normal traversal.
         if replacements.intersects(RestyleReplacements::for_animations()) {
             debug_assert!(context.shared.traversal_flags.for_animation_only());
 
-            if replacements.contains(RESTYLE_SMIL) {
+            if replacements.intersects(RESTYLE_SMIL) {
                 replace_rule_node(CascadeLevel::SMILOverride,
                                   self.get_smil_override(),
                                   primary_rules);
             }
 
             let mut replace_rule_node_for_animation = |level: CascadeLevel,
                                                        primary_rules: &mut StrongRuleNode| {
                 let animation_rule = self.get_animation_rule_by_cascade(level);
                 replace_rule_node(level,
                                   animation_rule.as_ref(),
                                   primary_rules);
             };
 
             // Apply Transition rules and Animation rules if the corresponding restyle hint
             // is contained.
-            if replacements.contains(RESTYLE_CSS_TRANSITIONS) {
+            if replacements.intersects(RESTYLE_CSS_TRANSITIONS) {
                 replace_rule_node_for_animation(CascadeLevel::Transitions,
                                                 primary_rules);
             }
 
-            if replacements.contains(RESTYLE_CSS_ANIMATIONS) {
+            if replacements.intersects(RESTYLE_CSS_ANIMATIONS) {
                 replace_rule_node_for_animation(CascadeLevel::Animations,
                                                 primary_rules);
             }
         }
 
         false
     }