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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

Issue 1895523002: Revert of Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 09859f14b9b45b64abc0037c0cf6380f8675d44a..0581389eeafec3d02437941b8a9ca4e42a776c66 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -1010,23 +1010,23 @@
// like Chrome does on Windows, call |UpdateCursor()| here.
}
-void RenderWidgetHostViewMac::UpdateInputMethodIfNecessary(
- bool text_input_state_changed) {
- if (!text_input_state_changed)
- return;
-
- if (HasFocus()) {
- SetTextInputActive(true);
-
- // Let AppKit cache the new input context to make IMEs happy.
- // See http://crbug.com/73039.
- [NSApp updateWindows];
+void RenderWidgetHostViewMac::TextInputStateChanged(
+const ViewHostMsg_TextInputState_Params& params) {
+ if (text_input_type_ != params.type
+ || can_compose_inline_ != params.can_compose_inline) {
+ text_input_type_ = params.type;
+ can_compose_inline_ = params.can_compose_inline;
+ if (HasFocus()) {
+ SetTextInputActive(true);
+
+ // Let AppKit cache the new input context to make IMEs happy.
+ // See http://crbug.com/73039.
+ [NSApp updateWindows];
#ifndef __LP64__
- UseInputWindow(TSMGetActiveDocument(), !render_widget_host_->delegate()
- ->GetTextInputState()
- ->can_compose_inline);
+ UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_);
#endif
+ }
}
}
@@ -1082,10 +1082,6 @@
// Make sure none of our observers send events for us to process after
// we release render_widget_host_.
NotifyObserversAboutShutdown();
-
- // The WebContentsImpl should be notified about us so that it will not hold
- // an invalid text input state which was due to active text on this view.
- NotifyHostDelegateAboutShutdown();
// We get this call just before |render_widget_host_| deletes
// itself. But we are owned by |cocoa_view_|, which may be retained

Powered by Google App Engine
This is Rietveld 408576698