Bug 1436351 - Ensure tabs binding initialized after tabbrowser. r=dao,Gijs draft
authorTimothy Guan-tin Chien <timdream@gmail.com>
Sun, 11 Feb 2018 00:29:01 +0800
changeset 753551 7c170a3b88ce68860b41b516d66b7442cfeea686
parent 752848 35dfa0882568c06f2d81b6749179815cd4f82886
push id98594
push usertimdream@gmail.com
push dateSat, 10 Feb 2018 18:56:29 +0000
reviewersdao, Gijs
bugs1436351, 1429464, 1392352
milestone60.0a1
Bug 1436351 - Ensure tabs binding initialized after tabbrowser. r=dao,Gijs This is a follow-up to bug 1429464 and a hack. Fortunately we could get rid of it when bug 1392352 lands. MozReview-Commit-ID: 4XVjObBPAMV
browser/base/content/browser.css
browser/base/content/tabbrowser.xml
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -88,16 +88,20 @@ panelview:not([current]):not([in-transit
   visibility: collapse;
 }
 
 /* Hide the header when a subview is reused as a main view. */
 panelview[mainview] > .panel-header {
   display: none;
 }
 
+#navigator-toolbox {
+  -moz-binding: url("chrome://browser/content/tabbrowser.xml#empty");
+}
+
 tabbrowser {
   -moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser");
 }
 
 #tabbrowser-tabs {
   -moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabs");
 }
 
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -4,16 +4,23 @@
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <bindings id="tabBrowserBindings"
           xmlns="http://www.mozilla.org/xbl"
           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           xmlns:xbl="http://www.mozilla.org/xbl">
 
+  <!--
+  This binding is bound to <toolbox id="navigator-toolbox"> so that
+  the #tabbrowser binding is initialized before the #tabs binding.
+  Remove after bug 1392352.
+  -->
+  <binding id="empty"/>
+
   <binding id="tabbrowser">
     <resources>
       <stylesheet src="chrome://browser/content/tabbrowser.css"/>
     </resources>
 
     <content>
       <xul:tabbox anonid="tabbox" class="tabbrowser-tabbox"
                   flex="1" eventnode="document" xbl:inherits="tabcontainer"