Merge "If we get TOUCH_UP before getting the WebCore's response for TOUCH_DOWN, remove the pending TOUCH_EVENT before proceeding to fling." into eclair-mr2

This commit is contained in:
Grace Kloba
2010-03-01 13:07:06 -08:00
committed by Android (Google) Code Review

View File

@@ -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);