diff options
| author | 2010-01-26 10:09:52 -0800 | |
|---|---|---|
| committer | 2010-01-26 10:09:52 -0800 | |
| commit | c811cd916f7264f11ba4c96fcd8b88e5d58e04db (patch) | |
| tree | f807daa34b2454539604774eaea46c0bd608a1d2 | |
| parent | cf0957ce4b0ba45b6c66c726710a5126c6a57542 (diff) | |
| parent | caf0ce3ca2b3deba4bcff6c920740bafd87f2b62 (diff) | |
am caf0ce3c: Delay resetting mPreventDrag flags so that the Plugin will have more time to respond whether it wants to handle the touch events. (not have to return the value from WebViewCore before the first tap is up)
Merge commit 'caf0ce3ca2b3deba4bcff6c920740bafd87f2b62' into eclair-mr2-plus-aosp
* commit 'caf0ce3ca2b3deba4bcff6c920740bafd87f2b62':
Delay resetting mPreventDrag flags so that the Plugin
| -rw-r--r-- | core/java/android/webkit/WebView.java | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index b9a214cef495..5d3a8bfebce0 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -4443,14 +4443,11 @@ public class WebView extends AbsoluteLayout break; } } else { - if (mPreventDrag == PREVENT_DRAG_MAYBE_YES) { - // if mPreventDrag is not confirmed, treat it as - // no so that it won't block tap or double tap. - mPreventDrag = PREVENT_DRAG_NO; - mPreventLongPress = false; - mPreventDoubleTap = false; - } - if (mPreventDrag == PREVENT_DRAG_NO) { + // mPreventDrag can be PREVENT_DRAG_MAYBE_YES in + // TOUCH_INIT_MODE. To give WebCoreThread a little + // more time to send PREVENT_TOUCH_ID, we check + // again in responding RELEASE_SINGLE_TAP. + if (mPreventDrag != PREVENT_DRAG_YES) { if (mTouchMode == TOUCH_INIT_MODE) { mPrivateHandler.sendMessageDelayed( mPrivateHandler.obtainMessage( @@ -5444,6 +5441,13 @@ public class WebView extends AbsoluteLayout break; } case RELEASE_SINGLE_TAP: { + if (mPreventDrag == PREVENT_DRAG_MAYBE_YES) { + // if mPreventDrag is not confirmed, treat it as + // no so that it won't block tap. + mPreventDrag = PREVENT_DRAG_NO; + mPreventLongPress = false; + mPreventDoubleTap = false; + } if (mPreventDrag == PREVENT_DRAG_NO) { mTouchMode = TOUCH_DONE_MODE; doShortPress(); @@ -5807,6 +5811,11 @@ public class WebView extends AbsoluteLayout mFullScreenHolder.setCancelable(false); mFullScreenHolder.setCanceledOnTouchOutside(false); mFullScreenHolder.show(); + } else if (mFullScreenHolder == null) { + // this may happen if user dismisses the fullscreen and + // then the WebCore re-position message finally reached + // the UI thread. + break; } // move the matching embedded view fully into the view so // that touch will be valid instead of rejected due to out |