Bug 1367960 - Fix calculation of base styles to drop animation rules; r?hiro
It seems that changeset 97ce9ed5b08f7b1c7c6cd71a9499068b8bd2ae4e mistakenly
changed the check that a cascade level to keep is *not* an animation level to
a check that it *is* an animation level.
MozReview-Commit-ID: 3vzGxXG8sRO
--- a/servo/components/style/rule_tree/mod.rs
+++ b/servo/components/style/rule_tree/mod.rs
@@ -364,17 +364,17 @@ impl RuleTree {
return path.clone();
}
let iter = path.self_and_ancestors().take_while(
|node| node.cascade_level() >= CascadeLevel::SMILOverride);
let mut last = path;
let mut children = vec![];
for node in iter {
- if node.cascade_level().is_animation() {
+ if !node.cascade_level().is_animation() {
children.push((node.get().source.clone().unwrap(), node.cascade_level()));
}
last = node;
}
self.insert_ordered_rules_from(last.parent().unwrap().clone(), children.into_iter().rev())
}
}