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

Fix DCHECK when compositing additive CSS transform animations #18403

Merged
merged 1 commit into from Aug 14, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Aug 13, 2019

Previously CSSTransformNonInterpolableValue assumed that anything that was
composited on-top of would be single. However that is not true; in the simple
case where there is a replace animation before it, the replace effect will be a
pair:

target.animate({ transform: [ 'scale(1)', 'scale(2)' ] }, 1000);
target.animate({ transform: [ 'rotate(0)', 'rotate(90deg)' ] },
{ duration: 1000, composite: 'add' });

In the example above, the scale animation would not yet have been reduced to a
single interpolated value, so the DCHECK for is_single_ would fail. This CL
fixes the logic to perform an interpolation in that case.

Bug: 979952
Change-Id: I36a3221c55aa3d98281a21a4ac93d95d61c5a1ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1750200
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686789}

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.

Already reviewed downstream.

Previously CSSTransformNonInterpolableValue assumed that anything that was
composited on-top of would be single. However that is not true; in the simple
case where there is a replace animation before it, the replace effect will be a
pair:

target.animate({ transform: [ 'scale(1)', 'scale(2)' ] }, 1000);
target.animate({ transform: [ 'rotate(0)', 'rotate(90deg)' ] },
               { duration: 1000, composite: 'add' });

In the example above, the scale animation would not yet have been reduced to a
single interpolated value, so the DCHECK for is_single_ would fail. This CL
fixes the logic to perform an interpolation in that case.

Bug: 979952
Change-Id: I36a3221c55aa3d98281a21a4ac93d95d61c5a1ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1750200
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686789}
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

3 participants