Bug 1503272 - Hide the visibility of the titlebar when using lightweight themes with the Linux GTK theme. r=dao
authorMike Conley <mconley@mozilla.com>
Fri, 09 Nov 2018 07:58:08 +0000
changeset 445391 377c9cbbb5fa8655ea306046a71e9b217791aeb0
parent 445390 981eb3885ff2d2edc9408d44dab9610594a930f7
child 445392 56e0867b0cd50bbd310efb5494547718987221a3
push id35015
push userdluca@mozilla.com
push dateFri, 09 Nov 2018 17:45:20 +0000
treeherdermozilla-central@2f1158e5e0ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao
bugs1503272, 1356920, 1498356
milestone65.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 1503272 - Hide the visibility of the titlebar when using lightweight themes with the Linux GTK theme. r=dao This allows us to take advantage of the padding that the titlebar gets with the -moz-window-titlebar / -moz-window-titlebar-maximized, but also allows us to bypass the background texture applied to it. We were doing this before, but it got removed in bug 1356920. Bug 1498356 was originally landed as part of a more elaborate solution to this background texture problem, and this patch makes bug 1498356 no longer necessary. Differential Revision: https://phabricator.services.mozilla.com/D11429
browser/themes/linux/browser.css
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -622,22 +622,29 @@ notification[value="translation"] menuli
    * See nsWindow::TopLevelWindowUseARGBVisual() for details. */
   @media (-moz-gtk-csd-transparent-background) {
     :root[tabsintitlebar][sizemode="normal"]:not(:-moz-lwtheme) {
       background-color: transparent;
       -moz-appearance: none;
     }
   }
 
-  :root[tabsintitlebar] > #navigator-toolbox > #titlebar:not(:-moz-lwtheme) {
+  :root[tabsintitlebar] > #navigator-toolbox > #titlebar {
     -moz-appearance: -moz-window-titlebar-maximized;
   }
-  :root[tabsintitlebar][sizemode="normal"] > #navigator-toolbox > #titlebar:not(:-moz-lwtheme) {
+  :root[tabsintitlebar][sizemode="normal"] > #navigator-toolbox > #titlebar {
     -moz-appearance: -moz-window-titlebar;
   }
+  :root[tabsintitlebar] > #navigator-toolbox > #titlebar:-moz-lwtheme {
+    visibility: hidden;
+  }
+  :root[tabsintitlebar] #toolbar-menubar:-moz-lwtheme,
+  :root[tabsintitlebar] #TabsToolbar:-moz-lwtheme {
+    visibility: visible;
+  }
 
   /* Add extra space to titlebar for dragging */
   :root[sizemode="normal"][chromehidden~="menubar"] #TabsToolbar,
   :root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] + #TabsToolbar {
     padding-top: var(--space-above-tabbar);
   }
 
   /**