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

Unified Diff: ui/views/controls/textfield/textfield.cc

Issue 2952763002: SearchBoxView now enables/disables cursor based on user interaction. (Closed)
Patch Set: Addressed Comments, refactored. Created 3 years, 6 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/views/controls/textfield/textfield.cc
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc
index 7e9dbae11d8d961b29cab6b5deea857572a2bc70..0b9369abc5b5fbc754a74a529dcb5f6aaf9bb081 100644
--- a/ui/views/controls/textfield/textfield.cc
+++ b/ui/views/controls/textfield/textfield.cc
@@ -696,6 +696,11 @@ void Textfield::OnGestureEvent(ui::GestureEvent* event) {
event->SetHandled();
break;
case ui::ET_GESTURE_TAP:
+ DCHECK(controller_);
+ if (controller_->HandleGestureEvent(this, *event)) {
oshima 2017/06/29 16:58:50 controller_ may be null, so just check like other
newcomer 2017/06/30 21:47:23 Done.
+ event->SetHandled();
+ return;
+ }
if (event->details().tap_count() == 1) {
// If tap is on the selection and touch handles are not present, handles
// should be shown without changing selection. Otherwise, cursor should

Powered by Google App Engine
This is Rietveld 408576698