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 8d96f36b79f7988f3592c7a5b6c4bfb237482590..04b5eda2564ac1c20ecaab760a1ebdf97e6741f5 100644 |
--- a/ui/base/cocoa/underlay_opengl_hosting_window.mm |
+++ b/ui/base/cocoa/underlay_opengl_hosting_window.mm |
@@ -120,20 +120,23 @@ void RootDidAddSubview(id self, SEL _cmd, NSView* subview) { |
NSView* rootView = [[self contentView] superview]; |
const NSRect rootBounds = [rootView bounds]; |
- const CGFloat kEdgeInset = 16; |
+ // On 10.7/8, the bottom corners of the window are rounded by magic at a |
+ // deeper level than the NSThemeFrame, so it is OK to have the opaques |
+ // go all the way to the bottom. |
+ const CGFloat kTopEdgeInset = 16; |
const CGFloat kAlphaValueJustOpaqueEnough = 0.002; |
scoped_nsobject<NSView> leftOpaque([[OpaqueView alloc] initWithFrame: |
- NSMakeRect(NSMinX(rootBounds), NSMinY(rootBounds) + kEdgeInset, |
- 1, NSHeight(rootBounds) - 2 * kEdgeInset)]); |
+ NSMakeRect(NSMinX(rootBounds), NSMinY(rootBounds), |
+ 1, NSHeight(rootBounds) - kTopEdgeInset)]); |
[leftOpaque setAutoresizingMask:NSViewMaxXMargin | |
NSViewHeightSizable]; |
[leftOpaque setAlphaValue:kAlphaValueJustOpaqueEnough]; |
[rootView addSubview:leftOpaque]; |
scoped_nsobject<NSView> rightOpaque([[OpaqueView alloc] initWithFrame: |
- NSMakeRect(NSMaxX(rootBounds) - 1, NSMinY(rootBounds) + kEdgeInset, |
- 1, NSHeight(rootBounds) - 2 * kEdgeInset)]); |
+ NSMakeRect(NSMaxX(rootBounds) - 1, NSMinY(rootBounds), |
+ 1, NSHeight(rootBounds) - kTopEdgeInset)]); |
[rightOpaque setAutoresizingMask:NSViewMinXMargin | |
NSViewHeightSizable]; |
[rightOpaque setAlphaValue:kAlphaValueJustOpaqueEnough]; |