Bug 1397265 - Add a titlebar-placeholder on the right-hand side of the tabs. r=dao
MozReview-Commit-ID: 326Nz1XS4lD
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -235,16 +235,19 @@ window:not([chromehidden~="toolbar"]) #n
*/
#widget-overflow-list:empty + #widget-overflow-fixed-separator,
#widget-overflow:not([hasfixeditems]) #widget-overflow-fixed-separator {
display: none;
}
%ifdef CAN_DRAW_IN_TITLEBAR
+%ifdef MENUBAR_CAN_AUTOHIDE
+#toolbar-menubar:not([autohide=true]) ~ #TabsToolbar > .titlebar-placeholder,
+%endif
#main-window:not([chromemargin]) > #titlebar,
#main-window[inFullscreen] > #titlebar,
#main-window[inFullscreen] .titlebar-placeholder,
#main-window:not([tabsintitlebar]) .titlebar-placeholder {
display: none;
}
#titlebar {
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -629,17 +629,17 @@
mode="icons"
iconsize="small"
aria-label="&tabsToolbar.label;"
context="toolbar-context-menu"
collapsed="true">
#ifdef CAN_DRAW_IN_TITLEBAR
<hbox class="titlebar-placeholder" type="pre-tabs"
- skipintoolbarset="true"/>
+ skipintoolbarset="true"/>
#endif
<tabs id="tabbrowser-tabs"
class="tabbrowser-tabs"
tabbrowser="content"
flex="1"
setfocus="false"
tooltip="tabbrowser-tab-tooltip"
@@ -676,16 +676,22 @@
<menu id="alltabs_containersTab"
label="&newUserContext.label;">
<menupopup id="alltabs_containersMenuTab" />
</menu>
<menuseparator id="alltabs-popup-separator-2"/>
</menupopup>
</toolbarbutton>
+#ifdef CAN_DRAW_IN_TITLEBAR
+ <hbox class="titlebar-placeholder" type="post-tabs"
+ ordinal="1000"
+ skipintoolbarset="true"/>
+#endif
+
<button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;"
ordinal="1000"
aria-live="polite" skipintoolbarset="true"/>
<hbox class="private-browsing-indicator" skipintoolbarset="true"
ordinal="1000"/>
#ifdef CAN_DRAW_IN_TITLEBAR
<hbox class="titlebar-placeholder" type="caption-buttons"
persist="width"
--- a/browser/themes/shared/tabs.inc.css
+++ b/browser/themes/shared/tabs.inc.css
@@ -523,31 +523,25 @@ tabbrowser {
}
.tab-label[attention]:not([selected="true"]) {
font-weight: bold;
}
/* Tab separators */
-%ifdef CAN_DRAW_IN_TITLEBAR
-/* Add space for dragging the window */
-%ifdef MOZ_WIDGET_COCOA
-:root[tabsintitlebar]:not([sizemode=fullscreen]) .titlebar-placeholder[type="pre-tabs"]
-%elifdef MENUBAR_CAN_AUTOHIDE
-:root[tabsintitlebar][sizemode=normal] #toolbar-menubar[autohide=true] ~ #TabsToolbar > .titlebar-placeholder[type="pre-tabs"]
-%else
-:root[tabsintitlebar][sizemode=normal] #TabsToolbar > .titlebar-placeholder[type="pre-tabs"]
-%endif
-{
+.titlebar-placeholder[type="pre-tabs"],
+.titlebar-placeholder[type="post-tabs"] {
width: 40px;
+}
+
+.titlebar-placeholder[type="pre-tabs"] {
border-inline-end: 1px solid;
opacity: 0.2;
}
-%endif
.tabbrowser-tab::after,
.tabbrowser-tab::before {
margin-inline-start: -1px;
border-left: 1px solid;
/* Vertical margin doesn't work here for positioned pinned tabs, see
bug 1198236 and bug 1300410. We're using linear-gradient instead
to cut off the border at the top and at the bottom. */
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -291,20 +291,16 @@
@media (-moz-os-version: windows-win7) {
/* Preserve window control buttons position at the top of the button box. */
#titlebar-buttonbox-container {
-moz-box-align: start;
}
}
-.titlebar-placeholder[type="caption-buttons"] {
- margin-left: 22px; /* space needed for Aero Snap */
-}
-
/* titlebar command buttons */
#titlebar-min {
-moz-appearance: -moz-window-button-minimize;
}
#titlebar-max {
-moz-appearance: -moz-window-button-maximize;