Bug 1778834 - Fix a typo in AccentColor handling. r=dholbert

If we're using the theme accent then we should _not_ use the standin.

Differential Revision: https://phabricator.services.mozilla.com/D151442
This commit is contained in:
Emilio Cobos Álvarez 2022-07-10 18:09:57 +00:00
parent f12a3fda65
commit a4adec1fe6
4 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,9 @@
<!doctype html>
<style>
div {
width: 100px;
height: 100px;
background-color: #0060df;
}
</style>
<div></div>

View File

@ -0,0 +1,10 @@
<!doctype html>
<title>AccentColor without native accent</title>
<style>
div {
width: 100px;
height: 100px;
background-color: AccentColor;
}
</style>
<div></div>

View File

@ -2129,3 +2129,4 @@ skip-if(Android) test-pref(ui.textScaleFactor,150) test-pref(browser.display.os-
# test-pref(ui.textScaleFactor,50) test-pref(browser.display.os-zoom-behavior,1) == 1773633.html 1773633-full-zoom.html
# This works (but not on macOS for some reason).
skip-if(Android) test-pref(ui.textScaleFactor,50) test-pref(browser.display.os-zoom-behavior,1) != 1773633.html 1773633.html
test-pref(widget.non-native-theme.use-theme-accent,false) == 1778834.html 1778834-ref.html

View File

@ -1183,7 +1183,7 @@ static bool ShouldUseStandinsForNativeColorForNonNativeTheme(
}
// There are platforms where we want the content-exposed accent color to be
// the windows blue rather than the system accent color, for now.
return StaticPrefs::widget_non_native_theme_use_theme_accent() &&
return !StaticPrefs::widget_non_native_theme_use_theme_accent() &&
(aColor == LookAndFeel::ColorID::Accentcolor ||
aColor == LookAndFeel::ColorID::Accentcolortext);
}();