diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 16:33:35 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-13 16:33:35 +0000 |
commit | a457e8057cfb9b653b667799e078b814444a8af7 (patch) | |
tree | 90d01b9571cd79a4cd2f2f212b36db66ee397d98 /chrome/browser/cocoa/browser_frame_view.mm | |
parent | cc0445fff1bc059231e7bd4772fe145105ea42cb (diff) | |
download | chromium_src-a457e8057cfb9b653b667799e078b814444a8af7.zip chromium_src-a457e8057cfb9b653b667799e078b814444a8af7.tar.gz chromium_src-a457e8057cfb9b653b667799e078b814444a8af7.tar.bz2 |
Fixes up drawing so that we don't have any transparent holes, and adds a
bit more of a guard around some private API calling.
Also moves the widgets up one pixel, and fixes drawing the widgets in windows
without tabstrips.
BUG=24539, 24693
TEST=Assign a window the Mark Ecko theme (https://tools.google.com/chrome/intl/en/themes/theme_at_mecko.html) and look for holes in the top of the window graphics. Click on this link (http://www.htmlcodetutorial.com/linking/popup_test_a.html) and make sure the popup windows widgets are in the right place.
Review URL: http://codereview.chromium.org/273031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/browser_frame_view.mm')
-rw-r--r-- | chrome/browser/cocoa/browser_frame_view.mm | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/chrome/browser/cocoa/browser_frame_view.mm b/chrome/browser/cocoa/browser_frame_view.mm index 3cc4ddc..3a02617 100644 --- a/chrome/browser/cocoa/browser_frame_view.mm +++ b/chrome/browser/cocoa/browser_frame_view.mm @@ -96,15 +96,11 @@ static const NSInteger kBrowserFrameViewPatternPhaseOffset = 2; - (void)drawRect:(NSRect)rect { // If this isn't the window class we expect, then pass it on to the // original implementation. + [self drawRectOriginal:rect]; if (![[self window] isKindOfClass:[ChromeBrowserWindow class]]) { - [self drawRectOriginal:rect]; return; } - // Clear out everything - [[NSColor clearColor] set]; - NSRectFill(rect); - // Set up our clip NSWindow* window = [self window]; NSRect windowRect = [window frame]; @@ -119,7 +115,7 @@ static const NSInteger kBrowserFrameViewPatternPhaseOffset = 2; GTMTheme* theme = [self gtm_theme]; GTMThemeState state = [window isMainWindow] ? GTMThemeStateActiveWindow : GTMThemeStateInactiveWindow; - NSColor* color = [theme backgroundPatternColorForStyle:GTMThemeStyleWindow + NSColor* color = [theme backgroundPatternColorForStyle:GTMThemeStyleWindow state:state]; if (color) { // If we have a theme pattern, draw it here. @@ -128,8 +124,6 @@ static const NSInteger kBrowserFrameViewPatternPhaseOffset = 2; [[NSGraphicsContext currentContext] setPatternPhase:phase]; [color set]; NSRectFill(rect); - } else { - [self drawRectOriginal:rect]; } // Check to see if we have an overlay image. @@ -157,7 +151,7 @@ static const NSInteger kBrowserFrameViewPatternPhaseOffset = 2; ChromeBrowserWindow* window = static_cast<ChromeBrowserWindow*>([self window]); mouseInGroup = [window mouseInGroup:widget]; - } else { + } else if ([super respondsToSelector:@selector(_mouseInGroup:)]) { mouseInGroup = [super _mouseInGroup:widget]; } return mouseInGroup; |