From 41698e7923a4a10e3f0886e5761923591c2f3364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Sun, 6 Aug 2017 22:35:22 -0700 Subject: [PATCH] Implement ToAnimatedZero for MozLength --- .../style/properties/helpers/animated_properties.mako.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 4419e2921fe..d6e20b26cce 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -1364,7 +1364,14 @@ impl Animatable for MozLength { impl ToAnimatedZero for MozLength { #[inline] - fn to_animated_zero(&self) -> Result { Err(()) } + fn to_animated_zero(&self) -> Result { + match *self { + MozLength::LengthOrPercentageOrAuto(ref length) => { + Ok(MozLength::LengthOrPercentageOrAuto(length.to_animated_zero()?)) + }, + _ => Err(()) + } + } } /// https://drafts.csswg.org/css-transitions/#animtype-lpcalc