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

Unified Diff: ui/base/cocoa/underlay_opengl_hosting_window.mm

Issue 11316172: Always disable "content has shadow". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated comment Created 8 years, 1 month 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: ui/base/cocoa/underlay_opengl_hosting_window.mm
diff --git a/ui/base/cocoa/underlay_opengl_hosting_window.mm b/ui/base/cocoa/underlay_opengl_hosting_window.mm
index e56323e22acd6fd23a45425544b74863f7df024a..e69c66fdda0409410b215433cd7b24d8c70b48f5 100644
--- a/ui/base/cocoa/underlay_opengl_hosting_window.mm
+++ b/ui/base/cocoa/underlay_opengl_hosting_window.mm
@@ -108,10 +108,17 @@ void RootDidAddSubview(id self, SEL _cmd, NSView* subview) {
// all windows hosting OpenGL content must not be opaque.
[self setOpaque:NO];
+ // Always disable "content has shadow". This class assumes that all holes
+ // punched in the window are intentional, in order to show accelerated
+ // content underneath, so those holes cannot be allowed to cause holes in
+ // the shadow. Note that the edges trimmed from around the periphery of a
+ // window (through use of transparency) don't count as content area with
+ // regards to "content has shadow".
+ [self _setContentHasShadow:NO];
Nico 2012/11/27 00:28:12 Hum, I would've expected this to force a regulare
Avi (use Gerrit) 2012/11/27 14:51:53 That's the magic of "content has shadow = NO"; the
+
+ // Only set up opaques if the window is a proper window with a title bar
+ // and all.
if (windowStyle & NSTitledWindowMask) {
- // Only fiddle with shadows if the window is a proper window with a
- // title bar and all.
- [self _setContentHasShadow:NO];
NSView* rootView = [[self contentView] superview];
const NSRect rootBounds = [rootView bounds];
« 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