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

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: Sending UpdateTextInputState() even if we don't want to show IME case also. 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 | « no previous file | 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..e4710a3fc1a9b2d2f081a9ceda26c1f9051b77b1 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1967,9 +1967,16 @@ 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) {
+ blink::WebTextInputInfo new_info;
+ if (webwidget_)
+ new_info = webwidget_->textInputInfo();
jdduke (slow) 2014/08/19 18:19:49 Is there no other way of determining whether the i
AKVT 2014/08/20 15:00:43 As I checked the code, there is no other way we ca
jdduke (slow) 2014/08/20 15:37:05 I guess this is fine, but |didHandleGestureEvent|
jdduke (slow) 2014/08/20 15:37:49 is a WebWidgetClient *method* that is.
AKVT 2014/08/20 18:20:17 Done.
AKVT 2014/08/20 18:20:17 Done. Thanks
+ if (!new_info.value.isEmpty())
+ UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
+ else
+ UpdateTextInputState(NO_SHOW_IME, FROM_NON_IME);
}
#endif
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698