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

Issue 23245012: Fix Views Combobox and Tree View text input. (Closed)

Created:
7 years, 4 months ago by msw
Modified:
7 years, 3 months ago
Reviewers:
sky, Seigo Nonaka
CC:
chromium-reviews, tfarina, Dane Wallinga, yukawa, kenjibaheux, Seigo Nonaka, Yusuke Sato
Visibility:
Public.

Description

Fix Views Combobox and Tree View text input. Make InputMethodBridge not a TextInputClient, use actual clients. InputMethodBridge was simply forwarding to actual client views. (e.g. NativeTextfieldViews and PrefixSelector for TreeView/Combobox) Remove Views::InputMethod::On[Focus|Blur]() and their calls. Simply update the host's TextInputClient on View focus changes. Fixes r216992's regression (input not sent to Combobox/TreeView). The IME mode indicator also now shows in dialogs more often :) Ignore Widget activation in InputMethodBase::GetTextInputClient. (fixes linux_chromeos initial omnibox input with this patch, seems ok) Call View::On[Focus|Blur] from Combobox and TreeView. (mostly for correctness and NotifyAccessibilityEvent, not critical) Remove the OnCaretBoundsChanged call from TreeView. (unnecessary and doesn't set correct candidate window bounds) Remove unused DesktopRootWindowHost::OnNativeWidget[Focus|Blur]. Handle NULL TextInputClient* objects in TextInputTestHelper. BUG=276720, 271754, 265337 TEST=Test Win (desktop, Win8 Metro, and Aura builds), CrOS, and Linux Aura's Omnibox, Find Bar, Bookmark Bubble, and Edit Bookmark Dialog's textfield text entry (and text input handling to select combobox and tree view elements) with EN, JA, and other IMEs, and related IME usage (Win+Space to change IME on Win8, Alt+` to change modes, etc.). Also test with --enable-text-services-framework. Note that IME candidate windows may not appear or may appear at incorrect positions for tree views and comboboxes, but this seems like a separate issue. R=sky@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219673

Patch Set 1 #

Patch Set 2 : Handle potential NULL from GetInputMethod(). #

Total comments: 2

Patch Set 3 : Move InputMethod focus/blur to View. #

Total comments: 2

Patch Set 4 : Move InputMethod Focus/Blur to Widget. #

Patch Set 5 : Make InputMethodBridge a WidgetObserver, etc. #

Patch Set 6 : Simply update the TextInputClient on View focus changes. #

Patch Set 7 : Remove unused DesktopRootWindowHost::OnNativeWidget[Focus|Blur] #

Patch Set 8 : Sync and rebase; merge changes. #

Patch Set 9 : Remove test OnFocus calls; restore include. #

Patch Set 10 : Check |client| against |GetTextInputClient| in TextInputTestHelper. #

Patch Set 11 : Check |GetTextInputClient| in TextInputTestHelper. #

Patch Set 12 : InputMethodBridge is not a TextInputClient. #

Patch Set 13 : Fix linux_chromeos initial omnibox pre-active focus. #

Patch Set 14 : Handle a NULL client in TextInputTestHelper::OnTextInputTypeChanged. #

Patch Set 15 : Minor cleanups. #

Total comments: 2

Patch Set 16 : Address nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -301 lines) Patch
M chrome/browser/chromeos/input_method/textinput_test_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download
M ui/views/controls/combobox/combobox.cc View 1 2 1 chunk +3 lines, -6 lines 0 comments Download
M ui/views/controls/combobox/native_combobox_views_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -4 lines 0 comments Download
M ui/views/controls/textfield/native_textfield_views.cc View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
M ui/views/controls/tree/tree_view.cc View 1 2 2 chunks +1 line, -5 lines 0 comments Download
M ui/views/ime/input_method.h View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M ui/views/ime/input_method_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -2 lines 0 comments Download
M ui/views/ime/input_method_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -2 lines 0 comments Download
M ui/views/ime/input_method_bridge.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +1 line, -36 lines 0 comments Download
M ui/views/ime/input_method_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +7 lines, -166 lines 0 comments Download
M ui/views/ime/input_method_bridge_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M ui/views/ime/mock_input_method.h View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M ui/views/ime/mock_input_method.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +0 lines, -5 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_native_widget_aura.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -9 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -5 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host_win.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host_win.cc View 1 2 3 4 5 6 7 8 3 chunks +0 lines, -14 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host_x11.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -10 lines 0 comments Download
M ui/views/widget/native_widget_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -14 lines 0 comments Download
M ui/views/widget/native_widget_win.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
msw
Hey Scott, PTAL, this should be considered for M-30 merge. I locally added a unit ...
7 years, 4 months ago (2013-08-21 17:28:04 UTC) #1
sky
https://codereview.chromium.org/23245012/diff/3001/ui/views/controls/tree/tree_view.cc File ui/views/controls/tree/tree_view.cc (right): https://codereview.chromium.org/23245012/diff/3001/ui/views/controls/tree/tree_view.cc#newcode604 ui/views/controls/tree/tree_view.cc:604: GetInputMethod()->OnFocus(); Having to put this in each override is ...
7 years, 4 months ago (2013-08-21 21:57:10 UTC) #2
msw
Please take another look; thanks! https://codereview.chromium.org/23245012/diff/3001/ui/views/controls/tree/tree_view.cc File ui/views/controls/tree/tree_view.cc (right): https://codereview.chromium.org/23245012/diff/3001/ui/views/controls/tree/tree_view.cc#newcode604 ui/views/controls/tree/tree_view.cc:604: GetInputMethod()->OnFocus(); On 2013/08/21 21:57:11, ...
7 years, 4 months ago (2013-08-21 22:57:19 UTC) #3
sky
https://codereview.chromium.org/23245012/diff/13001/ui/views/controls/tree/tree_view.cc File ui/views/controls/tree/tree_view.cc (left): https://codereview.chromium.org/23245012/diff/13001/ui/views/controls/tree/tree_view.cc#oldcode606 ui/views/controls/tree/tree_view.cc:606: GetInputMethod()->OnCaretBoundsChanged(this); I'm pretty sure I found that if I ...
7 years, 4 months ago (2013-08-21 23:35:29 UTC) #4
msw
https://codereview.chromium.org/23245012/diff/13001/ui/views/controls/tree/tree_view.cc File ui/views/controls/tree/tree_view.cc (left): https://codereview.chromium.org/23245012/diff/13001/ui/views/controls/tree/tree_view.cc#oldcode606 ui/views/controls/tree/tree_view.cc:606: GetInputMethod()->OnCaretBoundsChanged(this); On 2013/08/21 23:35:29, sky wrote: > I'm pretty ...
7 years, 4 months ago (2013-08-22 18:07:10 UTC) #5
msw
Actually, the documentation for InputMethod::On[Focus|Blur] says: "// Called when the top-level system window gets keyboard ...
7 years, 4 months ago (2013-08-22 18:23:20 UTC) #6
Yohei Yukawa
On 2013/08/22 18:23:20, msw wrote: > Actually, the documentation for InputMethod::On[Focus|Blur] says: > "// Called ...
7 years, 4 months ago (2013-08-23 03:06:52 UTC) #7
msw
I've made significant additional changes that seem much more correct. Scott and Nonaka (or another ...
7 years, 4 months ago (2013-08-25 00:53:54 UTC) #8
Seigo Nonaka
lgtm lgtm! Thank you for your cleaning up! We are probably also able to remove ...
7 years, 3 months ago (2013-08-26 15:01:03 UTC) #9
sky
Nice! LGTM https://codereview.chromium.org/23245012/diff/72001/ui/views/widget/native_widget_aura.cc File ui/views/widget/native_widget_aura.cc (right): https://codereview.chromium.org/23245012/diff/72001/ui/views/widget/native_widget_aura.cc#newcode893 ui/views/widget/native_widget_aura.cc:893: if (destroying_) { nit: no {}
7 years, 3 months ago (2013-08-26 16:01:34 UTC) #10
msw
Landing; thanks! https://codereview.chromium.org/23245012/diff/72001/ui/views/widget/native_widget_aura.cc File ui/views/widget/native_widget_aura.cc (right): https://codereview.chromium.org/23245012/diff/72001/ui/views/widget/native_widget_aura.cc#newcode893 ui/views/widget/native_widget_aura.cc:893: if (destroying_) { On 2013/08/26 16:01:35, sky ...
7 years, 3 months ago (2013-08-26 16:28:33 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/msw@chromium.org/23245012/78001
7 years, 3 months ago (2013-08-26 16:28:55 UTC) #12
commit-bot: I haz the power
Change committed as 219673
7 years, 3 months ago (2013-08-27 03:19:35 UTC) #13
kochi
7 years, 3 months ago (2013-08-27 08:49:40 UTC) #14
Message was sent while issue was closed.
On 2013/08/27 03:19:35, I haz the power (commit-bot) wrote:
> Change committed as 219673

Thanks for the great cleanup!

Powered by Google App Engine
This is Rietveld 408576698