Commit 4e64c75a authored by Alison Maher's avatar Alison Maher Committed by Chromium LUCI CQ

Ship Forced Colors Mode

Set the ForcedColors flag to 'stable' and update test expectations.
This includes the launch of the 'forced-colors' media query and
the 'forced-color-adjust' CSS property.

Intent-to-ship:
https://groups.google.com/a/chromium.org/g/blink-dev/c/hkjRPJ1-Ruk

Note: There is an open blocking bug for this feature. It is blocked
on a spec issue, but this should be resolved next week, and I will
make sure the resulting fix gets backported to the correct release.
https://bugs.chromium.org/p/chromium/issues/detail?id=1166392

Bug: 970285,1148418
Change-Id: I7eeedf57f1dc66a6935ab153d166ea9718b27e8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2630827Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Alison Maher <almaher@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#844097}
parent ed8957de
...@@ -922,9 +922,7 @@ ...@@ -922,9 +922,7 @@
// For simulating Android's overlay fullscreen video in web tests on Linux. // For simulating Android's overlay fullscreen video in web tests on Linux.
{ {
name: "ForcedColors", name: "ForcedColors",
// No status because this blink runtime feature doesn't work by itself. status: "stable",
// It's controlled by the corresponding Chromium feature which needs to
// be enabled to make the whole feature work.
}, },
{ {
name: "ForceDeferScriptIntervention", name: "ForceDeferScriptIntervention",
......
...@@ -566,11 +566,6 @@ ...@@ -566,11 +566,6 @@
"args": ["--disable-features=SameSiteByDefaultCookies", "args": ["--disable-features=SameSiteByDefaultCookies",
"--disable-features=CookiesWithoutSameSiteMustBeSecure"] "--disable-features=CookiesWithoutSameSiteMustBeSecure"]
}, },
{
"prefix": "forced-colors",
"bases": ["external/wpt/css/css-forced-color-adjust"],
"args": ["--enable-blink-features=ForcedColors"]
},
{ {
"prefix": "forced-high-contrast-colors", "prefix": "forced-high-contrast-colors",
"bases": ["external/wpt/forced-colors-mode", "bases": ["external/wpt/forced-colors-mode",
......
This is a testharness.js-based test.
FAIL Property forced-color-adjust has initial value auto assert_true: forced-color-adjust doesn't seem to be supported in the computed style expected true got false
FAIL Property forced-color-adjust inherits assert_true: forced-color-adjust doesn't seem to be supported in the computed style expected true got false
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL Property forced-color-adjust value 'auto' assert_true: forced-color-adjust doesn't seem to be supported in the computed style expected true got false
FAIL Property forced-color-adjust value 'none' assert_true: forced-color-adjust doesn't seem to be supported in the computed style expected true got false
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL e.style['forced-color-adjust'] = "none" should set the property value assert_not_equals: property should be set got disallowed value ""
FAIL e.style['forced-color-adjust'] = "auto" should set the property value assert_not_equals: property should be set got disallowed value ""
Harness: the test ran to completion.
This is a testharness.js-based test.
FAIL Should be parseable in a CSS stylesheet: '(forced-colors)' assert_true: expected true got false
FAIL Should be parseable in a CSS stylesheet: '(forced-colors: none)' assert_true: expected true got false
FAIL Should be parseable in a CSS stylesheet: '(forced-colors: active)' assert_true: expected true got false
PASS Should not be parseable in a CSS stylesheet: '(forced-colors: 0)'
PASS Should not be parseable in a CSS stylesheet: '(forced-colors: no-preference)'
PASS Should not be parseable in a CSS stylesheet: '(forced-colors: 10px)'
PASS Should not be parseable in a CSS stylesheet: '(forced-colors: active 0)'
PASS Should not be parseable in a CSS stylesheet: '(forced-colors: none active)'
PASS Should not be parseable in a CSS stylesheet: '(forced-colors: active/none)'
FAIL Should be parseable in JS: '(forced-colors)' assert_true: expected true got false
FAIL Should be parseable in JS: '(forced-colors: none)' assert_true: expected true got false
FAIL Should be parseable in JS: '(forced-colors: active)' assert_true: expected true got false
PASS Should not be parseable in JS: '(forced-colors: 0)'
PASS Should not be parseable in JS: '(forced-colors: no-preference)'
PASS Should not be parseable in JS: '(forced-colors: 10px)'
PASS Should not be parseable in JS: '(forced-colors: active 0)'
PASS Should not be parseable in JS: '(forced-colors: none active)'
PASS Should not be parseable in JS: '(forced-colors: active/none)'
FAIL Check that none evaluates to false in the boolean context assert_equals: expected true but got false
Harness: the test ran to completion.
This directory is for testing Forced Colors mode implementation.
This is a testharness.js-based test.
PASS Property forced-color-adjust has initial value auto
PASS Property forced-color-adjust inherits
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS Property forced-color-adjust value 'auto'
PASS Property forced-color-adjust value 'none'
Harness: the test ran to completion.
This is a testharness.js-based test.
PASS e.style['forced-color-adjust'] = "none" should set the property value
PASS e.style['forced-color-adjust'] = "auto" should set the property value
Harness: the test ran to completion.
...@@ -173,6 +173,7 @@ fontVariantLigatures ...@@ -173,6 +173,7 @@ fontVariantLigatures
fontVariantNumeric fontVariantNumeric
fontVariationSettings fontVariationSettings
fontWeight fontWeight
forcedColorAdjust
gap gap
getPropertyPriority getPropertyPriority
getPropertyValue getPropertyValue
......
...@@ -190,6 +190,7 @@ All changes to this list should go through Blink's feature review process: http: ...@@ -190,6 +190,7 @@ All changes to this list should go through Blink's feature review process: http:
font-variant-numeric font-variant-numeric
font-variation-settings font-variation-settings
font-weight font-weight
forced-color-adjust
grid-auto-columns grid-auto-columns
grid-auto-flow grid-auto-flow
grid-auto-rows grid-auto-rows
......
...@@ -180,6 +180,7 @@ fontVariantLigatures ...@@ -180,6 +180,7 @@ fontVariantLigatures
fontVariantNumeric fontVariantNumeric
fontVariationSettings fontVariationSettings
fontWeight fontWeight
forcedColorAdjust
gap gap
getPropertyPriority getPropertyPriority
getPropertyValue getPropertyValue
......
...@@ -192,6 +192,7 @@ All changes to this list should go through Blink's feature review process: http: ...@@ -192,6 +192,7 @@ All changes to this list should go through Blink's feature review process: http:
font-variant-numeric font-variant-numeric
font-variation-settings font-variation-settings
font-weight font-weight
forced-color-adjust
grid-auto-columns grid-auto-columns
grid-auto-flow grid-auto-flow
grid-auto-rows grid-auto-rows
......
...@@ -164,7 +164,7 @@ const base::Feature kDirectManipulationStylus = { ...@@ -164,7 +164,7 @@ const base::Feature kDirectManipulationStylus = {
// Enables forced colors mode for web content. // Enables forced colors mode for web content.
const base::Feature kForcedColors{"ForcedColors", const base::Feature kForcedColors{"ForcedColors",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
bool IsForcedColorsEnabled() { bool IsForcedColorsEnabled() {
static const bool forced_colors_enabled = static const bool forced_colors_enabled =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment