Bug 1367225 - Process SMIL and CSS Transitions and Animations in the same restyle process. r?birtles
MozReview-Commit-ID: 6NNxFUZhYP6
--- 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
}