Fix TransformOperations::DependsOnBoxSize false positives
Allow checks which skip a prefix, as needed for proper behavior in TransformOperations::BlendRemainingByUsingMatrixInterpolation(). This method will now only create InterpolatedTransformationOperations which are actually box-size dependent (as originally intended) ans create a matrix otherwise. Add a DCHECK for this property. Note that the interpolation defined in the css-transforms-1/2 specs assume that transform styles are calculated after layout, with matrix interpolation always producing a Matrix3DTransformOperation. As style is calculated before layout, this isn't possible in cases where the inputs to matrix interpolation are layout-dependent, so we have InterpolatedTransformOperation to defer interpolation in these cases. There is a currently CSSWG resolution to spec this behavior and give InterpolatedTransformOperation a defined serialization, having interpolation return a matrix as per the current spec where possible (the inputs of matrix interpolation are layout-independent) and an interpolated operation otherwise (where the current spec is inconsistent). The added DCHECK enforces this behavior. Resolution: https://github.com/w3c/csswg-drafts/issues/2854 This is to prepare for using DependsOnBoxSize for invalidation of compositor animations, enabling acceleration of percent-containing transform. Design Doc: https://docs.google.com/document/d/1zgr5CHRMpvlqodn1e0eM9J3MjL2eEMfAHrHsZUK7gMM/ Bug: 389359 Change-Id: I2302546225ac52f47104d2dd77b02f874d2f6ef8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432194Reviewed-by:Kevin Ellis <kevers@chromium.org> Reviewed-by:
Ian Vollick <vollick@chromium.org> Commit-Queue: George Steel <gtsteel@chromium.org> Cr-Commit-Position: refs/heads/master@{#813278}
Showing
Please register or sign in to comment