-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Highlight pseudos use the forced-color status of their originating el…
…ement Per the resolution in [1], forced-color-adjust should not be one of the supported properties [2] in highlight pseudos, and the forced-color state of highlights should be taken from the originating element. This change updates the HighlightInheritance implementation to match the resolution. There are a few parts to this: - css_properties.json5 is updated so that forced-color-adjust is no longer a valid property for highlight pseudos. But, since shipping this change for ::selection may cause compatibility issues, we introduce a new valid_for_highlight_legacy parameter that maintains the old behavior and we update valid_for_highlight, which will be used only for highlights with the new inheritance model enabled, to use the new behavior. - This uncovered an older bug where DetermineValidPropertyFilter wasn't using any filter at all for ::highlight(), ::spelling-error, and ::grammar-error. This is now fixed. - StyleResolver::ApplyInheritance is updated to propagate forced-colors status from the originating element to the corresponding highlight pseudo. The new test is disabled on Mac/Linux due to some small differences in text decoration painting between those from highlight pseudos and from non-highlight rules, unrelated to the contents of this change. [1] w3c/csswg-drafts#7264 (comment) [2] https://drafts.csswg.org/css-pseudo-4/#highlight-styling Bug: 1309835, 1024156 Change-Id: I732afd24bbba2619a6718270faa0a1d2fcb98512 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3665644 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Reviewed-by: Delan Azabani <dazabani@igalia.com> Commit-Queue: Dan Clark <daniec@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1009639} NOKEYCHECK=True GitOrigin-RevId: e3dd4411efafbe9d4c285898e2c195c55612fe89
- Loading branch information
Showing
13 changed files
with
178 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.