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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2116593002: Confirm ongoing IME composition at the right render widget in response to mouse click/tap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed creis@'s comment Created 4 years, 6 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/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index f32a160fd36634978a9a359fab36757b551132f1..f2717837f6317cbee98b74b5caff5087fb362a24 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -2527,10 +2527,10 @@ bool RenderWidgetHostViewAura::NeedsMouseCapture() {
void RenderWidgetHostViewAura::FinishImeCompositionSession() {
if (!has_composition_text_)
return;
- // TODO(wjmaclean): can host_ ever be null?
- if (host_) {
- host_->ImeConfirmComposition(base::string16(), gfx::Range::InvalidRange(),
- false);
+
+ if (!!text_input_manager_ && !!text_input_manager_->GetActiveWidget()) {
+ text_input_manager_->GetActiveWidget()->ImeConfirmComposition(
+ base::string16(), gfx::Range::InvalidRange(), false);
}
ImeCancelComposition();
}

Powered by Google App Engine
This is Rietveld 408576698