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
--- 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"