Index: chrome/browser/ui/cocoa/browser_window_controller.mm |
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm |
index bd550e350d05c759184857c1c34c19cd70d1a987..6316f327c2f7222e162350187b2e7a8052204caf 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm |
@@ -1957,6 +1957,12 @@ using content::WebContents; |
[toolbarController_ setDividerOpacity:[self toolbarDividerOpacity]]; |
[self adjustToolbarAndBookmarkBarForCompression: |
[controller getDesiredToolbarHeightCompression]]; |
+ |
+ // Stretch the top infobar's arrow if the bookmark has been shown. |
+ NSInteger arrowHeight = [infoBarContainerController_ defaultArrowHeight]; |
+ if (newState == BookmarkBar::SHOW) |
+ arrowHeight += controller.view.frame.size.height; |
+ [infoBarContainerController_ setMaxTopArrowHeight:arrowHeight]; |
} |
// (Needed for |BookmarkBarControllerDelegate| protocol.) |
@@ -1966,6 +1972,12 @@ willAnimateFromState:(BookmarkBar::State)oldState |
[toolbarController_ setDividerOpacity:[self toolbarDividerOpacity]]; |
[self adjustToolbarAndBookmarkBarForCompression: |
[controller getDesiredToolbarHeightCompression]]; |
+ |
+ // Shorten the top infobar's arrow if the bookmark is going to be hidden |
+ // or detached. |
+ NSInteger arrowHeight = [infoBarContainerController_ defaultArrowHeight]; |
+ if (newState != BookmarkBar::SHOW) |
+ [infoBarContainerController_ setMaxTopArrowHeight:arrowHeight]; |
} |
// (Private/TestingAPI) |