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

Differentiate between computed and used values for color keywords #25893

Merged
merged 1 commit into from Oct 2, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 30, 2020

When the computed value of a property contains a color keyword, that
keyword should be reported from the computedStyleMap API in its
unresolved form. By contrast, getComputedStyle should report used
values, i.e. rgb values, for certain properties per the CSSOM spec[1].
We don't currently distinguish between the two use cases for those
properties.

This CL introduces a distinction between computed and used values for
serializing properties containing color keywords and passes the correct
parameter at various call sites. The parameter does not yet influence
serialization - that will come in a follow-up change - so no Web-facing
behavior difference is expected.

[1] https://drafts.csswg.org/cssom/#resolved-values

Bug: 1112362,1099874
Change-Id: Ifcbd3d197b78195023f394b0e527907488990cf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438010
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#813380}

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.

When the computed value of a property contains a color keyword, that
keyword should be reported from the computedStyleMap API in its
unresolved form. By contrast, getComputedStyle should report used
values, i.e. rgb values, for certain properties per the CSSOM spec[1].
We don't currently distinguish between the two use cases for those
properties.

This CL introduces a distinction between computed and used values for
serializing properties containing color keywords and passes the correct
parameter at various call sites. The parameter does not yet influence
serialization - that will come in a follow-up change - so no Web-facing
behavior difference is expected.

[1] https://drafts.csswg.org/cssom/#resolved-values

Bug: 1112362,1099874
Change-Id: Ifcbd3d197b78195023f394b0e527907488990cf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438010
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#813380}
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