Back out 5d997f85c1b9 (Bug 639179 Part 1) due to mobile unittest orange. CLOSED TREE

This commit is contained in:
L. David Baron 2011-04-09 18:25:53 -07:00
Родитель 9384f80013
Коммит 18017259fa
1 изменённых файлов: 10 добавлений и 12 удалений

Просмотреть файл

@ -328,8 +328,11 @@ MouseModule.prototype = {
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()) {
@ -391,16 +394,11 @@ MouseModule.prototype = {
* 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;
},