summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-01 22:14:41 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-01 22:14:41 +0000
commit1519c62ee99d28fed3c393e2b401a5ca3c1f3318 (patch)
tree4fad6d8b859221ca3e24711a580201feb821a717
parent3f4b5713bc11f093edc946f2edccb1a2c41acd79 (diff)
downloadchromium_src-1519c62ee99d28fed3c393e2b401a5ca3c1f3318.zip
chromium_src-1519c62ee99d28fed3c393e2b401a5ca3c1f3318.tar.gz
chromium_src-1519c62ee99d28fed3c393e2b401a5ca3c1f3318.tar.bz2
Mac: disable bookmark bar animation in toolbar-less windows.
(It's still a bit odd that some of these windows (e.g., Developer Tools) display a location bar. The displayed bar is also a strange size and not properly framed. These are separate bugs.) BUG=29070 TEST=Open a normal web page and then also a Developer Tools window (Cmd-Opt-I). Focus the window (and tab) with the normal web page. Press Shift-Cmd-B a few times. Make sure no animation occurs in the Developer Tools window. Also make sure the bookmark bar animations occur normally in normal browser windows. Review URL: http://codereview.chromium.org/453020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33484 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.mm6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm
index 73a8715..289cbed 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller.mm
@@ -458,6 +458,9 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
- (CGFloat)getDesiredToolbarHeightCompression {
// Some special cases....
+ if (!barIsEnabled_)
+ return 0;
+
if ([self isAnimationRunning]) {
// No toolbar compression when animating between hidden and showing, nor
// between showing and detached.
@@ -1337,7 +1340,8 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
lastVisualState_ = visualState_;
visualState_ = nextVisualState;
- if (animate) {
+ // Animate only if told to and if bar is enabled.
+ if (animate && barIsEnabled_) {
// Take care of any animation cases we know how to handle.
// We know how to handle hidden <-> normal, normal <-> detached....