Bug 1506190 - Make title bar items not overlap the border between the tab bar and the nav bar. r=mconley
authorDão Gottwald <dao@mozilla.com>
Wed, 14 Nov 2018 16:53:51 +0000 (2018-11-14)
changeset 446207 17cb306575a640b92d50ccd7d49b2810fbedc9e0
parent 446206 39706085e80850e86e77ff4b5f70ed69d7288782
child 446208 9c50102149e038a64843f6f38a436c82aeaa58fe
push id35038
push userrmaries@mozilla.com
push dateWed, 14 Nov 2018 22:12:17 +0000 (2018-11-14)
treeherdermozilla-central@4e1b2b7e0c37 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1506190
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 1506190 - Make title bar items not overlap the border between the tab bar and the nav bar. r=mconley Differential Revision: https://phabricator.services.mozilla.com/D11498
browser/themes/linux/browser.css
browser/themes/windows/browser.css
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -656,47 +656,41 @@ notification[value="translation"] menuli
   }
 
   /* 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);
   }
 
-  /**
-   * Titlebar items (window caption buttons, private browsing indicator,
-   * accessibility indicator, etc)
-   */
-  :root[sizemode="normal"][chromehidden~="menubar"] #TabsToolbar > .titlebar-item,
-  :root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] + #TabsToolbar > .titlebar-item {
+  /* Center items (window caption buttons, private browsing indicator,
+   * accessibility indicator, etc) vertically. */
+  :root[sizemode="normal"] #TabsToolbar > .titlebar-item {
     margin-top: calc(-1 * var(--space-above-tabbar));
   }
 
   /* Make #TabsToolbar transparent as we style underlying #titlebar with
-   * -moz-window-titlebar (Gtk+ theme).
-   */
+   * -moz-window-titlebar (Gtk+ theme). */
   :root[tabsintitlebar][sizemode="normal"]:not([inFullscreen]) #TabsToolbar,
   :root[tabsintitlebar][sizemode="maximized"] #TabsToolbar,
   :root[tabsintitlebar] #toolbar-menubar {
     -moz-appearance: none;
   }
 
   /* The button box must appear on top of the navigator-toolbox in order for
    * click and hover mouse events to work properly for the button in the restored
    * window state. Otherwise, elements in the navigator-toolbox, like the menubar,
-   * can swallow those events.
-   */
+   * can swallow those events. */
   .titlebar-buttonbox {
     z-index: 1;
     -moz-box-align: center;
   }
 
   /* Render titlebar command buttons according to system config.
-   * Use full scale icons here as the Gtk+ does.
-   */
+   * Use full scale icons here as the Gtk+ does. */
   @media (-moz-gtk-csd-minimize-button) {
     .titlebar-min {
       -moz-appearance: -moz-window-button-minimize;
     }
   }
   @media (-moz-gtk-csd-minimize-button: 0) {
     .titlebar-min {
       display: none;
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -949,31 +949,31 @@ notification[value="translation"] {
  * paint, so this hack is how we sidestep that performance bottleneck.
  */
 #main-window:-moz-any([customize-entering],[customize-exiting]) label {
   transform: perspective(0.01px);
 }
 
 /* End customization mode */
 
-/**
- * Titlebar items (window caption buttons, private browsing indicator,
- * accessibility indicator, etc)
- */
-:root[sizemode="normal"][chromehidden~="menubar"] .titlebar-item,
-:root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] + #TabsToolbar > .titlebar-item,
-:root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] > .titlebar-item {
+/* Prevent titlebar items (window caption buttons, private browsing indicator,
+ * accessibility indicator, etc) from overlapping the nav bar's shadow on the
+ * tab bar. */
+#TabsToolbar > .titlebar-item {
+  margin-bottom: @navbarTabsShadowSize@;
+}
+
+/* Center titlebar items vertically. */
+:root[sizemode="normal"] #TabsToolbar > .titlebar-item {
   margin-top: calc(-1 * var(--space-above-tabbar));
 }
 
 /* Compensate for 4px extra margin on top of the tabs toolbar on Windows 7. */
 @media (-moz-os-version: windows-win7) {
-  :root[sizemode="normal"][chromehidden~="menubar"] .titlebar-item,
-  :root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] + #TabsToolbar > .titlebar-item,
-  :root[sizemode="normal"] #toolbar-menubar[autohide="true"][inactive] > .titlebar-item {
+  :root[sizemode="normal"] #TabsToolbar > .titlebar-item {
     margin-top: calc(-1 * (var(--space-above-tabbar) + 4px));
   }
 }
 
 :root:not([privatebrowsingmode=temporary]) .accessibility-indicator,
 .private-browsing-indicator {
   margin-inline-end: 12px;
 }