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 diff --git a/components/style/values/computed/length.rs b/components/style/values/computed/length.rs index 29117a5cb8d..4d9f0cd6fbc 100644 --- a/components/style/values/computed/length.rs +++ b/components/style/values/computed/length.rs @@ -574,7 +574,7 @@ impl LengthOrNumber { pub type LengthOrNormal = Either; /// A value suitable for a `min-width`, `min-height`, `width` or `height` property. -/// See specified/values/length.rs for more details. +/// See values/specified/length.rs for more details. #[allow(missing_docs)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[derive(Clone, Copy, Debug, PartialEq, ToCss)] @@ -618,7 +618,7 @@ impl ToComputedValue for specified::MozLength { } /// A value suitable for a `max-width` or `max-height` property. -/// See specified/values/length.rs for more details. +/// See values/specified/length.rs for more details. #[allow(missing_docs)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] #[derive(Clone, Copy, Debug, PartialEq, ToCss)]