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

Unified Diff: ui/views/cocoa/bridged_native_widget.mm

Issue 1633403002: MacViews: Add native drop shadow to dialogs on OSX < 10.10. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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
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 24bba74dd91727e12fe250c3c02c4b1145875e10..c3b135f1f54b6156886a4a9475d6471dbfe76c6f 100644
--- a/ui/views/cocoa/bridged_native_widget.mm
+++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -850,7 +850,13 @@ 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 OSs earlier than Yosemite, we set an opaque background so that window
+ // server can generate a a drop shadow and border for dialogs. See
+ // crbug.com/543671.
+ if (base::mac::IsOSYosemiteOrLater())
+ [window_ setBackgroundColor:[NSColor clearColor]];
+ else
+ [window_ setBackgroundColor:[NSColor whiteColor]];
}
UpdateLayerProperties();

Powered by Google App Engine
This is Rietveld 408576698