Update On Fri Sep 30 20:55:04 CEST 2022

This commit is contained in:
github-action[bot] 2022-09-30 20:55:05 +02:00
parent 82ff8ef763
commit 92d8879e59
972 changed files with 10987 additions and 14340 deletions

6
Cargo.lock generated
View file

@ -318,7 +318,7 @@ dependencies = [
[[package]]
name = "audioipc2"
version = "0.5.0"
source = "git+https://github.com/kinetiknz/audioipc-2?rev=ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb#ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb"
source = "git+https://github.com/kinetiknz/audioipc-2?rev=42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5#42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5"
dependencies = [
"arrayvec",
"ashmem",
@ -346,7 +346,7 @@ dependencies = [
[[package]]
name = "audioipc2-client"
version = "0.5.0"
source = "git+https://github.com/kinetiknz/audioipc-2?rev=ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb#ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb"
source = "git+https://github.com/kinetiknz/audioipc-2?rev=42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5#42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5"
dependencies = [
"audio_thread_priority",
"audioipc2",
@ -357,7 +357,7 @@ dependencies = [
[[package]]
name = "audioipc2-server"
version = "0.5.0"
source = "git+https://github.com/kinetiknz/audioipc-2?rev=ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb#ea7cabf8c9dc051a52ffb6cd7d2564b29b7428eb"
source = "git+https://github.com/kinetiknz/audioipc-2?rev=42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5#42eb59ab3b86cd43d3dbe37d159ce102a8eaf2a5"
dependencies = [
"audio_thread_priority",
"audioipc2",

View file

@ -9,8 +9,8 @@ var EXPORTED_SYMBOLS = ["AboutPrivateBrowsingParent"];
const { ASRouter } = ChromeUtils.import(
"resource://activity-stream/lib/ASRouter.jsm"
);
const { BrowserUtils } = ChromeUtils.import(
"resource://gre/modules/BrowserUtils.jsm"
const { BrowserUtils } = ChromeUtils.importESModule(
"resource://gre/modules/BrowserUtils.sys.mjs"
);
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"

View file

@ -12,11 +12,11 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
Region: "resource://gre/modules/Region.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
FXA_PWDMGR_HOST: "resource://gre/modules/FxAccountsCommon.js",
FXA_PWDMGR_REALM: "resource://gre/modules/FxAccountsCommon.js",
AddonManager: "resource://gre/modules/AddonManager.jsm",

View file

@ -27,11 +27,9 @@ ChromeUtils.defineModuleGetter(
"resource://gre/modules/E10SUtils.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
});
class MiddleMousePasteHandlerChild extends JSWindowActorChild {
handleEvent(clickEvent) {

View file

@ -14,15 +14,18 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
InlineSpellCheckerContent:
"resource://gre/modules/InlineSpellCheckerContent.sys.mjs",
SelectionUtils: "resource://gre/modules/SelectionUtils.sys.mjs",
SpellCheckHelper: "resource://gre/modules/InlineSpellChecker.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
E10SUtils: "resource://gre/modules/E10SUtils.jsm",
SpellCheckHelper: "resource://gre/modules/InlineSpellChecker.jsm",
LoginManagerChild: "resource://gre/modules/LoginManagerChild.jsm",
WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
SelectionUtils: "resource://gre/modules/SelectionUtils.jsm",
InlineSpellCheckerContent:
"resource://gre/modules/InlineSpellCheckerContent.jsm",
ContentDOMReference: "resource://gre/modules/ContentDOMReference.jsm",
});

View file

@ -7,9 +7,7 @@
* the display of the help panel on invalid elements.
*/
const { LayoutUtils } = ChromeUtils.import(
"resource://gre/modules/LayoutUtils.jsm"
);
import { LayoutUtils } from "resource://gre/modules/LayoutUtils.sys.mjs";
export class FormValidationChild extends JSWindowActorChild {
constructor() {

View file

@ -22,11 +22,9 @@ const PREF_SSL_IMPACT_ROOTS = [
const lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
"BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
});
class CaptivePortalObserver {
constructor(actor) {

View file

@ -0,0 +1,8 @@
WIN32_MODULE_COMPANYNAME=Mozilla Corporation
WIN32_MODULE_COPYRIGHT=©Firefox and Mozilla Developers; available under the MPL 2 license.
WIN32_MODULE_PRODUCTVERSION=@MOZ_APP_WINVERSION@
WIN32_MODULE_PRODUCTVERSION_STRING=@MOZ_APP_VERSION@
WIN32_MODULE_TRADEMARKS=Firefox is a Trademark of The Mozilla Foundation.
WIN32_MODULE_DESCRIPTION=@MOZ_APP_DISPLAYNAME@
WIN32_MODULE_PRODUCTNAME=@MOZ_APP_DISPLAYNAME@
WIN32_MODULE_NAME=@MOZ_APP_DISPLAYNAME@

View file

@ -2722,3 +2722,10 @@ pref("browser.places.snapshots.expiration.userManaged.days", 420);
pref("browser.firefox-view.feature-tour", "{\"message\":\"FIREFOX_VIEW_FEATURE_TOUR\",\"screen\":\"FIREFOX_VIEW_SPOTLIGHT\",\"complete\":false}");
// Number of times the user visited about:firefoxview
pref("browser.firefox-view.view-count", 0);
// Enables cookie banner handling in Nightly in Private Browsing Mode. See
// StaticPrefList.yaml for a description of the prefs.
#ifdef NIGHTLY_BUILD
pref("cookiebanners.service.mode.privateBrowsing", 1);
pref("cookiebanners.bannerClicking.enabled", true);
#endif

View file

@ -10,10 +10,14 @@
var { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
ChromeUtils.defineESModuleGetters(this, {
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, {
AppUpdater: "resource:///modules/AppUpdater.jsm",
DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
UpdateUtils: "resource://gre/modules/UpdateUtils.jsm",
});
var UPDATING_MIN_DISPLAY_TIME_MS = 1500;
@ -80,7 +84,7 @@ appUpdater.prototype = {
},
get selectedPanel() {
return this.updateDeck.querySelector(".selected");
return this.updateDeck.selectedPanel;
},
_onAppUpdateStatus(status, ...args) {
@ -94,22 +98,23 @@ appUpdater.prototype = {
case AppUpdater.STATUS.OTHER_INSTANCE_HANDLING_UPDATES:
this.selectPanel("otherInstanceHandlingUpdates");
break;
case AppUpdater.STATUS.DOWNLOADING:
this.downloadStatus = document.getElementById("downloadStatus");
case AppUpdater.STATUS.DOWNLOADING: {
let downloadStatus = document.getElementById("downloadStatus");
if (!args.length) {
this.downloadStatus.textContent = DownloadUtils.getTransferTotal(
downloadStatus.textContent = DownloadUtils.getTransferTotal(
0,
this.update.selectedPatch.size
);
this.selectPanel("downloading");
} else {
let [progress, max] = args;
this.downloadStatus.textContent = DownloadUtils.getTransferTotal(
downloadStatus.textContent = DownloadUtils.getTransferTotal(
progress,
max
);
}
break;
}
case AppUpdater.STATUS.STAGING:
this.selectPanel("applying");
break;
@ -172,6 +177,9 @@ appUpdater.prototype = {
icons.className = aChildID;
}
// Make sure to select the panel before potentially auto-focusing the button.
this.updateDeck.selectedPanel = panel;
let button = panel.querySelector("button");
if (button) {
if (aChildID == "downloadAndInstall") {
@ -192,8 +200,6 @@ appUpdater.prototype = {
"update.downloadAndInstallButton.accesskey"
);
}
this.selectedPanel?.classList.remove("selected");
panel.classList.add("selected");
if (
this.options.buttonAutoFocus &&
(!document.commandDispatcher.focusedElement || // don't steal the focus
@ -202,9 +208,6 @@ appUpdater.prototype = {
// except from the other buttons
button.focus();
}
} else {
this.selectedPanel?.classList.remove("selected");
panel.classList.add("selected");
}
},

View file

@ -3,14 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@namespace html "http://www.w3.org/1999/xhtml";
:root { -moz-box-layout: flex }
#aboutDialog {
width: 620px;
/* Set an explicit line-height to avoid discrepancies in 'auto' spacing
across screens with different device DPI, which may cause font metrics
to round differently. */
line-height: 1.5;
}
#aboutDialogContainer {
-moz-box-flex: 1;
}
#rightBox {
background-image: url("chrome://branding/content/about-wordmark.svg");
background-repeat: no-repeat;
@ -60,16 +65,19 @@
padding-inline-start: 0;
}
#updateDeck > *:not(.selected) {
visibility: hidden;
#updateDeck {
align-items: center;
}
#updateButton,
#updateDeck > hbox > label {
#updateButton {
margin-inline-start: 0;
padding-inline-start: 0;
}
#updateDeck description {
margin: 0;
}
.update-throbber {
width: 16px;
min-height: 16px;
@ -116,7 +124,7 @@ description > .text-link {
#icons > .icon {
-moz-context-properties: fill;
margin: 5px;
margin: 10px 5px;
width: 16px;
height: 16px;
}

View file

@ -109,7 +109,8 @@ async function init(aEvent) {
document.getElementById("release").hidden = false;
}
window.sizeToContent();
const prefWidth = parseFloat(document.documentElement.getAttribute("width"));
window.sizeToContentConstrained(prefWidth, 0);
if (AppConstants.platform == "macosx") {
window.moveTo(

View file

@ -12,6 +12,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="aboutDialog"
windowtype="Browser:About"
width="620"
onload="init(event);"
#ifdef MOZ_UPDATER
onunload="onUnload(event);"
@ -37,7 +38,7 @@
<script src="chrome://browser/content/aboutDialog.js"/>
<vbox id="aboutDialogContainer">
<html:div id="aboutDialogContainer">
<hbox id="clientBox">
<vbox id="leftBox" flex="1"/>
<vbox id="rightBox" flex="1">
@ -65,59 +66,44 @@
<html:img class="icon apply" src="chrome://global/skin/icons/reload.svg" role="presentation"/>
</html:div>
<vbox>
<stack id="updateDeck" orient="vertical">
<hbox id="checkForUpdates" align="center">
<button id="checkForUpdatesButton" align="start"
<deck id="updateDeck" orient="vertical">
<description id="checkForUpdates">
<button id="checkForUpdatesButton"
data-l10n-id="update-checkForUpdatesButton"
oncommand="gAppUpdater.checkForUpdates();"/>
<spacer flex="1"/>
</hbox>
<hbox id="downloadAndInstall" align="center">
<button id="downloadAndInstallButton" align="start"
</description>
<description id="downloadAndInstall">
<button id="downloadAndInstallButton"
oncommand="gAppUpdater.startDownload();"/>
<!-- label and accesskey will be filled by JS -->
<spacer flex="1"/>
</hbox>
<hbox id="apply" align="center">
<button id="updateButton" align="start"
</description>
<description id="apply">
<button id="updateButton"
data-l10n-id="update-updateButton"
oncommand="gAppUpdater.buttonRestartAfterDownload();"/>
<spacer flex="1"/>
</hbox>
<hbox id="checkingForUpdates" align="center">
<label data-l10n-id="update-checkingForUpdates"/>
</hbox>
<hbox id="downloading" data-l10n-id="update-downloading-message" align="center">
</description>
<description id="checkingForUpdates" data-l10n-id="update-checkingForUpdates"/>
<description id="downloading" data-l10n-id="update-downloading-message">
<label id="downloadStatus" data-l10n-name="download-status"/>
</hbox>
<hbox id="applying" align="center">
<label data-l10n-id="update-applying"/>
</hbox>
<hbox id="downloadFailed" align="center" data-l10n-id="update-failed">
</description>
<description id="applying" data-l10n-id="update-applying"/>
<description id="downloadFailed" data-l10n-id="update-failed">
<label id="failedLink" is="text-link" data-l10n-name="failed-link"/>
</hbox>
<hbox id="policyDisabled" align="center">
<label data-l10n-id="update-adminDisabled"/>
</hbox>
<hbox id="noUpdatesFound" align="center">
<label data-l10n-id="update-noUpdatesFound"/>
</hbox>
<hbox id="otherInstanceHandlingUpdates" align="center">
<label data-l10n-id="update-otherInstanceHandlingUpdates"/>
</hbox>
<hbox id="manualUpdate" align="center" data-l10n-id="update-manual">
</description>
<description id="policyDisabled" data-l10n-id="update-adminDisabled"/>
<description id="noUpdatesFound" data-l10n-id="update-noUpdatesFound"/>
<description id="otherInstanceHandlingUpdates" data-l10n-id="update-otherInstanceHandlingUpdates"/>
<description id="manualUpdate" data-l10n-id="update-manual">
<label class="manualLink" is="text-link" data-l10n-name="manual-link"/>
</hbox>
<hbox id="unsupportedSystem" align="center" data-l10n-id="update-unsupported">
</description>
<description id="unsupportedSystem" data-l10n-id="update-unsupported">
<label id="unsupportedLink" is="text-link" data-l10n-name="unsupported-link"/>
</hbox>
<hbox id="restarting" align="center">
<label data-l10n-id="update-restarting"/>
</hbox>
<hbox id="internalError" align="center" data-l10n-id="update-internal-error">
</description>
<description id="restarting" data-l10n-id="update-restarting"/>
<description id="internalError" data-l10n-id="update-internal-error">
<label class="manualLink" is="text-link" data-l10n-name="manual-link"/>
</hbox>
</stack>
</description>
</deck>
<!-- This HBOX is duplicated above without class="update" -->
<hbox align="baseline">
<label id="version" class="update"/>
@ -162,7 +148,7 @@
</hbox>
<description id="trademark" data-l10n-id="trademarkInfo"></description>
</vbox>
</vbox>
</html:div>
<keyset>
<key keycode="VK_ESCAPE" oncommand="window.close();"/>

View file

@ -365,6 +365,9 @@ var ctrlTab = {
return;
}
// If the tab is already in the list, remove it before re-inserting it.
this.detachTab(aTab);
if (aPos == 0) {
this._recentlyUsedTabs.unshift(aTab);
} else if (aPos) {
@ -566,7 +569,6 @@ var ctrlTab = {
}
break;
case "TabSelect":
this.detachTab(event.target);
this.attachTab(event.target, 0);
// If the previous tab was hidden (e.g. Firefox View), remove it from
// the list when it's deselected.

View file

@ -14,7 +14,9 @@ var gDataNotificationInfoBar = {
_DATA_REPORTING_NOTIFICATION: "data-reporting",
get _log() {
let { Log } = ChromeUtils.import("resource://gre/modules/Log.jsm");
let { Log } = ChromeUtils.importESModule(
"resource://gre/modules/Log.sys.mjs"
);
delete this._log;
return (this._log = Log.repository.getLoggerWithMessagePrefix(
"Toolkit.Telemetry",

View file

@ -17,21 +17,16 @@ XPCOMUtils.defineLazyPreferenceGetter(
false
);
/* Work around the pref callback being run after the document has been unlinked.
See bug 1543537. */
var docWeak = Cu.getWeakReference(document);
XPCOMUtils.defineLazyPreferenceGetter(
this,
"SHOW_OTHER_BOOKMARKS",
"browser.toolbars.bookmarks.showOtherBookmarks",
true,
(aPref, aPrevVal, aNewVal) => {
let doc = docWeak.get();
if (!doc) {
return;
}
BookmarkingUI.maybeShowOtherBookmarksFolder();
doc.getElementById("PlacesToolbar")?._placesView?.updateNodesVisibility();
document
.getElementById("PlacesToolbar")
?._placesView?.updateNodesVisibility();
}
);
ChromeUtils.defineModuleGetter(

View file

@ -662,10 +662,6 @@ var SidebarUI = {
},
};
/* Work around the pref callback being run after the document has been unlinked.
See bug 1543537. */
var docWeak = Cu.getWeakReference(document);
// Add getters related to the position here, since we will want them
// available for both startDelayedLoad and init.
XPCOMUtils.defineLazyPreferenceGetter(
@ -673,11 +669,5 @@ XPCOMUtils.defineLazyPreferenceGetter(
"_positionStart",
SidebarUI.POSITION_START_PREF,
true,
() => {
let doc = docWeak.get();
if (!doc) {
return;
}
SidebarUI.setPosition();
}
SidebarUI.setPosition.bind(SidebarUI)
);

View file

@ -347,7 +347,9 @@ var gSync = {
get log() {
if (!this._log) {
const { Log } = ChromeUtils.import("resource://gre/modules/Log.jsm");
const { Log } = ChromeUtils.importESModule(
"resource://gre/modules/Log.sys.mjs"
);
let syncLog = Log.repository.getLogger("Sync.Browser");
syncLog.manageLevelFromPref("services.sync.log.logger.browser");
this._log = syncLog;

View file

@ -16,13 +16,24 @@ ChromeUtils.import("resource://gre/modules/NotificationDB.jsm");
ChromeUtils.defineESModuleGetters(this, {
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
BrowserTelemetryUtils: "resource://gre/modules/BrowserTelemetryUtils.sys.mjs",
Color: "resource://gre/modules/Color.sys.mjs",
FirefoxViewNotificationManager:
"resource:///modules/firefox-view-notification-manager.sys.mjs",
LightweightThemeConsumer:
"resource://gre/modules/LightweightThemeConsumer.sys.mjs",
Log: "resource://gre/modules/Log.sys.mjs",
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
PictureInPicture: "resource://gre/modules/PictureInPicture.sys.mjs",
PlacesTransactions: "resource://gre/modules/PlacesTransactions.sys.mjs",
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
SubDialog: "resource://gre/modules/SubDialog.sys.mjs",
SubDialogManager: "resource://gre/modules/SubDialog.sys.mjs",
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
UrlbarInput: "resource:///modules/UrlbarInput.sys.mjs",
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
UrlbarProviderSearchTips:
@ -39,11 +50,9 @@ XPCOMUtils.defineLazyModuleGetters(this, {
AMTelemetry: "resource://gre/modules/AddonManager.jsm",
NewTabPagePreloading: "resource:///modules/NewTabPagePreloading.jsm",
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
BrowserTelemetryUtils: "resource://gre/modules/BrowserTelemetryUtils.jsm",
BrowserUIUtils: "resource:///modules/BrowserUIUtils.jsm",
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
CFRPageActions: "resource://activity-stream/lib/CFRPageActions.jsm",
Color: "resource://gre/modules/Color.jsm",
ContextualIdentityService:
"resource://gre/modules/ContextualIdentityService.jsm",
CustomizableUI: "resource:///modules/CustomizableUI.jsm",
@ -56,14 +65,10 @@ XPCOMUtils.defineLazyModuleGetters(this, {
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
ExtensionsUI: "resource:///modules/ExtensionsUI.jsm",
HomePage: "resource:///modules/HomePage.jsm",
LightweightThemeConsumer:
"resource://gre/modules/LightweightThemeConsumer.jsm",
Log: "resource://gre/modules/Log.jsm",
LoginHelper: "resource://gre/modules/LoginHelper.jsm",
LoginManagerParent: "resource://gre/modules/LoginManagerParent.jsm",
MigrationUtils: "resource:///modules/MigrationUtils.jsm",
NetUtil: "resource://gre/modules/NetUtil.jsm",
NewTabUtils: "resource://gre/modules/NewTabUtils.jsm",
OpenInTabsUtils: "resource:///modules/OpenInTabsUtils.jsm",
PageActions: "resource:///modules/PageActions.jsm",
PageThumbs: "resource://gre/modules/PageThumbs.jsm",
@ -73,7 +78,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
Pocket: "chrome://pocket/content/Pocket.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
ProcessHangMonitor: "resource:///modules/ProcessHangMonitor.jsm",
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
PromptUtils: "resource://gre/modules/SharedPromptUtils.jsm",
// TODO (Bug 1529552): Remove once old urlbar code goes away.
ReaderMode: "resource://gre/modules/ReaderMode.jsm",
@ -83,17 +87,13 @@ XPCOMUtils.defineLazyModuleGetters(this, {
SaveToPocket: "chrome://pocket/content/SaveToPocket.jsm",
SessionStartup: "resource:///modules/sessionstore/SessionStartup.jsm",
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
SiteDataManager: "resource:///modules/SiteDataManager.jsm",
SitePermissions: "resource:///modules/SitePermissions.jsm",
SubDialog: "resource://gre/modules/SubDialog.jsm",
SubDialogManager: "resource://gre/modules/SubDialog.jsm",
TabModalPrompt: "chrome://global/content/tabprompts.jsm",
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.jsm",
Translation: "resource:///modules/translation/TranslationParent.jsm",
UITour: "resource:///modules/UITour.jsm",
UpdateUtils: "resource://gre/modules/UpdateUtils.jsm",
Weave: "resource://services-sync/main.js",
WebNavigationFrames: "resource://gre/modules/WebNavigationFrames.jsm",
webrtcUI: "resource:///modules/webrtcUI.jsm",
@ -421,16 +421,16 @@ XPCOMUtils.defineLazyGetter(this, "gNotificationBox", () => {
});
XPCOMUtils.defineLazyGetter(this, "InlineSpellCheckerUI", () => {
let { InlineSpellChecker } = ChromeUtils.import(
"resource://gre/modules/InlineSpellChecker.jsm"
let { InlineSpellChecker } = ChromeUtils.importESModule(
"resource://gre/modules/InlineSpellChecker.sys.mjs"
);
return new InlineSpellChecker();
});
XPCOMUtils.defineLazyGetter(this, "PopupNotifications", () => {
// eslint-disable-next-line no-shadow
let { PopupNotifications } = ChromeUtils.import(
"resource://gre/modules/PopupNotifications.jsm"
let { PopupNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/PopupNotifications.sys.mjs"
);
try {
// Hide all PopupNotifications while the URL is being edited and the

View file

@ -257,8 +257,8 @@ class nsContextMenu {
this.selectionInfo = this.contentData.selectionInfo;
this.actor = this.contentData.actor;
} else {
const { SelectionUtils } = ChromeUtils.import(
"resource://gre/modules/SelectionUtils.jsm"
const { SelectionUtils } = ChromeUtils.importESModule(
"resource://gre/modules/SelectionUtils.sys.mjs"
);
this.browser = this.ownerDoc.defaultView.docShell.chromeEventHandler;

View file

@ -2,6 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#mainDeck {
padding: 10px;
min-height: 0;
}
#viewGroup > radio > .radio-label-box {
-moz-box-orient: vertical;
-moz-box-align: center;

View file

@ -5,8 +5,8 @@
const appStartup = Services.startup;
const { ResetProfile } = ChromeUtils.import(
"resource://gre/modules/ResetProfile.jsm"
const { ResetProfile } = ChromeUtils.importESModule(
"resource://gre/modules/ResetProfile.sys.mjs"
);
var defaultToReset = false;

View file

@ -20,13 +20,9 @@ const THIRD_PARTY_FAVICON_URI =
TEST_THIRD_PARTY_SITE +
"/browser/browser/base/content/test/favicons/file_favicon.png";
ChromeUtils.defineModuleGetter(
this,
"PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
});
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();

View file

@ -82,8 +82,9 @@ add_task(async function() {
let updateChannel = null;
try {
updateChannel = ChromeUtils.import("resource://gre/modules/UpdateUtils.jsm")
.UpdateUtils.UpdateChannel;
updateChannel = ChromeUtils.importESModule(
"resource://gre/modules/UpdateUtils.sys.mjs"
).UpdateUtils.UpdateChannel;
} catch (ex) {}
if (!updateChannel) {
Assert.ok(

View file

@ -60,12 +60,12 @@ const startupPhases = {
"resource:///modules/BrowserUsageTelemetry.jsm",
"resource:///modules/ContentCrashHandlers.jsm",
"resource:///modules/ShellService.jsm",
"resource://gre/modules/NewTabUtils.jsm",
"resource://gre/modules/NewTabUtils.sys.mjs",
"resource://gre/modules/PageThumbs.jsm",
"resource://gre/modules/PlacesUtils.sys.mjs",
"resource://gre/modules/Preferences.jsm",
"resource://gre/modules/SearchService.sys.mjs",
"resource://gre/modules/Sqlite.jsm",
"resource://gre/modules/Sqlite.sys.mjs",
]),
services: new Set(["@mozilla.org/browser/search-service;1"]),
},
@ -100,7 +100,7 @@ const startupPhases = {
"before becoming idle": {
denylist: {
modules: new Set([
"resource://gre/modules/AsyncPrefs.jsm",
"resource://gre/modules/AsyncPrefs.sys.mjs",
"resource://gre/modules/LoginManagerContextMenu.jsm",
"resource://gre/modules/osfile.jsm",
"resource://pdf.js/PdfStreamConverter.jsm",

View file

@ -29,7 +29,7 @@ const known_scripts = {
"resource://gre/modules/XPCOMUtils.sys.mjs",
// Logging related
"resource://gre/modules/Log.jsm",
"resource://gre/modules/Log.sys.mjs",
// Browser front-end
"resource:///actors/AboutReaderChild.sys.mjs",
@ -78,6 +78,9 @@ const intermittently_loaded_scripts = {
// may not load early enough for the test.
"resource://webcompat/AboutCompat.jsm",
// Cookie banner handling.
"resource://gre/actors/CookieBannerChild.jsm",
// Test related
"chrome://remote/content/marionette/actors/MarionetteEventsChild.jsm",
"chrome://remote/content/shared/Log.jsm",

View file

@ -42,7 +42,7 @@ const known_scripts = {
"resource://gre/modules/XPCOMUtils.sys.mjs",
// Logging related
"resource://gre/modules/Log.jsm",
"resource://gre/modules/Log.sys.mjs",
// Browser front-end
"resource:///actors/PageStyleChild.jsm",
@ -67,6 +67,9 @@ const intermittently_loaded_scripts = {
modules: new Set([
"resource://gre/modules/nsAsyncShutdown.jsm",
// Cookie banner handling.
"resource://gre/actors/CookieBannerChild.jsm",
// Test related
"chrome://remote/content/marionette/actors/MarionetteEventsChild.jsm",
"chrome://remote/content/shared/Log.jsm",

View file

@ -4,12 +4,8 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
ChromeUtils.defineESModuleGetters(this, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
this,
"PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm"
);
// Various tests in this directory may define gTestBrowser, to use as the
// default browser under test in some of the functions below.

View file

@ -2,7 +2,9 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
const { Sqlite } = ChromeUtils.import("resource://gre/modules/Sqlite.jsm");
const { Sqlite } = ChromeUtils.importESModule(
"resource://gre/modules/Sqlite.sys.mjs"
);
XPCOMUtils.defineLazyServiceGetter(
this,

View file

@ -46,7 +46,7 @@ const TEST_CASES = [
},
{
type: "resource",
testURL: "resource://gre/modules/Log.jsm",
testURL: "resource://gre/modules/Log.sys.mjs",
img_url: `url("chrome://global/skin/icons/page-portrait.svg")`,
},
{

View file

@ -1,8 +1,6 @@
ChromeUtils.defineModuleGetter(
this,
"WindowsRegistry",
"resource://gre/modules/WindowsRegistry.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
});
function getFirefoxExecutableFile() {
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);

View file

@ -409,8 +409,8 @@ add_task(async function checkAllTheCSS() {
// Create a clean iframe to load all the files into. This needs to live at a
// chrome URI so that it's allowed to load and parse any styles.
let testFile = getRootDirectory(gTestPath) + "dummy_page.html";
let { HiddenFrame } = ChromeUtils.import(
"resource://gre/modules/HiddenFrame.jsm"
let { HiddenFrame } = ChromeUtils.importESModule(
"resource://gre/modules/HiddenFrame.sys.mjs"
);
let hiddenFrame = new HiddenFrame();
let win = await hiddenFrame.get();

View file

@ -15,8 +15,8 @@ const { CustomizableUITestUtils } = ChromeUtils.import(
"resource://testing-common/CustomizableUITestUtils.jsm"
);
const { AppMenuNotifications } = ChromeUtils.import(
"resource://gre/modules/AppMenuNotifications.jsm"
const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.sys.mjs"
);
// These are brand names, proper names, or other things that we expect to

View file

@ -3,8 +3,8 @@
"use strict";
const { AppMenuNotifications } = ChromeUtils.import(
"resource://gre/modules/AppMenuNotifications.jsm"
const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.sys.mjs"
);
add_task(async function test_unconfigured_no_badge() {

View file

@ -58,8 +58,8 @@ function promisePopupNotificationShown(name) {
}
function promiseAppMenuNotificationShown(id) {
const { AppMenuNotifications } = ChromeUtils.import(
"resource://gre/modules/AppMenuNotifications.jsm"
const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.sys.mjs"
);
return new Promise(resolve => {
function popupshown() {

View file

@ -11,9 +11,12 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
ChromeUtils.defineESModuleGetters(this, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, {
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
ContextualIdentityService:
"resource://gre/modules/ContextualIdentityService.jsm",

View file

@ -16,11 +16,14 @@ const { AppConstants } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
FirstStartup: "resource://gre/modules/FirstStartup.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
HeadlessShell: "resource:///modules/HeadlessShell.jsm",
HomePage: "resource:///modules/HomePage.jsm",
FirstStartup: "resource://gre/modules/FirstStartup.jsm",
LaterRun: "resource:///modules/LaterRun.jsm",
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",

View file

@ -19,10 +19,15 @@ const { AppConstants } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.sys.mjs",
BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
BookmarkJSONUtils: "resource://gre/modules/BookmarkJSONUtils.sys.mjs",
BrowserSearchTelemetry: "resource:///modules/BrowserSearchTelemetry.sys.mjs",
Integration: "resource://gre/modules/Integration.sys.mjs",
Interactions: "resource:///modules/Interactions.sys.mjs",
Log: "resource://gre/modules/Log.sys.mjs",
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
OsEnvironment: "resource://gre/modules/OsEnvironment.sys.mjs",
PageDataService: "resource:///modules/pagedata/PageDataService.sys.mjs",
PlacesBackups: "resource://gre/modules/PlacesBackups.sys.mjs",
PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.sys.mjs",
@ -30,16 +35,17 @@ ChromeUtils.defineESModuleGetters(lazy, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
ScreenshotsUtils: "resource:///modules/ScreenshotsUtils.sys.mjs",
SearchSERPTelemetry: "resource:///modules/SearchSERPTelemetry.sys.mjs",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
SnapshotMonitor: "resource:///modules/SnapshotMonitor.sys.mjs",
UrlbarPrefs: "resource:///modules/UrlbarPrefs.sys.mjs",
UrlbarQuickSuggest: "resource:///modules/UrlbarQuickSuggest.sys.mjs",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
ActorManagerParent: "resource://gre/modules/ActorManagerParent.jsm",
AddonManager: "resource://gre/modules/AddonManager.jsm",
AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.jsm",
ASRouterDefaultConfig:
"resource://activity-stream/lib/ASRouterDefaultConfig.jsm",
ASRouterNewTabHook: "resource://activity-stream/lib/ASRouterNewTabHook.jsm",
@ -63,16 +69,12 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
FeatureGate: "resource://featuregates/FeatureGate.jsm",
FxAccounts: "resource://gre/modules/FxAccounts.jsm",
HomePage: "resource:///modules/HomePage.jsm",
Integration: "resource://gre/modules/Integration.jsm",
Log: "resource://gre/modules/Log.jsm",
LoginBreaches: "resource:///modules/LoginBreaches.jsm",
NetUtil: "resource://gre/modules/NetUtil.jsm",
NewTabUtils: "resource://gre/modules/NewTabUtils.jsm",
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
Normandy: "resource://normandy/Normandy.jsm",
OnboardingMessageProvider:
"resource://activity-stream/lib/OnboardingMessageProvider.jsm",
OsEnvironment: "resource://gre/modules/OsEnvironment.jsm",
PageActions: "resource:///modules/PageActions.jsm",
PageThumbs: "resource://gre/modules/PageThumbs.jsm",
PdfJs: "resource://pdf.js/PdfJs.jsm",
@ -91,7 +93,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
SessionStartup: "resource:///modules/sessionstore/SessionStartup.jsm",
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
ShellService: "resource:///modules/ShellService.jsm",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
SpecialMessageActions:
"resource://messaging-system/lib/SpecialMessageActions.jsm",
TabCrashHandler: "resource:///modules/ContentCrashHandlers.jsm",
@ -100,7 +101,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
TRRRacer: "resource:///modules/TRRPerformance.jsm",
UIState: "resource://services-sync/UIState.jsm",
WebChannel: "resource://gre/modules/WebChannel.jsm",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.jsm",
});
if (AppConstants.MOZ_UPDATER) {
@ -1388,8 +1388,8 @@ BrowserGlue.prototype = {
return;
}
const { ResetProfile } = ChromeUtils.import(
"resource://gre/modules/ResetProfile.jsm"
const { ResetProfile } = ChromeUtils.importESModule(
"resource://gre/modules/ResetProfile.sys.mjs"
);
if (!ResetProfile.resetSupported()) {
return;
@ -1625,8 +1625,8 @@ BrowserGlue.prototype = {
);
channel.listen((id, data, target) => {
if (data.command == "request") {
let { Troubleshoot } = ChromeUtils.import(
"resource://gre/modules/Troubleshoot.jsm"
let { Troubleshoot } = ChromeUtils.importESModule(
"resource://gre/modules/Troubleshoot.sys.mjs"
);
Troubleshoot.snapshot(snapshotData => {
// for privacy we remove crash IDs and all preferences (but bug 1091944
@ -1657,8 +1657,8 @@ BrowserGlue.prototype = {
// Check if we were just re-installed and offer Firefox Reset
let updateChannel;
try {
updateChannel = ChromeUtils.import(
"resource://gre/modules/UpdateUtils.jsm"
updateChannel = ChromeUtils.importESModule(
"resource://gre/modules/UpdateUtils.sys.mjs"
).UpdateUtils.UpdateChannel;
} catch (ex) {}
if (updateChannel) {
@ -2320,8 +2320,8 @@ BrowserGlue.prototype = {
}
if (AppConstants.ASAN_REPORTER) {
var { AsanReporter } = ChromeUtils.import(
"resource://gre/modules/AsanReporter.jsm"
var { AsanReporter } = ChromeUtils.importESModule(
"resource://gre/modules/AsanReporter.sys.mjs"
);
AsanReporter.init();
}
@ -2940,8 +2940,8 @@ BrowserGlue.prototype = {
},
() => {
let { GMPInstallManager } = ChromeUtils.import(
"resource://gre/modules/GMPInstallManager.jsm"
let { GMPInstallManager } = ChromeUtils.importESModule(
"resource://gre/modules/GMPInstallManager.sys.mjs"
);
this._gmpInstallManager = new GMPInstallManager();
// We don't really care about the results, if someone is interested they

View file

@ -22,13 +22,16 @@ const { E10SUtils } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
OSKeyStore: "resource://gre/modules/OSKeyStore.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
LoginBreaches: "resource:///modules/LoginBreaches.jsm",
LoginHelper: "resource://gre/modules/LoginHelper.jsm",
LoginExport: "resource://gre/modules/LoginExport.jsm",
LoginCSVImport: "resource://gre/modules/LoginCSVImport.jsm",
MigrationUtils: "resource:///modules/MigrationUtils.jsm",
OSKeyStore: "resource://gre/modules/OSKeyStore.jsm",
UIState: "resource://services-sync/UIState.jsm",
});

View file

@ -8,8 +8,8 @@
* Test the export logins file picker appears.
*/
let { OSKeyStore } = ChromeUtils.import(
"resource://gre/modules/OSKeyStore.jsm"
let { OSKeyStore } = ChromeUtils.importESModule(
"resource://gre/modules/OSKeyStore.sys.mjs"
);
let { TelemetryTestUtils } = ChromeUtils.import(
"resource://testing-common/TelemetryTestUtils.jsm"

View file

@ -14,6 +14,10 @@ const { AppConstants } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
AddonManager: "resource://gre/modules/AddonManager.jsm",
AddonManagerPrivate: "resource://gre/modules/AddonManager.jsm",
@ -21,7 +25,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
CustomizableWidgets: "resource:///modules/CustomizableWidgets.jsm",
PanelMultiView: "resource:///modules/PanelMultiView.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.jsm",
HomePage: "resource:///modules/HomePage.jsm",
});

View file

@ -21,10 +21,13 @@ const { PrivateBrowsingUtils } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
ShortcutUtils: "resource://gre/modules/ShortcutUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
RecentlyClosedTabsAndWindowsMenuUtils:
"resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm",
ShortcutUtils: "resource://gre/modules/ShortcutUtils.jsm",
Sanitizer: "resource:///modules/Sanitizer.jsm",
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
});

View file

@ -2,16 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
ChromeUtils.defineModuleGetter(
this,
"AppMenuNotifications",
"resource://gre/modules/AppMenuNotifications.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
AppMenuNotifications: "resource://gre/modules/AppMenuNotifications.sys.mjs",
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
this,
"PanelMultiView",

View file

@ -1,7 +1,7 @@
"use strict";
const { AppMenuNotifications } = ChromeUtils.import(
"resource://gre/modules/AppMenuNotifications.jsm"
const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.sys.mjs"
);
/**

View file

@ -3,8 +3,8 @@
"use strict";
const { AppMenuNotifications } = ChromeUtils.import(
"resource://gre/modules/AppMenuNotifications.jsm"
const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.sys.mjs"
);
/**

View file

@ -1,7 +1,7 @@
"use strict";
const { AppMenuNotifications } = ChromeUtils.import(
"resource://gre/modules/AppMenuNotifications.jsm"
const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.sys.mjs"
);
add_task(async function testFullscreen() {

View file

@ -6,8 +6,8 @@
// error.
SimpleTest.ignoreAllUncaughtExceptions(true);
const { AppMenuNotifications } = ChromeUtils.import(
"resource://gre/modules/AppMenuNotifications.jsm"
const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.sys.mjs"
);
function waitForDocshellActivated() {

View file

@ -3,8 +3,8 @@
"use strict";
const { AppMenuNotifications } = ChromeUtils.import(
"resource://gre/modules/AppMenuNotifications.jsm"
const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.sys.mjs"
);
add_task(async function testModals() {

View file

@ -1,7 +1,7 @@
"use strict";
const { AppMenuNotifications } = ChromeUtils.import(
"resource://gre/modules/AppMenuNotifications.jsm"
const { AppMenuNotifications } = ChromeUtils.importESModule(
"resource://gre/modules/AppMenuNotifications.sys.mjs"
);
/**

View file

@ -361,8 +361,8 @@ DistributionCustomizer.prototype = {
return;
}
let { ProfileAge } = ChromeUtils.import(
"resource://gre/modules/ProfileAge.jsm"
let { ProfileAge } = ChromeUtils.importESModule(
"resource://gre/modules/ProfileAge.sys.mjs"
);
let profileAge = await ProfileAge();
let resetDate = await profileAge.reset;

View file

@ -5,8 +5,8 @@
"use strict";
const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
const { PromiseUtils } = ChromeUtils.import(
"resource://gre/modules/PromiseUtils.jsm"
const { PromiseUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PromiseUtils.sys.mjs"
);
const { TestUtils } = ChromeUtils.import(

View file

@ -18,6 +18,7 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
UrlbarUtils: "resource:///modules/UrlbarUtils.sys.mjs",
});
@ -26,7 +27,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
Downloads: "resource://gre/modules/Downloads.jsm",
DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
});
XPCOMUtils.defineLazyServiceGetter(
@ -43,8 +43,8 @@ XPCOMUtils.defineLazyServiceGetter(
Ci.nsIApplicationReputationService
);
const { Integration } = ChromeUtils.import(
"resource://gre/modules/Integration.jsm"
const { Integration } = ChromeUtils.importESModule(
"resource://gre/modules/Integration.sys.mjs"
);
Integration.downloads.defineModuleGetter(

View file

@ -37,11 +37,9 @@ XPCOMUtils.defineLazyServiceGetter(
"nsIMIMEService"
);
ChromeUtils.defineModuleGetter(
lazy,
"Integration",
"resource://gre/modules/Integration.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
Integration: "resource://gre/modules/Integration.sys.mjs",
});
const PREF_BRANCH = "browser.download.viewableInternally.";
const PREF_ENABLED_TYPES = PREF_BRANCH + "enabledTypes";

View file

@ -8,6 +8,7 @@ var { XPCOMUtils } = ChromeUtils.importESModule(
);
ChromeUtils.defineESModuleGetters(this, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
@ -16,7 +17,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
Downloads: "resource://gre/modules/Downloads.jsm",
DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
DownloadsViewUI: "resource:///modules/DownloadsViewUI.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
NetUtil: "resource://gre/modules/NetUtil.jsm",
});

View file

@ -40,22 +40,18 @@ ChromeUtils.defineModuleGetter(
"DownloadsViewUI",
"resource:///modules/DownloadsViewUI.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"FileUtils",
"resource://gre/modules/FileUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
this,
"NetUtil",
"resource://gre/modules/NetUtil.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
const { Integration } = ChromeUtils.import(
"resource://gre/modules/Integration.jsm"
const { Integration } = ChromeUtils.importESModule(
"resource://gre/modules/Integration.sys.mjs"
);
/* global DownloadIntegration */

View file

@ -50,13 +50,6 @@ const DownloadsButton = {
*/
_customizing: false,
/**
* Indicates whether the button has been torn down.
* TODO: This is used for a temporary workaround for bug 1543537 and should be
* removed when fixed.
*/
_uninitialized: false,
/**
* This function is called asynchronously just after window initialization.
*
@ -171,9 +164,6 @@ const DownloadsButton = {
},
checkForAutoHide() {
if (this._uninitialized) {
return;
}
let button = this._placeholder;
if (
!this._customizing &&
@ -236,7 +226,6 @@ const DownloadsButton = {
},
uninit() {
this._uninitialized = true;
CustomizableUI.removeListener(this);
},

View file

@ -19,12 +19,8 @@ ChromeUtils.defineModuleGetter(
"DownloadsCommon",
"resource:///modules/DownloadsCommon.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"FileUtils",
"resource://gre/modules/FileUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(

View file

@ -8,11 +8,9 @@ ChromeUtils.defineModuleGetter(
"DownloadsCommon",
"resource:///modules/DownloadsCommon.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"FileUtils",
"resource://gre/modules/FileUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
this,
"FileTestUtils",

View file

@ -11,8 +11,8 @@ const SVG_MIME = "image/svg+xml";
const AVIF_MIME = "image/avif";
const WEBP_MIME = "image/webp";
const { Integration } = ChromeUtils.import(
"resource://gre/modules/Integration.jsm"
const { Integration } = ChromeUtils.importESModule(
"resource://gre/modules/Integration.sys.mjs"
);
const {
DownloadsViewableInternally,

View file

@ -26,6 +26,7 @@ XPCOMUtils.defineLazyServiceGetters(lazy, {
ChromeUtils.defineESModuleGetters(lazy, {
BookmarksPolicies: "resource:///modules/policies/BookmarksPolicies.sys.mjs",
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
ProxyPolicies: "resource:///modules/policies/ProxyPolicies.sys.mjs",
WebsiteFilter: "resource:///modules/policies/WebsiteFilter.sys.mjs",
});
@ -33,7 +34,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
XPCOMUtils.defineLazyModuleGetters(lazy, {
AddonManager: "resource://gre/modules/AddonManager.jsm",
CustomizableUI: "resource:///modules/CustomizableUI.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
});
const PREF_LOGLEVEL = "browser.policies.loglevel";

View file

@ -2,11 +2,9 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
ChromeUtils.defineModuleGetter(
this,
"UpdateUtils",
"resource://gre/modules/UpdateUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
});
async function test_app_update_auto(expectedEnabled, expectedLocked) {
let actualEnabled = await UpdateUtils.getAppUpdateAutoEnabled();

View file

@ -2,11 +2,9 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
ChromeUtils.defineModuleGetter(
this,
"UpdateUtils",
"resource://gre/modules/UpdateUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
});
var updateService = Cc["@mozilla.org/updates/update-service;1"].getService(
Ci.nsIApplicationUpdateService
);

View file

@ -2,11 +2,9 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
ChromeUtils.defineModuleGetter(
this,
"UpdateUtils",
"resource://gre/modules/UpdateUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
});
const PREF_NAME = "app.update.background.enabled";

View file

@ -2,8 +2,8 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
let { ResetProfile } = ChromeUtils.import(
"resource://gre/modules/ResetProfile.jsm"
let { ResetProfile } = ChromeUtils.importESModule(
"resource://gre/modules/ResetProfile.sys.mjs"
);
// For this test to work properly, this profile actually needs to be

View file

@ -20,13 +20,9 @@ ChromeUtils.defineModuleGetter(
"BrowserWindowTracker",
"resource:///modules/BrowserWindowTracker.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
});
var { ExtensionError } = ExtensionUtils;

View file

@ -26,11 +26,9 @@ ChromeUtils.defineModuleGetter(
"PrivateBrowsingUtils",
"resource://gre/modules/PrivateBrowsingUtils.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
this,
"SessionStore",

View file

@ -6,9 +6,12 @@
"use strict";
ChromeUtils.defineESModuleGetters(this, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, {
AboutNewTab: "resource:///modules/AboutNewTab.jsm",
NewTabUtils: "resource://gre/modules/NewTabUtils.jsm",
shortURL: "resource://activity-stream/lib/ShortURL.jsm",
getSearchProvider: "resource://activity-stream/lib/SearchShortcuts.jsm",
});

View file

@ -7,14 +7,18 @@
// element's `open` property to go back to being `false` if forced to true
// synchronously in response to keydown.
async function focusButtonAndPressKeyWithDelay(key, elem, modifiers) {
let focused = BrowserTestUtils.waitForEvent(elem, "focus", true);
elem.setAttribute("tabindex", "-1");
elem.focus();
elem.removeAttribute("tabindex");
await focused;
EventUtils.synthesizeKey(key, { type: "keydown", modifiers });
await new Promise(executeSoon);
EventUtils.synthesizeKey(key, { type: "keyup", modifiers });
let blurred = BrowserTestUtils.waitForEvent(elem, "blur", true);
elem.blur();
await blurred;
}
// This test verifies that pressing enter while a page action is focused
@ -23,29 +27,25 @@ add_task(async function testKeyBrowserAction() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
browser_action: {},
background: {
persistent: false,
scripts: ["background.js"],
},
},
files: {
"background.js": async function background() {
let counter = 0;
async background() {
let counter = 0;
function onClicked() {
dump("clicked\n");
counter++;
}
browser.browserAction.onClicked.addListener(() => {
counter++;
});
browser.browserAction.onClicked.addListener(onClicked);
browser.test.onMessage.addListener(async msg => {
browser.test.assertEq(
"checkCounter",
msg,
"expected check counter message"
);
browser.test.sendMessage("counter", counter);
});
browser.test.onMessage.addListener(async msg => {
browser.test.sendMessage("counter", counter);
});
browser.test.sendMessage("ready");
},
browser.test.sendMessage("ready");
},
});
@ -53,9 +53,12 @@ add_task(async function testKeyBrowserAction() {
await extension.awaitMessage("ready");
let elem = getBrowserActionWidget(extension).forWindow(window).node;
await promiseAnimationFrame(window);
await showBrowserAction(extension, window);
await focusButtonAndPressKeyWithDelay(" ", elem, {});
extension.sendMessage("checkCounter", {});
extension.sendMessage("checkCounter");
let counter = await extension.awaitMessage("counter");
is(counter, 1, "Key only triggered button once");

View file

@ -5,8 +5,8 @@
/* import-globals-from ../../../../../toolkit/components/extensions/test/mochitest/head_webrequest.js */
loadTestSubscript("head_webrequest.js");
const { HiddenFrame } = ChromeUtils.import(
"resource://gre/modules/HiddenFrame.jsm"
const { HiddenFrame } = ChromeUtils.importESModule(
"resource://gre/modules/HiddenFrame.sys.mjs"
);
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

View file

@ -10,11 +10,14 @@ const { AppConstants } = ChromeUtils.import(
);
// eslint-disable-next-line no-unused-vars
ChromeUtils.defineESModuleGetters(this, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, {
Extension: "resource://gre/modules/Extension.jsm",
ExtensionData: "resource://gre/modules/Extension.jsm",
ExtensionTestUtils: "resource://testing-common/ExtensionXPCShellUtils.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
HttpServer: "resource://testing-common/httpd.js",
NetUtil: "resource://gre/modules/NetUtil.jsm",
Schemas: "resource://gre/modules/Schemas.jsm",

View file

@ -5,10 +5,14 @@
const { AddonTestUtils } = ChromeUtils.import(
"resource://testing-common/AddonTestUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(this, {
AddonManager: "resource://gre/modules/AddonManager.jsm",
HomePage: "resource:///modules/HomePage.jsm",
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
RemoteSettings: "resource://services-settings/remote-settings.js",
sinon: "resource://testing-common/Sinon.jsm",
});

View file

@ -3,8 +3,8 @@
const { PlacesUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PlacesUtils.sys.mjs"
);
const { NewTabUtils } = ChromeUtils.import(
"resource://gre/modules/NewTabUtils.jsm"
const { NewTabUtils } = ChromeUtils.importESModule(
"resource://gre/modules/NewTabUtils.sys.mjs"
);
const { PlacesTestUtils } = ChromeUtils.importESModule(
"resource://testing-common/PlacesTestUtils.sys.mjs"

View file

@ -34,12 +34,8 @@ XPCOMUtils.defineLazyPreferenceGetter(
_handlePrefChange
);
/* Work around the pref callback being run after the document has been unlinked.
See bug 1543537. */
const docWeak = Cu.getWeakReference(document);
async function _handlePrefChange() {
const doc = docWeak.get();
if (!doc || doc.visibilityState === "hidden") {
if (document.visibilityState === "hidden") {
return;
}
let prefVal = lazy.featureTourProgress;
@ -50,7 +46,7 @@ async function _handlePrefChange() {
CURRENT_SCREEN = null;
} else if (prefVal.screen !== CURRENT_SCREEN?.id) {
READY = false;
const container = doc.getElementById(CONTAINER_ID);
const container = document.getElementById(CONTAINER_ID);
container?.classList.add("hidden");
// wait for fade out transition
setTimeout(async () => {

View file

@ -12,8 +12,12 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
);
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
Log: "resource://gre/modules/Log.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
Log: "resource://gre/modules/Log.jsm",
UIState: "resource://services-sync/UIState.jsm",
SyncedTabs: "resource://services-sync/SyncedTabs.jsm",
Weave: "resource://services-sync/main.js",

View file

@ -7,12 +7,8 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
);
const lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
"BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
});

View file

@ -4,8 +4,8 @@
"use strict";
const { JsonSchema } = ChromeUtils.import(
"resource://gre/modules/JsonSchema.jsm"
const { JsonSchema } = ChromeUtils.importESModule(
"resource://gre/modules/JsonSchema.sys.mjs"
);
const { TelemetryArchive } = ChromeUtils.import(

View file

@ -18,10 +18,7 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
Sqlite: "resource://gre/modules/Sqlite.jsm",
Sqlite: "resource://gre/modules/Sqlite.sys.mjs",
});
XPCOMUtils.defineLazyGetter(

View file

@ -20,7 +20,9 @@ const { MigrationUtils, MigratorPrototype } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
PlacesBackups: "resource://gre/modules/PlacesBackups.sys.mjs",
ProfileAge: "resource://gre/modules/ProfileAge.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
@ -28,16 +30,6 @@ ChromeUtils.defineModuleGetter(
"resource:///modules/sessionstore/SessionMigration.jsm"
);
ChromeUtils.defineModuleGetter(lazy, "OS", "resource://gre/modules/osfile.jsm");
ChromeUtils.defineModuleGetter(
lazy,
"FileUtils",
"resource://gre/modules/FileUtils.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"ProfileAge",
"resource://gre/modules/ProfileAge.jsm"
);
function FirefoxProfileMigrator() {
this.wrappedJSObject = this; // for testing...

View file

@ -18,12 +18,8 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"WindowsRegistry",
"resource://gre/modules/WindowsRegistry.jsm"
);
const { ctypes } = ChromeUtils.import("resource://gre/modules/ctypes.jsm");
const EDGE_COOKIE_PATH_OPTIONS = ["", "#!001\\", "#!002\\"];

View file

@ -21,32 +21,16 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
BookmarkHTMLUtils: "resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
ResponsivenessMonitor: "resource://gre/modules/ResponsivenessMonitor.sys.mjs",
Sqlite: "resource://gre/modules/Sqlite.sys.mjs",
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"LoginHelper",
"resource://gre/modules/LoginHelper.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"PromiseUtils",
"resource://gre/modules/PromiseUtils.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"ResponsivenessMonitor",
"resource://gre/modules/ResponsivenessMonitor.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"Sqlite",
"resource://gre/modules/Sqlite.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"WindowsRegistry",
"resource://gre/modules/WindowsRegistry.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"setTimeout",

View file

@ -4,8 +4,8 @@
"use strict";
const { FileUtils } = ChromeUtils.import(
"resource://gre/modules/FileUtils.jsm"
const { FileUtils } = ChromeUtils.importESModule(
"resource://gre/modules/FileUtils.sys.mjs"
);
const { OS } = ChromeUtils.import("resource://gre/modules/osfile.jsm");
const { MigrationUtils, MigratorPrototype } = ChromeUtils.import(
@ -14,14 +14,10 @@ const { MigrationUtils, MigratorPrototype } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
"PropertyListUtils",
"resource://gre/modules/PropertyListUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
PlacesUIUtils: "resource:///modules/PlacesUIUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
PropertyListUtils: "resource://gre/modules/PropertyListUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,

View file

@ -13,8 +13,8 @@ var { PlacesUtils } = ChromeUtils.importESModule(
var { Preferences } = ChromeUtils.import(
"resource://gre/modules/Preferences.jsm"
);
var { PromiseUtils } = ChromeUtils.import(
"resource://gre/modules/PromiseUtils.jsm"
var { PromiseUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PromiseUtils.sys.mjs"
);
var { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
@ -26,16 +26,10 @@ var { PlacesTestUtils } = ChromeUtils.importESModule(
"resource://testing-common/PlacesTestUtils.sys.mjs"
);
ChromeUtils.defineModuleGetter(
this,
"FileUtils",
"resource://gre/modules/FileUtils.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"Sqlite",
"resource://gre/modules/Sqlite.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
Sqlite: "resource://gre/modules/Sqlite.sys.mjs",
});
// Initialize profile.
var gProfD = do_get_profile();

View file

@ -13,12 +13,13 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
PromiseUtils: "resource://gre/modules/PromiseUtils.sys.mjs",
Region: "resource://gre/modules/Region.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
AddonManager: "resource://gre/modules/AddonManager.jsm",
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
BuiltInThemes: "resource:///modules/BuiltInThemes.jsm",
FxAccounts: "resource://gre/modules/FxAccounts.jsm",
MigrationUtils: "resource:///modules/MigrationUtils.jsm",
@ -28,7 +29,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
"resource://activity-stream/aboutwelcome/lib/AboutWelcomeTelemetry.jsm",
AboutWelcomeDefaults:
"resource://activity-stream/aboutwelcome/lib/AboutWelcomeDefaults.jsm",
PromiseUtils: "resource://gre/modules/PromiseUtils.jsm",
ShellService: "resource:///modules/ShellService.jsm",
LangPackMatcher: "resource://gre/modules/LangPackMatcher.jsm",
});

View file

@ -221,6 +221,11 @@ html {
--mr-screen-background-color: #62697A;
}
}
@media (prefers-contrast) {
.onboardingContainer {
--mr-screen-background-color: #F8F6F4;
}
}
@media (prefers-contrast: more) {
.onboardingContainer {
background-color: var(--in-content-page-background);

View file

@ -14,11 +14,14 @@ const { AppConstants } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
AddonRepository: "resource://gre/modules/addons/AddonRepository.jsm",
AttributionCode: "resource:///modules/AttributionCode.jsm",
BuiltInThemes: "resource:///modules/BuiltInThemes.jsm",
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
});
XPCOMUtils.defineLazyPreferenceGetter(

View file

@ -89,6 +89,10 @@ html {
--mr-screen-background-color: #62697A;
}
@media (prefers-contrast) {
--mr-screen-background-color: #F8F6F4;
}
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Ubuntu',
'Helvetica Neue', sans-serif;
font-size: 16px;

View file

@ -12,8 +12,8 @@ const { XPCOMUtils } = ChromeUtils.importESModule(
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
const { NewTabUtils } = ChromeUtils.import(
"resource://gre/modules/NewTabUtils.jsm"
const { NewTabUtils } = ChromeUtils.importESModule(
"resource://gre/modules/NewTabUtils.sys.mjs"
);
const { ShellService } = ChromeUtils.import(
"resource:///modules/ShellService.jsm"
@ -22,6 +22,7 @@ const { ShellService } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
ProfileAge: "resource://gre/modules/ProfileAge.sys.mjs",
Region: "resource://gre/modules/Region.sys.mjs",
});
@ -29,7 +30,6 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
ASRouterPreferences: "resource://activity-stream/lib/ASRouterPreferences.jsm",
AddonManager: "resource://gre/modules/AddonManager.jsm",
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.jsm",
ProfileAge: "resource://gre/modules/ProfileAge.jsm",
TelemetryEnvironment: "resource://gre/modules/TelemetryEnvironment.jsm",
AttributionCode: "resource:///modules/AttributionCode.jsm",
TargetingContext: "resource://messaging-system/targeting/Targeting.jsm",

View file

@ -11,10 +11,10 @@ const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
AboutReaderParent: "resource:///actors/AboutReaderParent.sys.mjs",
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
EveryWindow: "resource:///modules/EveryWindow.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
});

View file

@ -4,11 +4,9 @@
const lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
"IndexedDB",
"resource://gre/modules/IndexedDB.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
IndexedDB: "resource://gre/modules/IndexedDB.sys.mjs",
});
class ActivityStreamStorage {
/**

View file

@ -4,11 +4,10 @@
"use strict";
const lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
Region: "resource://gre/modules/Region.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"RemoteSettings",
@ -25,9 +24,6 @@ const { setTimeout, clearTimeout } = ChromeUtils.import(
const { actionTypes: at, actionCreators: ac } = ChromeUtils.import(
"resource://activity-stream/common/Actions.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
Region: "resource://gre/modules/Region.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"PersistentCache",

View file

@ -11,11 +11,14 @@ const { actionTypes: at } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
FileUtils: "resource://gre/modules/FileUtils.sys.mjs",
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
DownloadsCommon: "resource:///modules/DownloadsCommon.jsm",
DownloadsViewUI: "resource:///modules/DownloadsViewUI.jsm",
FileUtils: "resource://gre/modules/FileUtils.jsm",
NewTabUtils: "resource://gre/modules/NewTabUtils.jsm",
});
const DOWNLOAD_CHANGED_DELAY_TIME = 1000; // time in ms to delay timer for downloads changed events

View file

@ -16,13 +16,9 @@ const { RemoteSettings } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
const MIN_FAVICON_SIZE = 96;

View file

@ -33,11 +33,9 @@ ChromeUtils.defineModuleGetter(
"LinksCache",
"resource://activity-stream/lib/LinksCache.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"Screenshots",

View file

@ -16,8 +16,11 @@ const { FeatureCalloutMessages } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(lazy, {
BrowserUtils: "resource://gre/modules/BrowserUtils.jsm",
ShellService: "resource:///modules/ShellService.jsm",
BuiltInThemes: "resource:///modules/BuiltInThemes.jsm",
NimbusFeatures: "resource://nimbus/ExperimentAPI.jsm",
@ -299,7 +302,7 @@ const BASE_MESSAGES = () => [
string_id: "mr2022-onboarding-colorway-label-default",
},
tooltip: {
string_id: "mr2022-onboarding-colorway-tooltip-default",
string_id: "mr2022-onboarding-colorway-tooltip-default2",
},
description: {
string_id: "mr2022-onboarding-colorway-description-default",
@ -399,6 +402,7 @@ const BASE_MESSAGES = () => [
label: {
string_id: "mr2022-onboarding-existing-colorway-checkbox-label",
},
defaultValue: true,
action: {
type: "CONFIGURE_HOMEPAGE",
data: { homePage: "default", newtab: "default" },

View file

@ -17,11 +17,9 @@ ChromeUtils.defineModuleGetter(
"resource://services-settings/Utils.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
const { BasePromiseWorker } = ChromeUtils.import(
"resource://gre/modules/PromiseWorker.jsm"

View file

@ -21,19 +21,15 @@ const { AboutNewTab } = ChromeUtils.import(
const lazy = {};
ChromeUtils.defineModuleGetter(
lazy,
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"PartnerLinkAttribution",
"resource:///modules/PartnerLinkAttribution.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"PrivateBrowsingUtils",

View file

@ -3,9 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { JSONFile } = ChromeUtils.import("resource://gre/modules/JSONFile.jsm");
const { PromiseUtils } = ChromeUtils.import(
"resource://gre/modules/PromiseUtils.jsm"
const { JSONFile } = ChromeUtils.importESModule(
"resource://gre/modules/JSONFile.sys.mjs"
);
const { PromiseUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PromiseUtils.sys.mjs"
);
const { RemoteSettings } = ChromeUtils.import(
"resource://services-settings/remote-settings.js"

View file

@ -43,11 +43,9 @@ ChromeUtils.defineModuleGetter(
"UTEventReporting",
"resource://activity-stream/lib/UTEventReporting.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"UpdateUtils",
"resource://gre/modules/UpdateUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
UpdateUtils: "resource://gre/modules/UpdateUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"HomePage",

View file

@ -47,11 +47,10 @@ ChromeUtils.defineModuleGetter(
"LinksCache",
"resource://activity-stream/lib/LinksCache.jsm"
);
ChromeUtils.defineModuleGetter(
lazy,
"NewTabUtils",
"resource://gre/modules/NewTabUtils.jsm"
);
ChromeUtils.defineESModuleGetters(lazy, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
Region: "resource://gre/modules/Region.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"Screenshots",
@ -67,9 +66,6 @@ ChromeUtils.defineModuleGetter(
"RemoteSettings",
"resource://services-settings/remote-settings.js"
);
ChromeUtils.defineESModuleGetters(lazy, {
Region: "resource://gre/modules/Region.sys.mjs",
});
XPCOMUtils.defineLazyGetter(lazy, "log", () => {
const { Logger } = ChromeUtils.import(

View file

@ -3,10 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { NewTabUtils } = ChromeUtils.import(
"resource://gre/modules/NewTabUtils.jsm"
);
const { actionTypes: at, actionCreators: ac } = ChromeUtils.import(
"resource://activity-stream/common/Actions.jsm"
);
@ -24,6 +20,11 @@ const { PersistentCache } = ChromeUtils.import(
);
const lazy = {};
ChromeUtils.defineESModuleGetters(lazy, {
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
lazy,
"pktApi",
@ -252,7 +253,7 @@ class TopStoriesFeed {
}
const calcResult = items
.filter(s => !NewTabUtils.blockedLinks.isBlocked({ url: s.url }))
.filter(s => !lazy.NewTabUtils.blockedLinks.isBlocked({ url: s.url }))
.map(s => {
let mapped = {
guid: s.id,

Some files were not shown because too many files have changed in this diff Show more