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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm

Issue 319703006: [Cocoa] Clean-up: Update comments regarding drawRect override in TabContentsContainerView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
diff --git a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
index 31ed285b3952c22442d71df14d6faab25ef79e33..92707a854eb2d24c3cf8fa9af135ed61b76588cd 100644
--- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -118,24 +118,12 @@ class FullscreenObserver : public WebContentsObserver {
if (theme)
bgColor = theme->GetNSColor(ThemeProperties::COLOR_NTP_BACKGROUND);
if (!bgColor)
- bgColor = [[self window] backgroundColor];
+ bgColor = [NSColor whiteColor];
miu 2014/06/06 01:09:10 The decision (in https://codereview.chromium.org/2
const float kDarknessFraction = 0.80f;
return [bgColor blendedColorWithFraction:kDarknessFraction
ofColor:[NSColor blackColor]];
}
-// Override -drawRect to fill the view with a solid color outside of the
-// subview's frame.
-- (void)drawRect:(NSRect)dirtyRect {
- NSView* const contentsView =
- [[self subviews] count] > 0 ? [[self subviews] objectAtIndex:0] : nil;
- if (!contentsView || !NSContainsRect([contentsView frame], dirtyRect)) {
- [[self computeBackgroundColor] setFill];
- NSRectFill(dirtyRect);
- }
- [super drawRect:dirtyRect];
-}
-
// Override auto-resizing logic to query the delegate for the exact frame to
// use for the contents view.
- (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
@@ -233,8 +221,6 @@ class FullscreenObserver : public WebContentsObserver {
[contentsNativeView setAutoresizingMask:NSViewWidthSizable|
NSViewHeightSizable];
- // TODO(miu): The following can be removed once we use a CALayer in
- // TabContentsContainerView. http://crbug.com/354598
[contentsContainer setNeedsDisplay:YES];
miu 2014/06/06 01:09:10 I kept this call to setNeedsDisplay since this wil
// The rendering path with overlapping views disabled causes bugs when
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698