Split get_animation_rules into get_animation_rule and get_transition_rule.

If an element has only CSS animations we don't need to get transition rule,
and vice versa. This will be used when we implement eRestyle_CSSAnimations
and eRestyle_CSSTransitions.
This commit is contained in:
Hiroyuki Ikezoe 2017-03-17 12:28:37 +09:00
parent 88c69206eb
commit ba18c14b91
2 changed files with 25 additions and 5 deletions

View file

@ -259,6 +259,18 @@ pub trait TElement : PartialEq + Debug + Sized + Copy + Clone + ElementExt + Pre
AnimationRules(None, None)
}
/// Get this element's animation rule.
fn get_animation_rule(&self, _pseudo: Option<&PseudoElement>)
-> Option<Arc<RwLock<PropertyDeclarationBlock>>> {
None
}
/// Get this element's transition rule.
fn get_transition_rule(&self, _pseudo: Option<&PseudoElement>)
-> Option<Arc<RwLock<PropertyDeclarationBlock>>> {
None
}
/// Get this element's state, for non-tree-structural pseudos.
fn get_state(&self) -> ElementState;