Bug 1007229 - Background tabs need to use the CaptionText color when using a high contrast theme on Windows 8/8.1. r=Gijs, a=lsblakk
authorDão Gottwald <dao@mozilla.com>
Fri, 09 May 2014 17:38:04 +0200
changeset 192268 ee16a6a74667
parent 192267 2c4e64ce090e
child 192269 68037a299c56
push id3553
push userryanvm@gmail.com
push date2014-05-13 21:15 +0000
Treeherderresults
reviewersGijs, lsblakk
bugs1007229
milestone30.0
Bug 1007229 - Background tabs need to use the CaptionText color when using a high contrast theme on Windows 8/8.1. r=Gijs, a=lsblakk
browser/themes/windows/browser-aero.css
browser/themes/windows/browser.css
--- a/browser/themes/windows/browser-aero.css
+++ b/browser/themes/windows/browser-aero.css
@@ -131,32 +131,36 @@
   #main-window[sizemode="normal"] > #titlebar > #titlebar-content:-moz-lwtheme:-moz-window-inactive {
     -moz-border-top-colors: @glassInactiveBorderColor@ rgba(255,255,255,.6);
   }
 
   #main-window[sizemode="normal"] #titlebar-buttonbox:-moz-lwtheme {
     margin-top: -2px;
   }
 
-  #toolbar-menubar:not(:-moz-lwtheme),
-  #TabsToolbar:not(:-moz-lwtheme) {
-    background-color: transparent !important;
-    color: black;
-    border-left-style: none !important;
-    border-right-style: none !important;
-  }
+  @media (-moz-windows-default-theme) {
+    #toolbar-menubar:not(:-moz-lwtheme),
+    #TabsToolbar:not(:-moz-lwtheme) {
+      background-color: transparent !important;
+      color: black;
+    }
 
-  /* Use a different color only on Windows 8 and higher for inactive windows.
-   * On aero, the menubar fog disappears for inactive windows, and renders gray
-   * illegible.
-   */
-  @media not all and (-moz-os-version: windows-vista) {
-    @media not all and (-moz-os-version: windows-win7) {
-      #toolbar-menubar:not(:-moz-lwtheme):-moz-window-inactive {
-        color: ThreeDShadow;
+    #main-menubar > menu:not(:-moz-lwtheme) {
+      color: inherit;
+    }
+
+    /* Use a different color only on Windows 8 and higher for inactive windows.
+     * On aero, the menubar fog disappears for inactive windows, and renders gray
+     * illegible.
+     */
+    @media not all and (-moz-os-version: windows-vista) {
+      @media not all and (-moz-os-version: windows-win7) {
+        #toolbar-menubar:not(:-moz-lwtheme):-moz-window-inactive {
+          color: ThreeDShadow;
+        }
       }
     }
   }
 
   #main-window[darkwindowframe="true"] #toolbar-menubar:not(:-moz-lwtheme):not(:-moz-window-inactive),
   #main-window[darkwindowframe="true"] #TabsToolbar:not(:-moz-lwtheme):not(:-moz-window-inactive) {
     color: white;
   }
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -71,67 +71,59 @@
 
 #navigator-toolbox > toolbar:not(:-moz-lwtheme) {
   -moz-appearance: none;
   border-style: none;
   background-color: -moz-Dialog;
 }
 
 %ifdef WINDOWS_AERO
-@media not all and (-moz-windows-compositor) {
+@media not all and (-moz-windows-compositor),
+       not all and (-moz-windows-default-theme) {
 %endif
   #toolbar-menubar {
     background-color: transparent !important;
   }
 
   #main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar:not(:-moz-lwtheme),
   #main-window[tabsintitlebar]:not([inFullscreen]) #TabsToolbar:not(:-moz-lwtheme) {
     color: CaptionText;
   }
 
   #main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar:not(:-moz-lwtheme):-moz-window-inactive,
   #main-window[tabsintitlebar]:not([inFullscreen]) #TabsToolbar:not(:-moz-lwtheme):-moz-window-inactive {
     color: InactiveCaptionText;
   }
 
+  #main-window[tabsintitlebar] #main-menubar > menu:not(:-moz-lwtheme) {
+    color: inherit;
+  }
+
   #TabsToolbar:-moz-lwtheme {
     background: linear-gradient(to top, @toolbarShadowColor@ 2px, transparent 2px);
   }
-
+%ifdef WINDOWS_AERO
+}
+%endif
+
+%ifdef WINDOWS_AERO
+@media not all and (-moz-windows-compositor) {
+%endif
   #main-window[tabsintitlebar] #titlebar:-moz-lwtheme {
     visibility: hidden;
   }
 
   #main-window[tabsintitlebar] #titlebar-content:-moz-lwtheme {
     -moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox");
     visibility: visible;
   }
 %ifdef WINDOWS_AERO
 }
 %endif
 
-/* Make the menu inherit the toolbar's color. On non-compositor (Aero Basic, XP modern, classic)
- * this is defined above, but only for tabsintitlebar. Otherwise (Aero Glass, Windows 8),
- * this is hardcoded to black in browser-aero.css, even without tabsintitlebar. */
-%ifdef WINDOWS_AERO
-@media not all and (-moz-windows-compositor) {
-%endif
-  #main-window[tabsintitlebar] #main-menubar > menu:not(:-moz-lwtheme) {
-    color: inherit;
-  }
-%ifdef WINDOWS_AERO
-}
-
-@media (-moz-windows-compositor) {
-  #main-menubar > menu:not(:-moz-lwtheme) {
-    color: inherit;
-  }
-}
-%endif
-
 /**
  * In the classic themes, the titlebar has a horizontal gradient, which is
  * problematic for reading the text of background tabs when they're in the
  * titlebar. We side-step this issue by layering our own background underneath
  * the tabs. Unfortunately, this requires a bunch of positioning in order to get
  * text and icons to not appear fuzzy.
  */
 @media (-moz-windows-classic) {