mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Implement ToAnimatedZero for MozLength
This commit is contained in:
parent
05f7cea25f
commit
41698e7923
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue