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

Issue 1330423003: [Extensions Toolbar] Protect against crazy bounds (Closed)

Created:
5 years, 3 months ago by Devlin
Modified:
5 years, 3 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, tfarina, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions Toolbar] Protect against crazy bounds Address two issues: - The extensions toolbar can be bigger than the browser window. - The user could, potentially, have so many extensions that the overflow container makes the wrench menu expand ridiculously. Address the former by automatically overflowing any actions that won't fit on the main bar into the overflow menu (without setting it as the preferred size, so resizing the window returns to normal). Address the latter by giving the overflow item a maximum height of 416 pixels (enough for around 104 overflowed actions), and make it a scroll view on Views. Mac users will see it truncated. Note that this will affect <0.0002% of users (but we want to avoid a completely broken experience for anyone). BUG=530303 BUG=58915 Committed: https://crrev.com/ede728b9fff930b95b40e434f6f0c31244ef8b05 Cr-Commit-Position: refs/heads/master@{#349504}

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 24

Patch Set 3 : Peter's #

Total comments: 21

Patch Set 4 : #

Total comments: 12

Patch Set 5 : Final nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+242 lines, -67 lines) Patch
M chrome/browser/extensions/browser_action_test_util.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_action_test_util_mac.mm View 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm View 1 2 3 3 chunks +14 lines, -9 lines 0 comments Download
M chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.mm View 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_bar.h View 1 2 3 2 chunks +27 lines, -4 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_bar.cc View 1 2 2 chunks +18 lines, -4 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_bar_unittest.cc View 1 chunk +50 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_model.h View 1 2 3 4 3 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/wrench_menu_model.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/toolbar/browser_action_test_util_views.cc View 1 2 3 4 chunks +35 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/toolbar/browser_actions_container.cc View 1 2 3 4 chunks +17 lines, -20 lines 0 comments Download
M chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc View 1 2 3 4 5 chunks +25 lines, -11 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_view.cc View 1 2 3 1 chunk +14 lines, -4 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
Devlin
Peter and Avi, mind taking a look? Peter - c/b/ui/toolbar, c/b/ui/views Avi - c/b/ui/cocoa Cheers!
5 years, 3 months ago (2015-09-10 20:48:23 UTC) #2
Avi (use Gerrit)
lgtm https://codereview.chromium.org/1330423003/diff/1/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm File chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (right): https://codereview.chromium.org/1330423003/diff/1/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm#newcode670 chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm:670: // Button is fully in the container view, ...
5 years, 3 months ago (2015-09-10 20:58:56 UTC) #3
Devlin
https://codereview.chromium.org/1330423003/diff/1/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm File chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm (right): https://codereview.chromium.org/1330423003/diff/1/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm#newcode670 chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm:670: // Button is fully in the container view, and ...
5 years, 3 months ago (2015-09-11 16:46:15 UTC) #5
Devlin
Peter, friendly ping for c/b/ui/views and c/b/ui/toolbar?
5 years, 3 months ago (2015-09-14 18:41:03 UTC) #6
Peter Kasting
https://codereview.chromium.org/1330423003/diff/40001/chrome/browser/ui/toolbar/toolbar_actions_bar.cc File chrome/browser/ui/toolbar/toolbar_actions_bar.cc (right): https://codereview.chromium.org/1330423003/diff/40001/chrome/browser/ui/toolbar/toolbar_actions_bar.cc#newcode269 chrome/browser/ui/toolbar/toolbar_actions_bar.cc:269: main_bar_->GetEndIndexInBounds() : 0u; Nit: Don't add 'u' here unless ...
5 years, 3 months ago (2015-09-15 00:13:39 UTC) #7
Devlin
https://codereview.chromium.org/1330423003/diff/40001/chrome/browser/ui/toolbar/toolbar_actions_bar.cc File chrome/browser/ui/toolbar/toolbar_actions_bar.cc (right): https://codereview.chromium.org/1330423003/diff/40001/chrome/browser/ui/toolbar/toolbar_actions_bar.cc#newcode269 chrome/browser/ui/toolbar/toolbar_actions_bar.cc:269: main_bar_->GetEndIndexInBounds() : 0u; On 2015/09/15 00:13:38, Peter Kasting wrote: ...
5 years, 3 months ago (2015-09-15 18:22:39 UTC) #8
Peter Kasting
https://codereview.chromium.org/1330423003/diff/60001/chrome/browser/ui/toolbar/toolbar_actions_bar.h File chrome/browser/ui/toolbar/toolbar_actions_bar.h (right): https://codereview.chromium.org/1330423003/diff/60001/chrome/browser/ui/toolbar/toolbar_actions_bar.h#newcode117 chrome/browser/ui/toolbar/toolbar_actions_bar.h:117: // represents the underlying model of *all* windows) is ...
5 years, 3 months ago (2015-09-17 00:18:04 UTC) #9
Devlin
https://codereview.chromium.org/1330423003/diff/60001/chrome/browser/ui/toolbar/toolbar_actions_bar.h File chrome/browser/ui/toolbar/toolbar_actions_bar.h (right): https://codereview.chromium.org/1330423003/diff/60001/chrome/browser/ui/toolbar/toolbar_actions_bar.h#newcode117 chrome/browser/ui/toolbar/toolbar_actions_bar.h:117: // represents the underlying model of *all* windows) is ...
5 years, 3 months ago (2015-09-17 17:00:28 UTC) #10
Peter Kasting
LGTM https://codereview.chromium.org/1330423003/diff/60001/chrome/browser/ui/toolbar/toolbar_actions_bar.h File chrome/browser/ui/toolbar/toolbar_actions_bar.h (right): https://codereview.chromium.org/1330423003/diff/60001/chrome/browser/ui/toolbar/toolbar_actions_bar.h#newcode117 chrome/browser/ui/toolbar/toolbar_actions_bar.h:117: // represents the underlying model of *all* windows) ...
5 years, 3 months ago (2015-09-17 19:59:53 UTC) #11
Devlin
https://codereview.chromium.org/1330423003/diff/80001/chrome/browser/ui/toolbar/toolbar_actions_model.h File chrome/browser/ui/toolbar/toolbar_actions_model.h (right): https://codereview.chromium.org/1330423003/diff/80001/chrome/browser/ui/toolbar/toolbar_actions_model.h#newcode34 chrome/browser/ui/toolbar/toolbar_actions_model.h:34: // ToolbarActionsBar (see also that class for details). On ...
5 years, 3 months ago (2015-09-17 21:38:38 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1330423003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1330423003/120001
5 years, 3 months ago (2015-09-17 21:39:47 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:120001)
5 years, 3 months ago (2015-09-17 21:47:39 UTC) #17
commit-bot: I haz the power
5 years, 3 months ago (2015-09-17 21:48:37 UTC) #18
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ede728b9fff930b95b40e434f6f0c31244ef8b05
Cr-Commit-Position: refs/heads/master@{#349504}

Powered by Google App Engine
This is Rietveld 408576698