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

Unified Diff: content/renderer/render_widget.cc

Issue 1388283002: Fix OSK flickering issue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix more tests except for contextualsearchmanagertests Created 5 years, 2 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') | 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 121039660409f696b70c8ac37874b504498fb957..265a7be1ff660485b707124e1dfbb55437e8e7ea 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -1887,13 +1887,24 @@ void RenderWidget::UpdateTextInputState(ShowIme show_ime,
TRACE_EVENT0("renderer", "RenderWidget::UpdateTextInputState");
if (handling_ime_event_)
return;
aelias_OOO_until_Jul13 2015/10/22 00:07:56 Prior to this early return, I think we should do '
Changwan Ryu 2015/10/22 02:46:00 Hmm... Since we do not store show_ime_, I came up
- ui::TextInputType new_type = GetTextInputType();
- if (IsDateTimeInput(new_type))
- return; // Not considered as a text input field in WebKit/Chromium.
+ // We could be called in the middle of focus change, or in some other
+ // intermediary state.
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&RenderWidget::UpdateTextInputStateInternal, this,
+ show_ime, change_source));
+}
+
+void RenderWidget::UpdateTextInputStateInternal(ShowIme show_ime,
+ ChangeSource change_source) {
blink::WebTextInputInfo new_info;
if (webwidget_)
new_info = webwidget_->textInputInfo();
+
+ ui::TextInputType new_type = WebKitToUiTextInputType(new_info.type);
+ if (IsDateTimeInput(new_type))
+ return; // Not considered as a text input field in WebKit/Chromium.
+
const ui::TextInputMode new_mode = ConvertInputMode(new_info.inputMode);
bool new_can_compose_inline = CanComposeInline();
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698