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 background-position-xy serialization for right/bottom offsets #22509

Merged
merged 1 commit into from Apr 1, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 27, 2020

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}

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.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title make background-position-xy serialization work up to isomorphism fix background-position-xy serialization for right/bottom offsets Apr 1, 2020
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}
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