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 <[email protected]> Reviewed-by: Delan Azabani <[email protected]> Commit-Queue: Dan Clark <[email protected]> Cr-Commit-Position: refs/heads/main@{#1009639}
- Loading branch information