Mac: Don't allow history swiping after substantial vertical motion.
Previously, the logic for history swiping depended on the relative Y distance of the gesture's current location from the gesture's start location. Gestures which consisted of a large up motion, followed by a large down motion, followed by a horizontal motion could still cause history swiping. The new logic depends on the total Y distance of the gesture, which fixes this problem. This CL also includes a change to allowed the gesture recognizer state machine to enter the state kCancelled directly from the state kPending. Previously, it was possible for the history overlay to show for a very brief period of time even if the gesture was about to be cancelled. This CL also includes a minor refactor: - Renamed several methods to better reflect their intended purpose. - Removed lastProcessedGestureId_ and currentGestureId_, which did not cause a functional change. BUG=421629 Review URL: https://codereview.chromium.org/657323003 Cr-Commit-Position: refs/heads/master@{#300199}
Showing
This diff is collapsed.
Please register or sign in to comment