Index: ui/views/cocoa/bridged_native_widget.mm |
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm |
index 6a4971bb827c5b17dad1302d43a29ca3bec829ea..e6d3276216f660a088780ca7438d35e772756ce1 100644 |
--- a/ui/views/cocoa/bridged_native_widget.mm |
+++ b/ui/views/cocoa/bridged_native_widget.mm |
@@ -682,6 +682,14 @@ void BridgedNativeWidget::OnSizeChanged() { |
if ([window_ inLiveResize]) |
MaybeWaitForFrame(new_size); |
} |
+ |
+ // 10.9 is unable to generate a window shadow from the composited CALayer, so |
+ // use Quartz. |
+ // We don't update the window mask during a live resize, instead it is done |
+ // after the resize is completed in viewDidEndLiveResize: in |
+ // BridgedContentView. |
+ if (base::mac::IsOSMavericksOrEarlier() && ![window_ inLiveResize]) |
+ [bridged_view_ updateWindowMask]; |
} |
void BridgedNativeWidget::OnVisibilityChanged() { |
@@ -865,7 +873,14 @@ void BridgedNativeWidget::CreateLayer(ui::LayerType layer_type, |
// native shape is what's most appropriate for displaying sheets on Mac. |
if (translucent && !native_widget_mac_->IsWindowModalSheet()) { |
[window_ setOpaque:NO]; |
- [window_ setBackgroundColor:[NSColor clearColor]]; |
+ // For Mac OS versions earlier than Yosemite, the Window server isn't able |
+ // to generate a window shadow from the composited CALayer. To get around |
+ // this, set an opaque background on the window and clip the window boundary |
+ // in drawRect method of BridgedContentView. See crbug.com/543671. |
+ if (base::mac::IsOSYosemiteOrLater()) |
+ [window_ setBackgroundColor:[NSColor clearColor]]; |
+ else |
+ [window_ setBackgroundColor:[NSColor whiteColor]]; |
tapted
2016/02/11 01:47:23
I just realised.. this `else` might not be needed.
karandeepb
2016/02/11 04:16:04
Done.
|
} |
UpdateLayerProperties(); |