mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 1690340 - Part 1: Hide all the panel tools in the developer tools menu. r=jdescottes
For now, we hide all the individual panel tools from the developer tools menu. We will want to evaluate whether or not to remove all the logic for adding all the tools to the menu in the future if we see a permanent need for no longer having it. See https://searchfox.org/mozilla-central/rev/d3343662ce0aced933b30e053b33c93f759292eb/devtools/client/framework/browser-menus.js#197 Differential Revision: https://phabricator.services.mozilla.com/D104868
This commit is contained in:
parent
0dc5ddff34
commit
1c278ebe57
@ -32,14 +32,6 @@ add_task(async function() {
|
||||
const toolbox = getToolbox(devtoolsWindow);
|
||||
await toolbox.selectTool("inspector");
|
||||
|
||||
info("Click on the console item");
|
||||
const onConsoleLoaded = toolbox.once("webconsole-ready");
|
||||
const webconsoleMenuItem = rootDocument.getElementById("menuitem_webconsole");
|
||||
webconsoleMenuItem.click();
|
||||
|
||||
info("Wait until about:devtools-toolbox switches to the console");
|
||||
await onConsoleLoaded;
|
||||
|
||||
info("Force to select about:debugging page");
|
||||
await updateSelectedTab(gBrowser, tab, window.AboutDebugging.store);
|
||||
|
||||
|
@ -148,7 +148,7 @@ Tools.inspector = {
|
||||
const ctrlShiftC = "Ctrl+Shift+" + l10n("inspector.commandkey");
|
||||
return l10n("inspector.tooltip2", ctrlShiftC);
|
||||
},
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
|
||||
preventClosingOnKey: true,
|
||||
// preventRaisingOnKey is used to keep the focus on the content window for shortcuts
|
||||
@ -182,7 +182,7 @@ Tools.webConsole = {
|
||||
l10n("webconsole.commandkey")
|
||||
);
|
||||
},
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
|
||||
preventClosingOnKey: true,
|
||||
onkey: function(panel, toolbox) {
|
||||
@ -217,7 +217,7 @@ Tools.jsdebugger = {
|
||||
l10n("jsdebugger.commandkey2")
|
||||
);
|
||||
},
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
isTargetSupported: function() {
|
||||
return true;
|
||||
},
|
||||
@ -241,7 +241,7 @@ Tools.styleEditor = {
|
||||
"Shift+" + functionkey(l10n("styleeditor.commandkey"))
|
||||
);
|
||||
},
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
isTargetSupported: function(target) {
|
||||
return target.hasActor("styleSheets");
|
||||
},
|
||||
@ -265,7 +265,7 @@ Tools.performance = {
|
||||
);
|
||||
},
|
||||
accesskey: l10n("performance.accesskey"),
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
};
|
||||
|
||||
function switchPerformancePanel() {
|
||||
@ -348,7 +348,7 @@ Tools.netMonitor = {
|
||||
l10n("netmonitor.commandkey")
|
||||
);
|
||||
},
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
|
||||
isTargetSupported: function(target) {
|
||||
return target.getTrait("networkMonitor") && !target.isWorkerTarget;
|
||||
@ -375,7 +375,7 @@ Tools.storage = {
|
||||
"Shift+" + functionkey(l10n("storage.commandkey"))
|
||||
);
|
||||
},
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
|
||||
isTargetSupported: function(target) {
|
||||
return target.hasActor("storage");
|
||||
@ -402,7 +402,7 @@ Tools.dom = {
|
||||
l10n("dom.commandkey")
|
||||
);
|
||||
},
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
|
||||
isTargetSupported: function(target) {
|
||||
return true;
|
||||
@ -429,7 +429,7 @@ Tools.accessibility = {
|
||||
"Shift+" + functionkey(l10n("accessibilityF12.commandkey"))
|
||||
);
|
||||
},
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
|
||||
isTargetSupported(target) {
|
||||
return target.hasActor("accessibility");
|
||||
@ -449,7 +449,7 @@ Tools.application = {
|
||||
label: l10n("application.label"),
|
||||
panelLabel: l10n("application.panellabel"),
|
||||
tooltip: l10n("application.tooltip"),
|
||||
inMenu: true,
|
||||
inMenu: false,
|
||||
|
||||
isTargetSupported: function(target) {
|
||||
return target.hasActor("manifest");
|
||||
|
@ -552,16 +552,6 @@ var gDevToolsBrowser = (exports.gDevToolsBrowser = {
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Unset the slow script debug handler.
|
||||
*/
|
||||
unsetSlowScriptDebugHandler() {
|
||||
const debugService = Cc["@mozilla.org/dom/slow-script-debug;1"].getService(
|
||||
Ci.nsISlowScriptDebug
|
||||
);
|
||||
debugService.activationHandler = undefined;
|
||||
},
|
||||
|
||||
/**
|
||||
* Add the menuitem for a tool to all open browser windows.
|
||||
*
|
||||
@ -611,10 +601,6 @@ var gDevToolsBrowser = (exports.gDevToolsBrowser = {
|
||||
// visibility of the newly created menu item.
|
||||
gDevToolsBrowser._updateMenuItems(win);
|
||||
}
|
||||
|
||||
if (toolDefinition.id === "jsdebugger") {
|
||||
gDevToolsBrowser.setSlowScriptDebugHandler();
|
||||
}
|
||||
},
|
||||
|
||||
hasToolboxOpened(win) {
|
||||
@ -699,10 +685,6 @@ var gDevToolsBrowser = (exports.gDevToolsBrowser = {
|
||||
for (const win of gDevToolsBrowser._trackedBrowserWindows) {
|
||||
BrowserMenus.removeToolFromMenu(toolId, win.document);
|
||||
}
|
||||
|
||||
if (toolId === "jsdebugger") {
|
||||
gDevToolsBrowser.unsetSlowScriptDebugHandler();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@ -793,6 +775,8 @@ gDevTools.on("tool-registered", function(toolId) {
|
||||
}
|
||||
});
|
||||
|
||||
gDevToolsBrowser.setSlowScriptDebugHandler();
|
||||
|
||||
gDevTools.on("tool-unregistered", function(toolId) {
|
||||
gDevToolsBrowser._removeToolFromWindows(toolId);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user