diff options
| author | Grace Kloba <klobag@google.com> | 2010-03-01 12:29:11 -0800 |
|---|---|---|
| committer | Grace Kloba <klobag@google.com> | 2010-03-01 12:29:11 -0800 |
| commit | a752a949afab51854bf649873d418bb205981c3b (patch) | |
| tree | a159096fcb2567f675ad9ecdec470a63cbee0cfa /core/java/android | |
| parent | a406fb90805adf36fe0fabd3a79018e33706453c (diff) | |
If we get TOUCH_UP before getting the WebCore's
response for TOUCH_DOWN, remove the pending TOUCH_EVENT
before proceeding to fling.
This is partial fix for
http://b/issue?id=2450534
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/webkit/WebView.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 9af2d51c434a..6d827971b53e 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -4441,6 +4441,14 @@ public class WebView extends AbsoluteLayout if (mFullScreenHolder == null && (computeHorizontalScrollExtent() < computeHorizontalScrollRange() || computeVerticalScrollExtent() < computeVerticalScrollRange())) { + // remove the pending TOUCH_EVENT and send a + // cancel + mWebViewCore + .removeMessages(EventHub.TOUCH_EVENT); + WebViewCore.TouchEventData ted = new WebViewCore.TouchEventData(); + ted.mAction = MotionEvent.ACTION_CANCEL; + mWebViewCore.sendMessage(EventHub.TOUCH_EVENT, + ted); // we will not rewrite drag code here, but we // will try fling if it applies. WebViewCore.pauseUpdate(mWebViewCore); |
