summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-19 01:00:20 +0000
committerisherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-19 01:00:20 +0000
commitf9722575da516bc5b88e5cbfb57b7c2782260429 (patch)
treeeece692e0ebd96602aecbe3569634391c85bbd76
parent2f5a9a85c18ab34db218d3704a232f6147392eff (diff)
downloadchromium_src-f9722575da516bc5b88e5cbfb57b7c2782260429.zip
chromium_src-f9722575da516bc5b88e5cbfb57b7c2782260429.tar.gz
chromium_src-f9722575da516bc5b88e5cbfb57b7c2782260429.tar.bz2
Account for bookmark bar height when launching Instant from NTP
BUG=73490 TEST=none Review URL: http://codereview.chromium.org/6672072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78787 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 55e5604..fee79e5 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -1836,6 +1836,12 @@ willAnimateFromState:(bookmarks::VisualState)oldState
NSPoint originInScreenCoords =
[[view window] convertBaseToScreen:frame.origin];
frame.origin = originInScreenCoords;
+
+ // Account for the bookmark bar height if it is currently in the detached
+ // state on the new tab page.
+ if ([bookmarkBarController_ isInState:(bookmarks::kDetachedState)])
+ frame.size.height += [[bookmarkBarController_ view] bounds].size.height;
+
return frame;
}