Bug 582216 - Make sure that we set _scrollTarget in every case in order to address intermittent failures in tabbrowser overflow handling; r=dao a=test-only
☠☠ backed out by bb5949089002 ☠ ☠
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Wed, 16 Mar 2011 18:01:34 -0400
changeset 63428 75147c0a4b895f1e6bf07c66f640d6fb51847dc4
parent 63427 821740bc1b4d076551e70d2411a26fa567fdde3b
child 63429 bb59490890025376aadb83090ee55f9731c20dc2
push id1
push userroot
push dateTue, 10 Dec 2013 15:46:25 +0000
reviewersdao, test-only
bugs582216
milestone2.0b13pre
Bug 582216 - Make sure that we set _scrollTarget in every case in order to address intermittent failures in tabbrowser overflow handling; r=dao a=test-only
toolkit/content/widgets/scrollbox.xml
--- a/toolkit/content/widgets/scrollbox.xml
+++ b/toolkit/content/widgets/scrollbox.xml
@@ -242,32 +242,32 @@
               amountToScroll = this._isScrolling * STOP_DISTANCE;
           } else {
             return;
           }
 
           this._stopSmoothScroll();
 
           if (aSmoothScroll != false && this.smoothScroll) {
-            this._scrollTarget = element;
-            this._smoothScrollByPixels(amountToScroll);
+            this._smoothScrollByPixels(amountToScroll, element);
           } else {
             this.scrollByPixels(amountToScroll);
           }
         ]]></body>
       </method>
 
       <method name="_smoothScrollByPixels">
         <parameter name="amountToScroll"/>
+        <parameter name="element"/><!-- optional -->
         <body><![CDATA[
+          this._stopSmoothScroll();
           if (amountToScroll == 0)
             return;
 
-          this._stopSmoothScroll();
-
+          this._scrollTarget = element;
           // Positive amountToScroll makes us scroll right (elements fly left), negative scrolls left.
           this._isScrolling = amountToScroll < 0 ? -1 : 1;
 
           this._scrollAnim.start(amountToScroll);
         ]]></body>
       </method>
 
       <field name="_scrollAnim"><![CDATA[({