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

Unified Diff: content/renderer/render_widget.cc

Issue 484653003: Fixed the inconsistent behavior when long pressing on editable area in Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unwanted file from patchset. Created 6 years, 4 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 | « content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 10d87e16fe98629050057dce80ae3b6bc182a69d..021abc86a2601387acef24940861184d5d8ecb44 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1967,9 +1967,14 @@ void RenderWidget::didHandleGestureEvent(
#if defined(OS_ANDROID) || defined(USE_AURA)
if (event_cancelled)
return;
- if (event.type == WebInputEvent::GestureTap ||
- event.type == WebInputEvent::GestureLongPress) {
+ if (event.type == WebInputEvent::GestureTap) {
UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
+ } else if (event.type == WebInputEvent::GestureLongPress) {
+ DCHECK(webwidget_);
+ if (webwidget_->textInputInfo().value.isEmpty())
+ UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME);
+ else
+ UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
}
#endif
}
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698