Fix redundant emulated touch cancellation and harden the TouchEventQueue
commit956aef2aa8fa3b6caa6ef8f0c18444942c4117fb
authorjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 20 Aug 2014 18:40:01 +0000 (20 18:40 +0000)
committerjdduke@chromium.org <jdduke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 20 Aug 2014 18:41:43 +0000 (20 18:41 +0000)
tree4f0280ff9d620bf41188acb0cb824a16ae3ae6db
parent6b12f379aaa9cce013d4c20b6d91951348775fa5
Fix redundant emulated touch cancellation and harden the TouchEventQueue

Previously, redundant ACTION_CANCEL events would be dropped by the
GestureProvider. However, with a recent change to Aura, that is no longer the
case. As TouchEmulator relied on such filtering when explicitly cancelling the
touch sequence, there were cases where redundant touchcancel events were
forwarded.

There are also cases where the TouchEventQueue should be robust to an incomplete
stream, in particular, it should properly reset at the start of a new touch
sequence. For the most part this holds, but there was a case where an async,
deferred touchmove would linger through into a new touch sequence, causing
problems with the expected event sequence both in the renderer and browser.
Address this by simply clearing the async, deferred touchmove upon the start of
a new sequence. Also address a small issue where touchmove slop suppression was
erroneously active for small touch deltas even if explicitly disabled.

BUG=405083

Review URL: https://codereview.chromium.org/492463003

Cr-Commit-Position: refs/heads/master@{#290877}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290877 0039d316-1c4b-4281-b951-d872f2087c98
content/browser/renderer_host/input/touch_emulator.cc
content/browser/renderer_host/input/touch_emulator_unittest.cc
content/browser/renderer_host/input/touch_event_queue.cc
content/browser/renderer_host/input/touch_event_queue_unittest.cc