Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Writing Suggestions] Suggestions are sometimes hard to see in dark m…
…ode in Mail https://bugs.webkit.org/show_bug.cgi?id=274610 rdar://126371613 Reviewed by Abrar Rahman Protyasha and Matthieu Dubet. The color of writing suggestions is specified by ``` color: color-mix(in srgb, currentColor 50%, transparent); ``` which currently looks incorrect when viewed in dark mode in a place where `-apple-color-filter` is used (such as Mail). This is because the unique combination of `-apple-color-filter` with a color that is created using `color-mix`, which itself comprises of a color which is a semantic color, has not been explicitly supported. In general, semantic colors are immune from `-apple-color-filter` due to the early return check of `isSemantic` in `FilterOperations::transformColor`. However, if a semantic color is inside of a `color-mix` value, the `color-mix` color doesn't persist the semantic flag, which results in the filter operation erroneously applying. Fix by considering a `color-mix` color semantic if either of its constituent colors are semantic. * LayoutTests/css3/color-filters/test-color-filter-with-color-mix-with-semantic-color-expected.html: Added. * LayoutTests/css3/color-filters/test-color-filter-with-color-mix-with-semantic-color.html: Added. * Source/WebCore/css/color/CSSColorMixResolver.cpp: (WebCore::mixColorComponentsUsingColorInterpolationMethod): Canonical link: https://commits.webkit.org/279239@main
- Loading branch information