Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 14689007: Instant Extended: Move omnibox dropdown by 2 pixels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #import "base/memory/scoped_nsobject.h" 10 #import "base/memory/scoped_nsobject.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 contentAreaTop = maxY; 253 contentAreaTop = maxY;
254 CGFloat floatingBarHeight = 254 CGFloat floatingBarHeight =
255 NSHeight(floatingBarBackingRect) * [self floatingBarShownFraction]; 255 NSHeight(floatingBarBackingRect) * [self floatingBarShownFraction];
256 // When an instant overlay is shown this is the amount it needs to be pushed 256 // When an instant overlay is shown this is the amount it needs to be pushed
257 // down so that it doesn't get covered by the floating toolbar. 257 // down so that it doesn't get covered by the floating toolbar.
258 toolbarToWebContentsOffset_ = 258 toolbarToWebContentsOffset_ =
259 floatingBarHeight - (NSMaxY(contentBounds) - maxY); 259 floatingBarHeight - (NSMaxY(contentBounds) - maxY);
260 } else { 260 } else {
261 // The tabContentArea view starts below the omnibox. 261 // The tabContentArea view starts below the omnibox.
262 CGFloat minToolbarHeight = 0; 262 CGFloat minToolbarHeight = 0;
263 if ([self hasToolbar]) { 263 if ([self hasToolbar])
264 minToolbarHeight = [toolbarController_ 264 minToolbarHeight = [toolbarController_ desiredHeightForCompression:0] - 1;
Nico 2013/05/16 21:50:15 why -1?
sail 2013/05/16 22:09:58 This is for the toolbar separator. Added a comment
265 desiredHeightForCompression:bookmarks::kBookmarkBarOverlap];
266 }
267 contentAreaTop = toolbarTopY - minToolbarHeight; 265 contentAreaTop = toolbarTopY - minToolbarHeight;
268 // This is the space between the bottom of the omnibox and the bottom of the 266 // This is the space between the bottom of the omnibox and the bottom of the
269 // last bar (info bar or bookmark bar or toolbar). This is used to push the 267 // last bar (info bar or bookmark bar or toolbar). This is used to push the
270 // tab web content down when no instant overlay is shown. 268 // tab web content down when no instant overlay is shown.
271 toolbarToWebContentsOffset_ = contentAreaTop - maxY; 269 toolbarToWebContentsOffset_ = contentAreaTop - maxY;
272 } 270 }
273 [self updateContentOffsets]; 271 [self updateContentOffsets];
274 272
275 NSRect contentAreaRect = NSMakeRect(minX, minY, width, contentAreaTop - minY); 273 NSRect contentAreaRect = NSMakeRect(minX, minY, width, contentAreaTop - minY);
276 [self layoutTabContentArea:contentAreaRect]; 274 [self layoutTabContentArea:contentAreaRect];
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 relativeTo:[bookmarkBarController_ view]]; 988 relativeTo:[bookmarkBarController_ view]];
991 } else { 989 } else {
992 [contentView cr_ensureSubview:floatingBarBackingView_ 990 [contentView cr_ensureSubview:floatingBarBackingView_
993 isPositioned:NSWindowBelow 991 isPositioned:NSWindowBelow
994 relativeTo:[bookmarkBarController_ view]]; 992 relativeTo:[bookmarkBarController_ view]];
995 } 993 }
996 } 994 }
997 } 995 }
998 996
999 @end // @implementation BrowserWindowController(Private) 997 @end // @implementation BrowserWindowController(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698