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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 2954963003: Request Composition Range Updates for Focused GuestViews based on BrowserPlugins (Closed)
Patch Set: Created 3 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/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 1f985ec5c83d928e1cb8d222785c2a12664a67e8..e05acc6ca6dcbf2eb0da6ee50dccbb094ed64a22 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -650,8 +650,21 @@ void BrowserPluginGuest::SendTextInputTypeChangedToView(
return;
}
- if (last_text_input_state_.get())
+ if (last_text_input_state_.get()) {
guest_rwhv->TextInputStateChanged(*last_text_input_state_);
+ if (auto* rwh =
+ RenderWidgetHostImpl::From(guest_rwhv->GetRenderWidgetHost())) {
+ // We need composition range information for some IMEs. To get the
+ // updates, we need to explicitly ask the renderer to monitor and send the
+ // composition information changes. RenderWidgetHostView of the page will
+ // send the request to its process but the machinery for forwarding it to
+ // BrowserPlugin is not there. Therefore, we send a direct request to the
+ // guest process to start monitoring the state (see
+ // https://crbug.com/714771).
+ rwh->RequestCompositionUpdates(
+ false, last_text_input_state_->type != ui::TEXT_INPUT_TYPE_NONE);
+ }
+ }
}
void BrowserPluginGuest::DidFinishNavigation(
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc ('k') | content/browser/renderer_host/text_input_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698