mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #26970 - mrobinson:fix-animation-delay, r=jdm
animations: Don't apply animation delay to every iteration The delay should only be applied to the animation before the first iteration. --- <!-- 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] 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 commit is contained in:
commit
60f4fedcbf
4 changed files with 110 additions and 7 deletions
|
@ -483,7 +483,7 @@ impl Animation {
|
|||
|
||||
// Update the next iteration direction if applicable.
|
||||
// TODO(mrobinson): The duration might now be wrong for floating point iteration counts.
|
||||
self.started_at += self.duration + self.delay;
|
||||
self.started_at += self.duration;
|
||||
match self.direction {
|
||||
AnimationDirection::Alternate | AnimationDirection::AlternateReverse => {
|
||||
self.current_direction = match self.current_direction {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue