Bug 1051522 - Add -moz-appearance values -moz-mac-vibrancy-light and -moz-mac-vibrancy-dark for the behind-window vibrancy effect on 10.10. r=roc
authorMarkus Stange <mstange@themasta.com>
Thu, 28 Aug 2014 02:15:31 +0200
changeset 202035 d4bf1bdbf7ec313948c1f1e5324c129d05856b40
parent 202034 965564003cda59b8f0638a300a5bec746aa550c3
child 202036 ad26257c3e0d1c62491c6ccd201f0363e7e364b6
push id48312
push usermstange@themasta.com
push dateThu, 28 Aug 2014 00:19:08 +0000
treeherdermozilla-inbound@396db9a7dcea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1051522
milestone34.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 1051522 - Add -moz-appearance values -moz-mac-vibrancy-light and -moz-mac-vibrancy-dark for the behind-window vibrancy effect on 10.10. r=roc
gfx/src/nsThemeConstants.h
layout/base/nsDisplayList.cpp
layout/style/nsCSSKeywordList.h
layout/style/nsCSSProps.cpp
--- a/gfx/src/nsThemeConstants.h
+++ b/gfx/src/nsThemeConstants.h
@@ -277,8 +277,10 @@
 #define NS_THEME_WINDOW_BUTTON_MAXIMIZE                    238
 #define NS_THEME_WINDOW_BUTTON_RESTORE                     239
 #define NS_THEME_WINDOW_BUTTON_BOX                         240
 #define NS_THEME_WINDOW_BUTTON_BOX_MAXIMIZED               241
 
 // moz-apperance style used in setting proper glass margins
 #define NS_THEME_WIN_EXCLUDE_GLASS                         242
 
+#define NS_THEME_MAC_VIBRANCY_LIGHT                        243
+#define NS_THEME_MAC_VIBRANCY_DARK                         244
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -2432,16 +2432,18 @@ nsDisplayThemedBackground::nsDisplayThem
   // Perform necessary RegisterThemeGeometry
   switch (disp->mAppearance) {
     case NS_THEME_MOZ_MAC_UNIFIED_TOOLBAR:
     case NS_THEME_TOOLBAR:
     case NS_THEME_WINDOW_TITLEBAR:
     case NS_THEME_WINDOW_BUTTON_BOX:
     case NS_THEME_MOZ_MAC_FULLSCREEN_BUTTON:
     case NS_THEME_WINDOW_BUTTON_BOX_MAXIMIZED:
+    case NS_THEME_MAC_VIBRANCY_LIGHT:
+    case NS_THEME_MAC_VIBRANCY_DARK:
       RegisterThemeGeometry(aBuilder, aFrame);
       break;
     case NS_THEME_WIN_BORDERLESS_GLASS:
     case NS_THEME_WIN_GLASS:
       aBuilder->SetGlassDisplayItem(this);
       break;
   }
 
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -683,16 +683,18 @@ CSS_KEY(-moz-window-button-close, _moz_w
 CSS_KEY(-moz-window-button-minimize, _moz_window_button_minimize)
 CSS_KEY(-moz-window-button-maximize, _moz_window_button_maximize)
 CSS_KEY(-moz-window-button-restore, _moz_window_button_restore)
 CSS_KEY(-moz-window-button-box, _moz_window_button_box)
 CSS_KEY(-moz-window-button-box-maximized, _moz_window_button_box_maximized)
 CSS_KEY(-moz-mac-help-button, _moz_mac_help_button)
 CSS_KEY(-moz-mac-unified-toolbar, _moz_mac_unified_toolbar)
 CSS_KEY(-moz-win-exclude-glass, _moz_win_exclude_glass)
+CSS_KEY(-moz-mac-vibrancy-light, _moz_mac_vibrancy_light)
+CSS_KEY(-moz-mac-vibrancy-dark, _moz_mac_vibrancy_dark)
 CSS_KEY(alphabetic, alphabetic)
 CSS_KEY(bevel, bevel)
 CSS_KEY(butt, butt)
 CSS_KEY(central, central)
 CSS_KEY(crispedges, crispedges)
 //CSS_KEY(end, end)
 CSS_KEY(evenodd, evenodd)
 CSS_KEY(geometricprecision, geometricprecision)
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -723,16 +723,18 @@ const KTableValue nsCSSProps::kAppearanc
   eCSSKeyword__moz_window_frame_bottom,       NS_THEME_WINDOW_FRAME_BOTTOM,
   eCSSKeyword__moz_window_button_close,       NS_THEME_WINDOW_BUTTON_CLOSE,
   eCSSKeyword__moz_window_button_minimize,    NS_THEME_WINDOW_BUTTON_MINIMIZE,
   eCSSKeyword__moz_window_button_maximize,    NS_THEME_WINDOW_BUTTON_MAXIMIZE,
   eCSSKeyword__moz_window_button_restore,     NS_THEME_WINDOW_BUTTON_RESTORE,
   eCSSKeyword__moz_window_button_box,         NS_THEME_WINDOW_BUTTON_BOX,
   eCSSKeyword__moz_window_button_box_maximized, NS_THEME_WINDOW_BUTTON_BOX_MAXIMIZED,
   eCSSKeyword__moz_win_exclude_glass,         NS_THEME_WIN_EXCLUDE_GLASS,
+  eCSSKeyword__moz_mac_vibrancy_light,        NS_THEME_MAC_VIBRANCY_LIGHT,
+  eCSSKeyword__moz_mac_vibrancy_dark,         NS_THEME_MAC_VIBRANCY_DARK,
   eCSSKeyword_UNKNOWN,-1
 };
 
 const KTableValue nsCSSProps::kBackfaceVisibilityKTable[] = {
   eCSSKeyword_visible, NS_STYLE_BACKFACE_VISIBILITY_VISIBLE,
   eCSSKeyword_hidden, NS_STYLE_BACKFACE_VISIBILITY_HIDDEN,
   eCSSKeyword_UNKNOWN,-1
 };