Bug 1355348 - Rename remove_animation_and_transition_rules to just remove_animation_rules; r?heycam draft
authorBrian Birtles <birtles@gmail.com>
Wed, 26 Apr 2017 12:59:31 +0900
changeset 568396 d1f31c3bd27f3333561bf26945cf2e244076a4c8
parent 568395 1ae64307252e077a0e39720781b85d27a0bc9cdb
child 568397 b8a6b0130ecf693688557170dee36de5d013deba
push id55859
push userbbirtles@mozilla.com
push dateWed, 26 Apr 2017 04:45:43 +0000
reviewersheycam
bugs1355348
milestone55.0a1
Bug 1355348 - Rename remove_animation_and_transition_rules to just remove_animation_rules; r?heycam Now this method covers SMIL override rules, CSS animation / script animation rules, and CSS transition rules so we should just use "animation" in the generic sense. MozReview-Commit-ID: BkpihD0Kzmq
servo/components/style/matching.rs
servo/components/style/rule_tree/mod.rs
--- a/servo/components/style/matching.rs
+++ b/servo/components/style/matching.rs
@@ -1329,17 +1329,17 @@ pub trait MatchMethods : TElement {
                       shared_context: &SharedStyleContext,
                       font_metrics_provider: &FontMetricsProvider,
                       primary_style: &ComputedStyle,
                       pseudo_style: Option<&ComputedStyle>)
                       -> Arc<ComputedValues> {
         let relevant_style = pseudo_style.unwrap_or(primary_style);
         let rule_node = &relevant_style.rules;
         let without_animation_rules =
-            shared_context.stylist.rule_tree.remove_animation_and_transition_rules(rule_node);
+            shared_context.stylist.rule_tree.remove_animation_rules(rule_node);
         if without_animation_rules == *rule_node {
             // Note that unwrapping here is fine, because the style is
             // only incomplete during the styling process.
             return relevant_style.values.as_ref().unwrap().clone();
         }
 
         self.cascade_with_rules(shared_context,
                                 font_metrics_provider,
--- a/servo/components/style/rule_tree/mod.rs
+++ b/servo/components/style/rule_tree/mod.rs
@@ -250,17 +250,17 @@ impl RuleTree {
         if path.cascade_level() != CascadeLevel::Transitions {
             return path.clone();
         }
 
         path.parent().unwrap().clone()
     }
 
     /// Returns new rule node without rules from declarative animations.
-    pub fn remove_animation_and_transition_rules(&self, path: &StrongRuleNode) -> StrongRuleNode {
+    pub fn remove_animation_rules(&self, path: &StrongRuleNode) -> StrongRuleNode {
         // Return a clone if there are no animation rules.
         if !path.has_animation_or_transition_rules() {
             return path.clone();
         }
 
         let iter = path.self_and_ancestors().take_while(
             |node| node.cascade_level() >= CascadeLevel::SMILOverride);
         let mut last = path;