Backed out changeset 1efbd6874bfb (bug 1187219) because something in the push was causing browser_dragdrop.js to try to connect to support.mozilla.org.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 29 Jul 2015 13:53:40 -0400
changeset 286880 8a62423b8343b409b5c37e80a7f284e42f1c4c77
parent 286879 5e9f481c0192521d8cb6d1e5dc14885477036dd1
child 286881 7910e4e1015a8843580a63bfed4097945c2df2d1
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1187219
milestone42.0a1
backs out1efbd6874bfb965d0ba4f469529afa5e07a36f25
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
Backed out changeset 1efbd6874bfb (bug 1187219) because something in the push was causing browser_dragdrop.js to try to connect to support.mozilla.org.
browser/base/content/tabbrowser.xml
toolkit/content/widgets/tabbox.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -5656,40 +5656,49 @@
                              xbl:inherits="fadein,pinned,selected,visuallyselected"
                              class="tab-close-button close-icon"/>
         </xul:hbox>
       </xul:stack>
     </content>
 
     <implementation>
 
+      <!--
+          This code is the same as in toolkit/content/widgets/tabbox.xml,
+          except for the _tabAttrModified call. If you modify it, tabbox.xml
+          might also need to be modified.
+      -->
       <property name="_visuallySelected">
         <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="_logicallySelected">
-        <setter>
-          <![CDATA[
-          if (val)
-            this.setAttribute("selected", "true");
+          gBrowser._tabAttrModified(this, ["visuallyselected"]);
+
+          if (this.previousSibling && this.previousSibling.localName == "tab") {
+            if (val)
+              this.previousSibling.setAttribute("beforeselected", "true");
+            else
+              this.previousSibling.removeAttribute("beforeselected");
+            this.removeAttribute("first-tab");
+          }
           else
-            this.removeAttribute("selected");
-
+            this.setAttribute("first-tab", "true");
+
+          if (this.nextSibling && this.nextSibling.localName == "tab") {
+            if (val)
+              this.nextSibling.setAttribute("afterselected", "true");
+            else
+              this.nextSibling.removeAttribute("afterselected");
+            this.removeAttribute("last-tab");
+          }
+          else
+            this.setAttribute("last-tab", "true");
           return val;
           ]]>
         </setter>
       </property>
 
       <property name="_selected">
         <setter>
           <![CDATA[
--- a/toolkit/content/widgets/tabbox.xml
+++ b/toolkit/content/widgets/tabbox.xml
@@ -722,53 +722,76 @@
             return null;
           ]]>
         </getter>
       </property>
 
       <property name="selected" readonly="true"
                 onget="return this.getAttribute('selected') == 'true';"/>
 
-      <property name="_selected">
-        <setter><![CDATA[
+      <!--
+          This code is the same as in browser/base/content/tabbrowser.xml,
+          except for the _tabAttrModified call. If you modify it, tabbrowser.xml
+          should probably also be modified.
+      -->
+      <property name="_visuallySelected">
+        <setter>
+          <![CDATA[
+          if (val)
+            this.setAttribute("visuallyselected", "true");
+          else
+            this.removeAttribute("visuallyselected");
+
+          if (this.previousSibling && this.previousSibling.localName == "tab") {
+            if (val)
+              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 (val)
+              this.nextSibling.setAttribute("afterselected", "true");
+            else
+              this.nextSibling.removeAttribute("afterselected");
+            this.removeAttribute("last-tab");
+          }
+          else
+            this.setAttribute("last-tab", "true");
+          return val;
+        ]]>
+        </setter>
+      </property>
+
+      <property name="_logicallySelected">
+        <setter>
+          <![CDATA[
           if (val)
             this.setAttribute("selected", "true");
           else
             this.removeAttribute("selected");
 
-          this._setPositionAttributes(val);
-
           return val;
-        ]]></setter>
+          ]]>
+        </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="_selected">
+        <setter>
+          <![CDATA[
+          // If our tab switching is synchronous, then logical selection = visual selection
+          this._logicallySelected = val;
+          this._visuallySelected = val;
+          return val;
+          ]]>
+        </setter>
+      </property>
 
       <property name="linkedPanel" onget="return this.getAttribute('linkedpanel')"
                                    onset="this.setAttribute('linkedpanel', val); return val;"/>
 
       <field name="arrowKeysShouldWrap" readonly="true">
 #ifdef XP_MACOSX
         true
 #else