diff --git a/cef.gyp b/cef.gyp index a737f25d7..86b89e0a8 100644 --- a/cef.gyp +++ b/cef.gyp @@ -1134,6 +1134,9 @@ 'libcef/browser/web_contents_view_osr.h', # Include sources for printing. '<(DEPTH)/chrome/renderer/printing/print_web_view_helper_mac.mm', + # Include sources for CoreAnimation support. + '<(DEPTH)/chrome/browser/ui/cocoa/nsview_additions.h', + '<(DEPTH)/chrome/browser/ui/cocoa/nsview_additions.mm', ], }], [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { diff --git a/libcef/browser/browser_host_impl_mac.mm b/libcef/browser/browser_host_impl_mac.mm index ad768aac6..2044f449c 100644 --- a/libcef/browser/browser_host_impl_mac.mm +++ b/libcef/browser/browser_host_impl_mac.mm @@ -19,6 +19,7 @@ #include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_restrictions.h" +#import "chrome/browser/ui/cocoa/nsview_additions.h" #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/web_contents.h" @@ -383,6 +384,11 @@ bool CefBrowserHostImpl::PlatformCreateWindow() { window_info_.parent_view = parentView; } + // Make the content view for the window have a layer. This will make all + // sub-views have layers. This is necessary to ensure correct layer + // ordering of all child views and their layers. + [[[parentView window] contentView] cr_setWantsLayer:YES]; + // Add a reference that will be released in the dealloc handler. AddRef();