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