diff options
author | SpockMan02 <aidanboyle@comcast.net> | 2018-06-27 03:25:34 -0700 |
---|---|---|
committer | SpockMan02 <aidanboyle@comcast.net> | 2018-06-27 03:25:34 -0700 |
commit | 6151dca6eac269a8dc4ca23552360aa7856eb9db (patch) | |
tree | fa1b58a5201a37c97c05c980032063926343cc1c /widget/cocoa | |
parent | 2d8e325fbdaeaa26b1f2a99ddbbb67804ef97864 (diff) | |
download | UXP-6151dca6eac269a8dc4ca23552360aa7856eb9db.tar UXP-6151dca6eac269a8dc4ca23552360aa7856eb9db.tar.gz UXP-6151dca6eac269a8dc4ca23552360aa7856eb9db.tar.lz UXP-6151dca6eac269a8dc4ca23552360aa7856eb9db.tar.xz UXP-6151dca6eac269a8dc4ca23552360aa7856eb9db.zip |
Undo Mozilla Bug 1302937; Reinstate -moz-mac-lion-theme media query
Diffstat (limited to 'widget/cocoa')
-rw-r--r-- | widget/cocoa/nsLookAndFeel.mm | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/widget/cocoa/nsLookAndFeel.mm b/widget/cocoa/nsLookAndFeel.mm index cbee90f58..0b68cd0e4 100644 --- a/widget/cocoa/nsLookAndFeel.mm +++ b/widget/cocoa/nsLookAndFeel.mm @@ -67,19 +67,19 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT; nsresult res = NS_OK; - + switch (aID) { case eColorID_WindowBackground: aColor = NS_RGB(0xff,0xff,0xff); break; case eColorID_WindowForeground: - aColor = NS_RGB(0x00,0x00,0x00); + aColor = NS_RGB(0x00,0x00,0x00); break; case eColorID_WidgetBackground: aColor = NS_RGB(0xdd,0xdd,0xdd); break; case eColorID_WidgetForeground: - aColor = NS_RGB(0x00,0x00,0x00); + aColor = NS_RGB(0x00,0x00,0x00); break; case eColorID_WidgetSelectBackground: aColor = NS_RGB(0x80,0x80,0x80); @@ -107,7 +107,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) break; case eColorID__moz_menuhover: aColor = GetColorFromNSColor([NSColor alternateSelectedControlColor]); - break; + break; case eColorID_TextSelectForeground: GetColor(eColorID_TextSelectBackground, aColor); if (aColor == 0x000000) @@ -147,9 +147,9 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) // css2 system colors http://www.w3.org/TR/REC-CSS2/ui.html#system-colors // // It's really hard to effectively map these to the Appearance Manager properly, - // since they are modeled word for word after the win32 system colors and don't have any - // real counterparts in the Mac world. I'm sure we'll be tweaking these for - // years to come. + // since they are modeled word for word after the win32 system colors and don't have any + // real counterparts in the Mac world. I'm sure we'll be tweaking these for + // years to come. // // Thanks to mpt26@student.canterbury.ac.nz for the hardcoded values that form the defaults // if querying the Appearance Manager fails ;) @@ -161,7 +161,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) break; } // Otherwise fall through and return the regular button text: - + case eColorID_buttontext: case eColorID__moz_buttonhovertext: aColor = GetColorFromNSColor([NSColor controlTextColor]); @@ -267,13 +267,13 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) break; case eColorID__moz_mac_menushadow: aColor = NS_RGB(0xA3,0xA3,0xA3); - break; + break; case eColorID__moz_mac_menutextdisable: aColor = NS_RGB(0x98,0x98,0x98); - break; + break; case eColorID__moz_mac_menutextselect: aColor = GetColorFromNSColor([NSColor selectedMenuItemTextColor]); - break; + break; case eColorID__moz_mac_disabledtoolbartext: aColor = GetColorFromNSColor([NSColor disabledControlTextColor]); break; @@ -307,7 +307,7 @@ nsLookAndFeel::NativeGetColor(ColorID aID, nscolor &aColor) res = NS_ERROR_FAILURE; break; } - + return res; NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT; @@ -322,7 +322,7 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult) if (NS_SUCCEEDED(res)) return res; res = NS_OK; - + switch (aID) { case eIntID_CaretBlinkTime: aResult = 567; @@ -411,6 +411,9 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult) case eIntID_MacGraphiteTheme: aResult = [NSColor currentControlTint] == NSGraphiteControlTint; break; + case eIntID_MacLionTheme: + aResult = 1; + break; case eIntID_MacYosemiteTheme: aResult = nsCocoaFeatures::OnYosemiteOrLater(); break; @@ -473,7 +476,7 @@ nsLookAndFeel::GetFloatImpl(FloatID aID, float &aResult) if (NS_SUCCEEDED(res)) return res; res = NS_OK; - + switch (aID) { case eFloatID_IMEUnderlineRelativeSize: aResult = 2.0f; |