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

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

Issue 2121953002: Do not calculate composition bounds until IME requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test failures Created 4 years, 4 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/browser/renderer_host/ime_adapter_android.cc ('k') | content/common/input_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7286cec3fa775c32b472157008106267475c1b07..3362aecf01defdbf2d288f7b99bfb11d20ade97f 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -45,6 +45,7 @@
#include "content/browser/renderer_host/ui_events_helper.h"
#include "content/browser/renderer_host/web_input_event_aura.h"
#include "content/common/content_switches_internal.h"
+#include "content/common/input_messages.h"
#include "content/common/site_isolation_policy.h"
#include "content/common/text_input_state.h"
#include "content/common/view_messages.h"
@@ -107,7 +108,6 @@
#endif
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-#include "content/common/input_messages.h"
#include "ui/base/ime/linux/text_edit_command_auralinux.h"
#include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
#endif
@@ -2996,8 +2996,23 @@ void RenderWidgetHostViewAura::OnUpdateTextInputStateCalled(
const TextInputState* state = text_input_manager_->GetTextInputState();
if (state && state->show_ime_if_needed &&
- state->type != ui::TEXT_INPUT_TYPE_NONE)
+ state->type != ui::TEXT_INPUT_TYPE_NONE) {
GetInputMethod()->ShowImeIfNeeded();
+
+ // Start monitoring the composition information if the focused node is
+ // editable.
+ host_->Send(new InputMsg_RequestCompositionUpdate(
+ host_->GetRoutingID(),
+ false /* immediate request */,
+ true /* monitor request */));
+ } else {
+ // Stop monitoring the composition information if the focused node is not
+ // editable.
+ host_->Send(new InputMsg_RequestCompositionUpdate(
+ host_->GetRoutingID(),
+ false /* immediate request */,
+ false /* monitor request */));
+ }
}
void RenderWidgetHostViewAura::OnImeCancelComposition(
« no previous file with comments | « content/browser/renderer_host/ime_adapter_android.cc ('k') | content/common/input_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698