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

Unified Diff: content/renderer/render_widget.cc

Issue 715733002: [Android] Show autofill popup after animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make this Android CL independent from the ChromeOS CL. Created 5 years, 11 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: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 60adf974f69939528c7c8a62985bc38dbdbbcb16..32d8011aa018ea5e8e2ad34b6615fc9a987b94b4 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1222,8 +1222,9 @@ void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event,
// Show the virtual keyboard if enabled and a user gesture triggers a focus
// change.
if (processed && (input_event->type == WebInputEvent::TouchEnd ||
- input_event->type == WebInputEvent::MouseUp))
+ input_event->type == WebInputEvent::MouseUp)) {
UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_IME);
+ }
#endif
if (!prevent_default) {
@@ -1234,6 +1235,16 @@ void RenderWidget::OnHandleInputEvent(const blink::WebInputEvent* input_event,
if (WebInputEvent::isTouchEventType(input_event->type))
DidHandleTouchEvent(*(static_cast<const WebTouchEvent*>(input_event)));
}
+
+// TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with
+// virtual keyboard.
+#if !defined(OS_ANDROID)
+ // Virtual keyboard is not supported, so react to focus change immediately.
+ if (processed && (input_event->type == WebInputEvent::TouchEnd ||
+ input_event->type == WebInputEvent::MouseUp)) {
+ FocusChangeComplete();
+ }
+#endif
}
void RenderWidget::OnCursorVisibilityChange(bool is_visible) {
@@ -1686,6 +1697,12 @@ void RenderWidget::OnShowImeIfNeeded() {
#if defined(OS_ANDROID) || defined(USE_AURA)
UpdateTextInputState(SHOW_IME_IF_NEEDED, FROM_NON_IME);
#endif
+
+// TODO(rouslan): Fix ChromeOS and Windows 8 behavior of autofill popup with
+// virtual keyboard.
+#if !defined(OS_ANDROID)
+ FocusChangeComplete();
+#endif
}
#if defined(OS_ANDROID)

Powered by Google App Engine
This is Rietveld 408576698