Commit ce260e0a authored by Ryan Daum's avatar Ryan Daum Committed by Commit Bot

[chromecast] Clean up gesture state between side swipes.

  - Prevent crashes caused by incomplete gesture state when side swipes
    occur while using side swipe gestures between multiple views.

Bug: internal b/111100155
Test: manual
Change-Id: I5bd91b9322afc06e2ee69b5f311d60c8e373a5ed
Reviewed-on: https://chromium-review.googlesource.com/1155378Reviewed-by: default avatarAlex Sakhartchouk <alexst@chromium.org>
Commit-Queue: Ryan Daum <rdaum@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579122}
parent d2610fdb
......@@ -184,11 +184,14 @@ ui::EventRewriteStatus SideSwipeDetector::RewriteEvent(
VLOG(1) << "side swipe gesture begin @ " << touch_location.ToString();
current_swipe_time_ = base::ElapsedTimer();
// Stash a copy of the event should we decide to reconstitute it later if we
// decide that this isn't in fact a side swipe.
StashEvent(*touch_event);
// Avoid corrupt gesture state caused by a missing kGestureScrollEnd event
// as we potentially transition between web views.
root_window_->CleanupGestureState();
// And then stop the original event from propagating.
return ui::EVENT_REWRITE_DISCARD;
}
......
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