Do a better job of detecting where there are transitions.

The current code thinks that every element has transitions.
This commit is contained in:
Bobby Holley 2017-04-09 18:29:17 +08:00
parent cceaf7c619
commit fbdfbb1dfa
3 changed files with 20 additions and 1 deletions

View file

@ -1509,6 +1509,12 @@ pub mod style_structs {
pub fn specifies_animations(&self) -> bool {
self.animation_name_iter().any(|name| name.0 != atom!(""))
}
/// Returns whether there are any transitions specified.
#[cfg(feature = "servo")]
pub fn specifies_transitions(&self) -> bool {
self.transition_property_count() > 0
}
% endif
}