Re: [csswg-drafts] [web-animations-2] Setting the timeline to null during play vs. play-pending (#6412)

The chrome implementation does not actually call the web-animations-2 procedure for setting the timeline when the timeline is updated via a style change rather than an API call (it probably should).  Having said that, when updated via animation.timeline = ... we do see a difference in the result.  While in the play pending state, the hold time and current time are both zero.  When the timeline is changed after the ready promise resolves, we have a resolved start time, unresolved hold time and unresolved current time.  The change in the value of current time results in getComputedStyle returning either the initial state of the animation or the underlying value of the property.   Note that if the timeline were initially null, we would be stuck in a play pending state as we would not resolve the ready promise. 

Resetting the timeline, either via a style change or API call, should likely be consistent with current time becoming null due to a scroll timeline becoming inactive. The complications with scroll timelines are discussed at length here: 

https://github.com/w3c/csswg-drafts/issues/2066

This discussion does not fully address this issue, but provides some useful background information and has some directly relevant comments.

-- 
GitHub Notification of comment by kevers-google
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6412#issuecomment-874184547 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 5 July 2021 15:12:26 UTC