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

Unified Diff: chrome/browser/ui/cocoa/fast_resize_view.mm

Issue 11876036: Alternate NTP: Don't hide bookmark bar on instant (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/fast_resize_view.mm
diff --git a/chrome/browser/ui/cocoa/fast_resize_view.mm b/chrome/browser/ui/cocoa/fast_resize_view.mm
index 8755bc49a8ec056779030f8d525cd675fd78d1c4..7d8a7636c054480b63e35549d727f43085565f7c 100644
--- a/chrome/browser/ui/cocoa/fast_resize_view.mm
+++ b/chrome/browser/ui/cocoa/fast_resize_view.mm
@@ -15,6 +15,9 @@
@end
@implementation FastResizeView
+
+@synthesize contentOffset = contentOffset_;
+
- (void)setFastResizeMode:(BOOL)fastResizeMode {
fastResizeMode_ = fastResizeMode;
@@ -31,12 +34,17 @@
// If we are in fast resize mode, our subviews may not completely cover our
// bounds, so we fill with white. If we are not in fast resize mode, we do
// not need to draw anything.
- if (fastResizeMode_) {
- [[NSColor whiteColor] set];
- NSRectFill(dirtyRect);
- }
-}
+ if (!fastResizeMode_)
+ return;
+ // Don't draw on the non-content area.
+ NSRect clipRect = [self bounds];
+ clipRect.size.height -= contentOffset_;
+ NSRectClip(clipRect);
+
+ [[NSColor whiteColor] set];
+ NSRectFill(dirtyRect);
+}
@end

Powered by Google App Engine
This is Rietveld 408576698