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. |