Fix DCHECK when compositing additive CSS transform animations #18403
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.
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}