diff --git a/browser/base/content/aboutDialog.css b/browser/base/content/aboutDialog.css index baeeada7a211..5b718b52e985 100644 --- a/browser/base/content/aboutDialog.css +++ b/browser/base/content/aboutDialog.css @@ -26,6 +26,13 @@ padding: 15px 10px 0; } +#release { + font-weight: bold; + font-size: 125%; + margin-top: 10px; + margin-inline-start: 0; +} + #version { font-weight: bold; margin-top: 10px; diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js index 1e2eff07f288..6765b377da56 100644 --- a/browser/base/content/aboutDialog.js +++ b/browser/base/content/aboutDialog.js @@ -78,6 +78,9 @@ function init(aEvent) { currentChannelText.hidden = true; } + if (AppConstants.MOZ_UPDATE_CHANNEL == "esr") { + document.getElementById("release").hidden = false; + } if (AppConstants.platform == "macosx") { // it may not be sized at this point, and we need its width to calculate its position window.sizeToContent(); diff --git a/browser/base/content/aboutDialog.xul b/browser/base/content/aboutDialog.xul index 9f771d9b53e2..6740a722b95d 100644 --- a/browser/base/content/aboutDialog.xul +++ b/browser/base/content/aboutDialog.xul @@ -45,6 +45,10 @@ + #expand diff --git a/browser/base/content/pageinfo/security.js b/browser/base/content/pageinfo/security.js index 2d6c5fb1d396..fef0a90cb961 100644 --- a/browser/base/content/pageinfo/security.js +++ b/browser/base/content/pageinfo/security.js @@ -294,10 +294,7 @@ function setText(id, value) { if (element.localName == "textbox" || element.localName == "label") element.value = value; else { - if (element.hasChildNodes()) - element.firstChild.remove(); - var textNode = document.createTextNode(value); - element.appendChild(textNode); + element.textContent = value; } } diff --git a/browser/components/enterprisepolicies/Policies.jsm b/browser/components/enterprisepolicies/Policies.jsm index 27b767295656..c0b7d4e61ab9 100644 --- a/browser/components/enterprisepolicies/Policies.jsm +++ b/browser/components/enterprisepolicies/Policies.jsm @@ -298,9 +298,11 @@ var Policies = { setAndLockPref("pref.browser.homepage.disable_button.bookmark_page", true); setAndLockPref("pref.browser.homepage.disable_button.restore_default", true); } else { + setDefaultPref("browser.startup.homepage", homepages); + setDefaultPref("browser.startup.page", 1); runOncePerModification("setHomepage", homepages, () => { - Services.prefs.setStringPref("browser.startup.homepage", homepages); - Services.prefs.setIntPref("browser.startup.page", 1); + Services.prefs.clearUserPref("browser.startup.homepage"); + Services.prefs.clearUserPref("browser.startup.page"); }); } } diff --git a/browser/components/enterprisepolicies/tests/EnterprisePolicyTesting.jsm b/browser/components/enterprisepolicies/tests/EnterprisePolicyTesting.jsm index b2de9abffacc..0f3c78d8ce5f 100644 --- a/browser/components/enterprisepolicies/tests/EnterprisePolicyTesting.jsm +++ b/browser/components/enterprisepolicies/tests/EnterprisePolicyTesting.jsm @@ -33,7 +33,6 @@ this.EnterprisePolicyTesting = { let promise = new Promise(resolve => { Services.obs.addObserver(function observer() { Services.obs.removeObserver(observer, "EnterprisePolicies:AllPoliciesApplied"); - dump(`bytesized: setupPolicyEngineWithJson resolving`); resolve(); }, "EnterprisePolicies:AllPoliciesApplied"); }); diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in index c15931bf7248..86341b2224a6 100644 --- a/browser/locales/Makefile.in +++ b/browser/locales/Makefile.in @@ -36,10 +36,10 @@ endif MOZ_SFX_PACKAGE=$(topsrcdir)/other-licenses/7zstub/firefox/7zSD.sfx MOZ_INSTALLER_PATH=$(topsrcdir)/browser/installer/windows -SEARCHPLUGINS_FILENAMES := $(shell $(call py_action,output_searchplugins_list,$(srcdir)/search/list.json $(AB_CD))) +SEARCHPLUGINS_FILENAMES := $(or $(shell $(call py_action,output_searchplugins_list,$(srcdir)/search/list.json $(AB_CD))), $(error Missing search plugins)) SEARCHPLUGINS_PATH := .deps/generated_$(AB_CD) SEARCHPLUGINS_TARGET := libs searchplugins -SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_FILENAMES)),$(or $(wildcard $(srcdir)/searchplugins/$(plugin)),$(warning Missing searchplugin: $(plugin)))) +SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_FILENAMES)),$(or $(wildcard $(srcdir)/searchplugins/$(plugin)),$(error Missing searchplugin: $(plugin)))) # Some locale-specific search plugins may have preprocessor directives, but the # default en-US ones do not. SEARCHPLUGINS_FLAGS := --silence-missing-directive-warnings diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure index d1050b21ac5b..fa066d5a9e35 100755 --- a/build/moz.configure/toolchain.configure +++ b/build/moz.configure/toolchain.configure @@ -1354,6 +1354,9 @@ def security_hardening_cflags(hardening_flag, asan, optimize, c_compiler, target # fno-common ----------------------------------------- # Do not merge variables for ASAN; can detect some subtle bugs if asan: + # clang-cl does not recognize the flag, it must be passed down to clang + if c_compiler.type == 'clang-cl': + flags.append("-Xclang") flags.append("-fno-common") return namespace( diff --git a/devtools/client/framework/ToolboxProcess.jsm b/devtools/client/framework/ToolboxProcess.jsm index f17af5737509..c6f3ead237fa 100644 --- a/devtools/client/framework/ToolboxProcess.jsm +++ b/devtools/client/framework/ToolboxProcess.jsm @@ -13,15 +13,15 @@ const { require, DevToolsLoader } = ChromeUtils.import("resource://devtools/shar const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm"); ChromeUtils.defineModuleGetter(this, "Subprocess", "resource://gre/modules/Subprocess.jsm"); +ChromeUtils.defineModuleGetter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm"); + XPCOMUtils.defineLazyGetter(this, "Telemetry", function() { return require("devtools/client/shared/telemetry"); }); XPCOMUtils.defineLazyGetter(this, "EventEmitter", function() { return require("devtools/shared/event-emitter"); }); -XPCOMUtils.defineLazyGetter(this, "system", function() { - return require("devtools/shared/system"); -}); + const promise = require("promise"); const Services = require("Services"); @@ -289,7 +289,7 @@ BrowserToolboxProcess.prototype = { // well. // // As an approximation of "isLocalBuild", check for an unofficial build. - if (!system.constants.MOZILLA_OFFICIAL) { + if (!AppConstants.MOZILLA_OFFICIAL) { args.push("-purgecaches"); } diff --git a/devtools/client/framework/toolbox-hosts.js b/devtools/client/framework/toolbox-hosts.js index 5a6fec64bb26..191502b06059 100644 --- a/devtools/client/framework/toolbox-hosts.js +++ b/devtools/client/framework/toolbox-hosts.js @@ -12,7 +12,7 @@ const defer = require("devtools/shared/defer"); const Services = require("Services"); const {DOMHelpers} = require("resource://devtools/client/shared/DOMHelpers.jsm"); -loader.lazyRequireGetter(this, "system", "devtools/shared/system"); +loader.lazyRequireGetter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm", true); loader.lazyRequireGetter(this, "gDevToolsBrowser", "devtools/client/framework/devtools-browser", true); /* A host should always allow this much space for the page to be displayed. @@ -295,7 +295,7 @@ WindowHost.prototype = { win.focus(); let key; - if (system.constants.platform === "macosx") { + if (AppConstants.platform === "macosx") { key = win.document.getElementById("toolbox-key-toggle-osx"); } else { key = win.document.getElementById("toolbox-key-toggle"); diff --git a/devtools/client/framework/toolbox-options.js b/devtools/client/framework/toolbox-options.js index f7fe1e0ec70a..7857c3899ec1 100644 --- a/devtools/client/framework/toolbox-options.js +++ b/devtools/client/framework/toolbox-options.js @@ -11,7 +11,7 @@ const {gDevTools} = require("devtools/client/framework/devtools"); const {LocalizationHelper} = require("devtools/shared/l10n"); const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties"); -loader.lazyRequireGetter(this, "system", "devtools/shared/system"); +loader.lazyRequireGetter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm", true); exports.OptionsPanel = OptionsPanel; @@ -310,7 +310,7 @@ OptionsPanel.prototype = { * Add common preferences enabled only on Nightly. */ setupNightlyOptions: function() { - let isNightly = system.constants.NIGHTLY_BUILD; + let isNightly = AppConstants.NIGHTLY_BUILD; if (!isNightly) { return; } diff --git a/devtools/client/inspector/boxmodel/test/head.js b/devtools/client/inspector/boxmodel/test/head.js index de86d08c4904..0b745e66b804 100644 --- a/devtools/client/inspector/boxmodel/test/head.js +++ b/devtools/client/inspector/boxmodel/test/head.js @@ -56,7 +56,7 @@ function isNodeVisible(node) { */ function waitForUpdate(inspector, waitForSelectionUpdate) { return new Promise(resolve => { - inspector.on("boxmodel-view-updated", function onUpdate(e, reasons) { + inspector.on("boxmodel-view-updated", function onUpdate(reasons) { // Wait for another update event if we are waiting for a selection related event. if (waitForSelectionUpdate && !reasons.includes("new-selection")) { return; diff --git a/devtools/client/inspector/breadcrumbs.js b/devtools/client/inspector/breadcrumbs.js index d6182ce3969a..2363cc6679f2 100644 --- a/devtools/client/inspector/breadcrumbs.js +++ b/devtools/client/inspector/breadcrumbs.js @@ -15,7 +15,7 @@ const MAX_LABEL_LENGTH = 40; const NS_XHTML = "http://www.w3.org/1999/xhtml"; const SCROLL_REPEAT_MS = 100; -const EventEmitter = require("devtools/shared/old-event-emitter"); +const EventEmitter = require("devtools/shared/event-emitter"); const KeyShortcuts = require("devtools/client/shared/key-shortcuts"); // Some margin may be required for visible element detection. @@ -401,11 +401,12 @@ HTMLBreadcrumbs.prototype = { this.breadcrumbsWidgetItemId = 0; this.update = this.update.bind(this); + this.updateWithMutations = this.updateWithMutations.bind(this); this.updateSelectors = this.updateSelectors.bind(this); this.selection.on("new-node-front", this.update); this.selection.on("pseudoclass", this.updateSelectors); this.selection.on("attribute-changed", this.updateSelectors); - this.inspector.on("markupmutation", this.update); + this.inspector.on("markupmutation", this.updateWithMutations); this.update(); }, @@ -612,7 +613,7 @@ HTMLBreadcrumbs.prototype = { this.selection.off("new-node-front", this.update); this.selection.off("pseudoclass", this.updateSelectors); this.selection.off("attribute-changed", this.updateSelectors); - this.inspector.off("markupmutation", this.update); + this.inspector.off("markupmutation", this.updateWithMutations); this.container.removeEventListener("click", this, true); this.container.removeEventListener("mouseover", this, true); @@ -829,6 +830,16 @@ HTMLBreadcrumbs.prototype = { return false; }, + /** + * Update the breadcrumbs display when a new node is selected and there are + * mutations. + * @param {Array} mutations An array of mutations in case this was called as + * the "markupmutation" event listener. + */ + updateWithMutations(mutations) { + return this.update("markupmutation", mutations); + }, + /** * Update the breadcrumbs display when a new node is selected. * @param {String} reason The reason for the update, if any. diff --git a/devtools/client/inspector/inspector-search.js b/devtools/client/inspector/inspector-search.js index 44df82db693b..e75ba15dc45e 100644 --- a/devtools/client/inspector/inspector-search.js +++ b/devtools/client/inspector/inspector-search.js @@ -8,7 +8,7 @@ const promise = require("promise"); const {Task} = require("devtools/shared/task"); const {KeyCodes} = require("devtools/client/shared/keycodes"); -const EventEmitter = require("devtools/shared/old-event-emitter"); +const EventEmitter = require("devtools/shared/event-emitter"); const AutocompletePopup = require("devtools/client/shared/autocomplete-popup"); const Services = require("Services"); diff --git a/devtools/client/inspector/inspector.js b/devtools/client/inspector/inspector.js index 7f5c20328c5a..a881834dc1f7 100644 --- a/devtools/client/inspector/inspector.js +++ b/devtools/client/inspector/inspector.js @@ -10,7 +10,7 @@ const Services = require("Services"); const promise = require("promise"); -const EventEmitter = require("devtools/shared/old-event-emitter"); +const EventEmitter = require("devtools/shared/event-emitter"); const {executeSoon} = require("devtools/shared/DevToolsUtils"); const {Task} = require("devtools/shared/task"); const {PrefObserver} = require("devtools/client/shared/prefs"); @@ -123,6 +123,7 @@ function Inspector(toolbox) { this._onBeforeNavigate = this._onBeforeNavigate.bind(this); this._onMarkupFrameLoad = this._onMarkupFrameLoad.bind(this); this._updateSearchResultsLabel = this._updateSearchResultsLabel.bind(this); + this._clearSearchResultsLabel = this._clearSearchResultsLabel.bind(this); this.onDetached = this.onDetached.bind(this); this.onMarkupLoaded = this.onMarkupLoaded.bind(this); @@ -383,7 +384,7 @@ Inspector.prototype = { this.searchResultsLabel = this.panelDoc.getElementById("inspector-searchlabel"); this.search = new InspectorSearch(this, this.searchBox, this.searchClearButton); - this.search.on("search-cleared", this._updateSearchResultsLabel); + this.search.on("search-cleared", this._clearSearchResultsLabel); this.search.on("search-result", this._updateSearchResultsLabel); let shortcuts = new KeyShortcuts({ @@ -405,9 +406,13 @@ Inspector.prototype = { return this.search.autocompleter; }, - _updateSearchResultsLabel: function(event, result) { + _clearSearchResultsLabel: function(result) { + return this._updateSearchResultsLabel(result, true); + }, + + _updateSearchResultsLabel: function(result, clear = false) { let str = ""; - if (event !== "search-cleared") { + if (!clear) { if (result) { str = INSPECTOR_L10N.getFormatStr( "inspector.searchResultsCount2", result.resultsIndex + 1, result.resultsLength); @@ -559,7 +564,7 @@ Inspector.prototype = { this.toolbox.emit("inspector-sidebar-resized", { width, height }); }, - onSidebarSelect: function(event, toolId) { + onSidebarSelect: function(toolId) { // Save the currently selected sidebar panel Services.prefs.setCharPref("devtools.inspector.activeSidebar", toolId); diff --git a/devtools/client/inspector/markup/markup.js b/devtools/client/inspector/markup/markup.js index 3c4b5b994dc4..c2d20ebc53d7 100644 --- a/devtools/client/inspector/markup/markup.js +++ b/devtools/client/inspector/markup/markup.js @@ -1283,7 +1283,7 @@ MarkupView.prototype = { let parentContainer = this.getContainer(removedNode.parentNode()); let childIndex = parentContainer.getChildContainers().indexOf(oldContainer); - let onMutations = this._removedNodeObserver = (e, mutations) => { + let onMutations = this._removedNodeObserver = mutations => { let isNodeRemovalMutation = false; for (let mutation of mutations) { let containsRemovedNode = mutation.removed && diff --git a/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation.js b/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation.js index 41e35afef240..07c4c5993588 100644 --- a/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation.js +++ b/devtools/client/inspector/markup/test/browser_markup_accessibility_navigation.js @@ -272,6 +272,6 @@ add_task(function* () { }); // Record all containers that are created dynamically into elms object. -function memorizeContainer(event, container) { +function memorizeContainer(container) { elms[`container-${containerID++}`] = container; } diff --git a/devtools/client/inspector/markup/test/browser_markup_mutation_01.js b/devtools/client/inspector/markup/test/browser_markup_mutation_01.js index f53794dcdae3..a5d440d338e0 100644 --- a/devtools/client/inspector/markup/test/browser_markup_mutation_01.js +++ b/devtools/client/inspector/markup/test/browser_markup_mutation_01.js @@ -319,7 +319,7 @@ add_task(function* () { // event or possibly in multiples. let seenMutations = 0; let promise = new Promise(resolve => { - inspector.on("markupmutation", function onmutation(e, mutations) { + inspector.on("markupmutation", function onmutation(mutations) { seenMutations += mutations.length; info("Receieved " + seenMutations + " mutations, expecting at least " + numMutations); diff --git a/devtools/client/inspector/markup/views/element-editor.js b/devtools/client/inspector/markup/views/element-editor.js index fc49f580c006..28494ad3476f 100644 --- a/devtools/client/inspector/markup/views/element-editor.js +++ b/devtools/client/inspector/markup/views/element-editor.js @@ -547,7 +547,7 @@ ElementEditor.prototype = { .filter(el => el.style.display != "none"); let attributeIndex = activeAttrs.indexOf(attrNode); - let onMutations = this._editedAttributeObserver = (e, mutations) => { + let onMutations = this._editedAttributeObserver = mutations => { let isDeletedAttribute = false; let isNewAttribute = false; diff --git a/devtools/client/inspector/rules/test/browser_rules_edit-property-increments.js b/devtools/client/inspector/rules/test/browser_rules_edit-property-increments.js index 9beb34d547b6..9d948d27936e 100644 --- a/devtools/client/inspector/rules/test/browser_rules_edit-property-increments.js +++ b/devtools/client/inspector/rules/test/browser_rules_edit-property-increments.js @@ -10,7 +10,7 @@ // Bug 1275446 - This test happen to hit the default timeout on linux32 requestLongerTimeout(2); -loader.lazyRequireGetter(this, "system", "devtools/shared/system"); +loader.lazyRequireGetter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm", true); const TEST_URI = `