mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-07 15:57:31 +09:00
Remove testing-only UI components for e10s
This removes front-end tools only applicable for testing e10s (open non-e10s window, etc.) This resolves #37
This commit is contained in:
parent
ed8a17ae7d
commit
49ceae702e
16 changed files with 5 additions and 179 deletions
|
|
@ -207,15 +207,6 @@ var CustomizableUIInternal = {
|
|||
panelPlacements.splice(-1, 0, "developer-button");
|
||||
}
|
||||
|
||||
if (AppConstants.E10S_TESTING_ONLY) {
|
||||
if (gPalette.has("e10s-button")) {
|
||||
let newWindowIndex = panelPlacements.indexOf("new-window-button");
|
||||
if (newWindowIndex > -1) {
|
||||
panelPlacements.splice(newWindowIndex + 1, 0, "e10s-button");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let showCharacterEncoding = Services.prefs.getComplexValue(
|
||||
"browser.menu.showCharacterEncoding",
|
||||
Ci.nsIPrefLocalizedString
|
||||
|
|
|
|||
|
|
@ -1258,21 +1258,3 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
|
|||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (AppConstants.E10S_TESTING_ONLY) {
|
||||
if (Services.appinfo.browserTabsRemoteAutostart) {
|
||||
CustomizableWidgets.push({
|
||||
id: "e10s-button",
|
||||
defaultArea: CustomizableUI.AREA_PANEL,
|
||||
onBuild: function(aDocument) {
|
||||
let node = aDocument.createElementNS(kNSXUL, "toolbarbutton");
|
||||
node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label"));
|
||||
node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext"));
|
||||
},
|
||||
onCommand: function(aEvent) {
|
||||
let win = aEvent.view;
|
||||
win.OpenBrowserWindow({remote: false});
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,11 +11,6 @@ Components.utils.import("resource:///modules/TransientPrefs.jsm");
|
|||
XPCOMUtils.defineLazyModuleGetter(this, "OS",
|
||||
"resource://gre/modules/osfile.jsm");
|
||||
|
||||
if (AppConstants.E10S_TESTING_ONLY) {
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
|
||||
"resource://gre/modules/UpdateUtils.jsm");
|
||||
}
|
||||
|
||||
var gMainPane = {
|
||||
/**
|
||||
* Initialization of this.
|
||||
|
|
@ -83,26 +78,6 @@ var gMainPane = {
|
|||
setEventListener("chooseFolder", "command",
|
||||
gMainPane.chooseFolder);
|
||||
|
||||
if (AppConstants.E10S_TESTING_ONLY) {
|
||||
setEventListener("e10sAutoStart", "command",
|
||||
gMainPane.enableE10SChange);
|
||||
let e10sCheckbox = document.getElementById("e10sAutoStart");
|
||||
|
||||
let e10sPref = document.getElementById("browser.tabs.remote.autostart");
|
||||
let e10sTempPref = document.getElementById("e10sTempPref");
|
||||
let e10sForceEnable = document.getElementById("e10sForceEnable");
|
||||
|
||||
let preffedOn = e10sPref.value || e10sTempPref.value || e10sForceEnable.value;
|
||||
|
||||
if (preffedOn) {
|
||||
// The checkbox is checked if e10s is preffed on and enabled.
|
||||
e10sCheckbox.checked = Services.appinfo.browserTabsRemoteAutostart;
|
||||
|
||||
// but if it's force disabled, then the checkbox is disabled.
|
||||
e10sCheckbox.disabled = !Services.appinfo.browserTabsRemoteAutostart;
|
||||
}
|
||||
}
|
||||
|
||||
if (AppConstants.MOZ_DEV_EDITION) {
|
||||
let uAppData = OS.Constants.Path.userApplicationDataDir;
|
||||
let ignoreSeparateProfile = OS.Path.join(uAppData, "ignore-dev-edition-profile");
|
||||
|
|
@ -123,36 +98,7 @@ var gMainPane = {
|
|||
|
||||
enableE10SChange: function ()
|
||||
{
|
||||
if (AppConstants.E10S_TESTING_ONLY) {
|
||||
let e10sCheckbox = document.getElementById("e10sAutoStart");
|
||||
let e10sPref = document.getElementById("browser.tabs.remote.autostart");
|
||||
let e10sTempPref = document.getElementById("e10sTempPref");
|
||||
|
||||
let prefsToChange;
|
||||
if (e10sCheckbox.checked) {
|
||||
// Enabling e10s autostart
|
||||
prefsToChange = [e10sPref];
|
||||
} else {
|
||||
// Disabling e10s autostart
|
||||
prefsToChange = [e10sPref];
|
||||
if (e10sTempPref.value) {
|
||||
prefsToChange.push(e10sTempPref);
|
||||
}
|
||||
}
|
||||
|
||||
let buttonIndex = confirmRestartPrompt(e10sCheckbox.checked, 0,
|
||||
true, false);
|
||||
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
|
||||
for (let prefToChange of prefsToChange) {
|
||||
prefToChange.value = e10sCheckbox.checked;
|
||||
}
|
||||
|
||||
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
|
||||
}
|
||||
|
||||
// Revert the checkbox in case we didn't quit
|
||||
e10sCheckbox.checked = e10sPref.value || e10sTempPref.value;
|
||||
}
|
||||
// **STUB**
|
||||
},
|
||||
|
||||
separateProfileModeChange: function ()
|
||||
|
|
|
|||
|
|
@ -9,18 +9,6 @@
|
|||
|
||||
<preferences id="mainPreferences" hidden="true" data-category="paneGeneral">
|
||||
|
||||
#ifdef E10S_TESTING_ONLY
|
||||
<preference id="browser.tabs.remote.autostart"
|
||||
name="browser.tabs.remote.autostart"
|
||||
type="bool"/>
|
||||
<preference id="e10sTempPref"
|
||||
name="browser.tabs.remote.autostart.2"
|
||||
type="bool"/>
|
||||
<preference id="e10sForceEnable"
|
||||
name="browser.tabs.remote.force-enable"
|
||||
type="bool"/>
|
||||
#endif
|
||||
|
||||
<!-- Startup -->
|
||||
<preference id="browser.startup.page"
|
||||
name="browser.startup.page"
|
||||
|
|
@ -135,11 +123,6 @@
|
|||
</vbox>
|
||||
#endif
|
||||
|
||||
#ifdef E10S_TESTING_ONLY
|
||||
<checkbox id="e10sAutoStart"
|
||||
label="&e10sEnabled.label;"/>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SHELL_SERVICE
|
||||
<vbox id="defaultBrowserBox">
|
||||
<hbox align="center">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue