Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web-animations-2] The handle of zero or inf total time when we convert a time-based animation to a proportional animation #7459

Open
BorisChiou opened this issue Jul 6, 2022 · 0 comments
Labels
web-animations-2 Current Work

Comments

@BorisChiou
Copy link
Contributor

There are two edge cases the spec doesn't specify what happen when we convert a time-based animation to a proportional animation in [web-animations-2]:

Set start delay to be the result of evaluating specified start delay / total time * timeline duration.
Set iteration duration to be the result of evaluating specified iteration duration / total time * timeline duration.
Set end delay to be the result of evaluating specified end delay / total time * timeline duration.

This spec issue may be related to #4862, the normalization of progress-based animations. I notice Chromium handles these two edge cases by (code):

  1. if the total time (i.e. end time) is zero, the start delay, end delay, and the iteration duration are all zero.
  2. if the total time is inf, that start delay and end delay are zero, and the iteration duration is 1 / iteration count.

The handle in Chromium looks reasonable to me, I'd like to use this similar way in Gecko. And it'd better to address these two edge cases in the spec as well.

@BorisChiou BorisChiou added the web-animations-2 Current Work label Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-animations-2 Current Work
Projects
None yet
Development

No branches or pull requests

1 participant