mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Don't fallback to discrete animation within add_weighted() for Either<>.
For CSS Transitions we want this case to return Err() so we know that the two values are not interpolable. For CSS Animations/Web Animations we implement discrete animation as the fallback behavior when Err() is returned.
This commit is contained in:
parent
fa3b62746d
commit
bff67d8272
1 changed files with 1 additions and 4 deletions
|
@ -2410,10 +2410,7 @@ impl<T, U> Animatable for Either<T, U>
|
|||
(Either::Second(ref this), Either::Second(ref other)) => {
|
||||
this.add_weighted(&other, self_portion, other_portion).map(Either::Second)
|
||||
},
|
||||
_ => {
|
||||
let result = if self_portion > other_portion {*self} else {*other};
|
||||
Ok(result)
|
||||
}
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue