From 89795c9b1493c8efdcb3968162c0a0467763ecc6 Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Mon, 25 Nov 2013 16:28:57 -0500 Subject: [PATCH] Stop the devtools from turning black when the window gets big enough We need to use UnderlayOpenGLHostingWindow to show the devtools to ensure they remain visible even when they get large. --- brightray/browser/mac/bry_inspectable_web_contents_view.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/brightray/browser/mac/bry_inspectable_web_contents_view.mm b/brightray/browser/mac/bry_inspectable_web_contents_view.mm index 09b5c863b02d..24987e5c1c5c 100644 --- a/brightray/browser/mac/bry_inspectable_web_contents_view.mm +++ b/brightray/browser/mac/bry_inspectable_web_contents_view.mm @@ -6,6 +6,7 @@ #import "content/public/browser/render_widget_host_view.h" #import "content/public/browser/web_contents_view.h" +#import "ui/base/cocoa/underlay_opengl_hosting_window.h" using namespace brightray; @@ -130,8 +131,8 @@ void SetActive(content::WebContents* web_contents, bool active) { - (void)moveToWindow { if (!_private->window) { auto styleMask = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask | NSTexturedBackgroundWindowMask | NSUnifiedTitleAndToolbarWindowMask; - auto contentRect = [NSWindow contentRectForFrameRect:devtoolsWindowFrame(_private->splitView) styleMask:styleMask]; - _private->window = [[NSWindow alloc] initWithContentRect:contentRect styleMask:styleMask backing:NSBackingStoreBuffered defer:YES]; + auto contentRect = [UnderlayOpenGLHostingWindow contentRectForFrameRect:devtoolsWindowFrame(_private->splitView) styleMask:styleMask]; + _private->window = [[UnderlayOpenGLHostingWindow alloc] initWithContentRect:contentRect styleMask:styleMask backing:NSBackingStoreBuffered defer:YES]; _private->window.delegate = self; _private->window.releasedWhenClosed = NO; _private->window.title = @"Developer Tools";