Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 5914f6eb8b6de0cf2efbb9aa7b86f7358d47497b https://github.com/WebKit/WebKit/commit/5914f6eb8b6de0cf2efbb9aa7b86f7358d47497b Author: Richard Robinson <richard_robins...@apple.com> Date: 2024-05-23 (Thu, 23 May 2024)
Changed paths: A LayoutTests/css3/color-filters/test-color-filter-with-color-mix-with-semantic-color-expected.html A LayoutTests/css3/color-filters/test-color-filter-with-color-mix-with-semantic-color.html M Source/WebCore/css/color/CSSColorMixResolver.cpp Log Message: ----------- [Writing Suggestions] Suggestions are sometimes hard to see in dark mode 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 To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes