diff options
author | suzhe@google.com <suzhe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-19 05:31:25 +0000 |
---|---|---|
committer | suzhe@google.com <suzhe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-19 05:31:25 +0000 |
commit | 49b38a3c347fc21ebaa0beb27602b18469444285 (patch) | |
tree | a133b2098bb50c393789f9e2f92ec3faa8c243c3 /chrome/browser/renderer_host/render_widget_host_view_mac.mm | |
parent | 259617f3415347f6ef641afb31fca5f3d9b8d6c7 (diff) | |
download | chromium_src-49b38a3c347fc21ebaa0beb27602b18469444285.zip chromium_src-49b38a3c347fc21ebaa0beb27602b18469444285.tar.gz chromium_src-49b38a3c347fc21ebaa0beb27602b18469444285.tar.bz2 |
[Mac] Force AppKit to cache the new input context when text input type gets changed.
When text input type gets changed from NONE to TEXT, AppKit may still
remember the old NULL input context, which causes the problem described
in the bug report. This CL forces AppKit to cache the new input context
whenever text input type changed.
BUG=73039
TEST=See bug report
Review URL: http://codereview.chromium.org/7037019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85876 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host_view_mac.mm')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_mac.mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm index 3cd14ef..507b92a 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm @@ -494,8 +494,13 @@ void RenderWidgetHostViewMac::ImeUpdateTextInputState( const gfx::Rect& caret_rect) { if (text_input_type_ != type) { text_input_type_ = type; - if (HasFocus()) + if (HasFocus()) { SetTextInputActive(true); + + // Let AppKit cache the new input context to make IMEs happy. + // See http://crbug.com/73039. + [NSApp updateWindows]; + } } } |