Bug 1394975 - Remove the tabbrowser-tabbox xbl binding;r=Mossop
This is used to change the tabs property on the tabbox, which can be done
on the tabbox binding directly by passing an attribute
MozReview-Commit-ID: EViFT4O4ozl
--- a/browser/base/content/tabbrowser.css
+++ b/browser/base/content/tabbrowser.css
@@ -1,16 +1,12 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
-.tabbrowser-tabbox {
- -moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabbox");
-}
-
.tabbrowser-tabpanels {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-tabpanels");
}
.tabbrowser-arrowscrollbox {
-moz-binding: url("chrome://browser/content/tabbrowser.xml#tabbrowser-arrowscrollbox");
}
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -14,17 +14,17 @@
<binding id="tabbrowser">
<resources>
<stylesheet src="chrome://browser/content/tabbrowser.css"/>
</resources>
<content>
<xul:stringbundle anonid="tbstringbundle" src="chrome://browser/locale/tabbrowser.properties"/>
<xul:tabbox anonid="tabbox" class="tabbrowser-tabbox"
- flex="1" eventnode="document" xbl:inherits="handleCtrlPageUpDown"
+ flex="1" eventnode="document" xbl:inherits="handleCtrlPageUpDown,tabcontainer"
onselect="if (event.target.localName == 'tabpanels') this.parentNode.updateCurrentBrowser();">
<xul:tabpanels flex="1" class="plain" selectedIndex="0" anonid="panelcontainer">
<xul:notificationbox flex="1" notificationside="top">
<xul:hbox flex="1" class="browserSidebarContainer">
<xul:vbox flex="1" class="browserContainer">
<xul:stack flex="1" class="browserStack" anonid="browserStack">
<xul:browser anonid="initialBrowser" type="content" message="true" messagemanagergroup="browsers"
primary="true"
@@ -5984,24 +5984,16 @@
hist.add(2 /* unblockByVisitingTab */);
tab.finishMediaBlockTimer();
}
]]>
</handler>
</handlers>
</binding>
- <binding id="tabbrowser-tabbox"
- extends="chrome://global/content/bindings/tabbox.xml#tabbox">
- <implementation>
- <property name="tabs" readonly="true"
- onget="return document.getBindingParent(this).tabContainer;"/>
- </implementation>
- </binding>
-
<binding id="tabbrowser-arrowscrollbox" extends="chrome://global/content/bindings/scrollbox.xml#arrowscrollbox-clicktoscroll">
<implementation>
<!-- Override scrollbox.xml method, since our scrollbox's children are
inherited from the binding parent -->
<method name="_getScrollableElements">
<body><![CDATA[
return Array.filter(document.getBindingParent(this).childNodes,
this._canScrollToElement, this);
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -53,16 +53,19 @@
<!-- _tabs and _tabpanels are deprecated, they exist only for
backwards compatibility. -->
<property name="_tabs" readonly="true" onget="return this.tabs;"/>
<property name="_tabpanels" readonly="true" onget="return this.tabpanels;"/>
<property name="tabs" readonly="true">
<getter>
<![CDATA[
+ if (this.hasAttribute("tabcontainer")) {
+ return document.getElementById(this.getAttribute("tabcontainer"));
+ }
return this.getElementsByTagNameNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"tabs").item(0);
]]>
</getter>
</property>
<property name="tabpanels" readonly="true">