Bug 1726606: Default browser.display.document_color_use to 1 on MacOS. r=emilio, a=jcristau
Differential Revision:
https://phabricator.services.mozilla.com/D123142
--- a/accessible/tests/browser/telemetry/browser_HCM_telemetry.js
+++ b/accessible/tests/browser/telemetry/browser_HCM_telemetry.js
@@ -90,35 +90,35 @@ async function setForegroundColor(color)
async function setBackgroundColor(color) {
Services.prefs.setStringPref("browser.display.background_color", color);
}
add_task(async function testInit() {
const dialogWin = await openColorsDialog();
const menulistHCM = dialogWin.document.getElementById("useDocumentColors");
- if (AppConstants.platform == "win" || AppConstants.platform == "macosx") {
+ if (AppConstants.platform == "win") {
is(
menulistHCM.value,
"0",
- "HCM menulist should be set to only with HCM theme on startup for windows and mac"
+ "HCM menulist should be set to only with HCM theme on startup for windows"
);
// Verify correct default value
TelemetryTestUtils.assertKeyedScalar(
TelemetryTestUtils.getProcessScalars("parent", true, true),
"a11y.theme",
"default",
false
);
} else {
is(
menulistHCM.value,
"1",
- "HCM menulist should be set to never on startup for other platforms"
+ "HCM menulist should be set to never on startup for non-windows platforms"
);
// Verify correct default value
TelemetryTestUtils.assertKeyedScalar(
TelemetryTestUtils.getProcessScalars("parent", true, true),
"a11y.theme",
"always",
false
--- a/modules/libpref/init/StaticPrefList.yaml
+++ b/modules/libpref/init/StaticPrefList.yaml
@@ -974,24 +974,29 @@
value: 32
mirror: always
- name: browser.display.background_color
type: String
value: "#FFFFFF"
mirror: never
-# 0 = always, except in high contrast mode
-# 1 = always
-# 2 = never
-#
-# Default to 0 on windows and mac, 1 elsewhere.
+# This preference is a bit confusing because we use the opposite
+# string value in the colors dialog to indicate to users how FF HCM
+# will behave.
+# With resect to document colors, these values mean:
+# 0 = "default" = always, except in high contrast mode
+# 1 = "always"
+# 2 = "never"
+#
+# On windows, we set this to 0, which means FF HCM will mirror OS HCM.
+# Everywhere else, we set this to 1, disabling FF HCM.
- name: browser.display.document_color_use
type: RelaxedAtomicUint32
-#if defined(XP_WIN) || defined(XP_MACOSX)
+#if defined(XP_WIN)
value: 0
#else
value: 1
#endif
mirror: always
rust: true
# 0 = always native