Bug 1417709 - Add system colors called "-moz-mac-vibrant-titlebar-light/dark" for use with -moz-font-smoothing-background-color. r=emilio
☠☠ backed out by cb9898849653 ☠ ☠
authorMarkus Stange <mstange@themasta.com>
Thu, 16 Nov 2017 11:50:09 -0500
changeset 393221 50f0febe43a06698e728a5ad5b274e5761c3c40f
parent 393220 29e6c0d82193b399706647b23d4fd7cf5afbe305
child 393222 5670c9582add98a9fd29a42249a326949028ad85
push id32955
push usercsabou@mozilla.com
push dateThu, 23 Nov 2017 09:42:21 +0000
treeherdermozilla-central@4f8b98354732 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1417709
milestone59.0a1
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 1417709 - Add system colors called "-moz-mac-vibrant-titlebar-light/dark" for use with -moz-font-smoothing-background-color. r=emilio MozReview-Commit-ID: 9FbRlPvrLMX
layout/style/nsCSSProps.cpp
widget/LookAndFeel.h
widget/cocoa/nsLookAndFeel.mm
widget/nsXPLookAndFeel.cpp
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -1129,16 +1129,18 @@ const KTableEntry nsCSSProps::kColorKTab
   { eCSSKeyword__moz_mac_menuselect, LookAndFeel::eColorID__moz_mac_menuselect },
   { eCSSKeyword__moz_mac_menushadow, LookAndFeel::eColorID__moz_mac_menushadow },
   { eCSSKeyword__moz_mac_menutextdisable, LookAndFeel::eColorID__moz_mac_menutextdisable },
   { eCSSKeyword__moz_mac_menutextselect, LookAndFeel::eColorID__moz_mac_menutextselect },
   { eCSSKeyword__moz_mac_disabledtoolbartext, LookAndFeel::eColorID__moz_mac_disabledtoolbartext },
   { eCSSKeyword__moz_mac_secondaryhighlight, LookAndFeel::eColorID__moz_mac_secondaryhighlight },
   { eCSSKeyword__moz_mac_vibrancy_light, LookAndFeel::eColorID__moz_mac_vibrancy_light },
   { eCSSKeyword__moz_mac_vibrancy_dark, LookAndFeel::eColorID__moz_mac_vibrancy_dark },
+  { eCSSKeyword__moz_mac_vibrant_titlebar_light, LookAndFeel::eColorID__moz_mac_vibrant_titlebar_light },
+  { eCSSKeyword__moz_mac_vibrant_titlebar_dark,  LookAndFeel::eColorID__moz_mac_vibrant_titlebar_dark },
   { eCSSKeyword__moz_mac_menuitem, LookAndFeel::eColorID__moz_mac_menuitem },
   { eCSSKeyword__moz_mac_active_menuitem, LookAndFeel::eColorID__moz_mac_active_menuitem },
   { eCSSKeyword__moz_mac_menupopup, LookAndFeel::eColorID__moz_mac_menupopup },
   { eCSSKeyword__moz_mac_source_list, LookAndFeel::eColorID__moz_mac_source_list },
   { eCSSKeyword__moz_mac_source_list_selection, LookAndFeel::eColorID__moz_mac_source_list_selection },
   { eCSSKeyword__moz_mac_active_source_list_selection, LookAndFeel::eColorID__moz_mac_active_source_list_selection },
   { eCSSKeyword__moz_mac_tooltip, LookAndFeel::eColorID__moz_mac_tooltip },
   { eCSSKeyword__moz_menuhover, LookAndFeel::eColorID__moz_menuhover },
--- a/widget/LookAndFeel.h
+++ b/widget/LookAndFeel.h
@@ -155,16 +155,18 @@ public:
     eColorID__moz_mac_disabledtoolbartext,
     //inactive light hightlight
     eColorID__moz_mac_secondaryhighlight,
 
     // Font smoothing background colors needed by the Mac OS X theme, based
     // on -moz-appearance names
     eColorID__moz_mac_vibrancy_light,
     eColorID__moz_mac_vibrancy_dark,
+    eColorID__moz_mac_vibrant_titlebar_light,
+    eColorID__moz_mac_vibrant_titlebar_dark,
     eColorID__moz_mac_menupopup,
     eColorID__moz_mac_menuitem,
     eColorID__moz_mac_active_menuitem,
     eColorID__moz_mac_source_list,
     eColorID__moz_mac_source_list_selection,
     eColorID__moz_mac_active_source_list_selection,
     eColorID__moz_mac_tooltip,
 
--- a/widget/cocoa/nsLookAndFeel.mm
+++ b/widget/cocoa/nsLookAndFeel.mm
@@ -331,21 +331,23 @@ nsLookAndFeel::NativeGetColor(ColorID aI
     // colors, in the chrome-only -moz-font-smoothing-background-color property.
     // This property is used for text on "vibrant" -moz-appearances.
     // The colors have been obtained from the system on 10.12.6 using the
     // program at https://bugzilla.mozilla.org/attachment.cgi?id=8907533 .
     // We could obtain them at runtime, but doing so may be expensive and
     // requires the use of the private API
     // -[NSVisualEffectView fontSmoothingBackgroundColor].
     case eColorID__moz_mac_vibrancy_light:
+    case eColorID__moz_mac_vibrant_titlebar_light:
     case eColorID__moz_mac_source_list:
     case eColorID__moz_mac_tooltip:
       aColor = NS_RGB(0xf7,0xf7,0xf7);
       break;
     case eColorID__moz_mac_vibrancy_dark:
+    case eColorID__moz_mac_vibrant_titlebar_dark:
       aColor = NS_RGB(0x28,0x28,0x28);
       break;
     case eColorID__moz_mac_menupopup:
     case eColorID__moz_mac_menuitem:
       aColor = NS_RGB(0xe6,0xe6,0xe6);
       break;
     case eColorID__moz_mac_source_list_selection:
       aColor = NS_RGB(0xc8,0xc8,0xc8);
--- a/widget/nsXPLookAndFeel.cpp
+++ b/widget/nsXPLookAndFeel.cpp
@@ -243,16 +243,18 @@ const char nsXPLookAndFeel::sColorPrefs[
   "ui.-moz-mac-menuselect",
   "ui.-moz-mac-menushadow",
   "ui.-moz-mac-menutextdisable",
   "ui.-moz-mac-menutextselect",
   "ui.-moz_mac_disabledtoolbartext",
   "ui.-moz-mac-secondaryhighlight",
   "ui.-moz-mac-vibrancy-light",
   "ui.-moz-mac-vibrancy-dark",
+  "ui.-moz-mac-vibrant-titlebar-light",
+  "ui.-moz-mac-vibrant-titlebar-dark",
   "ui.-moz-mac-menupopup",
   "ui.-moz-mac-menuitem",
   "ui.-moz-mac-active-menuitem",
   "ui.-moz-mac-source-list",
   "ui.-moz-mac-source-list-selection",
   "ui.-moz-mac-active-source-list-selection",
   "ui.-moz-mac-tooltip",
   "ui.-moz-win-mediatext",
@@ -672,18 +674,20 @@ nsXPLookAndFeel::GetStandinForNativeColo
       result = NS_RGB(0x88, 0x88, 0x88); break;
     case eColorID__moz_mac_menutextselect:
       result = NS_RGB(0xFF, 0xFF, 0xFF); break;
     case eColorID__moz_mac_disabledtoolbartext:
       result = NS_RGB(0x3F, 0x3F, 0x3F); break;
     case eColorID__moz_mac_secondaryhighlight:
       result = NS_RGB(0xD4, 0xD4, 0xD4); break;
     case eColorID__moz_mac_vibrancy_light:
+    case eColorID__moz_mac_vibrant_titlebar_light:
       result = NS_RGB(0xf7, 0xf7, 0xf7); break;
     case eColorID__moz_mac_vibrancy_dark:
+    case eColorID__moz_mac_vibrant_titlebar_dark:
       result = NS_RGB(0x28, 0x28, 0x28); break;
     case eColorID__moz_mac_menupopup:
       result = NS_RGB(0xe6, 0xe6, 0xe6); break;
     case eColorID__moz_mac_menuitem:
       result = NS_RGB(0xe6, 0xe6, 0xe6); break;
     case eColorID__moz_mac_active_menuitem:
       result = NS_RGB(0x0a, 0x64, 0xdc); break;
     case eColorID__moz_mac_source_list: