Bug 480813 - remove first-tab, last-tab, before/afterselected tab attributes. r?dao
MozReview-Commit-ID: DKOw73J1rmS
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -7836,18 +7836,16 @@
<setter>
<![CDATA[
if (val)
this.setAttribute("visuallyselected", "true");
else
this.removeAttribute("visuallyselected");
this.parentNode.tabbrowser._tabAttrModified(this, ["visuallyselected"]);
- this._setPositionAttributes(val);
-
return val;
]]>
</setter>
</property>
<property name="_selected">
<setter>
<![CDATA[
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -232,22 +232,16 @@
<xul:spacer class="tabs-left"/>
<children/>
<xul:spacer class="tabs-right" flex="1"/>
</content>
<implementation implements="nsIDOMXULSelectControlElement, nsIDOMXULRelatedElement">
<constructor>
<![CDATA[
- // first and last tabs need to be able to have unique styles
- // and also need to select first tab on startup.
- if (this.firstChild)
- this.firstChild.setAttribute("first-tab", "true");
- if (this.lastChild)
- this.lastChild.setAttribute("last-tab", "true");
if (!this.hasAttribute("orient"))
this.setAttribute("orient", "horizontal");
if (this.tabbox && this.tabbox.hasAttribute("selectedIndex")) {
let selectedIndex = parseInt(this.tabbox.getAttribute("selectedIndex"));
this.selectedIndex = selectedIndex > 0 ? selectedIndex : 0;
return;
@@ -738,47 +732,20 @@
if (val) {
this.setAttribute("selected", "true");
this.setAttribute("visuallyselected", "true");
} else {
this.removeAttribute("selected");
this.removeAttribute("visuallyselected");
}
- this._setPositionAttributes(val);
-
return val;
]]></setter>
</property>
- <method name="_setPositionAttributes">
- <parameter name="aSelected"/>
- <body><![CDATA[
- if (this.previousSibling && this.previousSibling.localName == "tab") {
- if (aSelected)
- this.previousSibling.setAttribute("beforeselected", "true");
- else
- this.previousSibling.removeAttribute("beforeselected");
- this.removeAttribute("first-tab");
- } else {
- this.setAttribute("first-tab", "true");
- }
-
- if (this.nextSibling && this.nextSibling.localName == "tab") {
- if (aSelected)
- this.nextSibling.setAttribute("afterselected", "true");
- else
- this.nextSibling.removeAttribute("afterselected");
- this.removeAttribute("last-tab");
- } else {
- this.setAttribute("last-tab", "true");
- }
- ]]></body>
- </method>
-
<property name="linkedPanel" onget="return this.getAttribute('linkedpanel')"
onset="this.setAttribute('linkedpanel', val); return val;"/>
<field name="arrowKeysShouldWrap" readonly="true">
/Mac/.test(navigator.platform)
</field>
<property name="TelemetryStopwatch" readonly="true">
<getter><![CDATA[