mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: fix the check for specified transitions.
Check both transition-property and transition-duration.
This commit is contained in:
parent
626c029623
commit
12309543d3
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue