зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1877736 - Allow starting the profiler with ctrl+alt+shift+1 when ctrl+shift+1 is in use by the website or an extension. r=devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D200179
This commit is contained in:
Родитель
984a47957a
Коммит
af22d613e4
|
@ -240,6 +240,20 @@ function getProfilerKeyShortcuts() {
|
|||
shortcut: getLocalizedKeyShortcut("devtools-commandkey-profiler-capture"),
|
||||
modifiers: "control,shift",
|
||||
},
|
||||
// Because it's not uncommon for content or extension to bind this
|
||||
// shortcut, allow using alt as well for starting and stopping the profiler
|
||||
{
|
||||
id: "profilerStartStopAlternate",
|
||||
shortcut: getLocalizedKeyShortcut(
|
||||
"devtools-commandkey-profiler-start-stop"
|
||||
),
|
||||
modifiers: "control,shift,alt",
|
||||
},
|
||||
{
|
||||
id: "profilerCaptureAlternate",
|
||||
shortcut: getLocalizedKeyShortcut("devtools-commandkey-profiler-capture"),
|
||||
modifiers: "control,shift,alt",
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -862,11 +876,13 @@ DevToolsStartup.prototype = {
|
|||
// The profiler doesn't care if DevTools is loaded, so provide a quick check
|
||||
// first to bail out of checking if DevTools is available.
|
||||
switch (key.id) {
|
||||
case "profilerStartStop": {
|
||||
case "profilerStartStop":
|
||||
case "profilerStartStopAlternate": {
|
||||
lazy.ProfilerPopupBackground.toggleProfiler("aboutprofiling");
|
||||
return;
|
||||
}
|
||||
case "profilerCapture": {
|
||||
case "profilerCapture":
|
||||
case "profilerCaptureAlternate": {
|
||||
lazy.ProfilerPopupBackground.captureProfile("aboutprofiling");
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче