Bug 1341372 - Part 1: Let animation-only restyle include css-transition.

Animation-only restyle should include both Animation and Transition
cascade levels.

MozReview-Commit-ID: 5l6gaJKbixM
This commit is contained in:
Boris Chiou 2017-04-17 14:22:48 +08:00
parent 485a4de729
commit 1c1e487491
6 changed files with 77 additions and 24 deletions

View file

@ -528,6 +528,17 @@ impl<'le> TElement for GeckoElement<'le> {
self.get_transition_rule(pseudo))
}
fn get_animation_rule_by_cascade(&self,
pseudo: Option<&PseudoElement>,
cascade_level: ServoCascadeLevel)
-> Option<Arc<Locked<PropertyDeclarationBlock>>> {
match cascade_level {
ServoCascadeLevel::Animations => self.get_animation_rule(pseudo),
ServoCascadeLevel::Transitions => self.get_transition_rule(pseudo),
_ => panic!("Unsupported cascade level for getting the animation rule")
}
}
fn get_animation_rule(&self, pseudo: Option<&PseudoElement>)
-> Option<Arc<Locked<PropertyDeclarationBlock>>> {
get_animation_rule(self, pseudo, CascadeLevel::Animations)