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

Unified Diff: chrome/browser/ui/views/toolbar/browser_actions_container.cc

Issue 492503004: Fix BrowserActionContainer chevron visibility regression (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/browser_actions_container_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/browser_actions_container.cc
diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.cc b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
index 032862a6ec7fd861f4a607414ed853dce5b947a9..eeb59741859ea56de6f1912b5f0dfeaebd548391 100644
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.cc
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.cc
@@ -318,7 +318,10 @@ void BrowserActionsContainer::RemoveObserver(
}
gfx::Size BrowserActionsContainer::GetPreferredSize() const {
- size_t icon_count = GetIconCount();
+ // Note: We can't use GetIconCount() for the main bar, since we may also
+ // have to include items that are in the chevron's overflow.
+ size_t icon_count =
+ in_overflow_mode() ? GetIconCount() : browser_action_views_.size();
// If there are no actions to show, or we are in overflow mode and the main
// container is already showing them all, then no further work is required.
« no previous file with comments | « no previous file | chrome/browser/ui/views/toolbar/browser_actions_container_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698