diff --git a/libcef/browser_devtools_scheme_handler.cc b/libcef/browser_devtools_scheme_handler.cc index 80bb0393e..b12adba94 100644 --- a/libcef/browser_devtools_scheme_handler.cc +++ b/libcef/browser_devtools_scheme_handler.cc @@ -82,7 +82,15 @@ public: CefRefPtr request) OVERRIDE { - std::string url = request->GetURL(); + // Remove the query component of the URL, if any. + CefURLParts parts; + CefParseURL(request->GetURL(), parts); + cef_string_clear(&parts.spec); + cef_string_clear(&parts.query); + CefString urlStr; + CefCreateURL(parts, urlStr); + + std::string url = urlStr; const char* path = &url.c_str()[strlen(kChromeDevToolsURL)]; int size = -1; diff --git a/libcef/browser_impl.cc b/libcef/browser_impl.cc index 2dbf5b573..46d4ba382 100644 --- a/libcef/browser_impl.cc +++ b/libcef/browser_impl.cc @@ -1452,7 +1452,10 @@ void CefBrowserImpl::UIT_ShowDevTools() BrowserDevToolsClient* client = dev_tools_agent_->client(); if (!client) { // Create the inspector window. - CefString url(base::StringPrintf("%sdevtools.html", kChromeDevToolsURL)); + CefString url(base::StringPrintf( + "%sdevtools.html?docked=false&toolbarColor=rgba(223,223,223,1)&" + "textColor=rgba(18,50,114,1)", + kChromeDevToolsURL)); CefPopupFeatures features; CefRefPtr browser = UIT_CreatePopupWindow(url, features); diff --git a/tests/cefclient/client_handler_mac.mm b/tests/cefclient/client_handler_mac.mm index 63d16c1d2..0127e56eb 100644 --- a/tests/cefclient/client_handler_mac.mm +++ b/tests/cefclient/client_handler_mac.mm @@ -27,7 +27,7 @@ bool ClientHandler::OnBeforePopup(CefRefPtr parentBrowser, #ifdef TEST_REDIRECT_POPUP_URLS std::string urlStr = url; - if(urlStr.find("resources/inspector/devtools.html") == std::string::npos) { + if(urlStr.find("chrome-devtools:") == std::string::npos) { // Show all popup windows excluding DevTools in the current window. windowInfo.m_bHidden = true; client = new ClientPopupHandler(m_Browser);