From 12309543d36b881be24ced5bcf7c7d8d008f9118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 23 Jun 2017 12:23:52 +0200 Subject: [PATCH] style: fix the check for specified transitions. Check both transition-property and transition-duration. --- components/style/properties/properties.mako.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 390ad3d3c27..daa82d6e454 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -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 }