| 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 6cd3067aa74d11f04de0098a0c8d1ccbd84fc3bf..ccdb111af04e2b3577e4343e17e03e39382b5264 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
| @@ -1010,28 +1010,23 @@ void RenderWidgetHostViewMac::SetIsLoading(bool is_loading) {
|
| // like Chrome does on Windows, call |UpdateCursor()| here.
|
| }
|
|
|
| -void RenderWidgetHostViewMac::UpdateInputMethodIfNecessary(
|
| - bool text_input_state_changed) {
|
| - if (!text_input_state_changed)
|
| - return;
|
| -
|
| - // TODO(ekaramad): The state tracking is all in WebContentsImpl now. Remove
|
| - // these member variables (crbug.com/602427).
|
| - const TextInputState* state =
|
| - render_widget_host_->delegate()->GetTextInputState();
|
| - text_input_type_ = state->type;
|
| - can_compose_inline_ = state->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];
|
| +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(), !can_compose_inline_);
|
| + UseInputWindow(TSMGetActiveDocument(), !can_compose_inline_);
|
| #endif
|
| + }
|
| }
|
| }
|
|
|
| @@ -1088,10 +1083,6 @@ void RenderWidgetHostViewMac::Destroy() {
|
| // 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
|
| // by some other code. Examples are WebContentsViewMac's
|
|
|