Make TransformState::Move accumulate into existing transform more often. #30492
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.
The substantive change here is the removal of the test of
accumulating_transform_ in TransformState::Move. At least when
direction_ is kApplyTransformDirection, optimizing away the modification
to the existing transform into a move is not safe.
The remainder of the code changes are removing accumulating_transform_,
since its remaining uses are all in DCHECK()s and its meaning is
somewhat unclear. It's not clear whether it's intended to be an
indicator for whether accumulated_transform_ would be non-null were it
not for the caching optimization in
TransformState::FlattenWithTransform, or whether it's an indication of
the state of flattening or preserve-3d.
Without the code change here,
virtual/transform-interop-disabled/external/wpt/css/css-transforms/transform-getBoundingClientRect-001.html
fails (with 75 rather than 125), but
external/wpt/css/css-transforms/transform-getBoundingClientRect-001.html
passes both with and without the change.
Bug: 1247858
Change-Id: Id32a11b2bf66757b0dbbab251c598222f9d120a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3152179
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: David Baron <dbaron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#920070}