From ad7a1d79f70db2bcf07b21e1b0d98a04a69888fc Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Wed, 31 Mar 2010 23:04:56 -0700 Subject: [PATCH] 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. Fix http://b/issue?id=2563143 --- core/java/android/webkit/WebView.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index e4ba2b0796c2c..9acfda55bb4a1 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -6413,10 +6413,15 @@ public class WebView extends AbsoluteLayout 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: