Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(619)

Unified Diff: ui/chromeos/touch_exploration_controller.cc

Issue 419923002: Fixed NOTREACHED() bug in touch_exploration_controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/chromeos/touch_exploration_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/chromeos/touch_exploration_controller.cc
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
index 0a63014062c19cbb9580426b5854b23c3a2008b7..12b39908847bc207742923602f1add2cc5e0e84a 100644
--- a/ui/chromeos/touch_exploration_controller.cc
+++ b/ui/chromeos/touch_exploration_controller.cc
@@ -243,15 +243,12 @@ TouchExplorationController::InSingleTapOrTouchExploreReleased(
state_ = WAIT_FOR_RELEASE;
return ui::EVENT_REWRITE_DISCARD;
}
- // If there is no touch exploration yet, discard.
- if (!last_touch_exploration_ || type == ui::ET_TOUCH_RELEASED) {
- if (current_touch_ids_.size() == 0) {
- ResetToNoFingersDown();
- }
- return ui::EVENT_REWRITE_DISCARD;
- }
-
if (type == ui::ET_TOUCH_PRESSED) {
+ // If there is no touch exploration yet, we can't send a click, so discard.
+ if (!last_touch_exploration_) {
+ tap_timer_.Stop();
+ return ui::EVENT_REWRITE_DISCARD;
+ }
// This is the second tap in a double-tap (or double tap-hold).
// Rewrite at location of last touch exploration.
rewritten_event->reset(
« no previous file with comments | « no previous file | ui/chromeos/touch_exploration_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698