summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-03 20:00:56 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-03 20:00:56 +0000
commit69b4233a19b15af6f2a102967afea1cde4425dee (patch)
tree9597d90c883bfbddcf00f7684263c35053b92804 /chrome/browser/tab_contents
parent6637e8b233673e5c1310f54cd110b0d47f699439 (diff)
downloadchromium_src-69b4233a19b15af6f2a102967afea1cde4425dee.zip
chromium_src-69b4233a19b15af6f2a102967afea1cde4425dee.tar.gz
chromium_src-69b4233a19b15af6f2a102967afea1cde4425dee.tar.bz2
Fix flicker of themed window background by making the tab contents opaque (it doesn't draw but its children always cover the area)
BUG=http://crbug.com/29874 TEST=as in bug Review URL: http://codereview.chromium.org/665004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_mac.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index 8a87923..8aa3e66 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -328,6 +328,14 @@ void TabContentsViewMac::Observe(NotificationType type,
[super dealloc];
}
+- (BOOL)isOpaque {
+ // TabContentsViewCocoa does not draw itself in any way, but its subviews do
+ // paint their entire frames. Declaring opaqueness here prevents needless
+ // drawing of the window background, which also avoids flicker if the theme is
+ // dark.
+ return YES;
+}
+
// Registers for the view for the appropriate drag types.
- (void)registerDragTypes {
NSArray* types = [NSArray arrayWithObjects:NSStringPboardType,