mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
style: Drop frames() timing function.
frames() timing function was removed from the spec, so we drop it. Besides, some devtool tests are removed because they use frame(). I will add them back by using new step function later. Differential Revision: https://phabricator.services.mozilla.com/D9309
This commit is contained in:
parent
990f2c6bb9
commit
3a536f463c
4 changed files with 4 additions and 71 deletions
|
@ -369,22 +369,6 @@ impl PropertyAnimation {
|
|||
GenericTimingFunction::Steps(steps, StepPosition::End) => {
|
||||
(time * (steps as f64)).floor() / (steps as f64)
|
||||
},
|
||||
GenericTimingFunction::Frames(frames) => {
|
||||
// https://drafts.csswg.org/css-timing/#frames-timing-functions
|
||||
let mut out = (time * (frames as f64)).floor() / ((frames - 1) as f64);
|
||||
if out > 1.0 {
|
||||
// FIXME: Basically, during the animation sampling process, the input progress
|
||||
// should be in the range of [0, 1]. However, |time| is not accurate enough
|
||||
// here, which means |time| could be larger than 1.0 in the last animation
|
||||
// frame. (It should be equal to 1.0 exactly.) This makes the output of frames
|
||||
// timing function jumps to the next frame/level.
|
||||
// However, this solution is still not correct because |time| is possible
|
||||
// outside the range of [0, 1] after introducing Web Animations. We should fix
|
||||
// this problem when implementing web animations.
|
||||
out = 1.0;
|
||||
}
|
||||
out
|
||||
},
|
||||
GenericTimingFunction::Keyword(keyword) => {
|
||||
let (x1, x2, y1, y2) = keyword.to_bezier();
|
||||
Bezier::new(x1, x2, y1, y2).solve(time, epsilon)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue