Implement ToAnimatedZero for MozLength

This commit is contained in:
Nazım Can Altınova 2017-08-06 22:35:22 -07:00
parent 05f7cea25f
commit 41698e7923

View file

@ -1364,7 +1364,14 @@ impl Animatable for MozLength {
impl ToAnimatedZero for MozLength {
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> { Err(()) }
fn to_animated_zero(&self) -> Result<Self, ()> {
match *self {
MozLength::LengthOrPercentageOrAuto(ref length) => {
Ok(MozLength::LengthOrPercentageOrAuto(length.to_animated_zero()?))
},
_ => Err(())
}
}
}
/// https://drafts.csswg.org/css-transitions/#animtype-lpcalc