diff options
author | yoichio@chromium.org <yoichio@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 01:27:24 +0000 |
---|---|---|
committer | yoichio@chromium.org <yoichio@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 01:27:24 +0000 |
commit | c078461f8a6d45304f0edd5dacf10aa7074270e6 (patch) | |
tree | 343a65bb37f9dcef01d6fcae49598a189c77ac6b /ui/views/controls/textfield/native_textfield_views.cc | |
parent | 2576ad8c2fd2816b8159fd4e4ec30cbcd7c73830 (diff) | |
download | chromium_src-c078461f8a6d45304f0edd5dacf10aa7074270e6.zip chromium_src-c078461f8a6d45304f0edd5dacf10aa7074270e6.tar.gz chromium_src-c078461f8a6d45304f0edd5dacf10aa7074270e6.tar.bz2 |
Revert 231472 "Remove views::InputMethod::On[Focus|Blur] calling..."
> Remove views::InputMethod::On[Focus|Blur] calling from not top level widgets.
>
> This patch is a step of refactoring for the IME related focus handling.
>
> Background issue:
> No top level widget can call views::InputMethod::On[Focus|Blur] as documented.
> That hack was needed because to create a new widget with a new window handle by a mouse leaving event invoked Aura focus to the widget first and win32 focus next.
> InputMethodTSF focusing works on widgets with win32 focus so the first focusing missed TSF focusing.
> 2nd focusing by win32 also didn't work because InputMethodBridge
> permitted the TextInputClient setting only once.
>
> Solution:
> This patch changes to call OnWillChangeFocusedClientand OnDidChangeFocusedClient whenever a TextInputClinet is set or not.
> Then secondary win32 focusing sets InputMethodTSF focus.
>
> BUG=302229, 306368
> TEST=manually done in Windows 8 Aura with or without --enable-text-services-framework flag.
>
> Review URL: https://codereview.chromium.org/34573003
TBR=yoichio@chromium.org
Review URL: https://codereview.chromium.org/53913002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/controls/textfield/native_textfield_views.cc')
-rw-r--r-- | ui/views/controls/textfield/native_textfield_views.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/views/controls/textfield/native_textfield_views.cc b/ui/views/controls/textfield/native_textfield_views.cc index ca2f92d..eae8f88 100644 --- a/ui/views/controls/textfield/native_textfield_views.cc +++ b/ui/views/controls/textfield/native_textfield_views.cc @@ -679,6 +679,7 @@ void NativeTextfieldViews::HandleFocus() { GetRenderText()->set_focused(true); is_cursor_visible_ = true; SchedulePaint(); + GetInputMethod()->OnFocus(); OnCaretBoundsChanged(); const size_t caret_blink_ms = Textfield::GetCaretBlinkMs(); @@ -693,6 +694,7 @@ void NativeTextfieldViews::HandleFocus() { void NativeTextfieldViews::HandleBlur() { GetRenderText()->set_focused(false); + GetInputMethod()->OnBlur(); // Stop blinking cursor. cursor_timer_.InvalidateWeakPtrs(); if (is_cursor_visible_) { |