Prevent flings without a matching scroll
A fling gesture should only be generated after a scroll ends. We use
the did_generate_scroll_ flag to track if there has been a scroll since
the last fling. However, this flag is never set to false when a fling
is generated, so it is possible to send fling events without a matching
scroll event.
This CL sets the did_generate_scroll_ flag to false after a fling is
generated.
BUG=chromium:811855
TEST=created a test in touchtests with multiple flings without matching
scrolls. This CL prevents the extra flings.
Change-Id: I9b8b791b71b906e9579849e93d327359df876ddc
Reviewed-on: https://chromium-review.googlesource.com/916629
Commit-Ready: Sean O'Brien <seobrien@chromium.org>
Tested-by: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
3 files changed