Force colors at the end of the cascade
As resolved by the CSSWG [1], we should respect system color rules set by the author/user in Forced Colors Mode. This CL is the second of several changes to make this happen. Currently, in order to force colors in Forced Colors Mode, we revert the related properties at the author origin. This logic is now removed from the spec [2]. To accommodate the above changes, the plan is to simulate a revert at the end of the cascade, but only if the computed value for a given property is not already a system color and forced-color-adjust is set to auto. This CL moves the logic for reverting properties that are affected by Forced Colors Mode to the end of the cascade using the ForceColors() method (which was added here [3]). [1] https://github.com/w3c/csswg-drafts/issues/4178 [2] https://github.com/w3c/csswg-drafts/commit/7c154ddc7f196df9b40a34a5f63bf6d157b1011b [3] https://chromium-review.googlesource.com/c/chromium/src/+/2376666 Bug: 970285 Change-Id: I5039fdaf5ce6d5917a258e593fb2f527581c72e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2388991 Commit-Queue: Alison Maher <almaher@microsoft.com> Reviewed-by:Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/master@{#804985}
Showing
Please register or sign in to comment