Bug 615589 - '-moz-mac-focusring' color should be keyboardFocusIndicatorColor (NSColor). Also fixes tests. r=josh+mstange, a=beltzner.
authorstefanh@inbox.com
Tue, 21 Dec 2010 19:51:00 +0100
changeset 59561 9b02aa0de19c2e6f9b39caf9bfce1f331d00f23b
parent 59560 722ffb1a0920773fc92adac27244e13f3c5a1c95
child 59562 bf23488f58d42a5a36f33fcffefb69120cbb8e13
push id17665
push userstefanh@inbox.com
push dateTue, 21 Dec 2010 18:51:17 +0000
treeherdermozilla-central@9b02aa0de19c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh, beltzner
bugs615589
milestone2.0b9pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 615589 - '-moz-mac-focusring' color should be keyboardFocusIndicatorColor (NSColor). Also fixes tests. r=josh+mstange, a=beltzner.
widget/src/cocoa/nsLookAndFeel.mm
widget/tests/test_platform_colors.xul
--- a/widget/src/cocoa/nsLookAndFeel.mm
+++ b/widget/src/cocoa/nsLookAndFeel.mm
@@ -246,21 +246,17 @@ nsresult nsLookAndFeel::NativeGetColor(c
       break;
     case eColor__moz_mac_chrome_active:
     case eColor__moz_mac_chrome_inactive: {
       int grey = NativeGreyColorAsInt(headerEndGrey, (aID == eColor__moz_mac_chrome_active));
       aColor = NS_RGB(grey, grey, grey);
     }
       break;
     case eColor__moz_mac_focusring:
-      aColor = nsToolkit::OnSnowLeopardOrLater() ?
-                 ([NSColor currentControlTint] == NSGraphiteControlTint ?
-                    NS_RGB(0x6C,0x7E,0x8D) : NS_RGB(0x3F,0x98,0xDD)) :
-                 ([NSColor currentControlTint] == NSGraphiteControlTint ?
-                    NS_RGB(0x5F,0x70,0x82) : NS_RGB(0x53,0x90,0xD2));
+      aColor = GetColorFromNSColor([NSColor keyboardFocusIndicatorColor]);
       break;
     case eColor__moz_mac_menushadow:
       aColor = NS_RGB(0xA3,0xA3,0xA3);
       break;          
     case eColor__moz_mac_menutextdisable:
       aColor = nsToolkit::OnSnowLeopardOrLater() ?
                  NS_RGB(0x88,0x88,0x88) : NS_RGB(0x98,0x98,0x98);
       break;      
--- a/widget/tests/test_platform_colors.xul
+++ b/widget/tests/test_platform_colors.xul
@@ -39,17 +39,17 @@ var colors = {
   "graytext": ["rgb(127, 127, 127)"],
   "highlight": ["rgb(115, 132, 153)", "rgb(127, 127, 127)", "rgb(56, 117, 215)", "rgb(255, 193, 31)", "rgb(243, 70, 72)", "rgb(255, 138, 34)", "rgb(102, 197, 71)", "rgb(140, 78, 184)"],
   "highlighttext": ["rgb(255, 255, 255)", "rgb(255, 254, 254)", "rgb(254, 255, 254)"],
   "inactiveborder": ["rgb(255, 255, 255)"],
   "inactivecaption": ["rgb(255, 255, 255)"],
   "inactivecaptiontext": ["rgb(69, 69, 69)"],
   "infobackground": ["rgb(255, 255, 199)"],
   "infotext": ["rgb(0, 0, 0)"],
-  "menu": ["rgb(255, 255, 255)", rgb(254, 255, 254)"],
+  "menu": ["rgb(255, 255, 255)", "rgb(254, 255, 254)", "rgb(255, 254, 254)"],
   "menutext": ["rgb(0, 0, 0)"],
   "scrollbar": ["rgb(170, 170, 170)"],
   "threeddarkshadow": ["rgb(220, 220, 220)"],
   "threedface": ["rgb(240, 240, 240)"],
   "threedhighlight": ["rgb(255, 255, 255)"],
   "threedlightshadow": ["rgb(218, 218, 218)"],
   "threedshadow": ["rgb(224, 224, 224)"],
   "window": ["rgb(255, 255, 255)"],
@@ -67,17 +67,17 @@ var colors = {
   "-moz-dialog": ["rgb(232, 232, 232)"],
   "-moz-dialogtext": ["rgb(0, 0, 0)"],
   "-moz-dragtargetzone": ["rgb(199, 208, 218)", "rgb(198, 198, 198)", "rgb(180, 213, 255)", "rgb(250, 236, 115)", "rgb(255, 176, 139)", "rgb(255, 209, 129)", "rgb(194, 249, 144)", "rgb(232, 184, 255)"],
   "-moz-hyperlinktext": ["rgb(0, 0, 238)"],
   "-moz-html-cellhighlight": ["rgb(212, 212, 212)"],
   "-moz-html-cellhighlighttext": ["rgb(0, 0, 0)"],
   "-moz-mac-chrome-active": ["rgb(150, 150, 150)", "rgb(167, 167, 167)"],
   "-moz-mac-chrome-inactive": ["rgb(202, 202, 202)", "rgb(216, 216, 216)"],
-  "-moz-mac-focusring": ["rgb(83, 144, 210)", "rgb(95, 112, 130)", "rgb(63, 152, 221)", "rgb(108, 126, 141)"],
+  //"-moz-mac-focusring": ["rgb(83, 144, 210)", "rgb(95, 112, 130)", "rgb(63, 152, 221)", "rgb(108, 126, 141)"],
   "-moz-mac-menuselect": ["rgb(115, 132, 153)", "rgb(127, 127, 127)", "rgb(56, 117, 215)", "rgb(255, 193, 31)", "rgb(243, 70, 72)", "rgb(255, 138, 34)", "rgb(102, 197, 71)", "rgb(140, 78, 184)"],
   "-moz-mac-menushadow": ["rgb(163, 163, 163)"],
   "-moz-mac-menutextdisable": ["rgb(152, 152, 152)", "rgb(136, 136, 136)"],
   "-moz-mac-menutextselect": ["rgb(255, 255, 255)"],
   "-moz-mac-disabledtoolbartext": ["rgb(63, 63, 63)"],
   "-moz-mac-alternateprimaryhighlight": ["rgb(115, 132, 153)", "rgb(127, 127, 127)", "rgb(56, 117, 215)", "rgb(255, 193, 31)", "rgb(243, 70, 72)", "rgb(255, 138, 34)", "rgb(102, 197, 71)", "rgb(140, 78, 184)"],
   "-moz-mac-secondaryhighlight": ["rgb(212, 212, 212)"],
   "-moz-menuhover": ["rgb(115, 132, 153)", "rgb(127, 127, 127)", "rgb(56, 117, 215)", "rgb(255, 193, 31)", "rgb(243, 70, 72)", "rgb(255, 138, 34)", "rgb(102, 197, 71)", "rgb(140, 78, 184)"],