diff --git a/components/style/matching.rs b/components/style/matching.rs index 7fab97d7d7a..2f2468413f5 100644 --- a/components/style/matching.rs +++ b/components/style/matching.rs @@ -433,7 +433,7 @@ trait PrivateMatchMethods: TElement { &pseudo_style); // Handle animations. - if animate { + if animate && !context.shared.traversal_flags.for_animation_only() { self.process_animations(context, &mut old_values, &mut new_values, @@ -906,11 +906,11 @@ pub trait MatchMethods : TElement { /// Updates the rule nodes without re-running selector matching, using just /// the rule tree. Returns true if the rule nodes changed. - fn cascade_with_replacements(&self, - hint: RestyleHint, - context: &StyleContext, - data: &mut AtomicRefMut) - -> bool { + fn replace_rules(&self, + hint: RestyleHint, + context: &StyleContext, + data: &mut AtomicRefMut) + -> bool { use properties::PropertyDeclarationBlock; use shared_lock::Locked; diff --git a/components/style/traversal.rs b/components/style/traversal.rs index a258125652c..67828e6a7ec 100644 --- a/components/style/traversal.rs +++ b/components/style/traversal.rs @@ -711,7 +711,7 @@ fn compute_style(_traversal: &D, } CascadeWithReplacements(hint) => { let _rule_nodes_changed = - element.cascade_with_replacements(hint, context, &mut data); + element.replace_rules(hint, context, &mut data); element.cascade_primary_and_pseudos(context, &mut data); } CascadeOnly => {