mac: Fix a newly introduced history swiping bug.
commit5486c99c3a3d59c6cba329e65c57390e387caa33
authorerikchen@chromium.org <erikchen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 19 Dec 2013 19:40:47 +0000 (19 19:40 +0000)
committererikchen@chromium.org <erikchen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 19 Dec 2013 19:40:47 +0000 (19 19:40 +0000)
tree91f9e0bdd7e26cafa87c72946ec6cacdcb1a8b6f
parent166f2ed8f748b4b910db4b20b7f5d35ef41e209c
mac: Fix a newly introduced history swiping bug.

Attempting to 2-finger history swipe twice in quick succession would
fail to register the second swipe ~50% of the time. The NSEvent callback with
phase=NSEventPhaseBegan non-deterministically occurs before the event has been
registered as a gesture. This was causing the history_swiper to process the
event as part of the previous gesture.

BUG=138175
TEST=In a single tab, navigate to 5 different sites. Use a trackpad to 2-finger
swipe repeatedly in the same direction. Each swipe should register as a history
swipe, and cause the page to navigate in the appropriate direction. There
should be no jankiness, and the touches should not fail to register.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241918 0039d316-1c4b-4281-b951-d872f2087c98
base/mac/sdk_forward_declarations.h
chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.mm
chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_unit_test.mm