summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-16 00:10:43 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-16 00:10:43 +0000
commitb6386720972d9ac0fd5cfa5256e2f0fcacf71e4d (patch)
treea1820a4e36a38156bd378daa57219a4147893928
parent86b0c51cdf413e0ad66000aed3df7c76a320bd48 (diff)
downloadchromium_src-b6386720972d9ac0fd5cfa5256e2f0fcacf71e4d.zip
chromium_src-b6386720972d9ac0fd5cfa5256e2f0fcacf71e4d.tar.gz
chromium_src-b6386720972d9ac0fd5cfa5256e2f0fcacf71e4d.tar.bz2
Fix bug where bookmark bar wouldn't animate away but would rather snap closed (new frames)
B=1031854 Review URL: http://codereview.chromium.org/3052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2251 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/frame/browser_view2.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/views/frame/browser_view2.cc b/chrome/browser/views/frame/browser_view2.cc
index c0e067b..cd34924 100644
--- a/chrome/browser/views/frame/browser_view2.cc
+++ b/chrome/browser/views/frame/browser_view2.cc
@@ -950,10 +950,12 @@ void BrowserView2::LayoutStatusBubble(int top) {
bool BrowserView2::MaybeShowBookmarkBar(TabContents* contents) {
ChromeViews::View* new_bookmark_bar_view = NULL;
- if (SupportsWindowFeature(FEATURE_BOOKMARKBAR) && contents &&
- (contents->IsBookmarkBarAlwaysVisible() ||
- show_bookmark_bar_pref_.GetValue())) {
+ if (SupportsWindowFeature(FEATURE_BOOKMARKBAR) && contents) {
new_bookmark_bar_view = GetBookmarkBarView();
+ CSize ps;
+ new_bookmark_bar_view->GetPreferredSize(&ps);
+ if (!show_bookmark_bar_pref_.GetValue() && ps.cy == 0)
+ new_bookmark_bar_view = NULL;
}
return UpdateChildViewAndLayout(new_bookmark_bar_view,
&active_bookmark_bar_);