fix background-position-xy serialization for right/bottom offsets #22509
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.
Make the implementations of CSSValueFromComputedStyle for
background-position-x/y return correct values when three/four-value
syntax is used with background-position. Since these properties only
support single-value syntax, positions from the right or bottom will
use calc() values if they result in mixed lengths and percentages when
converted to be from the left/top. This is not the canonical form in
the css-backgrounds-4 spec proposal, but does not require changes to
the parser.
Add a reftest (passes without patch) for three/four-value
background-position syntax (there is currently only a manual test).
Add another version of the reftest (fails without patch) which takes
the above and attempts to write back the computed values of
background-position-x/y.
This is done in preparation to make transitions use normal keyframes
which require round-trip serialization of all transition properties.
Change-Id: I50e714746cc15fd0591bcd0a41cf9ecd56f55c44
Bug: 610627
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2121415
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: George Steel <gtsteel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755462}