Bug 1366405 - Stop using -moz-appearance: -moz-win-glass with the Windows 10 default theme. r=nhnt11 draft
authorDão Gottwald <dao@mozilla.com>
Sat, 23 Sep 2017 15:30:10 +0200
changeset 672098 d25e6698071683f4fd3f5addebd0bba854bd1509
parent 672097 2ce2cf756550bd3f598ba0873c28e93a58fbe787
child 733712 436361de05eb8800d5260c599c13ed905030674b
push id82150
push userkgupta@mozilla.com
push dateThu, 28 Sep 2017 18:38:31 +0000
reviewersnhnt11
bugs1366405
milestone58.0a1
Bug 1366405 - Stop using -moz-appearance: -moz-win-glass with the Windows 10 default theme. r=nhnt11 MozReview-Commit-ID: Dkjr831dxIV
browser/themes/windows/browser-aero.css
--- a/browser/themes/windows/browser-aero.css
+++ b/browser/themes/windows/browser-aero.css
@@ -18,31 +18,27 @@
 @media (-moz-windows-default-theme) {
   .menu-accel,
   .menu-iconic-accel {
     color: graytext;
   }
 }
 
 @media (-moz-windows-compositor) {
-  #main-window {
-    -moz-appearance: -moz-win-glass;
-  }
-
-
-  /* On win10, if we don't set this on the entire browser container including
-   * the sidebar, if the sidebar is open the accent color bleeds through in
-   * the titlebar */
-  #browser {
-    -moz-appearance: -moz-win-exclude-glass;
-  }
-
   @media not all and (-moz-os-version: windows-win7) {
     @media not all and (-moz-os-version: windows-win8) {
       @media (-moz-windows-default-theme) {
+        :root[sizemode=normal][tabsintitlebar] {
+          border-top: 1px solid -moz-win-accentcolor;
+        }
+
+        :root[sizemode=normal][tabsintitlebar]:-moz-window-inactive {
+          border-top-color: rgba(0,0,0,.2);
+        }
+
         :root:not(:-moz-lwtheme) {
           background-color: hsl(0, 0%, 78%);
         }
 
         @media (-moz-windows-accent-color-in-titlebar: 0) {
           :root[tabsintitlebar]:not(:-moz-lwtheme) {
             background-color: hsl(235,33%,19%);
             --titlebar-text-color: hsl(240,9%,98%);
@@ -61,16 +57,24 @@
              titlebar text change for inactive windows. */
           opacity: .6;
         }
       }
 
       @media (-moz-windows-default-theme: 0) {
         :root {
           background-color: transparent;
+          -moz-appearance: -moz-win-glass;
+        }
+
+        /* On win10, if we don't set this on the entire browser container including
+         * the sidebar, if the sidebar is open the accent color bleeds through in
+         * the titlebar */
+        #browser {
+          -moz-appearance: -moz-win-exclude-glass;
         }
       }
 
       #titlebar-buttonbox,
       .titlebar-button {
         -moz-appearance: none !important;
       }
 
@@ -225,37 +229,33 @@
           list-style-image: url(chrome://browser/skin/window-controls/close-highcontrast.svg);
         }
       }
     }
   }
 
   @media (-moz-os-version: windows-win7),
          (-moz-os-version: windows-win8) {
-    #main-window[sizemode="maximized"] #titlebar-buttonbox {
-      margin-inline-end: 3px;
+    :root {
+      background-color: transparent;
+      -moz-appearance: -moz-win-borderless-glass;
     }
 
-    #main-window {
-      background-color: transparent;
-      -moz-appearance: -moz-win-borderless-glass;
+    :root[sizemode="maximized"] #titlebar-buttonbox {
+      margin-inline-end: 3px;
     }
 
     /* These should be hidden w/ glass enabled. Windows draws its own buttons. */
     .titlebar-button {
       display: none;
     }
 
     /* The borders on the glass frame are ours, and inside #browser, and on
      * win7 we want to make sure they are "glassy", so we can't use #browser
      * as the exclude-glass container. We use #appcontent instead. */
-    #browser {
-      -moz-appearance: none;
-    }
-
     #appcontent {
       -moz-appearance: -moz-win-exclude-glass;
     }
   }
 
   @media (-moz-os-version: windows-win8) {
     /* Artificially draw window borders that are covered by lwtheme, see bug 591930.
      * Borders for win7 are below, win10 doesn't need them. */