Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-1] Initialize start time of scroll animations to zero (#2075) #4842
[web-animations-1] Initialize start time of scroll animations to zero (#2075) #4842
Changes from all commits
1fd6277
fc80ef2
3df0083
441a771
5d11616
4806500
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little bit nervous about changing this part since I'm afraid it might have unintended consequences that I haven't been able to anticipate. However, if we can make this change and none of the existing WPT break, then I guess it's ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this change, having current time unresolved automatically means start time being unresolved. That's how I convinced myself it should not be any backward compatibility problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that true? If you have no timeline or an inactive timeline, I think you can still have a resolved start time with an unresolved current time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After you mentioned null timeline, the case I can think of is when running animation.timeline is set to null. However in Chrome animation.timeline is read only, so hopefully user scripts don't rely on this behavior.
In regards to inactive timelines, I don't think DocumentTimeline is expected to become newly inactive. Even if it does become inactive, the spec says we should use previous resolved time. "Responding to newly inactive timelines" is not implemented in Chrome, so, again, hopefully user scripts don't rely on this behavior.
I think the major impact of this change is that we are changing the mental model of animation play state. Before, 'idle'/'running' implied activeness of a timeline the animation is attached to, while now 'idle' play state can only be achieved by user actions - cancelling a running animation or not calling play/pause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Chrome is shipping the
Animation()
constructor, however, which allows creating animations without a timeline so I think it's possible it's already being relied on. It does seem unlikely, however.