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

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: Rebase. 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
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/test/web_layer_tree_view_impl_for_testing.h » ('j') | 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 c2eefbd766a8c00c252c1c06c249675af13d37fa..a22d374e6f796eb808d1c81c466c72b6cef5fc5e 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1230,8 +1230,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) {
@@ -1242,6 +1243,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) {
@@ -1697,6 +1708,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)
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/test/web_layer_tree_view_impl_for_testing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698