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
--- 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;