diff --git a/.mozconfig b/.mozconfig
index bb8c517f782a7..4369c622904ad 100644
--- a/.mozconfig
+++ b/.mozconfig
@@ -58,7 +58,7 @@ ac_add_options --enable-ccache=sccache
elif test `uname -m` = ppc64le; then
ac_add_options --enable-ccache=ccache
fi
-ac_add_options --enable-lto
+#ac_add_options --enable-lto
# Stick to the same channel as Dev Edition would be
ac_add_options --enable-update-channel=aurora
ac_add_options --enable-rust-simd
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index 4f0de99ba643e..5c3a964164107 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1890,13 +1890,13 @@ pref("corroborator.enabled", true);
#endif
// Set bool pref for restart browser purgecache enabled.
-pref("browser.restart.purgecache", true);
+pref("browser.restart_menu.purgecache", true);
// Set bool pref for restart browser confirmation.
-pref("browser.restart.requireconfirm", false);
+pref("browser.restart_menu.requireconfirm", false);
// Set bool pref for restart browser panelUI button
-pref("browser.restart.showpanelmenubtn", false);
+pref("browser.restart_menu.showpanelmenubtn", false);
// Set prefs for tab context menu options
pref("browser.tabs.duplicateTab", true);
diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js
index 87e7ea9da6986..5c542f3ba61f4 100644
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -1202,16 +1202,16 @@ function updateFileMenuImportUIVisibility(id) {
function restartBrowser() {
let RestartMsg = Services.strings.createBundle("chrome://browser/locale/browser.properties");
try {
- if (Services.prefs.getBoolPref("browser.restart.requireconfirm")) {
+ if (Services.prefs.getBoolPref("browser.restart_menu.requireconfirm")) {
if (Services.prompt.confirm(null, RestartMsg.formatStringFromName("restartPromptTitle.label", [Services.strings.createBundle("chrome://branding/locale/brand.properties").GetStringFromName("brandShortName")], 1),
RestartMsg.formatStringFromName("restartPromptQuestion.label", [Services.strings.createBundle("chrome://branding/locale/brand.properties").GetStringFromName("brandShortName")], 1))) {
- if (Services.prefs.getBoolPref("browser.restart.purgecache")) {
+ if (Services.prefs.getBoolPref("browser.restart_menu.purgecache")) {
Services.appinfo.invalidateCachesOnRestart();
}
Services.startup.quit(Services.startup.eRestart | Services.startup.eAttemptQuit);
}
} else {
- if (Services.prefs.getBoolPref("browser.restart.purgecache")) {
+ if (Services.prefs.getBoolPref("browser.restart_menu.purgecache")) {
Services.appinfo.invalidateCachesOnRestart();
}
Services.startup.quit(Services.startup.eRestart | Services.startup.eAttemptQuit);
diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js
index 5c4d12a351a03..16aef596acaa1 100644
--- a/browser/components/customizableui/content/panelUI.js
+++ b/browser/components/customizableui/content/panelUI.js
@@ -277,13 +277,13 @@ const PanelUI = {
case "popupshowing":
updateEditUIVisibility();
try {
- if (!Services.prefs.getBoolPref("browser.restart.showpanelmenubtn")) {
+ if (!Services.prefs.getBoolPref("browser.restart_menu.showpanelmenubtn")) {
document.getElementById("appMenu-restart-button").hidden = true;
} else {
document.getElementById("appMenu-restart-button").hidden = false;
}
} catch (e) {
- throw new Error("We're sorry but something has gone wrong with 'browser.restart.showpanelmenubtn'" + e);
+ throw new Error("We're sorry but something has gone wrong with 'browser.restart_menu.showpanelmenubtn'" + e);
}
// Fall through
case "popupshown":
diff --git a/browser/components/preferences/in-content/advanced.js b/browser/components/preferences/in-content/advanced.js
new file mode 100644
index 0000000000000..073b146b724bd
--- /dev/null
+++ b/browser/components/preferences/in-content/advanced.js
@@ -0,0 +1,72 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0.
+*/
+
+/* import-globals-from preferences.js */
+/* import-globals-from main.js */
+
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+
+Preferences.addAll([
+ { id: "browser.restart_menu.purgecache", type: "bool" },
+ { id: "browser.restart_menu.requireconfirm", type: "bool" },
+ { id: "browser.restart_menu.showpanelmenubtn", type: "bool" },
+ { id: "browser.tabs.duplicateTab", type: "bool" },
+ { id: "browser.tabs.copyurl", type: "bool" },
+ { id: "browser.tabs.copyurl.activetab", type: "bool" },
+ { id: "browser.tabs.copyallurls", type: "bool" },
+]);
+
+var gAdvancedPane = {
+ _inited: false,
+
+ /**
+ * Brings the appropriate tab to the front and initializes various bits of UI.
+ */
+ init() {
+ function setEventListener(aId, aEventType, aCallback) {
+ document.getElementById(aId)
+ .addEventListener(aEventType, aCallback.bind(gAdvancedPane));
+ }
+
+ this._inited = true;
+ var advancedPrefs = document.getElementById("advancedPrefs");
+
+ var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
+ if (preference.value !== null)
+ advancedPrefs.selectedIndex = preference.value;
+
+ setEventListener("advancedPrefs", "select",
+ gAdvancedPane.tabSelectionChanged);
+ },
+
+ /**
+ * Stores the identity of the current tab in preferences so that the selected
+ * tab can be persisted between openings of the preferences window.
+ */
+ tabSelectionChanged() {
+ if (!this._inited)
+ return;
+ var advancedPrefs = document.getElementById("advancedPrefs");
+ var preference = document.getElementById("browser.preferences.advanced.selectedTabIndex");
+
+ // tabSelectionChanged gets called twice due to the selectedIndex being set
+ // by both the selectedItem and selectedPanel callstacks. This guard is used
+ // to prevent double-counting in Telemetry.
+ if (preference.valueFromPreferences != advancedPrefs.selectedIndex) {
+ Services.telemetry
+ .getHistogramById("FX_PREFERENCES_CATEGORY_OPENED")
+ .add(telemetryBucketForCategory("advanced"));
+ }
+
+ preference.valueFromPreferences = advancedPrefs.selectedIndex;
+ },
+
+ observe(aSubject, aTopic, aData) {
+ switch (aTopic) {
+ case "nsPref:changed":
+ this.updateReadPrefs();
+ break;
+ }
+ },
+};
diff --git a/browser/components/preferences/in-content/advanced.xul b/browser/components/preferences/in-content/advanced.xul
new file mode 100644
index 0000000000000..5a347a55ced40
--- /dev/null
+++ b/browser/components/preferences/in-content/advanced.xul
@@ -0,0 +1,46 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
index bac45543a7b0a..9ea58f24920a4 100644
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -103,9 +103,9 @@ Preferences.addAll([
{ id: "browser.startup.page", type: "int" },
{ id: "browser.privatebrowsing.autostart", type: "bool" },
{ id: "browser.sessionstore.warnOnQuit", type: "bool" },
- { id: "browser.restart.purgecache", type: "bool" },
- { id: "browser.restart.requireconfirm", type: "bool" },
- { id: "browser.restart.showpanelmenubtn", type: "bool" },
+ { id: "browser.restart_menu.purgecache", type: "bool" },
+ { id: "browser.restart_menu.requireconfirm", type: "bool" },
+ { id: "browser.restart_menu.showpanelmenubtn", type: "bool" },
// Downloads
{ id: "browser.download.useDownloadDir", type: "bool" },
@@ -138,10 +138,6 @@ Preferences.addAll([
{ id: "browser.tabs.warnOnOpen", type: "bool" },
{ id: "browser.sessionstore.restore_on_demand", type: "bool" },
{ id: "browser.ctrlTab.recentlyUsedOrder", type: "bool" },
- { id: "browser.tabs.duplicateTab", type: "bool" },
- { id: "browser.tabs.copyurl", type: "bool" },
- { id: "browser.tabs.copyurl.activetab", type: "bool" },
- { id: "browser.tabs.copyallurls", type: "bool" },
// CFR
{
diff --git a/browser/components/preferences/in-content/main.xul b/browser/components/preferences/in-content/main.xul
index 16ddce06dd073..8482d63f92a1d 100644
--- a/browser/components/preferences/in-content/main.xul
+++ b/browser/components/preferences/in-content/main.xul
@@ -60,14 +60,21 @@
#endif
-
-
-
+
+
+
+
+
+
+
+
@@ -96,18 +103,6 @@
preference="browser.taskbar.previews.enable"/>
#endif
-
-
-
-
-
-
-
-
diff --git a/browser/components/preferences/in-content/preferences.js b/browser/components/preferences/in-content/preferences.js
index 2c247b8179408..e2cf48c747327 100644
--- a/browser/components/preferences/in-content/preferences.js
+++ b/browser/components/preferences/in-content/preferences.js
@@ -84,6 +84,7 @@ function init_all() {
register_module("paneSearch", gSearchPane);
register_module("panePrivacy", gPrivacyPane);
register_module("paneContainers", gContainersPane);
+ register_module("paneAdvanced", gAdvancedPane);
if (Services.prefs.getBoolPref("identity.fxaccounts.enabled")) {
document.getElementById("category-sync").hidden = false;
register_module("paneSync", gSyncPane);
diff --git a/browser/components/preferences/in-content/preferences.xul b/browser/components/preferences/in-content/preferences.xul
index 3503c201ba887..6158f22887e33 100644
--- a/browser/components/preferences/in-content/preferences.xul
+++ b/browser/components/preferences/in-content/preferences.xul
@@ -134,6 +134,17 @@
+
+
+
+
+
@@ -191,6 +202,7 @@
#include privacy.xul
#include containers.xul
#include sync.xul
+#include advanced.xul
diff --git a/browser/locales/en-US/browser/preferences/preferences.ftl b/browser/locales/en-US/browser/preferences/preferences.ftl
index c11c410663050..f1ea5f5ce6673 100644
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -1087,3 +1087,11 @@ choose-download-folder-title = Choose Download Folder:
# $service-name (String) - Name of a cloud storage provider like Dropbox, Google Drive, etc...
save-files-to-cloud-storage =
.label = Save files to { $service-name }
+
+restart-header = Restart Menu Item
+
+pane-advanced-header = Advanced
+category-advanced =
+ .tooltiptext = { pane-advanced-header }
+
+tabContextMenu-header = Tab Context Menu
diff --git a/browser/themes/shared/incontentprefs/advanced.svg b/browser/themes/shared/incontentprefs/advanced.svg
new file mode 100644
index 0000000000000..ffadb6d56332f
--- /dev/null
+++ b/browser/themes/shared/incontentprefs/advanced.svg
@@ -0,0 +1,27 @@
+
+
+
\ No newline at end of file
diff --git a/browser/themes/shared/incontentprefs/preferences.inc.css b/browser/themes/shared/incontentprefs/preferences.inc.css
index 8e2105415ea87..8a50f1dac7a5d 100644
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -963,3 +963,7 @@ richlistitem .text-link {
richlistitem .text-link:hover {
color: inherit;
}
+
+#category-advanced > .category-icon {
+ list-style-image: url("chrome://browser/skin/preferences/in-content/advanced.svg#advanced");
+}
diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn
index 573094ea9ee55..73f8cef260ff2 100644
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -270,3 +270,5 @@
skin/classic/browser/privatebrowsing/favicon.svg (../shared/privatebrowsing/favicon.svg)
skin/classic/browser/privatebrowsing/private-browsing.svg (../shared/privatebrowsing/private-browsing.svg)
skin/classic/browser/privatebrowsing/tracking-protection.svg (../shared/privatebrowsing/tracking-protection.svg)
+
+ skin/classic/browser/preferences/in-content/advanced.svg (../shared/incontentprefs/advanced.svg)