Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upanimations: Finish support for fractional iteration counts #27032
Conversation
highfive
commented
Jun 22, 2020
|
Heads up! This PR modifies the following files:
|
|
Opened new PR for upstreamable changes. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#24283. |
| AnimationState::Pending | AnimationState::Canceled | AnimationState::Paused(_) => { | ||
| return false | ||
| AnimationState::Paused(progress) => { | ||
| return self.on_last_iteration() && progress > self.current_iteration_length(); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mrobinson
Jun 23, 2020
Author
Member
I've corrected this, which I think was a weird side-effect of the fact that we used to iterate past the last expected iteration when animations finished. I've corrected that and updated to code to reflect it. I think things should be less confusing now. This has also led me to make some improvements to how we calculate elapsedTime for animation events. It should be correct now for fractional iteration counts.
|
r? @emilio |
|
This looks pretty sensible to me. |
ab19b5b
to
1bb0796
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#24283. |
|
@emilio Thanks for the review! I've pushed a new version of the branch that adds a few more extra changes to improve the way we handle iteration counts in animations and calculate |
1bb0796
to
d319b3b
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#24283. |
|
@bors-servo r=emilio Thanks again for the reviews! |
|
|
animations: Finish support for fractional iteration counts This change also improves support for creating animations with negative delays, as that is necessary to test support for fractional iteration lengths. Fixes: #14858 <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14858 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
New 2020 passes:
Failures in 2013 on macOS:
|
d319b3b
to
98a4f55
animations: Finish support for fractional iteration counts This change also improves support for creating animations with negative delays, as that is necessary to test support for fractional iteration lengths. Fixes: #14858 <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14858 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
This change also improves support for creating animations with negative delays, as that is necessary to test support for fractional iteration lengths. This change also adjusts existing Servo animation tests which assumed that advancing to the exact moment of the end of the animation would be considered "before the end." With this change, this moment is "after the end." Fixes: #14858
This conversion can lead to floating point errors and extra work when computing animations. Avoiding it allows animation-iteration-count-009.html to pass.
98a4f55
to
cf45100
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#24283. |
|
@bors-servo try=wpt |
animations: Finish support for fractional iteration counts This change also improves support for creating animations with negative delays, as that is necessary to test support for fractional iteration lengths. Fixes: #14858 <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14858 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
|
@bors-servo try=wpt-2020 |
|
@bors-servo retry |
animations: Finish support for fractional iteration counts This change also improves support for creating animations with negative delays, as that is necessary to test support for fractional iteration lengths. Fixes: #14858 <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14858 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
The notification got lost, but all tests passed: https://community-tc.services.mozilla.com/tasks/groups/ObJGefmMTfSS3KTT725Ppg |
|
@bors-servo r+ |
|
|
|
|
mrobinson commentedJun 22, 2020
This change also improves support for creating animations with negative
delays, as that is necessary to test support for fractional iteration
lengths.
Fixes: #14858
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors