style: fix the check for specified transitions.

Check both transition-property and transition-duration.
This commit is contained in:
Emilio Cobos Álvarez 2017-06-23 12:23:52 +02:00 committed by Anthony Ramine
parent 626c029623
commit 12309543d3

View file

@ -1765,7 +1765,9 @@ pub mod style_structs {
/// Returns whether there are any transitions specified.
#[cfg(feature = "servo")]
pub fn specifies_transitions(&self) -> bool {
self.transition_property_count() > 0
self.transition_duration_iter()
.take(self.transition_property_count())
.any(|t| t.seconds() > 0.)
}
% endif
}