summaryrefslogtreecommitdiffstats
path: root/ui/views/controls/textfield
diff options
context:
space:
mode:
authorwjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 01:58:14 +0000
committerwjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-19 01:58:14 +0000
commitca8d150cf93e15f8a1bf621ddc16cf9982e73767 (patch)
treec5e9b65ca9dc11c4b2a4063b877a22b1dc351851 /ui/views/controls/textfield
parent7fbd4a80183050fa570ba069965328063639a171 (diff)
downloadchromium_src-ca8d150cf93e15f8a1bf621ddc16cf9982e73767.zip
chromium_src-ca8d150cf93e15f8a1bf621ddc16cf9982e73767.tar.gz
chromium_src-ca8d150cf93e15f8a1bf621ddc16cf9982e73767.tar.bz2
Revert 188901 "Replace ET_GESTURE_DOUBLE_TAP with ET_GESTURE_TAP"
It broken ChromeOS views_unittests (http://build.chromium.org/p/chromium.chromiumos/buildstatus?builder=Linux%20ChromiumOS%20Tests%20%281%29%28Precise%29&number=1869) > Replace ET_GESTURE_DOUBLE_TAP with ET_GESTURE_TAP > > ET_GESTURE_TAP now has a tap count memeber to tell if it > is a single or double tap. So replace the usage of > ET_GESTURE_DOUBLE_TAP with ET_GESTURE_TAP. > > BUG=140382 > > > Review URL: https://chromiumcodereview.appspot.com/12745006 TBR=miletus@chromium.org Review URL: https://codereview.chromium.org/12673005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls/textfield')
-rw-r--r--ui/views/controls/textfield/native_textfield_views.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc
index 838ef31..ed6c071 100644
--- a/ui/views/controls/textfield/native_textfield_views.cc
+++ b/ui/views/controls/textfield/native_textfield_views.cc
@@ -164,6 +164,12 @@ void NativeTextfieldViews::OnGestureEvent(ui::GestureEvent* event) {
OnAfterUserAction();
event->SetHandled();
break;
+ case ui::ET_GESTURE_DOUBLE_TAP:
+ OnBeforeUserAction();
+ SelectAll(false);
+ OnAfterUserAction();
+ event->SetHandled();
+ break;
case ui::ET_GESTURE_SCROLL_UPDATE:
OnBeforeUserAction();
if (MoveCursorTo(event->location(), true))
@@ -172,14 +178,7 @@ void NativeTextfieldViews::OnGestureEvent(ui::GestureEvent* event) {
event->SetHandled();
break;
case ui::ET_GESTURE_TAP:
- if (event->details().tap_count() == 1) {
- CreateTouchSelectionControllerAndNotifyIt();
- } else {
- OnBeforeUserAction();
- SelectAll(false);
- OnAfterUserAction();
- event->SetHandled();
- }
+ CreateTouchSelectionControllerAndNotifyIt();
break;
case ui::ET_GESTURE_LONG_PRESS:
// If long press happens outside selection, select word and show context