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

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

Issue 2219663003: MacViews: Claim -[NSView isOpaque] for the content view according to the root layer properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_content_view.mm
diff --git a/ui/views/cocoa/bridged_content_view.mm b/ui/views/cocoa/bridged_content_view.mm
index e1c7497c1814578fca72bac2b56749befc3982d3..b8d3254add9c875f983c5e4f889296c679a8a839 100644
--- a/ui/views/cocoa/bridged_content_view.mm
+++ b/ui/views/cocoa/bridged_content_view.mm
@@ -661,6 +661,14 @@ ui::KeyEvent GetCharacterEventFromNSEvent(NSEvent* event) {
ui::CanvasPainter(&canvas, 1.f).context());
}
+- (BOOL)isOpaque {
+ if (!hostedView_)
+ return NO;
+
+ ui::Layer* layer = hostedView_->GetWidget()->GetLayer();
+ return layer && layer->fills_bounds_opaquely();
+}
+
// To maximize consistency with the Cocoa browser (mac_views_browser=0), accept
// mouse clicks immediately so that clicking on Chrome from an inactive window
// will allow the event to be processed, rather than merely activate the window.
« no previous file with comments | « no previous file | ui/views/widget/native_widget_mac_unittest.mm » ('j') | ui/views/widget/native_widget_mac_unittest.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698