Back out 5d997f85c1b9 (Bug 639179 Part 1) due to mobile unittest orange. CLOSED TREE
authorL. David Baron <dbaron@dbaron.org>
Sat, 09 Apr 2011 18:25:53 -0700
changeset 67754 fe3f7889918b2c2a7a37e75d78d6fd436d3949a0
parent 67753 8ece7619bfffeb8939802fae89ae23748a8b3a52
child 67755 f7d8fe104567acce9ab04b1689d5b08fca0474eb
child 67791 56d25b561e19d465520d6d369d80b66b194df30c
child 67807 6ae459b3a539f359896e2567a4fc786928108e96
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs639179
milestone2.2a1pre
backs out5d997f85c1b9c9a097d85640d5f7b3a3d557c349
first release with
nightly linux32
fe3f7889918b / 4.2a1pre / 20110410030507 / files
nightly linux64
fe3f7889918b / 4.2a1pre / 20110410030507 / files
nightly mac
fe3f7889918b / 4.2a1pre / 20110410030507 / files
nightly win32
fe3f7889918b / 4.2a1pre / 20110410030507 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Back out 5d997f85c1b9 (Bug 639179 Part 1) due to mobile unittest orange. CLOSED TREE
mobile/chrome/content/input.js
--- a/mobile/chrome/content/input.js
+++ b/mobile/chrome/content/input.js
@@ -323,18 +323,21 @@ MouseModule.prototype = {
       //
       let [sX, sY] = dragData.panPosition();
       this.dX += dragData.prevPanX - sX;
       this.dY += dragData.prevPanY - sY;
 
       if (dragData.isPan()) {
         // Only pan when mouse event isn't part of a click. Prevent jittering on tap.
         this._kinetic.addData(sX - dragData.prevPanX, sY - dragData.prevPanY);
-        this._dragBy(this.dX, this.dY);
-        // dragBy will reset dX and dY values to 0.
+        if (!this._waitingForPaint) {
+          this._dragBy(this.dX, this.dY);
+          this.dX = 0;
+          this.dY = 0;
+        }
 
         // Let everyone know when mousemove begins a pan
         if (!oldIsPan && dragData.isPan()) {
           this._mouseOverTimeout.clear();
           this._longClickTimeout.clear();
 
           let event = document.createEvent("Events");
           event.initEvent("PanBegin", true, false);
@@ -386,26 +389,21 @@ MouseModule.prototype = {
 
   /**
    * Used by _onMouseMove() above and by KineticController's timer to do the
    * actual dragMove signalling to the dragger.  We'd put this in _onMouseMove()
    * but then KineticController would be adding to its own data as it signals
    * the dragger of dragMove()s.
    */
   _dragBy: function _dragBy(dX, dY, aIsKinetic) {
-    let dragged = true;
-    if (!this._waitingForPaint || aIsKinetic) {
-      let dragData = this._dragData;
-      dragged = this._dragger.dragMove(dX, dY, this._targetScrollInterface, aIsKinetic);
-      if (dragged && !this._waitingForPaint) {
-        this._waitingForPaint = true;
-        mozRequestAnimationFrame(this);
-      }
-      this.dX = 0;
-      this.dY = 0;
+    let dragData = this._dragData;
+    let dragged = this._dragger.dragMove(dX, dY, this._targetScrollInterface, aIsKinetic);
+    if (dragged && !this._waitingForPaint) {
+      this._waitingForPaint = true;
+      mozRequestAnimationFrame(this);
     }
     return dragged;
   },
 
   /** Callback for kinetic scroller. */
   _kineticStop: function _kineticStop() {
     // Kinetic panning could finish while user is panning, so don't finish
     // the pan just yet.