From 08d385de52a5a298266e4073a4e33a1f184c9b02 Mon Sep 17 00:00:00 2001 From: "shess@chromium.org" Date: Wed, 9 Jun 2010 17:48:30 +0000 Subject: [Mac] Remove dead underlayImage_ from GradientButtonCell. AFAICT was being used by the star button, which is now a page action. BUG=none TEST=none Review URL: http://codereview.chromium.org/2675003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49282 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/gradient_button_cell.mm | 31 +--------------------------- 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'chrome/browser/cocoa/gradient_button_cell.mm') diff --git a/chrome/browser/cocoa/gradient_button_cell.mm b/chrome/browser/cocoa/gradient_button_cell.mm index ac71474..15110e8 100644 --- a/chrome/browser/cocoa/gradient_button_cell.mm +++ b/chrome/browser/cocoa/gradient_button_cell.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,8 +14,6 @@ @interface GradientButtonCell (Private) - (void)sharedInit; -- (void)drawUnderlayImageWithFrame:(NSRect)cellFrame - inView:(NSView*)controlView; // Get drawing parameters for a given cell frame in a given view. The inner // frame is the one required by |-drawInteriorWithFrame:inView:|. The inner and @@ -122,16 +120,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4; shouldTheme_ = shouldTheme; } -- (NSImage*)underlayImage { - return underlayImage_; -} - -- (void)setUnderlayImage:(NSImage*)image { - underlayImage_.reset([image retain]); - - [[self controlView] setNeedsDisplay:YES]; -} - - (NSBackgroundStyle)interiorBackgroundStyle { // Never lower the interior, since that just leads to a weird shadow which can // often interact badly with the theme. @@ -410,8 +398,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4; [shadow set]; } - [self drawUnderlayImageWithFrame:cellFrame inView:controlView]; - CGContextBeginTransparencyLayer(context, 0); NSRect imageRect = NSZeroRect; imageRect.size = [[self image] size]; @@ -431,8 +417,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4; CGContextEndTransparencyLayer(context); [NSGraphicsContext restoreGraphicsState]; } else { - [self drawUnderlayImageWithFrame:cellFrame inView:controlView]; - // NSCell draws these uncentered for some reason, probably because of the // of control in the xib [super drawInteriorWithFrame:NSOffsetRect(cellFrame, 0, 1) @@ -440,19 +424,6 @@ static const NSTimeInterval kAnimationHideDuration = 0.4; } } -- (void)drawUnderlayImageWithFrame:(NSRect)cellFrame - inView:(NSView*)controlView { - if (underlayImage_) { - NSRect imageRect = NSZeroRect; - imageRect.size = [underlayImage_ size]; - [underlayImage_ setFlipped:[controlView isFlipped]]; - [underlayImage_ drawInRect:[self imageRectForBounds:cellFrame] - fromRect:imageRect - operation:NSCompositeSourceOver - fraction:[self isEnabled] ? 1.0 : 0.5]; - } -} - - (NSBezierPath*)clipPathForFrame:(NSRect)cellFrame inView:(NSView*)controlView { NSBezierPath* boundingPath = nil; -- cgit v1.1