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 |
} |