am 461cef5d: Merge "As we don\'t support over scroll any more, we need to pin the (x,y) if we handle the drag after the plugin choose not to handle the event." into froyo
Merge commit '461cef5d209fd072c82f6a70eb106e4690b7ef97' into froyo-plus-aosp
* commit '461cef5d209fd072c82f6a70eb106e4690b7ef97':
As we don't support over scroll any more, we need
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index e4ba2b0..9acfda5 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -6413,10 +6413,15 @@
mLastDeferTouchY = y;
startDrag();
}
- doDrag((int) (mLastDeferTouchX - x),
- (int) (mLastDeferTouchY - y));
- mLastDeferTouchX = x;
- mLastDeferTouchY = y;
+ int deltaX = pinLocX((int) (mScrollX
+ + mLastDeferTouchX - x))
+ - mScrollX;
+ int deltaY = pinLocY((int) (mScrollY
+ + mLastDeferTouchY - y))
+ - mScrollY;
+ doDrag(deltaX, deltaY);
+ if (deltaX != 0) mLastDeferTouchX = x;
+ if (deltaY != 0) mLastDeferTouchY = y;
break;
}
case MotionEvent.ACTION_UP: