commit c0cf79519bda42541a11d33ef01dc4771f6043c4
parent 5df4e70b8d9bee6136b6535ddacde4592d72f354
Author: Sejal Anand <sejalanand@microsoft.com>
Date: Fri, 31 Oct 2025 08:42:04 +0000
Bug 1996532 [wpt PR 55671] - Revert "[Fonts] Enable monochrome emoji rendering in forced colors mode", a=testonly
Automatic update from web-platform-tests
Revert "[Fonts] Enable monochrome emoji rendering in forced colors mode"
This reverts commit f1333a8acc364a000bfafbf0c86790307e112272.
Reason for revert: moving this behavior to computed value time as per spec
Original change's description:
> [Fonts] Enable monochrome emoji rendering in forced colors mode
>
> This change introduces support for rendering monochrome (text-style)
> emoji when forced colors mode is active.
>
> Key changes:
> - Add `is_forced_colors_mode_` flag to `FontDescription` and propagate
> it from `Document` to all font resolution paths, including canvas and
> OffscreenCanvas.
> - Modify fallback priority logic in `ApplyFontVariantEmojiOnFallbackPriority`
> to force `kText` priority for emoji when in forced colors mode and
> `font-variant-emoji` is set to normal or unicode.
> - Make forced colors mode part of the font cache key.
> - Gate the behavior under the new `EmojiMonochromeRendering` runtime
> flag.
>
> This also brings canvas rendering behavior in line with the forced
> colors mode, ensuring emoji are accessible and consistently styled.
>
> Spec - https://www.w3.org/TR/css-fonts-4/#font-variant-emoji-prop
> https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties
> https://github.com/w3c/csswg-drafts/issues/8064
>
> Bug: 420857717
> Change-Id: I55c47918b24529015d34682ea66a3cb093bb5858
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6916516
> Reviewed-by: Dominik Röttsches <drott@chromium.org>
> Commit-Queue: Sejal Anand <sejalanand@microsoft.com>
> Reviewed-by: Divyansh Mangal <dmangal@microsoft.com>
> Reviewed-by: Dileep Maurya <dileepmaurya@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#1531487}
Bug: 420857717
Change-Id: Ib9e5c8a3ca73ab246cc686dc2c2efc43967d2b21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7082144
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1535837}
--
wpt-commits: f40f03e7d987d7498f37c4f4f651e5f720d281b5
wpt-pr: 55671
Diffstat:
6 files changed, 0 insertions(+), 118 deletions(-)
diff --git a/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-57-ref.html b/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-57-ref.html
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Reference: All emoji are forced to text style in forced colors mode</title>
-<link rel="author" title="Sejal Anand" href="sejalanand@microsoft.com">
-<style>
- .mono {
- font-variant-emoji: text;
- }
-</style>
-
-<p>All emoji should appear as monochrome (text-style) if forced-colors mode is active.</p>
-
-<div class="mono">😀 😀</div>
-<div class="mono">😀 😀</div>
-<div class="mono">😀 😀</div>
diff --git a/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-57.html b/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-57.html
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Forced colors mode: this mode forces text-style emoji</title>
-<link rel="author" title="Sejal Anand" href="sejalanand@microsoft.com">
-<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
-<link rel=match href="forced-colors-mode-57-ref.html">
-<meta name="assert" content="In forced-colors mode, font-variant-emoji: normal and unicode should behave like text, rendering emoji in monochrome.">
-
-<style>
- @media (forced-colors: active) {
- .test {
- font-variant-emoji: normal; /* overridden to text in forced-colors */
- }
-
- .unicode {
- font-variant-emoji: unicode; /* also treated as text in forced-colors */
- }
-
- .text {
- font-variant-emoji: text;
- }
- }
-</style>
-
-<p>All emoji should appear as monochrome (text-style) if forced-colors mode is active.</p>
-
-<div class="test">😀 😀</div>
-<div class="text">😀 😀</div>
-<div class="unicode">😀 😀</div>
diff --git a/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-58-ref.html b/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-58-ref.html
@@ -1,8 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Reference: Emoji should appear in color (not text-style)</title>
-<link rel="author" title="Sejal Anand" href="sejalanand@microsoft.com">
-
-<p>In forced-colors mode, this emoji should remain colorful because of <code>forced-color-adjust: none</code>.</p>
-
-<div>😀 😀</div>
diff --git a/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-58.html b/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-58.html
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Forced colors mode: this mode forces text-style emoji</title>
-<link rel="author" title="Sejal Anand" href="sejalanand@microsoft.com">
-<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
-<link rel=match href="forced-colors-mode-58-ref.html">
-<meta name="assert" content="When forced-color-adjust is none, font-variant-emoji: normal/unicode must not be overridden in forced colors mode.">
-
-<style>
- @media (forced-colors: active) {
- .optout {
- font-variant-emoji: normal;
- forced-color-adjust: none; /* prevents override to text-style emoji */
- }
- }
-</style>
-
-<body>
-<p>In forced-colors mode, this emoji should remain colorful because of <code>forced-color-adjust: none</code>.</p>
-
-<div class="optout">😀 😀</div>
-</body>
diff --git a/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-59-ref.html b/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-59-ref.html
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Reference: Emoji with VS16 rendered as text-style in forced colors</title>
-<link rel="author" title="Sejal Anand" href="sejalanand@microsoft.com">
-
-<style>
- .mono {
- font-variant-emoji: text;
- }
-</style>
-
-<p>All emoji below are followed by VS16 (emoji presentation). They should render as monochrome (text-style) if forced-colors mode is active.</p>
-<div class="mono">😀️</div>
-<div class="mono">😀️</div>
-<div class="mono">😀️</div>
diff --git a/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-59.html b/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-59.html
@@ -1,29 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Forced colors mode: Emoji with VS16 should still be monochrome</title>
-<link rel="author" title="Sejal Anand" href="sejalanand@microsoft.com">
-<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-variant-emoji-prop">
-<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
-<link rel="match" href="forced-colors-mode-59-ref.html">
-<meta name="assert" content="In forced-colors mode, emoji with VS16 (emoji presentation selector) should be rendered in monochrome, overriding the variation selector.">
-
-<style>
- @media (forced-colors: active) {
- .normal {
- font-variant-emoji: normal;
- }
-
- .unicode {
- font-variant-emoji: unicode;
- }
-
- .text {
- font-variant-emoji: text;
- }
- }
-</style>
-
-<p>All emoji below are followed by VS16 (emoji presentation). They should render as monochrome (text-style) if forced-colors mode is active.</p>
-<div class="normal">😀️</div>
-<div class="unicode">😀️</div>
-<div class="text">😀️</div>