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. + + + +