зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1575490 - move inspector browser toolbox pref from the server to the client; r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D42817 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f1c86aba93
Коммит
fae430a2e7
|
@ -145,11 +145,6 @@ const SUBGRID_ENABLED = Services.prefs.getBoolPref(
|
|||
"layout.css.grid-template-subgrid-value.enabled"
|
||||
);
|
||||
|
||||
const BROWSER_TOOLBOX_FISSION_ENABLED = Services.prefs.getBoolPref(
|
||||
"devtools.browsertoolbox.fission",
|
||||
false
|
||||
);
|
||||
|
||||
const FONT_FAMILY_PREVIEW_TEXT = "The quick brown fox jumps over the lazy dog";
|
||||
const FONT_FAMILY_PREVIEW_TEXT_SIZE = 20;
|
||||
|
||||
|
@ -317,8 +312,7 @@ const NodeActor = protocol.ActorClassWithSpec(nodeSpec, {
|
|||
return (
|
||||
this.numChildren == 0 &&
|
||||
ChromeUtils.getClassName(this.rawNode) == "XULFrameElement" &&
|
||||
this.rawNode.getAttribute("remote") == "true" &&
|
||||
BROWSER_TOOLBOX_FISSION_ENABLED
|
||||
this.rawNode.getAttribute("remote") == "true"
|
||||
);
|
||||
},
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ const {
|
|||
} = require("devtools/shared/protocol.js");
|
||||
const { nodeSpec, nodeListSpec } = require("devtools/shared/specs/node");
|
||||
const { SimpleStringFront } = require("devtools/shared/fronts/string");
|
||||
const Services = require("Services");
|
||||
|
||||
loader.lazyRequireGetter(
|
||||
this,
|
||||
|
@ -26,6 +27,11 @@ loader.lazyRequireGetter(
|
|||
true
|
||||
);
|
||||
|
||||
const BROWSER_TOOLBOX_FISSION_ENABLED = Services.prefs.getBoolPref(
|
||||
"devtools.browsertoolbox.fission",
|
||||
false
|
||||
);
|
||||
|
||||
const HIDDEN_CLASS = "__fx-devtools-hide-shortcut__";
|
||||
|
||||
/**
|
||||
|
@ -280,7 +286,7 @@ class NodeFront extends FrontClassWithSpec(nodeSpec) {
|
|||
return this._form.numChildren;
|
||||
}
|
||||
get remoteFrame() {
|
||||
return this._form.remoteFrame;
|
||||
return BROWSER_TOOLBOX_FISSION_ENABLED && this._form.remoteFrame;
|
||||
}
|
||||
get hasEventListeners() {
|
||||
return this._form.hasEventListeners;
|
||||
|
@ -512,6 +518,10 @@ class NodeFront extends FrontClassWithSpec(nodeSpec) {
|
|||
}
|
||||
|
||||
async connectToRemoteFrame() {
|
||||
if (!this.remoteFrame) {
|
||||
console.warn("Tried to open remote connection to an invalid frame.");
|
||||
return null;
|
||||
}
|
||||
if (this._remoteFrameTarget) {
|
||||
return this._remoteFrameTarget;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче