Bug 1676434 - Replace obsolete -moz-mac-yosemite-theme media query with a new -moz-mac-big-sur-theme media query. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D97089
This commit is contained in:
Markus Stange 2020-11-16 20:43:35 +00:00
parent 08db5b63fe
commit 4a49a6612c
8 changed files with 15 additions and 15 deletions

View File

@ -397,10 +397,10 @@ void nsMediaFeatures::InitSystemMetrics() {
(nsStaticAtom*)nsGkAtoms::_moz_mac_graphite_theme);
}
rv = LookAndFeel::GetInt(LookAndFeel::IntID::MacYosemiteTheme, &metricResult);
rv = LookAndFeel::GetInt(LookAndFeel::IntID::MacBigSurTheme, &metricResult);
if (NS_SUCCEEDED(rv) && metricResult) {
sSystemMetrics->AppendElement(
(nsStaticAtom*)nsGkAtoms::_moz_mac_yosemite_theme);
(nsStaticAtom*)nsGkAtoms::_moz_mac_big_sur_theme);
}
rv = LookAndFeel::GetInt(LookAndFeel::IntID::WindowsAccentColorInTitlebar,

View File

@ -54,7 +54,7 @@ const TOGGLES = [
"-moz-overlay-scrollbars",
"-moz-windows-default-theme",
"-moz-mac-graphite-theme",
"-moz-mac-yosemite-theme",
"-moz-mac-big-sur-theme",
"-moz-windows-accent-color-in-titlebar",
"-moz-windows-compositor",
"-moz-windows-classic",

View File

@ -697,7 +697,7 @@ function run() {
expression_should_not_be_parseable("-moz-overlay-scrollbars");
expression_should_not_be_parseable("-moz-windows-default-theme");
expression_should_not_be_parseable("-moz-mac-graphite-theme");
expression_should_not_be_parseable("-moz-mac-yosemite-theme");
expression_should_not_be_parseable("-moz-mac-big-sur-theme");
expression_should_not_be_parseable("-moz-windows-accent-color-in-titlebar");
expression_should_not_be_parseable("-moz-windows-compositor");
expression_should_not_be_parseable("-moz-windows-classic");
@ -719,7 +719,7 @@ function run() {
expression_should_not_be_parseable("-moz-overlay-scrollbars: 0");
expression_should_not_be_parseable("-moz-windows-default-theme: 0");
expression_should_not_be_parseable("-moz-mac-graphite-theme: 0");
expression_should_not_be_parseable("-moz-mac-yosemite-theme: 0");
expression_should_not_be_parseable("-moz-mac-big-sur-theme: 0");
expression_should_not_be_parseable("-moz-windows-accent-color-in-titlebar: 0");
expression_should_not_be_parseable("-moz-windows-compositor: 0");
expression_should_not_be_parseable("-moz-windows-classic: 0");
@ -741,7 +741,7 @@ function run() {
expression_should_not_be_parseable("-moz-overlay-scrollbars: 1");
expression_should_not_be_parseable("-moz-windows-default-theme: 1");
expression_should_not_be_parseable("-moz-mac-graphite-theme: 1");
expression_should_not_be_parseable("-moz-mac-yosemite-theme: 1");
expression_should_not_be_parseable("-moz-mac-big-sur-theme: 1");
expression_should_not_be_parseable("-moz-windows-accent-color-in-titlebar: 1");
expression_should_not_be_parseable("-moz-windows-compositor: 1");
expression_should_not_be_parseable("-moz-windows-classic: 1");
@ -763,7 +763,7 @@ function run() {
expression_should_not_be_parseable("-moz-overlay-scrollbars: -1");
expression_should_not_be_parseable("-moz-windows-default-theme: -1");
expression_should_not_be_parseable("-moz-mac-graphite-theme: -1");
expression_should_not_be_parseable("-moz-mac-yosemite-theme: -1");
expression_should_not_be_parseable("-moz-mac-big-sur-theme: -1");
expression_should_not_be_parseable("-moz-windows-accent-color-in-titlebar: -1");
expression_should_not_be_parseable("-moz-windows-compositor: -1");
expression_should_not_be_parseable("-moz-windows-classic: -1");
@ -785,7 +785,7 @@ function run() {
expression_should_not_be_parseable("-moz-overlay-scrollbars: true");
expression_should_not_be_parseable("-moz-windows-default-theme: true");
expression_should_not_be_parseable("-moz-mac-graphite-theme: true");
expression_should_not_be_parseable("-moz-mac-yosemite-theme: true");
expression_should_not_be_parseable("-moz-mac-big-sur-theme: true");
expression_should_not_be_parseable("-moz-windows-accent-color-in-titlebar: true");
expression_should_not_be_parseable("-moz-windows-compositor: true");
expression_should_not_be_parseable("-moz-windows-classic: true");

View File

@ -816,7 +816,7 @@ pub static MEDIA_FEATURES: [MediaFeatureDescription; 55] = [
system_metric_feature!(atom!("-moz-overlay-scrollbars")),
system_metric_feature!(atom!("-moz-windows-default-theme")),
system_metric_feature!(atom!("-moz-mac-graphite-theme")),
system_metric_feature!(atom!("-moz-mac-yosemite-theme")),
system_metric_feature!(atom!("-moz-mac-big-sur-theme")),
system_metric_feature!(atom!("-moz-windows-accent-color-in-titlebar")),
system_metric_feature!(atom!("-moz-windows-compositor")),
system_metric_feature!(atom!("-moz-windows-classic")),

View File

@ -150,14 +150,14 @@ class LookAndFeel {
MacGraphiteTheme,
/*
* A Boolean value to determine whether the Mac OS X Yosemite-specific
* A Boolean value to determine whether the macOS Big Sur-specific
* theming should be used.
*
* The value of this metric is not used on non-Mac platforms. These
* platforms should return NS_ERROR_NOT_IMPLEMENTED when queried for this
* metric.
*/
MacYosemiteTheme,
MacBigSurTheme,
/*
* AlertNotificationOrigin indicates from which corner of the

View File

@ -514,8 +514,8 @@ nsresult nsLookAndFeel::GetIntImpl(IntID aID, int32_t& aResult) {
case IntID::MacGraphiteTheme:
aResult = [NSColor currentControlTint] == NSGraphiteControlTint;
break;
case IntID::MacYosemiteTheme:
aResult = 1;
case IntID::MacBigSurTheme:
aResult = nsCocoaFeatures::OnBigSurOrLater();
break;
case IntID::AlertNotificationOrigin:
aResult = NS_ALERT_TOP;

View File

@ -219,7 +219,7 @@ nsresult HeadlessLookAndFeel::GetIntImpl(IntID aID, int32_t& aResult) {
break;
case IntID::TouchEnabled:
case IntID::MacGraphiteTheme:
case IntID::MacYosemiteTheme:
case IntID::MacBigSurTheme:
aResult = 0;
res = NS_ERROR_NOT_IMPLEMENTED;
break;

View File

@ -2231,7 +2231,7 @@ STATIC_ATOMS = [
),
Atom("_moz_windows_default_theme", "-moz-windows-default-theme"),
Atom("_moz_mac_graphite_theme", "-moz-mac-graphite-theme"),
Atom("_moz_mac_yosemite_theme", "-moz-mac-yosemite-theme"),
Atom("_moz_mac_big_sur_theme", "-moz-mac-big-sur-theme"),
Atom("_moz_windows_compositor", "-moz-windows-compositor"),
Atom("_moz_windows_classic", "-moz-windows-classic"),
Atom("_moz_windows_glass", "-moz-windows-glass"),