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

Issue 1477253002: Use a single views::MenuConfig instance for each platform (Closed)

Created:
5 years ago by tapted
Modified:
5 years ago
Reviewers:
sky, Evan Stade
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use a single views::MenuConfig instance for each platform Most noticeably, always use the GTK-style menu layout on Desktop Linux. Previously, the MenuConfig used by a particular MenuItemView could be affected by that View's Widget's GetNativeTheme(). This once allowed a menu to decide whether to use a ChromeOS-style menu or a native Desktop-style menu config on the same platform. But that's no longer needed, and makes trouble with the "Classic Theme" in Desktop Linux. (e.g. because menus are not always in a Widget when they are configured, so the native theme is hard to determine.) Using a single instance simplifies things and fixes a regression where the Ash-style was being used on Desktop Linux, resulting in menus without a border and unexpectedly large item padding. Regression due to the combination of r344651, r345479, and r360168. Note this means --open-ash on Desktop Linux, and Metro mode on Windows, will use non-Ash menus. See screenshots at http://crbug.com/544550#c13 BUG=415953, 544550 Committed: https://crrev.com/5d23f8c18f1d9fbf1655ece40b31d59dea443c60 Cr-Commit-Position: refs/heads/master@{#363924} Committed: https://crrev.com/b8fc4b06aafee080c1df6766ac4a4b2528895f39 Cr-Commit-Position: refs/heads/master@{#364577}

Patch Set 1 #

Patch Set 2 : nit includes #

Total comments: 7

Patch Set 3 : respond to comments #

Patch Set 4 : zap theme dependency #

Patch Set 5 : Fix compile (windows still broken because "stuff" now unused) #

Patch Set 6 : Simplify more things #

Total comments: 4

Patch Set 7 : remove helper #

Patch Set 8 : Rebase: r364427 and r363995 #

Patch Set 9 : Add menu_config_android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -219 lines) Patch
M chrome/browser/ui/views/content_setting_bubble_contents.h View 1 2 3 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/ui/views/content_setting_bubble_contents.cc View 1 2 3 3 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/toolbar/app_menu.cc View 1 2 3 4 5 4 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M ui/views/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/combobox/combobox.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ui/views/controls/menu/menu_config.h View 1 2 3 2 chunks +3 lines, -10 lines 0 comments Download
M ui/views/controls/menu/menu_config.cc View 1 2 3 2 chunks +9 lines, -3 lines 0 comments Download
A ui/views/controls/menu/menu_config_android.cc View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_config_aura.cc View 1 2 3 1 chunk +0 lines, -64 lines 0 comments Download
A + ui/views/controls/menu/menu_config_chromeos.cc View 1 2 3 2 chunks +2 lines, -29 lines 0 comments Download
A ui/views/controls/menu/menu_config_linux.cc View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M ui/views/controls/menu/menu_config_mac.mm View 1 2 3 2 chunks +1 line, -12 lines 0 comments Download
M ui/views/controls/menu/menu_config_win.cc View 1 2 3 3 chunks +1 line, -22 lines 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download
M ui/views/controls/menu/menu_host.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/menu/menu_item_view.h View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M ui/views/controls/menu/menu_item_view.cc View 1 2 3 4 5 6 15 chunks +23 lines, -24 lines 0 comments Download
M ui/views/controls/menu/menu_scroll_view_container.cc View 1 2 3 4 5 4 chunks +5 lines, -7 lines 0 comments Download
M ui/views/controls/menu/menu_separator.h View 1 2 3 4 5 2 chunks +1 line, -6 lines 0 comments Download
M ui/views/controls/menu/menu_separator_views.cc View 1 2 3 4 5 3 chunks +2 lines, -3 lines 0 comments Download
M ui/views/controls/menu/submenu_view.cc View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 5 chunks +8 lines, -3 lines 0 comments Download

Messages

Total messages: 37 (16 generated)
tapted
Hi sky and Evan, please take a look
5 years ago (2015-11-27 03:16:24 UTC) #3
sky
https://codereview.chromium.org/1477253002/diff/20001/ui/views/controls/menu/menu_config_aura.cc File ui/views/controls/menu/menu_config_aura.cc (right): https://codereview.chromium.org/1477253002/diff/20001/ui/views/controls/menu/menu_config_aura.cc#newcode42 ui/views/controls/menu/menu_config_aura.cc:42: corner_radius = 2; Won't this change effect windows too?
5 years ago (2015-11-30 16:54:33 UTC) #4
Evan Stade
based on the outcome of the email thread, it seems like we should be good ...
5 years ago (2015-11-30 18:44:34 UTC) #5
tapted
https://codereview.chromium.org/1477253002/diff/20001/ui/views/controls/menu/menu_config_aura.cc File ui/views/controls/menu/menu_config_aura.cc (right): https://codereview.chromium.org/1477253002/diff/20001/ui/views/controls/menu/menu_config_aura.cc#newcode17 ui/views/controls/menu/menu_config_aura.cc:17: // On Desktop Linux, always use the GTK config ...
5 years ago (2015-12-01 07:35:09 UTC) #7
Evan Stade
https://codereview.chromium.org/1477253002/diff/20001/ui/views/controls/menu/menu_config_aura.cc File ui/views/controls/menu/menu_config_aura.cc (right): https://codereview.chromium.org/1477253002/diff/20001/ui/views/controls/menu/menu_config_aura.cc#newcode26 ui/views/controls/menu/menu_config_aura.cc:26: void MenuConfig::InitAura(const ui::NativeTheme* theme) { On 2015/12/01 07:35:09, tapted ...
5 years ago (2015-12-01 18:07:50 UTC) #8
tapted
On 2015/12/01 18:07:50, Evan Stade wrote: > https://codereview.chromium.org/1477253002/diff/20001/ui/views/controls/menu/menu_config_aura.cc > File ui/views/controls/menu/menu_config_aura.cc (right): > > https://codereview.chromium.org/1477253002/diff/20001/ui/views/controls/menu/menu_config_aura.cc#newcode26 ...
5 years ago (2015-12-07 00:03:45 UTC) #10
Evan Stade
excellent. Scott is the owner here but from my perspective this lgtm https://codereview.chromium.org/1477253002/diff/120001/ui/views/controls/menu/menu_config.cc File ui/views/controls/menu/menu_config.cc ...
5 years ago (2015-12-07 19:51:42 UTC) #12
sky
LGTM
5 years ago (2015-12-07 20:16:14 UTC) #13
tapted
https://codereview.chromium.org/1477253002/diff/120001/ui/views/controls/menu/menu_config.cc File ui/views/controls/menu/menu_config.cc (right): https://codereview.chromium.org/1477253002/diff/120001/ui/views/controls/menu/menu_config.cc#newcode13 ui/views/controls/menu/menu_config.cc:13: menu_vertical_border_size(3), On 2015/12/07 19:51:42, Evan Stade wrote: > I ...
5 years ago (2015-12-08 11:49:23 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477253002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477253002/140001
5 years ago (2015-12-08 11:49:43 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/152213)
5 years ago (2015-12-08 12:21:23 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477253002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477253002/140001
5 years ago (2015-12-08 20:07:31 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:140001)
5 years ago (2015-12-09 02:25:12 UTC) #23
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/5d23f8c18f1d9fbf1655ece40b31d59dea443c60 Cr-Commit-Position: refs/heads/master@{#363924}
5 years ago (2015-12-09 02:26:06 UTC) #25
johnme
A revert of this CL (patchset #7 id:140001) has been created in https://codereview.chromium.org/1514693006/ by johnme@chromium.org. ...
5 years ago (2015-12-10 15:08:45 UTC) #26
tapted
On 2015/12/10 15:08:45, johnme wrote: > A revert of this CL (patchset #7 id:140001) has ...
5 years ago (2015-12-11 00:16:36 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477253002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477253002/180001
5 years ago (2015-12-11 00:20:01 UTC) #31
Evan Stade
not an owner but lgtm again
5 years ago (2015-12-11 00:22:03 UTC) #32
sky
SLGTM
5 years ago (2015-12-11 00:41:14 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:180001)
5 years ago (2015-12-11 01:51:58 UTC) #35
commit-bot: I haz the power
5 years ago (2015-12-11 01:52:42 UTC) #37
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/b8fc4b06aafee080c1df6766ac4a4b2528895f39
Cr-Commit-Position: refs/heads/master@{#364577}

Powered by Google App Engine
This is Rietveld 408576698