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

Removed exception for setting current time on a scroll linked animation #20567

Merged
merged 1 commit into from Dec 16, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Dec 2, 2019

As far as I can tell, we are now ok to remove the exception that was
preventing current time from being set on animations using a
ScrollTimeline.

The change to hold_time_ in Animation::CommitPendingPlay is needed in
the case where the scroller has some non-zero offset and current time
has been set before play. If we set hold_time_ to 0 here, setting the
current_time on the animation has no effect, the current time from the
scroll timeline overrides it. This means that scroll-linked animations
are able to have a non-zero start_time.

I also had to add an additional condition to step 5 of the play
animation algorithm to prevent early abort when the above case occurs.

Added test for setting current time on scroll linked animation

Bug: 916117
Change-Id: I8017ce2f81496057cf5e4b8bb16b14707ee82484
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1945923
Commit-Queue: Jordan Taylor <jortaylo@microsoft.com>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#725247}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1945923 branch 7 times, most recently from 344476b to 91ad301 Compare December 6, 2019 22:46
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1945923 branch 5 times, most recently from 882f855 to 300d6bd Compare December 16, 2019 18:50
As far as I can tell, we are now ok to remove the exception that was
preventing current time from being set on animations using a
ScrollTimeline.

The change to hold_time_ in Animation::CommitPendingPlay is needed in
the case where the scroller has some non-zero offset and current time
has been set before play. If we set hold_time_ to 0 here, setting the
current_time on the animation has no effect, the current time from the
scroll timeline overrides it. This means that scroll-linked animations
are able to have a non-zero start_time.

I also had to add an additional condition to step 5 of the play
animation algorithm to prevent early abort when the above case occurs.

Added test for setting current time on scroll linked animation

Bug: 916117
Change-Id: I8017ce2f81496057cf5e4b8bb16b14707ee82484
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1945923
Commit-Queue: Jordan Taylor <jortaylo@microsoft.com>
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#725247}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants