diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-01 17:50:56 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-01 17:50:56 +0000 |
commit | 9cb0471a4be2ddc1fd32902202a723d120e131b6 (patch) | |
tree | 755eeacd9b196aa862b023251d6807c6ff0f8af0 | |
parent | 21df1696392acf9543ad6e3b3d3e7f0ab7120f4d (diff) | |
download | chromium_src-9cb0471a4be2ddc1fd32902202a723d120e131b6.zip chromium_src-9cb0471a4be2ddc1fd32902202a723d120e131b6.tar.gz chromium_src-9cb0471a4be2ddc1fd32902202a723d120e131b6.tar.bz2 |
Core Animation: Fix incorrect tab color
When a new background tab is created it has a the wrong color.
The problem is that the tab is not invalidated as its Y position
changes.
BUG=255599
TEST=Run chrome with --use-core-animation. Create a new background tab
and verify that it has the correct color.
Review URL: https://chromiumcodereview.appspot.com/18304002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209453 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/cocoa/tabs/tab_view.mm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.mm b/chrome/browser/ui/cocoa/tabs/tab_view.mm index da33b47..d7ff32f 100644 --- a/chrome/browser/ui/cocoa/tabs/tab_view.mm +++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm @@ -434,6 +434,13 @@ const CGFloat kRapidCloseDist = 2.5; [self drawStroke:dirtyRect]; } +- (void)setFrameOrigin:(NSPoint)origin { + // The background color depends on the view's vertical position. + if (NSMinY([self frame]) != origin.y) + [self setNeedsDisplay:YES]; + [super setFrameOrigin:origin]; +} + // Override this to catch the text so that we can choose when to display it. - (void)setToolTip:(NSString*)string { toolTipText_.reset([string retain]); |