Bug 1513200 - Move pre-tabs and post-tabs spacers outside of TabsToolbar-customization-target and revert bug 1445728. r=Gijs
authorDão Gottwald <dao@mozilla.com>
Tue, 11 Dec 2018 12:35:03 +0000
changeset 506881 8d6820717b7a3b7b9bbac8f55186662351ca61af
parent 506880 ad2c33f952543b89dc9ecc3441f37b15dff6cc76
child 506882 7ea008f8701b6f95320a16d78ed6ed56e22235c6
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1513200, 1445728
milestone66.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 1513200 - Move pre-tabs and post-tabs spacers outside of TabsToolbar-customization-target and revert bug 1445728. r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D14142
browser/base/content/browser.xul
browser/base/content/tabbrowser.xml
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -757,23 +757,23 @@ xmlns="http://www.w3.org/1999/xhtml"
                class="browser-toolbar titlebar-color"
                fullscreentoolbar="true"
                customizable="true"
                customizationtarget="TabsToolbar-customization-target"
                mode="icons"
                aria-label="&tabsToolbar.label;"
                context="toolbar-context-menu"
                flex="1">
+
+        <hbox class="titlebar-spacer" type="pre-tabs"/>
+
         <vbox flex="1" class="toolbar-items">
           <spacer flex="1000"/>
 
           <hbox id="TabsToolbar-customization-target" flex="1">
-            <hbox class="titlebar-spacer" type="pre-tabs"
-                  skipintoolbarset="true"/>
-
             <tabs id="tabbrowser-tabs"
                   flex="1"
                   setfocus="false"
                   tooltip="tabbrowser-tab-tooltip"
                   stopwatchid="FX_TAB_CLICK_MS">
               <tab class="tabbrowser-tab" selected="true" visuallyselected="true" fadein="true"/>
             </tabs>
 
@@ -791,29 +791,25 @@ xmlns="http://www.w3.org/1999/xhtml"
                            removable="true"/>
 
             <toolbarbutton id="alltabs-button"
                            class="toolbarbutton-1 chromeclass-toolbar-additional tabs-alltabs-button badged-button"
                            oncommand="gTabsPanel.showAllTabsPanel();"
                            label="&listAllTabs.label;"
                            tooltiptext="&listAllTabs.label;"
                            removable="false"/>
-
-            <hbox class="titlebar-spacer" type="post-tabs"
-                  ordinal="1000"
-                  skipintoolbarset="true"/>
           </hbox>
         </vbox>
 
+        <hbox class="titlebar-spacer" type="post-tabs"/>
+
 #ifndef XP_MACOSX
         <button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;"
-                ordinal="1000"
-                aria-live="polite" skipintoolbarset="true"/>
-        <hbox class="private-browsing-indicator" skipintoolbarset="true"
-              ordinal="1000"/>
+                aria-live="polite"/>
+        <hbox class="private-browsing-indicator"/>
 #endif
 
 #include titlebar-items.inc.xul
 
 #ifdef XP_MACOSX
         <!-- OS X does not natively support RTL for its titlebar items, so we prevent this secondary
              buttonbox from reversing order in RTL by forcing an LTR direction. -->
         <hbox id="titlebar-secondary-buttonbox" dir="ltr">
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1122,28 +1122,26 @@
       <method name="_updateNewTabVisibility">
         <body><![CDATA[
           // Helper functions to help deal with customize mode wrapping some items
           let wrap = n => n.parentNode.localName == "toolbarpaletteitem" ? n.parentNode : n;
           let unwrap = n => n && n.localName == "toolbarpaletteitem" ? n.firstElementChild : n;
 
           // Starting from the tabs element, find the next sibling that:
           // - isn't hidden; and
-          // - isn't one of the titlebar placeholder elements; and
           // - isn't the all-tabs button.
           // If it's the new tab button, consider the new tab button adjacent to the tabs.
           // If the new tab button is marked as adjacent and the tabstrip doesn't
           // overflow, we'll display the 'new tab' button inline in the tabstrip.
           // In all other cases, the separate new tab button is displayed in its
           // customized location.
           let sib = this;
           do {
             sib = unwrap(wrap(sib).nextElementSibling);
           } while (sib && (sib.hidden ||
-                           sib.getAttribute("skipintoolbarset") == "true" ||
                            sib.id == "alltabs-button"));
 
           const kAttr = "hasadjacentnewtabbutton";
           if (sib && sib.id == "new-tab-button") {
             this.setAttribute(kAttr, "true");
           } else {
             this.removeAttribute(kAttr);
           }