зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1469341 - Remove the XUL wrapper document for the Browser Console;r=nchevobbe
MozReview-Commit-ID: KCZ6u5byQuO --HG-- extra : rebase_source : 2d1495576ca2c7a956a2327cff2f9fbc8bbb0010
This commit is contained in:
Родитель
83ae44a8c1
Коммит
00d813243a
|
@ -9,7 +9,6 @@ devtools.jar:
|
||||||
content/shared/widgets/widgets.css (shared/widgets/widgets.css)
|
content/shared/widgets/widgets.css (shared/widgets/widgets.css)
|
||||||
content/shared/widgets/VariablesView.xul (shared/widgets/VariablesView.xul)
|
content/shared/widgets/VariablesView.xul (shared/widgets/VariablesView.xul)
|
||||||
content/webconsole/index.html (webconsole/index.html)
|
content/webconsole/index.html (webconsole/index.html)
|
||||||
content/webconsole/browserconsole.xul (webconsole/browserconsole.xul)
|
|
||||||
* content/scratchpad/index.xul (scratchpad/index.xul)
|
* content/scratchpad/index.xul (scratchpad/index.xul)
|
||||||
content/shared/splitview.css (shared/splitview.css)
|
content/shared/splitview.css (shared/splitview.css)
|
||||||
content/shared/theme-switching.js (shared/theme-switching.js)
|
content/shared/theme-switching.js (shared/theme-switching.js)
|
||||||
|
|
|
@ -233,9 +233,6 @@ pref("devtools.accessibility.enabled", false);
|
||||||
// Web Audio Editor Inspector Width should be a preference
|
// Web Audio Editor Inspector Width should be a preference
|
||||||
pref("devtools.webaudioeditor.inspectorWidth", 300);
|
pref("devtools.webaudioeditor.inspectorWidth", 300);
|
||||||
|
|
||||||
// Experimental UI for the browser console that doesn't use a XUL wrapper doc
|
|
||||||
pref("devtools.browserconsole.html", false);
|
|
||||||
|
|
||||||
// Web console filters
|
// Web console filters
|
||||||
pref("devtools.webconsole.filter.error", true);
|
pref("devtools.webconsole.filter.error", true);
|
||||||
pref("devtools.webconsole.filter.warn", true);
|
pref("devtools.webconsole.filter.warn", true);
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
||||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
id="devtools-webconsole"
|
|
||||||
macanimationtype="document"
|
|
||||||
fullscreenbutton="true"
|
|
||||||
title=""
|
|
||||||
windowtype="devtools:webconsole"
|
|
||||||
width="900" height="350"
|
|
||||||
persist="screenX screenY width height sizemode">
|
|
||||||
<link rel="localization" href="toolkit/main-window/editmenu.ftl"/>
|
|
||||||
<script type="text/javascript" src="chrome://global/content/l10n.js"></script>
|
|
||||||
<popupset></popupset>
|
|
||||||
<iframe src="index.html" flex="1"></iframe>
|
|
||||||
</window>
|
|
|
@ -1475,8 +1475,7 @@ class JSTerm extends Component {
|
||||||
// toolbox-textbox-context-popup and friends. For now, fall
|
// toolbox-textbox-context-popup and friends. For now, fall
|
||||||
// back to use that if running inside the toolbox, but use our
|
// back to use that if running inside the toolbox, but use our
|
||||||
// own menu when running in the Browser Console (see Bug 1476097).
|
// own menu when running in the Browser Console (see Bug 1476097).
|
||||||
if (this.props.hud.isBrowserConsole &&
|
if (this.props.hud.isBrowserConsole) {
|
||||||
Services.prefs.getBoolPref("devtools.browserconsole.html")) {
|
|
||||||
this.props.serviceContainer.openEditContextMenu(e);
|
this.props.serviceContainer.openEditContextMenu(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,9 +175,8 @@ HUDService.prototype = {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function openWindow(t) {
|
async function openWindow(t) {
|
||||||
const win = Services.ww.openWindow(null, Tools.webConsole.browserConsoleURL,
|
const win = Services.ww.openWindow(null, Tools.webConsole.url,
|
||||||
"_blank", BC_WINDOW_FEATURES, null);
|
"_blank", BC_WINDOW_FEATURES, null);
|
||||||
let iframeWindow = win;
|
|
||||||
|
|
||||||
await new Promise(resolve => {
|
await new Promise(resolve => {
|
||||||
win.addEventListener("DOMContentLoaded", resolve, {once: true});
|
win.addEventListener("DOMContentLoaded", resolve, {once: true});
|
||||||
|
@ -185,17 +184,7 @@ HUDService.prototype = {
|
||||||
|
|
||||||
win.document.title = l10n.getStr("browserConsole.title");
|
win.document.title = l10n.getStr("browserConsole.title");
|
||||||
|
|
||||||
// With a XUL wrapper doc, we host index.html in an iframe.
|
return {iframeWindow: win, chromeWindow: win};
|
||||||
// Wait for that to be ready before resolving:
|
|
||||||
if (!Tools.webConsole.browserConsoleUsesHTML) {
|
|
||||||
const iframe = win.document.querySelector("iframe");
|
|
||||||
await new Promise(resolve => {
|
|
||||||
iframe.addEventListener("DOMContentLoaded", resolve, {once: true});
|
|
||||||
});
|
|
||||||
iframeWindow = iframe.contentWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {iframeWindow, chromeWindow: win};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Temporarily cache the async startup sequence so that if toggleBrowserConsole
|
// Temporarily cache the async startup sequence so that if toggleBrowserConsole
|
||||||
|
|
|
@ -11,8 +11,7 @@ const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
|
||||||
add_task(async function() {
|
add_task(async function() {
|
||||||
// Enable net messages in the console for this test.
|
// Enable net messages in the console for this test.
|
||||||
await pushPref("devtools.browserconsole.filter.net", true);
|
await pushPref("devtools.browserconsole.filter.net", true);
|
||||||
// These are required for testing the text input in the browser console:
|
// This is required for testing the text input in the browser console:
|
||||||
await pushPref("devtools.browserconsole.html", true);
|
|
||||||
await pushPref("devtools.chrome.enabled", true);
|
await pushPref("devtools.chrome.enabled", true);
|
||||||
|
|
||||||
await addTab(TEST_URI);
|
await addTab(TEST_URI);
|
||||||
|
|
|
@ -27,12 +27,12 @@ add_task(async function() {
|
||||||
await waitFor(() => findMessage(hud, TEST_MESSAGE));
|
await waitFor(() => findMessage(hud, TEST_MESSAGE));
|
||||||
|
|
||||||
currWindow = Services.wm.getMostRecentWindow(null);
|
currWindow = Services.wm.getMostRecentWindow(null);
|
||||||
is(currWindow.document.documentURI, Tools.webConsole.browserConsoleURL,
|
is(currWindow.document.documentURI, Tools.webConsole.url,
|
||||||
"The Browser Console is open and has focus");
|
"The Browser Console is open and has focus");
|
||||||
mainWindow.focus();
|
mainWindow.focus();
|
||||||
await HUDService.openBrowserConsoleOrFocus();
|
await HUDService.openBrowserConsoleOrFocus();
|
||||||
currWindow = Services.wm.getMostRecentWindow(null);
|
currWindow = Services.wm.getMostRecentWindow(null);
|
||||||
is(currWindow.document.documentURI, Tools.webConsole.browserConsoleURL,
|
is(currWindow.document.documentURI, Tools.webConsole.url,
|
||||||
"The Browser Console is open and has focus");
|
"The Browser Console is open and has focus");
|
||||||
await HUDService.toggleBrowserConsole();
|
await HUDService.toggleBrowserConsole();
|
||||||
hud = HUDService.getBrowserConsole();
|
hud = HUDService.getBrowserConsole();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче