Commit 98751ff1 authored by trchen@chromium.org's avatar trchen@chromium.org

Remove acknowledge timeout for TouchEnd and TouchCancel events

Waiting acknowledge for TouchEnd and TouchCancel shouldn't affect
responsiveness for scroll and pinch gestures. If we timeout TouchEnd
events, it can end up being processed by both user JavaScript and
gesture detector, causing double handling.

BUG=248090
R=tedchoc@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16963007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208063 0039d316-1c4b-4281-b951-d872f2087c98
parent d03cf190
...@@ -793,7 +793,10 @@ class ContentViewGestureHandler implements LongPressDelegate { ...@@ -793,7 +793,10 @@ class ContentViewGestureHandler implements LongPressDelegate {
mTouchCancelEventSent = false; mTouchCancelEventSent = false;
if (mMotionEventDelegate.sendTouchEvent(event.getEventTime(), type, pts)) { if (mMotionEventDelegate.sendTouchEvent(event.getEventTime(), type, pts)) {
mTouchEventTimeoutHandler.start(event.getEventTime(), pts); if (event.getAction() != MotionEvent.ACTION_UP
&& event.getAction() != MotionEvent.ACTION_CANCEL) {
mTouchEventTimeoutHandler.start(event.getEventTime(), pts);
}
return EVENT_FORWARDED_TO_NATIVE; return EVENT_FORWARDED_TO_NATIVE;
} }
} else if (!mTouchCancelEventSent) { } else if (!mTouchCancelEventSent) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment