Differentiate between computed and used values for color keywords #25893
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.
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}