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

Unified Diff: ui/touch_selection/touch_selection_controller.cc

Issue 2733603003: Tapping/longpressing should result in INSERTION_HANDLE_SHOWN (Closed)
Patch Set: removed InsertionNotResetByRepeatedTapOrPress Created 3 years, 9 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
Index: ui/touch_selection/touch_selection_controller.cc
diff --git a/ui/touch_selection/touch_selection_controller.cc b/ui/touch_selection/touch_selection_controller.cc
index c2f7cc855903d88544e423583d356540509b4344..51d411d9ffb72ddc0efb9c2845772782f4472a87 100644
--- a/ui/touch_selection/touch_selection_controller.cc
+++ b/ui/touch_selection/touch_selection_controller.cc
@@ -463,10 +463,12 @@ bool TouchSelectionController::ActivateInsertionIfNecessary() {
new TouchHandle(this, TouchHandleOrientation::CENTER, viewport_rect_));
}
- if (active_status_ == INACTIVE) {
+ if (active_status_ == INACTIVE || response_pending_input_event_ == TAP ||
+ response_pending_input_event_ == LONG_PRESS) {
active_status_ = INSERTION_ACTIVE;
insertion_handle_->SetEnabled(true);
insertion_handle_->SetViewportRect(viewport_rect_);
+ response_pending_input_event_ = INPUT_EVENT_TYPE_NONE;
return true;
}
return false;
« no previous file with comments | « ui/touch_selection/touch_selection_controller.h ('k') | ui/touch_selection/touch_selection_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698