diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 21:29:23 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 21:29:23 +0000 |
commit | 9ec8a8ce8b2cb0c29387ddccce7fb0fb356e0b2c (patch) | |
tree | ad3c06b773e83f28e80c652d7003d357a21aa3bc /chrome/browser/cocoa/find_bar_cocoa_controller.mm | |
parent | 991cf3c582cf9c8c4ee877349e1cd35ac2b838e9 (diff) | |
download | chromium_src-9ec8a8ce8b2cb0c29387ddccce7fb0fb356e0b2c.zip chromium_src-9ec8a8ce8b2cb0c29387ddccce7fb0fb356e0b2c.tar.gz chromium_src-9ec8a8ce8b2cb0c29387ddccce7fb0fb356e0b2c.tar.bz2 |
Reverting 22517.
Review URL: http://codereview.chromium.org/165001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/find_bar_cocoa_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/find_bar_cocoa_controller.mm | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/chrome/browser/cocoa/find_bar_cocoa_controller.mm b/chrome/browser/cocoa/find_bar_cocoa_controller.mm index 15b53d6..f28fd56 100644 --- a/chrome/browser/cocoa/find_bar_cocoa_controller.mm +++ b/chrome/browser/cocoa/find_bar_cocoa_controller.mm @@ -52,23 +52,21 @@ true, false); } -// Positions the find bar view in the correct location based on the current -// state of the window. The findbar is always positioned one pixel above the -// infobar container. Note that we are using the infobar container location as -// a proxy for the toolbar location, but we cannot position based on the toolbar -// because the toolbar is not always present (for example in fullscreen -// windows). -- (void)positionFindBarView:(NSView*)infoBarContainerView { +// Positions the find bar view in the correct location based on the +// current state of the window. Currently only the visibility of the +// bookmark bar can affect the find bar's position. +- (void)positionFindBarView:(NSView*)contentArea { static const int kRightEdgeOffset = 25; NSView* findBarView = [self view]; int findBarHeight = NSHeight([findBarView frame]); int findBarWidth = NSWidth([findBarView frame]); - // Start by computing the upper right corner of the infobar container, then - // move left by a constant offset and up one pixel. This gives us the upper - // right corner of our bounding box. We move up one pixel to overlap with the - // toolbar area, which allows us to cover up the toolbar's border, if present. - NSRect windowRect = [infoBarContainerView frame]; + // Start by computing the upper right corner of the tab content + // area, then move left by a constant offset and up one pixel. This + // gives us the upper right corner of our bounding box. We move up + // one pixel to overlap with the toolbar area, which allows us to + // cover up the toolbar's border. + NSRect windowRect = [contentArea frame]; int max_x = NSMaxX(windowRect) - kRightEdgeOffset; int max_y = NSMaxY(windowRect) + 1; |