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

Issue 141523005: Combobox: Rename styles to STYLE_NORMAL and STYLE_ACTION and modify behaviors (Closed)

Created:
6 years, 11 months ago by hajimehoshi
Modified:
6 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina, kenjibaheux
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Combobox: Rename styles to STYLE_NORMAL and STYLE_ACTION and modify behaviors This patch makes the combobox with STYLE_ACTION have the width same as the first item, whose index is 0. When SYTLE_ACTION is used, the selected index remain 0 always. Besides, keyboard events don't change the index. Only the click event changes the index, and the index will be set 0 back after handling the event. BUG=333210 TEST=views_unittests --gtest_filter=ComboboxTest.* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=248931

Patch Set 1 #

Total comments: 2

Patch Set 2 : sky's review #

Patch Set 3 : Added comment and test #

Total comments: 4

Patch Set 4 : Fix around selected_index_ #

Total comments: 6

Patch Set 5 : sky's review #

Total comments: 2

Patch Set 6 : (rebasing) #

Patch Set 7 : sky's review #

Total comments: 5

Patch Set 8 : Rename OnSelectedChanged -> OnPerformAction #

Total comments: 10

Patch Set 9 : sky's review #

Patch Set 10 : . #

Patch Set 11 : Bug fix for Windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+242 lines, -134 lines) Patch
M chrome/browser/chromeos/options/vpn_config_view.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/options/vpn_config_view.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/options/wifi_config_view.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/options/wifi_config_view.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/autofill/autofill_dialog_views.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/autofill/autofill_dialog_views.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/translate/translate_bubble_view.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/translate/translate_bubble_view.cc View 1 2 3 4 5 6 7 3 chunks +20 lines, -28 lines 0 comments Download
M chrome/browser/ui/views/translate/translate_bubble_view_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/controls/combobox/combobox.h View 1 2 3 4 5 6 7 6 chunks +18 lines, -7 lines 0 comments Download
M ui/views/controls/combobox/combobox.cc View 1 2 3 4 5 6 7 8 18 chunks +48 lines, -36 lines 0 comments Download
M ui/views/controls/combobox/combobox_listener.h View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -7 lines 0 comments Download
M ui/views/controls/combobox/combobox_unittest.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +129 lines, -38 lines 0 comments Download
M ui/views/examples/combobox_example.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M ui/views/examples/combobox_example.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M ui/views/examples/examples_window.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M ui/views/examples/text_example.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M ui/views/examples/text_example.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 39 (0 generated)
hajimehoshi
Can you take a look? Thank you in advance. (I said I would add a ...
6 years, 11 months ago (2014-01-17 11:23:01 UTC) #1
sky
https://codereview.chromium.org/141523005/diff/1/ui/views/controls/combobox/combobox.h File ui/views/controls/combobox/combobox.h (right): https://codereview.chromium.org/141523005/diff/1/ui/views/controls/combobox/combobox.h#newcode164 ui/views/controls/combobox/combobox.h:164: // STYLE_NOTIFY_ON_CLICK, this is ignored. AFAIK you are the ...
6 years, 11 months ago (2014-01-17 16:01:54 UTC) #2
hajimehoshi
Thanks! PTAL https://codereview.chromium.org/141523005/diff/1/ui/views/controls/combobox/combobox.h File ui/views/controls/combobox/combobox.h (right): https://codereview.chromium.org/141523005/diff/1/ui/views/controls/combobox/combobox.h#newcode164 ui/views/controls/combobox/combobox.h:164: // STYLE_NOTIFY_ON_CLICK, this is ignored. On 2014/01/17 ...
6 years, 11 months ago (2014-01-20 03:06:14 UTC) #3
sky
Don't you need to update the docs? And how about test coverage?
6 years, 11 months ago (2014-01-21 15:47:24 UTC) #4
hajimehoshi
Sure. PTAL
6 years, 11 months ago (2014-01-22 05:00:00 UTC) #5
sky
https://codereview.chromium.org/141523005/diff/110001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/110001/ui/views/controls/combobox/combobox.cc#newcode592 ui/views/controls/combobox/combobox.cc:592: if (style_ != STYLE_NOTIFY_ON_CLICK || i == 0) I ...
6 years, 11 months ago (2014-01-22 16:04:07 UTC) #6
hajimehoshi
Please read crbug/333210. The UI team wants to change the behavior of a combobox with ...
6 years, 11 months ago (2014-01-22 16:22:47 UTC) #7
sky
Ok, please update description for the style indicating that it makes the width only that ...
6 years, 11 months ago (2014-01-22 20:15:36 UTC) #8
sky
https://codereview.chromium.org/141523005/diff/110001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/110001/ui/views/controls/combobox/combobox.cc#newcode592 ui/views/controls/combobox/combobox.cc:592: if (style_ != STYLE_NOTIFY_ON_CLICK || i == 0) On ...
6 years, 11 months ago (2014-01-23 01:11:22 UTC) #9
hajimehoshi
https://codereview.chromium.org/141523005/diff/110001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/110001/ui/views/controls/combobox/combobox.cc#newcode592 ui/views/controls/combobox/combobox.cc:592: if (style_ != STYLE_NOTIFY_ON_CLICK || i == 0) On ...
6 years, 11 months ago (2014-01-23 02:16:32 UTC) #10
hajimehoshi
On 2014/01/23 02:16:32, hajimehoshi wrote: > https://codereview.chromium.org/141523005/diff/110001/ui/views/controls/combobox/combobox.cc > File ui/views/controls/combobox/combobox.cc (right): > > https://codereview.chromium.org/141523005/diff/110001/ui/views/controls/combobox/combobox.cc#newcode592 > ...
6 years, 11 months ago (2014-01-23 04:47:37 UTC) #11
sky
https://codereview.chromium.org/141523005/diff/210001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/210001/ui/views/controls/combobox/combobox.cc#newcode592 ui/views/controls/combobox/combobox.cc:592: if (style_ != STYLE_NOTIFY_ON_CLICK || i == 0) Based ...
6 years, 11 months ago (2014-01-23 15:40:25 UTC) #12
hajimehoshi
Thank you! To prevent the keyboard events from changing the item, I modified OnKeyPressed, but ...
6 years, 11 months ago (2014-01-24 04:10:55 UTC) #13
sky
LGTM
6 years, 11 months ago (2014-01-24 16:43:09 UTC) #14
sky
https://codereview.chromium.org/141523005/diff/290002/ui/views/controls/combobox/combobox.h File ui/views/controls/combobox/combobox.h (right): https://codereview.chromium.org/141523005/diff/290002/ui/views/controls/combobox/combobox.h#newcode39 ui/views/controls/combobox/combobox.h:39: // Combobox has two distinct parts, the drop down ...
6 years, 11 months ago (2014-01-24 17:05:39 UTC) #15
hajimehoshi
https://codereview.chromium.org/141523005/diff/290002/ui/views/controls/combobox/combobox.h File ui/views/controls/combobox/combobox.h (right): https://codereview.chromium.org/141523005/diff/290002/ui/views/controls/combobox/combobox.h#newcode39 ui/views/controls/combobox/combobox.h:39: // Combobox has two distinct parts, the drop down ...
6 years, 11 months ago (2014-01-24 18:07:09 UTC) #16
hajimehoshi
On 2014/01/24 18:07:09, hajimehoshi wrote: > https://codereview.chromium.org/141523005/diff/290002/ui/views/controls/combobox/combobox.h > File ui/views/controls/combobox/combobox.h (right): > > https://codereview.chromium.org/141523005/diff/290002/ui/views/controls/combobox/combobox.h#newcode39 > ...
6 years, 10 months ago (2014-01-28 04:40:14 UTC) #17
sky
https://codereview.chromium.org/141523005/diff/630001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/630001/ui/views/controls/combobox/combobox.cc#newcode370 ui/views/controls/combobox/combobox.cc:370: if (style_ == STYLE_ACTION) Isn't the selectionchanged enough here? ...
6 years, 10 months ago (2014-01-28 14:57:13 UTC) #18
hajimehoshi
https://codereview.chromium.org/141523005/diff/630001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/630001/ui/views/controls/combobox/combobox.cc#newcode370 ui/views/controls/combobox/combobox.cc:370: if (style_ == STYLE_ACTION) On 2014/01/28 14:57:14, sky wrote: ...
6 years, 10 months ago (2014-01-29 05:28:37 UTC) #19
sky
https://codereview.chromium.org/141523005/diff/630001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/630001/ui/views/controls/combobox/combobox.cc#newcode370 ui/views/controls/combobox/combobox.cc:370: if (style_ == STYLE_ACTION) On 2014/01/29 05:28:38, hajimehoshi wrote: ...
6 years, 10 months ago (2014-01-29 17:16:56 UTC) #20
hajimehoshi
https://codereview.chromium.org/141523005/diff/630001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/630001/ui/views/controls/combobox/combobox.cc#newcode370 ui/views/controls/combobox/combobox.cc:370: if (style_ == STYLE_ACTION) On 2014/01/29 17:16:56, sky wrote: ...
6 years, 10 months ago (2014-01-29 21:32:28 UTC) #21
sky
That's why I suggested renaming SelectionChanged. -Scott On Wed, Jan 29, 2014 at 1:32 PM, ...
6 years, 10 months ago (2014-01-29 21:34:53 UTC) #22
hajimehoshi
+kenjibaheux (CC) > That's why I suggested renaming SelectionChanged. Got it, thanks.
6 years, 10 months ago (2014-01-30 03:10:23 UTC) #23
hajimehoshi
PTAL
6 years, 10 months ago (2014-01-30 08:43:30 UTC) #24
sky
https://codereview.chromium.org/141523005/diff/690001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/690001/ui/views/controls/combobox/combobox.cc#newcode495 ui/views/controls/combobox/combobox.cc:495: if (style_ != STYLE_ACTION) { nit: combine with if ...
6 years, 10 months ago (2014-02-03 16:58:18 UTC) #25
hajimehoshi
Thank you! https://codereview.chromium.org/141523005/diff/690001/ui/views/controls/combobox/combobox.cc File ui/views/controls/combobox/combobox.cc (right): https://codereview.chromium.org/141523005/diff/690001/ui/views/controls/combobox/combobox.cc#newcode495 ui/views/controls/combobox/combobox.cc:495: if (style_ != STYLE_ACTION) { On 2014/02/03 ...
6 years, 10 months ago (2014-02-04 04:06:32 UTC) #26
sky
LGTM
6 years, 10 months ago (2014-02-04 15:02:32 UTC) #27
hajimehoshi
The CQ bit was checked by hajimehoshi@chromium.org
6 years, 10 months ago (2014-02-04 15:23:27 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hajimehoshi@chromium.org/141523005/750001
6 years, 10 months ago (2014-02-04 15:23:54 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-04 15:48:12 UTC) #30
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=223237
6 years, 10 months ago (2014-02-04 15:48:12 UTC) #31
skia-commit-bot
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-02-04 15:48:16 UTC) #32
hajimehoshi
The CQ bit was checked by hajimehoshi@chromium.org
6 years, 10 months ago (2014-02-05 02:23:52 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hajimehoshi@chromium.org/141523005/1070001
6 years, 10 months ago (2014-02-05 03:46:20 UTC) #34
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-05 06:14:17 UTC) #35
commit-bot: I haz the power
Retried try job too often on win_x64_rel for step(s) base_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_x64_rel&number=73078
6 years, 10 months ago (2014-02-05 06:14:17 UTC) #36
hajimehoshi
The CQ bit was checked by hajimehoshi@chromium.org
6 years, 10 months ago (2014-02-05 06:38:52 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hajimehoshi@chromium.org/141523005/1380001
6 years, 10 months ago (2014-02-05 06:44:15 UTC) #38
commit-bot: I haz the power
6 years, 10 months ago (2014-02-05 08:50:15 UTC) #39
Message was sent while issue was closed.
Change committed as 248931

Powered by Google App Engine
This is Rietveld 408576698