diff --git a/.eslintignore b/.eslintignore index a676a160e1c7..3c8a9c3b2323 100644 --- a/.eslintignore +++ b/.eslintignore @@ -117,20 +117,9 @@ devtools/server/tests/browser/** devtools/server/tests/mochitest/** devtools/server/tests/unit/** devtools/shared/apps/** -devtools/shared/client/** -devtools/shared/discovery/** devtools/shared/gcli/** !devtools/shared/gcli/templater.js devtools/shared/heapsnapshot/** -devtools/shared/layout/** -devtools/shared/performance/** -!devtools/shared/platform/** -devtools/shared/qrcode/** -devtools/shared/security/** -devtools/shared/shims/** -devtools/shared/tests/** -!devtools/shared/tests/unit/test_csslexer.js -devtools/shared/touch/** devtools/shared/transport/** !devtools/shared/transport/transport.js !devtools/shared/transport/websocket-transport.js diff --git a/accessible/base/TextAttrs.cpp b/accessible/base/TextAttrs.cpp index 0f9e4f6feac5..cb66d1380b9c 100644 --- a/accessible/base/TextAttrs.cpp +++ b/accessible/base/TextAttrs.cpp @@ -374,10 +374,9 @@ bool TextAttrsMgr::BGColorTextAttr:: GetColor(nsIFrame* aFrame, nscolor* aColor) { - const nsStyleBackground* styleBackground = aFrame->StyleBackground(); - - if (NS_GET_A(styleBackground->mBackgroundColor) > 0) { - *aColor = styleBackground->mBackgroundColor; + nscolor backgroundColor = aFrame->StyleBackground()->BackgroundColor(aFrame); + if (NS_GET_A(backgroundColor) > 0) { + *aColor = backgroundColor; return true; } diff --git a/accessible/html/HTMLTableAccessible.cpp b/accessible/html/HTMLTableAccessible.cpp index b0cdc0932dbb..c87e7bee2120 100644 --- a/accessible/html/HTMLTableAccessible.cpp +++ b/accessible/html/HTMLTableAccessible.cpp @@ -1075,7 +1075,7 @@ HTMLTableAccessible::IsProbablyLayoutTable() if (child->Role() == roles::ROW) { prevRowColor = rowColor; nsIFrame* rowFrame = child->GetFrame(); - rowColor = rowFrame->StyleBackground()->mBackgroundColor; + rowColor = rowFrame->StyleBackground()->BackgroundColor(rowFrame); if (childIdx > 0 && prevRowColor != rowColor) RETURN_LAYOUT_ANSWER(false, "2 styles of row background color, non-bordered"); diff --git a/accessible/windows/ia2/ia2AccessibleComponent.cpp b/accessible/windows/ia2/ia2AccessibleComponent.cpp index f32c09d1e413..7ae62f381cd8 100644 --- a/accessible/windows/ia2/ia2AccessibleComponent.cpp +++ b/accessible/windows/ia2/ia2AccessibleComponent.cpp @@ -117,8 +117,9 @@ ia2AccessibleComponent::get_background(IA2Color* aBackground) return CO_E_OBJNOTCONNECTED; nsIFrame* frame = acc->GetFrame(); - if (frame) - *aBackground = frame->StyleBackground()->mBackgroundColor; + if (frame) { + *aBackground = frame->StyleBackground()->BackgroundColor(frame); + } return S_OK; diff --git a/addon-sdk/source/test/addons/embedded-webextension/main.js b/addon-sdk/source/test/addons/embedded-webextension/main.js index 4e51c2f9bb09..11249c50476a 100644 --- a/addon-sdk/source/test/addons/embedded-webextension/main.js +++ b/addon-sdk/source/test/addons/embedded-webextension/main.js @@ -135,7 +135,7 @@ exports.testEmbeddedWebExtensionContentScript = function* (assert, done) { browser.runtime.onConnect.addListener(portListener); }); - let url = "data:text/html;charset=utf-8,

Test Page

"; + let url = "http://example.org/"; var openedTab; tabs.once('open', function onOpen(tab) { diff --git a/addon-sdk/source/test/test-dev-panel.js b/addon-sdk/source/test/test-dev-panel.js index fb786b04304b..e1a3cf2b77b6 100644 --- a/addon-sdk/source/test/test-dev-panel.js +++ b/addon-sdk/source/test/test-dev-panel.js @@ -27,11 +27,13 @@ const test = function(unit) { return function*(assert) { assert.isRendered = (panel, toolbox) => { const doc = toolbox.doc; - assert.ok(doc.querySelector("[value='" + panel.label + "']"), - "panel.label is found in the developer toolbox DOM"); - assert.ok(doc.querySelector("[tooltiptext='" + panel.tooltip + "']"), - "panel.tooltip is found in the developer toolbox DOM"); - + assert.ok(Array.from(doc.querySelectorAll(".devtools-tab")) + .find(el => el.textContent === panel.label), + "panel.label is found in the developer toolbox DOM " + panel.label); + if (panel.tooltip) { + assert.ok(doc.querySelector("[title='" + panel.tooltip + "']"), + `panel.tooltip is found in the developer toolbox DOM "${panel.tooltip}"`); + } assert.ok(doc.querySelector("#toolbox-panel-" + panel.id), "toolbar panel with a matching id is present"); }; diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index eb1e38d858aa..3e199c84a8a4 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -1221,7 +1221,8 @@ pref("security.mixed_content.block_active_content", true); // Show degraded UI for http pages with password fields. pref("security.insecure_password.ui.enabled", true); -pref("security.insecure_field_warning.contextual.enabled", false); +// Show in-content login form warning UI for insecure login fields +pref("security.insecure_field_warning.contextual.enabled", true); // 1 = allow MITM for certificate pinning checks. pref("security.cert_pinning.enforcement_level", 1); diff --git a/browser/base/content/aboutDialog-appUpdater.js b/browser/base/content/aboutDialog-appUpdater.js index f78d2366f689..06fe9e18ce3b 100644 --- a/browser/base/content/aboutDialog-appUpdater.js +++ b/browser/base/content/aboutDialog-appUpdater.js @@ -168,7 +168,7 @@ appUpdater.prototype = * @param aChildID * The id of the deck's child to select, e.g. "apply". */ - selectPanel: function(aChildID) { + selectPanel(aChildID) { let panel = document.getElementById(aChildID); let button = panel.querySelector("button"); @@ -191,7 +191,7 @@ appUpdater.prototype = /** * Check for updates */ - checkForUpdates: function() { + checkForUpdates() { // Clear prefs that could prevent a user from discovering available updates. if (Services.prefs.prefHasUserValue(PREF_APP_UPDATE_CANCELATIONS_OSX)) { Services.prefs.clearUserPref(PREF_APP_UPDATE_CANCELATIONS_OSX); @@ -209,7 +209,7 @@ appUpdater.prototype = * Handles oncommand for the "Restart to Update" button * which is presented after the download has been downloaded. */ - buttonRestartAfterDownload: function() { + buttonRestartAfterDownload() { if (!this.isPending && !this.isApplied) { return; } @@ -249,7 +249,7 @@ appUpdater.prototype = /** * See nsIUpdateService.idl */ - onCheckComplete: function(aRequest, aUpdates, aUpdateCount) { + onCheckComplete(aRequest, aUpdates, aUpdateCount) { gAppUpdater.isChecking = false; gAppUpdater.update = gAppUpdater.aus. selectUpdate(aUpdates, aUpdates.length); @@ -281,7 +281,7 @@ appUpdater.prototype = /** * See nsIUpdateService.idl */ - onError: function(aRequest, aUpdate) { + onError(aRequest, aUpdate) { // Errors in the update check are treated as no updates found. If the // update check fails repeatedly without a success the user will be // notified with the normal app update user interface so this is safe. @@ -292,7 +292,7 @@ appUpdater.prototype = /** * See nsISupports.idl */ - QueryInterface: function(aIID) { + QueryInterface(aIID) { if (!aIID.equals(Components.interfaces.nsIUpdateCheckListener) && !aIID.equals(Components.interfaces.nsISupports)) throw Components.results.NS_ERROR_NO_INTERFACE; @@ -303,7 +303,7 @@ appUpdater.prototype = /** * Starts the download of an update mar. */ - startDownload: function() { + startDownload() { if (!this.update) this.update = this.um.activeUpdate; this.update.QueryInterface(Components.interfaces.nsIWritablePropertyBag); @@ -322,7 +322,7 @@ appUpdater.prototype = /** * Switches to the UI responsible for tracking the download. */ - setupDownloadingUI: function() { + setupDownloadingUI() { this.downloadStatus = document.getElementById("downloadStatus"); this.downloadStatus.value = DownloadUtils.getTransferTotal(0, this.update.selectedPatch.size); @@ -330,7 +330,7 @@ appUpdater.prototype = this.aus.addDownloadListener(this); }, - removeDownloadListener: function() { + removeDownloadListener() { if (this.aus) { this.aus.removeDownloadListener(this); } @@ -339,13 +339,13 @@ appUpdater.prototype = /** * See nsIRequestObserver.idl */ - onStartRequest: function(aRequest, aContext) { + onStartRequest(aRequest, aContext) { }, /** * See nsIRequestObserver.idl */ - onStopRequest: function(aRequest, aContext, aStatusCode) { + onStopRequest(aRequest, aContext, aStatusCode) { switch (aStatusCode) { case Components.results.NS_ERROR_UNEXPECTED: if (this.update.selectedPatch.state == "download-failed" && @@ -404,13 +404,13 @@ appUpdater.prototype = /** * See nsIProgressEventSink.idl */ - onStatus: function(aRequest, aContext, aStatus, aStatusArg) { + onStatus(aRequest, aContext, aStatus, aStatusArg) { }, /** * See nsIProgressEventSink.idl */ - onProgress: function(aRequest, aContext, aProgress, aProgressMax) { + onProgress(aRequest, aContext, aProgress, aProgressMax) { this.downloadStatus.value = DownloadUtils.getTransferTotal(aProgress, aProgressMax); }, @@ -418,7 +418,7 @@ appUpdater.prototype = /** * See nsISupports.idl */ - QueryInterface: function(aIID) { + QueryInterface(aIID) { if (!aIID.equals(Components.interfaces.nsIProgressEventSink) && !aIID.equals(Components.interfaces.nsIRequestObserver) && !aIID.equals(Components.interfaces.nsISupports)) diff --git a/browser/base/content/aboutaccounts/aboutaccounts.js b/browser/base/content/aboutaccounts/aboutaccounts.js index bb9d00b1627d..f1660ca4149a 100644 --- a/browser/base/content/aboutaccounts/aboutaccounts.js +++ b/browser/base/content/aboutaccounts/aboutaccounts.js @@ -101,7 +101,7 @@ function updateDisplayedEmail(user) { var wrapper = { iframe: null, - init: function(url, urlParams) { + init(url, urlParams) { // If a master-password is enabled, we want to encourage the user to // unlock it. Things still work if not, but the user will probably need // to re-auth next startup (in which case we will get here again and @@ -130,7 +130,7 @@ var wrapper = { webNav.loadURI(url, Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY, null, null, null); }, - retry: function() { + retry() { let webNav = this.iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation); webNav.loadURI(this.url, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null); }, @@ -140,7 +140,7 @@ var wrapper = { Ci.nsISupportsWeakReference, Ci.nsISupports]), - onStateChange: function(aWebProgress, aRequest, aState, aStatus) { + onStateChange(aWebProgress, aRequest, aState, aStatus) { let failure = false; // Captive portals sometimes redirect users @@ -164,19 +164,19 @@ var wrapper = { } }, - onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) { + onLocationChange(aWebProgress, aRequest, aLocation, aFlags) { if (aRequest && aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) { aRequest.cancel(Components.results.NS_BINDING_ABORTED); setErrorPage("networkError"); } }, - onProgressChange: function() {}, - onStatusChange: function() {}, - onSecurityChange: function() {}, + onProgressChange() {}, + onStatusChange() {}, + onSecurityChange() {}, }, - handleEvent: function(evt) { + handleEvent(evt) { switch (evt.type) { case "load": this.iframe.contentWindow.addEventListener("FirefoxAccountsCommand", this); @@ -194,7 +194,7 @@ var wrapper = { * * @param accountData the user's account data and credentials */ - onLogin: function(accountData) { + onLogin(accountData) { log("Received: 'login'. Data:" + JSON.stringify(accountData)); if (accountData.customizeSync) { @@ -251,16 +251,16 @@ var wrapper = { ); }, - onCanLinkAccount: function(accountData) { + onCanLinkAccount(accountData) { // We need to confirm a relink - see shouldAllowRelink for more let ok = shouldAllowRelink(accountData.email); - this.injectData("message", { status: "can_link_account", data: { ok: ok } }); + this.injectData("message", { status: "can_link_account", data: { ok } }); }, /** * onSignOut handler erases the current user's session from the fxaccounts service */ - onSignOut: function() { + onSignOut() { log("Received: 'sign_out'."); fxAccounts.signOut().then( @@ -269,7 +269,7 @@ var wrapper = { ); }, - handleRemoteCommand: function(evt) { + handleRemoteCommand(evt) { log('command: ' + evt.detail.command); let data = evt.detail.data; @@ -289,11 +289,11 @@ var wrapper = { } }, - injectData: function(type, content) { + injectData(type, content) { return fxAccounts.promiseAccountsSignUpURI().then(authUrl => { let data = { - type: type, - content: content + type, + content }; this.iframe.contentWindow.postMessage(data, authUrl); }) diff --git a/browser/base/content/abouthealthreport/abouthealth.js b/browser/base/content/abouthealthreport/abouthealth.js index a21248f62d48..ae59e238eb0a 100644 --- a/browser/base/content/abouthealthreport/abouthealth.js +++ b/browser/base/content/abouthealthreport/abouthealth.js @@ -15,28 +15,28 @@ const PREF_UNIFIED = "toolkit.telemetry.unified"; const PREF_REPORTING_URL = "datareporting.healthreport.about.reportUrl"; var healthReportWrapper = { - init: function() { + init() { let iframe = document.getElementById("remote-report"); iframe.addEventListener("load", healthReportWrapper.initRemotePage, false); iframe.src = this._getReportURI().spec; prefs.observe("uploadEnabled", this.updatePrefState, healthReportWrapper); }, - uninit: function() { + uninit() { prefs.ignore("uploadEnabled", this.updatePrefState, healthReportWrapper); }, - _getReportURI: function() { + _getReportURI() { let url = Services.urlFormatter.formatURLPref(PREF_REPORTING_URL); return Services.io.newURI(url, null, null); }, - setDataSubmission: function(enabled) { + setDataSubmission(enabled) { MozSelfSupport.healthReportDataSubmissionEnabled = enabled; this.updatePrefState(); }, - updatePrefState: function() { + updatePrefState() { try { let prefsObj = { enabled: MozSelfSupport.healthReportDataSubmissionEnabled, @@ -48,7 +48,7 @@ var healthReportWrapper = { } }, - sendTelemetryPingList: function() { + sendTelemetryPingList() { console.log("AboutHealthReport: Collecting Telemetry ping list."); MozSelfSupport.getTelemetryPingList().then((list) => { console.log("AboutHealthReport: Sending Telemetry ping list."); @@ -58,7 +58,7 @@ var healthReportWrapper = { }); }, - sendTelemetryPingData: function(pingId) { + sendTelemetryPingData(pingId) { console.log("AboutHealthReport: Collecting Telemetry ping data."); MozSelfSupport.getTelemetryPing(pingId).then((ping) => { console.log("AboutHealthReport: Sending Telemetry ping data."); @@ -75,7 +75,7 @@ var healthReportWrapper = { }); }, - sendCurrentEnvironment: function() { + sendCurrentEnvironment() { console.log("AboutHealthReport: Sending Telemetry environment data."); MozSelfSupport.getCurrentTelemetryEnvironment().then((environment) => { this.injectData("telemetry-current-environment-data", environment); @@ -84,7 +84,7 @@ var healthReportWrapper = { }); }, - sendCurrentPingData: function() { + sendCurrentPingData() { console.log("AboutHealthReport: Sending current Telemetry ping data."); MozSelfSupport.getCurrentTelemetrySubsessionPing().then((ping) => { this.injectData("telemetry-current-ping-data", ping); @@ -93,7 +93,7 @@ var healthReportWrapper = { }); }, - injectData: function(type, content) { + injectData(type, content) { let report = this._getReportURI(); // file URIs can't be used for targetOrigin, so we use "*" for this special case @@ -101,15 +101,15 @@ var healthReportWrapper = { let reportUrl = report.scheme == "file" ? "*" : report.spec; let data = { - type: type, - content: content + type, + content } let iframe = document.getElementById("remote-report"); iframe.contentWindow.postMessage(data, reportUrl); }, - handleRemoteCommand: function(evt) { + handleRemoteCommand(evt) { // Do an origin check to harden against the frame content being loaded from unexpected locations. let allowedPrincipal = Services.scriptSecurityManager.getCodebasePrincipal(this._getReportURI()); let targetPrincipal = evt.target.nodePrincipal; @@ -147,7 +147,7 @@ var healthReportWrapper = { } }, - initRemotePage: function() { + initRemotePage() { let iframe = document.getElementById("remote-report").contentDocument; iframe.addEventListener("RemoteHealthReportCommand", function onCommand(e) { healthReportWrapper.handleRemoteCommand(e); }, @@ -160,18 +160,18 @@ var healthReportWrapper = { ERROR_PAYLOAD_FAILED: 2, ERROR_PREFS_FAILED: 3, - reportFailure: function(error) { + reportFailure(error) { let details = { errorType: error, } healthReportWrapper.injectData("error", details); }, - handleInitFailure: function() { + handleInitFailure() { healthReportWrapper.reportFailure(healthReportWrapper.ERROR_INIT_FAILED); }, - handlePayloadFailure: function() { + handlePayloadFailure() { healthReportWrapper.reportFailure(healthReportWrapper.ERROR_PAYLOAD_FAILED); }, } diff --git a/browser/base/content/abouthome/aboutHome.js b/browser/base/content/abouthome/aboutHome.js index 498d9bd2ed31..54dd71b96493 100644 --- a/browser/base/content/abouthome/aboutHome.js +++ b/browser/base/content/abouthome/aboutHome.js @@ -186,18 +186,18 @@ function ensureSnippetsMapThen(aCallback) // The cache has been filled up, create the snippets map. gSnippetsMap = Object.freeze({ get: (aKey) => cache.get(aKey), - set: function(aKey, aValue) { + set(aKey, aValue) { db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite") .objectStore(SNIPPETS_OBJECTSTORE_NAME).put(aValue, aKey); return cache.set(aKey, aValue); }, has: (aKey) => cache.has(aKey), - delete: function(aKey) { + delete(aKey) { db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite") .objectStore(SNIPPETS_OBJECTSTORE_NAME).delete(aKey); return cache.delete(aKey); }, - clear: function() { + clear() { db.transaction(SNIPPETS_OBJECTSTORE_NAME, "readwrite") .objectStore(SNIPPETS_OBJECTSTORE_NAME).clear(); return cache.clear(); diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js index 1b52cde94901..8957c36c69e0 100644 --- a/browser/base/content/browser-addons.js +++ b/browser/base/content/browser-addons.js @@ -30,7 +30,7 @@ function removeNotificationOnEnd(notification, installs) { } const gXPInstallObserver = { - _findChildShell: function(aDocShell, aSoughtShell) + _findChildShell(aDocShell, aSoughtShell) { if (aDocShell == aSoughtShell) return aDocShell; @@ -45,7 +45,7 @@ const gXPInstallObserver = { return null; }, - _getBrowser: function(aDocShell) + _getBrowser(aDocShell) { for (let browser of gBrowser.browsers) { if (this._findChildShell(browser.docShell, aDocShell)) @@ -56,7 +56,7 @@ const gXPInstallObserver = { pendingInstalls: new WeakMap(), - showInstallConfirmation: function(browser, installInfo, height = undefined) { + showInstallConfirmation(browser, installInfo, height = undefined) { // If the confirmation notification is already open cache the installInfo // and the new confirmation will be shown later if (PopupNotifications.getNotification("addon-install-confirmation", browser)) { @@ -217,7 +217,7 @@ const gXPInstallObserver = { .add(Ci.nsISecurityUITelemetry.WARNING_CONFIRM_ADDON_INSTALL); }, - observe: function(aSubject, aTopic, aData) + observe(aSubject, aTopic, aData) { var brandBundle = document.getElementById("bundle_brand"); var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo); @@ -282,7 +282,7 @@ const gXPInstallObserver = { action = { label: gNavigatorBundle.getString("xpinstallPromptAllowButton"), accessKey: gNavigatorBundle.getString("xpinstallPromptAllowButton.accesskey"), - callback: function() { + callback() { secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_ADDON_ASKING_PREVENTED_CLICK_THROUGH); installInfo.install(); } @@ -433,7 +433,7 @@ const gXPInstallObserver = { action = { label: gNavigatorBundle.getString("addonInstallRestartButton"), accessKey: gNavigatorBundle.getString("addonInstallRestartButton.accesskey"), - callback: function() { + callback() { BrowserUtils.restartApplication(); } }; @@ -472,14 +472,14 @@ const gXPInstallObserver = { }; var LightWeightThemeWebInstaller = { - init: function() { + init() { let mm = window.messageManager; mm.addMessageListener("LightWeightThemeWebInstaller:Install", this); mm.addMessageListener("LightWeightThemeWebInstaller:Preview", this); mm.addMessageListener("LightWeightThemeWebInstaller:ResetPreview", this); }, - receiveMessage: function(message) { + receiveMessage(message) { // ignore requests from background tabs if (message.target != gBrowser.selectedBrowser) { return; @@ -503,7 +503,7 @@ var LightWeightThemeWebInstaller = { } }, - handleEvent: function(event) { + handleEvent(event) { switch (event.type) { case "TabSelect": { this._resetPreview(); @@ -519,7 +519,7 @@ var LightWeightThemeWebInstaller = { return this._manager = temp.LightweightThemeManager; }, - _installRequest: function(dataString, baseURI) { + _installRequest(dataString, baseURI) { let data = this._manager.parseTheme(dataString, baseURI); if (!data) { @@ -560,7 +560,7 @@ var LightWeightThemeWebInstaller = { let buttons = [{ label: allowButtonText, accessKey: allowButtonAccesskey, - callback: function() { + callback() { LightWeightThemeWebInstaller._install(data, notify); } }]; @@ -575,11 +575,11 @@ var LightWeightThemeWebInstaller = { notificationBar.persistence = 1; }, - _install: function(newLWTheme, notify) { + _install(newLWTheme, notify) { let previousLWTheme = this._manager.currentTheme; let listener = { - onEnabling: function(aAddon, aRequiresRestart) { + onEnabling(aAddon, aRequiresRestart) { if (!aRequiresRestart) { return; } @@ -590,7 +590,7 @@ var LightWeightThemeWebInstaller = { let action = { label: gNavigatorBundle.getString("lwthemeNeedsRestart.button"), accessKey: gNavigatorBundle.getString("lwthemeNeedsRestart.accesskey"), - callback: function() { + callback() { BrowserUtils.restartApplication(); } }; @@ -604,7 +604,7 @@ var LightWeightThemeWebInstaller = { action, null, options); }, - onEnabled: function(aAddon) { + onEnabled(aAddon) { if (notify) { LightWeightThemeWebInstaller._postInstallNotification(newLWTheme, previousLWTheme); } @@ -616,7 +616,7 @@ var LightWeightThemeWebInstaller = { AddonManager.removeAddonListener(listener); }, - _postInstallNotification: function(newTheme, previousTheme) { + _postInstallNotification(newTheme, previousTheme) { function text(id) { return gNavigatorBundle.getString("lwthemePostInstallNotification." + id); } @@ -624,14 +624,14 @@ var LightWeightThemeWebInstaller = { let buttons = [{ label: text("undoButton"), accessKey: text("undoButton.accesskey"), - callback: function() { + callback() { LightWeightThemeWebInstaller._manager.forgetUsedTheme(newTheme.id); LightWeightThemeWebInstaller._manager.currentTheme = previousTheme; } }, { label: text("manageButton"), accessKey: text("manageButton.accesskey"), - callback: function() { + callback() { BrowserOpenAddonsMgr("addons://list/theme"); } }]; @@ -648,7 +648,7 @@ var LightWeightThemeWebInstaller = { notificationBar.timeout = Date.now() + 20000; // 20 seconds }, - _removePreviousNotifications: function() { + _removePreviousNotifications() { let box = gBrowser.getNotificationBox(); ["lwtheme-install-request", @@ -659,7 +659,7 @@ var LightWeightThemeWebInstaller = { }); }, - _preview: function(dataString, baseURI) { + _preview(dataString, baseURI) { if (!this._isAllowed(baseURI)) return; @@ -672,14 +672,14 @@ var LightWeightThemeWebInstaller = { this._manager.previewTheme(data); }, - _resetPreview: function(baseURI) { + _resetPreview(baseURI) { if (baseURI && !this._isAllowed(baseURI)) return; gBrowser.tabContainer.removeEventListener("TabSelect", this, false); this._manager.resetPreview(); }, - _isAllowed: function(srcURIString) { + _isAllowed(srcURIString) { let uri; try { uri = makeURI(srcURIString); @@ -704,7 +704,7 @@ var LightWeightThemeWebInstaller = { var LightweightThemeListener = { _modifiedStyles: [], - init: function() { + init() { XPCOMUtils.defineLazyGetter(this, "styleSheet", function() { for (let i = document.styleSheets.length - 1; i >= 0; i--) { let sheet = document.styleSheets[i]; @@ -720,7 +720,7 @@ var LightweightThemeListener = { this.updateStyleSheet(document.documentElement.style.backgroundImage); }, - uninit: function() { + uninit() { Services.obs.removeObserver(this, "lightweight-theme-styling-update"); Services.obs.removeObserver(this, "lightweight-theme-optimized"); }, @@ -731,13 +731,13 @@ var LightweightThemeListener = { * * @param headerImage - a string containing a CSS image for the lightweight theme header. */ - updateStyleSheet: function(headerImage) { + updateStyleSheet(headerImage) { if (!this.styleSheet) return; this.substituteRules(this.styleSheet.cssRules, headerImage); }, - substituteRules: function(ruleList, headerImage, existingStyleRulesModified = 0) { + substituteRules(ruleList, headerImage, existingStyleRulesModified = 0) { let styleRulesModified = 0; for (let i = 0; i < ruleList.length; i++) { let rule = ruleList[i]; @@ -761,7 +761,7 @@ var LightweightThemeListener = { }, // nsIObserver - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if ((aTopic != "lightweight-theme-styling-update" && aTopic != "lightweight-theme-optimized") || !this.styleSheet) return; diff --git a/browser/base/content/browser-ctrlTab.js b/browser/base/content/browser-ctrlTab.js index 7cafd8541948..88cff082b1e2 100644 --- a/browser/base/content/browser-ctrlTab.js +++ b/browser/base/content/browser-ctrlTab.js @@ -96,7 +96,7 @@ var tabPreviews = { }; var tabPreviewPanelHelper = { - opening: function(host) { + opening(host) { host.panel.hidden = false; var handler = this._generateHandler(host); @@ -105,7 +105,7 @@ var tabPreviewPanelHelper = { host._prevFocus = document.commandDispatcher.focusedElement; }, - _generateHandler: function(host) { + _generateHandler(host) { var self = this; return function(event) { if (event.target == host.panel) { @@ -114,11 +114,11 @@ var tabPreviewPanelHelper = { } }; }, - _popupshown: function(host) { + _popupshown(host) { if ("setupGUI" in host) host.setupGUI(); }, - _popuphiding: function(host) { + _popuphiding(host) { if ("suspendGUI" in host) host.suspendGUI(); @@ -219,7 +219,7 @@ var ctrlTab = { else this.uninit(); }, - observe: function(aSubject, aTopic, aPrefName) { + observe(aSubject, aTopic, aPrefName) { this.readPref(); }, @@ -507,7 +507,7 @@ var ctrlTab = { } }, - filterForThumbnailExpiration: function(aCallback) { + filterForThumbnailExpiration(aCallback) { // Save a few more thumbnails than we actually display, so that when tabs // are closed, the previews we add instead still get thumbnails. const extraThumbnails = 3; @@ -521,7 +521,7 @@ var ctrlTab = { aCallback(urls); }, - _initRecentlyUsedTabs: function() { + _initRecentlyUsedTabs() { this._recentlyUsedTabs = Array.filter(gBrowser.tabs, tab => !tab.closing) .sort((tab1, tab2) => tab2.lastAccessed - tab1.lastAccessed); diff --git a/browser/base/content/browser-customization.js b/browser/base/content/browser-customization.js index d5d51b8931a3..672d25ec6caa 100644 --- a/browser/base/content/browser-customization.js +++ b/browser/base/content/browser-customization.js @@ -9,7 +9,7 @@ * events. */ var CustomizationHandler = { - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "customizationstarting": this._customizationStarting(); @@ -23,11 +23,11 @@ var CustomizationHandler = { } }, - isCustomizing: function() { + isCustomizing() { return document.documentElement.hasAttribute("customizing"); }, - _customizationStarting: function() { + _customizationStarting() { // Disable the toolbar context menu items let menubar = document.getElementById("main-menubar"); for (let childNode of menubar.childNodes) @@ -51,11 +51,11 @@ var CustomizationHandler = { } }, - _customizationChange: function() { + _customizationChange() { PlacesToolbarHelper.customizeChange(); }, - _customizationEnding: function(aDetails) { + _customizationEnding(aDetails) { // Update global UI elements that may have been added or removed if (aDetails.changed) { gURLBar = document.getElementById("urlbar"); diff --git a/browser/base/content/browser-data-submission-info-bar.js b/browser/base/content/browser-data-submission-info-bar.js index 0d2c7aabfc10..456f91b48ee0 100644 --- a/browser/base/content/browser-data-submission-info-bar.js +++ b/browser/base/content/browser-data-submission-info-bar.js @@ -27,7 +27,7 @@ var gDataNotificationInfoBar = { return this._log = Log.repository.getLoggerWithMessagePrefix(LOGGER_NAME, LOGGER_PREFIX); }, - init: function() { + init() { window.addEventListener("unload", () => { for (let o of this._OBSERVERS) { Services.obs.removeObserver(this, o); @@ -39,11 +39,11 @@ var gDataNotificationInfoBar = { } }, - _getDataReportingNotification: function(name = this._DATA_REPORTING_NOTIFICATION) { + _getDataReportingNotification(name = this._DATA_REPORTING_NOTIFICATION) { return this._notificationBox.getNotificationWithValue(name); }, - _displayDataPolicyInfoBar: function(request) { + _displayDataPolicyInfoBar(request) { if (this._getDataReportingNotification()) { return; } @@ -88,7 +88,7 @@ var gDataNotificationInfoBar = { request.onUserNotifyComplete(); }, - _clearPolicyNotification: function() { + _clearPolicyNotification() { let notification = this._getDataReportingNotification(); if (notification) { this._log.debug("Closing notification."); @@ -96,7 +96,7 @@ var gDataNotificationInfoBar = { } }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { switch (topic) { case "datareporting:notify-data-policy:request": let request = subject.wrappedJSObject.object; diff --git a/browser/base/content/browser-devedition.js b/browser/base/content/browser-devedition.js index 8c1fe88a5b0e..aa4da1d5ba0e 100644 --- a/browser/base/content/browser-devedition.js +++ b/browser/base/content/browser-devedition.js @@ -21,7 +21,7 @@ var DevEdition = { return theme && theme.id == "firefox-devedition@mozilla.org"; }, - init: function() { + init() { this.initialized = true; Services.prefs.addObserver(this._devtoolsThemePrefName, this, false); Services.obs.addObserver(this, "lightweight-theme-styling-update", false); @@ -33,7 +33,7 @@ var DevEdition = { } }, - createStyleSheet: function() { + createStyleSheet() { let styleSheetAttr = `href="${this.styleSheetLocation}" type="text/css"`; this.styleSheet = document.createProcessingInstruction( "xml-stylesheet", styleSheetAttr); @@ -42,7 +42,7 @@ var DevEdition = { this.styleSheet.sheet.disabled = true; }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { if (topic == "lightweight-theme-styling-update") { let newTheme = JSON.parse(data); if (newTheme && newTheme.id == "firefox-devedition@mozilla.org") { @@ -59,7 +59,7 @@ var DevEdition = { } }, - _inferBrightness: function() { + _inferBrightness() { ToolbarIconColor.inferFromText(); // Get an inverted full screen button if the dark theme is applied. if (this.isStyleSheetEnabled && @@ -78,7 +78,7 @@ var DevEdition = { } }, - _updateDevtoolsThemeAttribute: function() { + _updateDevtoolsThemeAttribute() { // Set an attribute on root element to make it possible // to change colors based on the selected devtools theme. let devtoolsTheme = Services.prefs.getCharPref(this._devtoolsThemePrefName); @@ -90,14 +90,14 @@ var DevEdition = { this._inferBrightness(); }, - handleEvent: function(e) { + handleEvent(e) { if (e.type === "load") { this.styleSheet.removeEventListener("load", this); this.refreshBrowserDisplay(); } }, - refreshBrowserDisplay: function() { + refreshBrowserDisplay() { // Don't touch things on the browser if gBrowserInit.onLoad hasn't // yet fired. if (this.initialized) { @@ -106,7 +106,7 @@ var DevEdition = { } }, - _toggleStyleSheet: function(deveditionThemeEnabled) { + _toggleStyleSheet(deveditionThemeEnabled) { let wasEnabled = this.isStyleSheetEnabled; if (deveditionThemeEnabled && !wasEnabled) { // The stylesheet may not have been created yet if it wasn't @@ -122,7 +122,7 @@ var DevEdition = { } }, - uninit: function() { + uninit() { Services.prefs.removeObserver(this._devtoolsThemePrefName, this); Services.obs.removeObserver(this, "lightweight-theme-styling-update", false); Services.obs.removeObserver(this, "lightweight-theme-window-updated", false); diff --git a/browser/base/content/browser-fullScreenAndPointerLock.js b/browser/base/content/browser-fullScreenAndPointerLock.js index 678500e7ab32..4e8539056735 100644 --- a/browser/base/content/browser-fullScreenAndPointerLock.js +++ b/browser/base/content/browser-fullScreenAndPointerLock.js @@ -8,19 +8,19 @@ var PointerlockFsWarning = { _element: null, _origin: null, - init: function() { + init() { this.Timeout.prototype = { - start: function() { + start() { this.cancel(); this._id = setTimeout(() => this._handle(), this._delay); }, - cancel: function() { + cancel() { if (this._id) { clearTimeout(this._id); this._id = 0; } }, - _handle: function() { + _handle() { this._id = 0; this._func(); }, @@ -30,6 +30,13 @@ var PointerlockFsWarning = { }; }, + /* eslint-disable object-shorthand */ + /* The object-shorthand rule must be disabled for this constructor + * because the ES6 method syntax causes "this.Timeout is not a + * constructor" exception. Further, using the {ignoreConstructors: true} + * option causes "TypeError: Cannot read property 'charAt' of undefined" + * in eslint. + */ /** * Timeout object for managing timeout request. If it is started when * the previous call hasn't finished, it would automatically cancelled @@ -40,15 +47,16 @@ var PointerlockFsWarning = { this._func = func; this._delay = delay; }, + /* eslint-enable object-shorthand */ - showPointerLock: function(aOrigin) { + showPointerLock(aOrigin) { if (!document.fullscreen) { let timeout = gPrefService.getIntPref("pointer-lock-api.warning.timeout"); this.show(aOrigin, "pointerlock-warning", timeout, 0); } }, - showFullScreen: function(aOrigin) { + showFullScreen(aOrigin) { let timeout = gPrefService.getIntPref("full-screen-api.warning.timeout"); let delay = gPrefService.getIntPref("full-screen-api.warning.delay"); this.show(aOrigin, "fullscreen-warning", timeout, delay); @@ -56,7 +64,7 @@ var PointerlockFsWarning = { // Shows a warning that the site has entered fullscreen or // pointer lock for a short duration. - show: function(aOrigin, elementId, timeout, delay) { + show(aOrigin, elementId, timeout, delay) { if (!this._element) { this._element = document.getElementById(elementId); @@ -111,7 +119,7 @@ var PointerlockFsWarning = { this._timeoutHide.start(); }, - close: function() { + close() { if (!this._element) { return; } @@ -180,7 +188,7 @@ var PointerlockFsWarning = { } }, - handleEvent: function(event) { + handleEvent(event) { switch (event.type) { case "mousemove": { let state = this._state; @@ -226,12 +234,12 @@ var PointerlockFsWarning = { var PointerLock = { - init: function() { + init() { window.messageManager.addMessageListener("PointerLock:Entered", this); window.messageManager.addMessageListener("PointerLock:Exited", this); }, - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { switch (aMessage.name) { case "PointerLock:Entered": { PointerlockFsWarning.showPointerLock(aMessage.data.originNoSuffix); @@ -253,7 +261,7 @@ var FullScreen = { "DOMFullscreen:Painted", ], - init: function() { + init() { // called when we go into full screen, even if initiated by a web page script window.addEventListener("fullscreen", this, true); window.addEventListener("MozDOMFullscreen:Entered", this, @@ -270,14 +278,14 @@ var FullScreen = { this.toggle(); }, - uninit: function() { + uninit() { for (let type of this._MESSAGES) { window.messageManager.removeMessageListener(type, this); } this.cleanup(); }, - toggle: function() { + toggle() { var enterFS = window.fullScreen; // Toggle the View:FullScreen command, which controls elements like the @@ -342,11 +350,11 @@ var FullScreen = { } }, - exitDomFullScreen : function() { + exitDomFullScreen() { document.exitFullscreen(); }, - handleEvent: function(event) { + handleEvent(event) { switch (event.type) { case "fullscreen": this.toggle(); @@ -377,7 +385,7 @@ var FullScreen = { } }, - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { let browser = aMessage.target; switch (aMessage.name) { case "DOMFullscreen:Request": { @@ -403,7 +411,7 @@ var FullScreen = { } }, - enterDomFullscreen : function(aBrowser) { + enterDomFullscreen(aBrowser) { if (!document.fullscreenElement) { return; @@ -456,7 +464,7 @@ var FullScreen = { window.addEventListener("activate", this); }, - cleanup: function() { + cleanup() { if (!window.fullScreen) { MousePosTracker.removeListener(this); document.removeEventListener("keypress", this._keyToggleCallback, false); @@ -465,7 +473,7 @@ var FullScreen = { } }, - cleanupDomFullscreen: function() { + cleanupDomFullscreen() { window.messageManager .broadcastAsyncMessage("DOMFullscreen:CleanUp"); @@ -478,7 +486,7 @@ var FullScreen = { document.documentElement.removeAttribute("inDOMFullscreen"); }, - _isRemoteBrowser: function(aBrowser) { + _isRemoteBrowser(aBrowser) { return gMultiProcessBrowser && aBrowser.getAttribute("remote") == "true"; }, @@ -487,21 +495,21 @@ var FullScreen = { .getInterface(Ci.nsIDOMWindowUtils); }, - getMouseTargetRect: function() + getMouseTargetRect() { return this._mouseTargetRect; }, // Event callbacks - _expandCallback: function() + _expandCallback() { FullScreen.showNavToolbox(); }, - onMouseEnter: function() + onMouseEnter() { FullScreen.hideNavToolbox(); }, - _keyToggleCallback: function(aEvent) + _keyToggleCallback(aEvent) { // if we can use the keyboard (eg Ctrl+L or Ctrl+E) to open the toolbars, we // should provide a way to collapse them too. @@ -516,7 +524,7 @@ var FullScreen = { // Checks whether we are allowed to collapse the chrome _isPopupOpen: false, _isChromeCollapsed: false, - _safeToCollapse: function() { + _safeToCollapse() { if (!gPrefService.getBoolPref("browser.fullscreen.autohide")) return false; @@ -538,7 +546,7 @@ var FullScreen = { return true; }, - _setPopupOpen: function(aEvent) + _setPopupOpen(aEvent) { // Popups should only veto chrome collapsing if they were opened when the chrome was not collapsed. // Otherwise, they would not affect chrome and the user would expect the chrome to go away. @@ -556,18 +564,18 @@ var FullScreen = { }, // Autohide helpers for the context menu item - getAutohide: function(aItem) + getAutohide(aItem) { aItem.setAttribute("checked", gPrefService.getBoolPref("browser.fullscreen.autohide")); }, - setAutohide: function() + setAutohide() { gPrefService.setBoolPref("browser.fullscreen.autohide", !gPrefService.getBoolPref("browser.fullscreen.autohide")); // Try again to hide toolbar when we change the pref. FullScreen.hideNavToolbox(true); }, - showNavToolbox: function(trackMouse = true) { + showNavToolbox(trackMouse = true) { this._fullScrToggler.hidden = true; gNavToolbox.removeAttribute("fullscreenShouldAnimate"); gNavToolbox.style.marginTop = ""; @@ -591,7 +599,7 @@ var FullScreen = { this._isChromeCollapsed = false; }, - hideNavToolbox: function(aAnimate = false) { + hideNavToolbox(aAnimate = false) { if (this._isChromeCollapsed || !this._safeToCollapse()) return; @@ -615,7 +623,7 @@ var FullScreen = { MousePosTracker.removeListener(this); }, - _updateToolbars: function(aEnterFS) { + _updateToolbars(aEnterFS) { for (let el of document.querySelectorAll("toolbar[fullscreentoolbar=true]")) { if (aEnterFS) { // Give the main nav bar and the tab bar the fullscreen context menu, diff --git a/browser/base/content/browser-fullZoom.js b/browser/base/content/browser-fullZoom.js index 2e963cfa6f9d..6f3f0271b08e 100644 --- a/browser/base/content/browser-fullZoom.js +++ b/browser/base/content/browser-fullZoom.js @@ -89,7 +89,7 @@ var FullZoom = { // nsIObserver - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { switch (aTopic) { case "nsPref:changed": switch (aData) { @@ -154,7 +154,7 @@ var FullZoom = { let hasPref = false; let token = this._getBrowserToken(browser); this._cps2.getByDomainAndName(browser.currentURI.spec, this.name, ctxt, { - handleResult: function() { hasPref = true; }, + handleResult() { hasPref = true; }, handleCompletion: function() { if (!hasPref && token.isCurrent) this._applyPrefToZoom(undefined, browser); @@ -223,7 +223,7 @@ var FullZoom = { let value = undefined; let token = this._getBrowserToken(browser); this._cps2.getByDomainAndName(aURI.spec, this.name, ctxt, { - handleResult: function(resultPref) { value = resultPref.value; }, + handleResult(resultPref) { value = resultPref.value; }, handleCompletion: function() { if (!token.isCurrent) { this._notifyOnLocationChange(browser); @@ -269,7 +269,7 @@ var FullZoom = { * Sets the zoom level for the given browser to the given floating * point value, where 1 is the default zoom level. */ - setZoom: function(value, browser = gBrowser.selectedBrowser) { + setZoom(value, browser = gBrowser.selectedBrowser) { ZoomManager.setZoomForBrowser(browser, value); this._ignorePendingZoomAccesses(browser); this._applyZoomToPref(browser); @@ -487,7 +487,7 @@ var FullZoom = { } let value = undefined; this._cps2.getGlobal(this.name, this._loadContextFromBrowser(browser), { - handleResult: function(pref) { value = pref.value; }, + handleResult(pref) { value = pref.value; }, handleCompletion: (reason) => { this._globalValue = this._ensureValid(value); resolve(this._globalValue); diff --git a/browser/base/content/browser-fxaccounts.js b/browser/base/content/browser-fxaccounts.js index d841dc142e7c..951f35b9cbd0 100644 --- a/browser/base/content/browser-fxaccounts.js +++ b/browser/base/content/browser-fxaccounts.js @@ -88,7 +88,7 @@ var gFxAccounts = { .sort((a, b) => a.name.localeCompare(b.name)); }, - init: function() { + init() { // Bail out if we're already initialized and for pop-up windows. if (this._initialized || !window.toolbar.visible) { return; @@ -107,7 +107,7 @@ var gFxAccounts = { this.updateUI(); }, - uninit: function() { + uninit() { if (!this._initialized) { return; } @@ -119,7 +119,7 @@ var gFxAccounts = { this._initialized = false; }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { switch (topic) { case "fxa-migration:state-changed": this.onMigrationStateChanged(data, subject); @@ -133,7 +133,7 @@ var gFxAccounts = { } }, - onMigrationStateChanged: function() { + onMigrationStateChanged() { // Since we nuked most of the migration code, this notification will fire // once after legacy Sync has been disconnected (and should never fire // again) @@ -175,12 +175,12 @@ var gFxAccounts = { this.updateAppMenuItem(); }, - handleEvent: function(event) { + handleEvent(event) { this._inCustomizationMode = event.type == "customizationstarting"; this.updateAppMenuItem(); }, - updateUI: function() { + updateUI() { // It's possible someone signed in to FxA after seeing our notification // about "Legacy Sync migration" (which now is actually "Legacy Sync // auto-disconnect") so kill that notification if it still exists. @@ -194,7 +194,7 @@ var gFxAccounts = { }, // Note that updateAppMenuItem() returns a Promise that's only used by tests. - updateAppMenuItem: function() { + updateAppMenuItem() { let profileInfoEnabled = false; try { profileInfoEnabled = Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled"); @@ -320,7 +320,7 @@ var gFxAccounts = { }); }, - onMenuPanelCommand: function() { + onMenuPanelCommand() { switch (this.panelUIFooter.getAttribute("fxastatus")) { case "signedin": @@ -341,11 +341,11 @@ var gFxAccounts = { PanelUI.hide(); }, - openPreferences: function() { + openPreferences() { openPreferences("paneSync", { urlParams: { entrypoint: "menupanel" } }); }, - openAccountsPage: function(action, urlParams = {}) { + openAccountsPage(action, urlParams = {}) { let params = new URLSearchParams(); if (action) { params.set("action", action); @@ -361,15 +361,15 @@ var gFxAccounts = { }); }, - openSignInAgainPage: function(entryPoint) { + openSignInAgainPage(entryPoint) { this.openAccountsPage("reauth", { entrypoint: entryPoint }); }, - sendTabToDevice: function(url, clientId, title) { + sendTabToDevice(url, clientId, title) { Weave.Service.clientsEngine.sendURIToClientForDisplay(url, clientId, title); }, - populateSendTabToDevicesMenu: function(devicesPopup, url, title) { + populateSendTabToDevicesMenu(devicesPopup, url, title) { // remove existing menu items while (devicesPopup.hasChildNodes()) { devicesPopup.removeChild(devicesPopup.firstChild); @@ -410,7 +410,7 @@ var gFxAccounts = { devicesPopup.appendChild(fragment); }, - updateTabContextMenu: function(aPopupMenu) { + updateTabContextMenu(aPopupMenu) { if (!this.sendTabToDeviceEnabled) { return; } @@ -420,7 +420,7 @@ var gFxAccounts = { .forEach(id => { document.getElementById(id).hidden = !remoteClientPresent }); }, - initPageContextMenu: function(contextMenu) { + initPageContextMenu(contextMenu) { if (!this.sendTabToDeviceEnabled) { return; } diff --git a/browser/base/content/browser-gestureSupport.js b/browser/base/content/browser-gestureSupport.js index 7c60a05675b0..c281ebf54e19 100644 --- a/browser/base/content/browser-gestureSupport.js +++ b/browser/base/content/browser-gestureSupport.js @@ -351,7 +351,7 @@ var gGestureSupport = { * @param aEvent * The continual motion update event to handle */ - _doUpdate: function(aEvent) {}, + _doUpdate(aEvent) {}, /** * Handle gesture end events. This function will be set by _setupSwipe. @@ -359,7 +359,7 @@ var gGestureSupport = { * @param aEvent * The gesture end event to handle */ - _doEnd: function(aEvent) {}, + _doEnd(aEvent) {}, /** * Convert the swipe gesture into a browser action based on the direction. @@ -444,7 +444,7 @@ var gGestureSupport = { * @param aEvent * The MozRotateGestureUpdate event triggering this call */ - rotate: function(aEvent) { + rotate(aEvent) { if (!(content.document instanceof ImageDocument)) return; @@ -463,7 +463,7 @@ var gGestureSupport = { /** * Perform a rotation end for ImageDocuments */ - rotateEnd: function() { + rotateEnd() { if (!(content.document instanceof ImageDocument)) return; @@ -531,7 +531,7 @@ var gGestureSupport = { * When the location/tab changes, need to reload the current rotation for the * image */ - restoreRotationState: function() { + restoreRotationState() { // Bug 863514 - Make gesture support work in electrolysis if (gMultiProcessBrowser) return; @@ -560,7 +560,7 @@ var gGestureSupport = { /** * Removes the transition rule by removing the completeRotation class */ - _clearCompleteRotation: function() { + _clearCompleteRotation() { let contentElement = content.document && content.document instanceof ImageDocument && content.document.body && @@ -731,7 +731,7 @@ var gHistorySwipeAnimation = { } }, - _getCurrentHistoryIndex: function() { + _getCurrentHistoryIndex() { return SessionStore.getSessionHistory(gBrowser.selectedTab).index; }, diff --git a/browser/base/content/browser-media.js b/browser/base/content/browser-media.js index 7d10635df286..9e0498b9259c 100644 --- a/browser/base/content/browser-media.js +++ b/browser/base/content/browser-media.js @@ -12,7 +12,7 @@ var gEMEHandler = { } return emeUIEnabled; }, - ensureEMEEnabled: function(browser, keySystem) { + ensureEMEEnabled(browser, keySystem) { Services.prefs.setBoolPref("media.eme.enabled", true); if (keySystem) { if (keySystem.startsWith("com.adobe") && @@ -27,7 +27,7 @@ var gEMEHandler = { } browser.reload(); }, - isKeySystemVisible: function(keySystem) { + isKeySystemVisible(keySystem) { if (!keySystem) { return false; } @@ -41,13 +41,13 @@ var gEMEHandler = { } return true; }, - getLearnMoreLink: function(msgId) { + getLearnMoreLink(msgId) { let text = gNavigatorBundle.getString("emeNotifications." + msgId + ".learnMoreLabel"); let baseURL = Services.urlFormatter.formatURLPref("app.support.baseURL"); return ""; }, - receiveMessage: function({target: browser, data: data}) { + receiveMessage({target: browser, data: data}) { let parsedData; try { parsedData = JSON.parse(data); @@ -102,7 +102,7 @@ var gEMEHandler = { this.showNotificationBar(browser, notificationId, keySystem, params, buttonCallback); }, - showNotificationBar: function(browser, notificationId, keySystem, labelParams, callback) { + showNotificationBar(browser, notificationId, keySystem, labelParams, callback) { let box = gBrowser.getNotificationBox(browser); if (box.getNotificationWithValue(notificationId)) { return; @@ -122,7 +122,7 @@ var gEMEHandler = { buttons.push({ label: gNavigatorBundle.getString(btnLabelId), accessKey: gNavigatorBundle.getString(btnAccessKeyId), - callback: callback + callback }); } @@ -139,7 +139,7 @@ var gEMEHandler = { box.appendNotification(fragment, notificationId, iconURL, box.PRIORITY_WARNING_MEDIUM, buttons); }, - showPopupNotificationForSuccess: function(browser, keySystem) { + showPopupNotificationForSuccess(browser, keySystem) { // We're playing EME content! Remove any "we can't play because..." messages. var box = gBrowser.getNotificationBox(browser); ["drmContentDisabled", @@ -174,7 +174,7 @@ var gEMEHandler = { let mainAction = { label: gNavigatorBundle.getString(btnLabelId), accessKey: gNavigatorBundle.getString(btnAccessKeyId), - callback: function() { openPreferences("paneContent"); }, + callback() { openPreferences("paneContent"); }, dismiss: true }; let options = { diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 08e326b7e0fe..960065dd0192 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -9,7 +9,7 @@ var StarUI = { _isNewBookmark: false, _autoCloseTimer: 0, - _element: function(aID) { + _element(aID) { return document.getElementById(aID); }, @@ -633,10 +633,10 @@ var PlacesCommandHook = { PlacesUIUtils.showBookmarkDialog({ action: "add" , type: "livemark" - , feedURI: feedURI + , feedURI , siteURI: gBrowser.currentURI - , title: title - , description: description + , title + , description , defaultInsertionPoint: toolbarIP , hiddenRows: [ "feedLocation" , "siteLocation" @@ -1143,7 +1143,7 @@ var PlacesToolbarHelper = { return !area || CustomizableUI.TYPE_MENU_PANEL == areaType; }, - onPlaceholderCommand: function() { + onPlaceholderCommand() { let widgetGroup = CustomizableUI.getWidget("personal-bookmarks"); let widget = widgetGroup.forWindow(window); if (widget.overflowed || @@ -1152,7 +1152,7 @@ var PlacesToolbarHelper = { } }, - _getParentToolbar: function(element) { + _getParentToolbar(element) { while (element) { if (element.localName == "toolbar") { return element; @@ -1162,7 +1162,7 @@ var PlacesToolbarHelper = { return null; }, - onWidgetUnderflow: function(aNode, aContainer) { + onWidgetUnderflow(aNode, aContainer) { // The view gets broken by being removed and reinserted by the overflowable // toolbar, so we have to force an uninit and reinit. let win = aNode.ownerGlobal; @@ -1171,7 +1171,7 @@ var PlacesToolbarHelper = { } }, - onWidgetAdded: function(aWidgetId, aArea, aPosition) { + onWidgetAdded(aWidgetId, aArea, aPosition) { if (aWidgetId == "personal-bookmarks" && !this._isCustomizing) { // It's possible (with the "Add to Menu", "Add to Toolbar" context // options) that the Places Toolbar Items have been moved without @@ -1182,7 +1182,7 @@ var PlacesToolbarHelper = { } }, - _resetView: function() { + _resetView() { if (this._viewElt) { // It's possible that the placesView might not exist, and we need to // do a full init. This could happen if the Bookmarks Toolbar Items are @@ -1274,7 +1274,7 @@ var BookmarkingUI = { this._getFormattedTooltip("starButtonOff.tooltip2"); }, - _getFormattedTooltip: function(strId) { + _getFormattedTooltip(strId) { let args = []; let shortcut = document.getElementById(this.BOOKMARK_BUTTON_SHORTCUT); if (shortcut) @@ -1287,7 +1287,7 @@ var BookmarkingUI = { * When in the panel, we don't update the button's icon. */ _currentAreaType: null, - _shouldUpdateStarState: function() { + _shouldUpdateStarState() { return this._currentAreaType == CustomizableUI.TYPE_TOOLBAR; }, @@ -1349,7 +1349,7 @@ var BookmarkingUI = { } }, - attachPlacesView: function(event, node) { + attachPlacesView(event, node) { // If the view is already there, bail out early. if (node.parentNode._placesView) return; @@ -1577,7 +1577,7 @@ var BookmarkingUI = { } }, - init: function() { + init() { CustomizableUI.addListener(this); this._updateCustomizationState(); }, @@ -1757,7 +1757,7 @@ var BookmarkingUI = { }, 1000); }, - _showSubview: function() { + _showSubview() { let view = document.getElementById("PanelUI-bookmarks"); view.addEventListener("ViewShowing", this); view.addEventListener("ViewHiding", this); @@ -1902,11 +1902,11 @@ var BookmarkingUI = { } }, - onBeginUpdateBatch: function() {}, - onEndUpdateBatch: function() {}, - onBeforeItemRemoved: function() {}, - onItemVisited: function() {}, - onItemMoved: function() {}, + onBeginUpdateBatch() {}, + onEndUpdateBatch() {}, + onBeforeItemRemoved() {}, + onItemVisited() {}, + onItemMoved() {}, // CustomizableUI events: _starButtonLabel: null, @@ -1920,7 +1920,7 @@ var BookmarkingUI = { return this._starButtonOverflowedStarredLabel = gNavigatorBundle.getString("starButtonOverflowedStarred.label"); }, - onWidgetOverflow: function(aNode, aContainer) { + onWidgetOverflow(aNode, aContainer) { let win = aNode.ownerGlobal; if (aNode.id != this.BOOKMARK_BUTTON_ID || win != window) return; @@ -1936,7 +1936,7 @@ var BookmarkingUI = { } }, - onWidgetUnderflow: function(aNode, aContainer) { + onWidgetUnderflow(aNode, aContainer) { let win = aNode.ownerGlobal; if (aNode.id != this.BOOKMARK_BUTTON_ID || win != window) return; diff --git a/browser/base/content/browser-plugins.js b/browser/base/content/browser-plugins.js index fb68d262c65e..ddfe7ff7a519 100644 --- a/browser/base/content/browser-plugins.js +++ b/browser/base/content/browser-plugins.js @@ -17,7 +17,7 @@ var gPluginHandler = { "PluginContent:LinkClickCallback", ], - init: function() { + init() { const mm = window.messageManager; for (let msg of this.MESSAGES) { mm.addMessageListener(msg, this); @@ -25,7 +25,7 @@ var gPluginHandler = { window.addEventListener("unload", this); }, - uninit: function() { + uninit() { const mm = window.messageManager; for (let msg of this.MESSAGES) { mm.removeMessageListener(msg, this); @@ -33,13 +33,13 @@ var gPluginHandler = { window.removeEventListener("unload", this); }, - handleEvent: function(event) { + handleEvent(event) { if (event.type == "unload") { this.uninit(); } }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "PluginContent:ShowClickToPlayNotification": this.showClickToPlayNotification(msg.target, msg.data.plugins, msg.data.showNow, @@ -83,13 +83,13 @@ var gPluginHandler = { }, // Callback for user clicking on a disabled plugin - managePlugins: function() { + managePlugins() { BrowserOpenAddonsMgr("addons://list/plugin"); }, // Callback for user clicking on the link in a click-to-play plugin // (where the plugin has an update) - openPluginUpdatePage: function(pluginTag) { + openPluginUpdatePage(pluginTag) { let url = Services.blocklist.getPluginInfoURL(pluginTag); if (!url) { url = Services.blocklist.getPluginBlocklistURL(pluginTag); @@ -106,12 +106,12 @@ var gPluginHandler = { }, // Callback for user clicking a "reload page" link - reloadPage: function(browser) { + reloadPage(browser) { browser.reload(); }, // Callback for user clicking the help icon - openHelpPage: function() { + openHelpPage() { openHelpLink("plugin-crashed", false); }, @@ -139,7 +139,7 @@ var gPluginHandler = { * and activate plugins if necessary. * aNewState should be either "allownow" "allowalways" or "block" */ - _updatePluginPermission: function(aNotification, aPluginInfo, aNewState) { + _updatePluginPermission(aNotification, aPluginInfo, aNewState) { let permission; let expireType; let expireTime; @@ -208,7 +208,7 @@ var gPluginHandler = { }); }, - showClickToPlayNotification: function(browser, plugins, showNow, + showClickToPlayNotification(browser, plugins, showNow, principal, location) { // It is possible that we've received a message from the frame script to show // a click to play notification for a principal that no longer matches the one @@ -281,8 +281,8 @@ var gPluginHandler = { persistent: showNow, eventCallback: this._clickToPlayNotificationEventCallback, primaryPlugin: primaryPluginPermission, - pluginData: pluginData, - principal: principal, + pluginData, + principal, }; PopupNotifications.show(browser, "click-to-play-plugins", "", "plugins-notification-icon", @@ -290,20 +290,20 @@ var gPluginHandler = { browser.messageManager.sendAsyncMessage("BrowserPlugins:NotificationShown"); }, - removeNotification: function(browser, name) { + removeNotification(browser, name) { let notification = PopupNotifications.getNotification(name, browser); if (notification) PopupNotifications.remove(notification); }, - hideNotificationBar: function(browser, name) { + hideNotificationBar(browser, name) { let notificationBox = gBrowser.getNotificationBox(browser); let notification = notificationBox.getNotificationWithValue(name); if (notification) notificationBox.removeNotification(notification, true); }, - updateHiddenPluginUI: function(browser, haveInsecure, actions, + updateHiddenPluginUI(browser, haveInsecure, actions, principal, location) { let origin = principal.originNoSuffix; @@ -391,7 +391,7 @@ var gPluginHandler = { { label: gNavigatorBundle.getString("pluginContinueBlocking.label"), accessKey: gNavigatorBundle.getString("pluginContinueBlocking.accesskey"), - callback: function() { + callback() { Services.telemetry.getHistogramById("PLUGINS_INFOBAR_BLOCK"). add(true); @@ -403,7 +403,7 @@ var gPluginHandler = { { label: gNavigatorBundle.getString("pluginActivateTrigger.label"), accessKey: gNavigatorBundle.getString("pluginActivateTrigger.accesskey"), - callback: function() { + callback() { Services.telemetry.getHistogramById("PLUGINS_INFOBAR_ALLOW"). add(true); @@ -437,14 +437,14 @@ var gPluginHandler = { } }, - contextMenuCommand: function(browser, plugin, command) { + contextMenuCommand(browser, plugin, command) { browser.messageManager.sendAsyncMessage("BrowserPlugins:ContextMenuCommand", - { command: command }, { plugin: plugin }); + { command }, { plugin }); }, // Crashed-plugin observer. Notified once per plugin crash, before events // are dispatched to individual plugin instances. - NPAPIPluginCrashed : function(subject, topic, data) { + NPAPIPluginCrashed(subject, topic, data) { let propertyBag = subject; if (!(propertyBag instanceof Ci.nsIPropertyBag2) || !(propertyBag instanceof Ci.nsIWritablePropertyBag2) || @@ -493,7 +493,7 @@ var gPluginHandler = { * For a GMP, this is the pluginID. For NPAPI plugins (where "pluginID" * means something different), this is the runID. */ - showPluginCrashedNotification: function(browser, messageString, pluginID) { + showPluginCrashedNotification(browser, messageString, pluginID) { // If there's already an existing notification bar, don't do anything. let notificationBox = gBrowser.getNotificationBox(browser); let notification = notificationBox.getNotificationWithValue("plugin-crashed"); @@ -511,7 +511,7 @@ var gPluginHandler = { label: reloadLabel, accessKey: reloadKey, popup: null, - callback: function() { browser.reload(); }, + callback() { browser.reload(); }, }]; if (AppConstants.MOZ_CRASHREPORTER && diff --git a/browser/base/content/browser-refreshblocker.js b/browser/base/content/browser-refreshblocker.js index 50ea992c4006..2c6f2da97930 100644 --- a/browser/base/content/browser-refreshblocker.js +++ b/browser/base/content/browser-refreshblocker.js @@ -17,7 +17,7 @@ var RefreshBlocker = { gBrowser.removeEventListener("RefreshBlocked", this); }, - handleEvent: function(event) { + handleEvent(event) { if (event.type == "RefreshBlocked") { this.block(event.originalTarget, event.detail); } @@ -68,7 +68,7 @@ var RefreshBlocker = { let buttons = [{ label: refreshButtonText, accessKey: refreshButtonAccesskey, - callback: function() { + callback() { if (browser.messageManager) { browser.messageManager.sendAsyncMessage("RefreshBlocker:Refresh", data); } diff --git a/browser/base/content/browser-safebrowsing.js b/browser/base/content/browser-safebrowsing.js index 430d84f132bd..b8b5976e39e4 100644 --- a/browser/base/content/browser-safebrowsing.js +++ b/browser/base/content/browser-safebrowsing.js @@ -4,7 +4,7 @@ var gSafeBrowsing = { - setReportPhishingMenu: function() { + setReportPhishingMenu() { // In order to detect whether or not we're at the phishing warning // page, we have to check the documentURI instead of the currentURI. // This is because when the DocShell loads an error page, the @@ -42,7 +42,7 @@ var gSafeBrowsing = { * @param name String One of "Phish", "Error", "Malware" or "MalwareError" * @return String the report phishing URL. */ - getReportURL: function(name) { + getReportURL(name) { return SafeBrowsing.getReportURL(name, gBrowser.currentURI); } } diff --git a/browser/base/content/browser-sidebar.js b/browser/base/content/browser-sidebar.js index 5893e6015bb9..76128ecd8b2b 100644 --- a/browser/base/content/browser-sidebar.js +++ b/browser/base/content/browser-sidebar.js @@ -258,7 +258,7 @@ var SidebarUI = { let selBrowser = gBrowser.selectedBrowser; selBrowser.messageManager.sendAsyncMessage("Sidebar:VisibilityChange", - {commandID: commandID, isOpen: true} + {commandID, isOpen: true} ); BrowserUITelemetry.countSidebarEvent(commandID, "show"); }); @@ -296,7 +296,7 @@ var SidebarUI = { let selBrowser = gBrowser.selectedBrowser; selBrowser.focus(); selBrowser.messageManager.sendAsyncMessage("Sidebar:VisibilityChange", - {commandID: commandID, isOpen: false} + {commandID, isOpen: false} ); BrowserUITelemetry.countSidebarEvent(commandID, "hide"); }, diff --git a/browser/base/content/browser-syncui.js b/browser/base/content/browser-syncui.js index 299b1743d065..6d219570f840 100644 --- a/browser/base/content/browser-syncui.js +++ b/browser/base/content/browser-syncui.js @@ -39,7 +39,7 @@ var gSyncUI = { _syncStartTime: 0, _syncAnimationTimer: 0, - init: function() { + init() { Cu.import("resource://services-common/stringbundle.js"); // Proceed to set up the UI if Sync has already started up. @@ -137,7 +137,7 @@ var gSyncUI = { // Note that we don't show login errors in a notification bar here, but do // still need to track a login-failed state so the "Tools" menu updates // with the correct state. - _loginFailed: function() { + _loginFailed() { // If Sync isn't already ready, we don't want to force it to initialize // by referencing Weave.Status - and it isn't going to be accurate before // Sync is ready anyway. @@ -242,7 +242,7 @@ var gSyncUI = { this.updateUI(); }, - _getAppName: function() { + _getAppName() { let brand = new StringBundle("chrome://branding/locale/brand.properties"); return brand.get("brandShortName"); }, @@ -304,7 +304,7 @@ var gSyncUI = { }, // Open the legacy-sync device pairing UI. Note used for FxA Sync. - openAddDevice: function() { + openAddDevice() { if (!Weave.Utils.ensureMPUnlocked()) return; @@ -316,11 +316,11 @@ var gSyncUI = { "syncAddDevice", "centerscreen,chrome,resizable=no"); }, - openPrefs: function(entryPoint) { + openPrefs(entryPoint) { openPreferences("paneSync", { urlParams: { entrypoint: entryPoint } }); }, - openSignInAgainPage: function(entryPoint = "syncbutton") { + openSignInAgainPage(entryPoint = "syncbutton") { gFxAccounts.openSignInAgainPage(entryPoint); }, @@ -423,7 +423,7 @@ var gSyncUI = { } }), - formatLastSyncDate: function(date) { + formatLastSyncDate(date) { let dateFormat; let sixDaysAgo = (() => { let tempDate = new Date(); @@ -441,7 +441,7 @@ var gSyncUI = { return this._stringBundle.formatStringFromName("lastSync2.label", [lastSyncDateString], 1); }, - onClientsSynced: function() { + onClientsSynced() { let broadcaster = document.getElementById("sync-syncnow-state"); if (broadcaster) { if (Weave.Service.clientsEngine.stats.numClients > 1) { diff --git a/browser/base/content/browser-tabsintitlebar-stub.js b/browser/base/content/browser-tabsintitlebar-stub.js index f6b91506b8a1..41325ec1bb32 100644 --- a/browser/base/content/browser-tabsintitlebar-stub.js +++ b/browser/base/content/browser-tabsintitlebar-stub.js @@ -7,9 +7,9 @@ // don't have CAN_DRAW_IN_TITLEBAR defined. var TabsInTitlebar = { - init: function() {}, - uninit: function() {}, - allowedBy: function(condition, allow) {}, + init() {}, + uninit() {}, + allowedBy(condition, allow) {}, updateAppearance: function updateAppearance(aForce) {}, get enabled() { return document.documentElement.getAttribute("tabsintitlebar") == "true"; diff --git a/browser/base/content/browser-tabsintitlebar.js b/browser/base/content/browser-tabsintitlebar.js index ab882c8948c9..1a8065179597 100644 --- a/browser/base/content/browser-tabsintitlebar.js +++ b/browser/base/content/browser-tabsintitlebar.js @@ -7,7 +7,7 @@ // this one on platforms which don't have CAN_DRAW_IN_TITLEBAR defined. var TabsInTitlebar = { - init: function() { + init() { if (this._initialized) { return; } @@ -49,7 +49,7 @@ var TabsInTitlebar = { } }, - allowedBy: function(condition, allow) { + allowedBy(condition, allow) { if (allow) { if (condition in this._disallowed) { delete this._disallowed[condition]; @@ -69,18 +69,18 @@ var TabsInTitlebar = { return document.documentElement.getAttribute("tabsintitlebar") == "true"; }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { if (topic == "nsPref:changed") this._readPref(); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { if (aEvent.type == "resolutionchange" && aEvent.target == window) { this._update(true); } }, - _onMenuMutate: function(aMutations) { + _onMenuMutate(aMutations) { for (let mutation of aMutations) { if (mutation.attributeName == "inactive" || mutation.attributeName == "autohide") { @@ -96,12 +96,12 @@ var TabsInTitlebar = { _prefName: "browser.tabs.drawInTitlebar", _lastSizeMode: null, - _readPref: function() { + _readPref() { this.allowedBy("pref", Services.prefs.getBoolPref(this._prefName)); }, - _update: function(aForce = false) { + _update(aForce = false) { let $ = id => document.getElementById(id); let rect = ele => ele.getBoundingClientRect(); let verticalMargins = cstyle => parseFloat(cstyle.marginBottom) + parseFloat(cstyle.marginTop); @@ -253,12 +253,12 @@ var TabsInTitlebar = { } }, - _sizePlaceholder: function(type, width) { + _sizePlaceholder(type, width) { Array.forEach(document.querySelectorAll(".titlebar-placeholder[type='" + type + "']"), function(node) { node.width = width; }); }, - uninit: function() { + uninit() { this._initialized = false; removeEventListener("resolutionchange", this); Services.prefs.removeObserver(this._prefName, this); diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 045a48f7af68..3d2eb02ac1d2 100755 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -170,10 +170,10 @@ XPCOMUtils.defineLazyGetter(this, "Win7Features", function() { Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) { let AeroPeek = Cu.import("resource:///modules/WindowsPreviewPerTab.jsm", {}).AeroPeek; return { - onOpenWindow: function() { + onOpenWindow() { AeroPeek.onOpenWindow(window); }, - onCloseWindow: function() { + onCloseWindow() { AeroPeek.onCloseWindow(window); } }; @@ -408,7 +408,7 @@ const gClickAndHoldListenersOnElement = { }; const gSessionHistoryObserver = { - observe: function(subject, topic, data) + observe(subject, topic, data) { if (topic != "browser:purge-session-history") return; @@ -459,7 +459,7 @@ function findChildShell(aDocument, aDocShell, aSoughtURI) { var gPopupBlockerObserver = { _reportButton: null, - onReportButtonMousedown: function(aEvent) + onReportButtonMousedown(aEvent) { // If this method is called on the same event tick as the popup gets // hidden, do nothing to avoid re-opening the popup. @@ -470,7 +470,7 @@ var gPopupBlockerObserver = { .openPopup(this._reportButton, "after_end", 0, 2, false, false, aEvent); }, - handleEvent: function(aEvent) + handleEvent(aEvent) { if (aEvent.originalTarget != gBrowser.selectedBrowser) return; @@ -541,7 +541,7 @@ var gPopupBlockerObserver = { } }, - toggleAllowPopupsForSite: function(aEvent) + toggleAllowPopupsForSite(aEvent) { var pm = Services.perms; var shouldBlock = aEvent.target.getAttribute("block") == "true"; @@ -554,7 +554,7 @@ var gPopupBlockerObserver = { gBrowser.getNotificationBox().removeCurrentNotification(); }, - fillPopupList: function(aEvent) + fillPopupList(aEvent) { // XXXben - rather than using |currentURI| here, which breaks down on multi-framed sites // we should really walk the blockedPopups and create a list of "allow for " @@ -657,7 +657,7 @@ var gPopupBlockerObserver = { }, null); }, - onPopupHiding: function(aEvent) { + onPopupHiding(aEvent) { if (aEvent.target.anchorNode.id == "page-report-button") aEvent.target.anchorNode.removeAttribute("open"); @@ -672,7 +672,7 @@ var gPopupBlockerObserver = { } }, - showBlockedPopup: function(aEvent) + showBlockedPopup(aEvent) { var target = aEvent.target; var popupReportIndex = target.getAttribute("popupReportIndex"); @@ -680,7 +680,7 @@ var gPopupBlockerObserver = { browser.unblockPopup(popupReportIndex); }, - showAllBlockedPopups: function(aBrowser) + showAllBlockedPopups(aBrowser) { aBrowser.retrieveListOfBlockedPopups().then(popups => { for (let i = 0; i < popups.length; i++) { @@ -690,7 +690,7 @@ var gPopupBlockerObserver = { }, null); }, - editPopupSettings: function() + editPopupSettings() { let prefillValue = ""; try { @@ -729,7 +729,7 @@ var gPopupBlockerObserver = { "_blank", "resizable,dialog=no,centerscreen", params); }, - dontShowMessage: function() + dontShowMessage() { var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage"); gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage); @@ -824,7 +824,7 @@ function gKeywordURIFixup({ target: browser, data: fixupInfo }) { { label: yesMessage, accessKey: gNavigatorBundle.getString("keywordURIFixup.goTo.accesskey"), - callback: function() { + callback() { // Do not set this preference while in private browsing. if (!PrivateBrowsingUtils.isWindowPrivate(window)) { let pref = "browser.fixup.domainwhitelist." + asciiHost; @@ -836,7 +836,7 @@ function gKeywordURIFixup({ target: browser, data: fixupInfo }) { { label: gNavigatorBundle.getString("keywordURIFixup.dismiss"), accessKey: gNavigatorBundle.getString("keywordURIFixup.dismiss.accesskey"), - callback: function() { + callback() { let notification = notificationBox.getNotificationWithValue("keyword-uri-fixup"); notificationBox.removeNotification(notification, true); } @@ -896,11 +896,11 @@ function _loadURIWithFlags(browser, uri, params) { } let loadParams = { - uri: uri, - flags: flags, + uri, + flags, referrer: referrer ? referrer.spec : null, - referrerPolicy: referrerPolicy, - postData: postData + referrerPolicy, + postData } if (params.userContextId) { @@ -1001,7 +1001,7 @@ addEventListener("DOMContentLoaded", function onDCL() { var gBrowserInit = { delayedStartupFinished: false, - onLoad: function() { + onLoad() { gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver, false); Services.obs.addObserver(gPluginHandler.NPAPIPluginCrashed, "plugin-crashed", false); @@ -1104,12 +1104,12 @@ var gBrowserInit = { this._loadHandled = true; }, - _cancelDelayedStartup: function() { + _cancelDelayedStartup() { window.removeEventListener("MozAfterPaint", this._boundDelayedStartup); this._boundDelayedStartup = null; }, - _delayedStartup: function() { + _delayedStartup() { let tmp = {}; Cu.import("resource://gre/modules/TelemetryTimestamps.jsm", tmp); let TelemetryTimestamps = tmp.TelemetryTimestamps; @@ -1470,7 +1470,7 @@ var gBrowserInit = { }, // Returns the URI(s) to load at startup. - _getUriToLoad: function() { + _getUriToLoad() { // window.arguments[0]: URI to load (string), or an nsIArray of // nsISupportsStrings to load, or a xul:tab of // a tabbrowser, which will be replaced by this @@ -1494,7 +1494,7 @@ var gBrowserInit = { return uri; }, - onUnload: function() { + onUnload() { // In certain scenarios it's possible for unload to be fired before onload, // (e.g. if the window is being closed after browser.js loads but before the // load completes). In that case, there's nothing to do here. @@ -2054,7 +2054,7 @@ var gLastOpenDirectory = { gPrefService.setComplexValue("browser.open.lastDir", Ci.nsILocalFile, this._lastDir); }, - reset: function() { + reset() { this._lastDir = null; } }; @@ -2111,10 +2111,10 @@ function loadURI(uri, referrer, postData, allowThirdPartyFixup, referrerPolicy, try { openLinkIn(uri, "current", { referrerURI: referrer, - referrerPolicy: referrerPolicy, - postData: postData, - allowThirdPartyFixup: allowThirdPartyFixup, - userContextId: userContextId, + referrerPolicy, + postData, + allowThirdPartyFixup, + userContextId, originPrincipal, forceAboutBlankViewerInCurrent, }); @@ -2367,7 +2367,7 @@ function BrowserViewSourceOfDocument(aArgsOrDocument) { */ function BrowserViewSource(browser) { BrowserViewSourceOfDocument({ - browser: browser, + browser, outerWindowID: browser.outerWindowID, URL: browser.currentURI.spec, }); @@ -2616,21 +2616,21 @@ var gMenuButtonBadgeManager = { downloadBadge: null, appUpdateBadge: null, - init: function() { + init() { PanelUI.panel.addEventListener("popupshowing", this, true); }, - uninit: function() { + uninit() { PanelUI.panel.removeEventListener("popupshowing", this, true); }, - handleEvent: function(e) { + handleEvent(e) { if (e.type === "popupshowing") { this.clearBadges(); } }, - _showBadge: function() { + _showBadge() { let badgeToShow = this.downloadBadge || this.appUpdateBadge || this.fxaBadge; if (badgeToShow) { @@ -2640,7 +2640,7 @@ var gMenuButtonBadgeManager = { } }, - _changeBadge: function(badgeId, badgeStatus = null) { + _changeBadge(badgeId, badgeStatus = null) { if (badgeId == this.BADGEID_APPUPDATE) { this.appUpdateBadge = badgeStatus; } else if (badgeId == this.BADGEID_DOWNLOAD) { @@ -2653,7 +2653,7 @@ var gMenuButtonBadgeManager = { this._showBadge(); }, - addBadge: function(badgeId, badgeStatus) { + addBadge(badgeId, badgeStatus) { if (!badgeStatus) { Cu.reportError("badgeStatus must be defined"); return; @@ -2661,11 +2661,11 @@ var gMenuButtonBadgeManager = { this._changeBadge(badgeId, badgeStatus); }, - removeBadge: function(badgeId) { + removeBadge(badgeId) { this._changeBadge(badgeId); }, - clearBadges: function() { + clearBadges() { this.appUpdateBadge = null; this.downloadBadge = null; this.fxaBadge = null; @@ -2680,7 +2680,7 @@ var gMenuButtonUpdateBadge = { timer: null, cancelObserverRegistered: false, - init: function() { + init() { try { this.enabled = Services.prefs.getBoolPref("app.update.badge"); } catch (e) {} @@ -2695,7 +2695,7 @@ var gMenuButtonUpdateBadge = { } }, - uninit: function() { + uninit() { if (this.timer) this.timer.cancel(); if (this.enabled) { @@ -2709,7 +2709,7 @@ var gMenuButtonUpdateBadge = { } }, - onMenuPanelCommand: function(event) { + onMenuPanelCommand(event) { if (event.originalTarget.getAttribute("update-status") === "succeeded") { // restart the app let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"] @@ -2726,7 +2726,7 @@ var gMenuButtonUpdateBadge = { } }, - observe: function(subject, topic, status) { + observe(subject, topic, status) { if (topic == "update-canceled") { this.reset(); return; @@ -2746,7 +2746,7 @@ var gMenuButtonUpdateBadge = { // The timer callback will call uninit() when it completes. }, - notify: function() { + notify() { // If the update is successfully applied, or if the updater has fallen back // to non-staged updates, add a badge to the hamburger menu to indicate an // update will be applied once the browser restarts. @@ -2754,7 +2754,7 @@ var gMenuButtonUpdateBadge = { this.displayBadge(true); }, - displayBadge: function(succeeded) { + displayBadge(succeeded) { let status = succeeded ? "succeeded" : "failed"; let badgeStatus = "update-" + status; gMenuButtonBadgeManager.addBadge(gMenuButtonBadgeManager.BADGEID_APPUPDATE, badgeStatus); @@ -2780,7 +2780,7 @@ var gMenuButtonUpdateBadge = { updateButton.hidden = false; }, - reset: function() { + reset() { gMenuButtonBadgeManager.removeBadge( gMenuButtonBadgeManager.BADGEID_APPUPDATE); let updateButton = document.getElementById("PanelUI-update-status"); @@ -2808,7 +2808,7 @@ const PREF_SSL_IMPACT = PREF_SSL_IMPACT_ROOTS.reduce((prefs, root) => { * us via async messaging. */ var BrowserOnClick = { - init: function() { + init() { let mm = window.messageManager; mm.addMessageListener("Browser:CertExceptionError", this); mm.addMessageListener("Browser:OpenCaptivePortalPage", this); @@ -2825,7 +2825,7 @@ var BrowserOnClick = { Services.obs.addObserver(this, "captive-portal-login-success", false); }, - uninit: function() { + uninit() { let mm = window.messageManager; mm.removeMessageListener("Browser:CertExceptionError", this); mm.removeMessageListener("Browser:SiteBlockedError", this); @@ -2841,7 +2841,7 @@ var BrowserOnClick = { Services.obs.removeObserver(this, "captive-portal-login-success"); }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { switch (aTopic) { case "captive-portal-login-abort": case "captive-portal-login-success": @@ -2852,7 +2852,7 @@ var BrowserOnClick = { } }, - handleEvent: function(event) { + handleEvent(event) { if (!event.isTrusted || // Don't trust synthetic events event.button == 2) { return; @@ -2870,7 +2870,7 @@ var BrowserOnClick = { } }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "Browser:CertExceptionError": this.onCertError(msg.target, msg.data.elementId, @@ -2928,7 +2928,7 @@ var BrowserOnClick = { } }, - onSSLErrorReport: function(browser, uri, securityInfo) { + onSSLErrorReport(browser, uri, securityInfo) { if (!Services.prefs.getBoolPref("security.ssl.errorReporting.enabled")) { Cu.reportError("User requested certificate error report sending, but certificate error reporting is disabled"); return; @@ -2945,7 +2945,7 @@ var BrowserOnClick = { uri.host, uri.port); }, - onCertError: function(browser, elementId, isTopFrame, location, securityInfoAsString) { + onCertError(browser, elementId, isTopFrame, location, securityInfoAsString) { let secHistogram = Services.telemetry.getHistogramById("SECURITY_UI"); let securityInfo; @@ -2959,7 +2959,7 @@ var BrowserOnClick = { let sslStatus = securityInfo.QueryInterface(Ci.nsISSLStatusProvider) .SSLStatus; let params = { exceptionAdded : false, - sslStatus : sslStatus }; + sslStatus }; try { switch (Services.prefs.getIntPref("browser.ssl_override_behavior")) { @@ -3014,7 +3014,7 @@ var BrowserOnClick = { } }, - onOpenCaptivePortalPage: function() { + onOpenCaptivePortalPage() { // Open a new tab with the canonical URL that we use to check for a captive portal. // It will be redirected to the login page. let canonicalURL = Services.prefs.getCharPref("captivedetect.canonicalURL"); @@ -3036,7 +3036,7 @@ var BrowserOnClick = { Services.obs.addObserver(tabCloser, "captive-portal-login-success", false); }, - onAboutBlocked: function(elementId, reason, isTopFrame, location) { + onAboutBlocked(elementId, reason, isTopFrame, location) { // Depending on what page we are displaying here (malware/phishing/unwanted) // use the right strings and links for each. let bucketName = ""; @@ -3091,7 +3091,7 @@ var BrowserOnClick = { * the next page also in the parent) and instructs the browser to open the url * in the current tab which will make it update the remoteness of the tab. */ - onE10sAboutNewTab: function(event, ownerDoc) { + onE10sAboutNewTab(event, ownerDoc) { let isTopFrame = (ownerDoc.defaultView.parent === ownerDoc.defaultView); if (!isTopFrame) { return; @@ -3107,7 +3107,7 @@ var BrowserOnClick = { } }, - ignoreWarningButton: function(reason) { + ignoreWarningButton(reason) { // Allow users to override and continue through to the site, // but add a notify bar as a reminder, so that they don't lose // track after, e.g., tab switching. @@ -3122,7 +3122,7 @@ var BrowserOnClick = { let buttons = [{ label: gNavigatorBundle.getString("safebrowsing.getMeOutOfHereButton.label"), accessKey: gNavigatorBundle.getString("safebrowsing.getMeOutOfHereButton.accessKey"), - callback: function() { getMeOutOfHere(); } + callback() { getMeOutOfHere(); } }]; let title; @@ -3131,7 +3131,7 @@ var BrowserOnClick = { buttons[1] = { label: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.label"), accessKey: gNavigatorBundle.getString("safebrowsing.notAnAttackButton.accessKey"), - callback: function() { + callback() { openUILinkIn(gSafeBrowsing.getReportURL('MalwareMistake'), 'tab'); } }; @@ -3140,7 +3140,7 @@ var BrowserOnClick = { buttons[1] = { label: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.label"), accessKey: gNavigatorBundle.getString("safebrowsing.notADeceptiveSiteButton.accessKey"), - callback: function() { + callback() { openUILinkIn(gSafeBrowsing.getReportURL('PhishMistake'), 'tab'); } }; @@ -3374,7 +3374,7 @@ var PrintPreviewListener = { _tabBeforePrintPreview: null, _simplifyPageTab: null, - getPrintPreviewBrowser: function() { + getPrintPreviewBrowser() { if (!this._printPreviewTab) { let browser = gBrowser.selectedTab.linkedBrowser; let preferredRemoteType = browser.remoteType; @@ -3387,23 +3387,23 @@ var PrintPreviewListener = { } return gBrowser.getBrowserForTab(this._printPreviewTab); }, - createSimplifiedBrowser: function() { + createSimplifiedBrowser() { this._simplifyPageTab = gBrowser.loadOneTab("about:blank", { inBackground: true }); return this.getSimplifiedSourceBrowser(); }, - getSourceBrowser: function() { + getSourceBrowser() { return this._tabBeforePrintPreview ? this._tabBeforePrintPreview.linkedBrowser : gBrowser.selectedBrowser; }, - getSimplifiedSourceBrowser: function() { + getSimplifiedSourceBrowser() { return this._simplifyPageTab ? gBrowser.getBrowserForTab(this._simplifyPageTab) : null; }, - getNavToolbox: function() { + getNavToolbox() { return gNavToolbox; }, - onEnter: function() { + onEnter() { // We might have accidentally switched tabs since the user invoked print // preview if (gBrowser.selectedTab != this._printPreviewTab) { @@ -3412,7 +3412,7 @@ var PrintPreviewListener = { gInPrintPreviewMode = true; this._toggleAffectedChrome(); }, - onExit: function() { + onExit() { gBrowser.selectedTab = this._tabBeforePrintPreview; this._tabBeforePrintPreview = null; gInPrintPreviewMode = false; @@ -3425,7 +3425,7 @@ var PrintPreviewListener = { gBrowser.deactivatePrintPreviewBrowsers(); this._printPreviewTab = null; }, - _toggleAffectedChrome: function() { + _toggleAffectedChrome() { gNavToolbox.collapsed = gInPrintPreviewMode; if (gInPrintPreviewMode) @@ -3435,7 +3435,7 @@ var PrintPreviewListener = { TabsInTitlebar.allowedBy("print-preview", !gInPrintPreviewMode); }, - _hideChrome: function() { + _hideChrome() { this._chromeState = {}; this._chromeState.sidebarOpen = SidebarUI.isOpen; @@ -3463,7 +3463,7 @@ var PrintPreviewListener = { syncNotifications.notificationsHidden = true; } }, - _showChrome: function() { + _showChrome() { if (this._chromeState.notificationsOpen) gBrowser.getNotificationBox().notificationsHidden = false; @@ -3499,20 +3499,20 @@ function FillInHTMLTooltip(tipElement) var browserDragAndDrop = { canDropLink: aEvent => Services.droppedLinkHandler.canDropLink(aEvent, true), - dragOver: function(aEvent) + dragOver(aEvent) { if (this.canDropLink(aEvent)) { aEvent.preventDefault(); } }, - dropLinks: function(aEvent, aDisallowInherit) { + dropLinks(aEvent, aDisallowInherit) { return Services.droppedLinkHandler.dropLinks(aEvent, aDisallowInherit); } }; var homeButtonObserver = { - onDrop: function(aEvent) + onDrop(aEvent) { // disallow setting home pages that inherit the principal let links = browserDragAndDrop.dropLinks(aEvent, true); @@ -3521,7 +3521,7 @@ var homeButtonObserver = { } }, - onDragOver: function(aEvent) + onDragOver(aEvent) { if (gPrefService.prefIsLocked("browser.startup.homepage")) { return; @@ -3529,7 +3529,7 @@ var homeButtonObserver = { browserDragAndDrop.dragOver(aEvent); aEvent.dropEffect = "link"; }, - onDragExit: function(aEvent) + onDragExit(aEvent) { } } @@ -3596,14 +3596,14 @@ var newWindowButtonObserver = { } const DOMLinkHandler = { - init: function() { + init() { let mm = window.messageManager; mm.addMessageListener("Link:AddFeed", this); mm.addMessageListener("Link:SetIcon", this); mm.addMessageListener("Link:AddSearch", this); }, - receiveMessage: function(aMsg) { + receiveMessage(aMsg) { switch (aMsg.name) { case "Link:AddFeed": let link = {type: aMsg.data.type, href: aMsg.data.href, title: aMsg.data.title}; @@ -3620,7 +3620,7 @@ const DOMLinkHandler = { } }, - setIcon: function(aBrowser, aURL, aLoadingPrincipal) { + setIcon(aBrowser, aURL, aLoadingPrincipal) { if (gBrowser.isFailedIcon(aURL)) return false; @@ -3632,7 +3632,7 @@ const DOMLinkHandler = { return true; }, - addSearch: function(aBrowser, aEngine, aURL) { + addSearch(aBrowser, aEngine, aURL) { let tab = gBrowser.getTabForBrowser(aBrowser); if (!tab) return; @@ -3642,7 +3642,7 @@ const DOMLinkHandler = { } const BrowserSearch = { - addEngine: function(browser, engine, uri) { + addEngine(browser, engine, uri) { // Check to see whether we've already added an engine with this title if (browser.engines) { if (browser.engines.some(e => e.title == engine.title)) @@ -3678,7 +3678,7 @@ const BrowserSearch = { * available when a page is loaded or the user switches tabs to a page that * has search engines. */ - updateOpenSearchBadge: function() { + updateOpenSearchBadge() { var searchBar = this.searchBar; if (!searchBar) return; @@ -3770,7 +3770,7 @@ const BrowserSearch = { * @return engine The search engine used to perform a search, or null if no * search was performed. */ - _loadSearch: function(searchText, useNewTab, purpose) { + _loadSearch(searchText, useNewTab, purpose) { let engine; // If the search bar is visible, use the current engine, otherwise, fall @@ -3794,7 +3794,7 @@ const BrowserSearch = { openLinkIn(submission.uri.spec, useNewTab ? "tab" : "current", { postData: submission.postData, - inBackground: inBackground, + inBackground, relatedToCurrent: true }); return engine; @@ -3820,14 +3820,14 @@ const BrowserSearch = { * This should only be called from the context menu. See * BrowserSearch.loadSearch for the preferred API. */ - loadSearchFromContext: function(terms) { + loadSearchFromContext(terms) { let engine = BrowserSearch._loadSearch(terms, true, "contextmenu"); if (engine) { BrowserSearch.recordSearchInTelemetry(engine, "contextmenu"); } }, - pasteAndSearch: function(event) { + pasteAndSearch(event) { BrowserSearch.searchBar.select(); goDoCommand("cmd_paste"); BrowserSearch.searchBar.handleSearchCommand(event); @@ -3850,7 +3850,7 @@ const BrowserSearch = { openUILinkIn(this.searchEnginesURL, where); }, - _getSearchEngineId: function(engine) { + _getSearchEngineId(engine) { if (engine && engine.identifier) { return engine.identifier; } @@ -3879,7 +3879,7 @@ const BrowserSearch = { * indicates where the item was in the suggestion list and how the user * selected it: {selection: {index: The selected index, kind: "key" or "mouse"}} */ - recordSearchInTelemetry: function(engine, source, details = {}) { + recordSearchInTelemetry(engine, source, details = {}) { BrowserUITelemetry.countSearchEvent(source, null, details.selection); try { BrowserUsageTelemetry.recordSearch(engine, source, details); @@ -3903,7 +3903,7 @@ const BrowserSearch = { * @param where * (string) Where was the search link opened (e.g. new tab, current tab, ..). */ - recordOneoffSearchInTelemetry: function(engine, source, type, where) { + recordOneoffSearchInTelemetry(engine, source, type, where) { let id = this._getSearchEngineId(engine) + "." + source; BrowserUITelemetry.countOneoffSearchEvent(id, type, where); try { @@ -4295,7 +4295,7 @@ var XULBrowserWindow = { // Left here for add-on compatibility, see bug 752434 inContentWhitelist: [], - QueryInterface: function(aIID) { + QueryInterface(aIID) { if (aIID.equals(Ci.nsIWebProgressListener) || aIID.equals(Ci.nsIWebProgressListener2) || aIID.equals(Ci.nsISupportsWeakReference) || @@ -4325,34 +4325,34 @@ var XULBrowserWindow = { return this.canViewSource = document.getElementById("canViewSource"); }, - init: function() { + init() { // Initialize the security button's state and tooltip text. var securityUI = gBrowser.securityUI; this.onSecurityChange(null, null, securityUI.state, true); }, - setJSStatus: function() { + setJSStatus() { // unsupported }, - forceInitialBrowserRemote: function(aRemoteType) { + forceInitialBrowserRemote(aRemoteType) { let initBrowser = document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser"); gBrowser.updateBrowserRemoteness(initBrowser, true, { remoteType: aRemoteType }); }, - forceInitialBrowserNonRemote: function(aOpener) { + forceInitialBrowserNonRemote(aOpener) { let initBrowser = document.getAnonymousElementByAttribute(gBrowser, "anonid", "initialBrowser"); gBrowser.updateBrowserRemoteness(initBrowser, false, { opener: aOpener }); }, - setDefaultStatus: function(status) { + setDefaultStatus(status) { this.defaultStatus = status; this.updateStatusField(); }, - setOverLink: function(url, anchorElt) { + setOverLink(url, anchorElt) { // Encode bidirectional formatting characters. // (RFC 3987 sections 3.2 and 4.1 paragraph 6) url = url.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g, @@ -4365,7 +4365,7 @@ var XULBrowserWindow = { LinkTargetDisplay.update(); }, - showTooltip: function(x, y, tooltip, direction) { + showTooltip(x, y, tooltip, direction) { if (Cc["@mozilla.org/widget/dragservice;1"].getService(Ci.nsIDragService). getCurrentSession()) { return; @@ -4381,16 +4381,16 @@ var XULBrowserWindow = { elt.openPopupAtScreen(anchor.boxObject.screenX + x, anchor.boxObject.screenY + y, false, null); }, - hideTooltip: function() { + hideTooltip() { let elt = document.getElementById("remoteBrowserTooltip"); elt.hidePopup(); }, - getTabCount: function() { + getTabCount() { return gBrowser.tabs.length; }, - updateStatusField: function() { + updateStatusField() { var text, type, types = ["overLink"]; if (this._busyUI) types.push("status"); @@ -4414,14 +4414,14 @@ var XULBrowserWindow = { }, // Called before links are navigated to to allow us to retarget them if needed. - onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) { + onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) { let target = BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); SocialUI.closeSocialPanelForLinkTraversal(target, linkNode); return target; }, // Check whether this URI should load in the current process - shouldLoadURI: function(aDocShell, aURI, aReferrer) { + shouldLoadURI(aDocShell, aURI, aReferrer) { if (!gMultiProcessBrowser) return true; @@ -4442,13 +4442,13 @@ var XULBrowserWindow = { return true; }, - onProgressChange: function(aWebProgress, aRequest, + onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { // Do nothing. }, - onProgressChange64: function(aWebProgress, aRequest, + onProgressChange64(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { return this.onProgressChange(aWebProgress, aRequest, @@ -4457,7 +4457,7 @@ var XULBrowserWindow = { }, // This function fires only for the currently selected tab. - onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) { const nsIWebProgressListener = Ci.nsIWebProgressListener; const nsIChannel = Ci.nsIChannel; @@ -4541,7 +4541,7 @@ var XULBrowserWindow = { } }, - onLocationChange: function(aWebProgress, aRequest, aLocationURI, aFlags) { + onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) { var location = aLocationURI ? aLocationURI.spec : ""; // If displayed, hide the form validation popup. @@ -4685,15 +4685,15 @@ var XULBrowserWindow = { } }, - asyncUpdateUI: function() { + asyncUpdateUI() { FeedHandler.updateFeeds(); BrowserSearch.updateOpenSearchBadge(); }, // Left here for add-on compatibility, see bug 752434 - hideChromeForLocation: function() {}, + hideChromeForLocation() {}, - onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) { + onStatusChange(aWebProgress, aRequest, aStatus, aMessage) { this.status = aMessage; this.updateStatusField(); }, @@ -4708,7 +4708,7 @@ var XULBrowserWindow = { // 3. Called directly during this object's initializations. // aRequest will be null always in case 2 and 3, and sometimes in case 1 (for // instance, there won't be a request when STATE_BLOCKED_TRACKING_CONTENT is observed). - onSecurityChange: function(aWebProgress, aRequest, aState, aIsSimulated) { + onSecurityChange(aWebProgress, aRequest, aState, aIsSimulated) { // Don't need to do anything if the data we use to update the UI hasn't // changed let uri = gBrowser.currentURI; @@ -4780,7 +4780,7 @@ var LinkTargetDisplay = { return XULBrowserWindow.statusTextField.label != ""; }, - update: function() { + update() { clearTimeout(this._timer); window.removeEventListener("mousemove", this, true); @@ -4801,7 +4801,7 @@ var LinkTargetDisplay = { } }, - handleEvent: function(event) { + handleEvent(event) { switch (event.type) { case "mousemove": // Restart the delay since the mouse was moved @@ -4811,14 +4811,14 @@ var LinkTargetDisplay = { } }, - _showDelayed: function() { + _showDelayed() { this._timer = setTimeout(function(self) { XULBrowserWindow.updateStatusField(); window.removeEventListener("mousemove", self, true); }, this.DELAY_SHOW, this); }, - _hide: function() { + _hide() { clearTimeout(this._timer); XULBrowserWindow.updateStatusField(); @@ -4826,7 +4826,7 @@ var LinkTargetDisplay = { }; var CombinedStopReload = { - init: function() { + init() { if (this._initialized) return; @@ -4843,7 +4843,7 @@ var CombinedStopReload = { this.stop = stop; }, - uninit: function() { + uninit() { if (!this._initialized) return; @@ -4854,14 +4854,14 @@ var CombinedStopReload = { this.stop = null; }, - handleEvent: function(event) { + handleEvent(event) { // the only event we listen to is "click" on the stop button if (event.button == 0 && !this.stop.disabled) this._stopClicked = true; }, - switchToStop: function() { + switchToStop() { if (!this._initialized) return; @@ -4869,7 +4869,7 @@ var CombinedStopReload = { this.reload.setAttribute("displaystop", "true"); }, - switchToReload: function(aDelay) { + switchToReload(aDelay) { if (!this._initialized) return; @@ -4896,7 +4896,7 @@ var CombinedStopReload = { }, 650, this); }, - _cancelTransition: function() { + _cancelTransition() { if (this._timer) { clearTimeout(this._timer); this._timer = 0; @@ -4909,7 +4909,7 @@ var TabsProgressListener = { // we won't see STATE_START events for pre-rendered tabs. _startedLoadTimer: new WeakSet(), - onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { // Collect telemetry data about tab load times. if (aWebProgress.isTopLevel && (!aRequest.originalURI || aRequest.originalURI.spec.scheme != "about")) { if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW) { @@ -4963,7 +4963,7 @@ var TabsProgressListener = { } }, - onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI, + onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI, aFlags) { // Filter out location changes caused by anchor navigation // or history.push/pop/replaceState. @@ -5001,7 +5001,7 @@ function nsBrowserAccess() { } nsBrowserAccess.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIBrowserDOMWindow, Ci.nsISupports]), - _openURIInNewTab: function(aURI, aReferrer, aReferrerPolicy, aIsPrivate, + _openURIInNewTab(aURI, aReferrer, aReferrerPolicy, aIsPrivate, aIsExternal, aForceNotRemote = false, aUserContextId = Ci.nsIScriptSecurityManager.DEFAULT_USER_CONTEXT_ID, aOpener = null) { @@ -5045,7 +5045,7 @@ nsBrowserAccess.prototype = { return browser; }, - openURI: function(aURI, aOpener, aWhere, aFlags) { + openURI(aURI, aOpener, aWhere, aFlags) { // This function should only ever be called if we're opening a URI // from a non-remote browser window (via nsContentTreeOwner). if (aOpener && Cu.isCrossProcessWrapper(aOpener)) { @@ -5126,7 +5126,7 @@ nsBrowserAccess.prototype = { gBrowser.loadURIWithFlags(aURI.spec, { flags: loadflags, referrerURI: referrer, - referrerPolicy: referrerPolicy, + referrerPolicy, }); } if (!gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground")) @@ -5160,7 +5160,7 @@ nsBrowserAccess.prototype = { return null; }, - isTabContentWindow: function(aWindow) { + isTabContentWindow(aWindow) { return gBrowser.browsers.some(browser => browser.contentWindow == aWindow); }, @@ -5376,7 +5376,7 @@ function displaySecurityInfo() var gHomeButton = { prefDomain: "browser.startup.homepage", - observe: function(aSubject, aTopic, aPrefName) + observe(aSubject, aTopic, aPrefName) { if (aTopic != "nsPref:changed" || aPrefName != this.prefDomain) return; @@ -5384,7 +5384,7 @@ var gHomeButton = { this.updateTooltip(); }, - updateTooltip: function(homeButton) + updateTooltip(homeButton) { if (!homeButton) homeButton = document.getElementById("home-button"); @@ -5398,7 +5398,7 @@ var gHomeButton = { } }, - getHomePage: function() + getHomePage() { var url; try { @@ -5703,8 +5703,8 @@ function handleLinkClick(event, href, linkNode) { let params = { charset: doc.characterSet, allowMixedContent: persistAllowMixedContentInChildTab, - referrerURI: referrerURI, - referrerPolicy: referrerPolicy, + referrerURI, + referrerPolicy, noReferrer: BrowserUtils.linkHasNoReferrer(linkNode), originPrincipal: doc.nodePrincipal, }; @@ -5884,7 +5884,7 @@ var gPageStyleMenu = { // _pageStyleSheets: new WeakMap(), - init: function() { + init() { let mm = window.messageManager; mm.addMessageListener("PageStyle:StyleSheets", (msg) => { this._pageStyleSheets.set(msg.target.permanentKey, msg.data); @@ -5904,7 +5904,7 @@ var gPageStyleMenu = { * See the documentation for gPageStyleMenu for a description * of the Object structure. */ - getBrowserStyleSheets: function(browser) { + getBrowserStyleSheets(browser) { if (!browser) { browser = gBrowser.selectedBrowser; } @@ -5916,7 +5916,7 @@ var gPageStyleMenu = { return data.filteredStyleSheets; }, - _getStyleSheetInfo: function(browser) { + _getStyleSheetInfo(browser) { let data = this._pageStyleSheets.get(browser.permanentKey); if (!data) { return { @@ -5929,7 +5929,7 @@ var gPageStyleMenu = { return data; }, - fillPopup: function(menuPopup) { + fillPopup(menuPopup) { let styleSheetInfo = this._getStyleSheetInfo(gBrowser.selectedBrowser); var noStyle = menuPopup.firstChild; var persistentOnly = noStyle.nextSibling; @@ -5973,12 +5973,12 @@ var gPageStyleMenu = { sep.hidden = (noStyle.hidden && persistentOnly.hidden) || !haveAltSheets; }, - switchStyleSheet: function(title) { + switchStyleSheet(title) { let mm = gBrowser.selectedBrowser.messageManager; - mm.sendAsyncMessage("PageStyle:Switch", {title: title}); + mm.sendAsyncMessage("PageStyle:Switch", {title}); }, - disableStyle: function() { + disableStyle() { let mm = gBrowser.selectedBrowser.messageManager; mm.sendAsyncMessage("PageStyle:Disable"); }, @@ -5999,7 +5999,7 @@ function setStyleDisabled(disabled) { var LanguageDetectionListener = { - init: function() { + init() { window.messageManager.addMessageListener("Translation:DocumentState", msg => { Translation.documentStateReceived(msg.target, msg.data); }); @@ -6011,7 +6011,7 @@ var BrowserOffline = { _inited: false, // BrowserOffline Public Methods - init: function() + init() { if (!this._uiElement) this._uiElement = document.getElementById("workOfflineMenuitemState"); @@ -6023,14 +6023,14 @@ var BrowserOffline = { this._inited = true; }, - uninit: function() + uninit() { if (this._inited) { Services.obs.removeObserver(this, "network:offline-status-changed"); } }, - toggleOfflineStatus: function() + toggleOfflineStatus() { var ioService = Services.io; @@ -6043,7 +6043,7 @@ var BrowserOffline = { }, // nsIObserver - observe: function(aSubject, aTopic, aState) + observe(aSubject, aTopic, aState) { if (aTopic != "network:offline-status-changed") return; @@ -6054,7 +6054,7 @@ var BrowserOffline = { }, // BrowserOffline Implementation Methods - _canGoOffline: function() + _canGoOffline() { try { var cancelGoOffline = Cc["@mozilla.org/supports-PRBool;1"].createInstance(Ci.nsISupportsPRBool); @@ -6071,7 +6071,7 @@ var BrowserOffline = { }, _uiElement: null, - _updateOfflineUI: function(aOffline) + _updateOfflineUI(aOffline) { var offlineLocked = gPrefService.prefIsLocked("network.online"); if (offlineLocked) @@ -6165,7 +6165,7 @@ var OfflineApps = { let mainAction = { label: gNavigatorBundle.getString("offlineApps.allowStoring.label"), accessKey: gNavigatorBundle.getString("offlineApps.allowStoring.accesskey"), - callback: function() { + callback() { for (let [ciBrowser, ciDocId, ciUri] of notification.options.controlledItems) { OfflineApps.allowSite(ciBrowser, ciDocId, ciUri); } @@ -6174,7 +6174,7 @@ var OfflineApps = { let secondaryActions = [{ label: gNavigatorBundle.getString("offlineApps.dontAllow.label"), accessKey: gNavigatorBundle.getString("offlineApps.dontAllow.accesskey"), - callback: function() { + callback() { for (let [, , ciUri] of notification.options.controlledItems) { OfflineApps.disallowSite(ciUri); } @@ -6283,7 +6283,7 @@ var IndexedDBPromptHelper = { var mainAction = { label: gNavigatorBundle.getString("offlineApps.allowStoring.label"), accessKey: gNavigatorBundle.getString("offlineApps.allowStoring.accesskey"), - callback: function() { + callback() { observer.observe(null, responseTopic, Ci.nsIPermissionManager.ALLOW_ACTION); } @@ -6293,7 +6293,7 @@ var IndexedDBPromptHelper = { { label: gNavigatorBundle.getString("offlineApps.dontAllow.label"), accessKey: gNavigatorBundle.getString("offlineApps.dontAllow.accesskey"), - callback: function() { + callback() { observer.observe(null, responseTopic, Ci.nsIPermissionManager.DENY_ACTION); } @@ -6414,11 +6414,11 @@ function warnAboutClosingWindow() { } var MailIntegration = { - sendLinkForBrowser: function(aBrowser) { + sendLinkForBrowser(aBrowser) { this.sendMessage(aBrowser.currentURI.spec, aBrowser.contentTitle); }, - sendMessage: function(aBody, aSubject) { + sendMessage(aBody, aSubject) { // generate a mailto url based on the url and the url's title var mailtoUrl = "mailto:"; if (aBody) { @@ -6435,7 +6435,7 @@ var MailIntegration = { // a generic method which can be used to pass arbitrary urls to the operating // system. // aURL --> a nsIURI which represents the url to launch - _launchExternalUrl: function(aURL) { + _launchExternalUrl(aURL) { var extProtocolSvc = Cc["@mozilla.org/uriloader/external-protocol-service;1"] .getService(Ci.nsIExternalProtocolService); @@ -6504,7 +6504,7 @@ function AddKeywordForSearchField() { PlacesUIUtils.showBookmarkDialog({ action: "add" , type: "bookmark" , uri: makeURI(bookmarkData.spec) - , title: title + , title , description: bookmarkData.description , keyword: "" , postData: bookmarkData.postData @@ -6840,7 +6840,7 @@ var gIdentityHandler = { * Handler for mouseclicks on the "More Information" button in the * "identity-popup" panel. */ - handleMoreInfoClick : function(event) { + handleMoreInfoClick(event) { displaySecurityInfo(); event.stopPropagation(); this._identityPopup.hidePopup(); @@ -6898,7 +6898,7 @@ var gIdentityHandler = { * Helper to parse out the important parts of _sslStatus (of the SSL cert in * particular) for use in constructing identity UI strings */ - getIdentityData : function() { + getIdentityData() { var result = {}; var cert = this._sslStatus.serverCert; @@ -6999,7 +6999,7 @@ var gIdentityHandler = { /** * Attempt to provide proper IDN treatment for host names */ - getEffectiveHost: function() { + getEffectiveHost() { if (!this._IDNService) this._IDNService = Cc["@mozilla.org/network/idn-service;1"] .getService(Ci.nsIIDNService); @@ -7179,7 +7179,7 @@ var gIdentityHandler = { let buttons = [{ label: gNavigatorBundle.getString("revokeOverride.label"), accessKey: gNavigatorBundle.getString("revokeOverride.accesskey"), - callback: function(aNotification, aButton) { + callback(aNotification, aButton) { try { let weakCryptoOverride = Cc["@mozilla.org/security/weakcryptooverride;1"] .getService(Ci.nsIWeakCryptoOverride); @@ -7369,7 +7369,7 @@ var gIdentityHandler = { /** * Click handler for the identity-box element in primary chrome. */ - handleIdentityButtonEvent : function(event) { + handleIdentityButtonEvent(event) { event.stopPropagation(); if ((event.type == "click" && event.button != 0) || @@ -7430,7 +7430,7 @@ var gIdentityHandler = { } }, - onDragStart: function(event) { + onDragStart(event) { if (gURLBar.getAttribute("pageproxystate") != "valid") return; @@ -7446,12 +7446,12 @@ var gIdentityHandler = { dt.setDragImage(this._identityIcon, 16, 16); }, - onLocationChange: function() { + onLocationChange() { this._permissionJustRemoved = false; this.updatePermissionHint(); }, - updatePermissionHint: function() { + updatePermissionHint() { if (!this._permissionList.hasChildNodes() && !this._permissionJustRemoved) { this._permissionEmptyHint.removeAttribute("hidden"); } else { @@ -7465,7 +7465,7 @@ var gIdentityHandler = { } }, - updateSitePermissions: function() { + updateSitePermissions() { while (this._permissionList.hasChildNodes()) this._permissionList.removeChild(this._permissionList.lastChild); @@ -7504,7 +7504,7 @@ var gIdentityHandler = { this.updatePermissionHint(); }, - _handleHeightChange: function(aFunction, aWillShowReloadHint) { + _handleHeightChange(aFunction, aWillShowReloadHint) { let heightBefore = getComputedStyle(this._permissionList).height; aFunction(); let heightAfter = getComputedStyle(this._permissionList).height; @@ -7518,7 +7518,7 @@ var gIdentityHandler = { this._identityPopupMultiView.setHeightToFit(heightChange); }, - _createPermissionItem: function(aPermission) { + _createPermissionItem(aPermission) { let container = document.createElement("hbox"); container.setAttribute("class", "identity-popup-permission-item"); container.setAttribute("align", "center"); @@ -7681,7 +7681,7 @@ var gPrivateBrowsingUI = { }; var gRemoteTabsUI = { - init: function() { + init() { if (window.location.href != getBrowserURL() && // Also check hidden window for the Mac no-window case window.location.href != "chrome://browser/content/hiddenWindow.xul") { @@ -7828,7 +7828,7 @@ function switchToTabHavingURI(aURI, aOpenNew, aOpenParams = {}) { } var RestoreLastSessionObserver = { - init: function() { + init() { if (SessionStore.canRestoreLastSession && !PrivateBrowsingUtils.isWindowPrivate(window)) { Services.obs.addObserver(this, "sessionstore-last-session-cleared", true); @@ -7836,7 +7836,7 @@ var RestoreLastSessionObserver = { } }, - observe: function() { + observe() { // The last session can only be restored once so there's // no way we need to re-enable our menu item. Services.obs.removeObserver(this, "sessionstore-last-session-cleared"); @@ -8047,7 +8047,7 @@ var MousePosTracker = { return this._windowUtils = window.getInterface(Ci.nsIDOMWindowUtils); }, - addListener: function(listener) { + addListener(listener) { if (this._listeners.has(listener)) return; @@ -8057,11 +8057,11 @@ var MousePosTracker = { this._callListener(listener); }, - removeListener: function(listener) { + removeListener(listener) { this._listeners.delete(listener); }, - handleEvent: function(event) { + handleEvent(event) { var fullZoom = this._windowUtils.fullZoom; this._x = event.screenX / fullZoom - window.mozInnerScreenX; this._y = event.screenY / fullZoom - window.mozInnerScreenY; @@ -8075,7 +8075,7 @@ var MousePosTracker = { }, this); }, - _callListener: function(listener) { + _callListener(listener) { let rect = listener.getMouseTargetRect(); let hover = this._x >= rect.left && this._x <= rect.right && @@ -8097,7 +8097,7 @@ var MousePosTracker = { }; var ToolbarIconColor = { - init: function() { + init() { this._initialized = true; window.addEventListener("activate", this); @@ -8111,7 +8111,7 @@ var ToolbarIconColor = { this.inferFromText(); }, - uninit: function() { + uninit() { this._initialized = false; window.removeEventListener("activate", this); @@ -8119,7 +8119,7 @@ var ToolbarIconColor = { Services.obs.removeObserver(this, "lightweight-theme-styling-update"); }, - handleEvent: function(event) { + handleEvent(event) { switch (event.type) { case "activate": case "deactivate": @@ -8128,7 +8128,7 @@ var ToolbarIconColor = { } }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { switch (aTopic) { case "lightweight-theme-styling-update": // inferFromText needs to run after LightweightThemeConsumer.jsm's @@ -8138,7 +8138,7 @@ var ToolbarIconColor = { } }, - inferFromText: function() { + inferFromText() { if (!this._initialized) return; @@ -8172,14 +8172,14 @@ var ToolbarIconColor = { } var PanicButtonNotifier = { - init: function() { + init() { this._initialized = true; if (window.PanicButtonNotifierShouldNotify) { delete window.PanicButtonNotifierShouldNotify; this.notify(); } }, - notify: function() { + notify() { if (!this._initialized) { window.PanicButtonNotifierShouldNotify = true; return; @@ -8196,14 +8196,14 @@ var PanicButtonNotifier = { Cu.reportError(ex); } }, - close: function() { + close() { let popup = document.getElementById("panic-button-success-notification"); popup.hidePopup(); }, }; var AboutPrivateBrowsingListener = { - init: function() { + init() { window.messageManager.addMessageListener( "AboutPrivateBrowsing:OpenPrivateWindow", msg => { diff --git a/browser/base/content/content.js b/browser/base/content/content.js index c5e1c0ec1451..837cd5863b80 100644 --- a/browser/base/content/content.js +++ b/browser/base/content/content.js @@ -103,8 +103,8 @@ var handleContentContextMenu = function(event) { let addonInfo = {}; let subject = { - event: event, - addonInfo: addonInfo, + event, + addonInfo, }; subject.wrappedJSObject = subject; Services.obs.notifyObservers(subject, "content-contextmenu", null); @@ -197,18 +197,18 @@ var handleContentContextMenu = function(event) { let mainWin = browser.ownerGlobal; mainWin.gContextMenuContentData = { isRemote: false, - event: event, + event, popupNode: event.target, - browser: browser, - addonInfo: addonInfo, + browser, + addonInfo, documentURIObject: doc.documentURIObject, - docLocation: docLocation, - charSet: charSet, - referrer: referrer, - referrerPolicy: referrerPolicy, - contentType: contentType, - contentDisposition: contentDisposition, - selectionInfo: selectionInfo, + docLocation, + charSet, + referrer, + referrerPolicy, + contentType, + contentDisposition, + selectionInfo, disableSetDesktopBackground: disableSetDesktopBg, loginFillInfo, parentAllowsMixedContent, @@ -262,7 +262,7 @@ function getSerializedSecurityInfo(docShell) { } var AboutNetAndCertErrorListener = { - init: function(chromeGlobal) { + init(chromeGlobal) { addMessageListener("CertErrorDetails", this); addMessageListener("Browser:CaptivePortalFreed", this); chromeGlobal.addEventListener('AboutNetErrorLoad', this, false, true); @@ -280,7 +280,7 @@ var AboutNetAndCertErrorListener = { return content.document.documentURI.startsWith("about:certerror"); }, - receiveMessage: function(msg) { + receiveMessage(msg) { if (!this.isAboutCertError) { return; } @@ -348,7 +348,7 @@ var AboutNetAndCertErrorListener = { content.dispatchEvent(new content.CustomEvent("AboutNetErrorCaptivePortalFreed")); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { if (!this.isAboutNetError && !this.isAboutCertError) { return; } @@ -372,7 +372,7 @@ var AboutNetAndCertErrorListener = { } }, - changedCertPrefs: function() { + changedCertPrefs() { for (let prefName of PREF_SSL_IMPACT) { if (Services.prefs.prefHasUserValue(prefName)) { return true; @@ -382,7 +382,7 @@ var AboutNetAndCertErrorListener = { return false; }, - onPageLoad: function(evt) { + onPageLoad(evt) { if (this.isAboutCertError) { let originalTarget = evt.originalTarget; let ownerDoc = originalTarget.ownerDocument; @@ -394,7 +394,7 @@ var AboutNetAndCertErrorListener = { detail: JSON.stringify({ enabled: Services.prefs.getBoolPref("security.ssl.errorReporting.enabled"), changedCertPrefs: this.changedCertPrefs(), - automatic: automatic + automatic }) })); @@ -402,16 +402,16 @@ var AboutNetAndCertErrorListener = { {reportStatus: TLS_ERROR_REPORT_TELEMETRY_UI_SHOWN}); }, - openCaptivePortalPage: function(evt) { + openCaptivePortalPage(evt) { sendAsyncMessage("Browser:OpenCaptivePortalPage"); }, - onResetPreferences: function(evt) { + onResetPreferences(evt) { sendAsyncMessage("Browser:ResetSSLPreferences"); }, - onSetAutomatic: function(evt) { + onSetAutomatic(evt) { sendAsyncMessage("Browser:SetSSLErrorReportAuto", { automatic: evt.detail }); @@ -427,7 +427,7 @@ var AboutNetAndCertErrorListener = { } }, - onOverride: function(evt) { + onOverride(evt) { let {host, port} = content.document.mozDocumentURIIfNotForErrorPages; sendAsyncMessage("Browser:OverrideWeakCrypto", { uri: {host, port} }); } @@ -443,7 +443,7 @@ var ClickEventHandler = { .addSystemEventListener(global, "click", this, true); }, - handleEvent: function(event) { + handleEvent(event) { if (!event.isTrusted || event.defaultPrevented || event.button == 2) { return; } @@ -484,7 +484,7 @@ var ClickEventHandler = { let json = { button: event.button, shiftKey: event.shiftKey, ctrlKey: event.ctrlKey, metaKey: event.metaKey, altKey: event.altKey, href: null, title: null, - bookmark: false, referrerPolicy: referrerPolicy, + bookmark: false, referrerPolicy, originAttributes: principal ? principal.originAttributes : {}, isContentWindowPrivate: PrivateBrowsingUtils.isContentWindowPrivate(ownerDoc.defaultView)}; @@ -535,7 +535,7 @@ var ClickEventHandler = { } }, - onCertError: function(targetElement, ownerDoc) { + onCertError(targetElement, ownerDoc) { let docShell = ownerDoc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShell); @@ -547,7 +547,7 @@ var ClickEventHandler = { }); }, - onAboutBlocked: function(targetElement, ownerDoc) { + onAboutBlocked(targetElement, ownerDoc) { var reason = 'phishing'; if (/e=malwareBlocked/.test(ownerDoc.documentURI)) { reason = 'malware'; @@ -556,13 +556,13 @@ var ClickEventHandler = { } sendAsyncMessage("Browser:SiteBlockedError", { location: ownerDoc.location.href, - reason: reason, + reason, elementId: targetElement.getAttribute("id"), isTopFrame: (ownerDoc.defaultView.parent === ownerDoc.defaultView) }); }, - onAboutNetError: function(event, documentURI) { + onAboutNetError(event, documentURI) { let elmId = event.originalTarget.getAttribute("id"); if (elmId == "returnButton") { sendAsyncMessage("Browser:SSLErrorGoBack", {}); @@ -591,7 +591,7 @@ var ClickEventHandler = { * element. This includes SVG links, because callers expect |node| * to behave like an element, which SVG links (XLink) don't. */ - _hrefAndLinkNodeForClickEvent: function(event) { + _hrefAndLinkNodeForClickEvent(event) { function isHTMLLink(aNode) { // Be consistent with what nsContextMenu.js does. return ((aNode instanceof content.HTMLAnchorElement && aNode.href) || @@ -656,7 +656,7 @@ addMessageListener("webrtc:StartBrowserSharing", () => { let windowID = content.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils).outerWindowID; sendAsyncMessage("webrtc:response:StartBrowserSharing", { - windowID: windowID + windowID }); }); @@ -876,20 +876,20 @@ addMessageListener("Bookmarks:GetPageDetails", (message) => { let doc = content.document; let isErrorPage = /^about:(neterror|certerror|blocked)/.test(doc.documentURI); sendAsyncMessage("Bookmarks:GetPageDetails:Result", - { isErrorPage: isErrorPage, + { isErrorPage, description: PlacesUIUtils.getDescriptionFromDocument(doc) }); }); var LightWeightThemeWebInstallListener = { _previewWindow: null, - init: function() { + init() { addEventListener("InstallBrowserTheme", this, false, true); addEventListener("PreviewBrowserTheme", this, false, true); addEventListener("ResetBrowserThemePreview", this, false, true); }, - handleEvent: function(event) { + handleEvent(event) { switch (event.type) { case "InstallBrowserTheme": { sendAsyncMessage("LightWeightThemeWebInstaller:Install", { @@ -923,7 +923,7 @@ var LightWeightThemeWebInstallListener = { } }, - _resetPreviewWindow: function() { + _resetPreviewWindow() { this._previewWindow.removeEventListener("pagehide", this, true); this._previewWindow = null; } @@ -982,11 +982,11 @@ addMessageListener("ContextMenu:SetAsDesktopBackground", (message) => { var PageInfoListener = { - init: function() { + init() { addMessageListener("PageInfo:getData", this); }, - receiveMessage: function(message) { + receiveMessage(message) { let strings = message.data.strings; let window; let document; @@ -1017,7 +1017,7 @@ var PageInfoListener = { this.getMediaInfo(document, window, strings); }, - getImageInfo: function(imageElement) { + getImageInfo(imageElement) { let imageInfo = null; if (imageElement) { imageInfo = { @@ -1030,7 +1030,7 @@ var PageInfoListener = { return imageInfo; }, - getMetaInfo: function(document) { + getMetaInfo(document) { let metaViewRows = []; // Get the meta tags from the page. @@ -1044,7 +1044,7 @@ var PageInfoListener = { return metaViewRows; }, - getWindowInfo: function(window) { + getWindowInfo(window) { let windowInfo = {}; windowInfo.isTopWindow = window == window.top; @@ -1058,7 +1058,7 @@ var PageInfoListener = { return windowInfo; }, - getDocumentInfo: function(document) { + getDocumentInfo(document) { let docInfo = {}; docInfo.title = document.title; docInfo.location = document.location.toString(); @@ -1079,7 +1079,7 @@ var PageInfoListener = { return docInfo; }, - getFeedsInfo: function(document, strings) { + getFeedsInfo(document, strings) { let feeds = []; // Get the feeds from the page. let linkNodes = document.getElementsByTagName("link"); @@ -1110,13 +1110,13 @@ var PageInfoListener = { }, // Only called once to get the media tab's media elements from the content page. - getMediaInfo: function(document, window, strings) + getMediaInfo(document, window, strings) { let frameList = this.goThroughFrames(document, window); Task.spawn(() => this.processFrames(document, frameList, strings)); }, - goThroughFrames: function(document, window) + goThroughFrames(document, window) { let frameList = [document]; if (window && window.frames.length > 0) { @@ -1130,7 +1130,7 @@ var PageInfoListener = { return frameList; }, - processFrames: function*(document, frameList, strings) + *processFrames(document, frameList, strings) { let nodeCount = 0; for (let doc of frameList) { @@ -1155,7 +1155,7 @@ var PageInfoListener = { sendAsyncMessage("PageInfo:mediaData", {isComplete: true}); }, - getMediaItems: function(document, strings, elem) + getMediaItems(document, strings, elem) { // Check for images defined in CSS (e.g. background, borders) let computedStyle = elem.ownerGlobal.getComputedStyle(elem); @@ -1241,7 +1241,7 @@ var PageInfoListener = { * makePreview in pageInfo.js uses to figure out how to display the preview. */ - serializeElementInfo: function(document, url, type, alt, item, isBG) + serializeElementInfo(document, url, type, alt, item, isBG) { let result = {}; @@ -1322,7 +1322,7 @@ var PageInfoListener = { // Other Misc Stuff // Modified from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html // parse a node to extract the contents of the node - getValueText: function(node) + getValueText(node) { let valueText = ""; @@ -1362,7 +1362,7 @@ var PageInfoListener = { // Copied from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html. // Traverse the tree in search of an img or area element and grab its alt tag. - getAltText: function(node) + getAltText(node) { let altText = ""; @@ -1380,7 +1380,7 @@ var PageInfoListener = { // Copied from the Links Panel v2.3, http://segment7.net/mozilla/links/links.html. // Strip leading and trailing whitespace, and replace multiple consecutive whitespace characters with a single space. - stripWS: function(text) + stripWS(text) { let middleRE = /\s+/g; let endRE = /(^\s+)|(\s+$)/g; diff --git a/browser/base/content/contentSearchUI.js b/browser/base/content/contentSearchUI.js index 688d8b1cfe4b..d3f8d5f143ce 100644 --- a/browser/base/content/contentSearchUI.js +++ b/browser/base/content/contentSearchUI.js @@ -90,7 +90,7 @@ ContentSearchUIController.prototype = { } this._defaultEngine = { name: engine.name, - icon: icon, + icon, }; this._updateDefaultEngineHeader(); @@ -189,7 +189,7 @@ ContentSearchUIController.prototype = { return this._suggestionsList.children.length; }, - selectAndUpdateInput: function(idx) { + selectAndUpdateInput(idx) { this.selectedIndex = idx; let newValue = this.suggestionAtIndex(idx) || this._stickyInputValue; // Setting the input value when the value has not changed commits the current @@ -200,12 +200,12 @@ ContentSearchUIController.prototype = { this._updateSearchWithHeader(); }, - suggestionAtIndex: function(idx) { + suggestionAtIndex(idx) { let row = this._suggestionsList.children[idx]; return row ? row.textContent : null; }, - deleteSuggestionAtIndex: function(idx) { + deleteSuggestionAtIndex(idx) { // Only form history suggestions can be deleted. if (this.isFormHistorySuggestionAtIndex(idx)) { let suggestionStr = this.suggestionAtIndex(idx); @@ -215,20 +215,20 @@ ContentSearchUIController.prototype = { } }, - isFormHistorySuggestionAtIndex: function(idx) { + isFormHistorySuggestionAtIndex(idx) { let row = this._suggestionsList.children[idx]; return row && row.classList.contains("formHistory"); }, - addInputValueToFormHistory: function() { + addInputValueToFormHistory() { this._sendMsg("AddFormHistoryEntry", this.input.value); }, - handleEvent: function(event) { + handleEvent(event) { this["_on" + event.type[0].toUpperCase() + event.type.substr(1)](event); }, - _onCommand: function(aEvent) { + _onCommand(aEvent) { if (this.selectedButtonIndex == this._oneOffButtons.length) { // Settings button was selected. this._sendMsg("ManageEngines"); @@ -242,7 +242,7 @@ ContentSearchUIController.prototype = { } }, - search: function(aEvent) { + search(aEvent) { if (!this.defaultEngine) { return; // Not initialized yet. } @@ -291,7 +291,7 @@ ContentSearchUIController.prototype = { this.addInputValueToFormHistory(); }, - _onInput: function() { + _onInput() { if (!this.input.value) { this._stickyInputValue = ""; this._hideSuggestions(); @@ -304,7 +304,7 @@ ContentSearchUIController.prototype = { this._updateSearchWithHeader(); }, - _onKeypress: function(event) { + _onKeypress(event) { let selectedIndexDelta = 0; let selectedSuggestionDelta = 0; let selectedOneOffDelta = 0; @@ -451,7 +451,7 @@ ContentSearchUIController.prototype = { }, _currentEngineIndex: -1, - _cycleCurrentEngine: function(aReverse) { + _cycleCurrentEngine(aReverse) { if ((this._currentEngineIndex == this._engines.length - 1 && !aReverse) || (this._currentEngineIndex == 0 && aReverse)) { return; @@ -461,7 +461,7 @@ ContentSearchUIController.prototype = { this._sendMsg("SetCurrentEngine", engineName); }, - _onFocus: function() { + _onFocus() { if (this._mousedown) { return; } @@ -474,7 +474,7 @@ ContentSearchUIController.prototype = { this._speculativeConnect(); }, - _onBlur: function() { + _onBlur() { if (this._mousedown) { // At this point, this.input has lost focus, but a new element has not yet // received it. If we re-focus this.input directly, the new element will @@ -486,7 +486,7 @@ ContentSearchUIController.prototype = { this._hideSuggestions(); }, - _onMousemove: function(event) { + _onMousemove(event) { let idx = this._indexOfTableItem(event.target); if (idx >= this.numSuggestions) { this.selectedButtonIndex = idx - this.numSuggestions; @@ -495,14 +495,14 @@ ContentSearchUIController.prototype = { this.selectedIndex = idx; }, - _onMouseup: function(event) { + _onMouseup(event) { if (event.button == 2) { return; } this._onCommand(event); }, - _onMouseout: function(event) { + _onMouseout(event) { // We only deselect one-off buttons and the settings button when they are // moused out. let idx = this._indexOfTableItem(event.originalTarget); @@ -511,22 +511,22 @@ ContentSearchUIController.prototype = { } }, - _onClick: function(event) { + _onClick(event) { this._onMouseup(event); }, - _onContentSearchService: function(event) { + _onContentSearchService(event) { let methodName = "_onMsg" + event.detail.type; if (methodName in this) { this[methodName](event.detail.data); } }, - _onMsgFocusInput: function(event) { + _onMsgFocusInput(event) { this.input.focus(); }, - _onMsgSuggestions: function(suggestions) { + _onMsgSuggestions(suggestions) { // Ignore the suggestions if their search string or engine doesn't match // ours. Due to the async nature of message passing, this can easily happen // when the user types quickly. @@ -581,13 +581,13 @@ ContentSearchUIController.prototype = { } }, - _onMsgSuggestionsCancelled: function() { + _onMsgSuggestionsCancelled() { if (!this._table.hidden) { this._hideSuggestions(); } }, - _onMsgState: function(state) { + _onMsgState(state) { this.engines = state.engines; // No point updating the default engine (and the header) if there's no change. if (this.defaultEngine && @@ -598,16 +598,16 @@ ContentSearchUIController.prototype = { this.defaultEngine = state.currentEngine; }, - _onMsgCurrentState: function(state) { + _onMsgCurrentState(state) { this._onMsgState(state); }, - _onMsgCurrentEngine: function(engine) { + _onMsgCurrentEngine(engine) { this.defaultEngine = engine; this._pendingOneOffRefresh = true; }, - _onMsgStrings: function(strings) { + _onMsgStrings(strings) { this._strings = strings; this._updateDefaultEngineHeader(); this._updateSearchWithHeader(); @@ -616,7 +616,7 @@ ContentSearchUIController.prototype = { this.input.setAttribute("placeholder", this._strings.searchPlaceholder); }, - _updateDefaultEngineHeader: function() { + _updateDefaultEngineHeader() { let header = document.getElementById("contentSearchDefaultEngineHeader"); header.firstChild.setAttribute("src", this.defaultEngine.icon); if (!this._strings) { @@ -629,7 +629,7 @@ ContentSearchUIController.prototype = { this._strings.searchHeader.replace("%S", this.defaultEngine.name))); }, - _updateSearchWithHeader: function() { + _updateSearchWithHeader() { if (!this._strings) { return; } @@ -642,13 +642,13 @@ ContentSearchUIController.prototype = { } }, - _speculativeConnect: function() { + _speculativeConnect() { if (this.defaultEngine) { this._sendMsg("SpeculativeConnect", this.defaultEngine.name); } }, - _makeTableRow: function(type, suggestionStr, currentRow, searchWords) { + _makeTableRow(type, suggestionStr, currentRow, searchWords) { let row = document.createElementNS(HTML_NS, "tr"); row.dir = "auto"; row.classList.add("contentSearchSuggestionRow"); @@ -685,28 +685,28 @@ ContentSearchUIController.prototype = { }, // Converts favicon array buffer into a data URI. - _getFaviconURIFromBuffer: function(buffer) { + _getFaviconURIFromBuffer(buffer) { let blob = new Blob([buffer]); return URL.createObjectURL(blob); }, // Adds "@2x" to the name of the given PNG url for "retina" screens. - _getImageURIForCurrentResolution: function(uri) { + _getImageURIForCurrentResolution(uri) { if (window.devicePixelRatio > 1) { return uri.replace(/\.png$/, "@2x.png"); } return uri; }, - _getSearchEngines: function() { + _getSearchEngines() { this._sendMsg("GetState"); }, - _getStrings: function() { + _getStrings() { this._sendMsg("GetStrings"); }, - _getSuggestions: function() { + _getSuggestions() { this._stickyInputValue = this.input.value; if (this.defaultEngine) { this._sendMsg("GetSuggestions", { @@ -716,13 +716,13 @@ ContentSearchUIController.prototype = { } }, - _clearSuggestionRows: function() { + _clearSuggestionRows() { while (this._suggestionsList.firstElementChild) { this._suggestionsList.firstElementChild.remove(); } }, - _hideSuggestions: function() { + _hideSuggestions() { this.input.setAttribute("aria-expanded", "false"); this.selectedIndex = -1; this.selectedButtonIndex = -1; @@ -730,7 +730,7 @@ ContentSearchUIController.prototype = { this._table.hidden = true; }, - _indexOfTableItem: function(elt) { + _indexOfTableItem(elt) { if (elt.classList.contains("contentSearchOneOffItem")) { return this.numSuggestions + this._oneOffButtons.indexOf(elt); } @@ -746,7 +746,7 @@ ContentSearchUIController.prototype = { return elt.rowIndex; }, - _makeTable: function(id) { + _makeTable(id) { this._table = document.createElementNS(HTML_NS, "table"); this._table.id = id; this._table.hidden = true; @@ -815,7 +815,7 @@ ContentSearchUIController.prototype = { return this._table; }, - _setUpOneOffButtons: function() { + _setUpOneOffButtons() { // Sometimes we receive a CurrentEngine message from the ContentSearch service // before we've received a State message - i.e. before we have our engines. if (!this._engines) { @@ -896,11 +896,11 @@ ContentSearchUIController.prototype = { this._oneOffsTable.hidden = false; }, - _sendMsg: function(type, data = null) { + _sendMsg(type, data = null) { dispatchEvent(new CustomEvent("ContentSearchClient", { detail: { - type: type, - data: data, + type, + data, }, })); }, diff --git a/browser/base/content/pageinfo/pageInfo.js b/browser/base/content/pageinfo/pageInfo.js index 1e96c4e8b632..dd4336951248 100644 --- a/browser/base/content/pageinfo/pageInfo.js +++ b/browser/base/content/pageinfo/pageInfo.js @@ -24,12 +24,12 @@ pageInfoTreeView.prototype = { set rowCount(c) { throw "rowCount is a readonly property"; }, get rowCount() { return this.rows; }, - setTree: function(tree) + setTree(tree) { this.tree = tree; }, - getCellText: function(row, column) + getCellText(row, column) { // row can be null, but js arrays are 0-indexed. // colidx cannot be null, but can be larger than the number @@ -38,16 +38,16 @@ pageInfoTreeView.prototype = { return this.data[row][column.index] || ""; }, - setCellValue: function(row, column, value) + setCellValue(row, column, value) { }, - setCellText: function(row, column, value) + setCellText(row, column, value) { this.data[row][column.index] = value; }, - addRow: function(row) + addRow(row) { this.rows = this.data.push(row); this.rowCountChanged(this.rows - 1, 1); @@ -56,24 +56,24 @@ pageInfoTreeView.prototype = { } }, - addRows: function(rows) + addRows(rows) { for (let row of rows) { this.addRow(row); } }, - rowCountChanged: function(index, count) + rowCountChanged(index, count) { this.tree.rowCountChanged(index, count); }, - invalidate: function() + invalidate() { this.tree.invalidate(); }, - clear: function() + clear() { if (this.tree) this.tree.rowCountChanged(0, -this.rows); @@ -81,12 +81,12 @@ pageInfoTreeView.prototype = { this.data = [ ]; }, - handleCopy: function(row) + handleCopy(row) { return (row < 0 || this.copycol < 0) ? "" : (this.data[row][this.copycol] || ""); }, - performActionOnRow: function(action, row) + performActionOnRow(action, row) { if (action == "copy") { var data = this.handleCopy(row) @@ -94,7 +94,7 @@ pageInfoTreeView.prototype = { } }, - onPageMediaSort : function(columnname) + onPageMediaSort(columnname) { var tree = document.getElementById(this.treeid); var treecol = tree.columns.getNamedColumn(columnname); @@ -121,29 +121,29 @@ pageInfoTreeView.prototype = { this.sortcol = treecol.index; }, - getRowProperties: function(row) { return ""; }, - getCellProperties: function(row, column) { return ""; }, - getColumnProperties: function(column) { return ""; }, - isContainer: function(index) { return false; }, - isContainerOpen: function(index) { return false; }, - isSeparator: function(index) { return false; }, - isSorted: function() { return this.sortcol > -1 }, - canDrop: function(index, orientation) { return false; }, - drop: function(row, orientation) { return false; }, - getParentIndex: function(index) { return 0; }, - hasNextSibling: function(index, after) { return false; }, - getLevel: function(index) { return 0; }, - getImageSrc: function(row, column) { }, - getProgressMode: function(row, column) { }, - getCellValue: function(row, column) { }, - toggleOpenState: function(index) { }, - cycleHeader: function(col) { }, - selectionChanged: function() { }, - cycleCell: function(row, column) { }, - isEditable: function(row, column) { return false; }, - isSelectable: function(row, column) { return false; }, - performAction: function(action) { }, - performActionOnCell: function(action, row, column) { } + getRowProperties(row) { return ""; }, + getCellProperties(row, column) { return ""; }, + getColumnProperties(column) { return ""; }, + isContainer(index) { return false; }, + isContainerOpen(index) { return false; }, + isSeparator(index) { return false; }, + isSorted() { return this.sortcol > -1 }, + canDrop(index, orientation) { return false; }, + drop(row, orientation) { return false; }, + getParentIndex(index) { return 0; }, + hasNextSibling(index, after) { return false; }, + getLevel(index) { return 0; }, + getImageSrc(row, column) { }, + getProgressMode(row, column) { }, + getCellValue(row, column) { }, + toggleOpenState(index) { }, + cycleHeader(col) { }, + selectionChanged() { }, + cycleCell(row, column) { }, + isEditable(row, column) { return false; }, + isSelectable(row, column) { return false; }, + performAction(action) { }, + performActionOnCell(action, row, column) { } }; // mmm, yummy. global variables. @@ -359,7 +359,7 @@ function loadPageInfo(frameOuterWindowID, imageElement, browser) // Look for pageInfoListener in content.js. Sends message to listener with arguments. mm.sendAsyncMessage("PageInfo:getData", {strings: gStrings, - frameOuterWindowID: frameOuterWindowID}, + frameOuterWindowID}, { imageElement }); let pageInfoData; @@ -517,10 +517,10 @@ function toggleGroupbox(id) function openCacheEntry(key, cb) { var checkCacheListener = { - onCacheEntryCheck: function(entry, appCache) { + onCacheEntryCheck(entry, appCache) { return Components.interfaces.nsICacheEntryOpenCallback.ENTRY_WANTED; }, - onCacheEntryAvailable: function(entry, isNew, appCache, status) { + onCacheEntryAvailable(entry, isNew, appCache, status) { cb(entry); } }; @@ -1004,7 +1004,7 @@ function makeBlockImage(url) } var imagePermissionObserver = { - observe: function(aSubject, aTopic, aData) + observe(aSubject, aTopic, aData) { if (document.getElementById("mediaPreviewBox").collapsed) return; diff --git a/browser/base/content/pageinfo/permissions.js b/browser/base/content/pageinfo/permissions.js index b3e1720dc544..5a563c035e97 100644 --- a/browser/base/content/pageinfo/permissions.js +++ b/browser/base/content/pageinfo/permissions.js @@ -20,7 +20,7 @@ var gPermissions = SitePermissions.listPermissions().sort((a, b) => { gPermissions.push("plugins"); var permissionObserver = { - observe: function(aSubject, aTopic, aData) + observe(aSubject, aTopic, aData) { if (aTopic == "perm-changed") { var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission); diff --git a/browser/base/content/pageinfo/security.js b/browser/base/content/pageinfo/security.js index 2638cb13d76e..e3f0fdc886b9 100644 --- a/browser/base/content/pageinfo/security.js +++ b/browser/base/content/pageinfo/security.js @@ -9,18 +9,18 @@ XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper", "resource://gre/modules/LoginHelper.jsm"); var security = { - init: function(uri, windowInfo) { + init(uri, windowInfo) { this.uri = uri; this.windowInfo = windowInfo; }, // Display the server certificate (static) - viewCert : function() { + viewCert() { var cert = security._cert; viewCertHelper(window, cert); }, - _getSecurityInfo : function() { + _getSecurityInfo() { const nsISSLStatusProvider = Components.interfaces.nsISSLStatusProvider; const nsISSLStatus = Components.interfaces.nsISSLStatus; @@ -54,15 +54,15 @@ var security = { this.mapIssuerOrganization(cert.issuerOrganization) || cert.issuerName; var retval = { - hostName : hostName, + hostName, cAName : issuerName, encryptionAlgorithm : undefined, encryptionStrength : undefined, version: undefined, - isBroken : isBroken, - isMixed : isMixed, - isEV : isEV, - cert : cert, + isBroken, + isMixed, + isEV, + cert, certificateTransparency : undefined }; @@ -117,21 +117,21 @@ var security = { return retval; } return { - hostName : hostName, + hostName, cAName : "", encryptionAlgorithm : "", encryptionStrength : 0, version: "", - isBroken : isBroken, - isMixed : isMixed, - isEV : isEV, + isBroken, + isMixed, + isEV, cert : null, certificateTransparency : null }; }, // Find the secureBrowserUI object (if present) - _getSecurityUI : function() { + _getSecurityUI() { if (window.opener.gBrowser) return window.opener.gBrowser.securityUI; return null; @@ -140,7 +140,7 @@ var security = { // Interface for mapping a certificate issuer organization to // the value to be displayed. // Bug 82017 - this implementation should be moved to pipnss C++ code - mapIssuerOrganization: function(name) { + mapIssuerOrganization(name) { if (!name) return null; if (name == "RSA Data Security, Inc.") return "Verisign, Inc."; @@ -152,7 +152,7 @@ var security = { /** * Open the cookie manager window */ - viewCookies : function() + viewCookies() { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); @@ -181,7 +181,7 @@ var security = { /** * Open the login manager window */ - viewPasswords : function() { + viewPasswords() { LoginHelper.openPasswordManager(window, this._getSecurityInfo().hostName); }, diff --git a/browser/base/content/sanitize.js b/browser/base/content/sanitize.js index 725daa64ed5a..53cf4e943d37 100644 --- a/browser/base/content/sanitize.js +++ b/browser/base/content/sanitize.js @@ -38,14 +38,14 @@ function Sanitizer() { } Sanitizer.prototype = { // warning to the caller: this one may raise an exception (e.g. bug #265028) - clearItem: function(aItemName) + clearItem(aItemName) { this.items[aItemName].clear(); }, prefDomain: "", - getNameFromPreference: function(aPreferenceName) + getNameFromPreference(aPreferenceName) { return aPreferenceName.substr(this.prefDomain.length); }, @@ -516,7 +516,7 @@ Sanitizer.prototype = { openWindows: { privateStateForNewWindow: "non-private", - _canCloseWindow: function(aWindow) { + _canCloseWindow(aWindow) { if (aWindow.CanCloseWindow()) { // We already showed PermitUnload for the window, so let's // make sure we don't do it again when we actually close the @@ -526,7 +526,7 @@ Sanitizer.prototype = { } return false; }, - _resetAllWindowClosures: function(aWindowList) { + _resetAllWindowClosures(aWindowList) { for (let win of aWindowList) { win.skipNextCanClose = false; } diff --git a/browser/base/content/social-content.js b/browser/base/content/social-content.js index b5fa6a5c4bda..071d057d522c 100644 --- a/browser/base/content/social-content.js +++ b/browser/base/content/social-content.js @@ -114,7 +114,7 @@ const SocialErrorListener = { webNav.loadURI(url, null, null, null, null); } sendAsyncMessage("Social:ErrorPageNotify", { - origin: origin, + origin, url: src }); }, diff --git a/browser/base/content/sync/aboutSyncTabs.js b/browser/base/content/sync/aboutSyncTabs.js index e49411c7434f..731a0edfee81 100644 --- a/browser/base/content/sync/aboutSyncTabs.js +++ b/browser/base/content/sync/aboutSyncTabs.js @@ -23,7 +23,7 @@ if (AppConstants.MOZ_SERVICES_CLOUDSYNC) { var RemoteTabViewer = { _tabsList: null, - init: function() { + init() { Services.obs.addObserver(this, "weave:service:login:finish", false); Services.obs.addObserver(this, "weave:engine:sync:finish", false); @@ -34,14 +34,14 @@ var RemoteTabViewer = { this.buildList(true); }, - uninit: function() { + uninit() { Services.obs.removeObserver(this, "weave:service:login:finish"); Services.obs.removeObserver(this, "weave:engine:sync:finish"); Services.obs.removeObserver(this, "cloudsync:tabs:update"); }, - createItem: function(attrs) { + createItem(attrs) { let item = document.createElement("richlistitem"); // Copy the attributes from the argument into the item. @@ -56,7 +56,7 @@ var RemoteTabViewer = { return item; }, - filterTabs: function(event) { + filterTabs(event) { let val = event.target.value.toLowerCase(); let numTabs = this._tabsList.getRowCount(); let clientTabs = 0; @@ -89,7 +89,7 @@ var RemoteTabViewer = { } }, - openSelected: function() { + openSelected() { let items = this._tabsList.selectedItems; let urls = []; for (let i = 0; i < items.length; i++) { @@ -105,14 +105,14 @@ var RemoteTabViewer = { } }, - bookmarkSingleTab: function() { + bookmarkSingleTab() { let item = this._tabsList.selectedItems[0]; let uri = Weave.Utils.makeURI(item.getAttribute("url")); let title = item.getAttribute("title"); PlacesUIUtils.showBookmarkDialog({ action: "add" , type: "bookmark" - , uri: uri - , title: title + , uri + , title , hiddenRows: [ "description" , "location" , "loadInSidebar" @@ -120,7 +120,7 @@ var RemoteTabViewer = { }, window.top); }, - bookmarkSelectedTabs: function() { + bookmarkSelectedTabs() { let items = this._tabsList.selectedItems; let URIs = []; for (let i = 0; i < items.length; i++) { @@ -142,7 +142,7 @@ var RemoteTabViewer = { } }, - getIcon: function(iconUri, defaultIcon) { + getIcon(iconUri, defaultIcon) { try { let iconURI = Weave.Utils.makeURI(iconUri); return PlacesUtils.favicons.getFaviconLinkForIcon(iconURI).spec; @@ -158,7 +158,7 @@ var RemoteTabViewer = { _buildListRequested: false, - buildList: function(forceSync) { + buildList(forceSync) { if (this._waitingForBuildList) { this._buildListRequested = true; return; @@ -192,7 +192,7 @@ var RemoteTabViewer = { } }, - _clearTabList: function() { + _clearTabList() { let list = this._tabsList; // Clear out existing richlistitems. @@ -204,7 +204,7 @@ var RemoteTabViewer = { } }, - _generateWeaveTabList: function() { + _generateWeaveTabList() { let engine = Weave.Service.engineManager.get("tabs"); let list = this._tabsList; @@ -236,7 +236,7 @@ var RemoteTabViewer = { let attrs = { type: "tab", title: title || url, - url: url, + url, icon: this.getIcon(icon), } let tab = this.createItem(attrs); @@ -245,7 +245,7 @@ var RemoteTabViewer = { } }, - _generateCloudSyncTabList: function() { + _generateCloudSyncTabList() { let updateTabList = function(remoteTabs) { let list = this._tabsList; @@ -275,7 +275,7 @@ var RemoteTabViewer = { .then(updateTabList, Promise.reject.bind(Promise)); }, - adjustContextMenu: function(event) { + adjustContextMenu(event) { let mode = "all"; switch (this._tabsList.selectedItems.length) { case 0: @@ -300,7 +300,7 @@ var RemoteTabViewer = { } }, - _refetchTabs: function(force) { + _refetchTabs(force) { if (!force) { // Don't bother refetching tabs if we already did so recently let lastFetch = 0; @@ -325,7 +325,7 @@ var RemoteTabViewer = { return true; }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { switch (topic) { case "weave:service:login:finish": // A login has finished, which means that a Sync is about to start and @@ -346,7 +346,7 @@ var RemoteTabViewer = { } }, - handleClick: function(event) { + handleClick(event) { if (event.target.getAttribute("type") != "tab") { return; } diff --git a/browser/base/content/sync/genericChange.js b/browser/base/content/sync/genericChange.js index a9571b662f6d..5828e5dbb900 100644 --- a/browser/base/content/sync/genericChange.js +++ b/browser/base/content/sync/genericChange.js @@ -136,7 +136,7 @@ var Change = { window.setTimeout(window.close, 1500); }, - onDialogAccept: function() { + onDialogAccept() { switch (this._dialogType) { case "UpdatePassphrase": case "ResetPassphrase": @@ -147,7 +147,7 @@ var Change = { return undefined; }, - doGeneratePassphrase: function() { + doGeneratePassphrase() { let passphrase = Weave.Utils.generatePassphrase(); this._passphraseBox.value = Weave.Utils.hyphenatePassphrase(passphrase); this._dialog.getButton("finish").disabled = false; @@ -201,7 +201,7 @@ var Change = { return false; }, - validate: function(event) { + validate(event) { let valid = false; let errorString = ""; diff --git a/browser/base/content/sync/setup.js b/browser/base/content/sync/setup.js index ab7f61001565..9190263283a9 100644 --- a/browser/base/content/sync/setup.js +++ b/browser/base/content/sync/setup.js @@ -61,7 +61,7 @@ var gSyncSetup = { return document.getElementById("existingServer").selectedIndex == 0; }, - init: function() { + init() { let obs = [ ["weave:service:change-passphrase", "onResetPassphrase"], ["weave:service:login:start", "onLoginStart"], @@ -121,14 +121,14 @@ var gSyncSetup = { .getAttribute("accesskey"); }, - startNewAccountSetup: function() { + startNewAccountSetup() { if (!Weave.Utils.ensureMPUnlocked()) return; this._settingUpNew = true; this.wizard.pageIndex = NEW_ACCOUNT_START_PAGE; }, - useExistingAccount: function() { + useExistingAccount() { if (!Weave.Utils.ensureMPUnlocked()) return; this._settingUpNew = false; @@ -173,22 +173,22 @@ var gSyncSetup = { gSyncUtils.resetPassphrase(true); }, - onResetPassphrase: function() { + onResetPassphrase() { document.getElementById("existingPassphrase").value = Weave.Utils.hyphenatePassphrase(Weave.Service.identity.syncKey); this.checkFields(); this.wizard.advance(); }, - onLoginStart: function() { + onLoginStart() { this.toggleLoginFeedback(false); }, - onLoginEnd: function() { + onLoginEnd() { this.toggleLoginFeedback(true); }, - sendCredentialsAfterSync: function() { + sendCredentialsAfterSync() { let send = function() { Services.obs.removeObserver("weave:service:sync:finish", send); Services.obs.removeObserver("weave:service:sync:error", send); @@ -202,7 +202,7 @@ var gSyncSetup = { Services.obs.addObserver("weave:service:sync:error", send, false); }, - toggleLoginFeedback: function(stop) { + toggleLoginFeedback(stop) { document.getElementById("login-throbber").hidden = stop; let password = document.getElementById("existingPasswordFeedbackRow"); let server = document.getElementById("existingServerFeedbackRow"); @@ -231,7 +231,7 @@ var gSyncSetup = { this._setFeedbackMessage(feedback, false, Weave.Status.login); }, - setupInitialSync: function() { + setupInitialSync() { let action = document.getElementById("mergeChoiceRadio").selectedItem.id; switch (action) { case "resetClient": @@ -248,11 +248,11 @@ var gSyncSetup = { }, // fun with validation! - checkFields: function() { + checkFields() { this.wizard.canAdvance = this.readyToAdvance(); }, - readyToAdvance: function() { + readyToAdvance() { switch (this.wizard.pageIndex) { case INTRO_PAGE: return false; @@ -293,7 +293,7 @@ var gSyncSetup = { this.pin3.value.length == PIN_PART_LENGTH); }, - onEmailInput: function() { + onEmailInput() { // Check account validity when the user stops typing for 1 second. if (this._checkAccountTimer) window.clearTimeout(this._checkAccountTimer); @@ -302,7 +302,7 @@ var gSyncSetup = { }, 1000); }, - checkAccount: function() { + checkAccount() { delete this._checkAccountTimer; let value = Weave.Utils.normalizeAccount( document.getElementById("weaveEmail").value); @@ -337,7 +337,7 @@ var gSyncSetup = { this.checkFields(); }, - onPasswordChange: function() { + onPasswordChange() { let password = document.getElementById("weavePassword"); let pwconfirm = document.getElementById("weavePasswordConfirm"); let [valid, errorString] = gSyncUtils.validatePassword(password, pwconfirm); @@ -349,7 +349,7 @@ var gSyncSetup = { this.checkFields(); }, - onPageShow: function() { + onPageShow() { switch (this.wizard.pageIndex) { case PAIR_PAGE: this.wizard.getButton("back").hidden = true; @@ -420,7 +420,7 @@ var gSyncSetup = { } }, - onWizardAdvance: function() { + onWizardAdvance() { // Check pageIndex so we don't prompt before the Sync setup wizard appears. // This is a fallback in case the Master Password gets locked mid-wizard. if ((this.wizard.pageIndex >= 0) && @@ -509,7 +509,7 @@ var gSyncSetup = { return true; }, - onWizardBack: function() { + onWizardBack() { switch (this.wizard.pageIndex) { case NEW_ACCOUNT_START_PAGE: this.wizard.pageIndex = INTRO_PAGE; @@ -535,7 +535,7 @@ var gSyncSetup = { return true; }, - wizardFinish: function() { + wizardFinish() { this.setupInitialSync(); if (this.wizardType == "pair") { @@ -563,7 +563,7 @@ var gSyncSetup = { window.close(); }, - onWizardCancel: function() { + onWizardCancel() { if (this._resettingSync) return; @@ -572,12 +572,12 @@ var gSyncSetup = { Weave.Service.startOver(); }, - onSyncOptions: function() { + onSyncOptions() { this._beforeOptionsPage = this.wizard.pageIndex; this.wizard.pageIndex = OPTIONS_PAGE; }, - returnFromOptions: function() { + returnFromOptions() { this.wizard.getButton("next").label = this._nextButtonLabel; this.wizard.getButton("next").setAttribute("accesskey", this._nextButtonAccesskey); @@ -644,7 +644,7 @@ var gSyncSetup = { this._jpakeclient.controller = controller; }, - startEasySetup: function() { + startEasySetup() { // Don't do anything if we have a client already (e.g. we went to // Sync Options and just came back). if (this._jpakeclient) @@ -691,7 +691,7 @@ var gSyncSetup = { this._jpakeclient.receiveNoPIN(); }, - abortEasySetup: function() { + abortEasySetup() { document.getElementById("easySetupPIN1").value = ""; document.getElementById("easySetupPIN2").value = ""; document.getElementById("easySetupPIN3").value = ""; @@ -702,7 +702,7 @@ var gSyncSetup = { delete this._jpakeclient; }, - manualSetup: function() { + manualSetup() { this.abortEasySetup(); this.wizard.pageIndex = EXISTING_ACCOUNT_LOGIN_PAGE; }, @@ -710,7 +710,7 @@ var gSyncSetup = { // _handleNoScript is needed because it blocks the captcha. So we temporarily // allow the necessary sites so that we can verify the user is in fact a human. // This was done with the help of Giorgio (NoScript author). See bug 508112. - _handleNoScript: function(addExceptions) { + _handleNoScript(addExceptions) { // if NoScript isn't installed, or is disabled, bail out. let ns = Cc["@maone.net/noscript-service;1"]; if (ns == null) @@ -734,7 +734,7 @@ var gSyncSetup = { } }, - onExistingServerCommand: function() { + onExistingServerCommand() { let control = document.getElementById("existingServer"); if (control.selectedIndex == 0) { control.removeAttribute("editable"); @@ -750,7 +750,7 @@ var gSyncSetup = { this.checkFields(); }, - onExistingServerInput: function() { + onExistingServerInput() { // Check custom server validity when the user stops typing for 1 second. if (this._existingServerTimer) window.clearTimeout(this._existingServerTimer); @@ -759,7 +759,7 @@ var gSyncSetup = { }, 1000); }, - onServerCommand: function() { + onServerCommand() { setVisibility(document.getElementById("TOSRow"), this._usingMainServers); let control = document.getElementById("server"); if (!this._usingMainServers) { @@ -783,7 +783,7 @@ var gSyncSetup = { this.checkFields(); }, - onServerInput: function() { + onServerInput() { // Check custom server validity when the user stops typing for 1 second. if (this._checkServerTimer) window.clearTimeout(this._checkServerTimer); @@ -792,7 +792,7 @@ var gSyncSetup = { }, 1000); }, - checkServer: function() { + checkServer() { delete this._checkServerTimer; let el = document.getElementById("server"); let valid = false; @@ -813,7 +813,7 @@ var gSyncSetup = { this.checkFields(); }, - _validateServer: function(element) { + _validateServer(element) { let valid = false; let val = element.value; if (!val) @@ -859,7 +859,7 @@ var gSyncSetup = { return valid; }, - _handleChoice: function() { + _handleChoice() { let desc = document.getElementById("mergeChoiceRadio").selectedIndex; document.getElementById("chosenActionDeck").selectedIndex = desc; switch (desc) { @@ -983,7 +983,7 @@ var gSyncSetup = { // sets class and string on a feedback element // if no property string is passed in, we clear label/style - _setFeedback: function(element, success, string) { + _setFeedback(element, success, string) { element.hidden = success || !string; let classname = success ? "success" : "error"; let image = element.getElementsByAttribute("class", "statusIcon")[0]; @@ -993,7 +993,7 @@ var gSyncSetup = { }, // shim - _setFeedbackMessage: function(element, success, string) { + _setFeedbackMessage(element, success, string) { let str = ""; if (string) { try { @@ -1015,7 +1015,7 @@ var gSyncSetup = { } }, - onStateChange: function(webProgress, request, stateFlags, status) { + onStateChange(webProgress, request, stateFlags, status) { // We're only looking for the end of the frame load if ((stateFlags & Ci.nsIWebProgressListener.STATE_STOP) == 0) return; @@ -1029,10 +1029,10 @@ var gSyncSetup = { setVisibility(this.captchaBrowser, responseStatus != 404); // XXX TODO we should really log any responseStatus other than 200 }, - onProgressChange: function() {}, - onStatusChange: function() {}, - onSecurityChange: function() {}, - onLocationChange: function() {} + onProgressChange() {}, + onStatusChange() {}, + onSecurityChange() {}, + onLocationChange() {} }; // Define lazy getters for various XUL elements. diff --git a/browser/base/content/sync/utils.js b/browser/base/content/sync/utils.js index c49d4b3b71fb..ea60ba1a0541 100644 --- a/browser/base/content/sync/utils.js +++ b/browser/base/content/sync/utils.js @@ -22,7 +22,7 @@ var gSyncUtils = { }, // opens in a new window if we're in a modal prefwindow world, in a new tab otherwise - _openLink: function(url) { + _openLink(url) { let thisDocEl = document.documentElement, openerDocEl = window.opener && window.opener.document.documentElement; if (thisDocEl.id == "accountSetup" && window.opener && @@ -58,22 +58,22 @@ var gSyncUtils = { type, duringSetup); }, - changePassword: function() { + changePassword() { if (Weave.Utils.ensureMPUnlocked()) this.openChange("ChangePassword"); }, - resetPassphrase: function(duringSetup) { + resetPassphrase(duringSetup) { if (Weave.Utils.ensureMPUnlocked()) this.openChange("ResetPassphrase", duringSetup); }, - updatePassphrase: function() { + updatePassphrase() { if (Weave.Utils.ensureMPUnlocked()) this.openChange("UpdatePassphrase"); }, - resetPassword: function() { + resetPassword() { this._openLink(Weave.Service.pwResetURL); }, @@ -82,7 +82,7 @@ var gSyncUtils = { return Weave.Svc.Prefs.get(root + "termsURL"); }, - openToS: function() { + openToS() { this._openLink(this.tosURL); }, @@ -91,7 +91,7 @@ var gSyncUtils = { return Weave.Svc.Prefs.get(root + "privacyURL"); }, - openPrivacyPolicy: function() { + openPrivacyPolicy() { this._openLink(this.privacyPolicyURL); }, @@ -102,7 +102,7 @@ var gSyncUtils = { * @param elid : ID of the form element containing the passphrase. * @param callback : Function called once the iframe has loaded. */ - _preparePPiframe: function(elid, callback) { + _preparePPiframe(elid, callback) { let pp = document.getElementById(elid).value; // Create an invisible iframe whose contents we can print. @@ -137,7 +137,7 @@ var gSyncUtils = { * * @param elid : ID of the form element containing the passphrase. */ - passphrasePrint: function(elid) { + passphrasePrint(elid) { this._preparePPiframe(elid, function(iframe) { let webBrowserPrint = iframe.contentWindow .QueryInterface(Ci.nsIInterfaceRequestor) @@ -165,7 +165,7 @@ var gSyncUtils = { * * @param elid : ID of the form element containing the passphrase. */ - passphraseSave: function(elid) { + passphraseSave(elid) { let dialogTitle = this.bundle.GetStringFromName("save.recoverykey.title"); let defaultSaveName = this.bundle.GetStringFromName("save.recoverykey.defaultfilename"); this._preparePPiframe(elid, function(iframe) { @@ -203,7 +203,7 @@ var gSyncUtils = { * * returns [valid, errorString] */ - validatePassword: function(el1, el2) { + validatePassword(el1, el2) { let valid = false; let val1 = el1.value; let val2 = el2 ? el2.value : ""; diff --git a/browser/base/content/tab-content.js b/browser/base/content/tab-content.js index 34eb58627207..67db5b5fc183 100644 --- a/browser/base/content/tab-content.js +++ b/browser/base/content/tab-content.js @@ -27,7 +27,7 @@ XPCOMUtils.defineLazyGetter(this, "SimpleServiceDiscovery", function() { ssdp.registerDevice({ id: "roku:ecp", target: "roku:ecp", - factory: function(aService) { + factory(aService) { Cu.import("resource://gre/modules/RokuApp.jsm"); return new RokuApp(aService); }, @@ -98,13 +98,13 @@ addMessageListener("SecondScreen:tab-mirror", function(message) { if (app) { let width = content.innerWidth; let height = content.innerHeight; - let viewport = {cssWidth: width, cssHeight: height, width: width, height: height}; + let viewport = {cssWidth: width, cssHeight: height, width, height}; app.mirror(function() {}, content, viewport, function() {}, content); } }); var AboutHomeListener = { - init: function(chromeGlobal) { + init(chromeGlobal) { chromeGlobal.addEventListener('AboutHomeLoad', this, false, true); }, @@ -112,7 +112,7 @@ var AboutHomeListener = { return content.document.documentURI.toLowerCase() == "about:home"; }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { if (!this.isAboutHome) { return; } @@ -129,7 +129,7 @@ var AboutHomeListener = { } }, - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { if (!this.isAboutHome) { return; } @@ -140,7 +140,7 @@ var AboutHomeListener = { } }, - onUpdate: function(aData) { + onUpdate(aData) { let doc = content.document; if (aData.showRestoreLastSession && !PrivateBrowsingUtils.isContentWindowPrivate(content)) doc.getElementById("launcher").setAttribute("session", "true"); @@ -154,7 +154,7 @@ var AboutHomeListener = { docElt.setAttribute("snippetsVersion", aData.snippetsVersion); }, - onPageLoad: function() { + onPageLoad() { addMessageListener("AboutHome:Update", this); addEventListener("click", this, true); addEventListener("pagehide", this, true); @@ -163,7 +163,7 @@ var AboutHomeListener = { sendAsyncMessage("AboutHome:RequestUpdate"); }, - onClick: function(aEvent) { + onClick(aEvent) { if (!aEvent.isTrusted || // Don't trust synthetic events aEvent.button == 2 || aEvent.target.localName != "button") { return; @@ -210,7 +210,7 @@ var AboutHomeListener = { } }, - onPageHide: function(aEvent) { + onPageHide(aEvent) { if (aEvent.target.defaultView.frameElement) { return; } @@ -260,7 +260,7 @@ var AboutReaderListener = { _isLeavingReaderMode: false, - init: function() { + init() { addEventListener("AboutReaderContentLoaded", this, false, true); addEventListener("DOMContentLoaded", this, false); addEventListener("pageshow", this, false); @@ -269,7 +269,7 @@ var AboutReaderListener = { addMessageListener("Reader:PushState", this); }, - receiveMessage: function(message) { + receiveMessage(message) { switch (message.name) { case "Reader:ToggleReaderMode": if (!this.isAboutReader) { @@ -294,7 +294,7 @@ var AboutReaderListener = { return content.document.documentURI.startsWith("about:reader"); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { if (aEvent.originalTarget.defaultView != content) { return; } @@ -344,7 +344,7 @@ var AboutReaderListener = { * this is a suitable document). Calling it on things which won't be * painted is not going to work. */ - updateReaderButton: function(forceNonArticle) { + updateReaderButton(forceNonArticle) { if (!ReaderMode.isEnabledForParseOnLoad || this.isAboutReader || !content || !(content.document instanceof content.HTMLDocument) || content.document.mozSyntheticDocument) { @@ -354,14 +354,14 @@ var AboutReaderListener = { this.scheduleReadabilityCheckPostPaint(forceNonArticle); }, - cancelPotentialPendingReadabilityCheck: function() { + cancelPotentialPendingReadabilityCheck() { if (this._pendingReadabilityCheck) { removeEventListener("MozAfterPaint", this._pendingReadabilityCheck); delete this._pendingReadabilityCheck; } }, - scheduleReadabilityCheckPostPaint: function(forceNonArticle) { + scheduleReadabilityCheckPostPaint(forceNonArticle) { if (this._pendingReadabilityCheck) { // We need to stop this check before we re-add one because we don't know // if forceNonArticle was true or false last time. @@ -371,7 +371,7 @@ var AboutReaderListener = { addEventListener("MozAfterPaint", this._pendingReadabilityCheck); }, - onPaintWhenWaitedFor: function(forceNonArticle, event) { + onPaintWhenWaitedFor(forceNonArticle, event) { // In non-e10s, we'll get called for paints other than ours, and so it's // possible that this page hasn't been laid out yet, in which case we // should wait until we get an event that does relate to our layout. We @@ -401,18 +401,18 @@ var ContentSearchMediator = { "about:newtab", ]), - init: function(chromeGlobal) { + init(chromeGlobal) { chromeGlobal.addEventListener("ContentSearchClient", this, true, true); addMessageListener("ContentSearch", this); }, - handleEvent: function(event) { + handleEvent(event) { if (this._contentWhitelisted) { this._sendMsg(event.detail.type, event.detail.data); } }, - receiveMessage: function(msg) { + receiveMessage(msg) { if (msg.data.type == "AddToWhitelist") { for (let uri of msg.data.data) { this.whitelist.add(uri); @@ -429,18 +429,18 @@ var ContentSearchMediator = { return this.whitelist.has(content.document.documentURI); }, - _sendMsg: function(type, data = null) { + _sendMsg(type, data = null) { sendAsyncMessage("ContentSearch", { - type: type, - data: data, + type, + data, }); }, - _fireEvent: function(type, data = null) { + _fireEvent(type, data = null) { let event = Cu.cloneInto({ detail: { - type: type, - data: data, + type, + data, }, }, content); content.dispatchEvent(new content.CustomEvent("ContentSearchService", @@ -450,7 +450,7 @@ var ContentSearchMediator = { ContentSearchMediator.init(this); var PageStyleHandler = { - init: function() { + init() { addMessageListener("PageStyle:Switch", this); addMessageListener("PageStyle:Disable", this); addEventListener("pageshow", () => this.sendStyleSheetInfo()); @@ -460,23 +460,23 @@ var PageStyleHandler = { return docShell.contentViewer; }, - sendStyleSheetInfo: function() { + sendStyleSheetInfo() { let filteredStyleSheets = this._filterStyleSheets(this.getAllStyleSheets()); sendAsyncMessage("PageStyle:StyleSheets", { - filteredStyleSheets: filteredStyleSheets, + filteredStyleSheets, authorStyleDisabled: this.markupDocumentViewer.authorStyleDisabled, preferredStyleSheetSet: content.document.preferredStyleSheetSet }); }, - getAllStyleSheets: function(frameset = content) { + getAllStyleSheets(frameset = content) { let selfSheets = Array.slice(frameset.document.styleSheets); let subSheets = Array.map(frameset.frames, frame => this.getAllStyleSheets(frame)); return selfSheets.concat(...subSheets); }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "PageStyle:Switch": this.markupDocumentViewer.authorStyleDisabled = false; @@ -491,7 +491,7 @@ var PageStyleHandler = { this.sendStyleSheetInfo(); }, - _stylesheetSwitchAll: function(frameset, title) { + _stylesheetSwitchAll(frameset, title) { if (!title || this._stylesheetInFrame(frameset, title)) { this._stylesheetSwitchFrame(frameset, title); } @@ -502,7 +502,7 @@ var PageStyleHandler = { } }, - _stylesheetSwitchFrame: function(frame, title) { + _stylesheetSwitchFrame(frame, title) { var docStyleSheets = frame.document.styleSheets; for (let i = 0; i < docStyleSheets.length; ++i) { @@ -515,11 +515,11 @@ var PageStyleHandler = { } }, - _stylesheetInFrame: function(frame, title) { + _stylesheetInFrame(frame, title) { return Array.some(frame.document.styleSheets, (styleSheet) => styleSheet.title == title); }, - _filterStyleSheets: function(styleSheets) { + _filterStyleSheets(styleSheets) { let result = []; for (let currentStyleSheet of styleSheets) { @@ -661,13 +661,13 @@ let PrerenderContentHandler = { sendAsyncMessage("Prerender:Request", { href: aHref.spec, referrer: aReferrer ? aReferrer.spec : null, - id: id, + id, }); this._pending.push({ href: aHref, referrer: aReferrer, - id: id, + id, success: null, failure: null, }); @@ -699,12 +699,12 @@ if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) { } var WebBrowserChrome = { - onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) { + onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab) { return BrowserUtils.onBeforeLinkTraversal(originalTarget, linkURI, linkNode, isAppTab); }, // Check whether this URI should load in the current process - shouldLoadURI: function(aDocShell, aURI, aReferrer) { + shouldLoadURI(aDocShell, aURI, aReferrer) { if (!E10SUtils.shouldLoadURI(aDocShell, aURI, aReferrer)) { E10SUtils.redirectLoad(aDocShell, aURI, aReferrer); return false; @@ -713,23 +713,23 @@ var WebBrowserChrome = { return true; }, - shouldLoadURIInThisProcess: function(aURI) { + shouldLoadURIInThisProcess(aURI) { return E10SUtils.shouldLoadURIInThisProcess(aURI); }, // Try to reload the currently active or currently loading page in a new process. - reloadInFreshProcess: function(aDocShell, aURI, aReferrer) { + reloadInFreshProcess(aDocShell, aURI, aReferrer) { E10SUtils.redirectLoad(aDocShell, aURI, aReferrer, true); return true; }, - startPrerenderingDocument: function(aHref, aReferrer) { + startPrerenderingDocument(aHref, aReferrer) { if (PrerenderContentHandler.initialized) { PrerenderContentHandler.startPrerenderingDocument(aHref, aReferrer); } }, - shouldSwitchToPrerenderedDocument: function(aHref, aReferrer, aSuccess, aFailure) { + shouldSwitchToPrerenderedDocument(aHref, aReferrer, aSuccess, aFailure) { if (PrerenderContentHandler.initialized) { return PrerenderContentHandler.shouldSwitchToPrerenderedDocument( aHref, aReferrer, aSuccess, aFailure); @@ -747,7 +747,7 @@ if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) { var DOMFullscreenHandler = { - init: function() { + init() { addMessageListener("DOMFullscreen:Entered", this); addMessageListener("DOMFullscreen:CleanUp", this); addEventListener("MozDOMFullscreen:Request", this); @@ -765,7 +765,7 @@ var DOMFullscreenHandler = { .getInterface(Ci.nsIDOMWindowUtils); }, - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { let windowUtils = this._windowUtils; switch (aMessage.name) { case "DOMFullscreen:Entered": { @@ -793,7 +793,7 @@ var DOMFullscreenHandler = { } }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "MozDOMFullscreen:Request": { sendAsyncMessage("DOMFullscreen:Request"); diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index f105ad15d024..2ccf6d8add39 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -566,18 +566,18 @@ // count of open requests (should always be 0 or 1) mRequestCount: 0, - destroy: function() { + destroy() { delete this.mTab; delete this.mBrowser; delete this.mTabBrowser; }, - _callProgressListeners: function() { + _callProgressListeners() { Array.unshift(arguments, this.mBrowser); return this.mTabBrowser._callProgressListeners.apply(this.mTabBrowser, arguments); }, - _shouldShowProgress: function(aRequest) { + _shouldShowProgress(aRequest) { if (this.mBlank) return false; @@ -591,9 +591,9 @@ return true; }, - onProgressChange: function(aWebProgress, aRequest, - aCurSelfProgress, aMaxSelfProgress, - aCurTotalProgress, aMaxTotalProgress) { + onProgressChange(aWebProgress, aRequest, + aCurSelfProgress, aMaxSelfProgress, + aCurTotalProgress, aMaxTotalProgress) { this.mTotalProgress = aMaxTotalProgress ? aCurTotalProgress / aMaxTotalProgress : 0; if (!this._shouldShowProgress(aRequest)) @@ -608,15 +608,15 @@ aCurTotalProgress, aMaxTotalProgress]); }, - onProgressChange64: function(aWebProgress, aRequest, - aCurSelfProgress, aMaxSelfProgress, - aCurTotalProgress, aMaxTotalProgress) { + onProgressChange64(aWebProgress, aRequest, + aCurSelfProgress, aMaxSelfProgress, + aCurTotalProgress, aMaxTotalProgress) { return this.onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress); }, - onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) { if (!aRequest) return; @@ -757,8 +757,8 @@ this.mStatus = aStatus; }, - onLocationChange: function(aWebProgress, aRequest, aLocation, - aFlags) { + onLocationChange(aWebProgress, aRequest, aLocation, + aFlags) { // OnLocationChange is called for both the top-level content // and the subframes. let topLevel = aWebProgress.isTopLevel; @@ -838,7 +838,7 @@ } }, - onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) { + onStatusChange(aWebProgress, aRequest, aStatus, aMessage) { if (this.mBlank) return; @@ -848,17 +848,17 @@ this.mMessage = aMessage; }, - onSecurityChange: function(aWebProgress, aRequest, aState) { + onSecurityChange(aWebProgress, aRequest, aState) { this._callProgressListeners("onSecurityChange", [aWebProgress, aRequest, aState]); }, - onRefreshAttempted: function(aWebProgress, aURI, aDelay, aSameURI) { + onRefreshAttempted(aWebProgress, aURI, aDelay, aSameURI) { return this._callProgressListeners("onRefreshAttempted", [aWebProgress, aURI, aDelay, aSameURI]); }, - QueryInterface: function(aIID) { + QueryInterface(aIID) { if (aIID.equals(Components.interfaces.nsIWebProgressListener) || aIID.equals(Components.interfaces.nsIWebProgressListener2) || aIID.equals(Components.interfaces.nsISupportsWeakReference) || @@ -2072,7 +2072,7 @@ // No preloaded browser found, create one. browser = this._createBrowser({permanentKey: aTab.permanentKey, remoteType, - uriIsAboutBlank: uriIsAboutBlank, + uriIsAboutBlank, userContextId: aParams.userContextId, relatedBrowser: aParams.relatedBrowser, opener: aParams.opener, @@ -2124,7 +2124,7 @@ var evt = new CustomEvent("TabBrowserInserted", { bubbles: true, detail: {} }); aTab.dispatchEvent(evt); - return { usingPreloadedContent: usingPreloadedContent }; + return { usingPreloadedContent }; ]]> @@ -3661,7 +3661,7 @@ // Wraps nsITimer. Must not use the vanilla setTimeout and // clearTimeout, because they will be blocked by nsIPromptService // dialogs. - setTimer: function(callback, timeout) { + setTimer(callback, timeout) { let event = { notify: callback }; @@ -3672,11 +3672,11 @@ return timer; }, - clearTimer: function(timer) { + clearTimer(timer) { timer.cancel(); }, - getTabState: function(tab) { + getTabState(tab) { let state = this.tabState.get(tab); if (state === undefined) { return this.STATE_UNLOADED; @@ -3692,7 +3692,7 @@ } }, - setTabState: function(tab, state) { + setTabState(tab, state) { this.setTabStateNoAction(tab, state); let browser = tab.linkedBrowser; @@ -3715,7 +3715,7 @@ return window.windowState == window.STATE_MINIMIZED; }, - init: function() { + init() { this.log("START"); // If we minimized the window before the switcher was activated, @@ -3735,7 +3735,7 @@ } }, - destroy: function() { + destroy() { if (this.unloadTimer) { this.clearTimer(this.unloadTimer); this.unloadTimer = null; @@ -3761,7 +3761,7 @@ this.activeSuppressDisplayport.clear(); }, - finish: function() { + finish() { this.log("FINISH"); this.assert(this.tabbrowser._switcher); @@ -3796,7 +3796,7 @@ // This function is called after all the main state changes to // make sure we display the right tab. - updateDisplay: function() { + updateDisplay() { // Figure out which tab we actually want visible right now. let showTab = null; if (this.getTabState(this.requestedTab) != this.STATE_LOADED && @@ -3855,7 +3855,7 @@ this.lastVisibleTab = this.visibleTab; }, - assert: function(cond) { + assert(cond) { if (!cond) { dump("Assertion failure\n" + Error().stack); @@ -3867,7 +3867,7 @@ }, // We've decided to try to load requestedTab. - loadRequestedTab: function() { + loadRequestedTab() { this.assert(!this.loadTimer); this.assert(!this.minimized); @@ -3882,7 +3882,7 @@ // This function runs before every event. It fixes up the state // to account for closed tabs. - preActions: function() { + preActions() { this.assert(this.tabbrowser._switcher); this.assert(this.tabbrowser._switcher === this); @@ -3910,7 +3910,7 @@ // tab. It's expected that we've already updated all the principal // state variables. This function takes care of updating any auxilliary // state. - postActions: function() { + postActions() { // Once we finish loading loadingTab, we null it out. So the state should // always be LOADING. this.assert(!this.loadingTab || @@ -3962,7 +3962,7 @@ }, // Fires when we're ready to unload unused tabs. - onUnloadTimeout: function() { + onUnloadTimeout() { this.logState("onUnloadTimeout"); this.unloadTimer = null; this.preActions(); @@ -3998,7 +3998,7 @@ }, // Fires when an ongoing load has taken too long. - onLoadTimeout: function() { + onLoadTimeout() { this.logState("onLoadTimeout"); this.preActions(); this.loadTimer = null; @@ -4007,7 +4007,7 @@ }, // Fires when the layers become available for a tab. - onLayersReady: function(browser) { + onLayersReady(browser) { let tab = this.tabbrowser.getTabForBrowser(browser); this.logState(`onLayersReady(${tab._tPos})`); @@ -4027,13 +4027,13 @@ // Fires when we paint the screen. Any tab switches we initiated // previously are done, so there's no need to keep the old layers // around. - onPaint: function() { + onPaint() { this.maybeVisibleTabs.clear(); this.maybeFinishTabSwitch(); }, // Called when we're done clearing the layers for a tab. - onLayersCleared: function(browser) { + onLayersCleared(browser) { let tab = this.tabbrowser.getTabForBrowser(browser); if (tab) { this.logState(`onLayersCleared(${tab._tPos})`); @@ -4046,7 +4046,7 @@ // Called when a tab switches from remote to non-remote. In this case // a MozLayerTreeReady notification that we requested may never fire, // so we need to simulate it. - onRemotenessChange: function(tab) { + onRemotenessChange(tab) { this.logState(`onRemotenessChange(${tab._tPos}, ${tab.linkedBrowser.isRemoteBrowser})`); if (!tab.linkedBrowser.isRemoteBrowser) { if (this.getTabState(tab) == this.STATE_LOADING) { @@ -4059,7 +4059,7 @@ // Called when a tab has been removed, and the browser node is // about to be removed from the DOM. - onTabRemoved: function(tab) { + onTabRemoved(tab) { if (this.lastVisibleTab == tab) { // The browser that was being presented to the user is // going to be removed during this tick of the event loop. @@ -4152,7 +4152,7 @@ }, // Called when the user asks to switch to a given tab. - requestTab: function(tab) { + requestTab(tab) { if (tab === this.requestedTab) { return; } @@ -4179,7 +4179,7 @@ this.postActions(); }, - handleEvent: function(event, delayed = false) { + handleEvent(event, delayed = false) { if (this._processing) { this.setTimer(() => this.handleEvent(event, true), 0); return; @@ -4217,7 +4217,7 @@ * timing. */ - startTabSwitch: function() { + startTabSwitch() { TelemetryStopwatch.cancel("FX_TAB_SWITCH_TOTAL_E10S_MS", window); TelemetryStopwatch.start("FX_TAB_SWITCH_TOTAL_E10S_MS", window); this.addMarker("AsyncTabSwitch:Start"); @@ -4230,7 +4230,7 @@ * are hidden). This checks to make sure all conditions are * satisfied, and then records the tab switch as finished. */ - maybeFinishTabSwitch: function() { + maybeFinishTabSwitch() { if (this.switchInProgress && this.requestedTab && this.getTabState(this.requestedTab) == this.STATE_LOADED) { // After this point the tab has switched from the content thread's point of view. @@ -4245,7 +4245,7 @@ } }, - spinnerDisplayed: function() { + spinnerDisplayed() { this.assert(!this.spinnerTab); TelemetryStopwatch.start("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window); // We have a second, similar probe for capturing recordings of @@ -4254,7 +4254,7 @@ this.addMarker("AsyncTabSwitch:SpinnerShown"); }, - spinnerHidden: function() { + spinnerHidden() { this.assert(this.spinnerTab); this.log("DEBUG: spinner time = " + TelemetryStopwatch.timeElapsed("FX_TAB_SWITCH_SPINNER_VISIBLE_MS", window)); @@ -4265,7 +4265,7 @@ this.maybeFinishTabSwitch(); }, - addMarker: function(marker) { + addMarker(marker) { if (Services.profiler) { Services.profiler.AddMarker(marker); } @@ -4278,7 +4278,7 @@ _useDumpForLogging: false, _logInit: false, - logging: function() { + logging() { if (this._useDumpForLogging) return true; if (this._logInit) @@ -4293,14 +4293,14 @@ return this._shouldLog; }, - tinfo: function(tab) { + tinfo(tab) { if (tab) { return tab._tPos + "(" + tab.linkedBrowser.currentURI.spec + ")"; } return "null"; }, - log: function(s) { + log(s) { if (!this.logging()) return; if (this._useDumpForLogging) { @@ -4310,7 +4310,7 @@ } }, - logState: function(prefix) { + logState(prefix) { if (!this.logging()) return; @@ -4721,13 +4721,13 @@ gContextMenuContentData = { isRemote: true, event: aMessage.objects.event, popupNode: aMessage.objects.popupNode, - browser: browser, + browser, editFlags: data.editFlags, - spellInfo: spellInfo, + spellInfo, principal: data.principal, customMenuItems: data.customMenuItems, addonInfo: data.addonInfo, - documentURIObject: documentURIObject, + documentURIObject, docLocation: data.docLocation, charSet: data.charSet, referrer: data.referrer, @@ -5127,14 +5127,14 @@ self: this, childNodes: [null, this.tabContextMenu, this.tabContainer], firstChild: { nextSibling: this.tabContextMenu }, - getElementsByAttribute: function(attr, attrValue) { + getElementsByAttribute(attr, attrValue) { if (attr == "anonid" && attrValue == "tabContextMenu") return [this.self.tabContextMenu]; return []; }, // Also support adding event listeners (forward to the tab container) - addEventListener: function(a, b, c) { this.self.tabContainer.addEventListener(a, b, c); }, - removeEventListener: function(a, b, c) { this.self.tabContainer.removeEventListener(a, b, c); } + addEventListener(a, b, c) { this.self.tabContainer.addEventListener(a, b, c); }, + removeEventListener(a, b, c) { this.self.tabContainer.removeEventListener(a, b, c); } }); ]]> diff --git a/browser/base/content/test/general/browser_aboutAccounts.js b/browser/base/content/test/general/browser_aboutAccounts.js index c825c91cd02d..173ac8c52fde 100644 --- a/browser/base/content/test/general/browser_aboutAccounts.js +++ b/browser/base/content/test/general/browser_aboutAccounts.js @@ -36,11 +36,11 @@ registerCleanupFunction(function() { var gTests = [ { desc: "Test the remote commands", - teardown: function* () { + *teardown() { gBrowser.removeCurrentTab(); yield signOut(); }, - run: function* () + *run() { setPref("identity.fxaccounts.remote.signup.uri", "https://example.com/browser/browser/base/content/test/general/accounts_testRemoteCommands.html"); @@ -76,7 +76,7 @@ var gTests = [ { desc: "Test action=signin - no user logged in", teardown: () => gBrowser.removeCurrentTab(), - run: function* () + *run() { // When this loads with no user logged-in, we expect the "normal" URL const expected_url = "https://example.com/?is_sign_in"; @@ -95,11 +95,11 @@ var gTests = [ }, { desc: "Test action=signin - user logged in", - teardown: function* () { + *teardown() { gBrowser.removeCurrentTab(); yield signOut(); }, - run: function* () + *run() { // When this loads with a user logged-in, we expect the normal URL to // have been ignored and the "manage" page to be shown. @@ -124,7 +124,7 @@ var gTests = [ { desc: "Test action=signin - captive portal", teardown: () => gBrowser.removeCurrentTab(), - run: function* () + *run() { const signinUrl = "https://redirproxy.example.com/test"; setPref("identity.fxaccounts.remote.signin.uri", signinUrl); @@ -144,7 +144,7 @@ var gTests = [ gBrowser.removeCurrentTab(); BrowserOffline.toggleOfflineStatus(); }, - run: function* () + *run() { BrowserOffline.toggleOfflineStatus(); Services.cache2.clear(); @@ -164,7 +164,7 @@ var gTests = [ { desc: "Test action=signup - no user logged in", teardown: () => gBrowser.removeCurrentTab(), - run: function* () + *run() { const expected_url = "https://example.com/?is_sign_up"; setPref("identity.fxaccounts.remote.signup.uri", expected_url); @@ -183,7 +183,7 @@ var gTests = [ { desc: "Test action=signup - user logged in", teardown: () => gBrowser.removeCurrentTab(), - run: function* () + *run() { const expected_url = "https://example.com/?is_sign_up"; setPref("identity.fxaccounts.remote.signup.uri", expected_url); @@ -202,11 +202,11 @@ var gTests = [ }, { desc: "Test action=reauth", - teardown: function* () { + *teardown() { gBrowser.removeCurrentTab(); yield signOut(); }, - run: function* () + *run() { const expected_url = "https://example.com/?is_force_auth"; setPref("identity.fxaccounts.remote.force_auth.uri", expected_url); @@ -220,11 +220,11 @@ var gTests = [ }, { desc: "Test with migrateToDevEdition enabled (success)", - teardown: function* () { + *teardown() { gBrowser.removeCurrentTab(); yield signOut(); }, - run: function* () + *run() { let fxAccountsCommon = {}; Cu.import("resource://gre/modules/FxAccountsCommon.js", fxAccountsCommon); @@ -281,11 +281,11 @@ var gTests = [ }, { desc: "Test with migrateToDevEdition enabled (no user to migrate)", - teardown: function* () { + *teardown() { gBrowser.removeCurrentTab(); yield signOut(); }, - run: function* () + *run() { const pref = "identity.fxaccounts.migrateToDevEdition"; changedPrefs.add(pref); @@ -321,10 +321,10 @@ var gTests = [ }, { desc: "Test observers about:accounts", - teardown: function() { + teardown() { gBrowser.removeCurrentTab(); }, - run: function* () { + *run() { setPref("identity.fxaccounts.remote.signup.uri", "https://example.com/"); yield setSignedInUser(); let tab = yield promiseNewTabLoadEvent("about:accounts"); @@ -339,7 +339,7 @@ var gTests = [ { desc: "Test entrypoint query string, no action, no user logged in", teardown: () => gBrowser.removeCurrentTab(), - run: function* () { + *run() { // When this loads with no user logged-in, we expect the "normal" URL setPref("identity.fxaccounts.remote.signup.uri", "https://example.com/"); let [, url] = yield promiseNewTabWithIframeLoadEvent("about:accounts?entrypoint=abouthome"); @@ -349,7 +349,7 @@ var gTests = [ { desc: "Test entrypoint query string for signin", teardown: () => gBrowser.removeCurrentTab(), - run: function* () { + *run() { // When this loads with no user logged-in, we expect the "normal" URL const expected_url = "https://example.com/?is_sign_in"; setPref("identity.fxaccounts.remote.signin.uri", expected_url); @@ -360,7 +360,7 @@ var gTests = [ { desc: "Test entrypoint query string for signup", teardown: () => gBrowser.removeCurrentTab(), - run: function* () { + *run() { // When this loads with no user logged-in, we expect the "normal" URL const sign_up_url = "https://example.com/?is_sign_up"; setPref("identity.fxaccounts.remote.signup.uri", sign_up_url); @@ -374,7 +374,7 @@ var gTests = [ teardown() { gBrowser.removeCurrentTab(); }, - run: function* () { + *run() { let signupURL = "https://example.com/"; setPref("identity.fxaccounts.remote.signup.uri", signupURL); let queryStr = "email=foo%40example.com&foo=bar&baz=quux"; @@ -390,7 +390,7 @@ var gTests = [ teardown() { gBrowser.removeCurrentTab(); }, - run: function* () { + *run() { let signupURL = "https://example.com/?param"; setPref("identity.fxaccounts.remote.signup.uri", signupURL); let queryStr = "email=foo%40example.com&foo=bar&baz=quux"; @@ -472,7 +472,7 @@ function checkVisibilities(tab, data) { } deferred.resolve(); }); - mm.sendAsyncMessage("test:check-visibilities", {ids: ids}); + mm.sendAsyncMessage("test:check-visibilities", {ids}); return deferred.promise; } diff --git a/browser/base/content/test/general/browser_aboutHealthReport.js b/browser/base/content/test/general/browser_aboutHealthReport.js index 4027db223feb..2b7eb1b08741 100644 --- a/browser/base/content/test/general/browser_aboutHealthReport.js +++ b/browser/base/content/test/general/browser_aboutHealthReport.js @@ -68,7 +68,7 @@ var gTests = [ Preferences.set("datareporting.healthreport.about.reportUrl", HTTPS_BASE + "healthreport_testRemoteCommands.html"); }), - run: function(iframe) + run(iframe) { let deferred = Promise.defer(); let results = 0; diff --git a/browser/base/content/test/general/browser_aboutHome.js b/browser/base/content/test/general/browser_aboutHome.js index ba5abf34732c..cf9ed841e481 100644 --- a/browser/base/content/test/general/browser_aboutHome.js +++ b/browser/base/content/test/general/browser_aboutHome.js @@ -495,7 +495,7 @@ add_task(function* () { let oldOpenPrefs = window.openPreferences; let openPrefsPromise = new Promise(resolve => { window.openPreferences = function(pane, params) { - resolve({ pane: pane, params: params }); + resolve({ pane, params }); }; }); @@ -647,7 +647,7 @@ function promiseNewEngine(basename) { return new Promise((resolve, reject) => { let url = getRootDirectory(gTestPath) + basename; Services.search.addEngine(url, null, "", false, { - onSuccess: function(engine) { + onSuccess(engine) { info("Search engine added: " + basename); registerCleanupFunction(() => { try { @@ -656,7 +656,7 @@ function promiseNewEngine(basename) { }); resolve(engine); }, - onError: function(errCode) { + onError(errCode) { ok(false, "addEngine failed with error code " + errCode); reject(); }, diff --git a/browser/base/content/test/general/browser_alltabslistener.js b/browser/base/content/test/general/browser_alltabslistener.js index da5e8ddd1933..622be9cd2eab 100644 --- a/browser/base/content/test/general/browser_alltabslistener.js +++ b/browser/base/content/test/general/browser_alltabslistener.js @@ -4,12 +4,12 @@ const gCompleteState = Ci.nsIWebProgressListener.STATE_STOP + Ci.nsIWebProgressListener.STATE_IS_NETWORK; var gFrontProgressListener = { - onProgressChange: function(aWebProgress, aRequest, + onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { }, - onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) { var state = "onStateChange"; info("FrontProgress: " + state + " 0x" + aStateFlags.toString(16)); ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener"); @@ -17,7 +17,7 @@ var gFrontProgressListener = { gFrontNotificationsPos++; }, - onLocationChange: function(aWebProgress, aRequest, aLocationURI, aFlags) { + onLocationChange(aWebProgress, aRequest, aLocationURI, aFlags) { var state = "onLocationChange"; info("FrontProgress: " + state + " " + aLocationURI.spec); ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener"); @@ -25,10 +25,10 @@ var gFrontProgressListener = { gFrontNotificationsPos++; }, - onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) { + onStatusChange(aWebProgress, aRequest, aStatus, aMessage) { }, - onSecurityChange: function(aWebProgress, aRequest, aState) { + onSecurityChange(aWebProgress, aRequest, aState) { var state = "onSecurityChange"; info("FrontProgress: " + state + " 0x" + aState.toString(16)); ok(gFrontNotificationsPos < gFrontNotifications.length, "Got an expected notification for the front notifications listener"); @@ -38,7 +38,7 @@ var gFrontProgressListener = { } var gAllProgressListener = { - onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { var state = "onStateChange"; info("AllProgress: " + state + " 0x" + aStateFlags.toString(16)); ok(aBrowser == gTestBrowser, state + " notification came from the correct browser"); @@ -53,7 +53,7 @@ var gAllProgressListener = { } }, - onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI, + onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI, aFlags) { var state = "onLocationChange"; info("AllProgress: " + state + " " + aLocationURI.spec); @@ -63,12 +63,12 @@ var gAllProgressListener = { gAllNotificationsPos++; }, - onStatusChange: function(aBrowser, aWebProgress, aRequest, aStatus, aMessage) { + onStatusChange(aBrowser, aWebProgress, aRequest, aStatus, aMessage) { var state = "onStatusChange"; ok(aBrowser == gTestBrowser, state + " notification came from the correct browser"); }, - onSecurityChange: function(aBrowser, aWebProgress, aRequest, aState) { + onSecurityChange(aBrowser, aWebProgress, aRequest, aState) { var state = "onSecurityChange"; info("AllProgress: " + state + " 0x" + aState.toString(16)); ok(aBrowser == gTestBrowser, state + " notification came from the correct browser"); diff --git a/browser/base/content/test/general/browser_blockHPKP.js b/browser/base/content/test/general/browser_blockHPKP.js index 47106cbb4623..d470a219f58d 100644 --- a/browser/base/content/test/general/browser_blockHPKP.js +++ b/browser/base/content/test/general/browser_blockHPKP.js @@ -60,7 +60,7 @@ function loadPinningPage() { // After the site is pinned try to load with a subdomain site that should // fail to validate var successfulPinningPageListener = { - handleEvent: function() { + handleEvent() { gBrowser.selectedBrowser.removeEventListener("load", this, true); BrowserTestUtils.loadURI(gBrowser.selectedBrowser, "https://" + kBadPinningDomain).then(function() { return promiseErrorPageLoaded(gBrowser.selectedBrowser); diff --git a/browser/base/content/test/general/browser_bug321000.js b/browser/base/content/test/general/browser_bug321000.js index b30b7101d568..a65b2703ee91 100644 --- a/browser/base/content/test/general/browser_bug321000.js +++ b/browser/base/content/test/general/browser_bug321000.js @@ -49,7 +49,7 @@ function test_paste(aCurrentTest) { // Register input listener. var inputListener = { test: aCurrentTest, - handleEvent: function(event) { + handleEvent(event) { element.removeEventListener(event.type, this, false); is(element.value, this.test.expected, this.test.desc); diff --git a/browser/base/content/test/general/browser_bug356571.js b/browser/base/content/test/general/browser_bug356571.js index 1bfa73ea1587..8af6b4a79003 100644 --- a/browser/base/content/test/general/browser_bug356571.js +++ b/browser/base/content/test/general/browser_bug356571.js @@ -15,7 +15,7 @@ const kPromptServiceFactory = Cm.getClassObject(Cc[kPromptServiceContractID], Ci.nsIFactory); var fakePromptServiceFactory = { - createInstance: function(aOuter, aIid) { + createInstance(aOuter, aIid) { if (aOuter != null) throw Cr.NS_ERROR_NO_AGGREGATION; return promptService.QueryInterface(aIid); @@ -24,7 +24,7 @@ var fakePromptServiceFactory = { var promptService = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIPromptService]), - alert: function() { + alert() { didFail = true; } }; @@ -47,7 +47,7 @@ const kURIs = [ var gProgressListener = { _runCount: 0, - onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { if ((aStateFlags & kCompleteState) == kCompleteState) { if (++this._runCount != kURIs.length) return; diff --git a/browser/base/content/test/general/browser_bug424101.js b/browser/base/content/test/general/browser_bug424101.js index 8000d2ae9d5e..501448b8d399 100644 --- a/browser/base/content/test/general/browser_bug424101.js +++ b/browser/base/content/test/general/browser_bug424101.js @@ -24,7 +24,7 @@ add_task(function *() { let test = tests[index]; yield ContentTask.spawn(gBrowser.selectedBrowser, - { element: test.element, type: test.type, index: index }, + { element: test.element, type: test.type, index }, function* (arg) { let element = content.document.createElement(arg.element); element.id = "element" + arg.index; diff --git a/browser/base/content/test/general/browser_bug553455.js b/browser/base/content/test/general/browser_bug553455.js index b6004e0d3e5d..e3bfc7854492 100644 --- a/browser/base/content/test/general/browser_bug553455.js +++ b/browser/base/content/test/general/browser_bug553455.js @@ -152,13 +152,13 @@ function waitForInstallDialog() { let window = yield new Promise(resolve => { Services.wm.addListener({ - onOpenWindow: function(aXULWindow) { + onOpenWindow(aXULWindow) { Services.wm.removeListener(this); resolve(aXULWindow); }, - onCloseWindow: function(aXULWindow) { + onCloseWindow(aXULWindow) { }, - onWindowTitleChange: function(aXULWindow, aNewTitle) { + onWindowTitleChange(aXULWindow, aNewTitle) { } }); }); @@ -1055,7 +1055,7 @@ function test_cancel() { let install = notification.notification.options.installs[0]; let cancelledPromise = new Promise(resolve => { install.addListener({ - onDownloadCancelled: function() { + onDownloadCancelled() { install.removeListener(this); resolve(); } @@ -1124,7 +1124,7 @@ function test_failedSecurity() { var gTestStart = null; var XPInstallObserver = { - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { var installInfo = aSubject.QueryInterface(Components.interfaces.amIWebInstallInfo); info("Observed " + aTopic + " for " + installInfo.installs.length + " installs"); installInfo.installs.forEach(function(aInstall) { diff --git a/browser/base/content/test/general/browser_bug561636.js b/browser/base/content/test/general/browser_bug561636.js index 19e816716faf..585800b9e4c7 100644 --- a/browser/base/content/test/general/browser_bug561636.js +++ b/browser/base/content/test/general/browser_bug561636.js @@ -17,7 +17,7 @@ function checkPopupHide() var gObserver = { QueryInterface : XPCOMUtils.generateQI([Ci.nsIFormSubmitObserver]), - notifyInvalidSubmit : function(aFormElement, aInvalidElements) + notifyInvalidSubmit(aFormElement, aInvalidElements) { } }; diff --git a/browser/base/content/test/general/browser_bug592338.js b/browser/base/content/test/general/browser_bug592338.js index ca9cc361a84e..3744f26e4814 100644 --- a/browser/base/content/test/general/browser_bug592338.js +++ b/browser/base/content/test/general/browser_bug592338.js @@ -144,7 +144,7 @@ function test() { AddonManager.getInstallForURL(TESTROOT + "theme.xpi", function(aInstall) { aInstall.addListener({ - onInstallEnded: function() { + onInstallEnded() { AddonManager.getAddonByID("theme-xpi@tests.mozilla.org", function(aAddon) { isnot(aAddon, null, "Should have installed the test theme."); diff --git a/browser/base/content/test/general/browser_bug676619.js b/browser/base/content/test/general/browser_bug676619.js index a5f49f0d423e..4e3341d76ca3 100644 --- a/browser/base/content/test/general/browser_bug676619.js +++ b/browser/base/content/test/general/browser_bug676619.js @@ -64,7 +64,7 @@ function test() { function addWindowListener(aURL, aCallback) { Services.wm.addListener({ - onOpenWindow: function(aXULWindow) { + onOpenWindow(aXULWindow) { info("window opened, waiting for focus"); Services.wm.removeListener(this); @@ -75,8 +75,8 @@ function addWindowListener(aURL, aCallback) { aCallback(domwindow); }, domwindow); }, - onCloseWindow: function(aXULWindow) { }, - onWindowTitleChange: function(aXULWindow, aNewTitle) { } + onCloseWindow(aXULWindow) { }, + onWindowTitleChange(aXULWindow, aNewTitle) { } }); } @@ -98,7 +98,7 @@ TabOpenListener.prototype = { tab: null, browser: null, - handleEvent: function(event) { + handleEvent(event) { if (event.type == "TabOpen") { gBrowser.tabContainer.removeEventListener("TabOpen", this, false); this.tab = event.originalTarget; diff --git a/browser/base/content/test/general/browser_bug734076.js b/browser/base/content/test/general/browser_bug734076.js index d7aca0250f09..4f0eda31083c 100644 --- a/browser/base/content/test/general/browser_bug734076.js +++ b/browser/base/content/test/general/browser_bug734076.js @@ -15,15 +15,15 @@ add_task(function* () name: "view background image", url: "http://mochi.test:8888/", element: "body", - go: function() { - return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) { + go() { + return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL }, function* (arg) { let contentBody = content.document.body; contentBody.style.backgroundImage = "url('" + arg.writeDomainURL + "')"; return "context-viewbgimage"; }); }, - verify: function() { + verify() { return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) { Assert.ok(!content.document.body.textContent, "no domain was inherited for view background image"); @@ -34,8 +34,8 @@ add_task(function* () name: "view image", url: "http://mochi.test:8888/", element: "img", - go: function() { - return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) { + go() { + return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL }, function* (arg) { let doc = content.document; let img = doc.createElement("img"); img.height = 100; @@ -46,7 +46,7 @@ add_task(function* () return "context-viewimage"; }); }, - verify: function() { + verify() { return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) { Assert.ok(!content.document.body.textContent, "no domain was inherited for view image"); @@ -57,8 +57,8 @@ add_task(function* () name: "show only this frame", url: "http://mochi.test:8888/", element: "iframe", - go: function() { - return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL: writeDomainURL }, function* (arg) { + go() { + return ContentTask.spawn(gBrowser.selectedBrowser, { writeDomainURL }, function* (arg) { let doc = content.document; let iframe = doc.createElement("iframe"); iframe.setAttribute("src", arg.writeDomainURL); @@ -73,7 +73,7 @@ add_task(function* () }); }); }, - verify: function() { + verify() { return ContentTask.spawn(gBrowser.selectedBrowser, null, function* (arg) { Assert.ok(!content.document.body.textContent, "no domain was inherited for 'show only this frame'"); diff --git a/browser/base/content/test/general/browser_contentAltClick.js b/browser/base/content/test/general/browser_contentAltClick.js index f6922b9efd6f..bce845ca7148 100644 --- a/browser/base/content/test/general/browser_contentAltClick.js +++ b/browser/base/content/test/general/browser_contentAltClick.js @@ -54,7 +54,7 @@ add_task(function* test_alt_click() // When 1 download has been attempted then resolve the promise. let finishedAllDownloads = new Promise( (resolve) => { downloadView = { - onDownloadAdded: function(aDownload) { + onDownloadAdded(aDownload) { downloads.push(aDownload); resolve(); }, @@ -83,7 +83,7 @@ add_task(function* test_alt_click_on_xlinks() // When all 2 downloads have been attempted then resolve the promise. let finishedAllDownloads = new Promise( (resolve) => { downloadView = { - onDownloadAdded: function(aDownload) { + onDownloadAdded(aDownload) { downloads.push(aDownload); if (downloads.length == 2) { resolve(); diff --git a/browser/base/content/test/general/browser_contentAreaClick.js b/browser/base/content/test/general/browser_contentAreaClick.js index 921416b82385..db91dd11c71c 100644 --- a/browser/base/content/test/general/browser_contentAreaClick.js +++ b/browser/base/content/test/general/browser_contentAreaClick.js @@ -18,8 +18,8 @@ var gTests = [ { desc: "Simple left click", - setup: function() {}, - clean: function() {}, + setup() {}, + clean() {}, event: {}, targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ], expectedInvokedMethods: [], @@ -28,8 +28,8 @@ var gTests = [ { desc: "Ctrl/Cmd left click", - setup: function() {}, - clean: function() {}, + setup() {}, + clean() {}, event: { ctrlKey: true, metaKey: true }, targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ], @@ -41,10 +41,10 @@ var gTests = [ // just be like Alt click. { desc: "Shift+Alt left click", - setup: function() { + setup() { gPrefService.setBoolPref("browser.altClickSave", true); }, - clean: function() { + clean() { gPrefService.clearUserPref("browser.altClickSave"); }, event: { shiftKey: true, @@ -56,10 +56,10 @@ var gTests = [ { desc: "Shift+Alt left click on XLinks", - setup: function() { + setup() { gPrefService.setBoolPref("browser.altClickSave", true); }, - clean: function() { + clean() { gPrefService.clearUserPref("browser.altClickSave"); }, event: { shiftKey: true, @@ -71,8 +71,8 @@ var gTests = [ { desc: "Shift click", - setup: function() {}, - clean: function() {}, + setup() {}, + clean() {}, event: { shiftKey: true }, targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ], expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ], @@ -81,10 +81,10 @@ var gTests = [ { desc: "Alt click", - setup: function() { + setup() { gPrefService.setBoolPref("browser.altClickSave", true); }, - clean: function() { + clean() { gPrefService.clearUserPref("browser.altClickSave"); }, event: { altKey: true }, @@ -95,10 +95,10 @@ var gTests = [ { desc: "Alt click on XLinks", - setup: function() { + setup() { gPrefService.setBoolPref("browser.altClickSave", true); }, - clean: function() { + clean() { gPrefService.clearUserPref("browser.altClickSave"); }, event: { altKey: true }, @@ -109,8 +109,8 @@ var gTests = [ { desc: "Panel click", - setup: function() {}, - clean: function() {}, + setup() {}, + clean() {}, event: {}, targets: [ "panellink" ], expectedInvokedMethods: [ "urlSecurityCheck", "loadURI" ], @@ -119,8 +119,8 @@ var gTests = [ { desc: "Simple middle click opentab", - setup: function() {}, - clean: function() {}, + setup() {}, + clean() {}, event: { button: 1 }, targets: [ "commonlink", "mathxlink", "svgxlink", "maplink" ], expectedInvokedMethods: [ "urlSecurityCheck", "openLinkIn" ], @@ -129,10 +129,10 @@ var gTests = [ { desc: "Simple middle click openwin", - setup: function() { + setup() { gPrefService.setBoolPref("browser.tabs.opentabfor.middleclick", false); }, - clean: function() { + clean() { gPrefService.clearUserPref("browser.tabs.opentabfor.middleclick"); }, event: { button: 1 }, @@ -143,11 +143,11 @@ var gTests = [ { desc: "Middle mouse paste", - setup: function() { + setup() { gPrefService.setBoolPref("middlemouse.contentLoadURL", true); gPrefService.setBoolPref("general.autoScroll", false); }, - clean: function() { + clean() { gPrefService.clearUserPref("middlemouse.contentLoadURL"); gPrefService.clearUserPref("general.autoScroll"); }, @@ -199,7 +199,7 @@ function test() { // Click handler used to steal click events. var gClickHandler = { - handleEvent: function(event) { + handleEvent(event) { let linkId = event.target.id || event.target.localName; is(event.type, "click", gCurrentTest.desc + ":Handler received a click event on " + linkId); diff --git a/browser/base/content/test/general/browser_contentSearchUI.js b/browser/base/content/test/general/browser_contentSearchUI.js index aa346ed2cedd..9dc5fbcfb612 100644 --- a/browser/base/content/test/general/browser_contentSearchUI.js +++ b/browser/base/content/test/general/browser_contentSearchUI.js @@ -195,28 +195,28 @@ add_task(function* cycleSuggestions() { accelKey: true, }; - let state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers }); + let state = yield msg("key", { key: "VK_DOWN", modifiers }); checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex); - state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers }); + state = yield msg("key", { key: "VK_DOWN", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex); - state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers }); + state = yield msg("key", { key: "VK_DOWN", modifiers }); checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex); - state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers }); + state = yield msg("key", { key: "VK_DOWN", modifiers }); checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex); - state = yield msg("key", { key: "VK_UP", modifiers: modifiers }); + state = yield msg("key", { key: "VK_UP", modifiers }); checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex); - state = yield msg("key", { key: "VK_UP", modifiers: modifiers }); + state = yield msg("key", { key: "VK_UP", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1, aSelectedButtonIndex); - state = yield msg("key", { key: "VK_UP", modifiers: modifiers }); + state = yield msg("key", { key: "VK_UP", modifiers }); checkState(state, "xfoo", ["xfoo", "xbar"], 0, aSelectedButtonIndex); - state = yield msg("key", { key: "VK_UP", modifiers: modifiers }); + state = yield msg("key", { key: "VK_UP", modifiers }); checkState(state, "x", ["xfoo", "xbar"], -1, aSelectedButtonIndex); }); @@ -249,22 +249,22 @@ add_task(function* cycleOneOffs() { altKey: true, }; - state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers }); + state = yield msg("key", { key: "VK_DOWN", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1, 0); - state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers }); + state = yield msg("key", { key: "VK_DOWN", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1, 1); - state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers }); + state = yield msg("key", { key: "VK_DOWN", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1); - state = yield msg("key", { key: "VK_UP", modifiers: modifiers }); + state = yield msg("key", { key: "VK_UP", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1, 1); - state = yield msg("key", { key: "VK_UP", modifiers: modifiers }); + state = yield msg("key", { key: "VK_UP", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1, 0); - state = yield msg("key", { key: "VK_UP", modifiers: modifiers }); + state = yield msg("key", { key: "VK_UP", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1); // If the settings button is selected, pressing alt+up/down should select the @@ -274,13 +274,13 @@ add_task(function* cycleOneOffs() { state = yield msg("key", "VK_TAB"); // Settings button selected. checkState(state, "xbar", ["xfoo", "xbar"], 1, 2); - state = yield msg("key", { key: "VK_UP", modifiers: modifiers }); + state = yield msg("key", { key: "VK_UP", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1, 1); state = yield msg("key", "VK_TAB"); checkState(state, "xbar", ["xfoo", "xbar"], 1, 2); - state = yield msg("key", { key: "VK_DOWN", modifiers: modifiers }); + state = yield msg("key", { key: "VK_DOWN", modifiers }); checkState(state, "xbar", ["xfoo", "xbar"], 1, 0); yield msg("removeLastOneOff"); @@ -418,7 +418,7 @@ add_task(function* search() { // Test typing a query and pressing enter. let p = msg("waitForSearch"); yield msg("key", { key: "x", waitForSuggestions: true }); - yield msg("key", { key: "VK_RETURN", modifiers: modifiers }); + yield msg("key", { key: "VK_RETURN", modifiers }); let mesg = yield p; let eventData = { engineName: TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME, @@ -437,7 +437,7 @@ add_task(function* search() { yield msg("key", { key: "x", waitForSuggestions: true }); yield msg("key", "VK_DOWN"); yield msg("key", "VK_DOWN"); - yield msg("key", { key: "VK_RETURN", modifiers: modifiers }); + yield msg("key", { key: "VK_RETURN", modifiers }); mesg = yield p; eventData.searchString = "xfoo"; eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME; @@ -455,7 +455,7 @@ add_task(function* search() { yield msg("key", { key: "x", waitForSuggestions: true }); yield msg("key", "VK_UP"); yield msg("key", "VK_UP"); - yield msg("key", { key: "VK_RETURN", modifiers: modifiers }); + yield msg("key", { key: "VK_RETURN", modifiers }); mesg = yield p; delete eventData.selection; eventData.searchString = "x"; @@ -470,7 +470,7 @@ add_task(function* search() { modifiers.button = 0; yield msg("key", { key: "x", waitForSuggestions: true }); yield msg("mousemove", -1); - yield msg("click", { eltIdx: -1, modifiers: modifiers }); + yield msg("click", { eltIdx: -1, modifiers }); mesg = yield p; eventData.originalEvent = modifiers; eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_BASENAME; @@ -483,7 +483,7 @@ add_task(function* search() { yield msg("key", { key: "x", waitForSuggestions: true }); p = msg("waitForSearch"); yield msg("mousemove", 1); - yield msg("click", { eltIdx: 1, modifiers: modifiers }); + yield msg("click", { eltIdx: 1, modifiers }); mesg = yield p; eventData.searchString = "xfoo"; eventData.selection = { @@ -499,7 +499,7 @@ add_task(function* search() { yield msg("key", { key: "x", waitForSuggestions: true }); p = msg("waitForSearch"); yield msg("mousemove", 3); - yield msg("click", { eltIdx: 3, modifiers: modifiers }); + yield msg("click", { eltIdx: 3, modifiers }); mesg = yield p; eventData.searchString = "x"; eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_2_BASENAME; @@ -515,7 +515,7 @@ add_task(function* search() { p = msg("waitForSearch"); yield msg("mousemove", 1); yield msg("mousemove", 3); - yield msg("click", { eltIdx: 3, modifiers: modifiers }); + yield msg("click", { eltIdx: 3, modifiers }); mesg = yield p; eventData.searchString = "xfoo" eventData.selection = { @@ -534,7 +534,7 @@ add_task(function* search() { yield msg("key", "VK_DOWN"); yield msg("key", "VK_DOWN"); yield msg("key", "VK_TAB"); - yield msg("key", { key: "VK_RETURN", modifiers: modifiers }); + yield msg("key", { key: "VK_RETURN", modifiers }); mesg = yield p; eventData.selection = { index: 1, @@ -554,7 +554,7 @@ add_task(function* search() { yield msg("commitComposition"); delete modifiers.button; p = msg("waitForSearch"); - yield msg("key", { key: "VK_RETURN", modifiers: modifiers }); + yield msg("key", { key: "VK_RETURN", modifiers }); mesg = yield p; eventData.searchString = "x" eventData.originalEvent = modifiers; @@ -583,7 +583,7 @@ add_task(function* search() { modifiers.button = 0; p = msg("waitForSearch"); - yield msg("click", { eltIdx: 1, modifiers: modifiers }); + yield msg("click", { eltIdx: 1, modifiers }); mesg = yield p; eventData.searchString = "xfoo"; eventData.originalEvent = modifiers; @@ -662,8 +662,8 @@ function setUp(aNoEngine) { function msg(type, data = null) { gMsgMan.sendAsyncMessage(TEST_MSG, { - type: type, - data: data, + type, + data, }); let deferred = Promise.defer(); gMsgMan.addMessageListener(TEST_MSG, function onMsg(msgObj) { diff --git a/browser/base/content/test/general/browser_contextmenu.js b/browser/base/content/test/general/browser_contextmenu.js index 3e0135848ee4..88bf6a2f6192 100644 --- a/browser/base/content/test/general/browser_contextmenu.js +++ b/browser/base/content/test/general/browser_contextmenu.js @@ -500,7 +500,7 @@ add_task(function* test_contenteditable() { add_task(function* test_copylinkcommand() { yield test_contextmenu("#test-link", null, { - postCheckContextMenuFn: function*() { + *postCheckContextMenuFn() { document.commandDispatcher .getControllerForCommand("cmd_copyLink") .doCommand("cmd_copyLink"); @@ -562,7 +562,7 @@ add_task(function* test_pagemenu() { "context-viewsource", true, "context-viewinfo", true ], - {postCheckContextMenuFn: function*() { + {*postCheckContextMenuFn() { let item = contextMenu.getElementsByAttribute("generateditemid", "1")[0]; ok(item, "Got generated XUL menu item"); item.doCommand(); @@ -820,11 +820,11 @@ add_task(function* test_click_to_play_blocked_plugin() { "context-viewinfo", true ], { - preCheckContextMenuFn: function*() { + *preCheckContextMenuFn() { pushPrefs(["plugins.click_to_play", true]); setTestPluginEnabledState(Ci.nsIPluginTag.STATE_CLICKTOPLAY); }, - postCheckContextMenuFn: function*() { + *postCheckContextMenuFn() { getTestPlugin().enabledState = Ci.nsIPluginTag.STATE_ENABLED; } } diff --git a/browser/base/content/test/general/browser_devedition.js b/browser/base/content/test/general/browser_devedition.js index d11a26e264be..4369b6b2bcd2 100644 --- a/browser/base/content/test/general/browser_devedition.js +++ b/browser/base/content/test/general/browser_devedition.js @@ -80,7 +80,7 @@ add_task(function* testDevtoolsTheme() { function dummyLightweightTheme(id) { return { - id: id, + id, name: id, headerURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.header.png", iconURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.icon.png", diff --git a/browser/base/content/test/general/browser_documentnavigation.js b/browser/base/content/test/general/browser_documentnavigation.js index eb789d0766a9..2047795491c9 100644 --- a/browser/base/content/test/general/browser_documentnavigation.js +++ b/browser/base/content/test/general/browser_documentnavigation.js @@ -60,7 +60,7 @@ function* expectFocusOnF6(backward, expectedDocument, expectedElement, onContent details += "," + contentFM.focusedElement.id; } - sendSyncMessage("BrowserTest:FocusChanged", { details : details }); + sendSyncMessage("BrowserTest:FocusChanged", { details }); }, true); }); } diff --git a/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js b/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js index b1dde6b5ae62..01c9389ef997 100644 --- a/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js +++ b/browser/base/content/test/general/browser_domFullscreen_fullscreenMode.js @@ -114,7 +114,7 @@ var gTests = [ { desc: "F11 key", affectsFullscreenMode: true, - exitFunc: function() { + exitFunc() { executeSoon(() => EventUtils.synthesizeKey("VK_F11", {})); } } diff --git a/browser/base/content/test/general/browser_e10s_about_process.js b/browser/base/content/test/general/browser_e10s_about_process.js index 2b4816754aa2..d3dcc56b9e57 100644 --- a/browser/base/content/test/general/browser_e10s_about_process.js +++ b/browser/base/content/test/general/browser_e10s_about_process.js @@ -27,11 +27,11 @@ function AboutModule() { } AboutModule.prototype = { - newChannel: function(aURI, aLoadInfo) { + newChannel(aURI, aLoadInfo) { throw Components.results.NS_ERROR_NOT_IMPLEMENTED; }, - getURIFlags: function(aURI) { + getURIFlags(aURI) { for (let module of TEST_MODULES) { if (aURI.path.startsWith(module.path)) { return module.flags; @@ -42,7 +42,7 @@ AboutModule.prototype = { return 0; }, - getIndexedDBOriginPostfix: function(aURI) { + getIndexedDBOriginPostfix(aURI) { return null; }, @@ -50,13 +50,13 @@ AboutModule.prototype = { }; var AboutModuleFactory = { - createInstance: function(aOuter, aIID) { + createInstance(aOuter, aIID) { if (aOuter) throw Components.results.NS_ERROR_NO_AGGREGATION; return new AboutModule().QueryInterface(aIID); }, - lockFactory: function(aLock) { + lockFactory(aLock) { throw Components.results.NS_ERROR_NOT_IMPLEMENTED; }, diff --git a/browser/base/content/test/general/browser_fullscreen-window-open.js b/browser/base/content/test/general/browser_fullscreen-window-open.js index f6e0063328c6..169657ff1aa0 100644 --- a/browser/base/content/test/general/browser_fullscreen-window-open.js +++ b/browser/base/content/test/general/browser_fullscreen-window-open.js @@ -66,7 +66,7 @@ function test_open() { title: "test_open", param: "", }, - finalizeFn: function() {}, + finalizeFn() {}, }); } @@ -77,7 +77,7 @@ function test_open_with_size() { title: "test_open_with_size", param: "width=400,height=400", }, - finalizeFn: function() {}, + finalizeFn() {}, }); } @@ -88,7 +88,7 @@ function test_open_with_pos() { title: "test_open_with_pos", param: "top=200,left=200", }, - finalizeFn: function() {}, + finalizeFn() {}, }); } @@ -100,11 +100,11 @@ function test_open_with_outerSize() { title: "test_open_with_outerSize", param: "outerWidth=200,outerHeight=200", }, - successFn: function() { + successFn() { is(window.outerWidth, outerWidth, "Don't change window.outerWidth."); is(window.outerHeight, outerHeight, "Don't change window.outerHeight."); }, - finalizeFn: function() {}, + finalizeFn() {}, }); } @@ -116,11 +116,11 @@ function test_open_with_innerSize() { title: "test_open_with_innerSize", param: "innerWidth=200,innerHeight=200", }, - successFn: function() { + successFn() { is(window.innerWidth, innerWidth, "Don't change window.innerWidth."); is(window.innerHeight, innerHeight, "Don't change window.innerHeight."); }, - finalizeFn: function() {}, + finalizeFn() {}, }); } @@ -131,7 +131,7 @@ function test_open_with_dialog() { title: "test_open_with_dialog", param: "dialog=yes", }, - finalizeFn: function() {}, + finalizeFn() {}, }); } @@ -148,7 +148,7 @@ function test_open_when_open_new_window_by_pref() { title: "test_open_when_open_new_window_by_pref", param: "width=400,height=400", }, - finalizeFn: function() { + finalizeFn() { Services.prefs.clearUserPref(PREF_NAME); }, }); @@ -163,7 +163,7 @@ function test_open_with_pref_to_disable_in_fullscreen() { title: "test_open_with_pref_disabled_in_fullscreen", param: "width=400,height=400", }, - finalizeFn: function() { + finalizeFn() { Services.prefs.setBoolPref(PREF_DISABLE_OPEN_NEW_WINDOW, true); }, }); @@ -177,7 +177,7 @@ function test_open_from_chrome() { title: "test_open_from_chrome", param: "", }, - finalizeFn: function() {} + finalizeFn() {} }); } @@ -251,7 +251,7 @@ function waitForWindowOpen(aOptions) { let listener = new WindowListener(message.title, getBrowserURL(), { onSuccess: aOptions.successFn, - onFinalize: onFinalize, + onFinalize, }); Services.wm.addListener(listener); @@ -292,7 +292,7 @@ function waitForWindowOpenFromChrome(aOptions) { let listener = new WindowListener(message.title, getBrowserURL(), { onSuccess: aOptions.successFn, - onFinalize: onFinalize, + onFinalize, }); Services.wm.addListener(listener); @@ -312,7 +312,7 @@ WindowListener.prototype = { callback_onSuccess: null, callBack_onFinalize: null, - onOpenWindow: function(aXULWindow) { + onOpenWindow(aXULWindow) { Services.wm.removeListener(this); let domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor) @@ -340,8 +340,8 @@ WindowListener.prototype = { }; domwindow.addEventListener("load", onLoad, true); }, - onCloseWindow: function(aXULWindow) {}, - onWindowTitleChange: function(aXULWindow, aNewTitle) {}, + onCloseWindow(aXULWindow) {}, + onWindowTitleChange(aXULWindow, aNewTitle) {}, QueryInterface: XPCOMUtils.generateQI([Ci.nsIWindowMediatorListener, Ci.nsISupports]), }; diff --git a/browser/base/content/test/general/browser_fxa_oauth.js b/browser/base/content/test/general/browser_fxa_oauth.js index b676d2bd06d9..5babfa638e9e 100644 --- a/browser/base/content/test/general/browser_fxa_oauth.js +++ b/browser/base/content/test/general/browser_fxa_oauth.js @@ -21,7 +21,7 @@ const HTTP_ENDPOINT_WITH_KEYS = "/browser/browser/base/content/test/general/brow var gTests = [ { desc: "FxA OAuth - should open a new tab, complete OAuth flow", - run: function() { + run() { return new Promise(function(resolve, reject) { let tabOpened = false; let properURL = "http://example.com/browser/browser/base/content/test/general/browser_fxa_oauth.html"; @@ -74,7 +74,7 @@ var gTests = [ }, { desc: "FxA OAuth - should open a new tab, complete OAuth flow when forcing auth", - run: function() { + run() { return new Promise(function(resolve, reject) { let tabOpened = false; let properURL = "http://example.com/browser/browser/base/content/test/general/browser_fxa_oauth.html"; @@ -131,7 +131,7 @@ var gTests = [ }, { desc: "FxA OAuth - should receive an error when there's a state mismatch", - run: function() { + run() { return new Promise(function(resolve, reject) { let tabOpened = false; @@ -169,7 +169,7 @@ var gTests = [ }, { desc: "FxA OAuth - should be able to request keys during OAuth flow", - run: function() { + run() { return new Promise(function(resolve, reject) { let tabOpened = false; @@ -211,7 +211,7 @@ var gTests = [ }, { desc: "FxA OAuth - should not receive keys if not explicitly requested", - run: function() { + run() { return new Promise(function(resolve, reject) { let tabOpened = false; @@ -252,7 +252,7 @@ var gTests = [ }, { desc: "FxA OAuth - should receive an error if keys could not be obtained", - run: function() { + run() { return new Promise(function(resolve, reject) { let tabOpened = false; diff --git a/browser/base/content/test/general/browser_fxa_web_channel.js b/browser/base/content/test/general/browser_fxa_web_channel.js index ad4fb7b57ae4..a87c2338a6b4 100644 --- a/browser/base/content/test/general/browser_fxa_web_channel.js +++ b/browser/base/content/test/general/browser_fxa_web_channel.js @@ -23,7 +23,7 @@ const TEST_CHANNEL_ID = "account_updates_test"; var gTests = [ { desc: "FxA Web Channel - should receive message about profile changes", - run: function* () { + *run() { let client = new FxAccountsWebChannel({ content_uri: TEST_HTTP_PATH, channel_id: TEST_CHANNEL_ID, @@ -37,7 +37,7 @@ var gTests = [ }); yield BrowserTestUtils.withNewTab({ - gBrowser: gBrowser, + gBrowser, url: TEST_BASE_URL + "?profile_change" }, function* () { yield promiseObserver; @@ -46,7 +46,7 @@ var gTests = [ }, { desc: "fxa web channel - login messages should notify the fxAccounts object", - run: function* () { + *run() { let promiseLogin = new Promise((resolve, reject) => { let login = (accountData) => { @@ -66,13 +66,13 @@ var gTests = [ content_uri: TEST_HTTP_PATH, channel_id: TEST_CHANNEL_ID, helpers: { - login: login + login } }); }); yield BrowserTestUtils.withNewTab({ - gBrowser: gBrowser, + gBrowser, url: TEST_BASE_URL + "?login" }, function* () { yield promiseLogin; @@ -81,7 +81,7 @@ var gTests = [ }, { desc: "fxa web channel - can_link_account messages should respond", - run: function* () { + *run() { let properUrl = TEST_BASE_URL + "?can_link_account"; let promiseEcho = new Promise((resolve, reject) => { @@ -114,7 +114,7 @@ var gTests = [ }); yield BrowserTestUtils.withNewTab({ - gBrowser: gBrowser, + gBrowser, url: properUrl }, function* () { yield promiseEcho; @@ -123,7 +123,7 @@ var gTests = [ }, { desc: "fxa web channel - logout messages should notify the fxAccounts object", - run: function* () { + *run() { let promiseLogout = new Promise((resolve, reject) => { let logout = (uid) => { Assert.equal(uid, 'uid'); @@ -136,13 +136,13 @@ var gTests = [ content_uri: TEST_HTTP_PATH, channel_id: TEST_CHANNEL_ID, helpers: { - logout: logout + logout } }); }); yield BrowserTestUtils.withNewTab({ - gBrowser: gBrowser, + gBrowser, url: TEST_BASE_URL + "?logout" }, function* () { yield promiseLogout; @@ -151,7 +151,7 @@ var gTests = [ }, { desc: "fxa web channel - delete messages should notify the fxAccounts object", - run: function* () { + *run() { let promiseDelete = new Promise((resolve, reject) => { let logout = (uid) => { Assert.equal(uid, 'uid'); @@ -164,13 +164,13 @@ var gTests = [ content_uri: TEST_HTTP_PATH, channel_id: TEST_CHANNEL_ID, helpers: { - logout: logout + logout } }); }); yield BrowserTestUtils.withNewTab({ - gBrowser: gBrowser, + gBrowser, url: TEST_BASE_URL + "?delete" }, function* () { yield promiseDelete; diff --git a/browser/base/content/test/general/browser_fxaccounts.js b/browser/base/content/test/general/browser_fxaccounts.js index cc7abad9ffdb..ae61ce0f3874 100644 --- a/browser/base/content/test/general/browser_fxaccounts.js +++ b/browser/base/content/test/general/browser_fxaccounts.js @@ -16,7 +16,7 @@ const TEST_ROOT = "http://example.com/browser/browser/base/content/test/general/ // The stub functions. let stubs = { - updateAppMenuItem: function() { + updateAppMenuItem() { return unstubs['updateAppMenuItem'].call(gFxAccounts).then(() => { Services.obs.notifyObservers(null, "test:browser_fxaccounts:updateAppMenuItem", null); }); @@ -25,7 +25,7 @@ const TEST_ROOT = "http://example.com/browser/browser/base/content/test/general/ // due to the promises it fires off at load time and there's no clear way to // know when they are done. // So just ensure openPreferences is called rather than whether it opens. - openPreferences: function() { + openPreferences() { Services.obs.notifyObservers(null, "test:browser_fxaccounts:openPreferences", null); } }; @@ -237,7 +237,7 @@ function setSignedInUser(verified) { sessionToken: "dead", kA: "beef", kB: "cafe", - verified: verified, + verified, oauthTokens: { // a token for the profile server. diff --git a/browser/base/content/test/general/browser_getshortcutoruri.js b/browser/base/content/test/general/browser_getshortcutoruri.js index a318ab6d1f04..7c54ac4975e1 100644 --- a/browser/base/content/test/general/browser_getshortcutoruri.js +++ b/browser/base/content/test/general/browser_getshortcutoruri.js @@ -19,7 +19,7 @@ function keywordResult(aURL, aPostData, aIsUnsafe) { function keyWordData() {} keyWordData.prototype = { - init: function(aKeyWord, aURL, aPostData, aSearchWord) { + init(aKeyWord, aURL, aPostData, aSearchWord) { this.keyword = aKeyWord; this.uri = makeURI(aURL); this.postData = aPostData; diff --git a/browser/base/content/test/general/browser_homeDrop.js b/browser/base/content/test/general/browser_homeDrop.js index 061ea17f0033..32228fca459e 100644 --- a/browser/base/content/test/general/browser_homeDrop.js +++ b/browser/base/content/test/general/browser_homeDrop.js @@ -32,7 +32,7 @@ add_task(function*() { let setHomepagePromise = new Promise(function(resolve) { let observer = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]), - observe: function(subject, topic, data) { + observe(subject, topic, data) { is(topic, "nsPref:changed", "observed correct topic"); is(data, HOMEPAGE_PREF, "observed correct data"); let modified = Services.prefs.getComplexValue(HOMEPAGE_PREF, @@ -57,7 +57,7 @@ add_task(function*() { function dropInvalidURI() { return new Promise(resolve => { let consoleListener = { - observe: function(m) { + observe(m) { if (m.message.includes("NS_ERROR_DOM_BAD_URI")) { ok(true, "drop was blocked"); resolve(); diff --git a/browser/base/content/test/general/browser_keywordSearch.js b/browser/base/content/test/general/browser_keywordSearch.js index 4d64febef6d8..ff6ef4a0832f 100644 --- a/browser/base/content/test/general/browser_keywordSearch.js +++ b/browser/base/content/test/general/browser_keywordSearch.js @@ -20,7 +20,7 @@ function test() { waitForExplicitFinish(); let windowObserver = { - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (aTopic == "domwindowopened") { ok(false, "Alert window opened"); let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget); diff --git a/browser/base/content/test/general/browser_parsable_css.js b/browser/base/content/test/general/browser_parsable_css.js index 559e25b73812..518dad8afc33 100644 --- a/browser/base/content/test/general/browser_parsable_css.js +++ b/browser/base/content/test/general/browser_parsable_css.js @@ -20,6 +20,10 @@ let whitelist = [ {sourceName: /web\/viewer\.css$/i, errorMessage: /Unknown pseudo-class.*(fullscreen|selection)/i, isFromDevTools: false}, + // PDFjs rules needed for compat with other UAs. + {sourceName: /web\/viewer\.css$/i, + errorMessage: /Unknown property.*appearance/i, + isFromDevTools: false}, // Tracked in bug 1004428. {sourceName: /aboutaccounts\/(main|normalize)\.css$/i, isFromDevTools: false}, diff --git a/browser/base/content/test/general/browser_plainTextLinks.js b/browser/base/content/test/general/browser_plainTextLinks.js index 7a304fce0c89..a6f436dec1df 100644 --- a/browser/base/content/test/general/browser_plainTextLinks.js +++ b/browser/base/content/test/general/browser_plainTextLinks.js @@ -119,7 +119,7 @@ add_task(function *() { let contentAreaContextMenu = document.getElementById("contentAreaContextMenu"); for (let testid = 0; testid < checks.length; testid++) { - let menuPosition = yield ContentTask.spawn(gBrowser.selectedBrowser, { testid: testid }, function* (arg) { + let menuPosition = yield ContentTask.spawn(gBrowser.selectedBrowser, { testid }, function* (arg) { let range = content.tests[arg.testid](); // Get the range of the selection and determine its coordinates. These diff --git a/browser/base/content/test/general/browser_restore_isAppTab.js b/browser/base/content/test/general/browser_restore_isAppTab.js index 3e53efd326f7..1e98ae0dc118 100644 --- a/browser/base/content/test/general/browser_restore_isAppTab.js +++ b/browser/base/content/test/general/browser_restore_isAppTab.js @@ -14,7 +14,7 @@ function getMinidumpDirectory() { // This observer is needed so we can clean up all evidence of the crash so // the testrunner thinks things are peachy. var CrashObserver = { - observe: function(subject, topic, data) { + observe(subject, topic, data) { is(topic, 'ipc:content-shutdown', 'Received correct observer topic.'); ok(subject instanceof Ci.nsIPropertyBag2, 'Subject implements nsIPropertyBag2.'); diff --git a/browser/base/content/test/general/browser_sanitize-timespans.js b/browser/base/content/test/general/browser_sanitize-timespans.js index f1096246c35c..813e72f1af7a 100644 --- a/browser/base/content/test/general/browser_sanitize-timespans.js +++ b/browser/base/content/test/general/browser_sanitize-timespans.js @@ -31,7 +31,7 @@ function promiseDownloadRemoved(list) { let deferred = Promise.defer(); let view = { - onDownloadRemoved: function(download) { + onDownloadRemoved(download) { list.removeView(view); deferred.resolve(); } @@ -58,11 +58,11 @@ function countEntries(name, message, check) { let count; FormHistory.count(obj, { handleResult: result => count = result, - handleError: function(error) { + handleError(error) { deferred.reject(error) throw new Error("Error occurred searching form history: " + error); }, - handleCompletion: function(reason) { + handleCompletion(reason) { if (!reason) { check(count, message); deferred.resolve(); @@ -493,11 +493,11 @@ function* setupFormHistory() { let results = []; FormHistory.search(terms, params, { handleResult: result => results.push(result), - handleError: function(error) { + handleError(error) { deferred.reject(error); throw new Error("Error occurred searching form history: " + error); }, - handleCompletion: function(reason) { deferred.resolve(results); } + handleCompletion(reason) { deferred.resolve(results); } }); return deferred.promise; } @@ -505,11 +505,11 @@ function* setupFormHistory() { function update(changes) { let deferred = Promise.defer(); - FormHistory.update(changes, { handleError: function(error) { + FormHistory.update(changes, { handleError(error) { deferred.reject(error); throw new Error("Error occurred searching form history: " + error); }, - handleCompletion: function(reason) { deferred.resolve(); } + handleCompletion(reason) { deferred.resolve(); } }); return deferred.promise; } diff --git a/browser/base/content/test/general/browser_sanitizeDialog.js b/browser/base/content/test/general/browser_sanitizeDialog.js index e7708aede954..7b469e76eeb4 100644 --- a/browser/base/content/test/general/browser_sanitizeDialog.js +++ b/browser/base/content/test/general/browser_sanitizeDialog.js @@ -572,7 +572,7 @@ add_task(function* test_offline_cache() { // Check if the cache has been deleted var size = -1; var visitor = { - onCacheStorageInfo: function(aEntryCount, aConsumption, aCapacity, aDiskDirectory) + onCacheStorageInfo(aEntryCount, aConsumption, aCapacity, aDiskDirectory) { size = aConsumption; } @@ -583,8 +583,8 @@ add_task(function* test_offline_cache() { }; var cacheListener = { - onCacheEntryCheck: function() { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; }, - onCacheEntryAvailable: function(entry, isnew, unused, status) { + onCacheEntryCheck() { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; }, + onCacheEntryAvailable(entry, isnew, unused, status) { is(status, Cr.NS_OK); var stream = entry.openOutputStream(0); var content = "content"; @@ -648,7 +648,7 @@ WindowHelper.prototype = { /** * "Presses" the dialog's OK button. */ - acceptDialog: function() { + acceptDialog() { is(this.win.document.documentElement.getButton("accept").disabled, false, "Dialog's OK button should not be disabled"); this.win.document.documentElement.acceptDialog(); @@ -657,7 +657,7 @@ WindowHelper.prototype = { /** * "Presses" the dialog's Cancel button. */ - cancelDialog: function() { + cancelDialog() { this.win.document.documentElement.cancelDialog(); }, @@ -669,7 +669,7 @@ WindowHelper.prototype = { * @param aShouldBeShown * True if you expect the details to be shown and false if hidden */ - checkDetails: function(aShouldBeShown) { + checkDetails(aShouldBeShown) { let button = this.getDetailsButton(); let list = this.getItemList(); let hidden = list.hidden || list.collapsed; @@ -700,7 +700,7 @@ WindowHelper.prototype = { * @param aCheckState * True if the checkbox should be checked, false otherwise */ - checkPrefCheckbox: function(aPrefName, aCheckState) { + checkPrefCheckbox(aPrefName, aCheckState) { var pref = "privacy.cpd." + aPrefName; var cb = this.win.document.querySelectorAll( "#itemList > [preference='" + pref + "']"); @@ -712,7 +712,7 @@ WindowHelper.prototype = { /** * Makes sure all the checkboxes are checked. */ - _checkAllCheckboxesCustom: function(check) { + _checkAllCheckboxesCustom(check) { var cb = this.win.document.querySelectorAll("#itemList > [preference]"); ok(cb.length > 1, "found checkboxes for preferences"); for (var i = 0; i < cb.length; ++i) { @@ -722,39 +722,39 @@ WindowHelper.prototype = { } }, - checkAllCheckboxes: function() { + checkAllCheckboxes() { this._checkAllCheckboxesCustom(true); }, - uncheckAllCheckboxes: function() { + uncheckAllCheckboxes() { this._checkAllCheckboxesCustom(false); }, /** * @return The details progressive disclosure button */ - getDetailsButton: function() { + getDetailsButton() { return this.win.document.getElementById("detailsExpander"); }, /** * @return The dialog's duration dropdown */ - getDurationDropdown: function() { + getDurationDropdown() { return this.win.document.getElementById("sanitizeDurationChoice"); }, /** * @return The item list hidden by the details progressive disclosure button */ - getItemList: function() { + getItemList() { return this.win.document.getElementById("itemList"); }, /** * @return The clear-everything warning box */ - getWarningPanel: function() { + getWarningPanel() { return this.win.document.getElementById("sanitizeEverythingWarningBox"); }, @@ -762,7 +762,7 @@ WindowHelper.prototype = { * @return True if the "Everything" warning panel is visible (as opposed to * the tree) */ - isWarningPanelVisible: function() { + isWarningPanelVisible() { return !this.getWarningPanel().hidden; }, @@ -774,7 +774,7 @@ WindowHelper.prototype = { * caller is expected to call waitForAsyncUpdates at some point; if false is * returned, waitForAsyncUpdates is called automatically. */ - open: function() { + open() { let wh = this; function windowObserver(aSubject, aTopic, aData) { @@ -835,7 +835,7 @@ WindowHelper.prototype = { * @param aDurVal * One of the Sanitizer.TIMESPAN_* values */ - selectDuration: function(aDurVal) { + selectDuration(aDurVal) { this.getDurationDropdown().value = aDurVal; if (aDurVal === Sanitizer.TIMESPAN_EVERYTHING) { is(this.isWarningPanelVisible(), true, @@ -850,7 +850,7 @@ WindowHelper.prototype = { /** * Toggles the details progressive disclosure button. */ - toggleDetails: function() { + toggleDetails() { this.getDetailsButton().click(); } }; @@ -898,11 +898,11 @@ function promiseAddFormEntryWithMinutesAgo(aMinutesAgo) { return new Promise((resolve, reject) => FormHistory.update({ op: "add", fieldname: name, value: "dummy", firstUsed: timestamp }, - { handleError: function(error) { + { handleError(error) { reject(); throw new Error("Error occurred updating form history: " + error); }, - handleCompletion: function(reason) { + handleCompletion(reason) { resolve(name); } }) @@ -918,11 +918,11 @@ function formNameExists(name) let count = 0; FormHistory.count({ fieldname: name }, { handleResult: result => count = result, - handleError: function(error) { + handleError(error) { reject(error); throw new Error("Error occurred searching form history: " + error); }, - handleCompletion: function(reason) { + handleCompletion(reason) { if (!reason) { resolve(count); } diff --git a/browser/base/content/test/general/browser_save_link_when_window_navigates.js b/browser/base/content/test/general/browser_save_link_when_window_navigates.js index 2da54eb92351..103985ac9f6f 100644 --- a/browser/base/content/test/general/browser_save_link_when_window_navigates.js +++ b/browser/base/content/test/general/browser_save_link_when_window_navigates.js @@ -90,13 +90,13 @@ function triggerSave(aWindow, aCallback) { var windowObserver = { - setCallback: function(aCallback) { + setCallback(aCallback) { if (this._callback) { ok(false, "Should only be dealing with one callback at a time."); } this._callback = aCallback; }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (aTopic != "domwindowopened") { return; } diff --git a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js index 92fb7bd0392f..6da92c10e478 100644 --- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js +++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js @@ -15,17 +15,17 @@ function createTemporarySaveDirectory() { function promiseNoCacheEntry(filename) { return new Promise((resolve, reject) => { Visitor.prototype = { - onCacheStorageInfo: function(num, consumption) + onCacheStorageInfo(num, consumption) { info("disk storage contains " + num + " entries"); }, - onCacheEntryInfo: function(uri) + onCacheEntryInfo(uri) { let urispec = uri.asciiSpec; info(urispec); is(urispec.includes(filename), false, "web content present in disk cache"); }, - onCacheEntryVisitCompleted: function() + onCacheEntryVisitCompleted() { resolve(); } diff --git a/browser/base/content/test/general/browser_selectpopup.js b/browser/base/content/test/general/browser_selectpopup.js index 4d816e5f3b4e..5b517a6f2d9d 100644 --- a/browser/base/content/test/general/browser_selectpopup.js +++ b/browser/base/content/test/general/browser_selectpopup.js @@ -301,6 +301,7 @@ add_task(function*() { }); elem.style = contentStep[1]; + elem.getBoundingClientRect(); }); }); @@ -463,6 +464,7 @@ function* performLargePopupTests(win) yield ContentTask.spawn(browser, position, function*(contentPosition) { let select = content.document.getElementById("one"); select.setAttribute("style", contentPosition); + select.getBoundingClientRect(); }); yield contentPainted; } diff --git a/browser/base/content/test/general/browser_tabfocus.js b/browser/base/content/test/general/browser_tabfocus.js index 96b6b315388b..42552caa5ae4 100644 --- a/browser/base/content/test/general/browser_tabfocus.js +++ b/browser/base/content/test/general/browser_tabfocus.js @@ -53,7 +53,7 @@ function* getFocusedElementForBrowser(browser, dontCheckExtraFocus = false) // additional focus related properties. This is needed as both URLs are // loaded using the same child process and share focus managers. browser.messageManager.sendAsyncMessage("Browser:GetFocusedElement", - { dontCheckExtraFocus : dontCheckExtraFocus }); + { dontCheckExtraFocus }); }); } var focusedWindow = {}; @@ -113,7 +113,7 @@ function focusInChild() } } - sendSyncMessage("Browser:GetCurrentFocus", { details : details }); + sendSyncMessage("Browser:GetCurrentFocus", { details }); }); } @@ -122,7 +122,7 @@ function focusElementInChild(elementid, type) let browser = (elementid.indexOf("1") >= 0) ? browser1 : browser2; if (gMultiProcessBrowser) { browser.messageManager.sendAsyncMessage("Browser:ChangeFocus", - { id: elementid, type: type }); + { id: elementid, type }); } else { browser.contentDocument.getElementById(elementid)[type](); diff --git a/browser/base/content/test/general/browser_tabopen_reflows.js b/browser/base/content/test/general/browser_tabopen_reflows.js index 4eb6c77ab1ab..eed2eecb1417 100644 --- a/browser/base/content/test/general/browser_tabopen_reflows.js +++ b/browser/base/content/test/general/browser_tabopen_reflows.js @@ -113,7 +113,7 @@ add_task(function*() { }); var observer = { - reflow: function(start, end) { + reflow(start, end) { // Gather information about the current code path. let path = (new Error().stack).split("\n").slice(1).map(line => { return line.replace(/:\d+:\d+$/, ""); @@ -136,7 +136,7 @@ var observer = { ok(false, "unexpected uninterruptible reflow '" + pathWithLineNumbers + "'"); }, - reflowInterruptible: function(start, end) { + reflowInterruptible(start, end) { // We're not interested in interruptible reflows. }, diff --git a/browser/base/content/test/general/browser_trackingUI_4.js b/browser/base/content/test/general/browser_trackingUI_4.js index 234b790acb44..ba0478f7f852 100644 --- a/browser/base/content/test/general/browser_trackingUI_4.js +++ b/browser/base/content/test/general/browser_trackingUI_4.js @@ -28,7 +28,7 @@ function waitForSecurityChange(numChanges = 1) { return new Promise(resolve => { let n = 0; let listener = { - onSecurityChange: function() { + onSecurityChange() { n = n + 1; info("Received onSecurityChange event " + n + " of " + numChanges); if (n >= numChanges) { diff --git a/browser/base/content/test/general/browser_trackingUI_6.js b/browser/base/content/test/general/browser_trackingUI_6.js index be47263ba3c1..33a337231f1e 100644 --- a/browser/base/content/test/general/browser_trackingUI_6.js +++ b/browser/base/content/test/general/browser_trackingUI_6.js @@ -4,7 +4,7 @@ function waitForSecurityChange(numChanges = 1) { return new Promise(resolve => { let n = 0; let listener = { - onSecurityChange: function() { + onSecurityChange() { n = n + 1; info("Received onSecurityChange event " + n + " of " + numChanges); if (n >= numChanges) { diff --git a/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js b/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js index eedc7116b30c..2afedba0dac9 100644 --- a/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js +++ b/browser/base/content/test/general/browser_viewSourceInTabOnViewSource.js @@ -1,7 +1,7 @@ function wait_while_tab_is_busy() { return new Promise(resolve => { let progressListener = { - onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) { if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) { gBrowser.removeProgressListener(this); setTimeout(resolve, 0); diff --git a/browser/base/content/test/general/browser_web_channel.js b/browser/base/content/test/general/browser_web_channel.js index f1bcd4711bd7..ab7eaaf21f8d 100644 --- a/browser/base/content/test/general/browser_web_channel.js +++ b/browser/base/content/test/general/browser_web_channel.js @@ -20,7 +20,7 @@ const HTTP_REDIRECTED_IFRAME_PATH = "http://example.org"; var gTests = [ { desc: "WebChannel generic message", - run: function* () { + *run() { return new Promise(function(resolve, reject) { let tab; let channel = new WebChannel("generic", Services.io.newURI(HTTP_PATH, null, null)); @@ -38,7 +38,7 @@ var gTests = [ }, { desc: "WebChannel generic message in a private window.", - run: function* () { + *run() { let promiseTestDone = new Promise(function(resolve, reject) { let channel = new WebChannel("generic", Services.io.newURI(HTTP_PATH, null, null)); channel.listen(function(id, message, target) { @@ -58,7 +58,7 @@ var gTests = [ }, { desc: "WebChannel two way communication", - run: function* () { + *run() { return new Promise(function(resolve, reject) { let tab; let channel = new WebChannel("twoway", Services.io.newURI(HTTP_PATH, null, null)); @@ -85,7 +85,7 @@ var gTests = [ }, { desc: "WebChannel two way communication in an iframe", - run: function* () { + *run() { let parentChannel = new WebChannel("echo", Services.io.newURI(HTTP_PATH, null, null)); let iframeChannel = new WebChannel("twoway", Services.io.newURI(HTTP_IFRAME_PATH, null, null)); let promiseTestDone = new Promise(function(resolve, reject) { @@ -108,7 +108,7 @@ var gTests = [ }); }); yield BrowserTestUtils.withNewTab({ - gBrowser: gBrowser, + gBrowser, url: HTTP_PATH + HTTP_ENDPOINT + "?iframe" }, function* () { yield promiseTestDone; @@ -119,7 +119,7 @@ var gTests = [ }, { desc: "WebChannel response to a redirected iframe", - run: function* () { + *run() { /** * This test checks that WebChannel responses are only sent * to an iframe if the iframe has not redirected to another origin. @@ -172,7 +172,7 @@ var gTests = [ }); yield BrowserTestUtils.withNewTab({ - gBrowser: gBrowser, + gBrowser, url: HTTP_PATH + HTTP_ENDPOINT + "?iframe_pre_redirect" }, function* () { yield promiseTestDone; @@ -183,7 +183,7 @@ var gTests = [ }, { desc: "WebChannel multichannel", - run: function* () { + *run() { return new Promise(function(resolve, reject) { let tab; let channel = new WebChannel("multichannel", Services.io.newURI(HTTP_PATH, null, null)); @@ -200,7 +200,7 @@ var gTests = [ }, { desc: "WebChannel unsolicited send, using system principal", - run: function* () { + *run() { let channel = new WebChannel("echo", Services.io.newURI(HTTP_PATH, null, null)); // an unsolicted message is sent from Chrome->Content which is then @@ -230,7 +230,7 @@ var gTests = [ }, { desc: "WebChannel unsolicited send, using target origin's principal", - run: function* () { + *run() { let targetURI = Services.io.newURI(HTTP_PATH, null, null); let channel = new WebChannel("echo", targetURI); @@ -263,7 +263,7 @@ var gTests = [ }, { desc: "WebChannel unsolicited send with principal mismatch", - run: function* () { + *run() { let targetURI = Services.io.newURI(HTTP_PATH, null, null); let channel = new WebChannel("echo", targetURI); @@ -284,7 +284,7 @@ var gTests = [ }); yield BrowserTestUtils.withNewTab({ - gBrowser: gBrowser, + gBrowser, url: HTTP_PATH + HTTP_ENDPOINT + "?unsolicited" }, function* (targetBrowser) { @@ -314,7 +314,7 @@ var gTests = [ }, { desc: "WebChannel non-window target", - run: function* () { + *run() { /** * This test ensures messages can be received from and responses * sent to non-window elements. @@ -350,7 +350,7 @@ var gTests = [ }, { desc: "WebChannel disallows non-string message from non-whitelisted origin", - run: function* () { + *run() { /** * This test ensures that non-string messages can't be sent via WebChannels. * We create a page (on a non-whitelisted origin) which should send us two @@ -377,7 +377,7 @@ var gTests = [ }, { desc: "WebChannel allows both string and non-string message from whitelisted origin", - run: function* () { + *run() { /** * Same process as above, but we whitelist the origin before loading the page, * and expect to get *both* messages back (each exactly once). @@ -419,7 +419,7 @@ var gTests = [ }, { desc: "WebChannel errors handling the message are delivered back to content", - run: function* () { + *run() { const ERRNO_UNKNOWN_ERROR = 999; // WebChannel.jsm doesn't export this. // The channel where we purposely fail responding to a command. @@ -455,7 +455,7 @@ var gTests = [ }, { desc: "WebChannel errors due to an invalid channel are delivered back to content", - run: function* () { + *run() { const ERRNO_NO_SUCH_CHANNEL = 2; // WebChannel.jsm doesn't export this. // The channel where we see the response when the content sees the error let echoChannel = new WebChannel("echo", Services.io.newURI(HTTP_PATH, null, null)); diff --git a/browser/base/content/test/general/browser_windowactivation.js b/browser/base/content/test/general/browser_windowactivation.js index cac9e8866d6c..4759bb68b80c 100644 --- a/browser/base/content/test/general/browser_windowactivation.js +++ b/browser/base/content/test/general/browser_windowactivation.js @@ -109,8 +109,8 @@ function reallyRunTests() { function sendGetBackgroundRequest(ifChanged) { - browser1.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged: ifChanged }); - browser2.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged: ifChanged }); + browser1.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged }); + browser2.messageManager.sendAsyncMessage("Test:GetBackgroundColor", { ifChanged }); } function runOtherWindowTests() { @@ -177,7 +177,7 @@ function childFunction() if (oldColor != color || !ifChanged) { expectingResponse = false; oldColor = color; - sendAsyncMessage("Test:BackgroundColorChanged", { color: color }); + sendAsyncMessage("Test:BackgroundColorChanged", { color }); } }, 20); } diff --git a/browser/base/content/test/general/browser_windowopen_reflows.js b/browser/base/content/test/general/browser_windowopen_reflows.js index 8d82b715a5d4..c5b3d15f3065 100644 --- a/browser/base/content/test/general/browser_windowopen_reflows.js +++ b/browser/base/content/test/general/browser_windowopen_reflows.js @@ -73,7 +73,7 @@ function test() { } var observer = { - reflow: function(start, end) { + reflow(start, end) { // Gather information about the current code path. let stack = new Error().stack; let path = stack.split("\n").slice(1).map(line => { @@ -99,7 +99,7 @@ var observer = { ok(false, "unexpected uninterruptible reflow '" + pathWithLineNumbers + "'"); }, - reflowInterruptible: function(start, end) { + reflowInterruptible(start, end) { // We're not interested in interruptible reflows. }, diff --git a/browser/base/content/test/general/contentSearchUI.js b/browser/base/content/test/general/contentSearchUI.js index bbb9a2d85b87..87851f65c4e3 100644 --- a/browser/base/content/test/general/contentSearchUI.js +++ b/browser/base/content/test/general/contentSearchUI.js @@ -15,7 +15,7 @@ addMessageListener(TEST_MSG, msg => { var messageHandlers = { - init: function() { + init() { Services.search.currentEngine = Services.search.getEngineByName(ENGINE_NAME); let input = content.document.querySelector("input"); gController = @@ -29,19 +29,19 @@ var messageHandlers = { }); }, - key: function(arg) { + key(arg) { let keyName = typeof(arg) == "string" ? arg : arg.key; content.synthesizeKey(keyName, arg.modifiers || {}); let wait = arg.waitForSuggestions ? waitForSuggestions : cb => cb(); wait(ack.bind(null, "key")); }, - startComposition: function(arg) { + startComposition(arg) { content.synthesizeComposition({ type: "compositionstart", data: "" }); ack("startComposition"); }, - changeComposition: function(arg) { + changeComposition(arg) { let data = typeof(arg) == "string" ? arg : arg.data; content.synthesizeCompositionChange({ composition: { @@ -56,31 +56,31 @@ var messageHandlers = { wait(ack.bind(null, "changeComposition")); }, - commitComposition: function() { + commitComposition() { content.synthesizeComposition({ type: "compositioncommitasis" }); ack("commitComposition"); }, - focus: function() { + focus() { gController.input.focus(); ack("focus"); }, - blur: function() { + blur() { gController.input.blur(); ack("blur"); }, - waitForSearch: function() { + waitForSearch() { waitForContentSearchEvent("Search", aData => ack("waitForSearch", aData)); }, - waitForSearchSettings: function() { + waitForSearchSettings() { waitForContentSearchEvent("ManageEngines", aData => ack("waitForSearchSettings", aData)); }, - mousemove: function(itemIndex) { + mousemove(itemIndex) { let row; if (itemIndex == -1) { row = gController._table.firstChild; @@ -102,7 +102,7 @@ var messageHandlers = { content.synthesizeMouseAtCenter(row, event); }, - click: function(arg) { + click(arg) { let eltIdx = typeof(arg) == "object" ? arg.eltIdx : arg; let row; if (eltIdx == -1) { @@ -121,12 +121,12 @@ var messageHandlers = { ack("click"); }, - addInputValueToFormHistory: function() { + addInputValueToFormHistory() { gController.addInputValueToFormHistory(); ack("addInputValueToFormHistory"); }, - addDuplicateOneOff: function() { + addDuplicateOneOff() { let btn = gController._oneOffButtons[gController._oneOffButtons.length - 1]; let newBtn = btn.cloneNode(true); btn.parentNode.appendChild(newBtn); @@ -134,12 +134,12 @@ var messageHandlers = { ack("addDuplicateOneOff"); }, - removeLastOneOff: function() { + removeLastOneOff() { gController._oneOffButtons.pop().remove(); ack("removeLastOneOff"); }, - reset: function() { + reset() { // Reset both the input and suggestions by select all + delete. If there was // no text entered, this won't have any effect, so also escape to ensure the // suggestions table is closed. diff --git a/browser/base/content/test/general/head.js b/browser/base/content/test/general/head.js index 7becbbf91ceb..3bdd3f6fb710 100644 --- a/browser/base/content/test/general/head.js +++ b/browser/base/content/test/general/head.js @@ -307,9 +307,9 @@ function waitForAsyncUpdates(aCallback, aScope, aArguments) { let commit = db.createAsyncStatement("COMMIT"); commit.executeAsync({ - handleResult: function() {}, - handleError: function() {}, - handleCompletion: function(aReason) { + handleResult() {}, + handleError() {}, + handleCompletion(aReason) { aCallback.apply(scope, args); } }); @@ -418,7 +418,7 @@ function waitForDocLoadAndStopIt(aExpectedURL, aBrowser = gBrowser.selectedBrows } let progressListener = { - onStateChange: function(webProgress, req, flags, status) { + onStateChange(webProgress, req, flags, status) { dump("waitForDocLoadAndStopIt: onStateChange " + flags.toString(16) + ": " + req.name + "\n"); if (webProgress.isTopLevel && @@ -470,7 +470,7 @@ function waitForDocLoadAndStopIt(aExpectedURL, aBrowser = gBrowser.selectedBrows function waitForDocLoadComplete(aBrowser = gBrowser) { return new Promise(resolve => { let listener = { - onStateChange: function(webProgress, req, flags, status) { + onStateChange(webProgress, req, flags, status) { let docStop = Ci.nsIWebProgressListener.STATE_IS_NETWORK | Ci.nsIWebProgressListener.STATE_STOP; info("Saw state " + flags.toString(16) + " and status " + status.toString(16)); @@ -918,12 +918,12 @@ function promiseNewSearchEngine(basename) { info("Waiting for engine to be added: " + basename); let url = getRootDirectory(gTestPath) + basename; Services.search.addEngine(url, null, "", false, { - onSuccess: function(engine) { + onSuccess(engine) { info("Search engine added: " + basename); registerCleanupFunction(() => Services.search.removeEngine(engine)); resolve(engine); }, - onError: function(errCode) { + onError(errCode) { Assert.ok(false, "addEngine failed with error code " + errCode); reject(); }, @@ -966,7 +966,7 @@ function isSecurityState(expectedState) { function promiseOnBookmarkItemAdded(aExpectedURI) { return new Promise((resolve, reject) => { let bookmarksObserver = { - onItemAdded: function(aItemId, aFolderId, aIndex, aItemType, aURI) { + onItemAdded(aItemId, aFolderId, aIndex, aItemType, aURI) { info("Added a bookmark to " + aURI.spec); PlacesUtils.bookmarks.removeObserver(bookmarksObserver); if (aURI.equals(aExpectedURI)) { @@ -976,12 +976,12 @@ function promiseOnBookmarkItemAdded(aExpectedURI) { reject(new Error("Added an unexpected bookmark")); } }, - onBeginUpdateBatch: function() {}, - onEndUpdateBatch: function() {}, - onItemRemoved: function() {}, - onItemChanged: function() {}, - onItemVisited: function() {}, - onItemMoved: function() {}, + onBeginUpdateBatch() {}, + onEndUpdateBatch() {}, + onItemRemoved() {}, + onItemChanged() {}, + onItemVisited() {}, + onItemMoved() {}, QueryInterface: XPCOMUtils.generateQI([ Ci.nsINavBookmarkObserver, ]) @@ -1006,7 +1006,7 @@ function* loadBadCertPage(url) { // When the certificate exception dialog has opened, click the button to add // an exception. let certExceptionDialogObserver = { - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (aTopic == "cert-exception-ui-ready") { Services.obs.removeObserver(this, "cert-exception-ui-ready"); let certExceptionDialog = getCertExceptionDialog(EXCEPTION_DIALOG_URI); @@ -1073,7 +1073,7 @@ function setupRemoteClientsFixture(fixture) { Object.getOwnPropertyDescriptor(gFxAccounts, "remoteClients").get; Object.defineProperty(gFxAccounts, "remoteClients", { - get: function() { return fixture; } + get() { return fixture; } }); return oldRemoteClientsGetter; } diff --git a/browser/base/content/test/general/offlineByDefault.js b/browser/base/content/test/general/offlineByDefault.js index 72f7e52a01bc..fe6418f84f25 100644 --- a/browser/base/content/test/general/offlineByDefault.js +++ b/browser/base/content/test/general/offlineByDefault.js @@ -1,7 +1,7 @@ var offlineByDefault = { defaultValue: false, prefBranch: SpecialPowers.Cc["@mozilla.org/preferences-service;1"].getService(SpecialPowers.Ci.nsIPrefBranch), - set: function(allow) { + set(allow) { try { this.defaultValue = this.prefBranch.getBoolPref("offline-apps.allow_by_default"); } catch (e) { @@ -9,7 +9,7 @@ var offlineByDefault = { } this.prefBranch.setBoolPref("offline-apps.allow_by_default", allow); }, - reset: function() { + reset() { this.prefBranch.setBoolPref("offline-apps.allow_by_default", this.defaultValue); } } diff --git a/browser/base/content/test/general/parsingTestHelpers.jsm b/browser/base/content/test/general/parsingTestHelpers.jsm index 69c764483ec8..fc8b620300a9 100644 --- a/browser/base/content/test/general/parsingTestHelpers.jsm +++ b/browser/base/content/test/general/parsingTestHelpers.jsm @@ -86,7 +86,7 @@ function iterateOverPath(path, extensions) { try { // Iterate through the directory yield iterator.forEach(pathEntryIterator); - resolve({files: files, subdirs: subdirs}); + resolve({files, subdirs}); } catch (ex) { reject(ex); } finally { diff --git a/browser/base/content/test/newtab/browser_newtab_bug722273.js b/browser/base/content/test/newtab/browser_newtab_bug722273.js index 9a61a09f6491..1a6c9a401756 100644 --- a/browser/base/content/test/newtab/browser_newtab_bug722273.js +++ b/browser/base/content/test/newtab/browser_newtab_bug722273.js @@ -38,13 +38,13 @@ function promiseAddFakeVisits() { let place = { uri: makeURI(URL), title: "fake site", - visits: visits + visits }; return new Promise((resolve, reject) => { PlacesUtils.asyncHistory.updatePlaces(place, { handleError: () => reject(new Error("Couldn't add visit")), - handleResult: function() {}, - handleCompletion: function() { + handleResult() {}, + handleCompletion() { NewTabUtils.links.populateCache(function() { NewTabUtils.allPages.update(); resolve(); diff --git a/browser/base/content/test/newtab/browser_newtab_bug725996.js b/browser/base/content/test/newtab/browser_newtab_bug725996.js index e0de809c8f86..253ef4bddc08 100644 --- a/browser/base/content/test/newtab/browser_newtab_bug725996.js +++ b/browser/base/content/test/newtab/browser_newtab_bug725996.js @@ -9,7 +9,7 @@ add_task(function* () { yield* checkGrid("0,1,2,3,4,5,6,7,8"); function doDrop(data) { - return ContentTask.spawn(gBrowser.selectedBrowser, { data: data }, function*(args) { + return ContentTask.spawn(gBrowser.selectedBrowser, { data }, function*(args) { let dataTransfer = new content.DataTransfer("dragstart", false); dataTransfer.mozSetDataAt("text/x-moz-url", args.data, 0); let event = content.document.createEvent("DragEvent"); diff --git a/browser/base/content/test/newtab/browser_newtab_bug991210.js b/browser/base/content/test/newtab/browser_newtab_bug991210.js index f51360563964..6e0d0fe73c12 100644 --- a/browser/base/content/test/newtab/browser_newtab_bug991210.js +++ b/browser/base/content/test/newtab/browser_newtab_bug991210.js @@ -7,10 +7,10 @@ add_task(function* () { // add a test provider that waits for load let afterLoadProvider = { - getLinks: function(callback) { + getLinks(callback) { this.callback = callback; }, - addObserver: function() {}, + addObserver() {}, }; NewTabUtils.links.addProvider(afterLoadProvider); diff --git a/browser/base/content/test/newtab/browser_newtab_drag_drop.js b/browser/base/content/test/newtab/browser_newtab_drag_drop.js index da9d89de7459..bb38b8e82be3 100644 --- a/browser/base/content/test/newtab/browser_newtab_drag_drop.js +++ b/browser/base/content/test/newtab/browser_newtab_drag_drop.js @@ -76,7 +76,7 @@ add_task(function* () { function doDragEvent(sourceIndex, dropIndex) { return ContentTask.spawn(gBrowser.selectedBrowser, - { sourceIndex: sourceIndex, dropIndex: dropIndex }, function*(args) { + { sourceIndex, dropIndex }, function*(args) { let dataTransfer = new content.DataTransfer("dragstart", false); let event = content.document.createEvent("DragEvent"); event.initDragEvent("dragstart", true, true, content, 0, 0, 0, 0, 0, diff --git a/browser/base/content/test/newtab/browser_newtab_search.js b/browser/base/content/test/newtab/browser_newtab_search.js index 17f98bb71e3c..06339b52bed6 100644 --- a/browser/base/content/test/newtab/browser_newtab_search.js +++ b/browser/base/content/test/newtab/browser_newtab_search.js @@ -211,12 +211,12 @@ function promiseNewSearchEngine({name: basename, numLogos}) { let addEnginePromise = new Promise((resolve, reject) => { let url = getRootDirectory(gTestPath) + basename; Services.search.addEngine(url, null, "", false, { - onSuccess: function(engine) { + onSuccess(engine) { info("Search engine added: " + basename); gNewEngines.push(engine); resolve(engine); }, - onError: function(errCode) { + onError(errCode) { ok(false, "addEngine failed with error code " + errCode); reject(); }, diff --git a/browser/base/content/test/newtab/head.js b/browser/base/content/test/newtab/head.js index ab72161c5362..0c0ff02c1a0b 100644 --- a/browser/base/content/test/newtab/head.js +++ b/browser/base/content/test/newtab/head.js @@ -220,8 +220,8 @@ function fillHistory(aLinks) { PlacesUtils.asyncHistory.updatePlaces(place, { handleError: () => ok(false, "couldn't add visit to history"), - handleResult: function() {}, - handleCompletion: function() { + handleResult() {}, + handleCompletion() { if (--numLinks == 0) { resolve(); } diff --git a/browser/base/content/test/plugins/blocklist_proxy.js b/browser/base/content/test/plugins/blocklist_proxy.js index d0aa0e8e48e6..4eb281e03f13 100644 --- a/browser/base/content/test/plugins/blocklist_proxy.js +++ b/browser/base/content/test/plugins/blocklist_proxy.js @@ -19,7 +19,7 @@ var BlocklistProxy = { Ci.nsIBlocklistService, Ci.nsITimerCallback]), - init: function() { + init() { if (!this._uuid) { this._uuid = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator) @@ -30,7 +30,7 @@ var BlocklistProxy = { } }, - uninit: function() { + uninit() { if (this._uuid) { Cm.nsIComponentRegistrar.unregisterFactory(this._uuid, this); Cm.nsIComponentRegistrar.registerFactory(Components.ID(kBlocklistServiceUUID), @@ -41,33 +41,33 @@ var BlocklistProxy = { } }, - notify: function(aTimer) { + notify(aTimer) { }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { }, - isAddonBlocklisted: function(aAddon, aAppVersion, aToolkitVersion) { + isAddonBlocklisted(aAddon, aAppVersion, aToolkitVersion) { return false; }, - getAddonBlocklistState: function(aAddon, aAppVersion, aToolkitVersion) { + getAddonBlocklistState(aAddon, aAppVersion, aToolkitVersion) { return 0; // STATE_NOT_BLOCKED }, - getPluginBlocklistState: function(aPluginTag, aAppVersion, aToolkitVersion) { + getPluginBlocklistState(aPluginTag, aAppVersion, aToolkitVersion) { return 0; // STATE_NOT_BLOCKED }, - getAddonBlocklistURL: function(aAddon, aAppVersion, aToolkitVersion) { + getAddonBlocklistURL(aAddon, aAppVersion, aToolkitVersion) { return ""; }, - getPluginBlocklistURL: function(aPluginTag) { + getPluginBlocklistURL(aPluginTag) { return ""; }, - getPluginInfoURL: function(aPluginTag) { + getPluginInfoURL(aPluginTag) { return ""; }, } diff --git a/browser/base/content/test/plugins/browser_bug797677.js b/browser/base/content/test/plugins/browser_bug797677.js index f1bd15b7716f..dd972c91e623 100644 --- a/browser/base/content/test/plugins/browser_bug797677.js +++ b/browser/base/content/test/plugins/browser_bug797677.js @@ -22,7 +22,7 @@ add_task(function* () { let consoleService = Cc["@mozilla.org/consoleservice;1"] .getService(Ci.nsIConsoleService); let errorListener = { - observe: function(aMessage) { + observe(aMessage) { if (aMessage.message.includes("NS_ERROR_FAILURE")) gConsoleErrors++; } diff --git a/browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js b/browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js index c834b17215bc..31e741eb3205 100644 --- a/browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js +++ b/browser/base/content/test/plugins/browser_pluginCrashReportNonDeterminism.js @@ -68,7 +68,7 @@ function preparePlugin(browser, pluginFallbackState) { // Somehow, I'm able to get away with overriding the getter for // this XPCOM object. Probably because I've got chrome privledges. Object.defineProperty(plugin, "pluginFallbackType", { - get: function() { + get() { return contentPluginFallbackState; } }); @@ -162,7 +162,7 @@ add_task(function* testChromeHearsPluginCrashFirst() { // actually crashing the plugin again. We hack around this by overriding // the pluginFallbackType again. Object.defineProperty(plugin, "pluginFallbackType", { - get: function() { + get() { return Ci.nsIObjectLoadingContent.PLUGIN_CRASHED; }, }); diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification.js b/browser/base/content/test/popupNotifications/browser_popupNotification.js index 860179d68463..044a58939f86 100644 --- a/browser/base/content/test/popupNotifications/browser_popupNotification.js +++ b/browser/base/content/test/popupNotifications/browser_popupNotification.js @@ -17,37 +17,37 @@ function test() { var tests = [ { id: "Test#1", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); triggerMainCommand(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.notifyObj.mainActionClicked, "mainAction was clicked"); ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered"); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); } }, { id: "Test#2", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); triggerSecondaryCommand(popup, 0); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.notifyObj.secondaryActionClicked, "secondaryAction was clicked"); ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered"); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); } }, { id: "Test#2b", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.secondaryActions.push({ label: "Extra Secondary Action", @@ -56,18 +56,18 @@ var tests = [ }); showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); triggerSecondaryCommand(popup, 1); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.extraSecondaryActionClicked, "extra secondary action was clicked"); ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered"); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); } }, { id: "Test#2c", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.secondaryActions.push({ label: "Extra Secondary Action", @@ -80,26 +80,26 @@ var tests = [ }); showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); triggerSecondaryCommand(popup, 2); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.extraSecondaryActionClicked, "extra secondary action was clicked"); ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered"); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); } }, { id: "Test#3", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered"); this.notification.remove(); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); @@ -108,7 +108,7 @@ var tests = [ // test opening a notification for a background browser // Note: test 4 to 6 share a tab. { id: "Test#4", - run: function* () { + *run() { let tab = gBrowser.addTab("http://example.com/"); yield BrowserTestUtils.browserLoaded(tab.linkedBrowser); isnot(gBrowser.selectedTab, tab, "new tab isn't selected"); @@ -125,18 +125,18 @@ var tests = [ }, // now select that browser and test to see that the notification appeared { id: "Test#5", - run: function() { + run() { this.oldSelectedTab = gBrowser.selectedTab; gBrowser.selectedTab = gBrowser.tabs[gBrowser.tabs.length - 1]; }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, wrongBrowserNotificationObject); is(PopupNotifications.isPanelOpen, true, "isPanelOpen getter doesn't lie"); // switch back to the old browser gBrowser.selectedTab = this.oldSelectedTab; }, - onHidden: function(popup) { + onHidden(popup) { // actually remove the notification to prevent it from reappearing ok(wrongBrowserNotificationObject.dismissalCallbackTriggered, "dismissal callback triggered due to tab switch"); wrongBrowserNotification.remove(); @@ -146,7 +146,7 @@ var tests = [ }, // test that the removed notification isn't shown on browser re-select { id: "Test#6", - run: function* () { + *run() { let promiseTopic = promiseTopicObserved("PopupNotifications-updateNotShowing"); gBrowser.selectedTab = gBrowser.tabs[gBrowser.tabs.length - 1]; yield promiseTopic; @@ -158,24 +158,24 @@ var tests = [ // Test that two notifications with the same ID result in a single displayed // notification. { id: "Test#7", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); // Show the same notification twice this.notification1 = showNotification(this.notifyObj); this.notification2 = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); this.notification2.remove(); }, - onHidden: function(popup) { + onHidden(popup) { ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered"); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); } }, // Test that two notifications with different IDs are displayed { id: "Test#8", - run: function() { + run() { this.testNotif1 = new BasicNotification(this.id); this.testNotif1.message += " 1"; showNotification(this.testNotif1); @@ -184,7 +184,7 @@ var tests = [ this.testNotif2.id += "-2"; showNotification(this.testNotif2); }, - onShown: function(popup) { + onShown(popup) { is(popup.childNodes.length, 2, "two notifications are shown"); // Trigger the main command for the first notification, and the secondary // for the second. Need to do mainCommand first since the secondaryCommand @@ -193,7 +193,7 @@ var tests = [ is(popup.childNodes.length, 1, "only one notification left"); triggerSecondaryCommand(popup, 0); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.testNotif1.mainActionClicked, "main action #1 was clicked"); ok(!this.testNotif1.secondaryActionClicked, "secondary action #1 wasn't clicked"); ok(!this.testNotif1.dismissalCallbackTriggered, "dismissal callback #1 wasn't called"); @@ -206,16 +206,16 @@ var tests = [ // Test notification without mainAction or secondaryActions, it should fall back // to a default button that dismisses the notification in place of the main action. { id: "Test#9", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.mainAction = null; this.notifyObj.secondaryActions = null; this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { triggerMainCommand(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked"); ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered"); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); @@ -225,17 +225,17 @@ var tests = [ // to a default button that dismisses the notification in place of the main action // and ignore the passed secondaryActions. { id: "Test#10", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.mainAction = null; this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { let notification = popup.childNodes[0]; is(notification.getAttribute("secondarybuttonhidden"), "true", "secondary button is hidden"); triggerMainCommand(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked"); ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered"); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); @@ -243,7 +243,7 @@ var tests = [ }, // Test two notifications with different anchors { id: "Test#11", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.firstNotification = showNotification(this.notifyObj); this.notifyObj2 = new BasicNotification(this.id); @@ -252,14 +252,14 @@ var tests = [ // Second showNotification() overrides the first this.secondNotification = showNotification(this.notifyObj2); }, - onShown: function(popup) { + onShown(popup) { // This also checks that only one element is shown. checkPopup(popup, this.notifyObj2); is(document.getElementById("geo-notification-icon").boxObject.width, 0, "geo anchor shouldn't be visible"); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { // Remove the notifications this.firstNotification.remove(); this.secondNotification.remove(); diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_2.js b/browser/base/content/test/popupNotifications/browser_popupNotification_2.js index 4366d7ed7b37..21df05a55c3f 100644 --- a/browser/base/content/test/popupNotifications/browser_popupNotification_2.js +++ b/browser/base/content/test/popupNotifications/browser_popupNotification_2.js @@ -14,16 +14,16 @@ function test() { var tests = [ // Test optional params { id: "Test#1", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.secondaryActions = undefined; this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered"); this.notification.remove(); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); @@ -31,19 +31,19 @@ var tests = [ }, // Test that icons appear { id: "Test#2", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.id = "geolocation"; this.notifyObj.anchorID = "geo-notification-icon"; this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); isnot(document.getElementById("geo-notification-icon").boxObject.width, 0, "geo anchor should be visible"); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { let icon = document.getElementById("geo-notification-icon"); isnot(icon.boxObject.width, 0, "geo anchor should be visible after dismissal"); @@ -55,7 +55,7 @@ var tests = [ // Test that persistence allows the notification to persist across reloads { id: "Test#3", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); this.notifyObj = new BasicNotification(this.id); @@ -64,7 +64,7 @@ var tests = [ }); this.notification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { this.complete = false; yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/"); yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/"); @@ -72,7 +72,7 @@ var tests = [ this.complete = true; yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/"); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.complete, "Should only have hidden the notification after 3 page loads"); ok(this.notifyObj.removedCallbackTriggered, "removal callback triggered"); gBrowser.removeTab(gBrowser.selectedTab); @@ -81,7 +81,7 @@ var tests = [ }, // Test that a timeout allows the notification to persist across reloads { id: "Test#4", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); this.notifyObj = new BasicNotification(this.id); @@ -91,7 +91,7 @@ var tests = [ }); this.notification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { this.complete = false; yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/"); yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/"); @@ -100,7 +100,7 @@ var tests = [ this.complete = true; yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/"); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.complete, "Should only have hidden the notification after the timeout was passed"); this.notification.remove(); gBrowser.removeTab(gBrowser.selectedTab); @@ -110,7 +110,7 @@ var tests = [ // Test that setting persistWhileVisible allows a visible notification to // persist across location changes { id: "Test#5", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); this.notifyObj = new BasicNotification(this.id); @@ -119,7 +119,7 @@ var tests = [ }); this.notification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { this.complete = false; yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/"); @@ -128,7 +128,7 @@ var tests = [ this.complete = true; dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.complete, "Should only have hidden the notification after it was dismissed"); this.notification.remove(); gBrowser.removeTab(gBrowser.selectedTab); @@ -138,7 +138,7 @@ var tests = [ // Test that nested icon nodes correctly activate popups { id: "Test#6", - run: function() { + run() { // Add a temporary box as the anchor with a button this.box = document.createElement("box"); PopupNotifications.iconBox.appendChild(this.box); @@ -160,18 +160,18 @@ var tests = [ // amount. EventUtils.synthesizeMouse(button, 4, 4, {}); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { this.notification.remove(); this.box.parentNode.removeChild(this.box); } }, // Test that popupnotifications without popups have anchor icons shown { id: "Test#7", - run: function* () { + *run() { let notifyObj = new BasicNotification(this.id); notifyObj.anchorID = "geo-notification-icon"; notifyObj.addOptions({neverShow: true}); @@ -185,16 +185,16 @@ var tests = [ }, // Test notification close button { id: "Test#9", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); let notification = popup.childNodes[0]; EventUtils.synthesizeMouseAtCenter(notification.closebutton, {}); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered"); this.notification.remove(); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); @@ -202,17 +202,17 @@ var tests = [ }, // Test notification when chrome is hidden { id: "Test#10", - run: function() { + run() { window.locationbar.visible = false; this.notifyObj = new BasicNotification(this.id); this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); is(popup.anchorNode.className, "tabbrowser-tab", "notification anchored to tab"); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback triggered"); this.notification.remove(); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_3.js b/browser/base/content/test/popupNotifications/browser_popupNotification_3.js index 9476cc5e60ad..74a917afa9fb 100644 --- a/browser/base/content/test/popupNotifications/browser_popupNotification_3.js +++ b/browser/base/content/test/popupNotifications/browser_popupNotification_3.js @@ -14,25 +14,25 @@ function test() { var tests = [ // Test notification is removed when dismissed if removeOnDismissal is true { id: "Test#1", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.addOptions({ removeOnDismissal: true }); this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback wasn't triggered"); ok(this.notifyObj.removedCallbackTriggered, "removed callback triggered"); } }, // Test multiple notification icons are shown { id: "Test#2", - run: function() { + run() { this.notifyObj1 = new BasicNotification(this.id); this.notifyObj1.id += "_1"; this.notifyObj1.anchorID = "default-notification-icon"; @@ -43,7 +43,7 @@ var tests = [ this.notifyObj2.anchorID = "geo-notification-icon"; this.notification2 = showNotification(this.notifyObj2); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj2); // check notifyObj1 anchor icon is showing @@ -55,7 +55,7 @@ var tests = [ dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { this.notification1.remove(); ok(this.notifyObj1.removedCallbackTriggered, "removed callback triggered"); @@ -65,7 +65,7 @@ var tests = [ }, // Test that multiple notification icons are removed when switching tabs { id: "Test#3", - run: function* () { + *run() { // show the notification on old tab. this.notifyObjOld = new BasicNotification(this.id); this.notifyObjOld.anchorID = "default-notification-icon"; @@ -80,7 +80,7 @@ var tests = [ this.notifyObjNew.anchorID = "geo-notification-icon"; this.notificationNew = showNotification(this.notifyObjNew); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObjNew); // check notifyObjOld anchor icon is removed @@ -92,7 +92,7 @@ var tests = [ dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { this.notificationNew.remove(); gBrowser.removeTab(gBrowser.selectedTab); @@ -102,14 +102,14 @@ var tests = [ }, // test security delay - too early { id: "Test#4", - run: function() { + run() { // Set the security delay to 100s PopupNotifications.buttonDelay = 100000; this.notifyObj = new BasicNotification(this.id); showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); triggerMainCommand(popup); @@ -119,21 +119,21 @@ var tests = [ }); }, - onHidden: function(popup) { + onHidden(popup) { ok(!this.notifyObj.mainActionClicked, "mainAction was not clicked because it was too soon"); ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered"); } }, // test security delay - after delay { id: "Test#5", - run: function() { + run() { // Set the security delay to 10ms PopupNotifications.buttonDelay = 10; this.notifyObj = new BasicNotification(this.id); showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); // Wait until after the delay to trigger the main action @@ -142,7 +142,7 @@ var tests = [ }, 500); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.notifyObj.mainActionClicked, "mainAction was clicked after the delay"); ok(!this.notifyObj.dismissalCallbackTriggered, "dismissal callback was not triggered"); PopupNotifications.buttonDelay = PREF_SECURITY_DELAY_INITIAL; @@ -150,7 +150,7 @@ var tests = [ }, // reload removes notification { id: "Test#6", - run: function* () { + *run() { yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/"); let notifyObj = new BasicNotification(this.id); notifyObj.options.eventCallback = function(eventName) { @@ -167,7 +167,7 @@ var tests = [ }, // location change in background tab removes notification { id: "Test#7", - run: function* () { + *run() { let oldSelectedTab = gBrowser.selectedTab; let newTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); gBrowser.selectedTab = oldSelectedTab; @@ -192,7 +192,7 @@ var tests = [ }, // Popup notification anchor shouldn't disappear when a notification with the same ID is re-added in a background tab { id: "Test#8", - run: function* () { + *run() { yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.com/"); let originalTab = gBrowser.selectedTab; let bgTab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); @@ -227,7 +227,7 @@ var tests = [ }, // location change in an embedded frame should not remove a notification { id: "Test#9", - run: function* () { + *run() { yield promiseTabLoadEvent(gBrowser.selectedTab, "data:text/html;charset=utf8,"); this.notifyObj = new BasicNotification(this.id); this.notifyObj.options.eventCallback = function(eventName) { @@ -237,7 +237,7 @@ var tests = [ }; showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { let self = this; let progressListener = { onLocationChange: function onLocationChange() { @@ -259,11 +259,11 @@ var tests = [ content.document.getElementById("iframe") .setAttribute("src", "http://example.org/"); }, - onHidden: function() {} + onHidden() {} }, // Popup Notifications should catch exceptions from callbacks { id: "Test#10", - run: function() { + run() { this.testNotif1 = new BasicNotification(this.id); this.testNotif1.message += " 1"; this.notification1 = showNotification(this.testNotif1); @@ -285,11 +285,11 @@ var tests = [ }; this.notification2 = showNotification(this.testNotif2); }, - onShown: function(popup) { + onShown(popup) { is(popup.childNodes.length, 2, "two notifications are shown"); dismissNotification(popup); }, - onHidden: function() { + onHidden() { this.notification1.remove(); this.notification2.remove(); } diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_4.js b/browser/base/content/test/popupNotifications/browser_popupNotification_4.js index 466670cf1d33..4780d52afcb3 100644 --- a/browser/base/content/test/popupNotifications/browser_popupNotification_4.js +++ b/browser/base/content/test/popupNotifications/browser_popupNotification_4.js @@ -14,41 +14,41 @@ function test() { var tests = [ // Popup Notifications main actions should catch exceptions from callbacks { id: "Test#1", - run: function() { + run() { this.testNotif = new ErrorNotification(this.id); showNotification(this.testNotif); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.testNotif); triggerMainCommand(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.testNotif.mainActionClicked, "main action has been triggered"); } }, // Popup Notifications secondary actions should catch exceptions from callbacks { id: "Test#2", - run: function() { + run() { this.testNotif = new ErrorNotification(this.id); showNotification(this.testNotif); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.testNotif); triggerSecondaryCommand(popup, 0); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.testNotif.secondaryActionClicked, "secondary action has been triggered"); } }, // Existing popup notification shouldn't disappear when adding a dismissed notification { id: "Test#3", - run: function() { + run() { this.notifyObj1 = new BasicNotification(this.id); this.notifyObj1.id += "_1"; this.notifyObj1.anchorID = "default-notification-icon"; this.notification1 = showNotification(this.notifyObj1); }, - onShown: function(popup) { + onShown(popup) { // Now show a dismissed notification, and check that it doesn't clobber // the showing one. this.notifyObj2 = new BasicNotification(this.id); @@ -67,14 +67,14 @@ var tests = [ dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { this.notification1.remove(); this.notification2.remove(); } }, // Showing should be able to modify the popup data { id: "Test#4", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); let normalCallback = this.notifyObj.options.eventCallback; this.notifyObj.options.eventCallback = function(eventName) { @@ -85,18 +85,18 @@ var tests = [ }; showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { // checkPopup checks for the matching label. Note that this assumes that // this.notifyObj.mainAction is the same as notification.mainAction, // which could be a problem if we ever decided to deep-copy. checkPopup(popup, this.notifyObj); triggerMainCommand(popup); }, - onHidden: function() { } + onHidden() { } }, // Moving a tab to a new window should remove non-swappable notifications. { id: "Test#5", - run: function* () { + *run() { yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); let notifyObj = new BasicNotification(this.id); @@ -124,7 +124,7 @@ var tests = [ }, // Moving a tab to a new window should preserve swappable notifications. { id: "Test#6", - run: function* () { + *run() { yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); let notifyObj = new BasicNotification(this.id); let originalCallback = notifyObj.options.eventCallback; @@ -165,16 +165,16 @@ var tests = [ }, // the main action callback can keep the notification. { id: "Test#8", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.mainAction.dismiss = true; this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); triggerMainCommand(popup); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered"); ok(!this.notifyObj.removedCallbackTriggered, "removed callback wasn't triggered"); this.notification.remove(); @@ -182,16 +182,16 @@ var tests = [ }, // a secondary action callback can keep the notification. { id: "Test#9", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.secondaryActions[0].dismiss = true; this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); triggerSecondaryCommand(popup, 0); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.notifyObj.dismissalCallbackTriggered, "dismissal callback was triggered"); ok(!this.notifyObj.removedCallbackTriggered, "removed callback wasn't triggered"); this.notification.remove(); @@ -199,7 +199,7 @@ var tests = [ }, // returning true in the showing callback should dismiss the notification. { id: "Test#10", - run: function() { + run() { let notifyObj = new BasicNotification(this.id); let originalCallback = notifyObj.options.eventCallback; notifyObj.options.eventCallback = function(eventName) { diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_5.js b/browser/base/content/test/popupNotifications/browser_popupNotification_5.js index 99cb6b824447..83c0aebe6e02 100644 --- a/browser/base/content/test/popupNotifications/browser_popupNotification_5.js +++ b/browser/base/content/test/popupNotifications/browser_popupNotification_5.js @@ -16,11 +16,11 @@ var gNotification; var tests = [ // panel updates should fire the showing and shown callbacks again. { id: "Test#1", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); this.notifyObj.showingCallbackTriggered = false; @@ -35,11 +35,11 @@ var tests = [ this.notification.remove(); }, - onHidden: function() { } + onHidden() { } }, // A first dismissed notification shouldn't stop _update from showing a second notification { id: "Test#2", - run: function() { + run() { this.notifyObj1 = new BasicNotification(this.id); this.notifyObj1.id += "_1"; this.notifyObj1.anchorID = "default-notification-icon"; @@ -55,16 +55,16 @@ var tests = [ this.notification2.dismissed = false; PopupNotifications._update(); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj2); this.notification1.remove(); this.notification2.remove(); }, - onHidden: function(popup) { } + onHidden(popup) { } }, // The anchor icon should be shown for notifications in background windows. { id: "Test#3", - run: function* () { + *run() { let notifyObj = new BasicNotification(this.id); notifyObj.options.dismissed = true; @@ -84,7 +84,7 @@ var tests = [ // Test that persistent doesn't allow the notification to persist after // navigation. { id: "Test#4", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); this.notifyObj = new BasicNotification(this.id); @@ -93,7 +93,7 @@ var tests = [ }); this.notification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { this.complete = false; yield promiseTabLoadEvent(gBrowser.selectedTab, "http://example.org/"); @@ -105,7 +105,7 @@ var tests = [ this.complete = true; triggerSecondaryCommand(popup, 0); }, - onHidden: function(popup) { + onHidden(popup) { ok(!this.complete, "Should have hidden the notification after navigation"); this.notification.remove(); gBrowser.removeTab(gBrowser.selectedTab); @@ -115,7 +115,7 @@ var tests = [ // Test that persistent allows the notification to persist until explicitly // dismissed. { id: "Test#5", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); this.notifyObj = new BasicNotification(this.id); @@ -124,7 +124,7 @@ var tests = [ }); this.notification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { this.complete = false; // Notification should persist after attempt to dismiss by clicking on the @@ -136,7 +136,7 @@ var tests = [ this.complete = true; triggerSecondaryCommand(popup, 0); }, - onHidden: function(popup) { + onHidden(popup) { ok(this.complete, "Should have hidden the notification after clicking Not Now"); this.notification.remove(); gBrowser.removeTab(gBrowser.selectedTab); @@ -146,16 +146,16 @@ var tests = [ // Test that persistent panels are still open after switching to another tab // and back. { id: "Test#6a", - run: function* () { + *run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.options.persistent = true; gNotification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); }, - onHidden: function(popup) { + onHidden(popup) { ok(true, "Should have hidden the notification after tab switch"); gBrowser.removeTab(gBrowser.selectedTab); gBrowser.selectedTab = this.oldSelectedTab; @@ -164,7 +164,7 @@ var tests = [ // Second part of the previous test that compensates for the limitation in // runNextTest that expects a single onShown/onHidden invocation per test. { id: "Test#6b", - run: function* () { + *run() { let id = PopupNotifications.panel.firstChild.getAttribute("popupid"); ok(id.endsWith("Test#6a"), "Should have found the notification from Test6a"); ok(PopupNotifications.isPanelOpen, "Should have shown the popup again after getting back to the tab"); @@ -176,7 +176,7 @@ var tests = [ // Test that persistent panels are still open after switching to another // window and back. { id: "Test#7", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); @@ -213,7 +213,7 @@ var tests = [ }, // Test that only the first persistent notification is shown on update { id: "Test#8", - run: function() { + run() { this.notifyObj1 = new BasicNotification(this.id); this.notifyObj1.id += "_1"; this.notifyObj1.anchorID = "default-notification-icon"; @@ -228,16 +228,16 @@ var tests = [ PopupNotifications._update(); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj1); this.notification1.remove(); this.notification2.remove(); }, - onHidden: function(popup) { } + onHidden(popup) { } }, // Test that persistent notifications are shown stacked by anchor on update { id: "Test#9", - run: function() { + run() { this.notifyObj1 = new BasicNotification(this.id); this.notifyObj1.id += "_1"; this.notifyObj1.anchorID = "default-notification-icon"; @@ -258,7 +258,7 @@ var tests = [ PopupNotifications._update(); }, - onShown: function(popup) { + onShown(popup) { let notifications = popup.childNodes; is(notifications.length, 2, "two notifications displayed"); let [notification1, notification2] = notifications; @@ -269,6 +269,6 @@ var tests = [ this.notification2.remove(); this.notification3.remove(); }, - onHidden: function(popup) { } + onHidden(popup) { } }, ]; diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js b/browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js index 0516164d8236..41b55db04b2a 100644 --- a/browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js +++ b/browser/base/content/test/popupNotifications/browser_popupNotification_checkbox.js @@ -37,25 +37,25 @@ var gNotification; var tests = [ // Test that passing the checkbox field shows the checkbox. { id: "show_checkbox", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.options.checkbox = { label: "This is a checkbox", }; gNotification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); let notification = popup.childNodes[0]; checkCheckbox(notification.checkbox, "This is a checkbox"); triggerMainCommand(popup); }, - onHidden: function() { } + onHidden() { } }, // Test checkbox being checked by default { id: "checkbox_checked", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.options.checkbox = { label: "Check this", @@ -63,18 +63,18 @@ var tests = [ }; gNotification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); let notification = popup.childNodes[0]; checkCheckbox(notification.checkbox, "Check this", true); triggerMainCommand(popup); }, - onHidden: function() { } + onHidden() { } }, // Test checkbox passing the checkbox state on mainAction { id: "checkbox_passCheckboxChecked_mainAction", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.mainAction.callback = ({checkboxChecked}) => this.mainActionChecked = checkboxChecked; this.notifyObj.options.checkbox = { @@ -82,7 +82,7 @@ var tests = [ }; gNotification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { checkPopup(popup, this.notifyObj); let notification = popup.childNodes[0]; let checkbox = notification.checkbox; @@ -92,14 +92,14 @@ var tests = [ checkCheckbox(checkbox, "This is a checkbox", true); triggerMainCommand(popup); }, - onHidden: function() { + onHidden() { is(this.mainActionChecked, true, "mainAction callback is passed the correct checkbox value"); } }, // Test checkbox passing the checkbox state on secondaryAction { id: "checkbox_passCheckboxChecked_secondaryAction", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.secondaryActions = [{ label: "Test Secondary", @@ -111,7 +111,7 @@ var tests = [ }; gNotification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { checkPopup(popup, this.notifyObj); let notification = popup.childNodes[0]; let checkbox = notification.checkbox; @@ -121,14 +121,14 @@ var tests = [ checkCheckbox(checkbox, "This is a checkbox", true); triggerSecondaryCommand(popup, 0); }, - onHidden: function() { + onHidden() { is(this.secondaryActionChecked, true, "secondaryAction callback is passed the correct checkbox value"); } }, // Test checkbox preserving its state through re-opening the doorhanger { id: "checkbox_reopen", - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.options.checkbox = { label: "This is a checkbox", @@ -139,7 +139,7 @@ var tests = [ }; gNotification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { checkPopup(popup, this.notifyObj); let notification = popup.childNodes[0]; let checkbox = notification.checkbox; @@ -148,7 +148,7 @@ var tests = [ EventUtils.synthesizeMouseAtCenter(checkbox, {}); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { let icon = document.getElementById("default-notification-icon"); EventUtils.synthesizeMouseAtCenter(icon, {}); let notification = popup.childNodes[0]; @@ -165,11 +165,11 @@ var tests = [ [true, false].forEach(function(checked) { tests.push( { id: `checkbox_disableMainAction_${state}_${checked ? 'checked' : 'unchecked'}`, - run: function() { + run() { this.notifyObj = new BasicNotification(this.id); this.notifyObj.options.checkbox = { label: "This is a checkbox", - checked: checked, + checked, [state]: { disableMainAction: true, warningLabel: "Testing disable", @@ -177,7 +177,7 @@ var tests = [ }; gNotification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { checkPopup(popup, this.notifyObj); let notification = popup.childNodes[0]; let checkbox = notification.checkbox; @@ -200,7 +200,7 @@ var tests = [ } triggerMainCommand(popup); }, - onHidden: function() { } + onHidden() { } } ); }); diff --git a/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js b/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js index 1065ac6aacef..30ce48bddead 100644 --- a/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js +++ b/browser/base/content/test/popupNotifications/browser_popupNotification_no_anchors.js @@ -15,7 +15,7 @@ var tests = [ // Test that popupnotifications are anchored to the identity icon on // about:blank, where anchor icons are hidden. { id: "Test#1", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank"); @@ -23,7 +23,7 @@ var tests = [ this.notifyObj.anchorID = "geo-notification-icon"; this.notification = showNotification(this.notifyObj); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); is(document.getElementById("geo-notification-icon").boxObject.width, 0, "geo anchor shouldn't be visible"); @@ -31,7 +31,7 @@ var tests = [ "notification anchored to identity icon"); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { this.notification.remove(); gBrowser.removeTab(gBrowser.selectedTab); gBrowser.selectedTab = this.oldSelectedTab; @@ -40,7 +40,7 @@ var tests = [ // Test that popupnotifications are anchored to the identity icon after // navigation to about:blank. { id: "Test#2", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); @@ -51,7 +51,7 @@ var tests = [ }); this.notification = showNotification(this.notifyObj); }, - onShown: function* (popup) { + *onShown(popup) { yield promiseTabLoadEvent(gBrowser.selectedTab, "about:blank"); checkPopup(popup, this.notifyObj); @@ -61,7 +61,7 @@ var tests = [ "notification anchored to identity icon"); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { this.notification.remove(); gBrowser.removeTab(gBrowser.selectedTab); gBrowser.selectedTab = this.oldSelectedTab; @@ -70,7 +70,7 @@ var tests = [ // Test that dismissed popupnotifications cannot be opened on about:blank, but // can be opened after navigation. { id: "Test#3", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:blank"); @@ -92,11 +92,11 @@ var tests = [ EventUtils.synthesizeMouse(document.getElementById("geo-notification-icon"), 0, 0, {}); }, - onShown: function(popup) { + onShown(popup) { checkPopup(popup, this.notifyObj); dismissNotification(popup); }, - onHidden: function(popup) { + onHidden(popup) { this.notification.remove(); gBrowser.removeTab(gBrowser.selectedTab); gBrowser.selectedTab = this.oldSelectedTab; @@ -106,7 +106,7 @@ var tests = [ // editing the URL in the location bar, and restored to their anchors when the // URL is reverted. { id: "Test#4", - run: function* () { + *run() { this.oldSelectedTab = gBrowser.selectedTab; yield BrowserTestUtils.openNewForegroundTab(gBrowser, "http://example.com/"); diff --git a/browser/base/content/test/social/browser_aboutHome_activation.js b/browser/base/content/test/social/browser_aboutHome_activation.js index 9b3d599ba0eb..5d7dada0f9bc 100644 --- a/browser/base/content/test/social/browser_aboutHome_activation.js +++ b/browser/base/content/test/social/browser_aboutHome_activation.js @@ -57,7 +57,7 @@ var gTests = [ { desc: "Test activation with enable panel", - snippet: snippet, + snippet, panel: true }, diff --git a/browser/base/content/test/social/browser_addons.js b/browser/base/content/test/social/browser_addons.js index c57314282013..c5bf44dd6c1b 100644 --- a/browser/base/content/test/social/browser_addons.js +++ b/browser/base/content/test/social/browser_addons.js @@ -57,26 +57,26 @@ function installListener(next, aManifest) { }); return { - onInstalling: function(addon) { + onInstalling(addon) { is(expectEvent, "onInstalling", "install started"); is(addon.manifest.origin, aManifest.origin, "provider about to be installed"); ok(!Services.prefs.prefHasUserValue(prefname), "manifest is not in user-prefs"); expectEvent = "onInstalled"; }, - onInstalled: function(addon) { + onInstalled(addon) { is(addon.manifest.origin, aManifest.origin, "provider installed"); ok(addon.installDate.getTime() > 0, "addon has installDate"); ok(addon.updateDate.getTime() > 0, "addon has updateDate"); ok(Services.prefs.prefHasUserValue(prefname), "manifest is in user-prefs"); expectEvent = "onUninstalling"; }, - onUninstalling: function(addon) { + onUninstalling(addon) { is(expectEvent, "onUninstalling", "uninstall started"); is(addon.manifest.origin, aManifest.origin, "provider about to be uninstalled"); ok(Services.prefs.prefHasUserValue(prefname), "manifest is in user-prefs"); expectEvent = "onUninstalled"; }, - onUninstalled: function(addon) { + onUninstalled(addon) { is(expectEvent, "onUninstalled", "provider has been uninstalled"); is(addon.manifest.origin, aManifest.origin, "provider uninstalled"); ok(!Services.prefs.prefHasUserValue(prefname), "manifest is not in user-prefs"); @@ -86,25 +86,25 @@ function installListener(next, aManifest) { } var tests = { - testHTTPInstallFailure: function(next) { + testHTTPInstallFailure(next) { let installFrom = "http://example.com"; is(SocialService.getOriginActivationType(installFrom), "foreign", "testing foriegn install"); let data = { origin: installFrom, url: installFrom + "/activate", - manifest: manifest, - window: window + manifest, + window } Social.installProvider(data, function(addonManifest) { ok(!addonManifest, "unable to install provider over http"); next(); }); }, - testAddonEnableToggle: function(next) { + testAddonEnableToggle(next) { let expectEvent; let prefname = getManifestPrefname(manifest); let listener = { - onEnabled: function(addon) { + onEnabled(addon) { is(expectEvent, "onEnabled", "provider onEnabled"); ok(!addon.userDisabled, "provider enabled"); executeSoon(function() { @@ -112,11 +112,11 @@ var tests = { addon.userDisabled = true; }); }, - onEnabling: function(addon) { + onEnabling(addon) { is(expectEvent, "onEnabling", "provider onEnabling"); expectEvent = "onEnabled"; }, - onDisabled: function(addon) { + onDisabled(addon) { is(expectEvent, "onDisabled", "provider onDisabled"); ok(addon.userDisabled, "provider disabled"); AddonManager.removeAddonListener(listener); @@ -124,7 +124,7 @@ var tests = { Services.prefs.clearUserPref(prefname); executeSoon(next); }, - onDisabling: function(addon) { + onDisabling(addon) { is(expectEvent, "onDisabling", "provider onDisabling"); expectEvent = "onDisabled"; } @@ -148,7 +148,7 @@ var tests = { next(); }); }, - testProviderEnableToggle: function(next) { + testProviderEnableToggle(next) { // enable and disabel a provider from the SocialService interface, check // that the addon manager is updated @@ -156,22 +156,22 @@ var tests = { let prefname = getManifestPrefname(manifest); let listener = { - onEnabled: function(addon) { + onEnabled(addon) { is(expectEvent, "onEnabled", "provider onEnabled"); is(addon.manifest.origin, manifest.origin, "provider enabled"); ok(!addon.userDisabled, "provider !userDisabled"); }, - onEnabling: function(addon) { + onEnabling(addon) { is(expectEvent, "onEnabling", "provider onEnabling"); is(addon.manifest.origin, manifest.origin, "provider about to be enabled"); expectEvent = "onEnabled"; }, - onDisabled: function(addon) { + onDisabled(addon) { is(expectEvent, "onDisabled", "provider onDisabled"); is(addon.manifest.origin, manifest.origin, "provider disabled"); ok(addon.userDisabled, "provider userDisabled"); }, - onDisabling: function(addon) { + onDisabling(addon) { is(expectEvent, "onDisabling", "provider onDisabling"); is(addon.manifest.origin, manifest.origin, "provider about to be disabled"); expectEvent = "onDisabled"; @@ -190,7 +190,7 @@ var tests = { }); }); }, - testDirectoryInstall: function(next) { + testDirectoryInstall(next) { AddonManager.addAddonListener(installListener(next, manifest2)); BrowserTestUtils.waitForEvent(PopupNotifications.panel, "popupshown").then(() => { @@ -205,7 +205,7 @@ var tests = { origin: manifest2.origin, url: manifest2.origin + "/directory", manifest: manifest2, - window: window + window } Social.installProvider(data, function(addonManifest) { Services.prefs.clearUserPref("social.directories"); diff --git a/browser/base/content/test/social/browser_blocklist.js b/browser/base/content/test/social/browser_blocklist.js index 074583498fc6..9a340b633738 100644 --- a/browser/base/content/test/social/browser_blocklist.js +++ b/browser/base/content/test/social/browser_blocklist.js @@ -66,7 +66,7 @@ function test() { } var tests = { - testSimpleBlocklist: function(next) { + testSimpleBlocklist(next) { // this really just tests adding and clearing our blocklist for later tests setAndUpdateBlocklist(blocklistURL).then(() => { ok(Services.blocklist.isAddonBlocklisted(SocialService.createWrapper(manifest_bad)), "blocking 'blocked'"); @@ -77,7 +77,7 @@ var tests = { }); }); }, - testAddingNonBlockedProvider: function(next) { + testAddingNonBlockedProvider(next) { function finishTest(isgood) { ok(isgood, "adding non-blocked provider ok"); Services.prefs.clearUserPref("social.manifest.good"); @@ -103,7 +103,7 @@ var tests = { } }); }, - testAddingBlockedProvider: function(next) { + testAddingBlockedProvider(next) { function finishTest(good) { ok(good, "Unable to add blocklisted provider"); Services.prefs.clearUserPref("social.manifest.blocked"); @@ -124,7 +124,7 @@ var tests = { } }); }, - testInstallingBlockedProvider: function(next) { + testInstallingBlockedProvider(next) { function finishTest(good) { ok(good, "Unable to install blocklisted provider"); resetBlocklist().then(next); @@ -138,7 +138,7 @@ var tests = { origin: manifest_bad.origin, url: activationURL, manifest: manifest_bad, - window: window + window } Social.installProvider(data, function(addonManifest) { finishTest(false); @@ -148,10 +148,10 @@ var tests = { } }); }, - testBlockingExistingProvider: function(next) { + testBlockingExistingProvider(next) { let listener = { _window: null, - onOpenWindow: function(aXULWindow) { + onOpenWindow(aXULWindow) { Services.wm.removeListener(this); this._window = aXULWindow; let domwindow = aXULWindow.QueryInterface(Ci.nsIInterfaceRequestor) @@ -177,8 +177,8 @@ var tests = { }); }, false); }, - onCloseWindow: function(aXULWindow) { }, - onWindowTitleChange: function(aXULWindow, aNewTitle) { } + onCloseWindow(aXULWindow) { }, + onWindowTitleChange(aXULWindow, aNewTitle) { } }; Services.wm.addListener(listener); diff --git a/browser/base/content/test/social/browser_share.js b/browser/base/content/test/social/browser_share.js index 91de49b16857..74414b7dd86e 100644 --- a/browser/base/content/test/social/browser_share.js +++ b/browser/base/content/test/social/browser_share.js @@ -135,7 +135,7 @@ function hasoptions(testOptions, options) { } var tests = { - testShareDisabledOnActivation: function(next) { + testShareDisabledOnActivation(next) { // starting on about:blank page, share should be visible but disabled when // adding provider is(gBrowser.currentURI.spec, "about:blank"); @@ -157,7 +157,7 @@ var tests = { SocialService.disableProvider(manifest.origin, next); }); }, - testShareEnabledOnActivation: function(next) { + testShareEnabledOnActivation(next) { // starting from *some* page, share should be visible and enabled when // activating provider // initialize the button into the navbar @@ -180,7 +180,7 @@ var tests = { }); }); }, - testSharePage: function(next) { + testSharePage(next) { let testTab; let testIndex = 0; let testData = corpus[testIndex++]; @@ -222,7 +222,7 @@ var tests = { } executeSoon(runOneTest); }, - testShareMicroformats: function(next) { + testShareMicroformats(next) { // initialize the button into the navbar CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR); // ensure correct state @@ -305,7 +305,7 @@ var tests = { }); }); }, - testSharePanelActivation: function(next) { + testSharePanelActivation(next) { let testTab; // cleared in the cleanup function Services.prefs.setCharPref("social.directories", "https://example.com"); @@ -352,7 +352,7 @@ var tests = { SocialShare.sharePage(); }); }, - testSharePanelDialog: function(next) { + testSharePanelDialog(next) { let testTab; // initialize the button into the navbar CustomizableUI.addWidgetToArea("social-share-button", CustomizableUI.AREA_NAVBAR); diff --git a/browser/base/content/test/social/browser_social_activation.js b/browser/base/content/test/social/browser_social_activation.js index 02c9b924f93f..63b8b938e996 100644 --- a/browser/base/content/test/social/browser_social_activation.js +++ b/browser/base/content/test/social/browser_social_activation.js @@ -186,7 +186,7 @@ function test() { } var tests = { - testActivationWrongOrigin: function(next) { + testActivationWrongOrigin(next) { // At this stage none of our providers exist, so we expect failure. Services.prefs.setBoolPref("social.remote-install.enabled", false); activateProvider(gTestDomains[0], function() { @@ -199,7 +199,7 @@ var tests = { }); }, - testIFrameActivation: function(next) { + testIFrameActivation(next) { activateIFrameProvider(gTestDomains[0], function() { is(SocialUI.enabled, false, "SocialUI is not enabled"); let panel = document.getElementById("servicesInstall-notification"); @@ -209,7 +209,7 @@ var tests = { }); }, - testActivationFirstProvider: function(next) { + testActivationFirstProvider(next) { // first up we add a manifest entry for a single provider. activateOneProvider(gProviders[0], false, function() { // we deactivated leaving no providers left, so Social is disabled. @@ -218,7 +218,7 @@ var tests = { }); }, - testActivationMultipleProvider: function(next) { + testActivationMultipleProvider(next) { // The trick with this test is to make sure that Social.providers[1] is // the current provider when doing the undo - this makes sure that the // Social code doesn't fallback to Social.providers[0], which it will @@ -237,7 +237,7 @@ var tests = { }); }, - testAddonManagerDoubleInstall: function(next) { + testAddonManagerDoubleInstall(next) { // Create a new tab and load about:addons let addonsTab = gBrowser.addTab(); gBrowser.selectedTab = addonsTab; diff --git a/browser/base/content/test/social/social_crash_content_helper.js b/browser/base/content/test/social/social_crash_content_helper.js index 4698b6957b4f..1a876c3d6a14 100644 --- a/browser/base/content/test/social/social_crash_content_helper.js +++ b/browser/base/content/test/social/social_crash_content_helper.js @@ -14,11 +14,11 @@ var crash = function() { // this will crash when called. var TestHelper = { - init: function() { + init() { addMessageListener("social-test:crash", this); }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "social-test:crash": privateNoteIntentionalCrash(); diff --git a/browser/base/content/test/urlbar/Panel.jsm b/browser/base/content/test/urlbar/Panel.jsm index ee1fd2ed93c9..2e5eccadf5cc 100644 --- a/browser/base/content/test/urlbar/Panel.jsm +++ b/browser/base/content/test/urlbar/Panel.jsm @@ -105,8 +105,8 @@ this.Panel.prototype = { let url = controller.getValueAt(idx); let action = this.urlbar._parseActionUrl(url); this._emit("result", { - url: url, - action: action, + url, + action, image: controller.getImageAt(idx), title: controller.getCommentAt(idx), type: controller.getStyleAt(idx), diff --git a/browser/base/content/test/urlbar/browser_autocomplete_no_title.js b/browser/base/content/test/urlbar/browser_autocomplete_no_title.js index 8d608550b313..49e8f4609c9b 100644 --- a/browser/base/content/test/urlbar/browser_autocomplete_no_title.js +++ b/browser/base/content/test/urlbar/browser_autocomplete_no_title.js @@ -2,7 +2,7 @@ add_task(function*() { let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:mozilla"); let uri = NetUtil.newURI("http://bug1060642.example.com/beards/are/pretty/great"); - yield PlacesTestUtils.addVisits([{uri: uri, title: ""}]); + yield PlacesTestUtils.addVisits([{uri, title: ""}]); yield promiseAutocompleteResultPopup("bug1060642"); ok(gURLBar.popup.richlistbox.children.length > 1, "Should get at least 2 results"); diff --git a/browser/base/content/test/urlbar/browser_autocomplete_tag_star_visibility.js b/browser/base/content/test/urlbar/browser_autocomplete_tag_star_visibility.js index 8a69b4b44c54..b6440b327bc2 100644 --- a/browser/base/content/test/urlbar/browser_autocomplete_tag_star_visibility.js +++ b/browser/base/content/test/urlbar/browser_autocomplete_tag_star_visibility.js @@ -10,7 +10,7 @@ add_task(function*() { PlacesUtils.bookmarks.DEFAULT_INDEX, `test ${tagName}`); PlacesUtils.tagging.tagURI(uri, [tagName]); - yield PlacesTestUtils.addVisits([{uri: uri, title: `Test page with tag ${tagName}`}]); + yield PlacesTestUtils.addVisits([{uri, title: `Test page with tag ${tagName}`}]); } // We use different tags for each part of the test, as otherwise the diff --git a/browser/base/content/test/urlbar/browser_bug556061.js b/browser/base/content/test/urlbar/browser_bug556061.js index 4c6ac5bf5230..d57e92c372d1 100644 --- a/browser/base/content/test/urlbar/browser_bug556061.js +++ b/browser/base/content/test/urlbar/browser_bug556061.js @@ -28,7 +28,7 @@ function cleanup() { var tests = [ { expected: testURL, - setup: function() { + setup() { gURLBar.value = testActionURL; gURLBar.valueIsTyped = true; is(gURLBar.value, testActionURL, "gURLBar starts with the correct real value"); @@ -39,37 +39,37 @@ var tests = [ gURLBar.select(); goDoCommand("cmd_copy"); }, - success: function() { + success() { is(gURLBar.value, testActionURL, "gURLBar.value didn't change when copying"); } }, { expected: testURL.substring(0, 10), - setup: function() { + setup() { // Set selectionStart/End manually and make sure it matches the substring gURLBar.selectionStart = 0; gURLBar.selectionEnd = 10; goDoCommand("cmd_copy"); }, - success: function() { + success() { is(gURLBar.value, testActionURL, "gURLBar.value didn't change when copying"); } }, { expected: testURL, - setup: function() { + setup() { // Setup for cut test... // Select all gURLBar.select(); goDoCommand("cmd_cut"); }, - success: function() { + success() { is(gURLBar.value, "", "gURLBar.value is now empty"); } }, { expected: testURL.substring(testURL.length - 10, testURL.length), - setup: function() { + setup() { // Reset urlbar value gURLBar.value = testActionURL; gURLBar.valueIsTyped = true; @@ -82,7 +82,7 @@ var tests = [ gURLBar.selectionEnd = testURL.length; goDoCommand("cmd_cut"); }, - success: function() { + success() { is(gURLBar.value, testURL.substring(0, testURL.length - 10), "gURLBar.value has the correct value"); } } diff --git a/browser/base/content/test/urlbar/browser_bug623155.js b/browser/base/content/test/urlbar/browser_bug623155.js index dd6ff8c85399..1d355395fcec 100644 --- a/browser/base/content/test/urlbar/browser_bug623155.js +++ b/browser/base/content/test/urlbar/browser_bug623155.js @@ -58,7 +58,7 @@ function test() { } var gWebProgressListener = { - QueryInterface: function(aIID) { + QueryInterface(aIID) { if (aIID.equals(Components.interfaces.nsIWebProgressListener) || aIID.equals(Components.interfaces.nsISupportsWeakReference) || aIID.equals(Components.interfaces.nsISupports)) @@ -75,7 +75,7 @@ var gWebProgressListener = { // onSecurityChange: function() {}, // ---------------------------------------------------------------------------- - onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) { + onLocationChange(aWebProgress, aRequest, aLocation, aFlags) { if (!aRequest) { // This is bug 673752, or maybe initial "about:blank". return; diff --git a/browser/base/content/test/urlbar/browser_search_favicon.js b/browser/base/content/test/urlbar/browser_search_favicon.js index a8e6dbbcd957..4ab7bfd6ec73 100644 --- a/browser/base/content/test/urlbar/browser_search_favicon.js +++ b/browser/base/content/test/urlbar/browser_search_favicon.js @@ -23,7 +23,7 @@ add_task(function*() { Services.search.currentEngine = gEngine; let uri = NetUtil.newURI("http://s.example.com/search?q=foo&client=1"); - yield PlacesTestUtils.addVisits({ uri: uri, title: "Foo - SearchEngine Search" }); + yield PlacesTestUtils.addVisits({ uri, title: "Foo - SearchEngine Search" }); yield BrowserTestUtils.openNewForegroundTab(gBrowser, "about:mozilla"); diff --git a/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js b/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js index 6fde02895311..5b5fd3e6d1e9 100644 --- a/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js +++ b/browser/base/content/test/urlbar/browser_tabMatchesInAwesomebar.js @@ -171,12 +171,12 @@ function checkAutocompleteResults(aExpected, aCallback) searchParam: "enable-actions", popupOpen: false, minResultsForPopup: 0, - invalidate: function() {}, + invalidate() {}, disableAutoComplete: false, completeDefaultIndex: false, get popup() { return this; }, - onSearchBegin: function() {}, - onSearchComplete: function() + onSearchBegin() {}, + onSearchComplete() { info("Found " + gController.matchCount + " matches."); // Check to see the expected uris and titles match up (in any order) @@ -202,9 +202,9 @@ function checkAutocompleteResults(aExpected, aCallback) executeSoon(aCallback); }, - setSelectedIndex: function() {}, + setSelectedIndex() {}, get searchCount() { return this.searches.length; }, - getSearchAt: function(aIndex) { return this.searches[aIndex]; }, + getSearchAt(aIndex) { return this.searches[aIndex]; }, QueryInterface: XPCOMUtils.generateQI([ Ci.nsIAutoCompleteInput, Ci.nsIAutoCompletePopup, diff --git a/browser/base/content/test/urlbar/browser_urlbarAddonIframe.js b/browser/base/content/test/urlbar/browser_urlbarAddonIframe.js index 05c54ba251f3..102c65efd948 100644 --- a/browser/base/content/test/urlbar/browser_urlbarAddonIframe.js +++ b/browser/base/content/test/urlbar/browser_urlbarAddonIframe.js @@ -184,18 +184,18 @@ function promiseMessage(type, data, numExpectedAcks = 1) { let ackMsgName = "TestMessageAck"; let msgID = gNextMessageID++; gMsgMan.sendAsyncMessage(testMsgName, { - type: type, + type, messageID: msgID, - data: data, + data, }); let ackPromises = []; for (let i = 0; i < numExpectedAcks; i++) { let ackIndex = i; ackPromises.push(new Promise(resolve => { info("Waiting for message ack: " + JSON.stringify({ - type: type, - msgID: msgID, - ackIndex: ackIndex, + type, + msgID, + ackIndex, })); gMsgMan.addMessageListener(ackMsgName, function onMsg(msg) { // Messages have IDs so that an ack can be correctly paired with the @@ -207,9 +207,9 @@ function promiseMessage(type, data, numExpectedAcks = 1) { return; } info("Received message ack: " + JSON.stringify({ - type: type, + type, msgID: msg.data.messageID, - ackIndex: ackIndex, + ackIndex, })); gMsgMan.removeMessageListener(ackMsgName, onMsg); resolve(msg.data.data); diff --git a/browser/base/content/test/urlbar/browser_urlbarCopying.js b/browser/base/content/test/urlbar/browser_urlbarCopying.js index 8c1d262d6d3b..aa7289f4c0c5 100644 --- a/browser/base/content/test/urlbar/browser_urlbarCopying.js +++ b/browser/base/content/test/urlbar/browser_urlbarCopying.js @@ -153,7 +153,7 @@ var tests = [ copyExpected: "data:text/html,(%C3%A9 %25P", }, { - setup: function() { Services.prefs.setBoolPref(decodeURLpref, true); }, + setup() { Services.prefs.setBoolPref(decodeURLpref, true); }, loadURL: "http://example.com/%D0%B1%D0%B8%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D1%8F", expectedURL: toUnicode("example.com/биография"), copyExpected: toUnicode("http://example.com/биография") diff --git a/browser/base/content/test/urlbar/browser_urlbarSearchTelemetry.js b/browser/base/content/test/urlbar/browser_urlbarSearchTelemetry.js index 8c28401eae0e..485c9ec0db05 100644 --- a/browser/base/content/test/urlbar/browser_urlbarSearchTelemetry.js +++ b/browser/base/content/test/urlbar/browser_urlbarSearchTelemetry.js @@ -188,7 +188,7 @@ function getActionAtIndex(index) { } let [, type, paramStr] = mozActionMatch; return { - type: type, + type, params: JSON.parse(paramStr), }; } diff --git a/browser/base/content/test/urlbar/head.js b/browser/base/content/test/urlbar/head.js index d1288a8db751..cb39ce9262c6 100644 --- a/browser/base/content/test/urlbar/head.js +++ b/browser/base/content/test/urlbar/head.js @@ -46,7 +46,7 @@ function waitForDocLoadAndStopIt(aExpectedURL, aBrowser = gBrowser.selectedBrows } let progressListener = { - onStateChange: function(webProgress, req, flags, status) { + onStateChange(webProgress, req, flags, status) { dump("waitForDocLoadAndStopIt: onStateChange " + flags.toString(16) + ": " + req.name + "\n"); if (webProgress.isTopLevel && @@ -190,12 +190,12 @@ function promiseNewSearchEngine(basename) { info("Waiting for engine to be added: " + basename); let url = getRootDirectory(gTestPath) + basename; Services.search.addEngine(url, null, "", false, { - onSuccess: function(engine) { + onSuccess(engine) { info("Search engine added: " + basename); registerCleanupFunction(() => Services.search.removeEngine(engine)); resolve(engine); }, - onError: function(errCode) { + onError(errCode) { Assert.ok(false, "addEngine failed with error code " + errCode); reject(); }, diff --git a/browser/base/content/test/urlbar/urlbarAddonIframe.js b/browser/base/content/test/urlbar/urlbarAddonIframe.js index d25ab0bc95c4..3f8f9a83aa78 100644 --- a/browser/base/content/test/urlbar/urlbarAddonIframe.js +++ b/browser/base/content/test/urlbar/urlbarAddonIframe.js @@ -45,7 +45,7 @@ function ack(originalEventDetail, ackData = null, ackIndex = 0) { dispatchEvent(new CustomEvent("TestEventAck", { detail: { messageID: originalEventDetail.messageID, - ackIndex: ackIndex, + ackIndex, data: ackData, }, })); diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index 8f40d7129e23..bdde5bb60f0b 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -825,7 +825,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -1019,7 +1019,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. let [, type, params] = aUrl.match(MOZ_ACTION_REGEX); let action = { - type: type, + type, }; action.params = JSON.parse(params); @@ -1114,7 +1114,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. // handleEnter, in such a case it won't have been cleared. this.handleEnterInstance = { searchString: this.mController.searchString, - event: event + event }; if (this.popup.selectedIndex != 0 || this.gotResultForCurrentQuery) { diff --git a/browser/base/content/utilityOverlay.js b/browser/base/content/utilityOverlay.js index a8f5e747b2c8..ab7849e6db5c 100644 --- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -383,7 +383,7 @@ function openLinkIn(url, where, params) { } targetBrowser.loadURIWithFlags(url, { - flags: flags, + flags, referrerURI: aNoReferrer ? null : aReferrerURI, referrerPolicy: aReferrerPolicy, postData: aPostData, diff --git a/browser/base/content/web-panels.js b/browser/base/content/web-panels.js index ceb0016fdff6..3bf8c726e6fc 100644 --- a/browser/base/content/web-panels.js +++ b/browser/base/content/web-panels.js @@ -13,12 +13,12 @@ function getPanelBrowser() } var panelProgressListener = { - onProgressChange : function(aWebProgress, aRequest, + onProgressChange(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) { }, - onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) + onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) { if (!aRequest) return; @@ -38,17 +38,17 @@ var panelProgressListener = { } , - onLocationChange : function(aWebProgress, aRequest, aLocation, aFlags) { + onLocationChange(aWebProgress, aRequest, aLocation, aFlags) { UpdateBackForwardCommands(getPanelBrowser().webNavigation); }, - onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage) { + onStatusChange(aWebProgress, aRequest, aStatus, aMessage) { }, - onSecurityChange : function(aWebProgress, aRequest, aState) { + onSecurityChange(aWebProgress, aRequest, aState) { }, - QueryInterface : function(aIID) + QueryInterface(aIID) { if (aIID.equals(Ci.nsIWebProgressListener) || aIID.equals(Ci.nsISupportsWeakReference) || diff --git a/browser/base/content/webrtcIndicator.js b/browser/base/content/webrtcIndicator.js index a8bb64367c48..9b4d78066a44 100644 --- a/browser/base/content/webrtcIndicator.js +++ b/browser/base/content/webrtcIndicator.js @@ -129,7 +129,7 @@ function onFirefoxButtonClick(event) { var PositionHandler = { positionCustomized: false, threshold: 10, - adjustPosition: function() { + adjustPosition() { if (!this.positionCustomized) { // Center the window horizontally on the screen (not the available area). // Until we have moved the window to y=0, 'screen.width' may give a value @@ -150,14 +150,14 @@ var PositionHandler = { this.setXPosition(window.screenX); } }, - setXPosition: function(desiredX) { + setXPosition(desiredX) { // Ensure the indicator isn't moved outside the available area of the screen. desiredX = Math.max(desiredX, screen.availLeft); let maxX = screen.availLeft + screen.availWidth - document.documentElement.clientWidth; window.moveTo(Math.min(desiredX, maxX), screen.availTop); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "mousedown": if (aEvent.button != 0 || aEvent.defaultPrevented) diff --git a/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js b/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js index 310a94166610..580d29843dc3 100644 --- a/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js +++ b/browser/components/contextualidentity/test/browser/browser_forgetaboutsite.js @@ -98,22 +98,22 @@ function OpenCacheEntry(key, where, flags, lci) CacheListener.prototype = { _appCache: null, - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Components.interfaces.nsICacheEntryOpenCallback) || iid.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_ERROR_NO_INTERFACE; }, - onCacheEntryCheck: function(entry, appCache) { + onCacheEntryCheck(entry, appCache) { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; }, - onCacheEntryAvailable: function(entry, isnew, appCache, status) { + onCacheEntryAvailable(entry, isnew, appCache, status) { resolve(); }, - run: function() { + run() { let storage = getCacheStorage(where, lci, this._appCache); storage.asyncOpenURI(key, "", flags, this); } diff --git a/browser/components/contextualidentity/test/browser/browser_serviceworkers.js b/browser/components/contextualidentity/test/browser/browser_serviceworkers.js index 9875c8aa1b73..e874494ec462 100644 --- a/browser/components/contextualidentity/test/browser/browser_serviceworkers.js +++ b/browser/components/contextualidentity/test/browser/browser_serviceworkers.js @@ -78,7 +78,7 @@ function allRegistered() { function promiseAllRegistered() { return new Promise(function(resolve) { let listener = { - onRegister: function() { + onRegister() { if (allRegistered()) { swm.removeListener(listener); resolve(); @@ -92,11 +92,11 @@ function promiseAllRegistered() { function promiseUnregister(info) { return new Promise(function(resolve) { swm.unregister(info.principal, { - unregisterSucceeded: function(aState) { + unregisterSucceeded(aState) { ok(aState, "ServiceWorkerRegistration exists"); resolve(); }, - unregisterFailed: function(aState) { + unregisterFailed(aState) { ok(false, "unregister should succeed"); } }, info.scope); diff --git a/browser/components/customizableui/CustomizableUI.jsm b/browser/components/customizableui/CustomizableUI.jsm index a9cef9dd1a34..81f4da46b2da 100644 --- a/browser/components/customizableui/CustomizableUI.jsm +++ b/browser/components/customizableui/CustomizableUI.jsm @@ -170,7 +170,7 @@ XPCOMUtils.defineLazyGetter(this, "log", () => { }); var CustomizableUIInternal = { - initialize: function() { + initialize() { log.debug("Initializing"); this.addListener(this); @@ -323,13 +323,13 @@ var CustomizableUIInternal = { return toolbars; }, - _defineBuiltInWidgets: function() { + _defineBuiltInWidgets() { for (let widgetDefinition of CustomizableWidgets) { this.createBuiltinWidget(widgetDefinition); } }, - _introduceNewBuiltinWidgets: function() { + _introduceNewBuiltinWidgets() { // We should still enter even if gSavedState.currentVersion >= kVersion // because the per-widget pref facility is independent of versioning. if (!gSavedState) { @@ -389,7 +389,7 @@ var CustomizableUIInternal = { * _markObsoleteBuiltinButtonsSeen * when upgrading, ensure obsoleted buttons are in seen state. */ - _markObsoleteBuiltinButtonsSeen: function() { + _markObsoleteBuiltinButtonsSeen() { if (!gSavedState) return; let currentVersion = gSavedState.currentVersion; @@ -405,7 +405,7 @@ var CustomizableUIInternal = { } }, - _placeNewDefaultWidgetsInArea: function(aArea) { + _placeNewDefaultWidgetsInArea(aArea) { let futurePlacedWidgets = gFuturePlacements.get(aArea); let savedPlacements = gSavedState && gSavedState.placements && gSavedState.placements[aArea]; let defaultPlacements = gAreas.get(aArea).get("defaultPlacements"); @@ -459,7 +459,7 @@ var CustomizableUIInternal = { this.saveState(); }, - wrapWidget: function(aWidgetId) { + wrapWidget(aWidgetId) { if (gGroupWrapperCache.has(aWidgetId)) { return gGroupWrapperCache.get(aWidgetId); } @@ -484,7 +484,7 @@ var CustomizableUIInternal = { return wrapper; }, - registerArea: function(aName, aProperties, aInternalCaller) { + registerArea(aName, aProperties, aInternalCaller) { if (typeof aName != "string" || !/^[a-z0-9-_]{1,}$/i.test(aName)) { throw new Error("Invalid area name"); } @@ -563,7 +563,7 @@ var CustomizableUIInternal = { } }, - unregisterArea: function(aName, aDestroyPlacements) { + unregisterArea(aName, aDestroyPlacements) { if (typeof aName != "string" || !/^[a-z0-9-_]{1,}$/i.test(aName)) { throw new Error("Invalid area name"); } @@ -605,7 +605,7 @@ var CustomizableUIInternal = { } }, - registerToolbarNode: function(aToolbar, aExistingChildren) { + registerToolbarNode(aToolbar, aExistingChildren) { let area = aToolbar.id; if (gBuildAreas.has(area) && gBuildAreas.get(area).has(aToolbar)) { return; @@ -677,7 +677,7 @@ var CustomizableUIInternal = { } }, - buildArea: function(aArea, aPlacements, aAreaNode) { + buildArea(aArea, aPlacements, aAreaNode) { let document = aAreaNode.ownerDocument; let window = document.defaultView; let inPrivateWindow = PrivateBrowsingUtils.isWindowPrivate(window); @@ -813,7 +813,7 @@ var CustomizableUIInternal = { } }, - addPanelCloseListeners: function(aPanel) { + addPanelCloseListeners(aPanel) { gELS.addSystemEventListener(aPanel, "click", this, false); gELS.addSystemEventListener(aPanel, "keypress", this, false); let win = aPanel.ownerGlobal; @@ -823,7 +823,7 @@ var CustomizableUIInternal = { gPanelsForWindow.get(win).add(this._getPanelForNode(aPanel)); }, - removePanelCloseListeners: function(aPanel) { + removePanelCloseListeners(aPanel) { gELS.removeSystemEventListener(aPanel, "click", this, false); gELS.removeSystemEventListener(aPanel, "keypress", this, false); let win = aPanel.ownerGlobal; @@ -833,7 +833,7 @@ var CustomizableUIInternal = { } }, - ensureButtonContextMenu: function(aNode, aAreaNode) { + ensureButtonContextMenu(aNode, aAreaNode) { const kPanelItemContextMenu = "customizationPanelItemContextMenu"; let currentContextMenu = aNode.getAttribute("context") || @@ -851,7 +851,7 @@ var CustomizableUIInternal = { } }, - getWidgetProvider: function(aWidgetId) { + getWidgetProvider(aWidgetId) { if (this.isSpecialWidget(aWidgetId)) { return CustomizableUI.PROVIDER_SPECIAL; } @@ -871,7 +871,7 @@ var CustomizableUIInternal = { return CustomizableUI.PROVIDER_XUL; }, - getWidgetNode: function(aWidgetId, aWindow) { + getWidgetNode(aWidgetId, aWindow) { let document = aWindow.document; if (this.isSpecialWidget(aWidgetId)) { @@ -904,7 +904,7 @@ var CustomizableUIInternal = { return [null, null]; }, - registerMenuPanel: function(aPanelContents) { + registerMenuPanel(aPanelContents) { if (gBuildAreas.has(CustomizableUI.AREA_PANEL) && gBuildAreas.get(CustomizableUI.AREA_PANEL).has(aPanelContents)) { return; @@ -935,7 +935,7 @@ var CustomizableUIInternal = { this.registerBuildArea(CustomizableUI.AREA_PANEL, aPanelContents); }, - onWidgetAdded: function(aWidgetId, aArea, aPosition) { + onWidgetAdded(aWidgetId, aArea, aPosition) { this.insertNode(aWidgetId, aArea, aPosition, true); if (!gResetting) { @@ -943,7 +943,7 @@ var CustomizableUIInternal = { } }, - onWidgetRemoved: function(aWidgetId, aArea) { + onWidgetRemoved(aWidgetId, aArea) { let areaNodes = gBuildAreas.get(aArea); if (!areaNodes) { return; @@ -1003,18 +1003,18 @@ var CustomizableUIInternal = { } }, - onWidgetMoved: function(aWidgetId, aArea, aOldPosition, aNewPosition) { + onWidgetMoved(aWidgetId, aArea, aOldPosition, aNewPosition) { this.insertNode(aWidgetId, aArea, aNewPosition); if (!gResetting) { this._clearPreviousUIState(); } }, - onCustomizeEnd: function(aWindow) { + onCustomizeEnd(aWindow) { this._clearPreviousUIState(); }, - registerBuildArea: function(aArea, aNode) { + registerBuildArea(aArea, aNode) { // We ensure that the window is registered to have its customization data // cleaned up when unloading. let window = aNode.ownerGlobal; @@ -1039,7 +1039,7 @@ var CustomizableUIInternal = { customizableNode.classList.add("customization-target"); }, - registerBuildWindow: function(aWindow) { + registerBuildWindow(aWindow) { if (!gBuildWindows.has(aWindow)) { gBuildWindows.set(aWindow, new Set()); @@ -1050,7 +1050,7 @@ var CustomizableUIInternal = { } }, - unregisterBuildWindow: function(aWindow) { + unregisterBuildWindow(aWindow) { aWindow.removeEventListener("unload", this); aWindow.removeEventListener("command", this, true); gPanelsForWindow.delete(aWindow); @@ -1093,7 +1093,7 @@ var CustomizableUIInternal = { this.notifyListeners("onWindowClosed", aWindow); }, - setLocationAttributes: function(aNode, aArea) { + setLocationAttributes(aNode, aArea) { let props = gAreas.get(aArea); if (!props) { throw new Error("Expected area " + aArea + " to have a properties Map " + @@ -1109,12 +1109,12 @@ var CustomizableUIInternal = { } }, - removeLocationAttributes: function(aNode) { + removeLocationAttributes(aNode) { aNode.removeAttribute("cui-areatype"); aNode.removeAttribute("cui-anchorid"); }, - insertNode: function(aWidgetId, aArea, aPosition, isNew) { + insertNode(aWidgetId, aArea, aPosition, isNew) { let areaNodes = gBuildAreas.get(aArea); if (!areaNodes) { return; @@ -1134,7 +1134,7 @@ var CustomizableUIInternal = { } }, - insertNodeInWindow: function(aWidgetId, aAreaNode, isNew) { + insertNodeInWindow(aWidgetId, aAreaNode, isNew) { let window = aAreaNode.ownerGlobal; let showInPrivateBrowsing = gPalette.has(aWidgetId) ? gPalette.get(aWidgetId).showInPrivateBrowsing @@ -1166,7 +1166,7 @@ var CustomizableUIInternal = { } }, - findInsertionPoints: function(aNode, aAreaNode) { + findInsertionPoints(aNode, aAreaNode) { let areaId = aAreaNode.id; let props = gAreas.get(areaId); @@ -1191,14 +1191,14 @@ var CustomizableUIInternal = { return [container, null]; }, - insertWidgetBefore: function(aNode, aNextNode, aContainer, aArea) { + insertWidgetBefore(aNode, aNextNode, aContainer, aArea) { this.notifyListeners("onWidgetBeforeDOMChange", aNode, aNextNode, aContainer); this.setLocationAttributes(aNode, aArea); aContainer.insertBefore(aNode, aNextNode); this.notifyListeners("onWidgetAfterDOMChange", aNode, aNextNode, aContainer); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "command": if (!this._originalEventInPanel(aEvent)) { @@ -1216,7 +1216,7 @@ var CustomizableUIInternal = { } }, - _originalEventInPanel: function(aEvent) { + _originalEventInPanel(aEvent) { let e = aEvent.sourceEvent; if (!e) { return false; @@ -1230,14 +1230,14 @@ var CustomizableUIInternal = { return !!panels && panels.has(node); }, - isSpecialWidget: function(aId) { + isSpecialWidget(aId) { return (aId.startsWith(kSpecialWidgetPfx) || aId.startsWith("separator") || aId.startsWith("spring") || aId.startsWith("spacer")); }, - ensureSpecialWidgetId: function(aId) { + ensureSpecialWidgetId(aId) { let nodeType = aId.match(/spring|spacer|separator/)[0]; // If the ID we were passed isn't a generated one, generate one now: if (nodeType == aId) { @@ -1247,7 +1247,7 @@ var CustomizableUIInternal = { return aId; }, - createSpecialWidget: function(aId, aDocument) { + createSpecialWidget(aId, aDocument) { let nodeName = "toolbar" + aId.match(/spring|spacer|separator/)[0]; let node = aDocument.createElementNS(kNSXUL, nodeName); node.id = this.ensureSpecialWidgetId(aId); @@ -1260,7 +1260,7 @@ var CustomizableUIInternal = { /* Find a XUL-provided widget in a window. Don't try to use this * for an API-provided widget or a special widget. */ - findWidgetInWindow: function(aId, aWindow) { + findWidgetInWindow(aId, aWindow) { if (!gBuildWindows.has(aWindow)) { throw new Error("Build window not registered"); } @@ -1322,7 +1322,7 @@ var CustomizableUIInternal = { return null; }, - buildWidget: function(aDocument, aWidget) { + buildWidget(aDocument, aWidget) { if (aDocument.documentURI != kExpectedWindowURL) { throw new Error("buildWidget was called for a non-browser window!"); } @@ -1417,7 +1417,7 @@ var CustomizableUIInternal = { return node; }, - getLocalizedProperty: function(aWidget, aProp, aFormatArgs, aDef) { + getLocalizedProperty(aWidget, aProp, aFormatArgs, aDef) { const kReqStringProps = ["label"]; if (typeof aWidget == "string") { @@ -1456,7 +1456,7 @@ var CustomizableUIInternal = { return def; }, - addShortcut: function(aShortcutNode, aTargetNode = aShortcutNode) { + addShortcut(aShortcutNode, aTargetNode = aShortcutNode) { // Detect if we've already been here before. if (aTargetNode.hasAttribute("shortcut")) return; @@ -1478,7 +1478,7 @@ var CustomizableUIInternal = { aTargetNode.setAttribute("shortcut", ShortcutUtils.prettifyShortcut(shortcut)); }, - handleWidgetCommand: function(aWidget, aNode, aEvent) { + handleWidgetCommand(aWidget, aNode, aEvent) { log.debug("handleWidgetCommand"); if (aWidget.type == "button") { @@ -1509,7 +1509,7 @@ var CustomizableUIInternal = { } }, - handleWidgetClick: function(aWidget, aNode, aEvent) { + handleWidgetClick(aWidget, aNode, aEvent) { log.debug("handleWidgetClick"); if (aWidget.onClick) { try { @@ -1523,7 +1523,7 @@ var CustomizableUIInternal = { } }, - _getPanelForNode: function(aNode) { + _getPanelForNode(aNode) { let panel = aNode; while (panel && panel.localName != "panel") panel = panel.parentNode; @@ -1536,7 +1536,7 @@ var CustomizableUIInternal = { * We also check for being outside of any toolbaritem/toolbarbutton, ie on a blank * part of the menu. */ - _isOnInteractiveElement: function(aEvent) { + _isOnInteractiveElement(aEvent) { function getMenuPopupForDescendant(aNode) { let lastPopup = null; while (aNode && aNode.parentNode && @@ -1652,14 +1652,14 @@ var CustomizableUIInternal = { return inInput || !inItem; }, - hidePanelForNode: function(aNode) { + hidePanelForNode(aNode) { let panel = this._getPanelForNode(aNode); if (panel) { panel.hidePopup(); } }, - maybeAutoHidePanel: function(aEvent) { + maybeAutoHidePanel(aEvent) { if (aEvent.type == "keypress") { if (aEvent.keyCode != aEvent.DOM_VK_RETURN) { return; @@ -1714,7 +1714,7 @@ var CustomizableUIInternal = { this.hidePanelForNode(aEvent.target); }, - getUnusedWidgets: function(aWindowPalette) { + getUnusedWidgets(aWindowPalette) { let window = aWindowPalette.ownerGlobal; let isWindowPrivate = PrivateBrowsingUtils.isWindowPrivate(window); // We use a Set because there can be overlap between the widgets in @@ -1745,7 +1745,7 @@ var CustomizableUIInternal = { return [...widgets]; }, - getPlacementOfWidget: function(aWidgetId, aOnlyRegistered, aDeadAreas) { + getPlacementOfWidget(aWidgetId, aOnlyRegistered, aDeadAreas) { if (aOnlyRegistered && !this.widgetExists(aWidgetId)) { return null; } @@ -1756,14 +1756,14 @@ var CustomizableUIInternal = { } let index = placements.indexOf(aWidgetId); if (index != -1) { - return { area: area, position: index }; + return { area, position: index }; } } return null; }, - widgetExists: function(aWidgetId) { + widgetExists(aWidgetId) { if (gPalette.has(aWidgetId) || this.isSpecialWidget(aWidgetId)) { return true; } @@ -1778,7 +1778,7 @@ var CustomizableUIInternal = { return true; }, - addWidgetToArea: function(aWidgetId, aArea, aPosition, aInitialAdd) { + addWidgetToArea(aWidgetId, aArea, aPosition, aInitialAdd) { if (!gAreas.has(aArea)) { throw new Error("Unknown customization area: " + aArea); } @@ -1852,7 +1852,7 @@ var CustomizableUIInternal = { this.notifyListeners("onWidgetAdded", aWidgetId, aArea, aPosition); }, - removeWidgetFromArea: function(aWidgetId) { + removeWidgetFromArea(aWidgetId) { let oldPlacement = this.getPlacementOfWidget(aWidgetId, false, true); if (!oldPlacement) { return; @@ -1881,7 +1881,7 @@ var CustomizableUIInternal = { this.notifyListeners("onWidgetRemoved", aWidgetId, oldPlacement.area); }, - moveWidgetWithinArea: function(aWidgetId, aPosition) { + moveWidgetWithinArea(aWidgetId, aPosition) { let oldPlacement = this.getPlacementOfWidget(aWidgetId); if (!oldPlacement) { return; @@ -1930,7 +1930,7 @@ var CustomizableUIInternal = { // built lazily - and therefore wouldn't otherwise result in restoring its // state immediately when a browser window opens, which is important for // other consumers of this API. - loadSavedState: function() { + loadSavedState() { let state = null; try { state = Services.prefs.getCharPref(kPrefCustomizationState); @@ -1967,7 +1967,7 @@ var CustomizableUIInternal = { gNewElementCount = gSavedState.newElementCount || 0; }, - restoreStateForArea: function(aArea, aLegacyState) { + restoreStateForArea(aArea, aLegacyState) { let placementsPreexisted = gPlacements.has(aArea); this.beginBatchUpdate(); @@ -2031,7 +2031,7 @@ var CustomizableUIInternal = { } }, - saveState: function() { + saveState() { if (gInBatchStack || !gDirty) { return; } @@ -2061,7 +2061,7 @@ var CustomizableUIInternal = { gDirty = false; }, - serializerHelper: function(aKey, aValue) { + serializerHelper(aKey, aValue) { if (typeof aValue == "object" && aValue.constructor.name == "Map") { let result = {}; for (let [mapKey, mapValue] of aValue) @@ -2076,11 +2076,11 @@ var CustomizableUIInternal = { return aValue; }, - beginBatchUpdate: function() { + beginBatchUpdate() { gInBatchStack++; }, - endBatchUpdate: function(aForceDirty) { + endBatchUpdate(aForceDirty) { gInBatchStack--; if (aForceDirty === true) { gDirty = true; @@ -2092,11 +2092,11 @@ var CustomizableUIInternal = { } }, - addListener: function(aListener) { + addListener(aListener) { gListeners.add(aListener); }, - removeListener: function(aListener) { + removeListener(aListener) { if (aListener == this) { return; } @@ -2104,7 +2104,7 @@ var CustomizableUIInternal = { gListeners.delete(aListener); }, - notifyListeners: function(aEvent, ...aArgs) { + notifyListeners(aEvent, ...aArgs) { if (gRestoring) { return; } @@ -2120,7 +2120,7 @@ var CustomizableUIInternal = { } }, - _dispatchToolboxEventToWindow: function(aEventType, aDetails, aWindow) { + _dispatchToolboxEventToWindow(aEventType, aDetails, aWindow) { let evt = new aWindow.CustomEvent(aEventType, { bubbles: true, cancelable: true, @@ -2129,7 +2129,7 @@ var CustomizableUIInternal = { aWindow.gNavToolbox.dispatchEvent(evt); }, - dispatchToolboxEvent: function(aEventType, aDetails = {}, aWindow = null) { + dispatchToolboxEvent(aEventType, aDetails = {}, aWindow = null) { if (aWindow) { this._dispatchToolboxEventToWindow(aEventType, aDetails, aWindow); return; @@ -2139,7 +2139,7 @@ var CustomizableUIInternal = { } }, - createWidget: function(aProperties) { + createWidget(aProperties) { let widget = this.normalizeWidget(aProperties, CustomizableUI.SOURCE_EXTERNAL); // XXXunf This should probably throw. if (!widget) { @@ -2256,7 +2256,7 @@ var CustomizableUIInternal = { return widget.id; }, - createBuiltinWidget: function(aData) { + createBuiltinWidget(aData) { // This should only ever be called on startup, before any windows are // opened - so we know there's no build areas to handle. Also, builtin // widgets are expected to be (mostly) static, so shouldn't affect the @@ -2291,7 +2291,7 @@ var CustomizableUIInternal = { }, // Returns true if the area will eventually lazily restore (but hasn't yet). - isAreaLazy: function(aArea) { + isAreaLazy(aArea) { if (gPlacements.has(aArea)) { return false; } @@ -2299,7 +2299,7 @@ var CustomizableUIInternal = { }, // XXXunf Log some warnings here, when the data provided isn't up to scratch. - normalizeWidget: function(aData, aSource) { + normalizeWidget(aData, aSource) { let widget = { implementation: aData, source: aSource || CustomizableUI.SOURCE_EXTERNAL, @@ -2400,7 +2400,7 @@ var CustomizableUIInternal = { return widget; }, - wrapWidgetEventHandler: function(aEventName, aWidget) { + wrapWidgetEventHandler(aEventName, aWidget) { if (typeof aWidget.implementation[aEventName] != "function") { aWidget[aEventName] = null; return; @@ -2422,7 +2422,7 @@ var CustomizableUIInternal = { }; }, - destroyWidget: function(aWidgetId) { + destroyWidget(aWidgetId) { let widget = gPalette.get(aWidgetId); if (!widget) { gGroupWrapperCache.delete(aWidgetId); @@ -2489,7 +2489,7 @@ var CustomizableUIInternal = { this.notifyListeners("onWidgetDestroyed", aWidgetId); }, - getCustomizeTargetForArea: function(aArea, aWindow) { + getCustomizeTargetForArea(aArea, aWindow) { let buildAreaNodes = gBuildAreas.get(aArea); if (!buildAreaNodes) { return null; @@ -2504,7 +2504,7 @@ var CustomizableUIInternal = { return null; }, - reset: function() { + reset() { gResetting = true; this._resetUIState(); @@ -2524,7 +2524,7 @@ var CustomizableUIInternal = { gResetting = false; }, - _resetUIState: function() { + _resetUIState() { try { gUIStateBeforeReset.drawInTitlebar = Services.prefs.getBoolPref(kPrefDrawInTitlebar); gUIStateBeforeReset.uiCustomizationState = Services.prefs.getCharPref(kPrefCustomizationState); @@ -2550,7 +2550,7 @@ var CustomizableUIInternal = { } }, - _resetExtraToolbars: function(aFilter = null) { + _resetExtraToolbars(aFilter = null) { let firstWindow = true; // Only need to unregister and persist once for (let [win, ] of gBuildWindows) { let toolbox = win.gNavToolbox; @@ -2572,7 +2572,7 @@ var CustomizableUIInternal = { } }, - _rebuildRegisteredAreas: function() { + _rebuildRegisteredAreas() { for (let [areaId, areaNodes] of gBuildAreas) { let placements = gPlacements.get(areaId); let isFirstChangedToolbar = true; @@ -2595,7 +2595,7 @@ var CustomizableUIInternal = { /** * Undoes a previous reset, restoring the state of the UI to the state prior to the reset. */ - undoReset: function() { + undoReset() { if (gUIStateBeforeReset.uiCustomizationState == null || gUIStateBeforeReset.drawInTitlebar == null) { return; @@ -2627,13 +2627,13 @@ var CustomizableUIInternal = { gUndoResetting = false; }, - _clearPreviousUIState: function() { + _clearPreviousUIState() { Object.getOwnPropertyNames(gUIStateBeforeReset).forEach((prop) => { gUIStateBeforeReset[prop] = null; }); }, - removeExtraToolbar: function(aToolbarId) { + removeExtraToolbar(aToolbarId) { this._resetExtraToolbars(aToolbarId); }, @@ -2641,7 +2641,7 @@ var CustomizableUIInternal = { * @param {String|Node} aWidget - widget ID or a widget node (preferred for performance). * @return {Boolean} whether the widget is removable */ - isWidgetRemovable: function(aWidget) { + isWidgetRemovable(aWidget) { let widgetId; let widgetNode; if (typeof aWidget == "string") { @@ -2684,7 +2684,7 @@ var CustomizableUIInternal = { return true; }, - canWidgetMoveToArea: function(aWidgetId, aArea) { + canWidgetMoveToArea(aWidgetId, aArea) { let placement = this.getPlacementOfWidget(aWidgetId); if (placement && placement.area != aArea) { // Special widgets can't move to the menu panel. @@ -2699,7 +2699,7 @@ var CustomizableUIInternal = { return true; }, - ensureWidgetPlacedInWindow: function(aWidgetId, aWindow) { + ensureWidgetPlacedInWindow(aWidgetId, aWindow) { let placement = this.getPlacementOfWidget(aWidgetId); if (!placement) { return false; @@ -2799,7 +2799,7 @@ var CustomizableUIInternal = { return true; }, - setToolbarVisibility: function(aToolbarId, aIsVisible) { + setToolbarVisibility(aToolbarId, aIsVisible) { // We only persist the attribute the first time. let isFirstChangedToolbar = true; for (let window of CustomizableUI.windows) { @@ -3003,14 +3003,14 @@ this.CustomizableUI = { * or by a window closing. The aReason parameter indicates which of * these is the case. */ - addListener: function(aListener) { + addListener(aListener) { CustomizableUIInternal.addListener(aListener); }, /** * Remove a listener added with addListener * @param aListener the listener object to remove */ - removeListener: function(aListener) { + removeListener(aListener) { CustomizableUIInternal.removeListener(aListener); }, @@ -3036,7 +3036,7 @@ this.CustomizableUI = { * Specify null to ensure that reset/inDefaultArea don't care * about a toolbar's collapsed state */ - registerArea: function(aName, aProperties) { + registerArea(aName, aProperties) { CustomizableUIInternal.registerArea(aName, aProperties); }, /** @@ -3055,7 +3055,7 @@ this.CustomizableUI = { * allow the user to customize it in customize mode, or otherwise deal * with it, until the area has been registered. */ - registerToolbarNode: function(aToolbar, aExistingChildren) { + registerToolbarNode(aToolbar, aExistingChildren) { CustomizableUIInternal.registerToolbarNode(aToolbar, aExistingChildren); }, /** @@ -3063,7 +3063,7 @@ this.CustomizableUI = { * apart from the built-in PanelUI. * @param aPanel the panel DOM node being registered. */ - registerMenuPanel: function(aPanel) { + registerMenuPanel(aPanel) { CustomizableUIInternal.registerMenuPanel(aPanel); }, /** @@ -3087,7 +3087,7 @@ this.CustomizableUI = { * @param aDestroyPlacements whether to destroy the placements information * for the area, too. */ - unregisterArea: function(aName, aDestroyPlacements) { + unregisterArea(aName, aDestroyPlacements) { CustomizableUIInternal.unregisterArea(aName, aDestroyPlacements); }, /** @@ -3112,7 +3112,7 @@ this.CustomizableUI = { * pass a position, the widget will be added to the end * of the area. */ - addWidgetToArea: function(aWidgetId, aArea, aPosition) { + addWidgetToArea(aWidgetId, aArea, aPosition) { CustomizableUIInternal.addWidgetToArea(aWidgetId, aArea, aPosition); }, /** @@ -3124,7 +3124,7 @@ this.CustomizableUI = { * * @param aWidgetId the ID of the widget to remove */ - removeWidgetFromArea: function(aWidgetId) { + removeWidgetFromArea(aWidgetId) { CustomizableUIInternal.removeWidgetFromArea(aWidgetId); }, /** @@ -3142,7 +3142,7 @@ this.CustomizableUI = { * widgets will be interpreted to mean moving the widget to * respectively the first or last position. */ - moveWidgetWithinArea: function(aWidgetId, aPosition) { + moveWidgetWithinArea(aWidgetId, aPosition) { CustomizableUIInternal.moveWidgetWithinArea(aWidgetId, aPosition); }, /** @@ -3161,7 +3161,7 @@ this.CustomizableUI = { * presumably you yourself need to create the widget in all the windows * and need to loop through them anyway. */ - ensureWidgetPlacedInWindow: function(aWidgetId, aWindow) { + ensureWidgetPlacedInWindow(aWidgetId, aWindow) { return CustomizableUIInternal.ensureWidgetPlacedInWindow(aWidgetId, aWindow); }, /** @@ -3176,7 +3176,7 @@ this.CustomizableUI = { * Firefox session, customization state is never saved. Typically, you * would do this using a try...finally block. */ - beginBatchUpdate: function() { + beginBatchUpdate() { CustomizableUIInternal.beginBatchUpdate(); }, /** @@ -3191,7 +3191,7 @@ this.CustomizableUI = { * @param aForceDirty force CustomizableUI to flush to the prefs file when * all batch updates have finished. */ - endBatchUpdate: function(aForceDirty) { + endBatchUpdate(aForceDirty) { CustomizableUIInternal.endBatchUpdate(aForceDirty); }, /** @@ -3267,7 +3267,7 @@ this.CustomizableUI = { * @param aProperties the specifications for the widget. * @return a wrapper around the created widget (see getWidget) */ - createWidget: function(aProperties) { + createWidget(aProperties) { return CustomizableUIInternal.wrapWidget( CustomizableUIInternal.createWidget(aProperties) ); @@ -3283,7 +3283,7 @@ this.CustomizableUI = { * * @param aWidgetId the ID of the widget to destroy */ - destroyWidget: function(aWidgetId) { + destroyWidget(aWidgetId) { CustomizableUIInternal.destroyWidget(aWidgetId); }, /** @@ -3346,7 +3346,7 @@ this.CustomizableUI = { * is no guarantee the widget exists because we cannot know in * advance if a XUL widget exists or not. */ - getWidget: function(aWidgetId) { + getWidget(aWidgetId) { return CustomizableUIInternal.wrapWidget(aWidgetId); }, /** @@ -3363,7 +3363,7 @@ this.CustomizableUI = { * * @return an array of widget wrappers (see getWidget) */ - getUnusedWidgets: function(aWindowPalette) { + getUnusedWidgets(aWindowPalette) { return CustomizableUIInternal.getUnusedWidgets(aWindowPalette).map( CustomizableUIInternal.wrapWidget, CustomizableUIInternal @@ -3380,7 +3380,7 @@ this.CustomizableUI = { * NB: will throw if called too early (before placements have been fetched) * or if the area is not currently known to CustomizableUI. */ - getWidgetIdsInArea: function(aArea) { + getWidgetIdsInArea(aArea) { if (!gAreas.has(aArea)) { throw new Error("Unknown customization area: " + aArea); } @@ -3406,7 +3406,7 @@ this.CustomizableUI = { * NB: will throw if called too early (before placements have been fetched) * or if the area is not currently known to CustomizableUI. */ - getWidgetsInArea: function(aArea) { + getWidgetsInArea(aArea) { return this.getWidgetIdsInArea(aArea).map( CustomizableUIInternal.wrapWidget, CustomizableUIInternal @@ -3430,7 +3430,7 @@ this.CustomizableUI = { * @return TYPE_TOOLBAR or TYPE_MENU_PANEL depending on the area, null if * the area is unknown. */ - getAreaType: function(aArea) { + getAreaType(aArea) { let area = gAreas.get(aArea); return area ? area.get("type") : null; }, @@ -3441,7 +3441,7 @@ this.CustomizableUI = { * @return `true` or `false` depending on the area, null if the area is unknown, * or its collapsed state cannot normally be controlled by the user */ - isToolbarDefaultCollapsed: function(aArea) { + isToolbarDefaultCollapsed(aArea) { let area = gAreas.get(aArea); return area ? area.get("defaultCollapsed") : null; }, @@ -3469,7 +3469,7 @@ this.CustomizableUI = { * @param aWindow the window where you want to fetch the DOM node. * @return the customize target DOM node for aArea in aWindow */ - getCustomizeTargetForArea: function(aArea, aWindow) { + getCustomizeTargetForArea(aArea, aWindow) { return CustomizableUIInternal.getCustomizeTargetForArea(aArea, aWindow); }, /** @@ -3479,7 +3479,7 @@ this.CustomizableUI = { * explicitly requests it. Firefox does this when the user clicks the * "Restore Defaults" button in customize mode. */ - reset: function() { + reset() { CustomizableUIInternal.reset(); }, @@ -3487,7 +3487,7 @@ this.CustomizableUI = { * Undo the previous reset, can only be called immediately after a reset. * @return a promise that will be resolved when the operation is complete. */ - undoReset: function() { + undoReset() { CustomizableUIInternal.undoReset(); }, @@ -3498,7 +3498,7 @@ this.CustomizableUI = { * other consumers. * @param aToolbarId the ID of the toolbar to remove */ - removeExtraToolbar: function(aToolbarId) { + removeExtraToolbar(aToolbarId) { CustomizableUIInternal.removeExtraToolbar(aToolbarId); }, @@ -3532,7 +3532,7 @@ this.CustomizableUI = { * * null // if the widget is not placed anywhere (ie in the palette) */ - getPlacementOfWidget: function(aWidgetId, aOnlyRegistered = true, aDeadAreas = false) { + getPlacementOfWidget(aWidgetId, aOnlyRegistered = true, aDeadAreas = false) { return CustomizableUIInternal.getPlacementOfWidget(aWidgetId, aOnlyRegistered, aDeadAreas); }, /** @@ -3553,7 +3553,7 @@ this.CustomizableUI = { * @return true if the widget can be removed from its area, * false otherwise. */ - isWidgetRemovable: function(aWidgetId) { + isWidgetRemovable(aWidgetId) { return CustomizableUIInternal.isWidgetRemovable(aWidgetId); }, /** @@ -3566,7 +3566,7 @@ this.CustomizableUI = { * @return true if this is possible, false if it is not. The same caveats as * for isWidgetRemovable apply, however, if no windows are open. */ - canWidgetMoveToArea: function(aWidgetId, aArea) { + canWidgetMoveToArea(aWidgetId, aArea) { return CustomizableUIInternal.canWidgetMoveToArea(aWidgetId, aArea); }, /** @@ -3587,7 +3587,7 @@ this.CustomizableUI = { * @param aToolbarId the toolbar whose visibility should be adjusted * @param aIsVisible whether the toolbar should be visible */ - setToolbarVisibility: function(aToolbarId, aIsVisible) { + setToolbarVisibility(aToolbarId, aIsVisible) { CustomizableUIInternal.setToolbarVisibility(aToolbarId, aIsVisible); }, @@ -3614,7 +3614,7 @@ this.CustomizableUI = { * otherwise we'll return the empty string * */ - getLocalizedProperty: function(aWidget, aProp, aFormatArgs, aDef) { + getLocalizedProperty(aWidget, aProp, aFormatArgs, aDef) { return CustomizableUIInternal.getLocalizedProperty(aWidget, aProp, aFormatArgs, aDef); }, @@ -3627,7 +3627,7 @@ this.CustomizableUI = { * attribute will be set. If NULL, the shortcut will be * set on aShortcutNode; */ - addShortcut: function(aShortcutNode, aTargetNode) { + addShortcut(aShortcutNode, aTargetNode) { return CustomizableUIInternal.addShortcut(aShortcutNode, aTargetNode); }, /** @@ -3636,7 +3636,7 @@ this.CustomizableUI = { * * @param aNode a node whose panel should be closed; */ - hidePanelForNode: function(aNode) { + hidePanelForNode(aNode) { CustomizableUIInternal.hidePanelForNode(aNode); }, /** @@ -3645,7 +3645,7 @@ this.CustomizableUI = { * @param aWidgetId the widget ID to check. * @return true if the widget is 'special', false otherwise. */ - isSpecialWidget: function(aWidgetId) { + isSpecialWidget(aWidgetId) { return CustomizableUIInternal.isSpecialWidget(aWidgetId); }, /** @@ -3655,7 +3655,7 @@ this.CustomizableUI = { * * @param aPanel the panel to which listeners should be attached. */ - addPanelCloseListeners: function(aPanel) { + addPanelCloseListeners(aPanel) { CustomizableUIInternal.addPanelCloseListeners(aPanel); }, /** @@ -3665,7 +3665,7 @@ this.CustomizableUI = { * * @param aPanel the panel from which listeners should be removed. */ - removePanelCloseListeners: function(aPanel) { + removePanelCloseListeners(aPanel) { CustomizableUIInternal.removePanelCloseListeners(aPanel); }, /** @@ -3675,7 +3675,7 @@ this.CustomizableUI = { * @param aWidgetId the ID of the widget that is being dragged to an area. * @param aArea the ID of the area to which the widget is being dragged. */ - onWidgetDrag: function(aWidgetId, aArea) { + onWidgetDrag(aWidgetId, aArea) { CustomizableUIInternal.notifyListeners("onWidgetDrag", aWidgetId, aArea); }, /** @@ -3683,7 +3683,7 @@ this.CustomizableUI = { * Customize Mode only, do not use otherwise. * @param aWindow the window entering customize mode */ - notifyStartCustomizing: function(aWindow) { + notifyStartCustomizing(aWindow) { CustomizableUIInternal.notifyListeners("onCustomizeStart", aWindow); }, /** @@ -3691,7 +3691,7 @@ this.CustomizableUI = { * Customize Mode only, do not use otherwise. * @param aWindow the window exiting customize mode */ - notifyEndCustomizing: function(aWindow) { + notifyEndCustomizing(aWindow) { CustomizableUIInternal.notifyListeners("onCustomizeEnd", aWindow); }, @@ -3703,7 +3703,7 @@ this.CustomizableUI = { * @param aDetails optional, the details of the event. * @param aWindow optional, the window in which to send the event. */ - dispatchToolboxEvent: function(aEvent, aDetails = {}, aWindow = null) { + dispatchToolboxEvent(aEvent, aDetails = {}, aWindow = null) { CustomizableUIInternal.dispatchToolboxEvent(aEvent, aDetails, aWindow); }, @@ -3713,7 +3713,7 @@ this.CustomizableUI = { * @param aAreaId the ID of an area to check for overflowable-ness * @return true if the area is overflowable, false otherwise. */ - isAreaOverflowable: function(aAreaId) { + isAreaOverflowable(aAreaId) { let area = gAreas.get(aAreaId); return area ? area.get("type") == this.TYPE_TOOLBAR && area.get("overflowable") : false; @@ -3728,7 +3728,7 @@ this.CustomizableUI = { * menu panel, "palette" if it is in the (visible!) customization * palette, undefined otherwise. */ - getPlaceForItem: function(aElement) { + getPlaceForItem(aElement) { let place; let node = aElement; while (node && !place) { @@ -3748,7 +3748,7 @@ this.CustomizableUI = { * Check if a toolbar is builtin or not. * @param aToolbarId the ID of the toolbar you want to check */ - isBuiltinToolbar: function(aToolbarId) { + isBuiltinToolbar(aToolbarId) { return CustomizableUIInternal._builtinToolbars.has(aToolbarId); }, }; @@ -4038,7 +4038,7 @@ OverflowableToolbar.prototype = { initialized: false, _forceOnOverflow: false, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (aTopic == "browser-delayed-startup-finished" && aSubject == this._toolbar.ownerGlobal) { Services.obs.removeObserver(this, "browser-delayed-startup-finished"); @@ -4046,7 +4046,7 @@ OverflowableToolbar.prototype = { } }, - init: function() { + init() { let doc = this._toolbar.ownerDocument; let window = doc.defaultView; window.addEventListener("resize", this); @@ -4075,7 +4075,7 @@ OverflowableToolbar.prototype = { this.initialized = true; }, - uninit: function() { + uninit() { this._toolbar.removeEventListener("overflow", this._toolbar); this._toolbar.removeEventListener("underflow", this._toolbar); this._toolbar.removeAttribute("overflowable"); @@ -4099,7 +4099,7 @@ OverflowableToolbar.prototype = { CustomizableUIInternal.removePanelCloseListeners(this._panel); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "aftercustomization": this._enable(); @@ -4128,7 +4128,7 @@ OverflowableToolbar.prototype = { } }, - show: function() { + show() { if (this._panel.state == "open") { return Promise.resolve(); } @@ -4151,7 +4151,7 @@ OverflowableToolbar.prototype = { }); }, - _onClickChevron: function(aEvent) { + _onClickChevron(aEvent) { if (this._chevron.open) { this._panel.hidePopup(); this._chevron.open = false; @@ -4160,7 +4160,7 @@ OverflowableToolbar.prototype = { } }, - _onPanelHiding: function(aEvent) { + _onPanelHiding(aEvent) { this._chevron.open = false; this._panel.removeEventListener("dragover", this); this._panel.removeEventListener("dragend", this); @@ -4169,7 +4169,7 @@ OverflowableToolbar.prototype = { gELS.removeSystemEventListener(contextMenu, 'command', this, true); }, - onOverflow: function(aEvent) { + onOverflow(aEvent) { // The rangeParent check is here because of bug 1111986 and ensuring that // overflow events from the bookmarks toolbar items or similar things that // manage their own overflow don't trigger an overflow on the entire toolbar @@ -4202,7 +4202,7 @@ OverflowableToolbar.prototype = { win.UpdateUrlbarSearchSplitterState(); }, - _onResize: function(aEvent) { + _onResize(aEvent) { if (!this._lazyResizeHandler) { this._lazyResizeHandler = new DeferredTask(this._onLazyResize.bind(this), LAZY_RESIZE_INTERVAL_MS); @@ -4210,7 +4210,7 @@ OverflowableToolbar.prototype = { this._lazyResizeHandler.arm(); }, - _moveItemsBackToTheirOrigin: function(shouldMoveAllItems) { + _moveItemsBackToTheirOrigin(shouldMoveAllItems) { let placements = gPlacements.get(this._toolbar.id); while (this._list.firstChild) { let child = this._list.firstChild; @@ -4256,7 +4256,7 @@ OverflowableToolbar.prototype = { } }, - _onLazyResize: function() { + _onLazyResize() { if (!this._enabled) return; @@ -4267,7 +4267,7 @@ OverflowableToolbar.prototype = { } }, - _disable: function() { + _disable() { this._enabled = false; this._moveItemsBackToTheirOrigin(true); if (this._lazyResizeHandler) { @@ -4275,12 +4275,12 @@ OverflowableToolbar.prototype = { } }, - _enable: function() { + _enable() { this._enabled = true; this.onOverflow(); }, - onWidgetBeforeDOMChange: function(aNode, aNextNode, aContainer) { + onWidgetBeforeDOMChange(aNode, aNextNode, aContainer) { if (aContainer != this._target && aContainer != this._list) { return; } @@ -4303,7 +4303,7 @@ OverflowableToolbar.prototype = { } }, - onWidgetAfterDOMChange: function(aNode, aNextNode, aContainer) { + onWidgetAfterDOMChange(aNode, aNextNode, aContainer) { if (aContainer != this._target && aContainer != this._list) { return; } @@ -4358,7 +4358,7 @@ OverflowableToolbar.prototype = { } }, - findOverflowedInsertionPoints: function(aNode) { + findOverflowedInsertionPoints(aNode) { let newNodeCanOverflow = aNode.getAttribute("overflows") != "false"; let areaId = this._toolbar.id; let placements = gPlacements.get(areaId); @@ -4391,7 +4391,7 @@ OverflowableToolbar.prototype = { return [containerForAppending, null]; }, - getContainerFor: function(aNode) { + getContainerFor(aNode) { if (aNode.getAttribute("overflowedItem") == "true") { return this._list; } @@ -4399,7 +4399,7 @@ OverflowableToolbar.prototype = { }, _hideTimeoutId: null, - _showWithTimeout: function() { + _showWithTimeout() { this.show().then(function() { let window = this._toolbar.ownerGlobal; if (this._hideTimeoutId) { diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm index 6b1dc8ea1af6..6f30303afb49 100644 --- a/browser/components/customizableui/CustomizableWidgets.jsm +++ b/browser/components/customizableui/CustomizableWidgets.jsm @@ -178,7 +178,7 @@ const CustomizableWidgets = [ shortcutId: "key_gotoHistory", tooltiptext: "history-panelmenu.tooltiptext2", defaultArea: CustomizableUI.AREA_PANEL, - onViewShowing: function(aEvent) { + onViewShowing(aEvent) { // Populate our list of history const kMaxResults = 15; let doc = aEvent.target.ownerDocument; @@ -204,7 +204,7 @@ const CustomizableWidgets = [ PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase) .asyncExecuteLegacyQueries([query], 1, options, { - handleResult: function(aResultSet) { + handleResult(aResultSet) { let onItemCommand = function(aItemCommandEvent) { // Only handle the click event for middle clicks, we're using the command // event otherwise. @@ -237,10 +237,10 @@ const CustomizableWidgets = [ } items.appendChild(fragment); }, - handleError: function(aError) { + handleError(aError) { log.debug("History view tried to show but had an error: " + aError); }, - handleCompletion: function(aReason) { + handleCompletion(aReason) { log.debug("History view is being shown!"); }, }); @@ -280,7 +280,7 @@ const CustomizableWidgets = [ } recentlyClosedWindows.appendChild(windowsFragment); }, - onCreated: function(aNode) { + onCreated(aNode) { // Middle clicking recently closed items won't close the panel - cope: let onRecentlyClosedClick = function(aEvent) { if (aEvent.button == 1) { @@ -293,7 +293,7 @@ const CustomizableWidgets = [ recentlyClosedTabs.addEventListener("click", onRecentlyClosedClick); recentlyClosedWindows.addEventListener("click", onRecentlyClosedClick); }, - onViewHiding: function(aEvent) { + onViewHiding(aEvent) { log.debug("History view is being hidden!"); } }, { @@ -466,7 +466,7 @@ const CustomizableWidgets = [ appendTo.appendChild(messageLabel); return messageLabel; }, - _appendClient: function(client, attachFragment) { + _appendClient(client, attachFragment) { let doc = attachFragment.ownerDocument; // Create the element for the remote client. let clientItem = doc.createElementNS(kNSXUL, "label"); @@ -510,7 +510,7 @@ const CustomizableWidgets = [ id: "privatebrowsing-button", shortcutId: "key_privatebrowsing", defaultArea: CustomizableUI.AREA_PANEL, - onCommand: function(e) { + onCommand(e) { let win = e.target.ownerGlobal; win.OpenBrowserWindow({private: true}); } @@ -519,7 +519,7 @@ const CustomizableWidgets = [ shortcutId: "key_savePage", tooltiptext: "save-page-button.tooltiptext3", defaultArea: CustomizableUI.AREA_PANEL, - onCommand: function(aEvent) { + onCommand(aEvent) { let win = aEvent.target.ownerGlobal; win.saveBrowser(win.gBrowser.selectedBrowser); } @@ -528,7 +528,7 @@ const CustomizableWidgets = [ shortcutId: "key_find", tooltiptext: "find-button.tooltiptext3", defaultArea: CustomizableUI.AREA_PANEL, - onCommand: function(aEvent) { + onCommand(aEvent) { let win = aEvent.target.ownerGlobal; if (win.gFindBar) { win.gFindBar.onFindCommand(); @@ -539,7 +539,7 @@ const CustomizableWidgets = [ shortcutId: "openFileKb", tooltiptext: "open-file-button.tooltiptext3", defaultArea: CustomizableUI.AREA_PANEL, - onCommand: function(aEvent) { + onCommand(aEvent) { let win = aEvent.target.ownerGlobal; win.BrowserOpenFileWindow(); } @@ -548,7 +548,7 @@ const CustomizableWidgets = [ type: "view", viewId: "PanelUI-sidebar", tooltiptext: "sidebar-button.tooltiptext2", - onViewShowing: function(aEvent) { + onViewShowing(aEvent) { // Populate the subview with whatever menuitems are in the // sidebar menu. We skip menu elements, because the menu panel has no way // of dealing with those right now. @@ -565,7 +565,7 @@ const CustomizableWidgets = [ id: "social-share-button", // custom build our button so we can attach to the share command type: "custom", - onBuild: function(aDocument) { + onBuild(aDocument) { let node = aDocument.createElementNS(kNSXUL, "toolbarbutton"); node.setAttribute("id", this.id); node.classList.add("toolbarbutton-1"); @@ -607,7 +607,7 @@ const CustomizableWidgets = [ shortcutId: "key_openAddons", tooltiptext: "add-ons-button.tooltiptext3", defaultArea: CustomizableUI.AREA_PANEL, - onCommand: function(aEvent) { + onCommand(aEvent) { let win = aEvent.target.ownerGlobal; win.BrowserOpenAddonsMgr(); } @@ -616,7 +616,7 @@ const CustomizableWidgets = [ type: "custom", tooltiptext: "zoom-controls.tooltiptext2", defaultArea: CustomizableUI.AREA_PANEL, - onBuild: function(aDocument) { + onBuild(aDocument) { const kPanelId = "PanelUI-popup"; let areaType = CustomizableUI.getAreaType(this.currentArea); let inPanel = areaType == CustomizableUI.TYPE_MENU_PANEL; @@ -768,13 +768,13 @@ const CustomizableWidgets = [ container.removeEventListener("TabSelect", updateZoomResetButton); }.bind(this), - onCustomizeStart: function(aWindow) { + onCustomizeStart(aWindow) { if (aWindow.document == aDocument) { updateZoomResetButton(); } }, - onCustomizeEnd: function(aWindow) { + onCustomizeEnd(aWindow) { if (aWindow.document == aDocument) { updateZoomResetButton(); } @@ -796,7 +796,7 @@ const CustomizableWidgets = [ type: "custom", tooltiptext: "edit-controls.tooltiptext2", defaultArea: CustomizableUI.AREA_PANEL, - onBuild: function(aDocument) { + onBuild(aDocument) { let buttons = [{ id: "cut-button", command: "cmd_cut", @@ -894,7 +894,7 @@ const CustomizableWidgets = [ viewId: "PanelUI-feeds", tooltiptext: "feed-button.tooltiptext2", defaultArea: CustomizableUI.AREA_PANEL, - onClick: function(aEvent) { + onClick(aEvent) { let win = aEvent.target.ownerGlobal; let feeds = win.gBrowser.selectedBrowser.feeds; @@ -908,7 +908,7 @@ const CustomizableWidgets = [ CustomizableUI.hidePanelForNode(aEvent.target); } }, - onViewShowing: function(aEvent) { + onViewShowing(aEvent) { let doc = aEvent.target.ownerDocument; let container = doc.getElementById("PanelUI-feeds"); let gotView = doc.defaultView.FeedHandler.buildFeedList(container, true); @@ -920,7 +920,7 @@ const CustomizableWidgets = [ return; } }, - onCreated: function(node) { + onCreated(node) { let win = node.ownerGlobal; let selectedBrowser = win.gBrowser.selectedBrowser; let feeds = selectedBrowser && selectedBrowser.feeds; @@ -935,12 +935,12 @@ const CustomizableWidgets = [ viewId: "PanelUI-characterEncodingView", tooltiptext: "characterencoding-button2.tooltiptext", defaultArea: CustomizableUI.AREA_PANEL, - maybeDisableMenu: function(aDocument) { + maybeDisableMenu(aDocument) { let window = aDocument.defaultView; return !(window.gBrowser && window.gBrowser.selectedBrowser.mayEnableCharacterEncodingMenu); }, - populateList: function(aDocument, aContainerId, aSection) { + populateList(aDocument, aContainerId, aSection) { let containerElem = aDocument.getElementById(aContainerId); containerElem.addEventListener("command", this.onCommand, false); @@ -957,7 +957,7 @@ const CustomizableWidgets = [ containerElem.appendChild(elem); } }, - updateCurrentCharset: function(aDocument) { + updateCurrentCharset(aDocument) { let currentCharset = aDocument.defaultView.gBrowser.selectedBrowser.characterSet; currentCharset = CharsetMenu.foldCharset(currentCharset); @@ -967,7 +967,7 @@ const CustomizableWidgets = [ this._updateElements(elements, currentCharset); }, - updateCurrentDetector: function(aDocument) { + updateCurrentDetector(aDocument) { let detectorContainer = aDocument.getElementById("PanelUI-characterEncodingView-autodetect"); let currentDetector; try { @@ -977,7 +977,7 @@ const CustomizableWidgets = [ this._updateElements(detectorContainer.childNodes, currentDetector); }, - _updateElements: function(aElements, aCurrentItem) { + _updateElements(aElements, aCurrentItem) { if (!aElements.length) { return; } @@ -995,7 +995,7 @@ const CustomizableWidgets = [ } } }, - onViewShowing: function(aEvent) { + onViewShowing(aEvent) { let document = aEvent.target.ownerDocument; let autoDetectLabelId = "PanelUI-characterEncodingView-autodetect-label"; @@ -1016,7 +1016,7 @@ const CustomizableWidgets = [ this.updateCurrentDetector(document); this.updateCurrentCharset(document); }, - onCommand: function(aEvent) { + onCommand(aEvent) { let node = aEvent.target; if (!node.hasAttribute || !node.section) { return; @@ -1044,7 +1044,7 @@ const CustomizableWidgets = [ window.BrowserCharsetReload(); } }, - onCreated: function(aNode) { + onCreated(aNode) { const kPanelId = "PanelUI-popup"; let document = aNode.ownerDocument; @@ -1095,7 +1095,7 @@ const CustomizableWidgets = [ }, { id: "email-link-button", tooltiptext: "email-link-button.tooltiptext3", - onCommand: function(aEvent) { + onCommand(aEvent) { let win = aEvent.view; win.MailIntegration.sendLinkForBrowser(win.gBrowser.selectedBrowser) } @@ -1104,7 +1104,7 @@ const CustomizableWidgets = [ type: "view", viewId: "PanelUI-containers", hasObserver: false, - onCreated: function(aNode) { + onCreated(aNode) { let doc = aNode.ownerDocument; let win = doc.defaultView; let items = doc.getElementById("PanelUI-containersItems"); @@ -1129,7 +1129,7 @@ const CustomizableWidgets = [ this.hasObserver = true; } }, - onViewShowing: function(aEvent) { + onViewShowing(aEvent) { let doc = aEvent.target.ownerDocument; let items = doc.getElementById("PanelUI-containersItems"); @@ -1187,7 +1187,7 @@ const CustomizableWidgets = [ let preferencesButton = { id: "preferences-button", defaultArea: CustomizableUI.AREA_PANEL, - onCommand: function(aEvent) { + onCommand(aEvent) { let win = aEvent.target.ownerGlobal; win.openPreferences(); } @@ -1209,7 +1209,7 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) { type: "view", viewId: "PanelUI-panicView", _sanitizer: null, - _ensureSanitizer: function() { + _ensureSanitizer() { if (!this.sanitizer) { let scope = {}; Services.scriptloader.loadSubScript("chrome://browser/content/sanitize.js", @@ -1219,11 +1219,11 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) { this._sanitizer.ignoreTimespan = false; } }, - _getSanitizeRange: function(aDocument) { + _getSanitizeRange(aDocument) { let group = aDocument.getElementById("PanelUI-panic-timeSpan"); return this._Sanitizer.getClearRange(+group.value); }, - forgetButtonCalled: function(aEvent) { + forgetButtonCalled(aEvent) { let doc = aEvent.target.ownerDocument; this._ensureSanitizer(); this._sanitizer.range = this._getSanitizeRange(doc); @@ -1249,18 +1249,18 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) { } }); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "command": this.forgetButtonCalled(aEvent); break; } }, - onViewShowing: function(aEvent) { + onViewShowing(aEvent) { let forgetButton = aEvent.target.querySelector("#PanelUI-panic-view-button"); forgetButton.addEventListener("command", this); }, - onViewHiding: function(aEvent) { + onViewHiding(aEvent) { let forgetButton = aEvent.target.querySelector("#PanelUI-panic-view-button"); forgetButton.removeEventListener("command", this); }, @@ -1272,12 +1272,12 @@ if (AppConstants.E10S_TESTING_ONLY) { CustomizableWidgets.push({ id: "e10s-button", defaultArea: CustomizableUI.AREA_PANEL, - onBuild: function(aDocument) { + onBuild(aDocument) { let node = aDocument.createElementNS(kNSXUL, "toolbarbutton"); node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label")); node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext")); }, - onCommand: function(aEvent) { + onCommand(aEvent) { let win = aEvent.view; win.OpenBrowserWindow({remote: false}); }, diff --git a/browser/components/customizableui/CustomizeMode.jsm b/browser/components/customizableui/CustomizeMode.jsm index 655756cfb2f5..888708ac65ff 100644 --- a/browser/components/customizableui/CustomizeMode.jsm +++ b/browser/components/customizableui/CustomizeMode.jsm @@ -130,13 +130,13 @@ CustomizeMode.prototype = { return this.window.CustomizationHandler; }, - uninit: function() { + uninit() { if (AppConstants.CAN_DRAW_IN_TITLEBAR) { Services.prefs.removeObserver(kDrawInTitlebarPref, this); } }, - toggle: function() { + toggle() { if (this._handler.isEnteringCustomizeMode || this._handler.isExitingCustomizeMode) { this._wantToBeInCustomizeMode = !this._wantToBeInCustomizeMode; return; @@ -148,7 +148,7 @@ CustomizeMode.prototype = { } }, - _updateLWThemeButtonIcon: function() { + _updateLWThemeButtonIcon() { let lwthemeButton = this.document.getElementById("customization-lwtheme-button"); let lwthemeIcon = this.document.getAnonymousElementByAttribute(lwthemeButton, "class", "button-icon"); @@ -156,7 +156,7 @@ CustomizeMode.prototype = { "url(" + LightweightThemeManager.currentTheme.iconURL + ")" : ""; }, - setTab: function(aTab) { + setTab(aTab) { if (gTab == aTab) { return; } @@ -186,7 +186,7 @@ CustomizeMode.prototype = { } }, - enter: function() { + enter() { this._wantToBeInCustomizeMode = true; if (this._customizing || this._handler.isEnteringCustomizeMode) { @@ -380,7 +380,7 @@ CustomizeMode.prototype = { }.bind(this)); }, - exit: function() { + exit() { this._wantToBeInCustomizeMode = false; if (!this._customizing || this._handler.isExitingCustomizeMode) { @@ -557,7 +557,7 @@ CustomizeMode.prototype = { * phases, there is a "customizing" attribute set on the main-window to simplify * excluding certain styles while in any phase of customize mode. */ - _doTransition: function(aEntering) { + _doTransition(aEntering) { let deck = this.document.getElementById("content-deck"); let customizeTransitionEndPromise = new Promise(resolve => { let customizeTransitionEnd = (aEvent) => { @@ -603,7 +603,7 @@ CustomizeMode.prototype = { return customizeTransitionEndPromise; }, - updateLWTStyling: function(aData) { + updateLWTStyling(aData) { let docElement = this.document.documentElement; if (!aData) { let lwt = docElement._lightweightTheme; @@ -654,7 +654,7 @@ CustomizeMode.prototype = { docElement.style.removeProperty("background-color"); }, - removeLWTStyling: function() { + removeLWTStyling() { let affectedNodes = AppConstants.platform == "macosx" ? ["tab-view-deck", "titlebar"] : ["tab-view-deck"]; @@ -671,11 +671,11 @@ CustomizeMode.prototype = { } }, - _getHeaderImageRef: function(aData) { + _getHeaderImageRef(aData) { return "url(\"" + aData.headerURL.replace(/"/g, '\\"') + "\")"; }, - maybeShowTip: function(aAnchor) { + maybeShowTip(aAnchor) { let shown = false; const kShownPref = "browser.customizemode.tip0.shown"; try { @@ -711,11 +711,11 @@ CustomizeMode.prototype = { Services.prefs.setBoolPref(kShownPref, true); }, - hideTip: function() { + hideTip() { this.tipPanel.hidePopup(); }, - _getCustomizableChildForNode: function(aNode) { + _getCustomizableChildForNode(aNode) { // NB: adjusted from _getCustomizableParent to keep that method fast // (it's used during drags), and avoid multiple DOM loops let areas = CustomizableUI.areas; @@ -746,7 +746,7 @@ CustomizeMode.prototype = { return null; }, - addToToolbar: function(aNode) { + addToToolbar(aNode) { aNode = this._getCustomizableChildForNode(aNode); if (aNode.localName == "toolbarpaletteitem" && aNode.firstChild) { aNode = aNode.firstChild; @@ -757,7 +757,7 @@ CustomizeMode.prototype = { } }, - addToPanel: function(aNode) { + addToPanel(aNode) { aNode = this._getCustomizableChildForNode(aNode); if (aNode.localName == "toolbarpaletteitem" && aNode.firstChild) { aNode = aNode.firstChild; @@ -768,7 +768,7 @@ CustomizeMode.prototype = { } }, - removeFromArea: function(aNode) { + removeFromArea(aNode) { aNode = this._getCustomizableChildForNode(aNode); if (aNode.localName == "toolbarpaletteitem" && aNode.firstChild) { aNode = aNode.firstChild; @@ -779,7 +779,7 @@ CustomizeMode.prototype = { } }, - populatePalette: function() { + populatePalette() { let fragment = this.document.createDocumentFragment(); let toolboxPalette = this.window.gNavToolbox.palette; @@ -805,7 +805,7 @@ CustomizeMode.prototype = { // Would ensure no weird interactions/event handling from original node, // and makes it possible to put this in a lazy-loaded iframe/real tab // while still getting rid of the need for overlays. - makePaletteItem: function(aWidget, aPlace) { + makePaletteItem(aWidget, aPlace) { let widgetNode = aWidget.forWindow(this.window).node; if (!widgetNode) { log.error("Widget with id " + aWidget.id + " does not return a valid node"); @@ -821,7 +821,7 @@ CustomizeMode.prototype = { return wrapper; }, - depopulatePalette: function() { + depopulatePalette() { return Task.spawn(function*() { this.visiblePalette.hidden = true; let paletteChild = this.visiblePalette.firstChild; @@ -851,7 +851,7 @@ CustomizeMode.prototype = { }.bind(this)).then(null, log.error); }, - isCustomizableItem: function(aNode) { + isCustomizableItem(aNode) { return aNode.localName == "toolbarbutton" || aNode.localName == "toolbaritem" || aNode.localName == "toolbarseparator" || @@ -859,11 +859,11 @@ CustomizeMode.prototype = { aNode.localName == "toolbarspacer"; }, - isWrappedToolbarItem: function(aNode) { + isWrappedToolbarItem(aNode) { return aNode.localName == "toolbarpaletteitem"; }, - deferredWrapToolbarItem: function(aNode, aPlace) { + deferredWrapToolbarItem(aNode, aPlace) { return new Promise(resolve => { dispatchFunction(() => { let wrapper = this.wrapToolbarItem(aNode, aPlace); @@ -872,7 +872,7 @@ CustomizeMode.prototype = { }); }, - wrapToolbarItem: function(aNode, aPlace) { + wrapToolbarItem(aNode, aPlace) { if (!this.isCustomizableItem(aNode)) { return aNode; } @@ -890,7 +890,7 @@ CustomizeMode.prototype = { return wrapper; }, - createOrUpdateWrapper: function(aNode, aPlace, aIsUpdate) { + createOrUpdateWrapper(aNode, aPlace, aIsUpdate) { let wrapper; if (aIsUpdate && aNode.parentNode && aNode.parentNode.localName == "toolbarpaletteitem") { wrapper = aNode.parentNode; @@ -980,7 +980,7 @@ CustomizeMode.prototype = { return wrapper; }, - deferredUnwrapToolbarItem: function(aWrapper) { + deferredUnwrapToolbarItem(aWrapper) { return new Promise(resolve => { dispatchFunction(() => { let item = null; @@ -994,7 +994,7 @@ CustomizeMode.prototype = { }); }, - unwrapToolbarItem: function(aWrapper) { + unwrapToolbarItem(aWrapper) { if (aWrapper.nodeName != "toolbarpaletteitem") { return aWrapper; } @@ -1045,7 +1045,7 @@ CustomizeMode.prototype = { return toolbarItem; }, - _wrapToolbarItem: function*(aArea) { + *_wrapToolbarItem(aArea) { let target = CustomizableUI.getCustomizeTargetForArea(aArea, this.window); if (!target || this.areas.has(target)) { return null; @@ -1061,7 +1061,7 @@ CustomizeMode.prototype = { return target; }, - _wrapToolbarItemSync: function(aArea) { + _wrapToolbarItemSync(aArea) { let target = CustomizableUI.getCustomizeTargetForArea(aArea, this.window); if (!target || this.areas.has(target)) { return null; @@ -1082,13 +1082,13 @@ CustomizeMode.prototype = { return target; }, - _wrapToolbarItems: function*() { + *_wrapToolbarItems() { for (let area of CustomizableUI.areas) { yield this._wrapToolbarItem(area); } }, - _addDragHandlers: function(aTarget) { + _addDragHandlers(aTarget) { aTarget.addEventListener("dragstart", this, true); aTarget.addEventListener("dragover", this, true); aTarget.addEventListener("dragexit", this, true); @@ -1096,7 +1096,7 @@ CustomizeMode.prototype = { aTarget.addEventListener("dragend", this, true); }, - _wrapItemsInArea: function(target) { + _wrapItemsInArea(target) { for (let child of target.children) { if (this.isCustomizableItem(child)) { this.wrapToolbarItem(child, CustomizableUI.getPlaceForItem(child)); @@ -1104,7 +1104,7 @@ CustomizeMode.prototype = { } }, - _removeDragHandlers: function(aTarget) { + _removeDragHandlers(aTarget) { aTarget.removeEventListener("dragstart", this, true); aTarget.removeEventListener("dragover", this, true); aTarget.removeEventListener("dragexit", this, true); @@ -1112,7 +1112,7 @@ CustomizeMode.prototype = { aTarget.removeEventListener("dragend", this, true); }, - _unwrapItemsInArea: function(target) { + _unwrapItemsInArea(target) { for (let toolbarItem of target.children) { if (this.isWrappedToolbarItem(toolbarItem)) { this.unwrapToolbarItem(toolbarItem); @@ -1120,7 +1120,7 @@ CustomizeMode.prototype = { } }, - _unwrapToolbarItems: function() { + _unwrapToolbarItems() { return Task.spawn(function*() { for (let target of this.areas) { for (let toolbarItem of target.children) { @@ -1134,7 +1134,7 @@ CustomizeMode.prototype = { }.bind(this)).then(null, log.error); }, - _removeExtraToolbarsIfEmpty: function() { + _removeExtraToolbarsIfEmpty() { let toolbox = this.window.gNavToolbox; for (let child of toolbox.children) { if (child.hasAttribute("customindex")) { @@ -1146,7 +1146,7 @@ CustomizeMode.prototype = { } }, - persistCurrentSets: function(aSetBeforePersisting) { + persistCurrentSets(aSetBeforePersisting) { let document = this.document; let toolbars = document.querySelectorAll("toolbar[customizable='true'][currentset]"); for (let toolbar of toolbars) { @@ -1159,7 +1159,7 @@ CustomizeMode.prototype = { } }, - reset: function() { + reset() { this.resetting = true; // Disable the reset button temporarily while resetting: let btn = this.document.getElementById("customization-reset-button"); @@ -1190,7 +1190,7 @@ CustomizeMode.prototype = { }.bind(this)).then(null, log.error); }, - undoReset: function() { + undoReset() { this.resetting = true; return Task.spawn(function*() { @@ -1214,7 +1214,7 @@ CustomizeMode.prototype = { }.bind(this)).then(null, log.error); }, - _onToolbarVisibilityChange: function(aEvent) { + _onToolbarVisibilityChange(aEvent) { let toolbar = aEvent.target; if (aEvent.detail.visible && toolbar.getAttribute("customizable") == "true") { toolbar.setAttribute("customizing", "true"); @@ -1225,19 +1225,19 @@ CustomizeMode.prototype = { this.updateLWTStyling(); }, - onWidgetMoved: function(aWidgetId, aArea, aOldPosition, aNewPosition) { + onWidgetMoved(aWidgetId, aArea, aOldPosition, aNewPosition) { this._onUIChange(); }, - onWidgetAdded: function(aWidgetId, aArea, aPosition) { + onWidgetAdded(aWidgetId, aArea, aPosition) { this._onUIChange(); }, - onWidgetRemoved: function(aWidgetId, aArea) { + onWidgetRemoved(aWidgetId, aArea) { this._onUIChange(); }, - onWidgetBeforeDOMChange: function(aNodeToChange, aSecondaryNode, aContainer) { + onWidgetBeforeDOMChange(aNodeToChange, aSecondaryNode, aContainer) { if (aContainer.ownerGlobal != this.window || this.resetting) { return; } @@ -1254,7 +1254,7 @@ CustomizeMode.prototype = { } }, - onWidgetAfterDOMChange: function(aNodeToChange, aSecondaryNode, aContainer) { + onWidgetAfterDOMChange(aNodeToChange, aSecondaryNode, aContainer) { if (aContainer.ownerGlobal != this.window || this.resetting) { return; } @@ -1284,7 +1284,7 @@ CustomizeMode.prototype = { } }, - onWidgetDestroyed: function(aWidgetId) { + onWidgetDestroyed(aWidgetId) { let wrapper = this.document.getElementById("wrapper-" + aWidgetId); if (wrapper) { let wasInPanel = wrapper.parentNode == this.panelUIContents; @@ -1295,7 +1295,7 @@ CustomizeMode.prototype = { } }, - onWidgetAfterCreation: function(aWidgetId, aArea) { + onWidgetAfterCreation(aWidgetId, aArea) { // If the node was added to an area, we would have gotten an onWidgetAdded notification, // plus associated DOM change notifications, so only do stuff for the palette: if (!aArea) { @@ -1309,7 +1309,7 @@ CustomizeMode.prototype = { } }, - onAreaNodeRegistered: function(aArea, aContainer) { + onAreaNodeRegistered(aArea, aContainer) { if (aContainer.ownerDocument == this.document) { this._wrapItemsInArea(aContainer); this._addDragHandlers(aContainer); @@ -1318,7 +1318,7 @@ CustomizeMode.prototype = { } }, - onAreaNodeUnregistered: function(aArea, aContainer, aReason) { + onAreaNodeUnregistered(aArea, aContainer, aReason) { if (aContainer.ownerDocument == this.document && aReason == CustomizableUI.REASON_AREA_UNREGISTERED) { this._unwrapItemsInArea(aContainer); this._removeDragHandlers(aContainer); @@ -1327,18 +1327,18 @@ CustomizeMode.prototype = { } }, - openAddonsManagerThemes: function(aEvent) { + openAddonsManagerThemes(aEvent) { aEvent.target.parentNode.parentNode.hidePopup(); this.window.BrowserOpenAddonsMgr('addons://list/theme'); }, - getMoreThemes: function(aEvent) { + getMoreThemes(aEvent) { aEvent.target.parentNode.parentNode.hidePopup(); let getMoreURL = Services.urlFormatter.formatURLPref("lightweightThemes.getMoreURL"); this.window.openUILinkIn(getMoreURL, "tab"); }, - onLWThemesMenuShowing: function(aEvent) { + onLWThemesMenuShowing(aEvent) { const DEFAULT_THEME_ID = "{972ce4c6-7e08-4474-a285-3208198ce6fd}"; const RECENT_LWT_COUNT = 5; @@ -1443,7 +1443,7 @@ CustomizeMode.prototype = { }.bind(this)); }, - _clearLWThemesMenu: function(panel) { + _clearLWThemesMenu(panel) { let footer = this.document.getElementById("customization-lwtheme-menu-footer"); let recommendedLabel = this.document.getElementById("customization-lwtheme-menu-recommended"); for (let element of [footer, recommendedLabel]) { @@ -1457,7 +1457,7 @@ CustomizeMode.prototype = { panel.removeAttribute("height"); }, - _onUIChange: function() { + _onUIChange() { this._changed = true; if (!this.resetting) { this._updateResetButton(); @@ -1467,22 +1467,22 @@ CustomizeMode.prototype = { CustomizableUI.dispatchToolboxEvent("customizationchange"); }, - _updateEmptyPaletteNotice: function() { + _updateEmptyPaletteNotice() { let paletteItems = this.visiblePalette.getElementsByTagName("toolbarpaletteitem"); this.paletteEmptyNotice.hidden = !!paletteItems.length; }, - _updateResetButton: function() { + _updateResetButton() { let btn = this.document.getElementById("customization-reset-button"); btn.disabled = CustomizableUI.inDefaultState; }, - _updateUndoResetButton: function() { + _updateUndoResetButton() { let undoResetButton = this.document.getElementById("customization-undo-reset-button"); undoResetButton.hidden = !CustomizableUI.canUndoReset; }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "toolbarvisibilitychange": this._onToolbarVisibilityChange(aEvent); @@ -1525,7 +1525,7 @@ CustomizeMode.prototype = { } }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { switch (aTopic) { case "nsPref:changed": this._updateResetButton(); @@ -1547,7 +1547,7 @@ CustomizeMode.prototype = { } }, - _updateTitlebarButton: function() { + _updateTitlebarButton() { if (!AppConstants.CAN_DRAW_IN_TITLEBAR) { return; } @@ -1564,7 +1564,7 @@ CustomizeMode.prototype = { } }, - toggleTitlebar: function(aShouldShowTitlebar) { + toggleTitlebar(aShouldShowTitlebar) { if (!AppConstants.CAN_DRAW_IN_TITLEBAR) { return; } @@ -1572,7 +1572,7 @@ CustomizeMode.prototype = { Services.prefs.setBoolPref(kDrawInTitlebarPref, !aShouldShowTitlebar); }, - _onDragStart: function(aEvent) { + _onDragStart(aEvent) { __dumpDragData(aEvent); let item = aEvent.target; while (item && item.localName != "toolbarpaletteitem") { @@ -1629,7 +1629,7 @@ CustomizeMode.prototype = { this._dragInitializeTimeout = this.window.setTimeout(this._initializeDragAfterMove, 0); }, - _onDragOver: function(aEvent) { + _onDragOver(aEvent) { if (this._isUnwantedDragDrop(aEvent)) { return; } @@ -1726,7 +1726,7 @@ CustomizeMode.prototype = { aEvent.stopPropagation(); }, - _onDragDrop: function(aEvent) { + _onDragDrop(aEvent) { if (this._isUnwantedDragDrop(aEvent)) { return; } @@ -1779,7 +1779,7 @@ CustomizeMode.prototype = { this._showPanelCustomizationPlaceholders(); }, - _applyDrop: function(aEvent, aTargetArea, aOriginArea, aDraggedItemId, aTargetNode) { + _applyDrop(aEvent, aTargetArea, aOriginArea, aDraggedItemId, aTargetNode) { let document = aEvent.target.ownerDocument; let draggedItem = document.getElementById(aDraggedItemId); draggedItem.hidden = false; @@ -1908,7 +1908,7 @@ CustomizeMode.prototype = { } }, - _onDragExit: function(aEvent) { + _onDragExit(aEvent) { if (this._isUnwantedDragDrop(aEvent)) { return; } @@ -1929,7 +1929,7 @@ CustomizeMode.prototype = { /** * To workaround bug 460801 we manually forward the drop event here when dragend wouldn't be fired. */ - _onDragEnd: function(aEvent) { + _onDragEnd(aEvent) { if (this._isUnwantedDragDrop(aEvent)) { return; } @@ -1966,7 +1966,7 @@ CustomizeMode.prototype = { DragPositionManager.stop(); }, - _isUnwantedDragDrop: function(aEvent) { + _isUnwantedDragDrop(aEvent) { // The simulated events generated by synthesizeDragStart/synthesizeDrop in // mochitests are used only for testing whether the right data is being put // into the dataTransfer. Neither cause a real drop to occur, so they don't @@ -1985,7 +1985,7 @@ CustomizeMode.prototype = { mozSourceNode.ownerGlobal != this.window; }, - _setDragActive: function(aItem, aValue, aDraggedItemId, aInToolbar) { + _setDragActive(aItem, aValue, aDraggedItemId, aInToolbar) { if (!aItem) { return; } @@ -2033,7 +2033,7 @@ CustomizeMode.prototype = { } } }, - _cancelDragActive: function(aItem, aNextItem, aNoTransition) { + _cancelDragActive(aItem, aNextItem, aNoTransition) { this._updateToolbarCustomizationOutline(aItem.ownerGlobal); let currentArea = this._getCustomizableParent(aItem); if (!currentArea) { @@ -2069,7 +2069,7 @@ CustomizeMode.prototype = { } }, - _setGridDragActive: function(aDragOverNode, aDraggedItem, aValue) { + _setGridDragActive(aDragOverNode, aDraggedItem, aValue) { let targetArea = this._getCustomizableParent(aDragOverNode); let draggedWrapper = this.document.getElementById("wrapper-" + aDraggedItem.id); let originArea = this._getCustomizableParent(draggedWrapper); @@ -2080,7 +2080,7 @@ CustomizeMode.prototype = { originArea == targetArea); }, - _getDragItemSize: function(aDragOverNode, aDraggedItem) { + _getDragItemSize(aDragOverNode, aDraggedItem) { // Cache it good, cache it real good. if (!this._dragSizeMap) this._dragSizeMap = new WeakMap(); @@ -2140,7 +2140,7 @@ CustomizeMode.prototype = { return size; }, - _getCustomizableParent: function(aElement) { + _getCustomizableParent(aElement) { let areas = CustomizableUI.areas; areas.push(kPaletteId); while (aElement) { @@ -2152,7 +2152,7 @@ CustomizeMode.prototype = { return null; }, - _getDragOverNode: function(aEvent, aAreaElement, aInToolbar, aDraggedItemId) { + _getDragOverNode(aEvent, aAreaElement, aInToolbar, aDraggedItemId) { let expectedParent = aAreaElement.customizationTarget || aAreaElement; // Our tests are stupid. Cope: if (!aEvent.clientX && !aEvent.clientY) { @@ -2200,7 +2200,7 @@ CustomizeMode.prototype = { return targetNode || aEvent.target; }, - _onMouseDown: function(aEvent) { + _onMouseDown(aEvent) { log.debug("_onMouseDown"); if (aEvent.button != 0) { return; @@ -2214,7 +2214,7 @@ CustomizeMode.prototype = { } }, - _onMouseUp: function(aEvent) { + _onMouseUp(aEvent) { log.debug("_onMouseUp"); if (aEvent.button != 0) { return; @@ -2227,7 +2227,7 @@ CustomizeMode.prototype = { } }, - _getWrapper: function(aElement) { + _getWrapper(aElement) { while (aElement && aElement.localName != "toolbarpaletteitem") { if (aElement.localName == "toolbar") return null; @@ -2236,7 +2236,7 @@ CustomizeMode.prototype = { return aElement; }, - _showPanelCustomizationPlaceholders: function() { + _showPanelCustomizationPlaceholders() { let doc = this.document; let contents = this.panelUIContents; let narrowItemsAfterWideItem = 0; @@ -2271,7 +2271,7 @@ CustomizeMode.prototype = { } }, - _removePanelCustomizationPlaceholders: function() { + _removePanelCustomizationPlaceholders() { let contents = this.panelUIContents; let oldPlaceholders = contents.getElementsByClassName(kPlaceholderClass); while (oldPlaceholders.length) { @@ -2288,7 +2288,7 @@ CustomizeMode.prototype = { * outline to. If aToolbarArea is falsy, the outline will be * removed from all toolbar areas. */ - _updateToolbarCustomizationOutline: function(aWindow, aToolbarArea = null) { + _updateToolbarCustomizationOutline(aWindow, aToolbarArea = null) { // Remove the attribute from existing customization targets for (let area of CustomizableUI.areas) { if (CustomizableUI.getAreaType(area) != CustomizableUI.TYPE_TOOLBAR) { @@ -2307,7 +2307,7 @@ CustomizeMode.prototype = { } }, - _findVisiblePreviousSiblingNode: function(aReferenceNode) { + _findVisiblePreviousSiblingNode(aReferenceNode) { while (aReferenceNode && aReferenceNode.localName == "toolbarpaletteitem" && aReferenceNode.firstChild.hidden) { diff --git a/browser/components/customizableui/DragPositionManager.jsm b/browser/components/customizableui/DragPositionManager.jsm index 1b4eb59dc15f..65e2585a5a81 100644 --- a/browser/components/customizableui/DragPositionManager.jsm +++ b/browser/components/customizableui/DragPositionManager.jsm @@ -33,7 +33,7 @@ AreaPositionManager.prototype = { _nodePositionStore: null, _wideCache: null, - update: function(aContainer) { + update(aContainer) { this._nodePositionStore = new WeakMap(); this._wideCache = new Set(); let last = null; @@ -73,7 +73,7 @@ AreaPositionManager.prototype = { * where dy is more heavily weighted by a factor corresponding to the * ratio between the container's width and the height of its elements. */ - find: function(aContainer, aX, aY, aDraggedItemId) { + find(aContainer, aX, aY, aDraggedItemId) { let closest = null; let minCartesian = Number.MAX_VALUE; let containerX = this._containerInfo.left; @@ -130,7 +130,7 @@ AreaPositionManager.prototype = { * they would have if we had inserted something before aBefore. We use CSS * transforms for this, which are CSS transitioned. */ - insertPlaceholder: function(aContainer, aBefore, aWide, aSize, aIsFromThisArea) { + insertPlaceholder(aContainer, aBefore, aWide, aSize, aIsFromThisArea) { let isShifted = false; let shiftDown = aWide; for (let child of aContainer.children) { @@ -185,11 +185,11 @@ AreaPositionManager.prototype = { this._lastPlaceholderInsertion = aBefore; }, - isWide: function(aNode) { + isWide(aNode) { return this._wideCache.has(aNode.id); }, - _checkIfWide: function(aNode) { + _checkIfWide(aNode) { return this._inPanel && aNode && aNode.firstChild && aNode.firstChild.classList.contains(CustomizableUI.WIDE_PANEL_CLASS); }, @@ -201,7 +201,7 @@ AreaPositionManager.prototype = { * @param aNoTransition if truthy, adds a notransition attribute to the node * while resetting the transform. */ - clearPlaceholders: function(aContainer, aNoTransition) { + clearPlaceholders(aContainer, aNoTransition) { for (let child of aContainer.children) { if (aNoTransition) { child.setAttribute("notransition", true); @@ -220,7 +220,7 @@ AreaPositionManager.prototype = { } }, - _getNextPos: function(aNode, aShiftDown, aSize) { + _getNextPos(aNode, aShiftDown, aSize) { // Shifting down is easy: if (this._inPanel && aShiftDown) { return "translate(0, " + aSize.height + "px)"; @@ -228,7 +228,7 @@ AreaPositionManager.prototype = { return this._diffWithNext(aNode, aSize); }, - _diffWithNext: function(aNode, aSize) { + _diffWithNext(aNode, aSize) { let xDiff; let yDiff = null; let nodeBounds = this._lazyStoreGet(aNode); @@ -306,7 +306,7 @@ AreaPositionManager.prototype = { * @param aNodeBounds the bounding rect info of this node * @param aFirstNodeInRow the first node in aNode's row */ - _moveNextBasedOnPrevious: function(aNode, aNodeBounds, aFirstNodeInRow) { + _moveNextBasedOnPrevious(aNode, aNodeBounds, aFirstNodeInRow) { let next = this._getVisibleSiblingForDirection(aNode, "previous"); let otherBounds = this._lazyStoreGet(next); let side = this._dir == "ltr" ? "left" : "right"; @@ -328,7 +328,7 @@ AreaPositionManager.prototype = { * @param aNode the node whose position info we want * @return the position info */ - _lazyStoreGet: function(aNode) { + _lazyStoreGet(aNode) { let rect = this._nodePositionStore.get(aNode); if (!rect) { // getBoundingClientRect() returns a DOMRect that is live, meaning that @@ -352,7 +352,7 @@ AreaPositionManager.prototype = { return rect; }, - _firstInRow: function(aNode) { + _firstInRow(aNode) { // XXXmconley: I'm not entirely sure why we need to take the floor of these // values - it looks like, periodically, we're getting fractional pixels back // from lazyStoreGet. I've filed bug 994247 to investigate. @@ -368,7 +368,7 @@ AreaPositionManager.prototype = { return rv; }, - _getVisibleSiblingForDirection: function(aNode, aDirection) { + _getVisibleSiblingForDirection(aNode, aDirection) { let rv = aNode; do { rv = rv[aDirection + "Sibling"]; @@ -378,7 +378,7 @@ AreaPositionManager.prototype = { } var DragPositionManager = { - start: function(aWindow) { + start(aWindow) { let areas = CustomizableUI.areas.filter((area) => CustomizableUI.getAreaType(area) != "toolbar"); areas = areas.map((area) => CustomizableUI.getCustomizeTargetForArea(area, aWindow)); areas.push(aWindow.document.getElementById(kPaletteId)); @@ -392,7 +392,7 @@ var DragPositionManager = { } }, - add: function(aWindow, aArea, aContainer) { + add(aWindow, aArea, aContainer) { if (CustomizableUI.getAreaType(aArea) != "toolbar") { return; } @@ -400,7 +400,7 @@ var DragPositionManager = { gManagers.set(aContainer, new AreaPositionManager(aContainer)); }, - remove: function(aWindow, aArea, aContainer) { + remove(aWindow, aArea, aContainer) { if (CustomizableUI.getAreaType(aArea) != "toolbar") { return; } @@ -408,11 +408,11 @@ var DragPositionManager = { gManagers.delete(aContainer); }, - stop: function() { + stop() { gManagers = new WeakMap(); }, - getManagerForArea: function(aArea) { + getManagerForArea(aArea) { return gManagers.get(aArea); } }; diff --git a/browser/components/customizableui/PanelWideWidgetTracker.jsm b/browser/components/customizableui/PanelWideWidgetTracker.jsm index 768cebbca73e..a9b38c23eb26 100644 --- a/browser/components/customizableui/PanelWideWidgetTracker.jsm +++ b/browser/components/customizableui/PanelWideWidgetTracker.jsm @@ -22,33 +22,33 @@ var gSeenWidgets = new Set(); var PanelWideWidgetTracker = { // Listeners used to validate panel contents whenever they change: - onWidgetAdded: function(aWidgetId, aArea, aPosition) { + onWidgetAdded(aWidgetId, aArea, aPosition) { if (aArea == gPanel) { gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel); let moveForward = this.shouldMoveForward(aWidgetId, aPosition); this.adjustWidgets(aWidgetId, moveForward); } }, - onWidgetMoved: function(aWidgetId, aArea, aOldPosition, aNewPosition) { + onWidgetMoved(aWidgetId, aArea, aOldPosition, aNewPosition) { if (aArea == gPanel) { gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel); let moveForward = this.shouldMoveForward(aWidgetId, aNewPosition); this.adjustWidgets(aWidgetId, moveForward); } }, - onWidgetRemoved: function(aWidgetId, aPrevArea) { + onWidgetRemoved(aWidgetId, aPrevArea) { if (aPrevArea == gPanel) { gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel); this.adjustWidgets(aWidgetId, false); } }, - onWidgetReset: function(aWidgetId) { + onWidgetReset(aWidgetId) { gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel); }, // Listener to keep abreast of any new nodes. We use the DOM one because // we need access to the actual node's classlist, so we can't use the ones above. // Furthermore, onWidgetCreated only fires for API-based widgets, not for XUL ones. - onWidgetAfterDOMChange: function(aNode, aNextNode, aContainer) { + onWidgetAfterDOMChange(aNode, aNextNode, aContainer) { if (!gSeenWidgets.has(aNode.id)) { if (aNode.classList.contains(CustomizableUI.WIDE_PANEL_CLASS)) { gWideWidgets.add(aNode.id); @@ -57,11 +57,11 @@ var PanelWideWidgetTracker = { } }, // When widgets get destroyed, we remove them from our sets of stuff we care about: - onWidgetDestroyed: function(aWidgetId) { + onWidgetDestroyed(aWidgetId) { gSeenWidgets.delete(aWidgetId); gWideWidgets.delete(aWidgetId); }, - shouldMoveForward: function(aWidgetId, aPosition) { + shouldMoveForward(aWidgetId, aPosition) { let currentWidgetAtPosition = gPanelPlacements[aPosition + 1]; let rv = gWideWidgets.has(currentWidgetAtPosition) && !gWideWidgets.has(aWidgetId); // We might now think we can move forward, but for that we need at least 2 more small @@ -83,7 +83,7 @@ var PanelWideWidgetTracker = { } return rv; }, - adjustWidgets: function(aWidgetId, aMoveForwards) { + adjustWidgets(aWidgetId, aMoveForwards) { if (this.adjusting) { return; } @@ -104,7 +104,7 @@ var PanelWideWidgetTracker = { // This function is called whenever an item gets moved in the menu panel. It // adjusts the position of widgets within the panel to prevent "gaps" between // wide widgets that could be filled up with single column widgets - adjustPosition: function(aWidgetId, aMoveForwards) { + adjustPosition(aWidgetId, aMoveForwards) { // Make sure that there are n % columns = 0 narrow buttons before the widget. let placementIndex = gPanelPlacements.indexOf(aWidgetId); let prevSiblingCount = 0; @@ -144,7 +144,7 @@ var PanelWideWidgetTracker = { * "public-only" if it's not shown in private windows * "real" if it does exist and is shown even in private windows */ - checkWidgetStatus: function(aWidgetId) { + checkWidgetStatus(aWidgetId) { let widgetWrapper = CustomizableUI.getWidget(aWidgetId); // This widget might not actually exist: if (!widgetWrapper) { @@ -164,7 +164,7 @@ var PanelWideWidgetTracker = { return "real"; }, - init: function() { + init() { // Initialize our local placements copy and register the listener gPanelPlacements = CustomizableUI.getWidgetIdsInArea(gPanel); CustomizableUI.addListener(this); diff --git a/browser/components/customizableui/ScrollbarSampler.jsm b/browser/components/customizableui/ScrollbarSampler.jsm index 44736e4c4e08..5a2bfd3e07d7 100644 --- a/browser/components/customizableui/ScrollbarSampler.jsm +++ b/browser/components/customizableui/ScrollbarSampler.jsm @@ -14,7 +14,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); var gSystemScrollbarWidth = null; this.ScrollbarSampler = { - getSystemScrollbarWidth: function() { + getSystemScrollbarWidth() { if (gSystemScrollbarWidth !== null) { return Promise.resolve(gSystemScrollbarWidth); } @@ -27,11 +27,11 @@ this.ScrollbarSampler = { }); }, - resetSystemScrollbarWidth: function() { + resetSystemScrollbarWidth() { gSystemScrollbarWidth = null; }, - _sampleSystemScrollbarWidth: function() { + _sampleSystemScrollbarWidth() { let hwin = Services.appShell.hiddenDOMWindow; let hdoc = hwin.document.documentElement; let iframe = hwin.document.createElementNS("http://www.w3.org/1999/xhtml", diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js index 112e2e72f935..173f788b0011 100644 --- a/browser/components/customizableui/content/panelUI.js +++ b/browser/components/customizableui/content/panelUI.js @@ -37,7 +37,7 @@ const PanelUI = { }, _initialized: false, - init: function() { + init() { for (let [k, v] of Object.entries(this.kElements)) { // Need to do fresh let-bindings per iteration let getKey = k; @@ -57,13 +57,13 @@ const PanelUI = { }, _eventListenersAdded: false, - _ensureEventListenersAdded: function() { + _ensureEventListenersAdded() { if (this._eventListenersAdded) return; this._addEventListeners(); }, - _addEventListeners: function() { + _addEventListeners() { for (let event of this.kEvents) { this.panel.addEventListener(event, this); } @@ -72,7 +72,7 @@ const PanelUI = { this._eventListenersAdded = true; }, - uninit: function() { + uninit() { for (let event of this.kEvents) { this.panel.removeEventListener(event, this); } @@ -92,7 +92,7 @@ const PanelUI = { * @param aMainView * The mainView node to put back into place. */ - setMainView: function(aMainView) { + setMainView(aMainView) { this._ensureEventListenersAdded(); this.multiView.setMainView(aMainView); }, @@ -103,7 +103,7 @@ const PanelUI = { * * @param aEvent the event that triggers the toggle. */ - toggle: function(aEvent) { + toggle(aEvent) { // Don't show the panel if the window is in customization mode, // since this button doubles as an exit path for the user in this case. if (document.documentElement.hasAttribute("customizing")) { @@ -124,7 +124,7 @@ const PanelUI = { * * @param aEvent the event (if any) that triggers showing the menu. */ - show: function(aEvent) { + show(aEvent) { return new Promise(resolve => { this.ensureReady().then(() => { if (this.panel.state == "open" || @@ -170,7 +170,7 @@ const PanelUI = { /** * If the menu panel is being shown, hide it. */ - hide: function() { + hide() { if (document.documentElement.hasAttribute("customizing")) { return; } @@ -178,7 +178,7 @@ const PanelUI = { this.panel.hidePopup(); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { // Ignore context menus and menu button menus showing and hiding: if (aEvent.type.startsWith("popup") && aEvent.target != this.panel) { @@ -221,7 +221,7 @@ const PanelUI = { * * @return a Promise that resolves once the panel is ready to roll. */ - ensureReady: function(aCustomizing = false) { + ensureReady(aCustomizing = false) { if (this._readyPromise) { return this._readyPromise; } @@ -282,7 +282,7 @@ const PanelUI = { * Switch the panel to the main view if it's not already * in that view. */ - showMainView: function() { + showMainView() { this._ensureEventListenersAdded(); this.multiView.showMainView(); }, @@ -291,7 +291,7 @@ const PanelUI = { * Switch the panel to the help view if it's not already * in that view. */ - showHelpView: function(aAnchor) { + showHelpView(aAnchor) { this._ensureEventListenersAdded(); this.multiView.showSubView("PanelUI-helpView", aAnchor); }, @@ -410,15 +410,15 @@ const PanelUI = { * affect the hiding/showing animations of single-subview panels (tempPanel * in the showSubView method). */ - disableSingleSubviewPanelAnimations: function() { + disableSingleSubviewPanelAnimations() { this._disableAnimations = true; }, - enableSingleSubviewPanelAnimations: function() { + enableSingleSubviewPanelAnimations() { this._disableAnimations = false; }, - onWidgetAfterDOMChange: function(aNode, aNextNode, aContainer, aWasRemoval) { + onWidgetAfterDOMChange(aNode, aNextNode, aContainer, aWasRemoval) { if (aContainer != this.contents) { return; } @@ -427,7 +427,7 @@ const PanelUI = { } }, - onWidgetBeforeDOMChange: function(aNode, aNextNode, aContainer, aIsRemoval) { + onWidgetBeforeDOMChange(aNode, aNextNode, aContainer, aIsRemoval) { if (aContainer != this.contents) { return; } @@ -442,7 +442,7 @@ const PanelUI = { * Signal that we're about to make a lot of changes to the contents of the * panels all at once. For performance, we ignore the mutations. */ - beginBatchUpdate: function() { + beginBatchUpdate() { this._ensureEventListenersAdded(); this.multiView.ignoreMutations = true; }, @@ -452,12 +452,12 @@ const PanelUI = { * attention to mutations. This automatically synchronizes the multiview * container with whichever view is displayed if the panel is open. */ - endBatchUpdate: function(aReason) { + endBatchUpdate(aReason) { this._ensureEventListenersAdded(); this.multiView.ignoreMutations = false; }, - _adjustLabelsForAutoHyphens: function(aNode) { + _adjustLabelsForAutoHyphens(aNode) { let toolbarButtons = aNode ? [aNode] : this.contents.querySelectorAll(".toolbarbutton-1"); for (let node of toolbarButtons) { @@ -477,12 +477,12 @@ const PanelUI = { * Sets the anchor node into the open or closed state, depending * on the state of the panel. */ - _updatePanelButton: function() { + _updatePanelButton() { this.menuButton.open = this.panel.state == "open" || this.panel.state == "showing"; }, - _onHelpViewShow: function(aEvent) { + _onHelpViewShow(aEvent) { // Call global menu setup function buildHelpMenu(); @@ -515,7 +515,7 @@ const PanelUI = { items.appendChild(fragment); }, - _updateQuitTooltip: function() { + _updateQuitTooltip() { if (AppConstants.platform == "win") { return; } @@ -535,7 +535,7 @@ const PanelUI = { }, _overlayScrollListenerBoundFn: null, - _overlayScrollListener: function(aMQL) { + _overlayScrollListener(aMQL) { ScrollbarSampler.resetSystemScrollbarWidth(); this._scrollWidth = null; }, diff --git a/browser/components/customizableui/content/toolbar.xml b/browser/components/customizableui/content/toolbar.xml index 299c7865fb16..8b8d631ca987 100644 --- a/browser/components/customizableui/content/toolbar.xml +++ b/browser/components/customizableui/content/toolbar.xml @@ -293,7 +293,7 @@ return !!this.contextMenu; }, - init: function(event) { + init(event) { let node = event.target; while (node != this.toolbar) { if (node.localName == "menupopup") @@ -313,7 +313,7 @@ this.contextMenu.addEventListener("popuphiding", this, false); this.toolbar.addEventListener("mousemove", this, false); }, - handleEvent: function(event) { + handleEvent(event) { switch (event.type) { case "popupshown": this.toolbar.removeEventListener("mousemove", this, false); diff --git a/browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js b/browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js index 22fbb5c0c227..5545c3fd0e9c 100644 --- a/browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js +++ b/browser/components/customizableui/test/browser_1003588_no_specials_in_panel.js @@ -12,7 +12,7 @@ function simulateItemDragAndEnd(aToDrag, aTarget) { var [result, dataTransfer] = EventUtils.synthesizeDragOver(aToDrag.parentNode, aTarget); EventUtils.synthesizeDropAfterDragOver(result, dataTransfer, aTarget); // Send dragend to move dragging item back to initial place. - EventUtils.sendDragEvent({ type: "dragend", dataTransfer: dataTransfer }, + EventUtils.sendDragEvent({ type: "dragend", dataTransfer }, aToDrag.parentNode); } finally { ds.endDragSession(true); diff --git a/browser/components/customizableui/test/browser_877006_missing_view.js b/browser/components/customizableui/test/browser_877006_missing_view.js index a1495c1feda4..b16775d5bb17 100644 --- a/browser/components/customizableui/test/browser_877006_missing_view.js +++ b/browser/components/customizableui/test/browser_877006_missing_view.js @@ -12,7 +12,7 @@ add_task(function testAddbrokenViewWidget() { type: 'view', viewId: 'idontexist', /* Empty handler so we try to attach it maybe? */ - onViewShowing: function() { + onViewShowing() { } }; diff --git a/browser/components/customizableui/test/browser_942581_unregisterArea_keeps_placements.js b/browser/components/customizableui/test/browser_942581_unregisterArea_keeps_placements.js index 61adac9826f3..d19eed775e60 100644 --- a/browser/components/customizableui/test/browser_942581_unregisterArea_keeps_placements.js +++ b/browser/components/customizableui/test/browser_942581_unregisterArea_keeps_placements.js @@ -15,7 +15,7 @@ add_task(function*() { for (let i = 0; i < kTestWidgetCount; i++) { let id = kTestWidgetPfx + i; widgetIds.push(id); - let spec = {id: id, type: 'button', removable: true, label: "unregisterArea test", tooltiptext: "" + i}; + let spec = {id, type: 'button', removable: true, label: "unregisterArea test", tooltiptext: "" + i}; CustomizableUI.createWidget(spec); } for (let i = kTestWidgetCount; i < kTestWidgetCount * 2; i++) { diff --git a/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js b/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js index c2006bef048d..45b90d9e7a0a 100644 --- a/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js +++ b/browser/components/customizableui/test/browser_947914_button_newPrivateWindow.js @@ -14,7 +14,7 @@ add_task(function*() { let privateWindow = null; let observerWindowOpened = { - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (aTopic == "domwindowopened") { privateWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow); privateWindow.addEventListener("load", function newWindowHandler() { diff --git a/browser/components/customizableui/test/browser_947914_button_newWindow.js b/browser/components/customizableui/test/browser_947914_button_newWindow.js index 47162ee86147..9c3f08c93abe 100644 --- a/browser/components/customizableui/test/browser_947914_button_newWindow.js +++ b/browser/components/customizableui/test/browser_947914_button_newWindow.js @@ -13,7 +13,7 @@ add_task(function*() { let newWindow = null; let observerWindowOpened = { - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (aTopic == "domwindowopened") { newWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow); newWindow.addEventListener("load", function newWindowHandler() { diff --git a/browser/components/customizableui/test/browser_973641_button_addon.js b/browser/components/customizableui/test/browser_973641_button_addon.js index 796bf3d0ecad..8d7198dc1646 100755 --- a/browser/components/customizableui/test/browser_973641_button_addon.js +++ b/browser/components/customizableui/test/browser_973641_button_addon.js @@ -14,7 +14,7 @@ add_task(function*() { let widgetSpec = { id: kButton, type: 'button', - onClick: function() { + onClick() { gBrowser.selectedTab = gBrowser.addTab("about:addons"); } }; diff --git a/browser/components/customizableui/test/browser_976792_insertNodeInWindow.js b/browser/components/customizableui/test/browser_976792_insertNodeInWindow.js index 3bfa8c25d57f..d6ed3c205278 100644 --- a/browser/components/customizableui/test/browser_976792_insertNodeInWindow.js +++ b/browser/components/customizableui/test/browser_976792_insertNodeInWindow.js @@ -20,7 +20,7 @@ add_task(function*() { let id = kTestWidgetPrefix + i; widgetIds.push(id); if (testWidgetExists[i]) { - let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i}; + let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i}; CustomizableUI.createWidget(spec); } } @@ -57,7 +57,7 @@ add_task(function*() { for (let i = 0; i < 5; i++) { let id = kTestWidgetPrefix + i; widgetIds.push(id); - let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; + let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; CustomizableUI.createWidget(spec); CustomizableUI.addWidgetToArea(id, "nav-bar"); } @@ -106,7 +106,7 @@ add_task(function*() { for (let i = 0; i < 5; i++) { let id = kTestWidgetPrefix + i; widgetIds.push(id); - let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; + let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; CustomizableUI.createWidget(spec); CustomizableUI.addWidgetToArea(id, "nav-bar"); } @@ -156,7 +156,7 @@ add_task(function*() { for (let i = 0; i < 5; i++) { let id = kTestWidgetPrefix + i; widgetIds.push(id); - let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; + let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; CustomizableUI.createWidget(spec); CustomizableUI.addWidgetToArea(id, "nav-bar"); } @@ -207,7 +207,7 @@ add_task(function*() { for (let i = 5; i >= 0; i--) { let id = kTestWidgetPrefix + i; widgetIds.push(id); - let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; + let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; CustomizableUI.createWidget(spec); CustomizableUI.addWidgetToArea(id, "nav-bar", 0); } @@ -215,7 +215,7 @@ add_task(function*() { for (let i = 10; i < 15; i++) { let id = kTestWidgetPrefix + i; widgetIds.push(id); - let spec = {id: id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; + let spec = {id, type: "button", removable: true, label: "insertNodeInWindow test", tooltiptext: "" + i}; CustomizableUI.createWidget(spec); CustomizableUI.addWidgetToArea(id, "nav-bar"); } @@ -269,8 +269,8 @@ add_task(function*() { if (i != missingId) { // Setting min-width to make the overflow state not depend on styling of the button and/or // screen width - let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i, - onCreated: function(node) { + let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i, + onCreated(node) { node.style.minWidth = "200px"; if (id == (kTestWidgetPrefix + nonOverflowableId)) { node.setAttribute("overflows", false); @@ -325,8 +325,8 @@ add_task(function*() { if (i != missingId) { // Setting min-width to make the overflow state not depend on styling of the button and/or // screen width - let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i, - onCreated: function(node) { node.style.minWidth = "100px"; }}; + let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i, + onCreated(node) { node.style.minWidth = "100px"; }}; info("Creating: " + id); CustomizableUI.createWidget(spec); } @@ -374,8 +374,8 @@ add_task(function*() { if (i != missingId) { // Setting min-width to make the overflow state not depend on styling of the button and/or // screen width - let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i, - onCreated: function(node) { node.style.minWidth = "200px"; }}; + let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i, + onCreated(node) { node.style.minWidth = "200px"; }}; info("Creating: " + id); CustomizableUI.createWidget(spec); } diff --git a/browser/components/customizableui/test/browser_980155_add_overflow_toolbar.js b/browser/components/customizableui/test/browser_980155_add_overflow_toolbar.js index 15197ac86f12..fafbc93592c1 100644 --- a/browser/components/customizableui/test/browser_980155_add_overflow_toolbar.js +++ b/browser/components/customizableui/test/browser_980155_add_overflow_toolbar.js @@ -14,7 +14,7 @@ add_task(function* addOverflowingToolbar() { for (let i = 0; i < 10; i++) { let id = kTestWidgetPrefix + i; widgetIds.push(id); - let spec = {id: id, type: "button", removable: true, label: "test", tooltiptext: "" + i}; + let spec = {id, type: "button", removable: true, label: "test", tooltiptext: "" + i}; CustomizableUI.createWidget(spec); } diff --git a/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js b/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js index 9a7227a47b6b..1f27e604ae3d 100644 --- a/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js +++ b/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js @@ -13,7 +13,7 @@ add_task(function* testAddOnBeforeCreatedWidget() { id: kWidgetId, type: 'view', viewId: kWidgetId + 'idontexistyet', - onBeforeCreated: function(doc) { + onBeforeCreated(doc) { let view = doc.createElement("panelview"); view.id = kWidgetId + 'idontexistyet'; let label = doc.createElement("label"); @@ -23,7 +23,7 @@ add_task(function* testAddOnBeforeCreatedWidget() { document.getElementById("PanelUI-multiView").appendChild(view); onBeforeCreatedCalled = true; }, - onViewShowing: function() { + onViewShowing() { viewShownDeferred.resolve(); } }; diff --git a/browser/components/customizableui/test/browser_987492_window_api.js b/browser/components/customizableui/test/browser_987492_window_api.js index 104a14ba6d98..2fccd1b5b82f 100644 --- a/browser/components/customizableui/test/browser_987492_window_api.js +++ b/browser/components/customizableui/test/browser_987492_window_api.js @@ -16,7 +16,7 @@ add_task(function* testOneWindow() { add_task(function* testOpenCloseWindow() { let newWindow = null; let openListener = { - onWindowOpened: function(window) { + onWindowOpened(window) { newWindow = window; } } @@ -39,7 +39,7 @@ add_task(function* testOpenCloseWindow() { let closedWindow = null; let closeListener = { - onWindowClosed: function(window) { + onWindowClosed(window) { closedWindow = window; } } diff --git a/browser/components/customizableui/test/browser_995164_registerArea_during_customize_mode.js b/browser/components/customizableui/test/browser_995164_registerArea_during_customize_mode.js index 4d292a929c67..a8790f539869 100644 --- a/browser/components/customizableui/test/browser_995164_registerArea_during_customize_mode.js +++ b/browser/components/customizableui/test/browser_995164_registerArea_during_customize_mode.js @@ -65,7 +65,7 @@ add_task(function*() { otherTB.setAttribute("customizable", "true"); let wasInformedCorrectlyOfAreaAppearing = false; let listener = { - onAreaNodeRegistered: function(aArea, aNode) { + onAreaNodeRegistered(aArea, aNode) { if (aNode == otherTB) { wasInformedCorrectlyOfAreaAppearing = true; } @@ -99,14 +99,14 @@ add_task(function*() { // (and therefore onAreaNodeRegistered) one, causing the test to fail. let windowCloseDeferred = Promise.defer(); listener = { - onAreaNodeUnregistered: function(aArea, aNode, aReason) { + onAreaNodeUnregistered(aArea, aNode, aReason) { if (aArea == TOOLBARID) { is(aNode, otherTB, "Should be informed about other toolbar"); is(aReason, CustomizableUI.REASON_WINDOW_CLOSED, "Reason should be correct."); wasInformedCorrectlyOfAreaDisappearing = (aReason === CustomizableUI.REASON_WINDOW_CLOSED); } }, - onWindowClosed: function(aWindow) { + onWindowClosed(aWindow) { if (aWindow == otherWin) { windowCloseDeferred.resolve(aWindow); } else { @@ -133,7 +133,7 @@ add_task(function*() { CustomizableUI.removeListener(listener); wasInformedCorrectlyOfAreaDisappearing = false; listener = { - onAreaNodeUnregistered: function(aArea, aNode, aReason) { + onAreaNodeUnregistered(aArea, aNode, aReason) { if (aArea == TOOLBARID) { is(aNode, toolbar, "Should be informed about this window's toolbar"); is(aReason, CustomizableUI.REASON_AREA_UNREGISTERED, "Reason for final removal should be correct."); diff --git a/browser/components/migration/360seProfileMigrator.js b/browser/components/migration/360seProfileMigrator.js index 42347d542a68..83e2880b132b 100644 --- a/browser/components/migration/360seProfileMigrator.js +++ b/browser/components/migration/360seProfileMigrator.js @@ -209,7 +209,7 @@ function Qihoo360seProfileMigrator() { Qihoo360seProfileMigrator.prototype = Object.create(MigratorPrototype); Object.defineProperty(Qihoo360seProfileMigrator.prototype, "sourceProfiles", { - get: function() { + get() { if ("__sourceProfiles" in this) return this.__sourceProfiles; diff --git a/browser/components/migration/ChromeProfileMigrator.js b/browser/components/migration/ChromeProfileMigrator.js index 2446f713ca20..ee99db3ca626 100644 --- a/browser/components/migration/ChromeProfileMigrator.js +++ b/browser/components/migration/ChromeProfileMigrator.js @@ -246,7 +246,7 @@ function GetBookmarksResource(aProfileFolder) { return { type: MigrationUtils.resourceTypes.BOOKMARKS, - migrate: function(aCallback) { + migrate(aCallback) { return Task.spawn(function* () { let gotErrors = false; let errorGatherer = function() { gotErrors = true }; @@ -341,12 +341,12 @@ function GetHistoryResource(aProfileFolder) { yield new Promise((resolve, reject) => { MigrationUtils.insertVisitsWrapper(places, { _success: false, - handleResult: function() { + handleResult() { // Importing any entry is considered a successful import. this._success = true; }, - handleError: function() {}, - handleCompletion: function() { + handleError() {}, + handleCompletion() { if (this._success) { resolve(); } else { diff --git a/browser/components/migration/ESEDBReader.jsm b/browser/components/migration/ESEDBReader.jsm index a01bee53f73b..ad842356b338 100644 --- a/browser/components/migration/ESEDBReader.jsm +++ b/browser/components/migration/ESEDBReader.jsm @@ -354,7 +354,7 @@ ESEDB.prototype = { return true; }, - tableItems: function*(tableName, columns) { + *tableItems(tableName, columns) { if (!this._opened) { throw new Error("The database was closed!"); } diff --git a/browser/components/migration/EdgeProfileMigrator.js b/browser/components/migration/EdgeProfileMigrator.js index 189932bed8aa..f2d83d433348 100644 --- a/browser/components/migration/EdgeProfileMigrator.js +++ b/browser/components/migration/EdgeProfileMigrator.js @@ -107,7 +107,7 @@ EdgeTypedURLMigrator.prototype = { return this._typedURLs.size > 0; }, - migrate: function(aCallback) { + migrate(aCallback) { let typedURLs = this._typedURLs; let places = []; for (let [urlString, time] of typedURLs) { @@ -140,12 +140,12 @@ EdgeTypedURLMigrator.prototype = { MigrationUtils.insertVisitsWrapper(places, { _success: false, - handleResult: function() { + handleResult() { // Importing any entry is considered a successful import. this._success = true; }, - handleError: function() {}, - handleCompletion: function() { + handleError() {}, + handleCompletion() { aCallback(this._success); } }); diff --git a/browser/components/migration/FirefoxProfileMigrator.js b/browser/components/migration/FirefoxProfileMigrator.js index 526c82938f6d..485719ae90bf 100644 --- a/browser/components/migration/FirefoxProfileMigrator.js +++ b/browser/components/migration/FirefoxProfileMigrator.js @@ -62,7 +62,7 @@ function sorter(a, b) { } Object.defineProperty(FirefoxProfileMigrator.prototype, "sourceProfiles", { - get: function() { + get() { return [...this._getAllProfiles().keys()].map(x => ({id: x, name: x})).sort(sorter); } }); @@ -117,7 +117,7 @@ FirefoxProfileMigrator.prototype._getResourcesInternal = function(sourceProfileD } return { type: aMigrationType, - migrate: function(aCallback) { + migrate(aCallback) { for (let file of files) { file.copyTo(currentProfileDir, ""); } @@ -143,7 +143,7 @@ FirefoxProfileMigrator.prototype._getResourcesInternal = function(sourceProfileD if (sessionFile) { session = { type: types.SESSION, - migrate: function(aCallback) { + migrate(aCallback) { sessionCheckpoints.copyTo(currentProfileDir, "sessionCheckpoints.json"); let newSessionFile = currentProfileDir.clone(); newSessionFile.append("sessionstore.js"); diff --git a/browser/components/migration/IEProfileMigrator.js b/browser/components/migration/IEProfileMigrator.js index b1ff92a69f65..97582208358a 100644 --- a/browser/components/migration/IEProfileMigrator.js +++ b/browser/components/migration/IEProfileMigrator.js @@ -76,9 +76,9 @@ History.prototype = { let lastVisitTime = entry.get("time") || (Date.now() * 1000); places.push( - { uri: uri, - title: title, - visits: [{ transitionType: transitionType, + { uri, + title, + visits: [{ transitionType, visitDate: lastVisitTime }] } ); @@ -92,12 +92,12 @@ History.prototype = { MigrationUtils.insertVisitsWrapper(places, { _success: false, - handleResult: function() { + handleResult() { // Importing any entry is considered a successful import. this._success = true; }, - handleError: function() {}, - handleCompletion: function() { + handleError() {}, + handleCompletion() { aCallback(this._success); } }); @@ -320,8 +320,8 @@ IE7FormPasswords.prototype = { fileTimeToSecondsSinceEpoch(currentLoginItem.hiDateTime, currentLoginItem.loDateTime) * 1000; let currentResult = { - creation: creation, - url: url, + creation, + url, }; // The username is UTF-16 and null-terminated. currentResult.username = diff --git a/browser/components/migration/MSMigrationUtils.jsm b/browser/components/migration/MSMigrationUtils.jsm index c36ef21bffdb..989e6bb541be 100644 --- a/browser/components/migration/MSMigrationUtils.jsm +++ b/browser/components/migration/MSMigrationUtils.jsm @@ -874,7 +874,7 @@ WindowsVaultFormPasswords.prototype = { var MSMigrationUtils = { MIGRATION_TYPE_IE: 1, MIGRATION_TYPE_EDGE: 2, - CtypesKernelHelpers: CtypesKernelHelpers, + CtypesKernelHelpers, getBookmarksMigrator(migrationType = this.MIGRATION_TYPE_IE) { return new Bookmarks(migrationType); }, diff --git a/browser/components/migration/MigrationUtils.jsm b/browser/components/migration/MigrationUtils.jsm index 8a966960634f..01f607f646a4 100644 --- a/browser/components/migration/MigrationUtils.jsm +++ b/browser/components/migration/MigrationUtils.jsm @@ -295,7 +295,6 @@ this.MigratorPrototype = { } notify("Migration:Started"); for (let [migrationType, itemResources] of resourcesGroupedByItems) { - notify("Migration:ItemBeforeMigrate", migrationType); let itemSuccess = false; diff --git a/browser/components/migration/SafariProfileMigrator.js b/browser/components/migration/SafariProfileMigrator.js index 664eb13beca8..2d782d5a448d 100644 --- a/browser/components/migration/SafariProfileMigrator.js +++ b/browser/components/migration/SafariProfileMigrator.js @@ -220,7 +220,7 @@ History.prototype = { places.push({ uri: NetUtil.newURI(entry.get("")), title: entry.get("title"), visits: [{ transitionType: transType, - visitDate: visitDate }] }); + visitDate }] }); } catch (ex) { // Safari's History file may contain malformed URIs which @@ -232,12 +232,12 @@ History.prototype = { if (places.length > 0) { MigrationUtils.insertVisitsWrapper(places, { _success: false, - handleResult: function() { + handleResult() { // Importing any entry is considered a successful import. this._success = true; }, - handleError: function() {}, - handleCompletion: function() { + handleError() {}, + handleCompletion() { aCallback(this._success); } }); diff --git a/browser/components/migration/content/migration.js b/browser/components/migration/content/migration.js index 3691232069da..908c9b965482 100644 --- a/browser/components/migration/content/migration.js +++ b/browser/components/migration/content/migration.js @@ -22,7 +22,7 @@ var MigrationWizard = { /* exported MigrationWizard */ _migrator: null, _autoMigrate: null, - init: function() + init() { let os = Services.obs; os.addObserver(this, "Migration:Started", false); @@ -58,7 +58,7 @@ var MigrationWizard = { /* exported MigrationWizard */ this.onImportSourcePageShow(); }, - uninit: function() + uninit() { var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); @@ -71,7 +71,7 @@ var MigrationWizard = { /* exported MigrationWizard */ }, // 1 - Import Source - onImportSourcePageShow: function() + onImportSourcePageShow() { // Show warning message to close the selected browser when needed function toggleCloseBrowserWarning() { @@ -137,7 +137,7 @@ var MigrationWizard = { /* exported MigrationWizard */ } }, - onImportSourcePageAdvanced: function() + onImportSourcePageAdvanced() { var newSource = document.getElementById("importSourceGroup").selectedItem.id; @@ -183,7 +183,7 @@ var MigrationWizard = { /* exported MigrationWizard */ }, // 2 - [Profile Selection] - onSelectProfilePageShow: function() + onSelectProfilePageShow() { // Disabling this for now, since we ask about import sources in automigration // too and don't want to disable the back button @@ -210,7 +210,7 @@ var MigrationWizard = { /* exported MigrationWizard */ profiles.selectedItem = this._selectedProfile ? document.getElementById(this._selectedProfile.id) : profiles.firstChild; }, - onSelectProfilePageRewound: function() + onSelectProfilePageRewound() { var profiles = document.getElementById("profiles"); this._selectedProfile = this._migrator.sourceProfiles.find( @@ -218,7 +218,7 @@ var MigrationWizard = { /* exported MigrationWizard */ ) || null; }, - onSelectProfilePageAdvanced: function() + onSelectProfilePageAdvanced() { var profiles = document.getElementById("profiles"); this._selectedProfile = this._migrator.sourceProfiles.find( @@ -231,7 +231,7 @@ var MigrationWizard = { /* exported MigrationWizard */ }, // 3 - ImportItems - onImportItemsPageShow: function() + onImportItemsPageShow() { var dataSources = document.getElementById("dataSources"); while (dataSources.hasChildNodes()) @@ -252,13 +252,13 @@ var MigrationWizard = { /* exported MigrationWizard */ } }, - onImportItemsPageRewound: function() + onImportItemsPageRewound() { this._wiz.canAdvance = true; this.onImportItemsPageAdvanced(); }, - onImportItemsPageAdvanced: function() + onImportItemsPageAdvanced() { var dataSources = document.getElementById("dataSources"); this._itemsFlags = 0; @@ -269,7 +269,7 @@ var MigrationWizard = { /* exported MigrationWizard */ } }, - onImportItemCommand: function() + onImportItemCommand() { var items = document.getElementById("dataSources"); var checkboxes = items.getElementsByTagName("checkbox"); @@ -286,7 +286,7 @@ var MigrationWizard = { /* exported MigrationWizard */ }, // 4 - Home Page Selection - onHomePageMigrationPageShow: function() + onHomePageMigrationPageShow() { // only want this on the first run if (!this._autoMigrate) { @@ -338,7 +338,7 @@ var MigrationWizard = { /* exported MigrationWizard */ } }, - onHomePageMigrationPageAdvanced: function() + onHomePageMigrationPageAdvanced() { // we might not have a selectedItem if we're in fallback mode try { @@ -349,7 +349,7 @@ var MigrationWizard = { /* exported MigrationWizard */ }, // 5 - Migrating - onMigratingPageShow: function() + onMigratingPageShow() { this._wiz.getButton("cancel").disabled = true; this._wiz.canRewind = false; @@ -363,7 +363,7 @@ var MigrationWizard = { /* exported MigrationWizard */ setTimeout(() => this.onMigratingMigrate(), 0); }, - onMigratingMigrate: function() + onMigratingMigrate() { this._migrator.migrate(this._itemsFlags, this._autoMigrate, this._selectedProfile); @@ -383,7 +383,7 @@ var MigrationWizard = { /* exported MigrationWizard */ } }, - _listItems: function(aID) + _listItems(aID) { var items = document.getElementById(aID); while (items.hasChildNodes()) @@ -409,7 +409,7 @@ var MigrationWizard = { /* exported MigrationWizard */ } }, - observe: function(aSubject, aTopic, aData) + observe(aSubject, aTopic, aData) { var label; switch (aTopic) { @@ -514,7 +514,7 @@ var MigrationWizard = { /* exported MigrationWizard */ } }, - onDonePageShow: function() + onDonePageShow() { this._wiz.getButton("cancel").disabled = true; this._wiz.canRewind = false; diff --git a/browser/components/migration/tests/unit/test_automigration.js b/browser/components/migration/tests/unit/test_automigration.js index 34e90d00d900..3a19dcbc3f62 100644 --- a/browser/components/migration/tests/unit/test_automigration.js +++ b/browser/components/migration/tests/unit/test_automigration.js @@ -215,7 +215,7 @@ add_task(function* checkUndoRemoval() { let frecencyUpdatePromise = new Promise(resolve => { let expectedChanges = 2; let observer = { - onFrecencyChanged: function() { + onFrecencyChanged() { if (!--expectedChanges) { PlacesUtils.history.removeObserver(observer); resolve(); @@ -561,31 +561,31 @@ add_task(function* checkUndoVisitsState() { ]); let wrongMethodDeferred = PromiseUtils.defer(); let observer = { - onBeginUpdateBatch: function() {}, - onEndUpdateBatch: function() {}, - onVisit: function(uri) { + onBeginUpdateBatch() {}, + onEndUpdateBatch() {}, + onVisit(uri) { wrongMethodDeferred.reject(new Error("Unexpected call to onVisit " + uri.spec)); }, - onTitleChanged: function(uri) { + onTitleChanged(uri) { wrongMethodDeferred.reject(new Error("Unexpected call to onTitleChanged " + uri.spec)); }, - onClearHistory: function() { + onClearHistory() { wrongMethodDeferred.reject("Unexpected call to onClearHistory"); }, - onPageChanged: function(uri) { + onPageChanged(uri) { wrongMethodDeferred.reject(new Error("Unexpected call to onPageChanged " + uri.spec)); }, - onFrecencyChanged: function(aURI) { + onFrecencyChanged(aURI) { do_print("frecency change"); Assert.ok(frecencyChangesExpected.has(aURI.spec), "Should be expecting frecency change for " + aURI.spec); frecencyChangesExpected.get(aURI.spec).resolve(); }, - onManyFrecenciesChanged: function() { + onManyFrecenciesChanged() { do_print("Many frecencies changed"); wrongMethodDeferred.reject(new Error("This test can't deal with onManyFrecenciesChanged to be called")); }, - onDeleteURI: function(aURI) { + onDeleteURI(aURI) { do_print("delete uri"); Assert.ok(uriDeletedExpected.has(aURI.spec), "Should be expecting uri deletion for " + aURI.spec); diff --git a/browser/components/newtab/NewTabURL.jsm b/browser/components/newtab/NewTabURL.jsm index 5000eae2e9ae..9c8b78dd571a 100644 --- a/browser/components/newtab/NewTabURL.jsm +++ b/browser/components/newtab/NewTabURL.jsm @@ -18,7 +18,7 @@ XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService", this.NewTabURL = { - get: function() { + get() { return aboutNewTabService.newTabURL; }, @@ -26,11 +26,11 @@ this.NewTabURL = { return aboutNewTabService.overridden; }, - override: function(newURL) { + override(newURL) { aboutNewTabService.newTabURL = newURL; }, - reset: function() { + reset() { aboutNewTabService.resetNewTabURL(); } }; diff --git a/browser/components/newtab/NewTabWebChannel.jsm b/browser/components/newtab/NewTabWebChannel.jsm index 28614ebb7883..8a6973f9e603 100644 --- a/browser/components/newtab/NewTabWebChannel.jsm +++ b/browser/components/newtab/NewTabWebChannel.jsm @@ -188,7 +188,7 @@ NewTabWebChannelImpl.prototype = { try { let msg = JSON.parse(message); - this.emit(msg.type, {data: msg.data, target: target}); + this.emit(msg.type, {data: msg.data, target}); } catch (err) { Cu.reportError(err); } diff --git a/browser/components/newtab/PlacesProvider.jsm b/browser/components/newtab/PlacesProvider.jsm index 2e26729c6435..63e17b88deee 100644 --- a/browser/components/newtab/PlacesProvider.jsm +++ b/browser/components/newtab/PlacesProvider.jsm @@ -248,6 +248,6 @@ Links.prototype = { const gLinks = new Links(); // jshint ignore:line let PlacesProvider = { - LinkChecker: LinkChecker, + LinkChecker, links: gLinks, }; diff --git a/browser/components/newtab/tests/browser/newtabwebchannel_basic.html b/browser/components/newtab/tests/browser/newtabwebchannel_basic.html index 75656b7167db..5e26d5b755fb 100644 --- a/browser/components/newtab/tests/browser/newtabwebchannel_basic.html +++ b/browser/components/newtab/tests/browser/newtabwebchannel_basic.html @@ -25,7 +25,7 @@ detail = JSON.stringify(detail); } let reply = new window.CustomEvent("WebChannelMessageToChrome", { - detail: detail + detail }); window.dispatchEvent(reply); } diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index f06528712477..255b39c279e1 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -543,7 +543,7 @@ BrowserGlue.prototype = { { label: win.gNavigatorBundle.getFormattedString("addonwatch.disable.label", [addon.name]), accessKey: "", // workaround for bug 1192901 - callback: function() { + callback() { done(STATE_USER_PICKED_DISABLE); addon.userDisabled = true; if (addon.pendingOperations == addon.PENDING_NONE) { @@ -554,7 +554,7 @@ BrowserGlue.prototype = { { label: win.gNavigatorBundle.getFormattedString("addonwatch.restart.label", [brandShortName]), accessKey: win.gNavigatorBundle.getString("addonwatch.restart.accesskey"), - callback: function() { + callback() { let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"] .getService(Ci.nsIAppStartup); appStartup.quit(appStartup.eForceQuit | appStartup.eRestart); @@ -569,7 +569,7 @@ BrowserGlue.prototype = { { label: win.gNavigatorBundle.getString("addonwatch.ignoreSession.label"), accessKey: win.gNavigatorBundle.getString("addonwatch.ignoreSession.accesskey"), - callback: function() { + callback() { done(STATE_USER_PICKED_IGNORE_FOR_NOW); AddonWatcher.ignoreAddonForSession(addonId); } @@ -577,7 +577,7 @@ BrowserGlue.prototype = { { label: win.gNavigatorBundle.getString("addonwatch.ignorePerm.label"), accessKey: win.gNavigatorBundle.getString("addonwatch.ignorePerm.accesskey"), - callback: function() { + callback() { done(STATE_USER_PICKED_IGNORE_FOREVER); AddonWatcher.ignoreAddonPermanently(addonId); } @@ -672,7 +672,7 @@ BrowserGlue.prototype = { Services.obs.notifyObservers(null, "browser-ui-startup-complete", ""); }, - _checkForOldBuildUpdates: function() { + _checkForOldBuildUpdates() { // check for update if our build is old if (AppConstants.MOZ_UPDATER && Services.prefs.getBoolPref("app.update.enabled") && @@ -724,7 +724,7 @@ BrowserGlue.prototype = { } }, - _trackSlowStartup: function() { + _trackSlowStartup() { if (Services.startup.interrupted || Services.prefs.getBoolPref("browser.slowStartup.notificationDisabled")) return; @@ -767,7 +767,7 @@ BrowserGlue.prototype = { return (Date.now() - profileDate) / ONE_DAY; }), - _showSlowStartupNotification: function(profileAge) { + _showSlowStartupNotification(profileAge) { if (profileAge < 90) // 3 months return; @@ -782,14 +782,14 @@ BrowserGlue.prototype = { { label: win.gNavigatorBundle.getString("slowStartup.helpButton.label"), accessKey: win.gNavigatorBundle.getString("slowStartup.helpButton.accesskey"), - callback: function() { + callback() { win.openUILinkIn("https://support.mozilla.org/kb/reset-firefox-easily-fix-most-problems", "tab"); } }, { label: win.gNavigatorBundle.getString("slowStartup.disableNotificationButton.label"), accessKey: win.gNavigatorBundle.getString("slowStartup.disableNotificationButton.accesskey"), - callback: function() { + callback() { Services.prefs.setBoolPref("browser.slowStartup.notificationDisabled", true); } } @@ -808,7 +808,7 @@ BrowserGlue.prototype = { * String of either "unused" or "uninstall", specifying the reason * why a profile reset is offered. */ - _resetProfileNotification: function(reason) { + _resetProfileNotification(reason) { let win = RecentWindow.getMostRecentBrowserWindow(); if (!win) return; @@ -833,7 +833,7 @@ BrowserGlue.prototype = { { label: resetBundle.formatStringFromName("refreshProfile.resetButton.label", [productName], 1), accessKey: resetBundle.GetStringFromName("refreshProfile.resetButton.accesskey"), - callback: function() { + callback() { ResetProfile.openConfirmationDialog(win); } }, @@ -845,7 +845,7 @@ BrowserGlue.prototype = { nb.PRIORITY_INFO_LOW, buttons); }, - _notifyUnsignedAddonsDisabled: function() { + _notifyUnsignedAddonsDisabled() { let win = RecentWindow.getMostRecentBrowserWindow(); if (!win) return; @@ -855,7 +855,7 @@ BrowserGlue.prototype = { { label: win.gNavigatorBundle.getString("unsignedAddonsDisabled.learnMore.label"), accessKey: win.gNavigatorBundle.getString("unsignedAddonsDisabled.learnMore.accesskey"), - callback: function() { + callback() { win.BrowserOpenAddonsMgr("addons://list/extension?unsigned=true"); } }, @@ -866,7 +866,7 @@ BrowserGlue.prototype = { nb.PRIORITY_WARNING_MEDIUM, buttons); }, - _firstWindowTelemetry: function(aWindow) { + _firstWindowTelemetry(aWindow) { let SCALING_PROBE_NAME = ""; switch (AppConstants.platform) { case "win": @@ -979,7 +979,7 @@ BrowserGlue.prototype = { /** * Application shutdown handler. */ - _onQuitApplicationGranted: function() { + _onQuitApplicationGranted() { // This pref must be set here because SessionStore will use its value // on quit-application. this._setPrefToSaveSession(); @@ -1008,14 +1008,14 @@ BrowserGlue.prototype = { } }, - _initServiceDiscovery: function() { + _initServiceDiscovery() { if (!Services.prefs.getBoolPref("browser.casting.enabled")) { return; } var rokuDevice = { id: "roku:ecp", target: "roku:ecp", - factory: function(aService) { + factory(aService) { Cu.import("resource://gre/modules/RokuApp.jsm"); return new RokuApp(aService); }, @@ -1171,7 +1171,7 @@ BrowserGlue.prototype = { E10SAccessibilityCheck.onWindowsRestored(); }, - _createExtraDefaultProfile: function() { + _createExtraDefaultProfile() { if (!AppConstants.MOZ_DEV_EDITION) { return; } @@ -1391,10 +1391,10 @@ BrowserGlue.prototype = { let buttons = [ { - label: label, + label, accessKey: key, popup: null, - callback: function(aNotificationBar, aButton) { + callback(aNotificationBar, aButton) { win.openUILinkIn(url, "tab"); } } @@ -1694,9 +1694,9 @@ BrowserGlue.prototype = { var buttons = [ { label: buttonText, - accessKey: accessKey, + accessKey, popup: null, - callback: function(aNotificationBar, aButton) { + callback(aNotificationBar, aButton) { win.openUILinkIn(url, "tab"); } } @@ -1709,7 +1709,7 @@ BrowserGlue.prototype = { notification.persistence = -1; // Until user closes it }, - _showSyncStartedDoorhanger: function() { + _showSyncStartedDoorhanger() { let bundle = Services.strings.createBundle("chrome://browser/locale/accounts.properties"); let productName = gBrandBundle.GetStringFromName("brandShortName"); let title = bundle.GetStringFromName("syncStartNotification.title"); @@ -2098,7 +2098,7 @@ BrowserGlue.prototype = { true, url, clickCallback); }), - _hasSystemAlertsService: function() { + _hasSystemAlertsService() { try { return !!Cc["@mozilla.org/system-alerts-service;1"].getService( Ci.nsIAlertsService); @@ -2356,7 +2356,7 @@ BrowserGlue.prototype = { AlertsService.showAlertNotification(null, title, body, true, null, clickCallback); }, - _handleFlashHang: function() { + _handleFlashHang() { ++this._flashHangCount; if (this._flashHangCount < 2) { return; @@ -2388,7 +2388,7 @@ BrowserGlue.prototype = { let buttons = [{ label: win.gNavigatorBundle.getString("flashHang.helpButton.label"), accessKey: win.gNavigatorBundle.getString("flashHang.helpButton.accesskey"), - callback: function() { + callback() { win.openUILinkIn("https://support.mozilla.org/kb/flash-protected-mode-autodisabled", "tab"); } }]; @@ -2509,13 +2509,13 @@ var DefaultBrowserCheck = { _setAsDefaultTimer: null, _setAsDefaultButtonClickStartTime: 0, - closePrompt: function(aNode) { + closePrompt(aNode) { if (this._notification) { this._notification.close(); } }, - setAsDefault: function() { + setAsDefault() { let claimAllTypes = true; let setAsDefaultError = false; if (AppConstants.platform == "win") { @@ -2571,7 +2571,7 @@ var DefaultBrowserCheck = { .add(setAsDefaultError); }, - _createPopup: function(win, notNowStrings, neverStrings) { + _createPopup(win, notNowStrings, neverStrings) { let doc = win.document; let popup = doc.createElement("menupopup"); popup.id = this.OPTIONPOPUP; @@ -2594,7 +2594,7 @@ var DefaultBrowserCheck = { popupset.appendChild(popup); }, - handleEvent: function(event) { + handleEvent(event) { if (event.type == "command") { if (event.target.id == "defaultBrowserNever") { ShellService.shouldCheckDefaultBrowser = false; @@ -2603,7 +2603,7 @@ var DefaultBrowserCheck = { } }, - prompt: function(win) { + prompt(win) { let useNotificationBar = Services.prefs.getBoolPref("browser.defaultbrowser.notificationbar"); let brandBundle = win.document.getElementById("bundle_brand"); @@ -2689,7 +2689,7 @@ var DefaultBrowserCheck = { } }, - _onNotificationEvent: function(eventType) { + _onNotificationEvent(eventType) { if (eventType == "removed") { let doc = this._notification.ownerDocument; let popup = doc.getElementById(this.OPTIONPOPUP); @@ -2705,7 +2705,7 @@ var E10SAccessibilityCheck = { // first window being opening. _wantsPrompt: false, - init: function() { + init() { Services.obs.addObserver(this, "a11y-init-or-shutdown", true); Services.obs.addObserver(this, "quit-application-granted", true); }, @@ -2719,7 +2719,7 @@ var E10SAccessibilityCheck = { return false; }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { switch (topic) { case "quit-application-granted": // Tag the profile with a11y load state. We use this in nsAppRunner @@ -2737,7 +2737,7 @@ var E10SAccessibilityCheck = { } }, - onWindowsRestored: function() { + onWindowsRestored() { if (this._wantsPrompt) { this._wantsPrompt = false; this._showE10sAccessibilityWarning(); @@ -2746,7 +2746,7 @@ var E10SAccessibilityCheck = { _warnedAboutAccessibility: false, - _showE10sAccessibilityWarning: function() { + _showE10sAccessibilityWarning() { // We don't prompt about a11y incompat if e10s is off. if (!Services.appinfo.browserTabsRemoteAutostart) { return; @@ -2794,7 +2794,7 @@ var E10SAccessibilityCheck = { let mainAction = { label: win.gNavigatorBundle.getString("e10s.accessibilityNotice.acceptButton.label"), accessKey: win.gNavigatorBundle.getString("e10s.accessibilityNotice.acceptButton.accesskey"), - callback: function() { + callback() { // If the user invoked the button option remove the notification, // otherwise keep the alert icon around in the address bar. notification.remove(); diff --git a/browser/components/originattributes/test/browser/browser_cache.js b/browser/components/originattributes/test/browser/browser_cache.js index 87a0aadd1b42..f1f80d5ccf6a 100644 --- a/browser/components/originattributes/test/browser/browser_cache.js +++ b/browser/components/originattributes/test/browser/browser_cache.js @@ -42,8 +42,8 @@ function cacheDataForContext(loadContextInfo) { let cacheVisitor = { onCacheStorageInfo(num, consumption) {}, onCacheEntryInfo(uri, idEnhance) { - cacheEntries.push({ uri: uri, - idEnhance: idEnhance }); + cacheEntries.push({ uri, + idEnhance }); }, onCacheEntryVisitCompleted() { resolve(cacheEntries); @@ -73,7 +73,7 @@ function observeChannels(onChannel) { // We use a dummy proxy filter to catch all channels, even those that do not // generate an "http-on-modify-request" notification, such as link preconnects. let proxyFilter = { - applyFilter : function(aProxyService, aChannel, aProxy) { + applyFilter(aProxyService, aChannel, aProxy) { // We have the channel; provide it to the callback. onChannel(aChannel); // Pass on aProxy unmodified. @@ -141,7 +141,7 @@ function* doInit(aMode) { function* doTest(aBrowser) { let argObj = { - randomSuffix: randomSuffix, + randomSuffix, urlPrefix: TEST_DOMAIN + TEST_PATH, }; diff --git a/browser/components/places/PlacesUIUtils.jsm b/browser/components/places/PlacesUIUtils.jsm index 45f3226e6ca4..7ab2f9f0391e 100644 --- a/browser/components/places/PlacesUIUtils.jsm +++ b/browser/components/places/PlacesUIUtils.jsm @@ -584,7 +584,7 @@ this.PlacesUIUtils = { * @return a Places Transaction that can be transacted for performing the * move/insert command. */ - getTransactionForData: function(aData, aType, aNewParentGuid, aIndex, aCopy) { + getTransactionForData(aData, aType, aNewParentGuid, aIndex, aCopy) { if (!this.SUPPORTED_FLAVORS.includes(aData.type)) throw new Error(`Unsupported '${aData.type}' data type`); @@ -617,7 +617,7 @@ this.PlacesUIUtils = { let title = aData.type != PlacesUtils.TYPE_UNICODE ? aData.title : aData.uri; return PlacesTransactions.NewBookmark({ uri: NetUtil.newURI(aData.uri) - , title: title + , title , parentGuid: aNewParentGuid , index: aIndex }); }, @@ -797,7 +797,7 @@ this.PlacesUIUtils = { * a node, except the root node of a query. * @return true if the aNode represents a removable entry, false otherwise. */ - canUserRemove: function(aNode) { + canUserRemove(aNode) { let parentNode = aNode.parent; if (!parentNode) { // canUserRemove doesn't accept root nodes. @@ -845,7 +845,7 @@ this.PlacesUIUtils = { * @note livemark "folders" are considered read-only (but see bug 1072833). * @return true if aItemId points to a read-only folder, false otherwise. */ - isContentsReadOnly: function(aNodeOrItemId) { + isContentsReadOnly(aNodeOrItemId) { let itemId; if (typeof(aNodeOrItemId) == "number") { itemId = aNodeOrItemId; @@ -1408,7 +1408,7 @@ this.PlacesUIUtils = { return queryName; }, - shouldShowTabsFromOtherComputersMenuitem: function() { + shouldShowTabsFromOtherComputersMenuitem() { let weaveOK = Weave.Status.checkSetup() != Weave.CLIENT_NOT_CONFIGURED && Weave.Svc.Prefs.get("firstSync", "") != "notReady"; return weaveOK; @@ -1691,7 +1691,7 @@ XPCOMUtils.defineLazyGetter(PlacesUIUtils, "ptm", function() { * boolean value. * @return nsITransaction object. */ - setLoadInSidebar: function(aItemId, aLoadInSidebar) + setLoadInSidebar(aItemId, aLoadInSidebar) { let annoObj = { name: PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO, type: Ci.nsIAnnotationService.TYPE_INT32, @@ -1710,7 +1710,7 @@ XPCOMUtils.defineLazyGetter(PlacesUIUtils, "ptm", function() { * new description. * @return nsITransaction object. */ - editItemDescription: function(aItemId, aDescription) + editItemDescription(aItemId, aDescription) { let annoObj = { name: PlacesUIUtils.DESCRIPTION_ANNO, type: Ci.nsIAnnotationService.TYPE_STRING, diff --git a/browser/components/places/content/bookmarkProperties.js b/browser/components/places/content/bookmarkProperties.js index f1695ffd5af7..42d825ea460d 100644 --- a/browser/components/places/content/bookmarkProperties.js +++ b/browser/components/places/content/bookmarkProperties.js @@ -614,7 +614,7 @@ var BookmarkPropertiesPanel = { let folderGuid = yield PlacesUtils.promiseItemGuid(container); let bm = yield PlacesUtils.bookmarks.fetch({ parentGuid: folderGuid, - index: index + index }); this._itemId = yield PlacesUtils.promiseItemId(bm.guid); diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js index 3cdb7135ae30..d5170fa7e1c3 100644 --- a/browser/components/places/content/browserPlacesViews.js +++ b/browser/components/places/content/browserPlacesViews.js @@ -135,8 +135,8 @@ PlacesViewBase.prototype = { get selType() { return "single"; }, - selectItems: function() { }, - selectAll: function() { }, + selectItems() { }, + selectAll() { }, get selectedNode() { if (this._contextMenuShown) { @@ -619,12 +619,12 @@ PlacesViewBase.prototype = { } }, - nodeTagsChanged: function() { }, - nodeDateAddedChanged: function() { }, - nodeLastModifiedChanged: function() { }, - nodeKeywordChanged: function() { }, - sortingChanged: function() { }, - batching: function() { }, + nodeTagsChanged() { }, + nodeDateAddedChanged() { }, + nodeLastModifiedChanged() { }, + nodeKeywordChanged() { }, + sortingChanged() { }, + batching() { }, nodeInserted: function PVB_nodeInserted(aParentPlacesNode, aPlacesNode, aIndex) { @@ -1180,7 +1180,7 @@ PlacesToolbar.prototype = { } }, - updateOverflowStatus: function() { + updateOverflowStatus() { if (this._rootElt.scrollLeftMin != this._rootElt.scrollLeftMax) { this._onOverflow(); } else { diff --git a/browser/components/places/content/controller.js b/browser/components/places/content/controller.js index d0e1fab83c32..061ba02e82ee 100644 --- a/browser/components/places/content/controller.js +++ b/browser/components/places/content/controller.js @@ -59,7 +59,7 @@ InsertionPoint.prototype = { return this._index = val; }, - promiseGuid: function() { + promiseGuid() { return PlacesUtils.promiseItemGuid(this.itemId); }, @@ -867,7 +867,7 @@ PlacesController.prototype = { let tag = node.parent.title; if (!tag) tag = PlacesUtils.bookmarks.getItemTitle(tagItemId); - transactions.push(PlacesTransactions.Untag({ uri: uri, tag: tag })); + transactions.push(PlacesTransactions.Untag({ uri, tag })); } else { let txn = new PlacesUntagURITransaction(uri, [tagItemId]); @@ -885,7 +885,7 @@ PlacesController.prototype = { let tag = node.title; let URIs = PlacesUtils.tagging.getURIsForTag(tag); if (PlacesUIUtils.useAsyncTransactions) { - transactions.push(PlacesTransactions.Untag({ tag: tag, uris: URIs })); + transactions.push(PlacesTransactions.Untag({ tag, uris: URIs })); } else { for (var j = 0; j < URIs.length; j++) { @@ -1308,7 +1308,7 @@ PlacesController.prototype = { if (PlacesUIUtils.useAsyncTransactions) { if (ip.isTag) { let uris = items.filter(item => "uri" in item).map(item => NetUtil.newURI(item.uri)); - yield PlacesTransactions.Tag({ uris: uris, tag: ip.tagName }).transact(); + yield PlacesTransactions.Tag({ uris, tag: ip.tagName }).transact(); } else { yield PlacesTransactions.batch(function* () { @@ -1548,7 +1548,7 @@ var PlacesControllerDragHelper = { * A node unwrapped by PlacesUtils.unwrapNodes(). * @return True if the node can be moved, false otherwise. */ - canMoveUnwrappedNode: function(aUnwrappedNode) { + canMoveUnwrappedNode(aUnwrappedNode) { return aUnwrappedNode.id > 0 && !PlacesUtils.isRootItem(aUnwrappedNode.id) && (!aUnwrappedNode.parent || !PlacesUIUtils.isContentsReadOnly(aUnwrappedNode.parent)) && @@ -1637,7 +1637,7 @@ var PlacesControllerDragHelper = { let uri = NetUtil.newURI(unwrapped.uri); let tagItemId = insertionPoint.itemId; if (PlacesUIUtils.useAsyncTransactions) - transactions.push(PlacesTransactions.Tag({ uri: uri, tag: tagName })); + transactions.push(PlacesTransactions.Tag({ uri, tag: tagName })); else transactions.push(new PlacesTagURITransaction(uri, [tagItemId])); } @@ -1679,7 +1679,7 @@ var PlacesControllerDragHelper = { * @param aContainer * The container were we are want to drop */ - disallowInsertion: function(aContainer) { + disallowInsertion(aContainer) { NS_ASSERT(aContainer, "empty container"); // Allow dropping into Tag containers and editable folders. return !PlacesUtils.nodeIsTagQuery(aContainer) && diff --git a/browser/components/places/content/editBookmarkOverlay.js b/browser/components/places/content/editBookmarkOverlay.js index f08b6b36c91d..8df6511d9a73 100644 --- a/browser/components/places/content/editBookmarkOverlay.js +++ b/browser/components/places/content/editBookmarkOverlay.js @@ -393,7 +393,7 @@ var gEditItemOverlay = { this._recentFolders = []; for (let i = 0; i < folderIds.length; i++) { var lastUsed = annos.getItemAnnotation(folderIds[i], LAST_USED_ANNO); - this._recentFolders.push({ folderId: folderIds[i], lastUsed: lastUsed }); + this._recentFolders.push({ folderId: folderIds[i], lastUsed }); } this._recentFolders.sort(function(a, b) { if (b.lastUsed < a.lastUsed) diff --git a/browser/components/places/content/moveBookmarks.js b/browser/components/places/content/moveBookmarks.js index 626b2b904e40..5f4bf0cfc050 100644 --- a/browser/components/places/content/moveBookmarks.js +++ b/browser/components/places/content/moveBookmarks.js @@ -14,7 +14,7 @@ var gMoveBookmarksDialog = { return this._foldersTree; }, - init: function() { + init() { this._nodes = window.arguments[0]; this.foldersTree.place = diff --git a/browser/components/places/content/places.js b/browser/components/places/content/places.js index 7a141354d172..50ebfaf839fa 100644 --- a/browser/components/places/content/places.js +++ b/browser/components/places/content/places.js @@ -32,7 +32,7 @@ var PlacesOrganizer = { "editBMPanel_keywordRow", ], - _initFolderTree: function() { + _initFolderTree() { var leftPaneRoot = PlacesUIUtils.leftPaneFolderId; this._places.place = "place:excludeItems=1&expandQueries=0&folder=" + leftPaneRoot; }, @@ -1250,7 +1250,7 @@ var ContentArea = { let { view, options } = this._specialViews.get(aQueryString); if (typeof view == "function") { view = view(); - this._specialViews.set(aQueryString, { view: view, options: options }); + this._specialViews.set(aQueryString, { view, options }); } return view; } @@ -1356,7 +1356,7 @@ var ContentArea = { return viewOptions; }, - focus: function() { + focus() { this._deck.selectedPanel.focus(); } }; diff --git a/browser/components/places/content/treeView.js b/browser/components/places/content/treeView.js index ece93fd4ff99..81180a7d0b01 100644 --- a/browser/components/places/content/treeView.js +++ b/browser/components/places/content/treeView.js @@ -1135,7 +1135,7 @@ PlacesTreeView.prototype = { this._selection = val; }, - getRowProperties: function() { return ""; }, + getRowProperties() { return ""; }, getCellProperties: function PTV_getCellProperties(aRow, aColumn) { @@ -1217,7 +1217,7 @@ PlacesTreeView.prototype = { return props + " " + properties; }, - getColumnProperties: function(aColumn) { return ""; }, + getColumnProperties(aColumn) { return ""; }, isContainer: function PTV_isContainer(aRow) { // Only leaf nodes aren't listed in the rows array. @@ -1414,7 +1414,7 @@ PlacesTreeView.prototype = { return false; }, - getLevel: function(aRow) { + getLevel(aRow) { return this._getNodeForRow(aRow).indentLevel; }, @@ -1427,8 +1427,8 @@ PlacesTreeView.prototype = { return node.icon; }, - getProgressMode: function(aRow, aColumn) { }, - getCellValue: function(aRow, aColumn) { }, + getProgressMode(aRow, aColumn) { }, + getCellValue(aRow, aColumn) { }, getCellText: function PTV_getCellText(aRow, aColumn) { let node = this._getNodeForRow(aRow); @@ -1717,10 +1717,10 @@ PlacesTreeView.prototype = { } }, - selectionChanged: function() { }, - cycleCell: function(aRow, aColumn) { }, - isSelectable: function(aRow, aColumn) { return false; }, - performAction: function(aAction) { }, - performActionOnRow: function(aAction, aRow) { }, - performActionOnCell: function(aAction, aRow, aColumn) { } + selectionChanged() { }, + cycleCell(aRow, aColumn) { }, + isSelectable(aRow, aColumn) { return false; }, + performAction(aAction) { }, + performActionOnRow(aAction, aRow) { }, + performActionOnCell(aAction, aRow, aColumn) { } }; diff --git a/browser/components/places/tests/browser/browser_423515.js b/browser/components/places/tests/browser/browser_423515.js index 8a67f050cdd5..2eb129cb7783 100644 --- a/browser/components/places/tests/browser/browser_423515.js +++ b/browser/components/places/tests/browser/browser_423515.js @@ -20,11 +20,11 @@ function test() { // add a regular folder, should be moveable tests.push({ - populate: function() { + populate() { this.id = PlacesUtils.bookmarks.createFolder(rootId, "", IDX); }, - validate: function() { + validate() { is(rootNode.childCount, 1, "populate added data to the test root"); is(PlacesControllerDragHelper.canMoveNode(rootNode.getChild(0)), @@ -34,13 +34,13 @@ function test() { // add a regular folder shortcut, should be moveable tests.push({ - populate: function() { + populate() { this.folderId = PlacesUtils.bookmarks.createFolder(rootId, "foo", IDX); this.shortcutId = PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("place:folder=" + this.folderId), IDX, "bar"); }, - validate: function() { + validate() { is(rootNode.childCount, 2, "populated data to the test root"); @@ -62,13 +62,13 @@ function test() { // add a regular query, should be moveable tests.push({ - populate: function() { + populate() { this.bookmarkId = PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("http://foo.com"), IDX, "foo"); this.queryId = PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("place:terms=foo"), IDX, "bar"); }, - validate: function() { + validate() { is(rootNode.childCount, 2, "populated data to the test root"); @@ -90,14 +90,14 @@ function test() { PlacesUtils.tagsFolderId, PlacesUtils.unfiledBookmarksFolderId, PlacesUtils.toolbarFolderId], shortcuts: {}, - populate: function() { + populate() { for (var i = 0; i < this.folders.length; i++) { var id = this.folders[i]; this.shortcuts[id] = PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("place:folder=" + id), IDX, ""); } }, - validate: function() { + validate() { // test toolbar shortcut node is(rootNode.childCount, this.folders.length, "populated data to the test root"); @@ -138,13 +138,13 @@ function test() { // test that a tag container cannot be moved tests.push({ - populate: function() { + populate() { // tag a uri this.uri = makeURI("http://foo.com"); PlacesUtils.tagging.tagURI(this.uri, ["bar"]); registerCleanupFunction(() => PlacesUtils.tagging.untagURI(this.uri, ["bar"])); }, - validate: function() { + validate() { // get tag root var query = PlacesUtils.history.getNewQuery(); var options = PlacesUtils.history.getNewQueryOptions(); diff --git a/browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js b/browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js index 78d667e5f169..aaece0b9f5ed 100644 --- a/browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js +++ b/browser/components/places/tests/browser/browser_bookmarklet_windowOpen.js @@ -6,9 +6,9 @@ function makeBookmarkFor(url, keyword) { return Promise.all([ PlacesUtils.bookmarks.insert({ parentGuid: PlacesUtils.bookmarks.unfiledGuid, title: "bookmarklet", - url: url }), - PlacesUtils.keywords.insert({url: url, - keyword: keyword}) + url }), + PlacesUtils.keywords.insert({url, + keyword}) ]); } diff --git a/browser/components/places/tests/browser/browser_bookmarksProperties.js b/browser/components/places/tests/browser/browser_bookmarksProperties.js index 7f7d635afe01..63d1c4f874e0 100644 --- a/browser/components/places/tests/browser/browser_bookmarksProperties.js +++ b/browser/components/places/tests/browser/browser_bookmarksProperties.js @@ -63,7 +63,7 @@ gTests.push({ _itemId: null, _cleanShutdown: false, - setup: function(aCallback) { + setup(aCallback) { // Add a bookmark in unsorted bookmarks folder. this._itemId = add_bookmark(PlacesUtils._uri(TEST_URL)); ok(this._itemId > 0, "Correctly added a bookmark"); @@ -75,14 +75,14 @@ gTests.push({ aCallback(); }, - selectNode: function(tree) { + selectNode(tree) { tree.selectItems([PlacesUtils.unfiledBookmarksFolderId]); PlacesUtils.asContainer(tree.selectedNode).containerOpen = true; tree.selectItems([this._itemId]); is(tree.selectedNode.itemId, this._itemId, "Bookmark has been selected"); }, - run: function() { + run() { // open tags autocomplete and press enter var tagsField = this.window.document.getElementById("editBMPanel_tagsField"); var self = this; @@ -97,7 +97,7 @@ gTests.push({ }, true); var popupListener = { - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "popuphidden": // Everything worked fine, we can stop observing the window. @@ -137,12 +137,12 @@ gTests.push({ }); }, - finish: function() { + finish() { SidebarUI.hide(); runNextTest(); }, - cleanup: function() { + cleanup() { // Check tags have not changed. var tags = PlacesUtils.tagging.getTagsForURI(PlacesUtils._uri(TEST_URL)); is(tags[0], "testTag", "Tag on node has not changed"); @@ -165,7 +165,7 @@ gTests.push({ _itemId: null, _cleanShutdown: false, - setup: function(aCallback) { + setup(aCallback) { // Add a bookmark in unsorted bookmarks folder. this._itemId = add_bookmark(PlacesUtils._uri(TEST_URL)); ok(this._itemId > 0, "Correctly added a bookmark"); @@ -177,14 +177,14 @@ gTests.push({ aCallback(); }, - selectNode: function(tree) { + selectNode(tree) { tree.selectItems([PlacesUtils.unfiledBookmarksFolderId]); PlacesUtils.asContainer(tree.selectedNode).containerOpen = true; tree.selectItems([this._itemId]); is(tree.selectedNode.itemId, this._itemId, "Bookmark has been selected"); }, - run: function() { + run() { // open tags autocomplete and press enter var tagsField = this.window.document.getElementById("editBMPanel_tagsField"); var self = this; @@ -199,7 +199,7 @@ gTests.push({ }, true); var popupListener = { - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "popuphidden": // Everything worked fine. @@ -237,12 +237,12 @@ gTests.push({ EventUtils.synthesizeKey("t", {}, this.window); }, - finish: function() { + finish() { SidebarUI.hide(); runNextTest(); }, - cleanup: function() { + cleanup() { // Check tags have not changed. var tags = PlacesUtils.tagging.getTagsForURI(PlacesUtils._uri(TEST_URL)); is(tags[0], "testTag", "Tag on node has not changed"); @@ -264,7 +264,7 @@ gTests.push({ historyView: SIDEBAR_HISTORY_BYLASTVISITED_VIEW, window: null, - setup: function(aCallback) { + setup(aCallback) { // Add a visit. PlacesTestUtils.addVisits( {uri: PlacesUtils._uri(TEST_URL), @@ -272,14 +272,14 @@ gTests.push({ ).then(aCallback); }, - selectNode: function(tree) { + selectNode(tree) { var visitNode = tree.view.nodeForTreeIndex(0); tree.selectNode(visitNode); is(tree.selectedNode.uri, TEST_URL, "The correct visit has been selected"); is(tree.selectedNode.itemId, -1, "The selected node is not bookmarked"); }, - run: function() { + run() { // Open folder selector. var foldersExpander = this.window.document.getElementById("editBMPanel_foldersExpander"); var folderTree = this.window.document.getElementById("editBMPanel_folderTree"); @@ -315,12 +315,12 @@ gTests.push({ foldersExpander.doCommand(); }, - finish: function() { + finish() { SidebarUI.hide(); runNextTest(); }, - cleanup: function() { + cleanup() { return PlacesTestUtils.clearHistory(); } }); diff --git a/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js b/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js index fbc0b02b6387..95aa6f620946 100644 --- a/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js +++ b/browser/components/places/tests/browser/browser_drag_bookmarks_on_toolbar.js @@ -144,7 +144,7 @@ var gTests = [ { desc: "Drag a folder on toolbar", - run: function() { + run() { // Create a test folder to be dragged. var folderId = PlacesUtils.bookmarks .createFolder(PlacesUtils.toolbarFolderId, @@ -185,7 +185,7 @@ var gTests = [ { desc: "Drag a bookmark on toolbar", - run: function() { + run() { // Create a test bookmark to be dragged. var itemId = PlacesUtils.bookmarks .insertBookmark(PlacesUtils.toolbarFolderId, diff --git a/browser/components/places/tests/browser/browser_library_batch_delete.js b/browser/components/places/tests/browser/browser_library_batch_delete.js index 531ad9139b48..37f843b6a21b 100644 --- a/browser/components/places/tests/browser/browser_library_batch_delete.js +++ b/browser/components/places/tests/browser/browser_library_batch_delete.js @@ -14,10 +14,10 @@ var gLibrary; gTests.push({ desc: "Create and batch remove bookmarks", - run: function() { + run() { let testURI = makeURI(TEST_URL); PlacesUtils.history.runInBatchMode({ - runBatched: function(aUserData) { + runBatched(aUserData) { // Create a folder in unserted and populate it with bookmarks. let folder = PlacesUtils.bookmarks.createFolder( PlacesUtils.unfiledBookmarksFolderId, "deleteme", @@ -67,7 +67,7 @@ gTests.push({ gTests.push({ desc: "Ensure correct selection and functionality in Library", - run: function() { + run() { let PO = gLibrary.PlacesOrganizer; let ContentTree = gLibrary.ContentTree; // Move selection forth and back. diff --git a/browser/components/places/tests/browser/browser_library_downloads.js b/browser/components/places/tests/browser/browser_library_downloads.js index 77005b6fc6b2..3578b8f2b7cf 100644 --- a/browser/components/places/tests/browser/browser_library_downloads.js +++ b/browser/components/places/tests/browser/browser_library_downloads.js @@ -32,11 +32,11 @@ function test() { }, ] PlacesUtils.asyncHistory.updatePlaces(places, { - handleResult: function() {}, - handleError: function() { + handleResult() {}, + handleError() { ok(false, "gHistory.updatePlaces() failed"); }, - handleCompletion: function() { + handleCompletion() { // Make sure Downloads is present. isnot(win.PlacesOrganizer._places.selectedNode, null, "Downloads is present and selected"); diff --git a/browser/components/places/tests/browser/browser_library_infoBox.js b/browser/components/places/tests/browser/browser_library_infoBox.js index 8189438f3c2e..644e216cdc7c 100644 --- a/browser/components/places/tests/browser/browser_library_infoBox.js +++ b/browser/components/places/tests/browser/browser_library_infoBox.js @@ -16,7 +16,7 @@ var gLibrary; gTests.push({ desc: "Bug 430148 - Remove or hide the more/less button in details pane...", - run: function() { + run() { var PO = gLibrary.PlacesOrganizer; let ContentTree = gLibrary.ContentTree; var infoBoxExpanderWrapper = getAndCheckElmtById("infoBoxExpanderWrapper"); diff --git a/browser/components/places/tests/browser/browser_library_left_pane_fixnames.js b/browser/components/places/tests/browser/browser_library_left_pane_fixnames.js index 7cea38f20ce8..2c739c04fc34 100644 --- a/browser/components/places/tests/browser/browser_library_left_pane_fixnames.js +++ b/browser/components/places/tests/browser/browser_library_left_pane_fixnames.js @@ -64,7 +64,7 @@ function test() { .getItemAnnotation(items[i], PlacesUIUtils.ORGANIZER_QUERY_ANNO); var query = { name: queryName, - itemId: itemId, + itemId, correctTitle: PlacesUtils.bookmarks.getItemTitle(itemId) } switch (queryName) { case "BookmarksToolbar": diff --git a/browser/components/places/tests/browser/browser_library_middleclick.js b/browser/components/places/tests/browser/browser_library_middleclick.js index 0bde80bc0165..bc1605ce5d84 100644 --- a/browser/components/places/tests/browser/browser_library_middleclick.js +++ b/browser/components/places/tests/browser/browser_library_middleclick.js @@ -18,7 +18,7 @@ var gTabsListener = { _loadedURIs: [], _openTabsCount: 0, - handleEvent: function(aEvent) { + handleEvent(aEvent) { if (aEvent.type != "TabOpen") return; @@ -32,7 +32,7 @@ var gTabsListener = { "Tab has been opened in current browser window"); }, - onLocationChange: function(aBrowser, aWebProgress, aRequest, aLocationURI, + onLocationChange(aBrowser, aWebProgress, aRequest, aLocationURI, aFlags) { var spec = aLocationURI.spec; ok(true, spec); @@ -76,7 +76,7 @@ gTests.push({ URIs: ["about:buildconfig"], _itemId: -1, - setup: function() { + setup() { var bs = PlacesUtils.bookmarks; // Add a new unsorted bookmark. this._itemId = bs.insertBookmark(bs.unfiledBookmarksFolder, @@ -92,11 +92,11 @@ gTests.push({ is(bookmarkNode.uri, this.URIs[0], "Found bookmark in the right pane"); }, - finish: function() { + finish() { setTimeout(runNextTest, 0); }, - cleanup: function() { + cleanup() { PlacesUtils.bookmarks.removeItem(this._itemId); } }); @@ -109,7 +109,7 @@ gTests.push({ URIs: ["about:buildconfig", "about:"], _folderId: -1, - setup: function() { + setup() { var bs = PlacesUtils.bookmarks; // Create a new folder. var folderId = bs.createFolder(bs.unfiledBookmarksFolder, @@ -134,11 +134,11 @@ gTests.push({ is(folderNode.title, "Folder", "Found folder in the right pane"); }, - finish: function() { + finish() { setTimeout(runNextTest, 0); }, - cleanup: function() { + cleanup() { PlacesUtils.bookmarks.removeItem(this._folderId); } }); @@ -152,7 +152,7 @@ gTests.push({ _folderId: -1, _queryId: -1, - setup: function() { + setup() { var bs = PlacesUtils.bookmarks; // Create a new folder. var folderId = bs.createFolder(bs.unfiledBookmarksFolder, @@ -191,11 +191,11 @@ gTests.push({ is(folderNode.title, "Query", "Found query in the right pane"); }, - finish: function() { + finish() { setTimeout(runNextTest, 0); }, - cleanup: function() { + cleanup() { PlacesUtils.bookmarks.removeItem(this._folderId); PlacesUtils.bookmarks.removeItem(this._queryId); } diff --git a/browser/components/places/tests/browser/browser_library_views_liveupdate.js b/browser/components/places/tests/browser/browser_library_views_liveupdate.js index a70e4ef45806..d84c587bb83d 100644 --- a/browser/components/places/tests/browser/browser_library_views_liveupdate.js +++ b/browser/components/places/tests/browser/browser_library_views_liveupdate.js @@ -154,10 +154,10 @@ var bookmarksObserver = { ]), // nsIAnnotationObserver - onItemAnnotationSet: function() {}, - onItemAnnotationRemoved: function() {}, - onPageAnnotationSet: function() {}, - onPageAnnotationRemoved: function() {}, + onItemAnnotationSet() {}, + onItemAnnotationRemoved() {}, + onPageAnnotationSet() {}, + onPageAnnotationRemoved() {}, // nsINavBookmarkObserver onItemAdded: function PSB_onItemAdded(aItemId, aFolderId, aIndex, aItemType, @@ -191,7 +191,7 @@ var bookmarksObserver = { is(node, null, "Places node not found in left pane"); }, - onItemMoved: function(aItemId, + onItemMoved(aItemId, aOldFolderId, aOldIndex, aNewFolderId, aNewIndex, aItemType) { var node = null; @@ -219,7 +219,7 @@ var bookmarksObserver = { onBeginUpdateBatch: function PSB_onBeginUpdateBatch() {}, onEndUpdateBatch: function PSB_onEndUpdateBatch() {}, - onItemVisited: function() {}, + onItemVisited() {}, onItemChanged: function PSB_onItemChanged(aItemId, aProperty, aIsAnnotationProperty, aNewValue) { if (aProperty == "title") { diff --git a/browser/components/places/tests/browser/browser_sidebarpanels_click.js b/browser/components/places/tests/browser/browser_sidebarpanels_click.js index b1db4e78a02f..48c7fd4e5ef9 100644 --- a/browser/components/places/tests/browser/browser_sidebarpanels_click.js +++ b/browser/components/places/tests/browser/browser_sidebarpanels_click.js @@ -27,7 +27,7 @@ function test() { tests.push({ _itemID: null, - init: function(aCallback) { + init(aCallback) { // Add a bookmark to the Unfiled Bookmarks folder. this._itemID = PlacesUtils.bookmarks.insertBookmark( PlacesUtils.unfiledBookmarksFolderId, PlacesUtils._uri(TEST_URL), @@ -35,12 +35,12 @@ function test() { ); aCallback(); }, - prepare: function() { + prepare() { }, - selectNode: function(tree) { + selectNode(tree) { tree.selectItems([this._itemID]); }, - cleanup: function(aCallback) { + cleanup(aCallback) { PlacesUtils.bookmarks.removeFolderChildren(PlacesUtils.unfiledBookmarksFolderId); executeSoon(aCallback); }, @@ -50,23 +50,23 @@ function test() { }); tests.push({ - init: function(aCallback) { + init(aCallback) { // Add a history entry. let uri = PlacesUtils._uri(TEST_URL); PlacesTestUtils.addVisits({ - uri: uri, visitDate: Date.now() * 1000, + uri, visitDate: Date.now() * 1000, transition: PlacesUtils.history.TRANSITION_TYPED }).then(aCallback); }, - prepare: function() { + prepare() { sidebar.contentDocument.getElementById("byvisited").doCommand(); }, - selectNode: function(tree) { + selectNode(tree) { tree.selectNode(tree.view.nodeForTreeIndex(0)); is(tree.selectedNode.uri, TEST_URL, "The correct visit has been selected"); is(tree.selectedNode.itemId, -1, "The selected node is not bookmarked"); }, - cleanup: function(aCallback) { + cleanup(aCallback) { PlacesTestUtils.clearHistory().then(aCallback); }, sidebarName: HISTORY_SIDEBAR_ID, diff --git a/browser/components/places/tests/browser/browser_views_liveupdate.js b/browser/components/places/tests/browser/browser_views_liveupdate.js index add7984a82d8..a3d8d2ecaba2 100644 --- a/browser/components/places/tests/browser/browser_views_liveupdate.js +++ b/browser/components/places/tests/browser/browser_views_liveupdate.js @@ -192,10 +192,10 @@ var bookmarksObserver = { ]), // nsIAnnotationObserver - onItemAnnotationSet: function() {}, - onItemAnnotationRemoved: function() {}, - onPageAnnotationSet: function() {}, - onPageAnnotationRemoved: function() {}, + onItemAnnotationSet() {}, + onItemAnnotationRemoved() {}, + onPageAnnotationSet() {}, + onPageAnnotationRemoved() {}, // nsINavBookmarkObserver onItemAdded: function PSB_onItemAdded(aItemId, aFolderId, aIndex, @@ -223,7 +223,7 @@ var bookmarksObserver = { } }, - onItemMoved: function(aItemId, + onItemMoved(aItemId, aOldFolderId, aOldIndex, aNewFolderId, aNewIndex, aItemType) { @@ -242,7 +242,7 @@ var bookmarksObserver = { onBeginUpdateBatch: function PSB_onBeginUpdateBatch() {}, onEndUpdateBatch: function PSB_onEndUpdateBatch() {}, - onItemVisited: function() {}, + onItemVisited() {}, onItemChanged: function PSB_onItemChanged(aItemId, aProperty, aIsAnnotationProperty, aNewValue, diff --git a/browser/components/places/tests/browser/head.js b/browser/components/places/tests/browser/head.js index c6190db4c17c..1bfd71cb59c9 100644 --- a/browser/components/places/tests/browser/head.js +++ b/browser/components/places/tests/browser/head.js @@ -116,9 +116,9 @@ function waitForAsyncUpdates(aCallback, aScope, aArguments) let commit = db.createAsyncStatement("COMMIT"); commit.executeAsync({ - handleResult: function() {}, - handleError: function() {}, - handleCompletion: function(aReason) + handleResult() {}, + handleError() {}, + handleCompletion(aReason) { aCallback.apply(scope, args); } diff --git a/browser/components/places/tests/unit/test_421483.js b/browser/components/places/tests/unit/test_421483.js index a0d1383728e2..ac086a2e3362 100644 --- a/browser/components/places/tests/unit/test_421483.js +++ b/browser/components/places/tests/unit/test_421483.js @@ -79,7 +79,7 @@ add_task(function* move_smart_bookmark_rename_and_restore() { // change title and move into new subfolder yield PlacesUtils.bookmarks.update({ - guid: guid, + guid, parentGuid: subfolder.guid, index: PlacesUtils.bookmarks.DEFAULT_INDEX, title: "new title" diff --git a/browser/components/places/tests/unit/test_PUIU_makeTransaction.js b/browser/components/places/tests/unit/test_PUIU_makeTransaction.js index da8191b0fc23..dcc3645b9119 100644 --- a/browser/components/places/tests/unit/test_PUIU_makeTransaction.js +++ b/browser/components/places/tests/unit/test_PUIU_makeTransaction.js @@ -4,7 +4,7 @@ function waitForBookmarkNotification(aNotification, aCallback, aProperty) { PlacesUtils.bookmarks.addObserver({ - validate: function(aMethodName, aData) + validate(aMethodName, aData) { if (aMethodName == aNotification && (!aProperty || aProperty == aData.property)) { diff --git a/browser/components/places/tests/unit/test_clearHistory_shutdown.js b/browser/components/places/tests/unit/test_clearHistory_shutdown.js index 4bf88b04aa8a..c020bdbd99fb 100644 --- a/browser/components/places/tests/unit/test_clearHistory_shutdown.js +++ b/browser/components/places/tests/unit/test_clearHistory_shutdown.js @@ -133,11 +133,11 @@ function storeCache(aURL, aContent) { return new Promise(resolve => { let storeCacheListener = { - onCacheEntryCheck: function(entry, appcache) { + onCacheEntryCheck(entry, appcache) { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; }, - onCacheEntryAvailable: function(entry, isnew, appcache, status) { + onCacheEntryAvailable(entry, isnew, appcache, status) { do_check_eq(status, Cr.NS_OK); entry.setMetaDataElement("servertype", "0"); @@ -168,7 +168,7 @@ function checkCache(aURL) { return new Promise(resolve => { let checkCacheListener = { - onCacheEntryAvailable: function(entry, isnew, appcache, status) { + onCacheEntryAvailable(entry, isnew, appcache, status) { do_check_eq(status, Cr.NS_ERROR_CACHE_KEY_NOT_FOUND); resolve(); } diff --git a/browser/components/preferences/SiteDataManager.jsm b/browser/components/preferences/SiteDataManager.jsm index 8d2be6cb1ed9..6107f2361096 100644 --- a/browser/components/preferences/SiteDataManager.jsm +++ b/browser/components/preferences/SiteDataManager.jsm @@ -54,8 +54,8 @@ this.SiteDataManager = { if (status === Ci.nsIPermissionManager.ALLOW_ACTION || status === Ci.nsIPermissionManager.DENY_ACTION) { this._sites.set(perm.principal.origin, { - perm: perm, - status: status, + perm, + status, quotaUsage: 0, appCacheList: [], diskCacheList: [] @@ -79,7 +79,7 @@ this.SiteDataManager = { for (let site of this._sites.values()) { promises.push(new Promise(resolve => { let callback = { - onUsageResult: function(request) { + onUsageResult(request) { site.quotaUsage = request.usage; resolve(); } @@ -121,7 +121,7 @@ this.SiteDataManager = { if (this._sites.size) { let sites = this._sites; let visitor = { - onCacheEntryInfo: function(uri, idEnhance, dataSize) { + onCacheEntryInfo(uri, idEnhance, dataSize) { for (let site of sites.values()) { if (site.perm.matchesURI(uri, true)) { site.diskCacheList.push({ @@ -132,7 +132,7 @@ this.SiteDataManager = { } } }, - onCacheEntryVisitCompleted: function() { + onCacheEntryVisitCompleted() { resolve(); } }; diff --git a/browser/components/preferences/blocklists.js b/browser/components/preferences/blocklists.js index 208a329d5f82..70ea7f1c43ba 100644 --- a/browser/components/preferences/blocklists.js +++ b/browser/components/preferences/blocklists.js @@ -22,7 +22,7 @@ var gBlocklistManager = { get rowCount() { return this._rowCount; }, - getCellText: function(row, column) { + getCellText(row, column) { if (column.id == "listCol") { let list = gBlocklistManager._blockLists[row]; let desc = list.description ? list.description : ""; @@ -33,21 +33,21 @@ var gBlocklistManager = { return ""; }, - isSeparator: function(index) { return false; }, - isSorted: function() { return false; }, - isContainer: function(index) { return false; }, - setTree: function(tree) {}, - getImageSrc: function(row, column) {}, - getProgressMode: function(row, column) {}, - getCellValue: function(row, column) { + isSeparator(index) { return false; }, + isSorted() { return false; }, + isContainer(index) { return false; }, + setTree(tree) {}, + getImageSrc(row, column) {}, + getProgressMode(row, column) {}, + getCellValue(row, column) { if (column.id == "selectionCol") return gBlocklistManager._blockLists[row].selected; return undefined; }, - cycleHeader: function(column) {}, - getRowProperties: function(row) { return ""; }, - getColumnProperties: function(column) { return ""; }, - getCellProperties: function(row, column) { + cycleHeader(column) {}, + getRowProperties(row) { return ""; }, + getColumnProperties(column) { return ""; }, + getCellProperties(row, column) { if (column.id == "selectionCol") { return "checkmark"; } @@ -56,7 +56,7 @@ var gBlocklistManager = { } }, - onWindowKeyPress: function(event) { + onWindowKeyPress(event) { if (event.keyCode == KeyEvent.DOM_VK_ESCAPE) { window.close(); } else if (event.keyCode == KeyEvent.DOM_VK_RETURN) { @@ -64,13 +64,13 @@ var gBlocklistManager = { } }, - onLoad: function() { + onLoad() { this._bundle = document.getElementById("bundlePreferences"); let params = window.arguments[0]; this.init(params); }, - init: function(params) { + init(params) { if (this._type) { // reusing an open dialog, clear the old observer this.uninit(); @@ -97,9 +97,9 @@ var gBlocklistManager = { this._loadBlockLists(); }, - uninit: function() {}, + uninit() {}, - onListSelected: function() { + onListSelected() { for (let list of this._blockLists) { list.selected = false; } @@ -108,7 +108,7 @@ var gBlocklistManager = { this._updateTree(); }, - onApplyChanges: function() { + onApplyChanges() { let activeList = this._getActiveList(); let selected = null; for (let list of this._blockLists) { @@ -153,7 +153,7 @@ var gBlocklistManager = { window.close(); }, - _loadBlockLists: function() { + _loadBlockLists() { this._blockLists = []; // Load blocklists into a table. @@ -171,7 +171,7 @@ var gBlocklistManager = { this._updateTree(); }, - _createOrUpdateBlockList: function(itemName) { + _createOrUpdateBlockList(itemName) { let branch = Services.prefs.getBranch(LISTS_PREF_BRANCH); let key = branch.getCharPref(itemName); let value = this._bundle.getString(key); @@ -192,13 +192,13 @@ var gBlocklistManager = { return list; }, - _updateTree: function() { + _updateTree() { this._tree = document.getElementById("blocklistsTree"); this._view._rowCount = this._blockLists.length; this._tree.view = this._view; }, - _getActiveList: function() { + _getActiveList() { let trackingTable = Services.prefs.getCharPref(TRACKING_TABLE_PREF); return trackingTable.includes(CONTENT_LIST_ID) ? CONTENT_LIST_ID : BASE_LIST_ID; } diff --git a/browser/components/preferences/connection.js b/browser/components/preferences/connection.js index 9997a1a7490c..128c9caa8549 100644 --- a/browser/components/preferences/connection.js +++ b/browser/components/preferences/connection.js @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var gConnectionsDialog = { - beforeAccept: function() + beforeAccept() { var proxyTypePref = document.getElementById("network.proxy.type"); if (proxyTypePref.value == 2) { @@ -52,13 +52,13 @@ var gConnectionsDialog = { return true; }, - checkForSystemProxy: function() + checkForSystemProxy() { if ("@mozilla.org/system-proxy-settings;1" in Components.classes) document.getElementById("systemPref").removeAttribute("hidden"); }, - proxyTypeChanged: function() + proxyTypeChanged() { var proxyTypePref = document.getElementById("network.proxy.type"); @@ -84,7 +84,7 @@ var gConnectionsDialog = { this.updateReloadButton(); }, - updateDNSPref: function() + updateDNSPref() { var socksVersionPref = document.getElementById("network.proxy.socks_version"); var socksDNSPref = document.getElementById("network.proxy.socks_remote_dns"); @@ -94,7 +94,7 @@ var gConnectionsDialog = { return undefined; }, - updateReloadButton: function() + updateReloadButton() { // Disable the "Reload PAC" button if the selected proxy type is not PAC or // if the current value of the PAC textbox does not match the value stored @@ -116,13 +116,13 @@ var gConnectionsDialog = { (proxyTypeCur != 2 || proxyType != 2 || typedURL != pacURL); }, - readProxyType: function() + readProxyType() { this.proxyTypeChanged(); return undefined; }, - updateProtocolPrefs: function() + updateProtocolPrefs() { var proxyTypePref = document.getElementById("network.proxy.type"); var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings"); @@ -156,7 +156,7 @@ var gConnectionsDialog = { return undefined; }, - readProxyProtocolPref: function(aProtocol, aIsPort) + readProxyProtocolPref(aProtocol, aIsPort) { var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings"); if (shareProxiesPref.value) { @@ -168,13 +168,13 @@ var gConnectionsDialog = { return backupPref.hasUserValue ? backupPref.value : undefined; }, - reloadPAC: function() + reloadPAC() { Components.classes["@mozilla.org/network/protocol-proxy-service;1"]. getService().reloadPAC(); }, - doAutoconfigURLFixup: function() + doAutoconfigURLFixup() { var autoURL = document.getElementById("networkProxyAutoconfigURL"); var autoURLPref = document.getElementById("network.proxy.autoconfig_url"); @@ -185,7 +185,7 @@ var gConnectionsDialog = { } catch (ex) {} }, - sanitizeNoProxiesPref: function() + sanitizeNoProxiesPref() { var noProxiesPref = document.getElementById("network.proxy.no_proxies_on"); // replace substrings of ; and \n with commas if they're neither immediately @@ -195,7 +195,7 @@ var gConnectionsDialog = { noProxiesPref.value = noProxiesPref.value.replace(/[;\n]/g, ''); }, - readHTTPProxyServer: function() + readHTTPProxyServer() { var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings"); if (shareProxiesPref.value) @@ -203,7 +203,7 @@ var gConnectionsDialog = { return undefined; }, - readHTTPProxyPort: function() + readHTTPProxyPort() { var shareProxiesPref = document.getElementById("network.proxy.share_proxy_settings"); if (shareProxiesPref.value) diff --git a/browser/components/preferences/containers.js b/browser/components/preferences/containers.js index 6ca5853f7f82..d60ad4893c8a 100644 --- a/browser/components/preferences/containers.js +++ b/browser/components/preferences/containers.js @@ -89,7 +89,7 @@ let gContainersManager = { createIconButtons(defaultIcon) { let radiogroup = document.createElement("radiogroup"); radiogroup.setAttribute("id", "icon"); - radiogroup.className = "icon-buttons"; + radiogroup.className = "icon-buttons radio-buttons"; for (let icon of this.icons) { let iconSwatch = document.createElement("radio"); @@ -118,6 +118,7 @@ let gContainersManager = { createColorSwatches(defaultColor) { let radiogroup = document.createElement("radiogroup"); radiogroup.setAttribute("id", "color"); + radiogroup.className = "radio-buttons"; for (let color of this.colors) { let colorSwatch = document.createElement("radio"); diff --git a/browser/components/preferences/containers.xul b/browser/components/preferences/containers.xul index 62a775fe409d..1b2672e4c4bf 100644 --- a/browser/components/preferences/containers.xul +++ b/browser/components/preferences/containers.xul @@ -30,17 +30,15 @@ diff --git a/browser/components/preferences/cookies.js b/browser/components/preferences/cookies.js index 82abbebb00ef..55b8e6cbb26b 100644 --- a/browser/components/preferences/cookies.js +++ b/browser/components/preferences/cookies.js @@ -21,7 +21,7 @@ var gCookiesWindow = { _tree : null, _bundle : null, - init: function() { + init() { var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); os.addObserver(this, "cookie-changed", false); @@ -39,14 +39,14 @@ var gCookiesWindow = { } }, - uninit: function() { + uninit() { var os = Components.classes["@mozilla.org/observer-service;1"] .getService(Components.interfaces.nsIObserverService); os.removeObserver(this, "cookie-changed"); os.removeObserver(this, "perm-changed"); }, - _populateList: function(aInitialLoad) { + _populateList(aInitialLoad) { this._loadCookies(); this._tree.view = this._view; if (aInitialLoad) @@ -69,7 +69,7 @@ var gCookiesWindow = { this._saveState(); }, - _cookieEquals: function(aCookieA, aCookieB, aStrippedHost) { + _cookieEquals(aCookieA, aCookieB, aStrippedHost) { return aCookieA.rawHost == aStrippedHost && aCookieA.name == aCookieB.name && aCookieA.path == aCookieB.path && @@ -77,7 +77,7 @@ var gCookiesWindow = { aCookieB.originAttributes); }, - _isPrivateCookie: function(aCookie) { + _isPrivateCookie(aCookie) { let { userContextId } = aCookie.originAttributes; if (!userContextId) { // Default identity is public. @@ -86,7 +86,7 @@ var gCookiesWindow = { return !ContextualIdentityService.getIdentityFromId(userContextId).public; }, - observe: function(aCookie, aTopic, aData) { + observe(aCookie, aTopic, aData) { if (aTopic != "cookie-changed") return; @@ -123,7 +123,7 @@ var gCookiesWindow = { // and is rather complicated as selection tracking is difficult }, - _handleCookieChanged: function(changedCookie, strippedHost) { + _handleCookieChanged(changedCookie, strippedHost) { var rowIndex = 0; var cookieItem = null; if (!this._view._filtered) { @@ -172,7 +172,7 @@ var gCookiesWindow = { this._updateCookieData(cookieItem); }, - _handleCookieAdded: function(changedCookie, strippedHost) { + _handleCookieAdded(changedCookie, strippedHost) { var rowCountImpact = 0; var addedHost = { value: 0 }; this._addCookie(strippedHost, changedCookie, addedHost); @@ -212,7 +212,7 @@ var gCookiesWindow = { return this._rowCount; }, - _getItemAtIndex: function(aIndex) { + _getItemAtIndex(aIndex) { if (this._filtered) return this._filterSet[aIndex]; @@ -267,7 +267,7 @@ var gCookiesWindow = { return null; }, - _removeItemAtIndex: function(aIndex, aCount) { + _removeItemAtIndex(aIndex, aCount) { let removeCount = aCount === undefined ? 1 : aCount; if (this._filtered) { // remove the cookies from the unfiltered set so that they @@ -306,11 +306,11 @@ var gCookiesWindow = { } }, - _invalidateCache: function(aIndex) { + _invalidateCache(aIndex) { this._cacheValid = Math.min(this._cacheValid, aIndex); }, - getCellText: function(aIndex, aColumn) { + getCellText(aIndex, aColumn) { if (!this._filtered) { var item = this._getItemAtIndex(aIndex); if (!item) @@ -331,10 +331,10 @@ var gCookiesWindow = { _selection: null, get selection() { return this._selection; }, set selection(val) { this._selection = val; return val; }, - getRowProperties: function(aIndex) { return ""; }, - getCellProperties: function(aIndex, aColumn) { return ""; }, - getColumnProperties: function(aColumn) { return ""; }, - isContainer: function(aIndex) { + getRowProperties(aIndex) { return ""; }, + getCellProperties(aIndex, aColumn) { return ""; }, + getColumnProperties(aColumn) { return ""; }, + isContainer(aIndex) { if (!this._filtered) { var item = this._getItemAtIndex(aIndex); if (!item) return false; @@ -342,7 +342,7 @@ var gCookiesWindow = { } return false; }, - isContainerOpen: function(aIndex) { + isContainerOpen(aIndex) { if (!this._filtered) { var item = this._getItemAtIndex(aIndex); if (!item) return false; @@ -350,7 +350,7 @@ var gCookiesWindow = { } return false; }, - isContainerEmpty: function(aIndex) { + isContainerEmpty(aIndex) { if (!this._filtered) { var item = this._getItemAtIndex(aIndex); if (!item) return false; @@ -358,11 +358,11 @@ var gCookiesWindow = { } return false; }, - isSeparator: function(aIndex) { return false; }, - isSorted: function(aIndex) { return false; }, - canDrop: function(aIndex, aOrientation) { return false; }, - drop: function(aIndex, aOrientation) {}, - getParentIndex: function(aIndex) { + isSeparator(aIndex) { return false; }, + isSorted(aIndex) { return false; }, + canDrop(aIndex, aOrientation) { return false; }, + drop(aIndex, aOrientation) {}, + getParentIndex(aIndex) { if (!this._filtered) { var item = this._getItemAtIndex(aIndex); // If an item has no parent index (i.e. it is at the top level) this @@ -374,7 +374,7 @@ var gCookiesWindow = { } return -1; }, - hasNextSibling: function(aParentIndex, aIndex) { + hasNextSibling(aParentIndex, aIndex) { if (!this._filtered) { // |aParentIndex| appears to be bogus, but we can get the real // parent index by getting the entry for |aIndex| and reading the @@ -399,7 +399,7 @@ var gCookiesWindow = { } return aIndex < this.rowCount - 1; }, - hasPreviousSibling: function(aIndex) { + hasPreviousSibling(aIndex) { if (!this._filtered) { var item = this._getItemAtIndex(aIndex); if (!item) return false; @@ -409,7 +409,7 @@ var gCookiesWindow = { } return aIndex > 0; }, - getLevel: function(aIndex) { + getLevel(aIndex) { if (!this._filtered) { var item = this._getItemAtIndex(aIndex); if (!item) return 0; @@ -417,11 +417,11 @@ var gCookiesWindow = { } return 0; }, - getImageSrc: function(aIndex, aColumn) {}, - getProgressMode: function(aIndex, aColumn) {}, - getCellValue: function(aIndex, aColumn) {}, - setTree: function(aTree) {}, - toggleOpenState: function(aIndex) { + getImageSrc(aIndex, aColumn) {}, + getProgressMode(aIndex, aColumn) {}, + getCellValue(aIndex, aColumn) {}, + setTree(aTree) {}, + toggleOpenState(aIndex) { if (!this._filtered) { var item = this._getItemAtIndex(aIndex); if (!item) return; @@ -434,28 +434,28 @@ var gCookiesWindow = { gCookiesWindow._tree.treeBoxObject.invalidateRow(aIndex); } }, - cycleHeader: function(aColumn) {}, - selectionChanged: function() {}, - cycleCell: function(aIndex, aColumn) {}, - isEditable: function(aIndex, aColumn) { + cycleHeader(aColumn) {}, + selectionChanged() {}, + cycleCell(aIndex, aColumn) {}, + isEditable(aIndex, aColumn) { return false; }, - isSelectable: function(aIndex, aColumn) { + isSelectable(aIndex, aColumn) { return false; }, - setCellValue: function(aIndex, aColumn, aValue) {}, - setCellText: function(aIndex, aColumn, aValue) {}, - performAction: function(aAction) {}, - performActionOnRow: function(aAction, aIndex) {}, - performActionOnCell: function(aAction, aindex, aColumn) {} + setCellValue(aIndex, aColumn, aValue) {}, + setCellText(aIndex, aColumn, aValue) {}, + performAction(aAction) {}, + performActionOnRow(aAction, aIndex) {}, + performActionOnCell(aAction, aindex, aColumn) {} }, - _makeStrippedHost: function(aHost) { + _makeStrippedHost(aHost) { var formattedHost = aHost.charAt(0) == "." ? aHost.substring(1, aHost.length) : aHost; return formattedHost.substring(0, 4) == "www." ? formattedHost.substring(4, formattedHost.length) : formattedHost; }, - _addCookie: function(aStrippedHost, aCookie, aHostCount) { + _addCookie(aStrippedHost, aCookie, aHostCount) { if (!(aStrippedHost in this._hosts) || !this._hosts[aStrippedHost]) { this._hosts[aStrippedHost] = { cookies : [], rawHost : aStrippedHost, @@ -470,7 +470,7 @@ var gCookiesWindow = { this._hosts[aStrippedHost].cookies.push(c); }, - _makeCookieObject: function(aStrippedHost, aCookie) { + _makeCookieObject(aStrippedHost, aCookie) { var c = { name : aCookie.name, value : aCookie.value, isDomain : aCookie.isDomain, @@ -485,7 +485,7 @@ var gCookiesWindow = { return c; }, - _loadCookies: function() { + _loadCookies() { var e = this._cm.enumerator; var hostCount = { value: 0 }; this._hosts = {}; @@ -506,7 +506,7 @@ var gCookiesWindow = { this._view._rowCount = hostCount.value; }, - formatExpiresString: function(aExpires) { + formatExpiresString(aExpires) { if (aExpires) { var date = new Date(1000 * aExpires); const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"] @@ -519,7 +519,7 @@ var gCookiesWindow = { return this._bundle.getString("expireAtEndOfSession"); }, - _getUserContextString: function(aUserContextId) { + _getUserContextString(aUserContextId) { if (parseInt(aUserContextId) == 0) { return this._bundle.getString("defaultUserContextLabel"); } @@ -527,7 +527,7 @@ var gCookiesWindow = { return ContextualIdentityService.getUserContextLabel(aUserContextId); }, - _updateCookieData: function(aItem) { + _updateCookieData(aItem) { var seln = this._view.selection; var ids = ["name", "value", "host", "path", "isSecure", "expires", "userContext"]; var properties; @@ -557,7 +557,7 @@ var gCookiesWindow = { document.getElementById(property).value = properties[property]; }, - onCookieSelected: function() { + onCookieSelected() { var item; var seln = this._tree.view.selection; if (!this._view._filtered) @@ -602,7 +602,7 @@ var gCookiesWindow = { } }, - deleteCookie: function() { + deleteCookie() { // Selection Notes // - Selection always moves to *NEXT* adjacent item unless item // is last child at a given level in which case it moves to *PREVIOUS* @@ -728,7 +728,7 @@ var gCookiesWindow = { } }, - deleteAllCookies: function() { + deleteAllCookies() { if (this._view._filtered) { var rowCount = this._view.rowCount; var deleteItems = []; @@ -747,7 +747,7 @@ var gCookiesWindow = { this.focusFilterBox(); }, - onCookieKeyPress: function(aEvent) { + onCookieKeyPress(aEvent) { if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) { this.deleteCookie(); } else if (AppConstants.platform == "macosx" && @@ -758,7 +758,7 @@ var gCookiesWindow = { _lastSortProperty : "", _lastSortAscending: false, - sort: function(aProperty) { + sort(aProperty) { var ascending = (aProperty == this._lastSortProperty) ? !this._lastSortAscending : true; // Sort the Non-Filtered Host Collections if (aProperty == "rawHost") { @@ -809,7 +809,7 @@ var gCookiesWindow = { this._lastSortProperty = aProperty; }, - clearFilter: function() { + clearFilter() { // Revert to single-select in the tree this._tree.setAttribute("seltype", "single"); @@ -851,13 +851,13 @@ var gCookiesWindow = { this._updateRemoveAllButton(); }, - _cookieMatchesFilter: function(aCookie) { + _cookieMatchesFilter(aCookie) { return aCookie.rawHost.indexOf(this._view._filterValue) != -1 || aCookie.name.indexOf(this._view._filterValue) != -1 || aCookie.value.indexOf(this._view._filterValue) != -1; }, - _filterCookies: function(aFilterValue) { + _filterCookies(aFilterValue) { this._view._filterValue = aFilterValue; var cookies = []; for (let i = 0; i < gCookiesWindow._hostOrder.length; ++i) { // var host in gCookiesWindow._hosts) { @@ -873,7 +873,7 @@ var gCookiesWindow = { _lastSelectedRanges: [], _openIndices: [], - _saveState: function() { + _saveState() { // Save selection var seln = this._view.selection; this._lastSelectedRanges = []; @@ -897,7 +897,7 @@ var gCookiesWindow = { document.getElementById("removeAllCookies").disabled = this._view._rowCount == 0; }, - filter: function() { + filter() { var filter = document.getElementById("filter").value; if (filter == "") { gCookiesWindow.clearFilter(); @@ -930,18 +930,18 @@ var gCookiesWindow = { this._updateRemoveAllButton(); }, - setFilter: function(aFilterString) { + setFilter(aFilterString) { document.getElementById("filter").value = aFilterString; this.filter(); }, - focusFilterBox: function() { + focusFilterBox() { var filter = document.getElementById("filter"); filter.focus(); filter.select(); }, - onWindowKeyPress: function(aEvent) { + onWindowKeyPress(aEvent) { if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE) window.close(); } diff --git a/browser/components/preferences/fonts.js b/browser/components/preferences/fonts.js index e6b2a0acd73d..ac66044a2b80 100644 --- a/browser/components/preferences/fonts.js +++ b/browser/components/preferences/fonts.js @@ -19,7 +19,7 @@ const kFontSizeFmtFixed = "font.size.fixed.%LANG%"; const kFontMinSizeFmt = "font.minimum-size.%LANG%"; var gFontsDialog = { - _selectLanguageGroup: function(aLanguageGroup) + _selectLanguageGroup(aLanguageGroup) { var prefs = [{ format: kDefaultFontType, type: "string", element: "defaultFontType", fonttype: null}, { format: kFontNameFmtSerif, type: "fontname", element: "serif", fonttype: "serif" }, @@ -58,26 +58,26 @@ var gFontsDialog = { } }, - readFontLanguageGroup: function() + readFontLanguageGroup() { var languagePref = document.getElementById("font.language.group"); this._selectLanguageGroup(languagePref.value); return undefined; }, - readUseDocumentFonts: function() + readUseDocumentFonts() { var preference = document.getElementById("browser.display.use_document_fonts"); return preference.value == 1; }, - writeUseDocumentFonts: function() + writeUseDocumentFonts() { var useDocumentFonts = document.getElementById("useDocumentFonts"); return useDocumentFonts.checked ? 1 : 0; }, - onBeforeAccept: function() + onBeforeAccept() { let preferences = document.querySelectorAll("preference[id*='font.minimum-size']"); // It would be good if we could avoid touching languages the pref pages won't use, but diff --git a/browser/components/preferences/handlers.xml b/browser/components/preferences/handlers.xml index 0c629d7599b7..902e023caf8e 100644 --- a/browser/components/preferences/handlers.xml +++ b/browser/components/preferences/handlers.xml @@ -8,8 +8,10 @@ + %brandDTD; %applicationsDTD; + %containersDTD; ]> - Preferences + onclick="gContainersPane.onPreferenceClick(event.originalTarget)"> - Remove diff --git a/browser/components/preferences/in-content/advanced.js b/browser/components/preferences/in-content/advanced.js index 992b805ce103..68cef05b8d60 100644 --- a/browser/components/preferences/in-content/advanced.js +++ b/browser/components/preferences/in-content/advanced.js @@ -18,7 +18,7 @@ var gAdvancedPane = { /** * Brings the appropriate tab to the front and initializes various bits of UI. */ - init: function() + init() { function setEventListener(aId, aEventType, aCallback) { @@ -120,7 +120,7 @@ var gAdvancedPane = { * Stores the identity of the current tab in preferences so that the selected * tab can be persisted between openings of the preferences window. */ - tabSelectionChanged: function() + tabSelectionChanged() { if (!this._inited) return; @@ -182,7 +182,7 @@ var gAdvancedPane = { * the current value to enable proper pref restoration if the checkbox is * never changed. */ - readCheckSpelling: function() + readCheckSpelling() { var pref = document.getElementById("layout.spellcheckDefault"); this._storedSpellCheck = pref.value; @@ -195,7 +195,7 @@ var gAdvancedPane = { * preserving the preference's "hidden" value if the preference is * unchanged and represents a value not strictly allowed in UI. */ - writeCheckSpelling: function() + writeCheckSpelling() { var checkbox = document.getElementById("checkSpelling"); if (checkbox.checked) { @@ -211,7 +211,7 @@ var gAdvancedPane = { * security.OCSP.enabled is an integer value for legacy reasons. * A value of 1 means OCSP is enabled. Any other value means it is disabled. */ - readEnableOCSP: function() + readEnableOCSP() { var preference = document.getElementById("security.OCSP.enabled"); // This is the case if the preference is the default value. @@ -224,7 +224,7 @@ var gAdvancedPane = { /** * See documentation for readEnableOCSP. */ - writeEnableOCSP: function() + writeEnableOCSP() { var checkbox = document.getElementById("enableOCSP"); return checkbox.checked ? 1 : 0; @@ -234,7 +234,7 @@ var gAdvancedPane = { * When the user toggles the layers.acceleration.disabled pref, * sync its new value to the gfx.direct2d.disabled pref too. */ - updateHardwareAcceleration: function() + updateHardwareAcceleration() { if (AppConstants.platform = "win") { var fromPref = document.getElementById("layers.acceleration.disabled"); @@ -248,7 +248,7 @@ var gAdvancedPane = { /** * Set up or hide the Learn More links for various data collection options */ - _setupLearnMoreLink: function(pref, element) { + _setupLearnMoreLink(pref, element) { // set up the Learn More link with the correct URL let url = Services.prefs.getCharPref(pref); let el = document.getElementById(element); @@ -263,7 +263,7 @@ var gAdvancedPane = { /** * */ - initSubmitCrashes: function() + initSubmitCrashes() { this._setupLearnMoreLink("toolkit.crashreporter.infoURL", "crashReporterLearnMore"); @@ -274,7 +274,7 @@ var gAdvancedPane = { * * In all cases, set up the Learn More link sanely. */ - initTelemetry: function() + initTelemetry() { if (AppConstants.MOZ_TELEMETRY_REPORTING) { this._setupLearnMoreLink("toolkit.telemetry.infoURL", "telemetryLearnMore"); @@ -285,7 +285,7 @@ var gAdvancedPane = { * Set the status of the telemetry controls based on the input argument. * @param {Boolean} aEnabled False disables the controls, true enables them. */ - setTelemetrySectionEnabled: function(aEnabled) + setTelemetrySectionEnabled(aEnabled) { if (AppConstants.MOZ_TELEMETRY_REPORTING) { // If FHR is disabled, additional data sharing should be disabled as well. @@ -302,7 +302,7 @@ var gAdvancedPane = { /** * Initialize the health report service reference and checkbox. */ - initSubmitHealthReport: function() { + initSubmitHealthReport() { if (AppConstants.MOZ_TELEMETRY_REPORTING) { this._setupLearnMoreLink("datareporting.healthreport.infoURL", "FHRLearnMore"); @@ -321,7 +321,7 @@ var gAdvancedPane = { /** * Update the health report preference with state from checkbox. */ - updateSubmitHealthReport: function() { + updateSubmitHealthReport() { if (AppConstants.MOZ_TELEMETRY_REPORTING) { let checkbox = document.getElementById("submitHealthReportBox"); Services.prefs.setBoolPref(PREF_UPLOAD_ENABLED, checkbox.checked); @@ -351,16 +351,16 @@ var gAdvancedPane = { /** * Displays a dialog in which proxy settings may be changed. */ - showConnections: function() + showConnections() { gSubDialog.open("chrome://browser/content/preferences/connection.xul"); }, - showSiteDataSettings: function() { + showSiteDataSettings() { gSubDialog.open("chrome://browser/content/preferences/siteDataSettings.xul"); }, - updateTotalSiteDataSize: function() { + updateTotalSiteDataSize() { SiteDataManager.getTotalUsage() .then(usage => { let size = DownloadUtils.convertByteUnits(usage); @@ -373,14 +373,14 @@ var gAdvancedPane = { }, // Retrieves the amount of space currently used by disk cache - updateActualCacheSize: function() + updateActualCacheSize() { var actualSizeLabel = document.getElementById("actualDiskCacheSize"); var prefStrBundle = document.getElementById("bundlePreferences"); // Needs to root the observer since cache service keeps only a weak reference. this.observer = { - onNetworkCacheDiskConsumption: function(consumption) { + onNetworkCacheDiskConsumption(consumption) { var size = DownloadUtils.convertByteUnits(consumption); // The XBL binding for the string bundle may have been destroyed if // the page was closed before this callback was executed. @@ -407,10 +407,10 @@ var gAdvancedPane = { }, // Retrieves the amount of space currently used by offline cache - updateActualAppCacheSize: function() + updateActualAppCacheSize() { var visitor = { - onCacheStorageInfo: function(aEntryCount, aConsumption, aCapacity, aDiskDirectory) + onCacheStorageInfo(aEntryCount, aConsumption, aCapacity, aDiskDirectory) { var actualSizeLabel = document.getElementById("actualAppCacheSize"); var sizeStrings = DownloadUtils.convertByteUnits(aConsumption); @@ -434,14 +434,14 @@ var gAdvancedPane = { } catch (e) {} }, - updateCacheSizeUI: function(smartSizeEnabled) + updateCacheSizeUI(smartSizeEnabled) { document.getElementById("useCacheBefore").disabled = smartSizeEnabled; document.getElementById("cacheSize").disabled = smartSizeEnabled; document.getElementById("useCacheAfter").disabled = smartSizeEnabled; }, - readSmartSizeEnabled: function() + readSmartSizeEnabled() { // The smart_size.enabled preference element is inverted="true", so its // value is the opposite of the actual pref value @@ -480,7 +480,7 @@ var gAdvancedPane = { /** * Clears the cache. */ - clearCache: function() + clearCache() { try { var cache = Components.classes["@mozilla.org/netwerk/cache-storage-service;1"] @@ -493,7 +493,7 @@ var gAdvancedPane = { /** * Clears the application cache. */ - clearOfflineAppCache: function() + clearOfflineAppCache() { Components.utils.import("resource:///modules/offlineAppCache.jsm"); OfflineAppCacheHelper.clear(); @@ -502,7 +502,7 @@ var gAdvancedPane = { this.updateOfflineApps(); }, - clearSiteData: function() { + clearSiteData() { let flags = Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0 + Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1 + @@ -519,7 +519,7 @@ var gAdvancedPane = { } }, - readOfflineNotify: function() + readOfflineNotify() { var pref = document.getElementById("browser.offline-apps.notify"); var button = document.getElementById("offlineNotifyExceptions"); @@ -527,7 +527,7 @@ var gAdvancedPane = { return pref.value; }, - showOfflineExceptions: function() + showOfflineExceptions() { var bundlePreferences = document.getElementById("bundlePreferences"); var params = { blockVisible : false, @@ -569,7 +569,7 @@ var gAdvancedPane = { /** * Updates the list of offline applications */ - updateOfflineApps: function() + updateOfflineApps() { var pm = Components.classes["@mozilla.org/permissionmanager;1"] .getService(Components.interfaces.nsIPermissionManager); @@ -610,7 +610,7 @@ var gAdvancedPane = { } }, - offlineAppSelected: function() + offlineAppSelected() { var removeButton = document.getElementById("offlineAppsListRemove"); var list = document.getElementById("offlineAppsList"); @@ -621,7 +621,7 @@ var gAdvancedPane = { } }, - removeOfflineApp: function() + removeOfflineApp() { var list = document.getElementById("offlineAppsList"); var item = list.selectedItem; @@ -702,7 +702,7 @@ var gAdvancedPane = { * ii t/f f false * ii t/f *t* *true* */ - updateReadPrefs: function() + updateReadPrefs() { if (AppConstants.MOZ_UPDATER) { var enabledPref = document.getElementById("app.update.enabled"); @@ -748,7 +748,7 @@ var gAdvancedPane = { /** * Sets the pref values based on the selected item of the radiogroup. */ - updateWritePrefs: function() + updateWritePrefs() { if (AppConstants.MOZ_UPDATER) { var enabledPref = document.getElementById("app.update.enabled"); @@ -773,7 +773,7 @@ var gAdvancedPane = { /** * Displays the history of installed updates. */ - showUpdates: function() + showUpdates() { gSubDialog.open("chrome://mozapps/content/update/history.xul"); }, @@ -795,7 +795,7 @@ var gAdvancedPane = { /** * Displays the user's certificates and associated options. */ - showCertificates: function() + showCertificates() { gSubDialog.open("chrome://pippki/content/certManager.xul"); }, @@ -803,12 +803,12 @@ var gAdvancedPane = { /** * Displays a dialog from which the user can manage his security devices. */ - showSecurityDevices: function() + showSecurityDevices() { gSubDialog.open("chrome://pippki/content/device_manager.xul"); }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (AppConstants.MOZ_UPDATER) { switch (aTopic) { case "nsPref:changed": diff --git a/browser/components/preferences/in-content/applications.js b/browser/components/preferences/in-content/applications.js index 30d87dacf96e..67879b025e44 100644 --- a/browser/components/preferences/in-content/applications.js +++ b/browser/components/preferences/in-content/applications.js @@ -119,11 +119,11 @@ function ArrayEnumerator(aItems) { ArrayEnumerator.prototype = { _index: 0, - hasMoreElements: function() { + hasMoreElements() { return this._index < this._contents.length; }, - getNext: function() { + getNext() { return this._contents[this._index++]; } }; @@ -172,7 +172,7 @@ HandlerInfoWrapper.prototype = { _categoryMgr: Cc["@mozilla.org/categorymanager;1"]. getService(Ci.nsICategoryManager), - element: function(aID) { + element(aID) { return document.getElementById(aID); }, @@ -214,7 +214,7 @@ HandlerInfoWrapper.prototype = { return this.wrappedHandlerInfo.possibleApplicationHandlers; }, - addPossibleApplicationHandler: function(aNewHandler) { + addPossibleApplicationHandler(aNewHandler) { var possibleApps = this.possibleApplicationHandlers.enumerate(); while (possibleApps.hasMoreElements()) { if (possibleApps.getNext().equals(aNewHandler)) @@ -223,7 +223,7 @@ HandlerInfoWrapper.prototype = { this.possibleApplicationHandlers.appendElement(aNewHandler, false); }, - removePossibleApplicationHandler: function(aHandler) { + removePossibleApplicationHandler(aHandler) { var defaultApp = this.preferredApplicationHandler; if (defaultApp && aHandler.equals(defaultApp)) { // If the app we remove was the default app, we must make sure @@ -362,7 +362,7 @@ HandlerInfoWrapper.prototype = { return this._getDisabledPluginTypes().indexOf(this.type) != -1; }, - _getDisabledPluginTypes: function() { + _getDisabledPluginTypes() { var types = ""; if (this._prefSvc.prefHasUserValue(PREF_DISABLED_PLUGIN_TYPES)) @@ -376,7 +376,7 @@ HandlerInfoWrapper.prototype = { return []; }, - disablePluginType: function() { + disablePluginType() { var disabledPluginTypes = this._getDisabledPluginTypes(); if (disabledPluginTypes.indexOf(this.type) == -1) @@ -391,7 +391,7 @@ HandlerInfoWrapper.prototype = { false); }, - enablePluginType: function() { + enablePluginType() { var disabledPluginTypes = this._getDisabledPluginTypes(); var type = this.type; @@ -412,7 +412,7 @@ HandlerInfoWrapper.prototype = { // Storage - store: function() { + store() { this._handlerSvc.store(this.wrappedHandlerInfo); }, @@ -423,7 +423,7 @@ HandlerInfoWrapper.prototype = { return this._getIcon(16); }, - _getIcon: function(aSize) { + _getIcon(aSize) { if (this.primaryExtension) return "moz-icon://goat." + this.primaryExtension + "?size=" + aSize; @@ -529,7 +529,7 @@ FeedHandlerInfo.prototype = { _inner: [], _removed: [], - QueryInterface: function(aIID) { + QueryInterface(aIID) { if (aIID.equals(Ci.nsIMutableArray) || aIID.equals(Ci.nsIArray) || aIID.equals(Ci.nsISupports)) @@ -542,20 +542,20 @@ FeedHandlerInfo.prototype = { return this._inner.length; }, - enumerate: function() { + enumerate() { return new ArrayEnumerator(this._inner); }, - appendElement: function(aHandlerApp, aWeak) { + appendElement(aHandlerApp, aWeak) { this._inner.push(aHandlerApp); }, - removeElementAt: function(aIndex) { + removeElementAt(aIndex) { this._removed.push(this._inner[aIndex]); this._inner.splice(aIndex, 1); }, - queryElementAt: function(aIndex, aInterface) { + queryElementAt(aIndex, aInterface) { return this._inner[aIndex].QueryInterface(aInterface); } }; @@ -725,7 +725,7 @@ FeedHandlerInfo.prototype = { // so we when the controller calls store() after modifying the handlers, // the only thing we need to store is the removal of possible handlers // XXX Should we hold off on making the changes until this method gets called? - store: function() { + store() { for (let app of this._possibleApplicationHandlers._removed) { if (app instanceof Ci.nsILocalHandlerApp) { let pref = this.element(PREF_FEED_SELECTED_APP); @@ -800,7 +800,7 @@ InternalHandlerInfoWrapper.prototype = { // Override store so we so we can notify any code listening for registration // or unregistration of this handler. - store: function() { + store() { HandlerInfoWrapper.prototype.store.call(this); Services.obs.notifyObservers(null, this._handlerChanged, null); }, @@ -873,7 +873,7 @@ var gApplicationsPane = { // Initialization & Destruction - init: function() { + init() { function setEventListener(aId, aEventType, aCallback) { document.getElementById(aId) @@ -952,7 +952,7 @@ var gApplicationsPane = { setTimeout(_delayedPaneLoad, 0, this); }, - destroy: function() { + destroy() { window.removeEventListener("unload", this, false); this._prefSvc.removeObserver(PREF_SHOW_PLUGINS_IN_LIST, this); this._prefSvc.removeObserver(PREF_HIDE_PLUGINS_WITHOUT_EXTENSIONS, this); @@ -975,7 +975,7 @@ var gApplicationsPane = { // nsISupports - QueryInterface: function(aIID) { + QueryInterface(aIID) { if (aIID.equals(Ci.nsIObserver) || aIID.equals(Ci.nsIDOMEventListener || aIID.equals(Ci.nsISupports))) @@ -987,7 +987,7 @@ var gApplicationsPane = { // nsIObserver - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { // Rebuild the list when there are changes to preferences that influence // whether or not to show certain entries in the list. if (aTopic == "nsPref:changed" && !this._storingAction) { @@ -1008,7 +1008,7 @@ var gApplicationsPane = { // nsIDOMEventListener - handleEvent: function(aEvent) { + handleEvent(aEvent) { if (aEvent.type == "unload") { this.destroy(); } @@ -1017,14 +1017,14 @@ var gApplicationsPane = { // Composed Model Construction - _loadData: function() { + _loadData() { this._loadFeedHandler(); this._loadInternalHandlers(); this._loadPluginHandlers(); this._loadApplicationHandlers(); }, - _loadFeedHandler: function() { + _loadFeedHandler() { this._handledTypes[TYPE_MAYBE_FEED] = feedHandlerInfo; feedHandlerInfo.handledOnlyByPlugin = false; @@ -1039,7 +1039,7 @@ var gApplicationsPane = { * Load higher level internal handlers so they can be turned on/off in the * applications menu. */ - _loadInternalHandlers: function() { + _loadInternalHandlers() { var internalHandlers = [pdfHandlerInfo]; for (let internalHandler of internalHandlers) { if (internalHandler.enabled) { @@ -1066,7 +1066,7 @@ var gApplicationsPane = { * enabledPlugin to get the plugin that would be used, we'd still need to * check the pref ourselves to find out if it's enabled. */ - _loadPluginHandlers: function() { + _loadPluginHandlers() { "use strict"; let mimeTypes = navigator.mimeTypes; @@ -1089,7 +1089,7 @@ var gApplicationsPane = { /** * Load the set of handlers defined by the application datastore. */ - _loadApplicationHandlers: function() { + _loadApplicationHandlers() { var wrappedHandlerInfos = this._handlerSvc.enumerate(); while (wrappedHandlerInfos.hasMoreElements()) { let wrappedHandlerInfo = @@ -1111,7 +1111,7 @@ var gApplicationsPane = { // View Construction - _rebuildVisibleTypes: function() { + _rebuildVisibleTypes() { // Reset the list of visible types and the visible type description counts. this._visibleTypes = []; this._visibleTypeDescriptionCount = {}; @@ -1150,7 +1150,7 @@ var gApplicationsPane = { } }, - _rebuildView: function() { + _rebuildView() { // Clear the list of entries. while (this._list.childNodes.length > 1) this._list.removeChild(this._list.lastChild); @@ -1181,7 +1181,7 @@ var gApplicationsPane = { this._selectLastSelectedType(); }, - _matchesFilter: function(aType) { + _matchesFilter(aType) { var filterValue = this._filter.value.toLowerCase(); return this._describeType(aType).toLowerCase().indexOf(filterValue) != -1 || this._describePreferredAction(aType).toLowerCase().indexOf(filterValue) != -1; @@ -1197,7 +1197,7 @@ var gApplicationsPane = { * @param aHandlerInfo {nsIHandlerInfo} the type being described * @returns {string} a description of the type */ - _describeType: function(aHandlerInfo) { + _describeType(aHandlerInfo) { if (this._visibleTypeDescriptionCount[aHandlerInfo.description] > 1) return this._prefsBundle.getFormattedString("typeDescriptionWithType", [aHandlerInfo.description, @@ -1218,7 +1218,7 @@ var gApplicationsPane = { * is being described * @returns {string} a description of the action */ - _describePreferredAction: function(aHandlerInfo) { + _describePreferredAction(aHandlerInfo) { // alwaysAskBeforeHandling overrides the preferred action, so if that flag // is set, then describe that behavior instead. For most types, this is // the "alwaysAsk" string, but for the feed type we show something special. @@ -1280,7 +1280,7 @@ var gApplicationsPane = { } }, - _selectLastSelectedType: function() { + _selectLastSelectedType() { // If the list is disabled by the pref.downloads.disable_button.edit_actions // preference being locked, then don't select the type, as that would cause // it to appear selected, with a different background and an actions menu @@ -1306,7 +1306,7 @@ var gApplicationsPane = { * * @returns {boolean} whether or not it's valid */ - isValidHandlerApp: function(aHandlerApp) { + isValidHandlerApp(aHandlerApp) { if (!aHandlerApp) return false; @@ -1322,7 +1322,7 @@ var gApplicationsPane = { return false; }, - _isValidHandlerExecutable: function(aExecutable) { + _isValidHandlerExecutable(aExecutable) { let leafName; if (AppConstants.platform == "win") { leafName = `${AppConstants.MOZ_APP_NAME}.exe`; @@ -1344,7 +1344,7 @@ var gApplicationsPane = { * Rebuild the actions menu for the selected entry. Gets called by * the richlistitem constructor when an entry in the list gets selected. */ - rebuildActionsMenu: function() { + rebuildActionsMenu() { var typeItem = this._list.selectedItem; var handlerInfo = this._handledTypes[typeItem.type]; var menu = @@ -1539,7 +1539,7 @@ var gApplicationsPane = { /** * Sort the list when the user clicks on a column header. */ - sort: function(event) { + sort(event) { var column = event.target; // If the user clicked on a new sort column, remove the direction indicator @@ -1562,7 +1562,7 @@ var gApplicationsPane = { /** * Sort the list of visible types by the current sort column/direction. */ - _sortVisibleTypes: function() { + _sortVisibleTypes() { if (!this._sortColumn) return; @@ -1594,11 +1594,11 @@ var gApplicationsPane = { /** * Filter the list when the user enters a filter term into the filter field. */ - filter: function() { + filter() { this._rebuildView(); }, - focusFilterBox: function() { + focusFilterBox() { this._filter.focus(); this._filter.select(); }, @@ -1606,7 +1606,7 @@ var gApplicationsPane = { // Changes - onSelectAction: function(aActionItem) { + onSelectAction(aActionItem) { this._storingAction = true; try { @@ -1617,7 +1617,7 @@ var gApplicationsPane = { } }, - _storeAction: function(aActionItem) { + _storeAction(aActionItem) { var typeItem = this._list.selectedItem; var handlerInfo = this._handledTypes[typeItem.type]; @@ -1662,7 +1662,7 @@ var gApplicationsPane = { } }, - manageApp: function(aEvent) { + manageApp(aEvent) { // Don't let the normal "on select action" handler get this event, // as we handle it specially ourselves. aEvent.stopPropagation(); @@ -1689,7 +1689,7 @@ var gApplicationsPane = { }, - chooseApp: function(aEvent) { + chooseApp(aEvent) { // Don't let the normal "on select action" handler get this event, // as we handle it specially ourselves. aEvent.stopPropagation(); @@ -1777,13 +1777,13 @@ var gApplicationsPane = { // Mark which item in the list was last selected so we can reselect it // when we rebuild the list or when the user returns to the prefpane. - onSelectionChanged: function() { + onSelectionChanged() { if (this._list.selectedItem) this._list.setAttribute("lastSelectedType", this._list.selectedItem.getAttribute("type")); }, - _setIconClassForPreferredAction: function(aHandlerInfo, aElement) { + _setIconClassForPreferredAction(aHandlerInfo, aElement) { // If this returns true, the attribute that CSS sniffs for was set to something // so you shouldn't manually set an icon URI. // This removes the existing actionIcon attribute if any, even if returning false. @@ -1817,7 +1817,7 @@ var gApplicationsPane = { return false; }, - _getIconURLForPreferredAction: function(aHandlerInfo) { + _getIconURLForPreferredAction(aHandlerInfo) { switch (aHandlerInfo.preferredAction) { case Ci.nsIHandlerInfo.useSystemDefault: return this._getIconURLForSystemDefault(aHandlerInfo); @@ -1835,7 +1835,7 @@ var gApplicationsPane = { } }, - _getIconURLForHandlerApp: function(aHandlerApp) { + _getIconURLForHandlerApp(aHandlerApp) { if (aHandlerApp instanceof Ci.nsILocalHandlerApp) return this._getIconURLForFile(aHandlerApp.executable); @@ -1849,7 +1849,7 @@ var gApplicationsPane = { return ""; }, - _getIconURLForFile: function(aFile) { + _getIconURLForFile(aFile) { var fph = this._ioSvc.getProtocolHandler("file"). QueryInterface(Ci.nsIFileProtocolHandler); var urlSpec = fph.getURLSpecFromFile(aFile); @@ -1857,7 +1857,7 @@ var gApplicationsPane = { return "moz-icon://" + urlSpec + "?size=16"; }, - _getIconURLForWebApp: function(aWebAppURITemplate) { + _getIconURLForWebApp(aWebAppURITemplate) { var uri = this._ioSvc.newURI(aWebAppURITemplate, null, null); // Unfortunately we can't use the favicon service to get the favicon, @@ -1873,7 +1873,7 @@ var gApplicationsPane = { return ""; }, - _getIconURLForSystemDefault: function(aHandlerInfo) { + _getIconURLForSystemDefault(aHandlerInfo) { // Handler info objects for MIME types on some OSes implement a property bag // interface from which we can get an icon for the default app, so if we're // dealing with a MIME type on one of those OSes, then try to get the icon. diff --git a/browser/components/preferences/in-content/containers.js b/browser/components/preferences/in-content/containers.js index 7968f55395a4..1b798b18313c 100644 --- a/browser/components/preferences/in-content/containers.js +++ b/browser/components/preferences/in-content/containers.js @@ -67,7 +67,7 @@ let gContainersPane = { this._rebuildView(); }, - onPeferenceClick(button) { + onPreferenceClick(button) { this.openPreferenceDialog(button.getAttribute("value")); }, diff --git a/browser/components/preferences/in-content/containers.xul b/browser/components/preferences/in-content/containers.xul index e83bac1c3507..c25f61c75ecf 100644 --- a/browser/components/preferences/in-content/containers.xul +++ b/browser/components/preferences/in-content/containers.xul @@ -37,7 +37,7 @@ - document.getElementById(aPref).value; @@ -304,7 +304,7 @@ var gPrivacyPane = { /** * Update the selected pane based on the history mode menulist */ - updateHistoryModePane: function PPP_updateHistoryModePane() + updateHistoryModePane() { let selectedIndex = -1; switch (document.getElementById("historyMode").value) { @@ -326,7 +326,7 @@ var gPrivacyPane = { * Update the private browsing auto-start pref and the history mode * micro-management prefs based on the history mode menulist */ - updateHistoryModePrefs: function PPP_updateHistoryModePrefs() + updateHistoryModePrefs() { let pref = document.getElementById("browser.privatebrowsing.autostart"); switch (document.getElementById("historyMode").value) { @@ -361,7 +361,7 @@ var gPrivacyPane = { * Update the privacy micro-management controls based on the * value of the private browsing auto-start checkbox. */ - updatePrivacyMicroControls: function PPP_updatePrivacyMicroControls() + updatePrivacyMicroControls() { if (document.getElementById("historyMode").value == "custom") { let disabled = this._autoStartPrivateBrowsing = @@ -413,7 +413,7 @@ var gPrivacyPane = { /** * Initialize the starting state for the auto-start private browsing mode pref reverter. */ - initAutoStartPrivateBrowsingReverter: function PPP_initAutoStartPrivateBrowsingReverter() + initAutoStartPrivateBrowsingReverter() { let mode = document.getElementById("historyMode"); let autoStart = document.getElementById("privateBrowsingAutoStart"); @@ -423,7 +423,7 @@ var gPrivacyPane = { _lastMode: null, _lastCheckState: null, - updateAutostart: function PPP_updateAutostart() { + updateAutostart() { let mode = document.getElementById("historyMode"); let autoStart = document.getElementById("privateBrowsingAutoStart"); let pref = document.getElementById("browser.privatebrowsing.autostart"); @@ -490,7 +490,7 @@ var gPrivacyPane = { /** * Displays the available block lists for tracking protection. */ - showBlockLists: function() + showBlockLists() { var bundlePreferences = document.getElementById("bundlePreferences"); let brandName = document.getElementById("bundleBrand") @@ -545,7 +545,7 @@ var gPrivacyPane = { * enables/disables the rest of the cookie UI accordingly, returning true * if cookies are enabled. */ - readAcceptCookies: function() + readAcceptCookies() { var pref = document.getElementById("network.cookie.cookieBehavior"); var acceptThirdPartyLabel = document.getElementById("acceptThirdPartyLabel"); @@ -566,7 +566,7 @@ var gPrivacyPane = { * Enables/disables the "keep until" label and menulist in response to the * "accept cookies" checkbox being checked or unchecked. */ - writeAcceptCookies: function() + writeAcceptCookies() { var accept = document.getElementById("acceptCookies"); var acceptThirdPartyMenu = document.getElementById("acceptThirdPartyMenu"); @@ -581,7 +581,7 @@ var gPrivacyPane = { /** * Converts between network.cookie.cookieBehavior and the third-party cookie UI */ - readAcceptThirdPartyCookies: function() + readAcceptThirdPartyCookies() { var pref = document.getElementById("network.cookie.cookieBehavior"); switch (pref.value) @@ -599,7 +599,7 @@ var gPrivacyPane = { } }, - writeAcceptThirdPartyCookies: function() + writeAcceptThirdPartyCookies() { var accept = document.getElementById("acceptThirdPartyMenu").selectedItem; switch (accept.value) @@ -618,7 +618,7 @@ var gPrivacyPane = { /** * Displays fine-grained, per-site preferences for cookies. */ - showCookieExceptions: function() + showCookieExceptions() { var bundlePreferences = document.getElementById("bundlePreferences"); var params = { blockVisible : true, @@ -635,7 +635,7 @@ var gPrivacyPane = { /** * Displays all the user's cookies in a dialog. */ - showCookies: function(aCategory) + showCookies(aCategory) { gSubDialog.open("chrome://browser/content/preferences/cookies.xul"); }, @@ -653,7 +653,7 @@ var gPrivacyPane = { /** * Displays the Clear Private Data settings dialog. */ - showClearPrivateDataSettings: function() + showClearPrivateDataSettings() { gSubDialog.open("chrome://browser/content/preferences/sanitize.xul", "resizable=no"); }, @@ -663,7 +663,7 @@ var gPrivacyPane = { * Displays a dialog from which individual parts of private data may be * cleared. */ - clearPrivateDataNow: function(aClearEverything) { + clearPrivateDataNow(aClearEverything) { var ts = document.getElementById("privacy.sanitize.timeSpan"); var timeSpanOrig = ts.value; @@ -685,7 +685,7 @@ var gPrivacyPane = { * Enables or disables the "Settings..." button depending * on the privacy.sanitize.sanitizeOnShutdown preference value */ - _updateSanitizeSettingsButton: function() { + _updateSanitizeSettingsButton() { var settingsButton = document.getElementById("clearDataSettings"); var sanitizeOnShutdownPref = document.getElementById("privacy.sanitize.sanitizeOnShutdown"); @@ -704,7 +704,7 @@ var gPrivacyPane = { /** * Enables/disables the Settings button used to configure containers */ - readBrowserContainersCheckbox: function() + readBrowserContainersCheckbox() { var pref = document.getElementById("privacy.userContext.enabled"); var settings = document.getElementById("browserContainersSettings"); diff --git a/browser/components/preferences/in-content/search.js b/browser/components/preferences/in-content/search.js index 7cf77de75507..063944e7cd9e 100644 --- a/browser/components/preferences/in-content/search.js +++ b/browser/components/preferences/in-content/search.js @@ -17,12 +17,12 @@ var gSearchPane = { /** * Initialize autocomplete to ensure prefs are in sync. */ - _initAutocomplete: function() { + _initAutocomplete() { Components.classes["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"] .getService(Components.interfaces.mozIPlacesAutoComplete); }, - init: function() + init() { gEngineView = new EngineView(new EngineStore()); document.getElementById("engineList").view = gEngineView; @@ -75,7 +75,7 @@ var gSearchPane = { permanentPBLabel.hidden = urlbarSuggests.hidden || !permanentPB; }, - buildDefaultEngineDropDown: function() { + buildDefaultEngineDropDown() { // This is called each time something affects the list of engines. let list = document.getElementById("defaultEngine"); // Set selection to the current default engine. @@ -100,7 +100,7 @@ var gSearchPane = { }); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "click": if (aEvent.target.id != "engineChildren" && @@ -162,7 +162,7 @@ var gSearchPane = { } }, - observe: function(aEngine, aTopic, aVerb) { + observe(aEngine, aTopic, aVerb) { if (aTopic == "browser-search-engine-modified") { aEngine.QueryInterface(Components.interfaces.nsISearchEngine); switch (aVerb) { @@ -194,7 +194,7 @@ var gSearchPane = { } }, - onInputBlur: function(aEvent) { + onInputBlur(aEvent) { let tree = document.getElementById("engineList"); if (!tree.hasAttribute("editing")) return; @@ -204,12 +204,12 @@ var gSearchPane = { tree.stopEditing(accept); }, - onTreeSelect: function() { + onTreeSelect() { document.getElementById("removeEngineButton").disabled = !gEngineView.isEngineSelectedAndRemovable(); }, - onTreeKeyPress: function(aEvent) { + onTreeKeyPress(aEvent) { let index = gEngineView.selectedIndex; let tree = document.getElementById("engineList"); if (tree.hasAttribute("editing")) @@ -238,17 +238,17 @@ var gSearchPane = { } }, - onRestoreDefaults: function() { + onRestoreDefaults() { let num = gEngineView._engineStore.restoreDefaultEngines(); gEngineView.rowCountChanged(0, num); gEngineView.invalidate(); }, - showRestoreDefaults: function(aEnable) { + showRestoreDefaults(aEnable) { document.getElementById("restoreDefaultSearchEngines").disabled = !aEnable; }, - remove: function(aEngine) { + remove(aEngine) { let index = gEngineView._engineStore.removeEngine(aEngine); gEngineView.rowCountChanged(index, -1); gEngineView.invalidate(); @@ -294,7 +294,7 @@ var gSearchPane = { return true; }), - saveOneClickEnginesList: function() { + saveOneClickEnginesList() { let hiddenList = []; for (let engine of gEngineView._engineStore.engines) { if (!engine.shown) @@ -304,7 +304,7 @@ var gSearchPane = { hiddenList.join(","); }, - setDefaultEngine: function() { + setDefaultEngine() { Services.search.currentEngine = document.getElementById("defaultEngine").selectedItem.engine; } @@ -345,15 +345,15 @@ EngineStore.prototype = { return val; }, - _getIndexForEngine: function ES_getIndexForEngine(aEngine) { + _getIndexForEngine(aEngine) { return this._engines.indexOf(aEngine); }, - _getEngineByName: function ES_getEngineByName(aName) { + _getEngineByName(aName) { return this._engines.find(engine => engine.name == aName); }, - _cloneEngine: function ES_cloneEngine(aEngine) { + _cloneEngine(aEngine) { var clonedObj = {}; for (var i in aEngine) clonedObj[i] = aEngine[i]; @@ -363,15 +363,15 @@ EngineStore.prototype = { }, // Callback for Array's some(). A thisObj must be passed to some() - _isSameEngine: function ES_isSameEngine(aEngineClone) { + _isSameEngine(aEngineClone) { return aEngineClone.originalEngine == this.originalEngine; }, - addEngine: function ES_addEngine(aEngine) { + addEngine(aEngine) { this._engines.push(this._cloneEngine(aEngine)); }, - moveEngine: function ES_moveEngine(aEngine, aNewIndex) { + moveEngine(aEngine, aNewIndex) { if (aNewIndex < 0 || aNewIndex > this._engines.length - 1) throw new Error("ES_moveEngine: invalid aNewIndex!"); var index = this._getIndexForEngine(aEngine); @@ -388,7 +388,7 @@ EngineStore.prototype = { Services.search.moveEngine(aEngine.originalEngine, aNewIndex); }, - removeEngine: function ES_removeEngine(aEngine) { + removeEngine(aEngine) { if (this._engines.length == 1) { throw new Error("Cannot remove last engine!"); } @@ -407,7 +407,7 @@ EngineStore.prototype = { return index; }, - restoreDefaultEngines: function ES_restoreDefaultEngines() { + restoreDefaultEngines() { var added = 0; for (var i = 0; i < this._defaultEngines.length; ++i) { @@ -436,7 +436,7 @@ EngineStore.prototype = { return added; }, - changeEngine: function ES_changeEngine(aEngine, aProp, aNewValue) { + changeEngine(aEngine, aProp, aNewValue) { var index = this._getIndexForEngine(aEngine); if (index == -1) throw new Error("invalid engine?"); @@ -445,7 +445,7 @@ EngineStore.prototype = { aEngine.originalEngine[aProp] = aNewValue; }, - reloadIcons: function ES_reloadIcons() { + reloadIcons() { this._engines.forEach(function(e) { e.uri = e.originalEngine.uri; }); @@ -476,27 +476,27 @@ EngineView.prototype = { }, // Helpers - rowCountChanged: function(index, count) { + rowCountChanged(index, count) { this.tree.rowCountChanged(index, count); }, - invalidate: function() { + invalidate() { this.tree.invalidate(); }, - ensureRowIsVisible: function(index) { + ensureRowIsVisible(index) { this.tree.ensureRowIsVisible(index); }, - getSourceIndexFromDrag: function(dataTransfer) { + getSourceIndexFromDrag(dataTransfer) { return parseInt(dataTransfer.getData(ENGINE_FLAVOR)); }, - isCheckBox: function(index, column) { + isCheckBox(index, column) { return column.id == "engineShown"; }, - isEngineSelectedAndRemovable: function() { + isEngineSelectedAndRemovable() { return this.selectedIndex != -1 && this.lastIndex != 0; }, @@ -505,7 +505,7 @@ EngineView.prototype = { return this._engineStore.engines.length; }, - getImageSrc: function(index, column) { + getImageSrc(index, column) { if (column.id == "engineName") { if (this._engineStore.engines[index].iconURI) return this._engineStore.engines[index].iconURI.spec; @@ -518,7 +518,7 @@ EngineView.prototype = { return ""; }, - getCellText: function(index, column) { + getCellText(index, column) { if (column.id == "engineName") return this._engineStore.engines[index].name; else if (column.id == "engineKeyword") @@ -526,18 +526,18 @@ EngineView.prototype = { return ""; }, - setTree: function(tree) { + setTree(tree) { this.tree = tree; }, - canDrop: function(targetIndex, orientation, dataTransfer) { + canDrop(targetIndex, orientation, dataTransfer) { var sourceIndex = this.getSourceIndexFromDrag(dataTransfer); return (sourceIndex != -1 && sourceIndex != targetIndex && sourceIndex != targetIndex + orientation); }, - drop: function(dropIndex, orientation, dataTransfer) { + drop(dropIndex, orientation, dataTransfer) { var sourceIndex = this.getSourceIndexFromDrag(dataTransfer); var sourceEngine = this._engineStore.engines[sourceIndex]; @@ -559,37 +559,37 @@ EngineView.prototype = { }, selection: null, - getRowProperties: function(index) { return ""; }, - getCellProperties: function(index, column) { return ""; }, - getColumnProperties: function(column) { return ""; }, - isContainer: function(index) { return false; }, - isContainerOpen: function(index) { return false; }, - isContainerEmpty: function(index) { return false; }, - isSeparator: function(index) { return false; }, - isSorted: function(index) { return false; }, - getParentIndex: function(index) { return -1; }, - hasNextSibling: function(parentIndex, index) { return false; }, - getLevel: function(index) { return 0; }, - getProgressMode: function(index, column) { }, - getCellValue: function(index, column) { + getRowProperties(index) { return ""; }, + getCellProperties(index, column) { return ""; }, + getColumnProperties(column) { return ""; }, + isContainer(index) { return false; }, + isContainerOpen(index) { return false; }, + isContainerEmpty(index) { return false; }, + isSeparator(index) { return false; }, + isSorted(index) { return false; }, + getParentIndex(index) { return -1; }, + hasNextSibling(parentIndex, index) { return false; }, + getLevel(index) { return 0; }, + getProgressMode(index, column) { }, + getCellValue(index, column) { if (column.id == "engineShown") return this._engineStore.engines[index].shown; return undefined; }, - toggleOpenState: function(index) { }, - cycleHeader: function(column) { }, - selectionChanged: function() { }, - cycleCell: function(row, column) { }, - isEditable: function(index, column) { return column.id != "engineName"; }, - isSelectable: function(index, column) { return false; }, - setCellValue: function(index, column, value) { + toggleOpenState(index) { }, + cycleHeader(column) { }, + selectionChanged() { }, + cycleCell(row, column) { }, + isEditable(index, column) { return column.id != "engineName"; }, + isSelectable(index, column) { return false; }, + setCellValue(index, column, value) { if (column.id == "engineShown") { this._engineStore.engines[index].shown = value == "true"; gEngineView.invalidate(); gSearchPane.saveOneClickEnginesList(); } }, - setCellText: function(index, column, value) { + setCellText(index, column, value) { if (column.id == "engineKeyword") { gSearchPane.editKeyword(this._engineStore.engines[index], value) .then(valid => { @@ -598,7 +598,7 @@ EngineView.prototype = { }); } }, - performAction: function(action) { }, - performActionOnRow: function(action, index) { }, - performActionOnCell: function(action, index, column) { } + performAction(action) { }, + performActionOnRow(action, index) { }, + performActionOnCell(action, index, column) { } }; diff --git a/browser/components/preferences/in-content/security.js b/browser/components/preferences/in-content/security.js index a468100a1cd4..47f2fce33a4b 100644 --- a/browser/components/preferences/in-content/security.js +++ b/browser/components/preferences/in-content/security.js @@ -13,7 +13,7 @@ var gSecurityPane = { /** * Initializes master password UI. */ - init: function() + init() { function setEventListener(aId, aEventType, aCallback) { @@ -52,7 +52,7 @@ var gSecurityPane = { * Enables/disables the add-ons Exceptions button depending on whether * or not add-on installation warnings are displayed. */ - readWarnAddonInstall: function() + readWarnAddonInstall() { var warn = document.getElementById("xpinstall.whitelist.required"); var exceptions = document.getElementById("addonExceptions"); @@ -66,7 +66,7 @@ var gSecurityPane = { /** * Displays the exceptions lists for add-on installation warnings. */ - showAddonExceptions: function() + showAddonExceptions() { var bundlePrefs = document.getElementById("bundlePreferences"); @@ -106,7 +106,7 @@ var gSecurityPane = { * passwords are never saved. When browser is set to start in Private * Browsing mode, the "Remember passwords" UI is useless, so we disable it. */ - readSavePasswords: function() + readSavePasswords() { var pref = document.getElementById("signon.rememberSignons"); var excepts = document.getElementById("passwordExceptions"); @@ -125,7 +125,7 @@ var gSecurityPane = { * Displays a dialog in which the user can view and modify the list of sites * where passwords are never saved. */ - showPasswordExceptions: function() + showPasswordExceptions() { var bundlePrefs = document.getElementById("bundlePreferences"); var params = { @@ -149,7 +149,7 @@ var gSecurityPane = { * The master password is controlled by various bits of NSS functionality, so * the UI for it can't be controlled by the normal preference bindings. */ - _initMasterPasswordUI: function() + _initMasterPasswordUI() { var noMP = !LoginHelper.isMasterPasswordSet(); @@ -238,7 +238,7 @@ var gSecurityPane = { * "use master password" checkbox, and prompts for master password removal if * one is set. */ - updateMasterPasswordButton: function() + updateMasterPasswordButton() { var checkbox = document.getElementById("useMasterPassword"); var button = document.getElementById("changeMasterPassword"); @@ -262,7 +262,7 @@ var gSecurityPane = { * the current master password. When the dialog is dismissed, master password * UI is automatically updated. */ - _removeMasterPassword: function() + _removeMasterPassword() { var secmodDB = Cc["@mozilla.org/security/pkcs11moduledb;1"]. getService(Ci.nsIPKCS11ModuleDB); @@ -284,7 +284,7 @@ var gSecurityPane = { /** * Displays a dialog in which the master password may be changed. */ - changeMasterPassword: function() + changeMasterPassword() { gSubDialog.open("chrome://mozapps/content/preferences/changemp.xul", "resizable=no", null, this._initMasterPasswordUI.bind(this)); @@ -294,7 +294,7 @@ var gSecurityPane = { * Shows the sites where the user has saved passwords and the associated login * information. */ - showPasswords: function() + showPasswords() { gSubDialog.open("chrome://passwordmgr/content/passwordManager.xul"); } diff --git a/browser/components/preferences/in-content/subdialogs.js b/browser/components/preferences/in-content/subdialogs.js index bb8d0048f24e..9a21e383a5e3 100644 --- a/browser/components/preferences/in-content/subdialogs.js +++ b/browser/components/preferences/in-content/subdialogs.js @@ -19,20 +19,20 @@ var gSubDialog = { ], _resizeObserver: null, - init: function() { + init() { this._frame = document.getElementById("dialogFrame"); this._overlay = document.getElementById("dialogOverlay"); this._box = document.getElementById("dialogBox"); this._closeButton = document.getElementById("dialogClose"); }, - updateTitle: function(aEvent) { + updateTitle(aEvent) { if (aEvent.target != gSubDialog._frame.contentDocument) return; document.getElementById("dialogTitle").textContent = gSubDialog._frame.contentDocument.title; }, - injectXMLStylesheet: function(aStylesheetURL) { + injectXMLStylesheet(aStylesheetURL) { let contentStylesheet = this._frame.contentDocument.createProcessingInstruction( 'xml-stylesheet', 'href="' + aStylesheetURL + '" type="text/css"' @@ -41,7 +41,7 @@ var gSubDialog = { this._frame.contentDocument.documentElement); }, - open: function(aURL, aFeatures = null, aParams = null, aClosingCallback = null) { + open(aURL, aFeatures = null, aParams = null, aClosingCallback = null) { // If we're already open/opening on this URL, do nothing. if (this._openedURL == aURL && !this._isClosing) { return; @@ -76,7 +76,7 @@ var gSubDialog = { featureParams.get("resizable") != "0"); }, - close: function(aEvent = null) { + close(aEvent = null) { if (this._isClosing) { return; } @@ -122,7 +122,7 @@ var gSubDialog = { }, 0); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "command": this._frame.contentWindow.close(); @@ -153,13 +153,13 @@ var gSubDialog = { /* Private methods */ - _onUnload: function(aEvent) { + _onUnload(aEvent) { if (aEvent.target.location.href == this._openedURL) { this._frame.contentWindow.close(); } }, - _onContentLoaded: function(aEvent) { + _onContentLoaded(aEvent) { if (aEvent.target != this._frame || aEvent.target.contentWindow.location == "about:blank") { return; } @@ -209,7 +209,7 @@ var gSubDialog = { this._overlay.style.opacity = "0.01"; }, - _onLoad: function(aEvent) { + _onLoad(aEvent) { if (aEvent.target.contentWindow.location == "about:blank") { return; } @@ -293,7 +293,7 @@ var gSubDialog = { this._trapFocus(); }, - _onResize: function(mutations) { + _onResize(mutations) { let frame = gSubDialog._frame; // The width and height styles are needed for the initial // layout of the frame, but afterward they need to be removed @@ -319,12 +319,12 @@ var gSubDialog = { } }, - _onDialogClosing: function(aEvent) { + _onDialogClosing(aEvent) { this._frame.contentWindow.removeEventListener("dialogclosing", this); this._closingEvent = aEvent; }, - _onKeyDown: function(aEvent) { + _onKeyDown(aEvent) { if (aEvent.currentTarget == window && aEvent.keyCode == aEvent.DOM_VK_ESCAPE && !aEvent.defaultPrevented) { this.close(aEvent); @@ -362,7 +362,7 @@ var gSubDialog = { } }, - _onParentWinFocus: function(aEvent) { + _onParentWinFocus(aEvent) { // Explicitly check for the focus target of |window| to avoid triggering this when the window // is refocused if (aEvent.target != this._closeButton && aEvent.target != window) { @@ -370,7 +370,7 @@ var gSubDialog = { } }, - _addDialogEventListeners: function() { + _addDialogEventListeners() { // Make the close button work. this._closeButton.addEventListener("command", this); @@ -392,7 +392,7 @@ var gSubDialog = { window.addEventListener("keydown", this, true); }, - _removeDialogEventListeners: function() { + _removeDialogEventListeners() { let chromeBrowser = this._getBrowser(); chromeBrowser.removeEventListener("DOMTitleChanged", this, true); chromeBrowser.removeEventListener("unload", this, true); @@ -410,7 +410,7 @@ var gSubDialog = { this._untrapFocus(); }, - _trapFocus: function() { + _trapFocus() { let fm = Services.focus; fm.moveFocus(this._frame.contentWindow, null, fm.MOVEFOCUS_FIRST, 0); this._frame.contentDocument.addEventListener("keydown", this, true); @@ -419,13 +419,13 @@ var gSubDialog = { window.addEventListener("focus", this, true); }, - _untrapFocus: function() { + _untrapFocus() { this._frame.contentDocument.removeEventListener("keydown", this, true); this._closeButton.removeEventListener("keydown", this); window.removeEventListener("focus", this); }, - _getBrowser: function() { + _getBrowser() { return window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShell) diff --git a/browser/components/preferences/in-content/sync.js b/browser/components/preferences/in-content/sync.js index ca3175513dcf..32c5c934a292 100644 --- a/browser/components/preferences/in-content/sync.js +++ b/browser/components/preferences/in-content/sync.js @@ -42,14 +42,14 @@ var gSyncPane = { return Weave.Svc.Prefs.isSet("serverURL"); }, - needsUpdate: function() { + needsUpdate() { this.page = PAGE_NEEDS_UPDATE; let label = document.getElementById("loginError"); label.textContent = Weave.Utils.getErrorString(Weave.Status.login); label.className = "error"; }, - init: function() { + init() { this._setupEventListeners(); // If the Service hasn't finished initializing, wait for it. @@ -85,7 +85,7 @@ var gSyncPane = { xps.ensureLoaded(); }, - _showLoadPage: function(xps) { + _showLoadPage(xps) { let username; try { username = Services.prefs.getCharPref("services.sync.username"); @@ -109,7 +109,7 @@ var gSyncPane = { } }, - _init: function() { + _init() { let topics = ["weave:service:login:error", "weave:service:login:finish", "weave:service:start-over:finish", @@ -161,7 +161,7 @@ var gSyncPane = { this._initProfileImageUI(); }, - _toggleComputerNameControls: function(editMode) { + _toggleComputerNameControls(editMode) { let textbox = document.getElementById("fxaSyncComputerName"); textbox.disabled = !editMode; document.getElementById("fxaChangeDeviceName").hidden = editMode; @@ -169,25 +169,25 @@ var gSyncPane = { document.getElementById("fxaSaveChangeDeviceName").hidden = !editMode; }, - _focusComputerNameTextbox: function() { + _focusComputerNameTextbox() { let textbox = document.getElementById("fxaSyncComputerName"); let valLength = textbox.value.length; textbox.focus(); textbox.setSelectionRange(valLength, valLength); }, - _blurComputerNameTextbox: function() { + _blurComputerNameTextbox() { document.getElementById("fxaSyncComputerName").blur(); }, - _focusAfterComputerNameTextbox: function() { + _focusAfterComputerNameTextbox() { // Focus the most appropriate element that's *not* the "computer name" box. Services.focus.moveFocus(window, document.getElementById("fxaSyncComputerName"), Services.focus.MOVEFOCUS_FORWARD, 0); }, - _updateComputerNameValue: function(save) { + _updateComputerNameValue(save) { if (save) { let textbox = document.getElementById("fxaSyncComputerName"); Weave.Service.clientsEngine.localName = textbox.value; @@ -195,7 +195,7 @@ var gSyncPane = { this._populateComputerName(Weave.Service.clientsEngine.localName); }, - _setupEventListeners: function() { + _setupEventListeners() { function setEventListener(aId, aEventType, aCallback) { document.getElementById(aId) @@ -294,7 +294,7 @@ var gSyncPane = { }); }, - _initProfileImageUI: function() { + _initProfileImageUI() { try { if (Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled")) { document.getElementById("fxaProfileImage").hidden = false; @@ -302,7 +302,7 @@ var gSyncPane = { } catch (e) { } }, - updateWeavePrefs: function() { + updateWeavePrefs() { let service = Components.classes["@mozilla.org/weave/service;1"] .getService(Components.interfaces.nsISupports) .wrappedJSObject; @@ -427,7 +427,7 @@ var gSyncPane = { } }, - startOver: function(showDialog) { + startOver(showDialog) { if (showDialog) { let flags = Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING + Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL + @@ -449,26 +449,26 @@ var gSyncPane = { this.updateWeavePrefs(); }, - updatePass: function() { + updatePass() { if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) gSyncUtils.changePassword(); else gSyncUtils.updatePassphrase(); }, - resetPass: function() { + resetPass() { if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) gSyncUtils.resetPassword(); else gSyncUtils.resetPassphrase(); }, - _getEntryPoint: function() { + _getEntryPoint() { let params = new URLSearchParams(document.URL.split("#")[0].split("?")[1] || ""); return params.get("entrypoint") || "preferences"; }, - _openAboutAccounts: function(action) { + _openAboutAccounts(action) { let entryPoint = this._getEntryPoint(); let params = new URLSearchParams(); if (action) { @@ -488,7 +488,7 @@ var gSyncPane = { * "pair" -- pair a device first * "reset" -- reset sync */ - openSetup: function(wizardType) { + openSetup(wizardType) { let service = Components.classes["@mozilla.org/weave/service;1"] .getService(Components.interfaces.nsISupports) .wrappedJSObject; @@ -507,7 +507,7 @@ var gSyncPane = { } }, - openContentInBrowser: function(url, options) { + openContentInBrowser(url, options) { let win = Services.wm.getMostRecentWindow("navigator:browser"); if (!win) { // no window to use, so use _openLink to create a new one. We don't @@ -530,20 +530,20 @@ var gSyncPane = { browser.loadURI(url); }, - signUp: function() { + signUp() { this._openAboutAccounts("signup"); }, - signIn: function() { + signIn() { this._openAboutAccounts("signin"); }, - reSignIn: function() { + reSignIn() { this._openAboutAccounts("reauth"); }, - clickOrSpaceOrEnterPressed: function(event) { + clickOrSpaceOrEnterPressed(event) { // Note: charCode is deprecated, but 'char' not yet implemented. // Replace charCode with char when implemented, see Bug 680830 return ((event.type == "click" && event.button == 0) || @@ -551,7 +551,7 @@ var gSyncPane = { (event.charCode == KeyEvent.DOM_VK_SPACE || event.keyCode == KeyEvent.DOM_VK_RETURN))); }, - openChangeProfileImage: function(event) { + openChangeProfileImage(event) { if (this.clickOrSpaceOrEnterPressed(event)) { fxAccounts.promiseAccountsChangeProfileURI(this._getEntryPoint(), "avatar") .then(url => { @@ -564,7 +564,7 @@ var gSyncPane = { } }, - openManageFirefoxAccount: function(event) { + openManageFirefoxAccount(event) { if (this.clickOrSpaceOrEnterPressed(event)) { this.manageFirefoxAccount(); // Prevent page from scrolling on the space key. @@ -572,7 +572,7 @@ var gSyncPane = { } }, - manageFirefoxAccount: function() { + manageFirefoxAccount() { fxAccounts.promiseAccountsManageURI(this._getEntryPoint()) .then(url => { this.openContentInBrowser(url, { @@ -581,7 +581,7 @@ var gSyncPane = { }); }, - verifyFirefoxAccount: function() { + verifyFirefoxAccount() { let showVerifyNotification = (data) => { let isError = !data; let maybeNot = isError ? "Not" : ""; @@ -609,12 +609,12 @@ var gSyncPane = { .then(onSuccess, onError); }, - openOldSyncSupportPage: function() { + openOldSyncSupportPage() { let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "old-sync"; this.openContentInBrowser(url); }, - unlinkFirefoxAccount: function(confirm) { + unlinkFirefoxAccount(confirm) { if (confirm) { // We use a string bundle shared with aboutAccounts. let sb = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties"); @@ -646,7 +646,7 @@ var gSyncPane = { }); }, - openAddDevice: function() { + openAddDevice() { if (!Weave.Utils.ensureMPUnlocked()) return; @@ -658,7 +658,7 @@ var gSyncPane = { "syncAddDevice", "centerscreen,chrome,resizable=no"); }, - resetSync: function() { + resetSync() { this.openSetup("reset"); }, diff --git a/browser/components/preferences/in-content/tests/browser_advanced_siteData.js b/browser/components/preferences/in-content/tests/browser_advanced_siteData.js index 043c8aea072d..4b635a2138de 100644 --- a/browser/components/preferences/in-content/tests/browser_advanced_siteData.js +++ b/browser/components/preferences/in-content/tests/browser_advanced_siteData.js @@ -21,13 +21,13 @@ const mockOfflineAppCacheHelper = { originalClear: null, - register: function() { + register() { this.originalClear = OfflineAppCacheHelper.clear; this.clear = sinon.spy(); OfflineAppCacheHelper.clear = this.clear; }, - unregister: function() { + unregister() { OfflineAppCacheHelper.clear = this.originalClear; } }; @@ -55,7 +55,7 @@ function getQuotaUsage(origin) { function getCacheUsage() { return new Promise(resolve => { let obs = { - onNetworkCacheDiskConsumption: function(usage) { + onNetworkCacheDiskConsumption(usage) { resolve(usage); }, QueryInterface: XPCOMUtils.generateQI([ diff --git a/browser/components/preferences/in-content/tests/browser_advanced_update.js b/browser/components/preferences/in-content/tests/browser_advanced_update.js index d9d7aa33ae7a..9a18fcecae6b 100644 --- a/browser/components/preferences/in-content/tests/browser_advanced_update.js +++ b/browser/components/preferences/in-content/tests/browser_advanced_update.js @@ -20,14 +20,14 @@ const mockUpdateManager = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIUpdateManager]), - createInstance: function(outer, iiD) { + createInstance(outer, iiD) { if (outer) { throw Cr.NS_ERROR_NO_AGGREGATION; } return this.QueryInterface(iiD); }, - register: function() { + register() { let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar); if (!registrar.isCIDRegistered(this._mockClassId)) { this._originalClassId = registrar.contractIDToCID(this.contractId); @@ -37,7 +37,7 @@ const mockUpdateManager = { } }, - unregister: function() { + unregister() { let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar); registrar.unregisterFactory(this._mockClassId, this); registrar.registerFactory(this._originalClassId, "", this.contractId, this._originalFactory); @@ -47,7 +47,7 @@ const mockUpdateManager = { return this._updates.length; }, - getUpdateAt: function(index) { + getUpdateAt(index) { return this._updates[index]; }, diff --git a/browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js b/browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js index 32c1bd726374..40741cccab77 100644 --- a/browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js +++ b/browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js @@ -27,14 +27,14 @@ add_task(function*() { // Simulate a dumb font backend. win.FontBuilder._enumerator = { _list: ["MockedFont1", "MockedFont2", "MockedFont3"], - EnumerateFonts: function(lang, type, list) { + EnumerateFonts(lang, type, list) { return this._list; }, - EnumerateAllFonts: function() { + EnumerateAllFonts() { return this._list; }, - getDefaultFont: function() { return null; }, - getStandardFamilyName: function(name) { return name; }, + getDefaultFont() { return null; }, + getStandardFamilyName(name) { return name; }, }; win.FontBuilder._allFonts = null; win.FontBuilder._langGroupSupported = false; diff --git a/browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js b/browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js index bc2c6d800296..8d0a910f0c14 100644 --- a/browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js +++ b/browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js @@ -35,7 +35,7 @@ function openPreferencesViaHash(aPane) { let win = gBrowser.contentWindow; let selectedPane = win.history.state; gBrowser.removeCurrentTab(); - deferred.resolve({selectedPane: selectedPane}); + deferred.resolve({selectedPane}); }); }, true); diff --git a/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js b/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js index 15342f127529..d604332096b5 100644 --- a/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js +++ b/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js @@ -14,7 +14,7 @@ var testRunner = { tests: [ { - test: function(params) { + test(params) { params.url.value = "test.com"; params.btnAllow.doCommand(); is(params.tree.view.rowCount, 1, "added exception shows up in treeview"); @@ -28,7 +28,7 @@ var testRunner = { capability: Ci.nsIPermissionManager.ALLOW_ACTION }], }, { - test: function(params) { + test(params) { params.url.value = "test.com"; params.btnBlock.doCommand(); is(params.tree.view.getCellText(0, params.nameCol), "http://test.com", @@ -41,7 +41,7 @@ var testRunner = { capability: Ci.nsIPermissionManager.DENY_ACTION }], }, { - test: function(params) { + test(params) { params.url.value = "test.com"; params.btnAllow.doCommand(); is(params.tree.view.getCellText(0, params.nameCol), "http://test.com", @@ -54,7 +54,7 @@ var testRunner = { capability: Ci.nsIPermissionManager.ALLOW_ACTION }], }, { - test: function(params) { + test(params) { params.url.value = "test.com"; params.btnRemove.doCommand(); is(params.tree.view.rowCount, 0, "exception should be removed"); @@ -64,7 +64,7 @@ var testRunner = { }, { expectPermObservancesDuringTestFunction: true, - test: function(params) { + test(params) { let uri = params.ioService.newURI("http://test.com", null, null); params.pm.add(uri, "popup", Ci.nsIPermissionManager.DENY_ACTION); is(params.tree.view.rowCount, 0, "adding unrelated permission should not change display"); @@ -72,13 +72,13 @@ var testRunner = { }, observances: [{ type: "popup", origin: "http://test.com", data: "added", capability: Ci.nsIPermissionManager.DENY_ACTION }], - cleanUp: function(params) { + cleanUp(params) { let uri = params.ioService.newURI("http://test.com", null, null); params.pm.remove(uri, "popup"); }, }, { - test: function(params) { + test(params) { params.url.value = "https://test.com:12345"; params.btnAllow.doCommand(); is(params.tree.view.rowCount, 1, "added exception shows up in treeview"); @@ -92,7 +92,7 @@ var testRunner = { capability: Ci.nsIPermissionManager.ALLOW_ACTION }], }, { - test: function(params) { + test(params) { params.url.value = "https://test.com:12345"; params.btnBlock.doCommand(); is(params.tree.view.getCellText(0, params.nameCol), "https://test.com:12345", @@ -105,7 +105,7 @@ var testRunner = { capability: Ci.nsIPermissionManager.DENY_ACTION }], }, { - test: function(params) { + test(params) { params.url.value = "https://test.com:12345"; params.btnAllow.doCommand(); is(params.tree.view.getCellText(0, params.nameCol), "https://test.com:12345", @@ -118,7 +118,7 @@ var testRunner = { capability: Ci.nsIPermissionManager.ALLOW_ACTION }], }, { - test: function(params) { + test(params) { params.url.value = "https://test.com:12345"; params.btnRemove.doCommand(); is(params.tree.view.rowCount, 0, "exception should be removed"); @@ -127,7 +127,7 @@ var testRunner = { observances: [{ type: "cookie", origin: "https://test.com:12345", data: "deleted" }], }, { - test: function(params) { + test(params) { params.url.value = "localhost:12345"; params.btnAllow.doCommand(); is(params.tree.view.rowCount, 1, "added exception shows up in treeview"); @@ -141,7 +141,7 @@ var testRunner = { capability: Ci.nsIPermissionManager.ALLOW_ACTION }], }, { - test: function(params) { + test(params) { params.url.value = "localhost:12345"; params.btnBlock.doCommand(); is(params.tree.view.getCellText(0, params.nameCol), "http://localhost:12345", @@ -154,7 +154,7 @@ var testRunner = { capability: Ci.nsIPermissionManager.DENY_ACTION }], }, { - test: function(params) { + test(params) { params.url.value = "localhost:12345"; params.btnAllow.doCommand(); is(params.tree.view.getCellText(0, params.nameCol), "http://localhost:12345", @@ -167,7 +167,7 @@ var testRunner = { capability: Ci.nsIPermissionManager.ALLOW_ACTION }], }, { - test: function(params) { + test(params) { params.url.value = "localhost:12345"; params.btnRemove.doCommand(); is(params.tree.view.rowCount, 0, "exception should be removed"); @@ -220,7 +220,7 @@ var testRunner = { _currentTest: -1, - runTests: function() { + runTests() { this._currentTest++; info("Running test #" + (this._currentTest + 1) + "\n"); @@ -236,11 +236,11 @@ var testRunner = { }); }, - runCurrentTest: function(testNumber) { + runCurrentTest(testNumber) { return new Promise(function(resolve, reject) { let helperFunctions = { - windowLoad: function(win) { + windowLoad(win) { let doc = win.document; let params = { doc, @@ -265,7 +265,7 @@ var testRunner = { }; let permObserver = { - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (aTopic != "perm-changed") return; diff --git a/browser/components/preferences/in-content/tests/head.js b/browser/components/preferences/in-content/tests/head.js index 203fd686782b..d9eb3a1aabfa 100644 --- a/browser/components/preferences/in-content/tests/head.js +++ b/browser/components/preferences/in-content/tests/head.js @@ -136,7 +136,7 @@ function openPreferencesViaOpenPreferencesAPI(aPane, aAdvancedTab, aOptions) { let selectedAdvancedTab = aAdvancedTab && doc.getElementById("advancedPrefs").selectedTab.id; if (!aOptions || !aOptions.leaveOpen) gBrowser.removeCurrentTab(); - deferred.resolve({selectedPane: selectedPane, selectedAdvancedTab: selectedAdvancedTab}); + deferred.resolve({selectedPane, selectedAdvancedTab}); }); }, true); diff --git a/browser/components/preferences/languages.js b/browser/components/preferences/languages.js index 677892b942ff..2be9ddfbced2 100644 --- a/browser/components/preferences/languages.js +++ b/browser/components/preferences/languages.js @@ -10,7 +10,7 @@ var gLanguagesDialog = { _selectedItemID : null, - init: function() + init() { if (!this._availableLanguagesList.length) this._loadAvailableLanguages(); @@ -18,7 +18,7 @@ var gLanguagesDialog = { // Ugly hack used to trigger extra reflow in order to work around XUL bug 1194844; // see bug 1194346. - forceReflow: function() + forceReflow() { this._activeLanguages.style.fontKerning = "none"; setTimeout("gLanguagesDialog._activeLanguages.style.removeProperty('font-kerning')", 0); @@ -34,7 +34,7 @@ var gLanguagesDialog = { return document.getElementById("availableLanguages"); }, - _loadAvailableLanguages: function() + _loadAvailableLanguages() { // This is a parser for: resource://gre/res/language.properties // The file is formatted like so: @@ -102,7 +102,7 @@ var gLanguagesDialog = { this._buildAvailableLanguageList(); }, - _buildAvailableLanguageList: function() + _buildAvailableLanguageList() { var availableLanguagesPopup = document.getElementById("availableLanguagesPopup"); while (availableLanguagesPopup.hasChildNodes()) @@ -126,7 +126,7 @@ var gLanguagesDialog = { } }, - readAcceptLanguages: function() + readAcceptLanguages() { while (this._activeLanguages.hasChildNodes()) this._activeLanguages.removeChild(this._activeLanguages.firstChild); @@ -160,12 +160,12 @@ var gLanguagesDialog = { return undefined; }, - writeAcceptLanguages: function() + writeAcceptLanguages() { return undefined; }, - onAvailableLanguageSelect: function() + onAvailableLanguageSelect() { var addButton = document.getElementById("addButton"); addButton.disabled = false; @@ -173,7 +173,7 @@ var gLanguagesDialog = { this._availableLanguages.removeAttribute("accesskey"); }, - addLanguage: function() + addLanguage() { var selectedID = this._availableLanguages.selectedItem.id; var preference = document.getElementById("intl.accept_languages"); @@ -201,7 +201,7 @@ var gLanguagesDialog = { this._availableLanguages.setAttribute("label", this._availableLanguages.getAttribute("label2")); }, - removeLanguage: function() + removeLanguage() { // Build the new preference value string. var languagesArray = []; @@ -229,7 +229,7 @@ var gLanguagesDialog = { this._buildAvailableLanguageList(); }, - _getLanguageName: function(aABCD) + _getLanguageName(aABCD) { if (!this._availableLanguagesList.length) this._loadAvailableLanguages(); @@ -240,7 +240,7 @@ var gLanguagesDialog = { return ""; }, - moveUp: function() + moveUp() { var selectedItem = this._activeLanguages.selectedItems[0]; var previousItem = selectedItem.previousSibling; @@ -264,7 +264,7 @@ var gLanguagesDialog = { preference.value = string; }, - moveDown: function() + moveDown() { var selectedItem = this._activeLanguages.selectedItems[0]; var nextItem = selectedItem.nextSibling; @@ -288,7 +288,7 @@ var gLanguagesDialog = { preference.value = string; }, - onLanguageSelect: function() + onLanguageSelect() { var upButton = document.getElementById("up"); var downButton = document.getElementById("down"); diff --git a/browser/components/preferences/permissions.js b/browser/components/preferences/permissions.js index 43a7c02dee71..40469cdacf2a 100644 --- a/browser/components/preferences/permissions.js +++ b/browser/components/preferences/permissions.js @@ -32,7 +32,7 @@ var gPermissionManager = { { return this._rowCount; }, - getCellText: function(aRow, aColumn) + getCellText(aRow, aColumn) { if (aColumn.id == "siteCol") return gPermissionManager._permissions[aRow].origin; @@ -41,17 +41,17 @@ var gPermissionManager = { return ""; }, - isSeparator: function(aIndex) { return false; }, - isSorted: function() { return false; }, - isContainer: function(aIndex) { return false; }, - setTree: function(aTree) {}, - getImageSrc: function(aRow, aColumn) {}, - getProgressMode: function(aRow, aColumn) {}, - getCellValue: function(aRow, aColumn) {}, - cycleHeader: function(column) {}, - getRowProperties: function(row) { return ""; }, - getColumnProperties: function(column) { return ""; }, - getCellProperties: function(row, column) { + isSeparator(aIndex) { return false; }, + isSorted() { return false; }, + isContainer(aIndex) { return false; }, + setTree(aTree) {}, + getImageSrc(aRow, aColumn) {}, + getProgressMode(aRow, aColumn) {}, + getCellValue(aRow, aColumn) {}, + cycleHeader(column) {}, + getRowProperties(row) { return ""; }, + getColumnProperties(column) { return ""; }, + getCellProperties(row, column) { if (column.element.getAttribute("id") == "siteCol") return "ltr"; @@ -59,7 +59,7 @@ var gPermissionManager = { } }, - _getCapabilityString: function(aCapability) + _getCapabilityString(aCapability) { var stringKey = null; switch (aCapability) { @@ -79,7 +79,7 @@ var gPermissionManager = { return this._bundle.getString(stringKey); }, - addPermission: function(aCapability) + addPermission(aCapability) { var textbox = document.getElementById("url"); var input_url = textbox.value.replace(/^\s*/, ""); // trim any leading space @@ -127,7 +127,7 @@ var gPermissionManager = { } } - let permissionParams = {principal: principal, type: this._type, capability: aCapability}; + let permissionParams = {principal, type: this._type, capability: aCapability}; if (!permissionExists) { this._permissionsToAdd.set(principal.origin, permissionParams); this._addPermission(permissionParams); @@ -147,7 +147,7 @@ var gPermissionManager = { document.getElementById("removeAllPermissions").disabled = this._permissions.length == 0; }, - _removePermission: function(aPermission) + _removePermission(aPermission) { this._removePermissionFromList(aPermission.principal); @@ -162,7 +162,7 @@ var gPermissionManager = { }, - _handleCapabilityChange: function() + _handleCapabilityChange() { // Re-do the sort, if the status changed from Block to Allow // or vice versa, since if we're sorted on status, we may no @@ -173,7 +173,7 @@ var gPermissionManager = { this._tree.treeBoxObject.invalidate(); }, - _addPermission: function(aPermission) + _addPermission(aPermission) { this._addPermissionToList(aPermission); ++this._view._rowCount; @@ -182,7 +182,7 @@ var gPermissionManager = { this._resortPermissions(); }, - _resortPermissions: function() + _resortPermissions() { gTreeUtils.sort(this._tree, this._view, this._permissions, this._lastPermissionSortColumn, @@ -191,33 +191,33 @@ var gPermissionManager = { !this._lastPermissionSortAscending); // keep sort direction }, - onHostInput: function(aSiteField) + onHostInput(aSiteField) { document.getElementById("btnSession").disabled = !aSiteField.value; document.getElementById("btnBlock").disabled = !aSiteField.value; document.getElementById("btnAllow").disabled = !aSiteField.value; }, - onWindowKeyPress: function(aEvent) + onWindowKeyPress(aEvent) { if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE) window.close(); }, - onHostKeyPress: function(aEvent) + onHostKeyPress(aEvent) { if (aEvent.keyCode == KeyEvent.DOM_VK_RETURN) document.getElementById("btnAllow").click(); }, - onLoad: function() + onLoad() { this._bundle = document.getElementById("bundlePreferences"); var params = window.arguments[0]; this.init(params); }, - init: function(aParams) + init(aParams) { if (this._type) { // reusing an open dialog, clear the old observer @@ -275,7 +275,7 @@ var gPermissionManager = { urlField.focus(); }, - uninit: function() + uninit() { if (!this._observerRemoved) { Services.obs.removeObserver(this, "perm-changed"); @@ -284,7 +284,7 @@ var gPermissionManager = { } }, - observe: function(aSubject, aTopic, aData) + observe(aSubject, aTopic, aData) { if (aTopic == "perm-changed") { var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission); @@ -311,7 +311,7 @@ var gPermissionManager = { } }, - onPermissionSelected: function() + onPermissionSelected() { var hasSelection = this._tree.view.selection.count > 0; var hasRows = this._tree.view.rowCount > 0; @@ -319,7 +319,7 @@ var gPermissionManager = { document.getElementById("removeAllPermissions").disabled = !hasRows; }, - onPermissionDeleted: function() + onPermissionDeleted() { if (!this._view.rowCount) return; @@ -333,7 +333,7 @@ var gPermissionManager = { document.getElementById("removeAllPermissions").disabled = !this._permissions.length; }, - onAllPermissionsDeleted: function() + onAllPermissionsDeleted() { if (!this._view.rowCount) return; @@ -347,7 +347,7 @@ var gPermissionManager = { document.getElementById("removeAllPermissions").disabled = true; }, - onPermissionKeyPress: function(aEvent) + onPermissionKeyPress(aEvent) { if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) { this.onPermissionDeleted(); @@ -359,13 +359,13 @@ var gPermissionManager = { _lastPermissionSortColumn: "", _lastPermissionSortAscending: false, - _permissionsComparator : function(a, b) + _permissionsComparator(a, b) { return a.toLowerCase().localeCompare(b.toLowerCase()); }, - onPermissionSort: function(aColumn) + onPermissionSort(aColumn) { this._lastPermissionSortAscending = gTreeUtils.sort(this._tree, this._view, @@ -377,7 +377,7 @@ var gPermissionManager = { this._lastPermissionSortColumn = aColumn; }, - onApplyChanges: function() + onApplyChanges() { // Stop observing permission changes since we are about // to write out the pending adds/deletes and don't need @@ -395,7 +395,7 @@ var gPermissionManager = { window.close(); }, - _loadPermissions: function() + _loadPermissions() { this._tree = document.getElementById("permissionsTree"); this._permissions = []; @@ -417,7 +417,7 @@ var gPermissionManager = { document.getElementById("removeAllPermissions").disabled = this._permissions.length == 0; }, - _addPermissionToList: function(aPermission) + _addPermissionToList(aPermission) { if (aPermission.type == this._type && (!this._manageCapability || @@ -432,7 +432,7 @@ var gPermissionManager = { } }, - _removePermissionFromList: function(aPrincipal) + _removePermissionFromList(aPrincipal) { for (let i = 0; i < this._permissions.length; ++i) { if (this._permissions[i].principal.equals(aPrincipal)) { @@ -445,7 +445,7 @@ var gPermissionManager = { } }, - setOrigin: function(aOrigin) + setOrigin(aOrigin) { document.getElementById("url").value = aOrigin; } diff --git a/browser/components/preferences/sanitize.js b/browser/components/preferences/sanitize.js index a9beea163d92..cf764086db98 100644 --- a/browser/components/preferences/sanitize.js +++ b/browser/components/preferences/sanitize.js @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var gSanitizeDialog = Object.freeze({ - init: function() { + init() { let customWidthElements = document.getElementsByAttribute("dialogWidth", "*"); let isInSubdialog = document.documentElement.hasAttribute("subdialog"); for (let element of customWidthElements) { @@ -13,7 +13,7 @@ var gSanitizeDialog = Object.freeze({ this.onClearHistoryChanged(); }, - onClearHistoryChanged: function() { + onClearHistoryChanged() { let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads"); let historyPref = document.getElementById("privacy.clearOnShutdown.history"); downloadsPref.value = historyPref.value; diff --git a/browser/components/preferences/translation.js b/browser/components/preferences/translation.js index 0c7d86ff3165..82dd0e7bfedf 100644 --- a/browser/components/preferences/translation.js +++ b/browser/components/preferences/translation.js @@ -33,7 +33,7 @@ Tree.prototype = { get hasSelection() { return this.selection.count > 0; }, - getSelectedItems: function() { + getSelectedItems() { let result = []; let rc = this.selection.getRangeCount(); @@ -51,30 +51,30 @@ Tree.prototype = { get rowCount() { return this._data.length; }, - getCellText: function(aRow, aColumn) { + getCellText(aRow, aColumn) { return this._data[aRow]; }, - isSeparator: function(aIndex) { + isSeparator(aIndex) { return false; }, - isSorted: function() { + isSorted() { return false; }, - isContainer: function(aIndex) { + isContainer(aIndex) { return false; }, - setTree: function(aTree) {}, - getImageSrc: function(aRow, aColumn) {}, - getProgressMode: function(aRow, aColumn) {}, - getCellValue: function(aRow, aColumn) {}, - cycleHeader: function(column) {}, - getRowProperties: function(row) { + setTree(aTree) {}, + getImageSrc(aRow, aColumn) {}, + getProgressMode(aRow, aColumn) {}, + getCellValue(aRow, aColumn) {}, + cycleHeader(column) {}, + getRowProperties(row) { return ""; }, - getColumnProperties: function(column) { + getColumnProperties(column) { return ""; }, - getCellProperties: function(row, column) { + getCellProperties(row, column) { return ""; }, QueryInterface: XPCOMUtils.generateQI([Ci.nsITreeView]) @@ -87,13 +87,13 @@ function Lang(aCode) } Lang.prototype = { - toString: function() { + toString() { return this._label; } } var gTranslationExceptions = { - onLoad: function() { + onLoad() { if (this._siteTree) { // Re-using an open dialog, clear the old observers. this.uninit(); @@ -123,7 +123,7 @@ var gTranslationExceptions = { }, // Get the list of languages we don't translate as an array. - getLanguageExceptions: function() { + getLanguageExceptions() { let langs = Services.prefs.getCharPref(kLanguagesPref); if (!langs) return []; @@ -134,7 +134,7 @@ var gTranslationExceptions = { return result; }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (aTopic == "perm-changed") { if (aData == "cleared") { if (!this._sites.length) @@ -180,22 +180,22 @@ var gTranslationExceptions = { } }, - _handleButtonDisabling: function(aTree, aIdPart) { + _handleButtonDisabling(aTree, aIdPart) { let empty = aTree.isEmpty; document.getElementById("removeAll" + aIdPart + "s").disabled = empty; document.getElementById("remove" + aIdPart).disabled = empty || !aTree.hasSelection; }, - onLanguageSelected: function() { + onLanguageSelected() { this._handleButtonDisabling(this._langTree, "Language"); }, - onSiteSelected: function() { + onSiteSelected() { this._handleButtonDisabling(this._siteTree, "Site"); }, - onLanguageDeleted: function() { + onLanguageDeleted() { let langs = Services.prefs.getCharPref(kLanguagesPref); if (!langs) return; @@ -206,11 +206,11 @@ var gTranslationExceptions = { Services.prefs.setCharPref(kLanguagesPref, langs.join(",")); }, - onAllLanguagesDeleted: function() { + onAllLanguagesDeleted() { Services.prefs.setCharPref(kLanguagesPref, ""); }, - onSiteDeleted: function() { + onSiteDeleted() { let removedSites = this._siteTree.getSelectedItems(); for (let origin of removedSites) { let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(origin); @@ -218,7 +218,7 @@ var gTranslationExceptions = { } }, - onAllSitesDeleted: function() { + onAllSitesDeleted() { if (this._siteTree.isEmpty) return; @@ -233,22 +233,22 @@ var gTranslationExceptions = { this.onSiteSelected(); }, - onSiteKeyPress: function(aEvent) { + onSiteKeyPress(aEvent) { if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) this.onSiteDeleted(); }, - onLanguageKeyPress: function(aEvent) { + onLanguageKeyPress(aEvent) { if (aEvent.keyCode == KeyEvent.DOM_VK_DELETE) this.onLanguageDeleted(); }, - onWindowKeyPress: function(aEvent) { + onWindowKeyPress(aEvent) { if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE) window.close(); }, - uninit: function() { + uninit() { Services.obs.removeObserver(this, "perm-changed"); Services.prefs.removeObserver(kLanguagesPref, this); } diff --git a/browser/components/search/content/search.xml b/browser/components/search/content/search.xml index 9799adf65797..23f310e9c5b5 100644 --- a/browser/components/search/content/search.xml +++ b/browser/components/search/content/search.xml @@ -426,7 +426,7 @@ { op : "bump", fieldname : textBox.getAttribute("autocompletesearchparam"), value : aData }, - { handleError : function(aError) { + { handleError(aError) { Components.utils.reportError("Saving search to form history failed: " + aError.message); }}); } @@ -499,7 +499,7 @@ { this._rebuild(); }, - onError: function(errorCode) { + onError(errorCode) { if (errorCode != Ci.nsISearchInstallCallback.ERROR_DUPLICATE_ENGINE) { // Download error is shown by the search service return; diff --git a/browser/components/search/test/browser_426329.js b/browser/components/search/test/browser_426329.js index d9cbd3f7a9b9..259705b4c26a 100644 --- a/browser/components/search/test/browser_426329.js +++ b/browser/components/search/test/browser_426329.js @@ -47,11 +47,11 @@ function getMenuEntries() { function countEntries(name, value) { return new Promise(resolve => { let count = 0; - let obj = name && value ? {fieldname: name, value: value} : {}; + let obj = name && value ? {fieldname: name, value} : {}; FormHistory.count(obj, - { handleResult: function(result) { count = result; }, - handleError: function(error) { throw error; }, - handleCompletion: function(reason) { + { handleResult(result) { count = result; }, + handleError(error) { throw error; }, + handleCompletion(reason) { if (!reason) { resolve(count); } diff --git a/browser/components/search/test/browser_aboutSearchReset.js b/browser/components/search/test/browser_aboutSearchReset.js index 75b591077695..6001c274af37 100644 --- a/browser/components/search/test/browser_aboutSearchReset.js +++ b/browser/components/search/test/browser_aboutSearchReset.js @@ -49,7 +49,7 @@ var gTests = [ { desc: "Test the 'Keep Current Settings' button.", - run: function* () { + *run() { let engine = yield promiseNewEngine(kTestEngine, {setAsCurrent: true}); let expectedURL = engine. @@ -75,7 +75,7 @@ var gTests = [ { desc: "Test the 'Restore Search Defaults' button.", - run: function* () { + *run() { let currentEngine = Services.search.currentEngine; let originalEngine = Services.search.originalDefaultEngine; let doc = gBrowser.contentDocument; @@ -103,7 +103,7 @@ var gTests = [ { desc: "Click the settings link.", - run: function* () { + *run() { let loadPromise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, "about:preferences#search") @@ -116,7 +116,7 @@ var gTests = [ { desc: "Load another page without clicking any of the buttons.", - run: function* () { + *run() { yield promiseTabLoadEvent(gBrowser.selectedTab, "about:mozilla"); checkTelemetryRecords(TELEMETRY_RESULT_ENUM.CLOSED_PAGE); diff --git a/browser/components/search/test/browser_abouthome_behavior.js b/browser/components/search/test/browser_abouthome_behavior.js index e7d062e65e46..5a19ffc6c1eb 100644 --- a/browser/components/search/test/browser_abouthome_behavior.js +++ b/browser/components/search/test/browser_abouthome_behavior.js @@ -64,28 +64,28 @@ function test() { { name: "Search with Bing from about:home", searchURL: replaceUrl("http://www.bing.com/search?q=foo&pc=MOZI&form=MOZSPG"), - run: function() { + run() { verify_about_home_search("Bing"); } }, { name: "Search with Yahoo from about:home", searchURL: replaceUrl("https://search.yahoo.com/search?p=foo&ei=UTF-8&fr=moz35"), - run: function() { + run() { verify_about_home_search("Yahoo"); } }, { name: "Search with Google from about:home", searchURL: replaceUrl("https://www.google.com/search?q=foo&ie=utf-8&oe=utf-8"), - run: function() { + run() { verify_about_home_search("Google"); } }, { name: "Search with Amazon.com from about:home", searchURL: replaceUrl("https://www.amazon.com/exec/obidos/external-search/?field-keywords=foo&mode=blended&tag=mozilla-20&sourceid=Mozilla-search"), - run: function() { + run() { verify_about_home_search("Amazon.com"); } } diff --git a/browser/components/search/test/browser_addEngine.js b/browser/components/search/test/browser_addEngine.js index 512b2dd558ab..798c4e9f7294 100644 --- a/browser/components/search/test/browser_addEngine.js +++ b/browser/components/search/test/browser_addEngine.js @@ -46,14 +46,14 @@ var gTests = [ description: "Foo Search", searchForm: "http://mochi.test:8888/browser/browser/components/search/test/" }, - run: function() { + run() { Services.obs.addObserver(observer, "browser-search-engine-modified", false); gSS.addEngine("http://mochi.test:8888/browser/browser/components/search/test/testEngine.xml", null, "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABGklEQVQoz2NgGB6AnZ1dUlJSXl4eSDIyMhLW4Ovr%2B%2Fr168uXL69Zs4YoG%2BLi4i5dusTExMTGxsbNzd3f37937976%2BnpmZmagbHR09J49e5YvX66kpATVEBYW9ubNm2nTphkbG7e2tp44cQLIuHfvXm5urpaWFlDKysqqu7v73LlzECMYIiIiHj58mJCQoKKicvXq1bS0NKBgW1vbjh074uPjgeqAXE1NzSdPnvDz84M0AEUvXLgAsW379u1z5swBen3jxo2zZ892cHB4%2BvQp0KlAfwI1cHJyghQFBwfv2rULokFXV%2FfixYu7d%2B8GGqGgoMDKyrpu3br9%2B%2FcDuXl5eVA%2FAEWBfoWHAdAYoNuAYQ0XAeoUERFhGDYAAPoUaT2dfWJuAAAAAElFTkSuQmCC", false); }, - added: function(engine) { + added(engine) { ok(engine, "engine was added."); checkEngine(this.engine, engine); @@ -66,14 +66,14 @@ var gTests = [ gSS.currentEngine = engine; }, - current: function(engine) { + current(engine) { let currentEngine = gSS.currentEngine; is(engine, currentEngine, "engine is current"); is(engine.name, this.engine.name, "current engine was changed successfully"); gSS.removeEngine(engine); }, - removed: function(engine) { + removed(engine) { // Remove the observer before calling the currentEngine getter, // as that getter will set the currentEngine to the original default // which will trigger a notification causing the test to loop over all diff --git a/browser/components/search/test/browser_amazon_behavior.js b/browser/components/search/test/browser_amazon_behavior.js index 55695e11e862..d695939c6375 100644 --- a/browser/components/search/test/browser_amazon_behavior.js +++ b/browser/components/search/test/browser_amazon_behavior.js @@ -32,7 +32,7 @@ function test() { { name: "context menu search", searchURL: base, - run: function() { + run() { // Simulate a contextmenu search // FIXME: This is a bit "low-level"... BrowserSearch.loadSearch("foo", false, "contextmenu"); @@ -41,7 +41,7 @@ function test() { { name: "keyword search", searchURL: base, - run: function() { + run() { gURLBar.value = "? foo"; gURLBar.focus(); EventUtils.synthesizeKey("VK_RETURN", {}); @@ -50,7 +50,7 @@ function test() { { name: "keyword search", searchURL: base, - run: function() { + run() { gURLBar.value = "a foo"; gURLBar.focus(); EventUtils.synthesizeKey("VK_RETURN", {}); @@ -59,7 +59,7 @@ function test() { { name: "search bar search", searchURL: base, - run: function() { + run() { let sb = BrowserSearch.searchBar; sb.focus(); sb.value = "foo"; @@ -72,7 +72,7 @@ function test() { { name: "new tab search", searchURL: base, - run: function() { + run() { function doSearch(doc) { // Re-add the listener, and perform a search gBrowser.addProgressListener(listener); diff --git a/browser/components/search/test/browser_bing_behavior.js b/browser/components/search/test/browser_bing_behavior.js index 5087bd182004..7011fe41dc59 100644 --- a/browser/components/search/test/browser_bing_behavior.js +++ b/browser/components/search/test/browser_bing_behavior.js @@ -32,7 +32,7 @@ function test() { { name: "context menu search", searchURL: base + "&form=MOZCON", - run: function() { + run() { // Simulate a contextmenu search // FIXME: This is a bit "low-level"... BrowserSearch.loadSearch("foo", false, "contextmenu"); @@ -41,7 +41,7 @@ function test() { { name: "keyword search", searchURL: base + "&form=MOZLBR", - run: function() { + run() { gURLBar.value = "? foo"; gURLBar.focus(); EventUtils.synthesizeKey("VK_RETURN", {}); @@ -50,7 +50,7 @@ function test() { { name: "keyword search with alias", searchURL: base + "&form=MOZLBR", - run: function() { + run() { gURLBar.value = "b foo"; gURLBar.focus(); EventUtils.synthesizeKey("VK_RETURN", {}); @@ -59,7 +59,7 @@ function test() { { name: "search bar search", searchURL: base + "&form=MOZSBR", - run: function() { + run() { let sb = BrowserSearch.searchBar; sb.focus(); sb.value = "foo"; @@ -72,7 +72,7 @@ function test() { { name: "new tab search", searchURL: base + "&form=MOZTSB", - run: function() { + run() { function doSearch(doc) { // Re-add the listener, and perform a search gBrowser.addProgressListener(listener); diff --git a/browser/components/search/test/browser_google_behavior.js b/browser/components/search/test/browser_google_behavior.js index 1f31b35d9d93..f75c86a830de 100644 --- a/browser/components/search/test/browser_google_behavior.js +++ b/browser/components/search/test/browser_google_behavior.js @@ -30,7 +30,7 @@ function test() { { name: "context menu search", searchURL: base, - run: function() { + run() { // Simulate a contextmenu search // FIXME: This is a bit "low-level"... BrowserSearch.loadSearch("foo", false, "contextmenu"); @@ -39,7 +39,7 @@ function test() { { name: "keyword search", searchURL: base, - run: function() { + run() { gURLBar.value = "? foo"; gURLBar.focus(); EventUtils.synthesizeKey("VK_RETURN", {}); @@ -48,7 +48,7 @@ function test() { { name: "keyword search", searchURL: base, - run: function() { + run() { gURLBar.value = "g foo"; gURLBar.focus(); EventUtils.synthesizeKey("VK_RETURN", {}); @@ -57,7 +57,7 @@ function test() { { name: "search bar search", searchURL: base, - run: function() { + run() { let sb = BrowserSearch.searchBar; sb.focus(); sb.value = "foo"; @@ -70,7 +70,7 @@ function test() { { name: "new tab search", searchURL: base, - run: function() { + run() { function doSearch(doc) { // Re-add the listener, and perform a search gBrowser.addProgressListener(listener); diff --git a/browser/components/search/test/browser_hiddenOneOffs_cleanup.js b/browser/components/search/test/browser_hiddenOneOffs_cleanup.js index 7bbcd523dbb3..34c7eca17656 100644 --- a/browser/components/search/test/browser_hiddenOneOffs_cleanup.js +++ b/browser/components/search/test/browser_hiddenOneOffs_cleanup.js @@ -7,14 +7,14 @@ function promiseNewEngine(basename) { return new Promise((resolve, reject) => { info("Waiting for engine to be added: " + basename); Services.search.init({ - onInitComplete: function() { + onInitComplete() { let url = getRootDirectory(gTestPath) + basename; Services.search.addEngine(url, null, "", false, { - onSuccess: function(engine) { + onSuccess(engine) { info("Search engine added: " + basename); resolve(engine); }, - onError: function(errCode) { + onError(errCode) { ok(false, "addEngine failed with error code " + errCode); reject(); } diff --git a/browser/components/search/test/browser_searchbar_keyboard_navigation.js b/browser/components/search/test/browser_searchbar_keyboard_navigation.js index 26b8939c7d07..7e0602cf034f 100644 --- a/browser/components/search/test/browser_searchbar_keyboard_navigation.js +++ b/browser/components/search/test/browser_searchbar_keyboard_navigation.js @@ -37,16 +37,16 @@ add_task(function* init() { info("adding search history values: " + kValues); let addOps = kValues.map(value => { return {op: "add", fieldname: "searchbar-history", - value: value} + value} }); searchbar.FormHistory.update(addOps, { - handleCompletion: function() { + handleCompletion() { registerCleanupFunction(() => { info("removing search history values: " + kValues); let removeOps = kValues.map(value => { return {op: "remove", fieldname: "searchbar-history", - value: value} + value} }); searchbar.FormHistory.update(removeOps); }); diff --git a/browser/components/search/test/browser_searchbar_openpopup.js b/browser/components/search/test/browser_searchbar_openpopup.js index df2a45e539c4..939ac9941894 100644 --- a/browser/components/search/test/browser_searchbar_openpopup.js +++ b/browser/components/search/test/browser_searchbar_openpopup.js @@ -58,16 +58,16 @@ add_task(function* init() { info("adding search history values: " + kValues); let addOps = kValues.map(value => { return {op: "add", fieldname: "searchbar-history", - value: value} + value} }); searchbar.FormHistory.update(addOps, { - handleCompletion: function() { + handleCompletion() { registerCleanupFunction(() => { info("removing search history values: " + kValues); let removeOps = kValues.map(value => { return {op: "remove", fieldname: "searchbar-history", - value: value} + value} }); searchbar.FormHistory.update(removeOps); }); diff --git a/browser/components/search/test/browser_searchbar_smallpanel_keyboard_navigation.js b/browser/components/search/test/browser_searchbar_smallpanel_keyboard_navigation.js index e5e613971617..9ad747f76812 100644 --- a/browser/components/search/test/browser_searchbar_smallpanel_keyboard_navigation.js +++ b/browser/components/search/test/browser_searchbar_smallpanel_keyboard_navigation.js @@ -38,16 +38,16 @@ add_task(function* init() { info("adding search history values: " + kValues); let addOps = kValues.map(value => { return {op: "add", fieldname: "searchbar-history", - value: value} + value} }); searchbar.FormHistory.update(addOps, { - handleCompletion: function() { + handleCompletion() { registerCleanupFunction(() => { info("removing search history values: " + kValues); let removeOps = kValues.map(value => { return {op: "remove", fieldname: "searchbar-history", - value: value} + value} }); searchbar.FormHistory.update(removeOps); }); diff --git a/browser/components/search/test/browser_webapi.js b/browser/components/search/test/browser_webapi.js index d8161ffbe528..4016484c31f9 100644 --- a/browser/components/search/test/browser_webapi.js +++ b/browser/components/search/test/browser_webapi.js @@ -14,7 +14,7 @@ function AddSearchProvider(...args) { function promiseDialogOpened() { return new Promise((resolve, reject) => { Services.wm.addListener({ - onOpenWindow: function(xulWin) { + onOpenWindow(xulWin) { Services.wm.removeListener(this); let win = xulWin.QueryInterface(Ci.nsIInterfaceRequestor) diff --git a/browser/components/search/test/browser_yahoo_behavior.js b/browser/components/search/test/browser_yahoo_behavior.js index 5f182971f7f3..ec4d85d3adc4 100644 --- a/browser/components/search/test/browser_yahoo_behavior.js +++ b/browser/components/search/test/browser_yahoo_behavior.js @@ -32,7 +32,7 @@ function test() { { name: "context menu search", searchURL: base + "&hsimp=yhs-005", - run: function() { + run() { // Simulate a contextmenu search // FIXME: This is a bit "low-level"... BrowserSearch.loadSearch("foo", false, "contextmenu"); @@ -41,7 +41,7 @@ function test() { { name: "keyword search", searchURL: base + "&hsimp=yhs-002", - run: function() { + run() { gURLBar.value = "? foo"; gURLBar.focus(); EventUtils.synthesizeKey("VK_RETURN", {}); @@ -50,7 +50,7 @@ function test() { { name: "keyword search with alias", searchURL: base + "&hsimp=yhs-002", - run: function() { + run() { gURLBar.value = "y foo"; gURLBar.focus(); EventUtils.synthesizeKey("VK_RETURN", {}); @@ -59,7 +59,7 @@ function test() { { name: "search bar search", searchURL: base + "&hsimp=yhs-001", - run: function() { + run() { let sb = BrowserSearch.searchBar; sb.focus(); sb.value = "foo"; @@ -72,7 +72,7 @@ function test() { { name: "new tab search", searchURL: base + "&hsimp=yhs-004", - run: function() { + run() { function doSearch(doc) { // Re-add the listener, and perform a search gBrowser.addProgressListener(listener); diff --git a/browser/components/search/test/head.js b/browser/components/search/test/head.js index 5fb4fe02cf02..318dd54c7897 100644 --- a/browser/components/search/test/head.js +++ b/browser/components/search/test/head.js @@ -58,11 +58,11 @@ function promiseNewEngine(basename, options = {}) { options.setAsCurrent == undefined ? true : options.setAsCurrent; info("Waiting for engine to be added: " + basename); Services.search.init({ - onInitComplete: function() { + onInitComplete() { let url = getRootDirectory(gTestPath) + basename; let current = Services.search.currentEngine; Services.search.addEngine(url, null, options.iconURL || "", false, { - onSuccess: function(engine) { + onSuccess(engine) { info("Search engine added: " + basename); if (setAsCurrent) { Services.search.currentEngine = engine; @@ -76,7 +76,7 @@ function promiseNewEngine(basename, options = {}) { }); resolve(engine); }, - onError: function(errCode) { + onError(errCode) { ok(false, "addEngine failed with error code " + errCode); reject(); } diff --git a/browser/components/selfsupport/SelfSupportService.js b/browser/components/selfsupport/SelfSupportService.js index bdde07a2f43f..38904cdfd395 100644 --- a/browser/components/selfsupport/SelfSupportService.js +++ b/browser/components/selfsupport/SelfSupportService.js @@ -30,7 +30,7 @@ MozSelfSupportInterface.prototype = { _window: null, - init: function(window) { + init(window) { this._window = window; }, @@ -42,34 +42,34 @@ MozSelfSupportInterface.prototype = { Preferences.set(PREF_FHR_UPLOAD_ENABLED, enabled); }, - resetPref: function(name) { + resetPref(name) { Services.prefs.clearUserPref(name); }, - resetSearchEngines: function() { + resetSearchEngines() { Services.search.restoreDefaultEngines(); Services.search.resetToOriginalDefaultEngine(); }, - getTelemetryPingList: function() { + getTelemetryPingList() { return this._wrapPromise(TelemetryArchive.promiseArchivedPingList()); }, - getTelemetryPing: function(pingId) { + getTelemetryPing(pingId) { return this._wrapPromise(TelemetryArchive.promiseArchivedPingById(pingId)); }, - getCurrentTelemetryEnvironment: function() { + getCurrentTelemetryEnvironment() { const current = TelemetryEnvironment.currentEnvironment; return new this._window.Promise(resolve => resolve(current)); }, - getCurrentTelemetrySubsessionPing: function() { + getCurrentTelemetrySubsessionPing() { const current = TelemetryController.getCurrentPingData(true); return new this._window.Promise(resolve => resolve(current)); }, - _wrapPromise: function(promise) { + _wrapPromise(promise) { return new this._window.Promise( (resolve, reject) => promise.then(resolve, reject)); }, diff --git a/browser/components/shell/content/setDesktopBackground.js b/browser/components/shell/content/setDesktopBackground.js index 094c34aa56da..e23cd912e68b 100644 --- a/browser/components/shell/content/setDesktopBackground.js +++ b/browser/components/shell/content/setDesktopBackground.js @@ -20,7 +20,7 @@ var gSetBackground = { .getService(Ci.nsIShellService); }, - load: function() + load() { this._canvas = document.getElementById("screen"); this._screenWidth = screen.width; @@ -49,7 +49,7 @@ var gSetBackground = { }, 0, this); }, - init: function(aImage) + init(aImage) { this._image = aImage; @@ -76,7 +76,7 @@ var gSetBackground = { this.updatePosition(); }, - setDesktopBackground: function() + setDesktopBackground() { if (AppConstants.platform != "macosx") { document.persist("menuPosition", "value"); @@ -95,7 +95,7 @@ var gSetBackground = { Ci.nsIShellService["BACKGROUND_" + this._position]); }, - updatePosition: function() + updatePosition() { var ctx = this._canvas.getContext("2d"); ctx.clearRect(0, 0, this._screenWidth, this._screenHeight); diff --git a/browser/components/syncedtabs/SyncedTabsDeckComponent.js b/browser/components/syncedtabs/SyncedTabsDeckComponent.js index dfbec056ca0b..bdad78e43e32 100644 --- a/browser/components/syncedtabs/SyncedTabsDeckComponent.js +++ b/browser/components/syncedtabs/SyncedTabsDeckComponent.js @@ -49,7 +49,7 @@ function SyncedTabsDeckComponent({ window: this._window, store: this._syncedTabsListStore, View: TabListView, - SyncedTabs: SyncedTabs, + SyncedTabs, clipboardHelper: Cc["@mozilla.org/widget/clipboardhelper;1"] .getService(Ci.nsIClipboardHelper), getChromeWindow: this._getChromeWindow, diff --git a/browser/components/syncedtabs/SyncedTabsDeckStore.js b/browser/components/syncedtabs/SyncedTabsDeckStore.js index ede6914c8302..eef594a51956 100644 --- a/browser/components/syncedtabs/SyncedTabsDeckStore.js +++ b/browser/components/syncedtabs/SyncedTabsDeckStore.js @@ -31,7 +31,7 @@ Object.assign(SyncedTabsDeckStore.prototype, EventEmitter.prototype, { let panels = this._panels.map(panel => { return {id: panel, selected: panel === this._selectedPanel}; }); - this.emit("change", {panels, isUpdatable: isUpdatable}); + this.emit("change", {panels, isUpdatable}); }, /** diff --git a/browser/components/syncedtabs/test/xpcshell/head.js b/browser/components/syncedtabs/test/xpcshell/head.js index af0458ea6e8b..17590109b6b4 100644 --- a/browser/components/syncedtabs/test/xpcshell/head.js +++ b/browser/components/syncedtabs/test/xpcshell/head.js @@ -15,9 +15,9 @@ do_get_profile(); // fxa needs a profile directory for storage. let window = { document: {}, location: {}, - setTimeout: setTimeout, - setInterval: setInterval, - clearTimeout: clearTimeout, + setTimeout, + setInterval, + clearTimeout, clearinterval: clearInterval }; let self = window; diff --git a/browser/components/tests/browser/browser_bug538331.js b/browser/components/tests/browser/browser_bug538331.js index fc1003413b50..1665163633fc 100644 --- a/browser/components/tests/browser/browser_bug538331.js +++ b/browser/components/tests/browser/browser_bug538331.js @@ -135,11 +135,11 @@ function test() var gWindowCatcher = { windowsOpen: 0, finishCalled: false, - start: function() { + start() { Services.ww.registerNotification(this); }, - finish: function(aFunc) { + finish(aFunc) { Services.ww.unregisterNotification(this); this.finishFunc = aFunc; if (this.windowsOpen > 0) @@ -148,7 +148,7 @@ var gWindowCatcher = { this.finishFunc(); }, - closeWindow: function(win) { + closeWindow(win) { info("window catcher closing window: " + win.document.documentURI); win.close(); this.windowsOpen--; @@ -157,11 +157,11 @@ var gWindowCatcher = { } }, - windowLoad: function(win) { + windowLoad(win) { executeSoon(this.closeWindow.bind(this, win)); }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { if (topic != "domwindowopened") return; diff --git a/browser/components/tests/unit/test_distribution.js b/browser/components/tests/unit/test_distribution.js index 86f4c40665cd..83255a083356 100644 --- a/browser/components/tests/unit/test_distribution.js +++ b/browser/components/tests/unit/test_distribution.js @@ -46,7 +46,7 @@ function installDistributionEngine() { do_get_file("data/engine-de-DE.xml").copyTo(localeDir, "engine-de-DE.xml"); Services.dirsvc.registerProvider({ - getFile: function(aProp, aPersistent) { + getFile(aProp, aPersistent) { aPersistent.value = true; if (aProp == XRE_APP_DISTRIBUTION_DIR) return distDir.clone(); diff --git a/browser/components/translation/BingTranslator.jsm b/browser/components/translation/BingTranslator.jsm index fc1cc942a14a..cdaec46ff9ef 100644 --- a/browser/components/translation/BingTranslator.jsm +++ b/browser/components/translation/BingTranslator.jsm @@ -58,7 +58,7 @@ this.BingTranslator.prototype = { * @returns {Promise} A promise that will resolve when the translation * task is finished. */ - translate: function() { + translate() { return Task.spawn(function *() { let currentIndex = 0; this._onFinishedDeferred = Promise.defer(); @@ -98,7 +98,7 @@ this.BingTranslator.prototype = { * Resets the expiration time of the current token, in order to * force the token manager to ask for a new token during the next request. */ - _resetToken : function() { + _resetToken() { // Force the token manager to get update token BingTokenManager._currentExpiryTime = 0; }, @@ -111,7 +111,7 @@ this.BingTranslator.prototype = { * * @param request The BingRequest sent to the server. */ - _chunkCompleted: function(bingRequest) { + _chunkCompleted(bingRequest) { if (this._parseChunkResult(bingRequest)) { this._partialSuccess = true; // Count the number of characters successfully translated. @@ -131,7 +131,7 @@ this.BingTranslator.prototype = { * * @param aError [optional] The XHR object of the request that failed. */ - _chunkFailed: function(aError) { + _chunkFailed(aError) { if (aError instanceof Ci.nsIXMLHttpRequest && [400, 401].indexOf(aError.status) != -1) { let body = aError.responseText; @@ -148,7 +148,7 @@ this.BingTranslator.prototype = { * This function handles resolving the promise * returned by the public `translate()` method when all chunks are completed. */ - _checkIfFinished: function() { + _checkIfFinished() { // Check if all pending requests have been // completed and then resolves the promise. // If at least one chunk was successful, the @@ -177,7 +177,7 @@ this.BingTranslator.prototype = { * @param request The request sent to the server. * @returns boolean True if parsing of this chunk was successful. */ - _parseChunkResult: function(bingRequest) { + _parseChunkResult(bingRequest) { let results; try { let doc = bingRequest.networkRequest.responseXML; @@ -220,7 +220,7 @@ this.BingTranslator.prototype = { * @param startIndex What is the index, in the roots list, that the * chunk should start. */ - _generateNextTranslationRequest: function(startIndex) { + _generateNextTranslationRequest(startIndex) { let currentDataSize = 0; let currentChunks = 0; let output = []; @@ -285,7 +285,7 @@ BingRequest.prototype = { /** * Initiates the request */ - fireRequest: function() { + fireRequest() { return Task.spawn(function *() { // Prepare authentication. let token = yield BingTokenManager.getToken(); @@ -324,11 +324,11 @@ BingRequest.prototype = { onLoad: (function(responseText, xhr) { deferred.resolve(this); }).bind(this), - onError: function(e, responseText, xhr) { + onError(e, responseText, xhr) { deferred.reject(xhr); }, postData: requestString, - headers: headers + headers }; // Fire the request. @@ -358,7 +358,7 @@ var BingTokenManager = { * can be the same one used in the past if it is still * valid. */ - getToken: function() { + getToken() { if (this._pendingRequest) { return this._pendingRequest; } @@ -378,7 +378,7 @@ var BingTokenManager = { * @returns {Promise} A promise that resolves with the token * string once it is obtained. */ - _getNewToken: function() { + _getNewToken() { let url = getUrlParam("https://datamarket.accesscontrol.windows.net/v2/OAuth2-13", "browser.translation.bing.authURL"); let params = [ @@ -392,7 +392,7 @@ var BingTokenManager = { let deferred = Promise.defer(); let options = { - onLoad: function(responseText, xhr) { + onLoad(responseText, xhr) { BingTokenManager._pendingRequest = null; try { let json = JSON.parse(responseText); @@ -411,7 +411,7 @@ var BingTokenManager = { deferred.reject(e); } }, - onError: function(e, responseText, xhr) { + onError(e, responseText, xhr) { BingTokenManager._pendingRequest = null; deferred.reject(e); }, diff --git a/browser/components/translation/LanguageDetector.jsm b/browser/components/translation/LanguageDetector.jsm index a65d6eda124a..e75f777a1f26 100644 --- a/browser/components/translation/LanguageDetector.jsm +++ b/browser/components/translation/LanguageDetector.jsm @@ -134,7 +134,7 @@ this.LanguageDetector = { * entry with the languge code 'un', indicating the percent of * the text which is unknown. */ - detectLanguage: function(aParams) { + detectLanguage(aParams) { if (typeof aParams == "string") aParams = { text: aParams }; diff --git a/browser/components/translation/Translation.jsm b/browser/components/translation/Translation.jsm index c2591b65ed67..9dc29930f58c 100644 --- a/browser/components/translation/Translation.jsm +++ b/browser/components/translation/Translation.jsm @@ -41,7 +41,7 @@ this.Translation = { return this._defaultTargetLanguage; }, - documentStateReceived: function(aBrowser, aData) { + documentStateReceived(aBrowser, aData) { if (aData.state == this.STATE_OFFER) { if (aData.detectedLanguage == this.defaultTargetLanguage) { // Detected language is the same as the user's locale. @@ -78,7 +78,7 @@ this.Translation = { trUI.showTranslationInfoBar(); }, - openProviderAttribution: function() { + openProviderAttribution() { let attribution = this.supportedEngines[this.translationEngine]; Cu.import("resource:///modules/RecentWindow.jsm"); RecentWindow.getMostRecentBrowserWindow().openUILinkIn(attribution, "tab"); @@ -138,7 +138,7 @@ TranslationUI.prototype = { aBrowser.messageManager.addMessageListener("Translation:Finished", this); this._browser = aBrowser; }, - translate: function(aFrom, aTo) { + translate(aFrom, aTo) { if (aFrom == aTo || (this.state == Translation.STATE_TRANSLATED && this.translatedFrom == aFrom && this.translatedTo == aTo)) { @@ -166,7 +166,7 @@ TranslationUI.prototype = { ); }, - showURLBarIcon: function() { + showURLBarIcon() { let chromeWin = this.browser.ownerGlobal; let PopupNotifications = chromeWin.PopupNotifications; let removeId = this.originalShown ? "translated" : "translate"; @@ -214,14 +214,14 @@ TranslationUI.prototype = { }, originalShown: true, - showOriginalContent: function() { + showOriginalContent() { this.originalShown = true; this.showURLBarIcon(); this.browser.messageManager.sendAsyncMessage("Translation:ShowOriginal"); TranslationTelemetry.recordShowOriginalContent(); }, - showTranslatedContent: function() { + showTranslatedContent() { this.originalShown = false; this.showURLBarIcon(); this.browser.messageManager.sendAsyncMessage("Translation:ShowTranslation"); @@ -231,7 +231,7 @@ TranslationUI.prototype = { return this.browser.ownerGlobal.gBrowser.getNotificationBox(this.browser); }, - showTranslationInfoBar: function() { + showTranslationInfoBar() { let notificationBox = this.notificationBox; let notif = notificationBox.appendNotification("", "translation", null, notificationBox.PRIORITY_INFO_HIGH); @@ -239,7 +239,7 @@ TranslationUI.prototype = { return notif; }, - shouldShowInfoBar: function(aURI) { + shouldShowInfoBar(aURI) { // Never show the infobar automatically while the translation // service is temporarily unavailable. if (Translation.serviceUnavailable) @@ -263,7 +263,7 @@ TranslationUI.prototype = { return true; }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "Translation:Finished": if (msg.data.success) { @@ -284,7 +284,7 @@ TranslationUI.prototype = { } }, - infobarClosed: function() { + infobarClosed() { if (this.state == Translation.STATE_OFFER) TranslationTelemetry.recordDeniedTranslationOffer(); } @@ -298,7 +298,7 @@ TranslationUI.prototype = { */ this.TranslationTelemetry = { - init: function() { + init() { // Constructing histograms. const plain = (id) => Services.telemetry.getHistogramById(id); const keyed = (id) => Services.telemetry.getKeyedHistogramById(id); @@ -326,7 +326,7 @@ this.TranslationTelemetry = { * @param language * The language of the page. */ - recordTranslationOpportunity: function(language) { + recordTranslationOpportunity(language) { return this._recordOpportunity(language, true); }, @@ -337,7 +337,7 @@ this.TranslationTelemetry = { * @param language * The language of the page. */ - recordMissedTranslationOpportunity: function(language) { + recordMissedTranslationOpportunity(language) { return this._recordOpportunity(language, false); }, @@ -351,7 +351,7 @@ this.TranslationTelemetry = { * These translation opportunities should still be recorded in addition to * recording the automatic rejection of the offer. */ - recordAutoRejectedTranslationOffer: function() { + recordAutoRejectedTranslationOffer() { if (!this._canRecord) return; this.HISTOGRAMS.AUTO_REJECTED().add(); }, @@ -365,7 +365,7 @@ this.TranslationTelemetry = { * @param numCharacters * The number of characters that were translated */ - recordTranslation: function(langFrom, langTo, numCharacters) { + recordTranslation(langFrom, langTo, numCharacters) { if (!this._canRecord) return; this.HISTOGRAMS.PAGES().add(); this.HISTOGRAMS.PAGES_BY_LANG().add(langFrom + " -> " + langTo); @@ -384,7 +384,7 @@ this.TranslationTelemetry = { * the user has manually adjusted the detected language false should * be passed. */ - recordDetectedLanguageChange: function(beforeFirstTranslation) { + recordDetectedLanguageChange(beforeFirstTranslation) { if (!this._canRecord) return; this.HISTOGRAMS.DETECTION_CHANGES().add(beforeFirstTranslation); }, @@ -394,7 +394,7 @@ this.TranslationTelemetry = { * only be called when actually executing a translation, not every time the * user changes in the language in the UI. */ - recordTargetLanguageChange: function() { + recordTargetLanguageChange() { if (!this._canRecord) return; this.HISTOGRAMS.TARGET_CHANGES().add(); }, @@ -402,7 +402,7 @@ this.TranslationTelemetry = { /** * Record a denied translation offer. */ - recordDeniedTranslationOffer: function() { + recordDeniedTranslationOffer() { if (!this._canRecord) return; this.HISTOGRAMS.DENIED().add(); }, @@ -410,7 +410,7 @@ this.TranslationTelemetry = { /** * Record a "Show Original" command use. */ - recordShowOriginalContent: function() { + recordShowOriginalContent() { if (!this._canRecord) return; this.HISTOGRAMS.SHOW_ORIGINAL().add(); }, @@ -418,7 +418,7 @@ this.TranslationTelemetry = { /** * Record the state of translation preferences. */ - recordPreferences: function() { + recordPreferences() { if (!this._canRecord) return; if (Services.prefs.getBoolPref(TRANSLATION_PREF_SHOWUI)) { this.HISTOGRAMS.SHOW_UI().add(1); @@ -428,7 +428,7 @@ this.TranslationTelemetry = { } }, - _recordOpportunity: function(language, success) { + _recordOpportunity(language, success) { if (!this._canRecord) return; this.HISTOGRAMS.OPPORTUNITIES().add(success); this.HISTOGRAMS.OPPORTUNITIES_BY_LANG().add(language, success); @@ -438,7 +438,7 @@ this.TranslationTelemetry = { * A shortcut for reading the telemetry preference. * */ - _canRecord: function() { + _canRecord() { return Services.prefs.getBoolPref("toolkit.telemetry.enabled"); } }; diff --git a/browser/components/translation/TranslationContentHandler.jsm b/browser/components/translation/TranslationContentHandler.jsm index 3b0d59dddd40..62376d4aa5ed 100644 --- a/browser/components/translation/TranslationContentHandler.jsm +++ b/browser/components/translation/TranslationContentHandler.jsm @@ -31,7 +31,7 @@ this.TranslationContentHandler = function(global, docShell) { } TranslationContentHandler.prototype = { - handleEvent: function(aEvent) { + handleEvent(aEvent) { // We are only listening to pageshow events. let target = aEvent.target; @@ -61,7 +61,7 @@ TranslationContentHandler.prototype = { }, /* nsIWebProgressListener implementation */ - onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) { if (!aWebProgress.isTopLevel || !(aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) || !this.global.content) @@ -108,15 +108,15 @@ TranslationContentHandler.prototype = { }, // Unused methods. - onProgressChange: function() {}, - onLocationChange: function() {}, - onStatusChange: function() {}, - onSecurityChange: function() {}, + onProgressChange() {}, + onLocationChange() {}, + onStatusChange() {}, + onSecurityChange() {}, QueryInterface: XPCOMUtils.generateQI([Ci.nsIWebProgressListener, Ci.nsISupportsWeakReference]), - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "Translation:TranslateDocument": { diff --git a/browser/components/translation/TranslationDocument.jsm b/browser/components/translation/TranslationDocument.jsm index 058d07a498cf..c754251046bd 100644 --- a/browser/components/translation/TranslationDocument.jsm +++ b/browser/components/translation/TranslationDocument.jsm @@ -42,7 +42,7 @@ this.TranslationDocument.prototype = { * * @param document The document to be translated */ - _init: function(document) { + _init(document) { let window = document.defaultView; let winUtils = window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils); @@ -94,7 +94,7 @@ this.TranslationDocument.prototype = { * * @returns A TranslationItem object. */ - _createItemForNode: function(node, id, isRoot) { + _createItemForNode(node, id, isRoot) { if (this.itemsMap.has(node)) { return this.itemsMap.get(node); } @@ -129,7 +129,7 @@ this.TranslationDocument.prototype = { * * @returns A string representation of the TranslationItem. */ - generateTextForItem: function(item) { + generateTextForItem(item) { if (item.original) { return regenerateTextFromOriginalHelper(item); } @@ -187,7 +187,7 @@ this.TranslationDocument.prototype = { * Changes the document to display its translated * content. */ - showTranslation: function() { + showTranslation() { this.originalShown = false; this._swapDocumentContent("translation"); }, @@ -196,7 +196,7 @@ this.TranslationDocument.prototype = { * Changes the document to display its original * content. */ - showOriginal: function() { + showOriginal() { this.originalShown = true; this._swapDocumentContent("original"); }, @@ -208,7 +208,7 @@ this.TranslationDocument.prototype = { * @param target A string that is either "translation" * or "original". */ - _swapDocumentContent: function(target) { + _swapDocumentContent(target) { Task.spawn(function *() { // Let the event loop breath on every 100 nodes // that are replaced. @@ -274,7 +274,7 @@ TranslationItem.prototype = { isRoot: false, isSimpleRoot: false, - toString: function() { + toString() { let rootType = ""; if (this.isRoot) { if (this.isSimpleRoot) { @@ -305,7 +305,7 @@ TranslationItem.prototype = { * @param result A string with the textual result received from the server, * which can be plain-text or a serialized HTML doc. */ - parseResult: function(result) { + parseResult(result) { if (this.isSimpleRoot) { this.translation = [result]; return; @@ -325,7 +325,7 @@ TranslationItem.prototype = { * @returns A TranslationItem with the given id, or null if * it was not found. */ - getChildById: function(id) { + getChildById(id) { for (let child of this.children) { if (("n" + child.id) == id) { return child; @@ -341,7 +341,7 @@ TranslationItem.prototype = { * @param target A string that is either "translation" * or "original". */ - swapText: function(target) { + swapText(target) { swapTextForItem(this, target); } }; @@ -354,7 +354,7 @@ TranslationItem.prototype = { * for correct positioning and spliting of text nodes. */ const TranslationItem_NodePlaceholder = { - toString: function() { + toString() { return "[object TranslationItem_NodePlaceholder]"; } }; diff --git a/browser/components/translation/YandexTranslator.jsm b/browser/components/translation/YandexTranslator.jsm index ab92e09625c9..11206d91d48a 100644 --- a/browser/components/translation/YandexTranslator.jsm +++ b/browser/components/translation/YandexTranslator.jsm @@ -76,7 +76,7 @@ this.YandexTranslator.prototype = { * @returns {Promise} A promise that will resolve when the translation * task is finished. */ - translate: function() { + translate() { return Task.spawn(function *() { let currentIndex = 0; this._onFinishedDeferred = Promise.defer(); @@ -120,7 +120,7 @@ this.YandexTranslator.prototype = { * * @param request The YandexRequest sent to the server */ - _chunkCompleted: function(yandexRequest) { + _chunkCompleted(yandexRequest) { if (this._parseChunkResult(yandexRequest)) { this._partialSuccess = true; // Count the number of characters successfully translated. @@ -140,7 +140,7 @@ this.YandexTranslator.prototype = { * * @param aError [optional] The XHR object of the request that failed. */ - _chunkFailed: function(aError) { + _chunkFailed(aError) { if (aError instanceof Ci.nsIXMLHttpRequest) { let body = aError.responseText; let json = { code: 0 }; @@ -160,7 +160,7 @@ this.YandexTranslator.prototype = { * This function handles resolving the promise * returned by the public `translate()` method when all chunks are completed. */ - _checkIfFinished: function() { + _checkIfFinished() { // Check if all pending requests have been // completed and then resolves the promise. // If at least one chunk was successful, the @@ -188,7 +188,7 @@ this.YandexTranslator.prototype = { * @param request The request sent to the server. * @returns boolean True if parsing of this chunk was successful. */ - _parseChunkResult: function(yandexRequest) { + _parseChunkResult(yandexRequest) { let results; try { let result = JSON.parse(yandexRequest.networkRequest.responseText); @@ -228,7 +228,7 @@ this.YandexTranslator.prototype = { * @param startIndex What is the index, in the roots list, that the * chunk should start. */ - _generateNextTranslationRequest: function(startIndex) { + _generateNextTranslationRequest(startIndex) { let currentDataSize = 0; let currentChunks = 0; let output = []; @@ -292,7 +292,7 @@ YandexRequest.prototype = { /** * Initiates the request */ - fireRequest: function() { + fireRequest() { return Task.spawn(function *() { // Prepare URL. let url = getUrlParam("https://translate.yandex.net/api/v1.5/tr.json/translate", @@ -317,7 +317,7 @@ YandexRequest.prototype = { onLoad: (function(responseText, xhr) { deferred.resolve(this); }).bind(this), - onError: function(e, responseText, xhr) { + onError(e, responseText, xhr) { deferred.reject(xhr); }, postData: params diff --git a/browser/components/translation/test/browser_translation_infobar.js b/browser/components/translation/test/browser_translation_infobar.js index 4dbdcbee4c3c..9b6917b3fe31 100644 --- a/browser/components/translation/test/browser_translation_infobar.js +++ b/browser/components/translation/test/browser_translation_infobar.js @@ -33,23 +33,23 @@ function waitForCondition(condition, nextTest, errorMsg) { } var TranslationStub = { - translate: function(aFrom, aTo) { + translate(aFrom, aTo) { this.state = Translation.STATE_TRANSLATING; this.translatedFrom = aFrom; this.translatedTo = aTo; }, - _reset: function() { + _reset() { this.translatedFrom = ""; this.translatedTo = ""; }, - failTranslation: function() { + failTranslation() { this.state = Translation.STATE_ERROR; this._reset(); }, - finishTranslation: function() { + finishTranslation() { this.showTranslatedContent(); this.state = Translation.STATE_TRANSLATED; this._reset(); diff --git a/browser/components/translation/test/browser_translation_telemetry.js b/browser/components/translation/test/browser_translation_telemetry.js index 2c89c283f0b7..4e3e08925e9c 100644 --- a/browser/components/translation/test/browser_translation_telemetry.js +++ b/browser/components/translation/test/browser_translation_telemetry.js @@ -24,14 +24,14 @@ var MetricsChecker = { DETECT_LANG : Services.telemetry.getHistogramById("SHOULD_AUTO_DETECT_LANGUAGE"), }, - reset: function() { + reset() { for (let i of Object.keys(this.HISTOGRAMS)) { this.HISTOGRAMS[i].clear(); } this.updateMetrics(); }, - updateMetrics: function() { + updateMetrics() { this._metrics = { opportunitiesCount: this.HISTOGRAMS.OPPORTUNITIES.snapshot().sum || 0, pageCount: this.HISTOGRAMS.PAGES.snapshot().sum || 0, @@ -65,7 +65,7 @@ var MetricsChecker = { /** * A recurrent loop for making assertions about collected metrics. */ - _assertionLoop: function(prevMetrics, metrics, additions) { + _assertionLoop(prevMetrics, metrics, additions) { for (let metric of Object.keys(additions)) { let addition = additions[metric]; // Allows nesting metrics. Useful for keyed histograms. @@ -77,7 +77,7 @@ var MetricsChecker = { } }, - checkAdditions: function(additions) { + checkAdditions(additions) { let prevMetrics = this._metrics; this.updateMetrics(); this._assertionLoop(prevMetrics, this._metrics, additions); diff --git a/browser/components/uitour/UITour-lib.js b/browser/components/uitour/UITour-lib.js index 40c1a82b4d99..9b7775864988 100644 --- a/browser/components/uitour/UITour-lib.js +++ b/browser/components/uitour/UITour-lib.js @@ -27,7 +27,7 @@ if (typeof Mozilla == 'undefined') { var event = new CustomEvent('mozUITour', { bubbles: true, detail: { - action: action, + action, data: data || {} } }); @@ -94,19 +94,19 @@ if (typeof Mozilla == 'undefined') { Mozilla.UITour.registerPageID = function(pageID) { _sendEvent('registerPageID', { - pageID: pageID + pageID }); }; Mozilla.UITour.showHeartbeat = function(message, thankyouMessage, flowId, engagementURL, learnMoreLabel, learnMoreURL, options) { var args = { - message: message, - thankyouMessage: thankyouMessage, - flowId: flowId, - engagementURL: engagementURL, - learnMoreLabel: learnMoreLabel, - learnMoreURL: learnMoreURL, + message, + thankyouMessage, + flowId, + engagementURL, + learnMoreLabel, + learnMoreURL, }; if (options) { @@ -123,8 +123,8 @@ if (typeof Mozilla == 'undefined') { Mozilla.UITour.showHighlight = function(target, effect) { _sendEvent('showHighlight', { - target: target, - effect: effect + target, + effect }); }; @@ -152,13 +152,13 @@ if (typeof Mozilla == 'undefined') { targetCallbackID = _waitForCallback(options.targetCallback); _sendEvent('showInfo', { - target: target, - title: title, - text: text, - icon: icon, + target, + title, + text, + icon, buttons: buttonData, - closeButtonCallbackID: closeButtonCallbackID, - targetCallbackID: targetCallbackID + closeButtonCallbackID, + targetCallbackID }); }; @@ -209,14 +209,14 @@ if (typeof Mozilla == 'undefined') { showCallbackID = _waitForCallback(callback); _sendEvent('showMenu', { - name: name, - showCallbackID: showCallbackID, + name, + showCallbackID, }); }; Mozilla.UITour.hideMenu = function(name) { _sendEvent('hideMenu', { - name: name + name }); }; @@ -260,34 +260,34 @@ if (typeof Mozilla == 'undefined') { Mozilla.UITour.addNavBarWidget = function(name, callback) { _sendEvent('addNavBarWidget', { - name: name, + name, callbackID: _waitForCallback(callback), }); }; Mozilla.UITour.setDefaultSearchEngine = function(identifier) { _sendEvent('setDefaultSearchEngine', { - identifier: identifier, + identifier, }); }; Mozilla.UITour.setTreatmentTag = function(name, value) { _sendEvent('setTreatmentTag', { - name: name, - value: value + name, + value }); }; Mozilla.UITour.getTreatmentTag = function(name, callback) { _sendEvent('getTreatmentTag', { - name: name, + name, callbackID: _waitForCallback(callback) }); }; Mozilla.UITour.setSearchTerm = function(term) { _sendEvent('setSearchTerm', { - term: term + term }); }; @@ -307,7 +307,7 @@ if (typeof Mozilla == 'undefined') { Mozilla.UITour.openPreferences = function(pane) { _sendEvent('openPreferences', { - pane: pane + pane }); }; diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index 2e25fdd458f4..eeb73ade9eab 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -214,7 +214,7 @@ this.UITour = { ["webide", {query: "#webide-button"}], ]), - init: function() { + init() { log.debug("Initializing UITour"); // Lazy getter is initialized here so it can be replicated any time // in a test. @@ -243,7 +243,7 @@ this.UITour = { }, {})); }, - restoreSeenPageIDs: function() { + restoreSeenPageIDs() { delete this.seenPageIDs; if (UITelemetry.enabled) { @@ -276,7 +276,7 @@ this.UITour = { return this.seenPageIDs; }, - addSeenPageID: function(aPageID) { + addSeenPageID(aPageID) { if (!UITelemetry.enabled) return; @@ -287,7 +287,7 @@ this.UITour = { this.persistSeenIDs(); }, - persistSeenIDs: function() { + persistSeenIDs() { if (this.seenPageIDs.size === 0) { Services.prefs.clearUserPref(PREF_SEENPAGEIDS); return; @@ -303,7 +303,7 @@ this.UITour = { return this._readerViewTriggerRegEx = new RegExp(readerViewUITourTrigger, "i"); }, - onLocationChange: function(aLocation) { + onLocationChange(aLocation) { // The ReaderView tour page is expected to run in Reader View, // which disables JavaScript on the page. To get around that, we // automatically start a pre-defined tour on page load (for hysterical @@ -314,7 +314,7 @@ this.UITour = { } }, - onPageEvent: function(aMessage, aEvent) { + onPageEvent(aMessage, aEvent) { let browser = aMessage.target; let window = browser.ownerGlobal; @@ -620,7 +620,7 @@ this.UITour = { value = Services.prefs.getComplexValue("browser.uitour.treatment." + name, Ci.nsISupportsString).data; } catch (ex) {} - this.sendPageCallback(messageManager, data.callbackID, { value: value }); + this.sendPageCallback(messageManager, data.callbackID, { value }); break; } @@ -708,7 +708,7 @@ this.UITour = { window.addEventListener("SSWindowClosing", this); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { log.debug("handleEvent: type =", aEvent.type, "event =", aEvent); switch (aEvent.type) { case "TabSelect": { @@ -734,7 +734,7 @@ this.UITour = { } }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { log.debug("observe: aTopic =", aTopic); switch (aTopic) { // The browser message manager is disconnected when the is @@ -769,7 +769,7 @@ this.UITour = { // additional utm_* URL params that should be appended, validate and append // them to the passed URLSearchParams object. Returns true if the params // were validated and appended, and false if the request should be ignored. - _populateCampaignParams: function(urlSearchParams, extraURLCampaignParams) { + _populateCampaignParams(urlSearchParams, extraURLCampaignParams) { // We are extra paranoid about what params we allow to be appended. if (typeof extraURLCampaignParams == "undefined") { // no params, so it's all good. @@ -811,12 +811,12 @@ this.UITour = { return true; }, - setTelemetryBucket: function(aPageID) { + setTelemetryBucket(aPageID) { let bucket = BUCKET_NAME + BrowserUITelemetry.BUCKET_SEPARATOR + aPageID; BrowserUITelemetry.setBucket(bucket); }, - setExpiringTelemetryBucket: function(aPageID, aType) { + setExpiringTelemetryBucket(aPageID, aType) { let bucket = BUCKET_NAME + BrowserUITelemetry.BUCKET_SEPARATOR + aPageID + BrowserUITelemetry.BUCKET_SEPARATOR + aType; @@ -826,7 +826,7 @@ this.UITour = { // This is registered with UITelemetry by BrowserUITelemetry, so that UITour // can remain lazy-loaded on-demand. - getTelemetry: function() { + getTelemetry() { return { seenPageIDs: [...this.seenPageIDs.keys()], }; @@ -835,7 +835,7 @@ this.UITour = { /** * Tear down a tour from a tab e.g. upon switching/closing tabs. */ - teardownTourForBrowser: function(aWindow, aBrowser, aTourPageClosing = false) { + teardownTourForBrowser(aWindow, aBrowser, aTourPageClosing = false) { log.debug("teardownTourForBrowser: aBrowser = ", aBrowser, aTourPageClosing); if (this.pageIDSourceBrowsers.has(aBrowser)) { @@ -873,7 +873,7 @@ this.UITour = { /** * Tear down all tours for a ChromeWindow. */ - teardownTourForWindow: function(aWindow) { + teardownTourForWindow(aWindow) { log.debug("teardownTourForWindow"); aWindow.gBrowser.tabContainer.removeEventListener("TabSelect", this); aWindow.removeEventListener("SSWindowClosing", this); @@ -892,7 +892,7 @@ this.UITour = { }, // This function is copied to UITourListener. - isSafeScheme: function(aURI) { + isSafeScheme(aURI) { let allowedSchemes = new Set(["https", "about"]); if (!Services.prefs.getBoolPref("browser.uitour.requireSecure")) allowedSchemes.add("http"); @@ -905,7 +905,7 @@ this.UITour = { return true; }, - resolveURL: function(aBrowser, aURL) { + resolveURL(aBrowser, aURL) { try { let uri = Services.io.newURI(aURL, null, aBrowser.currentURI); @@ -918,20 +918,20 @@ this.UITour = { return null; }, - sendPageCallback: function(aMessageManager, aCallbackID, aData = {}) { + sendPageCallback(aMessageManager, aCallbackID, aData = {}) { let detail = {data: aData, callbackID: aCallbackID}; log.debug("sendPageCallback", detail); aMessageManager.sendAsyncMessage("UITour:SendPageCallback", detail); }, - isElementVisible: function(aElement) { + isElementVisible(aElement) { let targetStyle = aElement.ownerGlobal.getComputedStyle(aElement); return !aElement.ownerDocument.hidden && targetStyle.display != "none" && targetStyle.visibility == "visible"; }, - getTarget: function(aWindow, aTargetName, aSticky = false) { + getTarget(aWindow, aTargetName, aSticky = false) { log.debug("getTarget:", aTargetName); let deferred = Promise.defer(); if (typeof aTargetName != "string" || !aTargetName) { @@ -966,7 +966,7 @@ this.UITour = { infoPanelOffsetX: targetObject.infoPanelOffsetX, infoPanelOffsetY: targetObject.infoPanelOffsetY, infoPanelPosition: targetObject.infoPanelPosition, - node: node, + node, removeTargetListener: targetObject.removeTargetListener, targetName: aTargetName, widgetName: targetObject.widgetName, @@ -976,7 +976,7 @@ this.UITour = { return deferred.promise; }, - targetIsInAppMenu: function(aTarget) { + targetIsInAppMenu(aTarget) { let placement = CustomizableUI.getPlacementOfWidget(aTarget.widgetName || aTarget.node.id); if (placement && placement.area == CustomizableUI.AREA_PANEL) { return true; @@ -997,7 +997,7 @@ this.UITour = { * Called before opening or after closing a highlight or info panel to see if * we need to open or close the appMenu to see the annotation's anchor. */ - _setAppMenuStateForAnnotation: function(aWindow, aAnnotationType, aShouldOpenForHighlight, aCallback = null) { + _setAppMenuStateForAnnotation(aWindow, aAnnotationType, aShouldOpenForHighlight, aCallback = null) { log.debug("_setAppMenuStateForAnnotation:", aAnnotationType); log.debug("_setAppMenuStateForAnnotation: Menu is expected to be:", aShouldOpenForHighlight ? "open" : "closed"); @@ -1037,14 +1037,14 @@ this.UITour = { }, - previewTheme: function(aTheme) { + previewTheme(aTheme) { let origin = Services.prefs.getCharPref("browser.uitour.themeOrigin"); let data = LightweightThemeManager.parseTheme(aTheme, origin); if (data) LightweightThemeManager.previewTheme(data); }, - resetTheme: function() { + resetTheme() { LightweightThemeManager.resetPreview(); }, @@ -1387,7 +1387,7 @@ this.UITour = { * @param {Node} aAnchor The element that's supposed to be the anchor * @type {Node} */ - _correctAnchor: function(aAnchor) { + _correctAnchor(aAnchor) { // If the target is in the overflow panel, just return the overflow button. if (aAnchor.getAttribute("overflowedItem")) { let doc = aAnchor.ownerDocument; @@ -1407,7 +1407,7 @@ this.UITour = { * @param aEffect (optional) The effect to use from UITour.highlightEffects or "none". * @see UITour.highlightEffects */ - showHighlight: function(aChromeWindow, aTarget, aEffect = "none") { + showHighlight(aChromeWindow, aTarget, aEffect = "none") { function showHighlightPanel() { let highlighter = aChromeWindow.document.getElementById("UITourHighlight"); @@ -1478,7 +1478,7 @@ this.UITour = { showHighlightPanel.bind(this)); }, - hideHighlight: function(aWindow) { + hideHighlight(aWindow) { let highlighter = aWindow.document.getElementById("UITourHighlight"); this._removeAnnotationPanelMutationObserver(highlighter.parentElement); highlighter.parentElement.hidePopup(); @@ -1617,7 +1617,7 @@ this.UITour = { return tooltip.getAttribute("targetName") == aTargetName && tooltip.state != "closed"; }, - hideInfo: function(aWindow) { + hideInfo(aWindow) { let document = aWindow.document; let tooltip = document.getElementById("UITourTooltip"); @@ -1630,7 +1630,7 @@ this.UITour = { tooltipButtons.firstChild.remove(); }, - showMenu: function(aWindow, aMenuName, aOpenCallback = null) { + showMenu(aWindow, aMenuName, aOpenCallback = null) { log.debug("showMenu:", aMenuName); function openMenuButton(aMenuBtn) { if (!aMenuBtn || !aMenuBtn.boxObject || aMenuBtn.open) { @@ -1731,7 +1731,7 @@ this.UITour = { } }, - hideMenu: function(aWindow, aMenuName) { + hideMenu(aWindow, aMenuName) { log.debug("hideMenu:", aMenuName); function closeMenuButton(aMenuBtn) { if (aMenuBtn && aMenuBtn.boxObject) @@ -1749,11 +1749,11 @@ this.UITour = { } }, - showNewTab: function(aWindow, aBrowser) { + showNewTab(aWindow, aBrowser) { aWindow.openLinkIn("about:newtab", "current", {targetBrowser: aBrowser}); }, - hideAnnotationsForPanel: function(aEvent, aTargetPositionCallback) { + hideAnnotationsForPanel(aEvent, aTargetPositionCallback) { let win = aEvent.target.ownerGlobal; let annotationElements = new Map([ // [annotationElement (panel), method to hide the annotation] @@ -1778,7 +1778,7 @@ this.UITour = { UITour.appMenuOpenForAnnotation.clear(); }, - hideAppMenuAnnotations: function(aEvent) { + hideAppMenuAnnotations(aEvent) { UITour.hideAnnotationsForPanel(aEvent, UITour.targetIsInAppMenu); }, @@ -1788,13 +1788,13 @@ this.UITour = { }); }, - onPanelHidden: function(aEvent) { + onPanelHidden(aEvent) { aEvent.target.removeAttribute("noautohide"); UITour.recreatePopup(aEvent.target); UITour.clearAvailableTargetsCache(); }, - recreatePopup: function(aPanel) { + recreatePopup(aPanel) { // After changing popup attributes that relate to how the native widget is created // (e.g. @noautohide) we need to re-create the frame/widget for it to take effect. if (aPanel.hidden) { @@ -1808,7 +1808,7 @@ this.UITour = { aPanel.hidden = false; }, - getConfiguration: function(aMessageManager, aWindow, aConfiguration, aCallbackID) { + getConfiguration(aMessageManager, aWindow, aConfiguration, aCallbackID) { switch (aConfiguration) { case "appinfo": let props = ["defaultUpdateChannel", "version"]; @@ -1888,7 +1888,7 @@ this.UITour = { } }, - setConfiguration: function(aWindow, aConfiguration, aValue) { + setConfiguration(aWindow, aConfiguration, aValue) { switch (aConfiguration) { case "defaultBrowser": // Ignore aValue in this case because the default browser can only @@ -1906,7 +1906,7 @@ this.UITour = { } }, - getAvailableTargets: function(aMessageManager, aChromeWindow, aCallbackID) { + getAvailableTargets(aMessageManager, aChromeWindow, aCallbackID) { Task.spawn(function*() { let window = aChromeWindow; let data = this.availableTargetsCache.get(window); @@ -1941,7 +1941,7 @@ this.UITour = { }); }, - startSubTour: function(aFeature) { + startSubTour(aFeature) { if (aFeature != "string") { log.error("startSubTour: No feature option specified"); return; @@ -1955,7 +1955,7 @@ this.UITour = { } }, - addNavBarWidget: function(aTarget, aMessageManager, aCallbackID) { + addNavBarWidget(aTarget, aMessageManager, aCallbackID) { if (aTarget.node) { log.error("addNavBarWidget: can't add a widget already present:", aTarget); return; @@ -1973,7 +1973,7 @@ this.UITour = { this.sendPageCallback(aMessageManager, aCallbackID); }, - _addAnnotationPanelMutationObserver: function(aPanelEl) { + _addAnnotationPanelMutationObserver(aPanelEl) { if (AppConstants.platform == "linux") { let observer = this._annotationPanelMutationObservers.get(aPanelEl); if (observer) { @@ -1990,7 +1990,7 @@ this.UITour = { } }, - _removeAnnotationPanelMutationObserver: function(aPanelEl) { + _removeAnnotationPanelMutationObserver(aPanelEl) { if (AppConstants.platform == "linux") { let observer = this._annotationPanelMutationObservers.get(aPanelEl); if (observer) { @@ -2005,7 +2005,7 @@ this.UITour = { * nsXULPopupManager::PopupResized and lead to incorrect width and height attributes getting * set on the panel. */ - _annotationMutationCallback: function(aMutations) { + _annotationMutationCallback(aMutations) { for (let mutation of aMutations) { // Remove both attributes at once and ignore remaining mutations to be proccessed. mutation.target.removeAttribute("width"); @@ -2055,7 +2055,7 @@ this.UITour = { } let detail = { event: eventName, - params: params, + params, }; messageManager.sendAsyncMessage("UITour:SendPageNotification", detail); } @@ -2096,7 +2096,7 @@ this.UITour.init(); * Public API to be called by the UITour code */ const UITourHealthReport = { - recordTreatmentTag: function(tag, value) { + recordTreatmentTag(tag, value) { return TelemetryController.submitExternalPing("uitour-tag", { version: 1, diff --git a/browser/components/uitour/content-UITour.js b/browser/components/uitour/content-UITour.js index f5646486f653..f7ef7d371a59 100644 --- a/browser/components/uitour/content-UITour.js +++ b/browser/components/uitour/content-UITour.js @@ -8,7 +8,7 @@ const PREF_TEST_WHITELIST = "browser.uitour.testingOrigins"; const UITOUR_PERMISSION = "uitour"; var UITourListener = { - handleEvent: function(event) { + handleEvent(event) { if (!Services.prefs.getBoolPref("browser.uitour.enabled")) { return; } @@ -24,7 +24,7 @@ var UITourListener = { }); }, - isTestingOrigin: function(aURI) { + isTestingOrigin(aURI) { if (Services.prefs.getPrefType(PREF_TEST_WHITELIST) != Services.prefs.PREF_STRING) { return false; } @@ -44,7 +44,7 @@ var UITourListener = { }, // This function is copied from UITour.jsm. - isSafeScheme: function(aURI) { + isSafeScheme(aURI) { let allowedSchemes = new Set(["https", "about"]); if (!Services.prefs.getBoolPref("browser.uitour.requireSecure")) allowedSchemes.add("http"); @@ -55,7 +55,7 @@ var UITourListener = { return true; }, - ensureTrustedOrigin: function() { + ensureTrustedOrigin() { if (content.top != content) return false; @@ -74,7 +74,7 @@ var UITourListener = { return this.isTestingOrigin(uri); }, - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { switch (aMessage.name) { case "UITour:SendPageCallback": this.sendPageEvent("Response", aMessage.data); @@ -85,7 +85,7 @@ var UITourListener = { } }, - sendPageEvent: function(type, detail) { + sendPageEvent(type, detail) { if (!this.ensureTrustedOrigin()) { return; } diff --git a/browser/components/uitour/test/browser_UITour_defaultBrowser.js b/browser/components/uitour/test/browser_UITour_defaultBrowser.js index 5ebf553b0562..f5f529d30b19 100644 --- a/browser/components/uitour/test/browser_UITour_defaultBrowser.js +++ b/browser/components/uitour/test/browser_UITour_defaultBrowser.js @@ -12,8 +12,8 @@ Cc["@mozilla.org/moz/jssubscript-loader;1"] function MockShellService() {} MockShellService.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIShellService]), - isDefaultBrowser: function(aStartupCheck, aForAllTypes) { return false; }, - setDefaultBrowser: function(aClaimAllTypes, aForAllUsers) { + isDefaultBrowser(aStartupCheck, aForAllTypes) { return false; }, + setDefaultBrowser(aClaimAllTypes, aForAllUsers) { setDefaultBrowserCalled = true; }, shouldCheckDefaultBrowser: false, @@ -23,12 +23,12 @@ MockShellService.prototype = { BACKGROUND_CENTER : 3, BACKGROUND_FILL : 4, BACKGROUND_FIT : 5, - setDesktopBackground: function(aElement, aPosition) {}, + setDesktopBackground(aElement, aPosition) {}, APPLICATION_MAIL : 0, APPLICATION_NEWS : 1, - openApplication: function(aApplication) {}, + openApplication(aApplication) {}, desktopBackgroundColor: 0, - openApplicationWithURI: function(aApplication, aURI) {}, + openApplicationWithURI(aApplication, aURI) {}, defaultFeedReader: 0, }; diff --git a/browser/components/uitour/test/browser_UITour_heartbeat.js b/browser/components/uitour/test/browser_UITour_heartbeat.js index 6cfeb2a2732c..5b6a3ba717ef 100644 --- a/browser/components/uitour/test/browser_UITour_heartbeat.js +++ b/browser/components/uitour/test/browser_UITour_heartbeat.js @@ -221,7 +221,7 @@ add_UITour_task(function* test_heartbeat_take_optional_icon_URL() { // Show the Heartbeat notification and wait for it to be displayed. let shownPromise = promiseWaitHeartbeatNotification("Heartbeat:NotificationOffered"); gContentAPI.showHeartbeat("How would you rate Firefox?", "Thank you!", flowId, engagementURL, null, null, { - iconURL: iconURL + iconURL }); // Validate the returned timestamp. diff --git a/browser/components/uitour/test/browser_UITour_modalDialog.js b/browser/components/uitour/test/browser_UITour_modalDialog.js index 49d01474f9c2..a697d5f2df3a 100644 --- a/browser/components/uitour/test/browser_UITour_modalDialog.js +++ b/browser/components/uitour/test/browser_UITour_modalDialog.js @@ -22,7 +22,7 @@ function startCallbackTimer() { var observer = SpecialPowers.wrapCallbackObject({ - QueryInterface : function(iid) { + QueryInterface(iid) { const interfaces = [Ci.nsIObserver, Ci.nsISupports, Ci.nsISupportsWeakReference]; @@ -31,7 +31,7 @@ var observer = SpecialPowers.wrapCallbackObject({ return this; }, - observe : function(subject, topic, data) { + observe(subject, topic, data) { var doc = getDialogDoc(); if (doc) handleDialog(doc); diff --git a/browser/components/uitour/test/browser_no_tabs.js b/browser/components/uitour/test/browser_no_tabs.js index 62048b1568d3..05c0f2b9f67f 100644 --- a/browser/components/uitour/test/browser_no_tabs.js +++ b/browser/components/uitour/test/browser_no_tabs.js @@ -26,7 +26,7 @@ function createHiddenBrowser(aURL) { browser.setAttribute("src", aURL); doc.documentElement.appendChild(browser); - resolve({frame: frame, browser: browser}); + resolve({frame, browser}); })); } diff --git a/browser/experiments/Experiments.jsm b/browser/experiments/Experiments.jsm index f76092f497f9..9038c7d801b4 100644 --- a/browser/experiments/Experiments.jsm +++ b/browser/experiments/Experiments.jsm @@ -211,7 +211,7 @@ var Experiments = { /** * Provides access to the global `Experiments.Experiments` instance. */ - instance: function() { + instance() { if (!gExperiments) { gExperiments = new Experiments.Experiments(); } @@ -236,11 +236,11 @@ Experiments.Policy = function() { }; Experiments.Policy.prototype = { - now: function() { + now() { return new Date(); }, - random: function() { + random() { let pref = gPrefs.get(PREF_FORCE_SAMPLE); if (pref !== undefined) { let val = Number.parseFloat(pref); @@ -256,19 +256,19 @@ Experiments.Policy.prototype = { return Math.random(); }, - futureDate: function(offset) { + futureDate(offset) { return new Date(this.now().getTime() + offset); }, - oneshotTimer: function(callback, timeout, thisObj, name) { + oneshotTimer(callback, timeout, thisObj, name) { return CommonUtils.namedTimer(callback, timeout, thisObj, name); }, - updatechannel: function() { + updatechannel() { return UpdateUtils.UpdateChannel; }, - locale: function() { + locale() { let chrome = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(Ci.nsIXULChromeRegistry); return chrome.getSelectedLocale("global"); }, @@ -277,7 +277,7 @@ Experiments.Policy.prototype = { * For testing a race condition, one of the tests delays the callback of * writing the cache by replacing this policy function. */ - delayCacheWrite: function(promise) { + delayCacheWrite(promise) { return promise; }, }; @@ -373,7 +373,7 @@ Experiments.Experiments.prototype = { return !this._shutdown; }, - init: function() { + init() { this._shutdown = false; configureLogging(); @@ -467,7 +467,7 @@ Experiments.Experiments.prototype = { }), // Return state information, for debugging purposes. - _getState: function() { + _getState() { let activeExperiment = this._getActiveExperiment(); let state = { isShutdown: this._shutdown, @@ -497,13 +497,13 @@ Experiments.Experiments.prototype = { return state; }, - _addToForensicsLog: function(what, string) { + _addToForensicsLog(what, string) { this._forensicsLogs.shift(); let timeInSec = Math.floor(Services.telemetry.msSinceProcessStart() / 1000); this._forensicsLogs.push(`${timeInSec}: ${what} - ${string}`); }, - _registerWithAddonManager: function(previousExperimentsProvider) { + _registerWithAddonManager(previousExperimentsProvider) { this._log.trace("Registering instance with Addon Manager."); AddonManager.addAddonListener(this); @@ -526,7 +526,7 @@ Experiments.Experiments.prototype = { }, - _unregisterWithAddonManager: function() { + _unregisterWithAddonManager() { this._log.trace("Unregistering instance with Addon Manager."); this._log.trace("Removing install listener from add-on manager."); @@ -546,7 +546,7 @@ Experiments.Experiments.prototype = { * Change the PreviousExperimentsProvider that this instance uses. * For testing only. */ - _setPreviousExperimentsProvider: function(provider) { + _setPreviousExperimentsProvider(provider) { this._unregisterWithAddonManager(); this._registerWithAddonManager(provider); }, @@ -554,7 +554,7 @@ Experiments.Experiments.prototype = { /** * Throws an exception if we've already shut down. */ - _checkForShutdown: function() { + _checkForShutdown() { if (this._shutdown) { throw new AlreadyShutdownError("uninit() already called"); } @@ -594,7 +594,7 @@ Experiments.Experiments.prototype = { } }), - _telemetryStatusChanged: function() { + _telemetryStatusChanged() { this._toggleExperimentsEnabled(gExperimentsEnabled); }, @@ -616,7 +616,7 @@ Experiments.Experiments.prototype = { * * @return Promise> Array of experiment info objects. */ - getExperiments: function() { + getExperiments() { return Task.spawn(function*() { yield this._loadTask; let list = []; @@ -628,7 +628,7 @@ Experiments.Experiments.prototype = { } list.push({ - id: id, + id, name: experiment._name, description: experiment._description, active: experiment.enabled, @@ -648,7 +648,7 @@ Experiments.Experiments.prototype = { * Returns the ExperimentInfo for the active experiment, or null * if there is none. */ - getActiveExperiment: function() { + getActiveExperiment() { let experiment = this._getActiveExperiment(); if (!experiment) { return null; @@ -718,7 +718,7 @@ Experiments.Experiments.prototype = { /** * Determine whether another date has the same UTC day as now(). */ - _dateIsTodayUTC: function(d) { + _dateIsTodayUTC(d) { let now = this._policy.now(); return stripDateToMidnight(now).getTime() == stripDateToMidnight(d).getTime(); @@ -734,7 +734,7 @@ Experiments.Experiments.prototype = { * * @return Promise */ - lastActiveToday: function() { + lastActiveToday() { return Task.spawn(function* getMostRecentActiveExperimentTask() { let experiments = yield this.getExperiments(); @@ -753,7 +753,7 @@ Experiments.Experiments.prototype = { }.bind(this)); }, - _run: function() { + _run() { this._log.trace("_run"); this._checkForShutdown(); if (!this._mainTask) { @@ -783,7 +783,7 @@ Experiments.Experiments.prototype = { return this._mainTask; }, - _main: function*() { + *_main() { do { this._log.trace("_main iteration"); yield this._loadTask; @@ -804,7 +804,7 @@ Experiments.Experiments.prototype = { while (this._refresh || this._terminateReason || this._dirty); }, - _loadManifest: function*() { + *_loadManifest() { this._log.trace("_loadManifest"); let uri = Services.urlFormatter.formatURLPref(PREF_BRANCH + PREF_MANIFEST_URI); @@ -833,7 +833,7 @@ Experiments.Experiments.prototype = { * @return Promise<> * The promise is resolved when the manifest and experiment list is updated. */ - updateManifest: function() { + updateManifest() { this._log.trace("updateManifest()"); if (!gExperimentsEnabled) { @@ -848,7 +848,7 @@ Experiments.Experiments.prototype = { return this._run(); }, - notify: function(timer) { + notify(timer) { this._log.trace("notify()"); this._checkForShutdown(); return this._run(); @@ -856,7 +856,7 @@ Experiments.Experiments.prototype = { // START OF ADD-ON LISTENERS - onUninstalled: function(addon) { + onUninstalled(addon) { this._log.trace("onUninstalled() - addon id: " + addon.id); if (gActiveUninstallAddonIDs.has(addon.id)) { this._log.trace("matches pending uninstall"); @@ -873,7 +873,7 @@ Experiments.Experiments.prototype = { /** * @returns {Boolean} returns false when we cancel the install. */ - onInstallStarted: function(install) { + onInstallStarted(install) { if (install.addon.type != "experiment") { return true; } @@ -917,7 +917,7 @@ Experiments.Experiments.prototype = { // END OF ADD-ON LISTENERS. - _getExperimentByAddonId: function(addonId) { + _getExperimentByAddonId(addonId) { for (let [, entry] of this._experiments) { if (entry._addonId === addonId) { return entry; @@ -931,7 +931,7 @@ Experiments.Experiments.prototype = { * Helper function to make HTTP GET requests. Returns a promise that is resolved with * the responseText when the request is complete. */ - _httpGetRequest: function(url) { + _httpGetRequest(url) { this._log.trace("httpGetRequest(" + url + ")"); let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest); @@ -986,7 +986,7 @@ Experiments.Experiments.prototype = { /* * Part of the main task to save the cache to disk, called from _main. */ - _saveToCache: function* () { + *_saveToCache() { this._log.trace("_saveToCache"); let path = this._cacheFilePath; this._dirty = false; @@ -1029,7 +1029,7 @@ Experiments.Experiments.prototype = { } }), - _populateFromCache: function(data) { + _populateFromCache(data) { this._log.trace("populateFromCache() - data: " + JSON.stringify(data)); // If the user has a newer cache version than we can understand, we fail @@ -1062,7 +1062,7 @@ Experiments.Experiments.prototype = { * Update the experiment entries from the experiments * array in the manifest */ - _updateExperiments: function(manifestObject) { + _updateExperiments(manifestObject) { this._log.trace("_updateExperiments() - experiments: " + JSON.stringify(manifestObject)); if (manifestObject.version !== MANIFEST_VERSION) { @@ -1113,7 +1113,7 @@ Experiments.Experiments.prototype = { this._dirty = true; }, - getActiveExperimentID: function() { + getActiveExperimentID() { if (!this._experiments) { return null; } @@ -1124,7 +1124,7 @@ Experiments.Experiments.prototype = { return e.id; }, - getActiveExperimentBranch: function() { + getActiveExperimentBranch() { if (!this._experiments) { return null; } @@ -1135,7 +1135,7 @@ Experiments.Experiments.prototype = { return e.branch; }, - _getActiveExperiment: function() { + _getActiveExperiment() { let enabled = [...this._experiments.values()].filter(experiment => experiment._enabled); if (enabled.length == 1) { @@ -1155,7 +1155,7 @@ Experiments.Experiments.prototype = { * * @return Promise<> Promise that will get resolved once the task is done or failed. */ - disableExperiment: function(reason) { + disableExperiment(reason) { if (!reason) { throw new Error("Must specify a termination reason."); } @@ -1180,7 +1180,7 @@ Experiments.Experiments.prototype = { * Task function to check applicability of experiments, disable the active * experiment if needed and activate the first applicable candidate. */ - _evaluateExperiments: function*() { + *_evaluateExperiments() { this._log.trace("_evaluateExperiments"); this._checkForShutdown(); @@ -1317,7 +1317,7 @@ Experiments.Experiments.prototype = { /* * Schedule the soonest re-check of experiment applicability that is needed. */ - _scheduleNextRun: function() { + _scheduleNextRun() { this._checkForShutdown(); if (this._timer) { @@ -1462,7 +1462,7 @@ Experiments.ExperimentEntry.prototype = { * @param data The experiment data from the manifest. * @return boolean Whether initialization succeeded. */ - initFromManifestData: function(data) { + initFromManifestData(data) { if (!this._isManifestDataValid(data)) { return false; } @@ -1522,7 +1522,7 @@ Experiments.ExperimentEntry.prototype = { * @param data The entry data from the cache. * @return boolean Whether initialization succeeded. */ - initFromCacheData: function(data) { + initFromCacheData(data) { for (let [key, dval] of this.UPGRADE_KEYS) { if (!(key in data)) { data[key] = dval; @@ -1567,7 +1567,7 @@ Experiments.ExperimentEntry.prototype = { /* * Returns a JSON representation of this object. */ - toJSON: function() { + toJSON() { let obj = {}; // Dates are serialized separately as epoch ms. @@ -1592,7 +1592,7 @@ Experiments.ExperimentEntry.prototype = { * @param data The experiment data from the manifest. * @return boolean Whether updating succeeded. */ - updateFromManifestData: function(data) { + updateFromManifestData(data) { let old = this._manifestData; if (!this._isManifestDataValid(data)) { @@ -1624,7 +1624,7 @@ Experiments.ExperimentEntry.prototype = { * If it is not applicable it is rejected with * a Promise which contains the reason. */ - isApplicable: function() { + isApplicable() { let versionCmp = Cc["@mozilla.org/xpcom/version-comparator;1"] .getService(Ci.nsIVersionComparator); let app = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo); @@ -2015,7 +2015,7 @@ Experiments.ExperimentEntry.prototype = { * * @return Promise */ - _getAddon: function() { + _getAddon() { if (!this._addonId) { return Promise.resolve(null); } @@ -2030,7 +2030,7 @@ Experiments.ExperimentEntry.prototype = { }); }, - _logTermination: function(terminationKind, terminationReason) { + _logTermination(terminationKind, terminationReason) { if (terminationKind === undefined) { return; } @@ -2051,7 +2051,7 @@ Experiments.ExperimentEntry.prototype = { /** * Determine whether an active experiment should be stopped. */ - shouldStop: function() { + shouldStop() { if (!this._enabled) { throw new Error("shouldStop must not be called on disabled experiments."); } @@ -2059,7 +2059,7 @@ Experiments.ExperimentEntry.prototype = { let deferred = Promise.defer(); this.isApplicable().then( () => deferred.resolve({shouldStop: false}), - reason => deferred.resolve({shouldStop: true, reason: reason}) + reason => deferred.resolve({shouldStop: true, reason}) ); return deferred.promise; @@ -2068,7 +2068,7 @@ Experiments.ExperimentEntry.prototype = { /* * Should this be discarded from the cache due to age? */ - shouldDiscard: function() { + shouldDiscard() { let limit = this._policy.now(); limit.setDate(limit.getDate() - KEEP_HISTORY_N_DAYS); return (this._lastChangedDate < limit); @@ -2078,7 +2078,7 @@ Experiments.ExperimentEntry.prototype = { * Get next date (in epoch-ms) to schedule a re-evaluation for this. * Returns 0 if it doesn't need one. */ - getScheduleTime: function() { + getScheduleTime() { if (this._enabled) { let startTime = this._startDate.getTime(); let maxActiveTime = startTime + 1000 * this._manifestData.maxActiveSeconds; @@ -2095,7 +2095,7 @@ Experiments.ExperimentEntry.prototype = { /* * Perform sanity checks on the experiment data. */ - _isManifestDataValid: function(data) { + _isManifestDataValid(data) { this._log.trace("isManifestDataValid() - data: " + JSON.stringify(data)); for (let key of this.MANIFEST_REQUIRED_FIELDS) { @@ -2148,12 +2148,12 @@ this.Experiments.PreviousExperimentProvider = function(experiments) { this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({ name: "PreviousExperimentProvider", - startup: function() { + startup() { this._log.trace("startup()"); Services.obs.addObserver(this, EXPERIMENTS_CHANGED_TOPIC, false); }, - shutdown: function() { + shutdown() { this._log.trace("shutdown()"); try { Services.obs.removeObserver(this, EXPERIMENTS_CHANGED_TOPIC); @@ -2162,7 +2162,7 @@ this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({ } }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { switch (topic) { case EXPERIMENTS_CHANGED_TOPIC: this._updateExperimentList(); @@ -2170,7 +2170,7 @@ this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({ } }, - getAddonByID: function(id, cb) { + getAddonByID(id, cb) { for (let experiment of this._experimentList) { if (experiment.id == id) { cb(new PreviousExperimentAddon(experiment)); @@ -2181,7 +2181,7 @@ this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({ cb(null); }, - getAddonsByTypes: function(types, cb) { + getAddonsByTypes(types, cb) { if (types && types.length > 0 && types.indexOf("experiment") == -1) { cb([]); return; @@ -2190,7 +2190,7 @@ this.Experiments.PreviousExperimentProvider.prototype = Object.freeze({ cb(this._experimentList.map(e => new PreviousExperimentAddon(e))); }, - _updateExperimentList: function() { + _updateExperimentList() { return this._experiments.getExperiments().then((experiments) => { let list = experiments.filter(e => !e.active); @@ -2323,11 +2323,11 @@ PreviousExperimentAddon.prototype = Object.freeze({ // BEGIN REQUIRED METHODS - isCompatibleWith: function(appVersion, platformVersion) { + isCompatibleWith(appVersion, platformVersion) { return true; }, - findUpdates: function(listener, reason, appVersion, platformVersion) { + findUpdates(listener, reason, appVersion, platformVersion) { AddonManagerPrivate.callNoUpdateListeners(this, listener, reason, appVersion, platformVersion); }, diff --git a/browser/experiments/ExperimentsService.js b/browser/experiments/ExperimentsService.js index 478793617f29..28da659bb0a9 100644 --- a/browser/experiments/ExperimentsService.js +++ b/browser/experiments/ExperimentsService.js @@ -54,7 +54,7 @@ ExperimentsService.prototype = { classID: Components.ID("{f7800463-3b97-47f9-9341-b7617e6d8d49}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback, Ci.nsIObserver]), - notify: function(timer) { + notify(timer) { if (!gExperimentsEnabled) { return; } @@ -67,14 +67,14 @@ ExperimentsService.prototype = { } }, - _delayedInit: function() { + _delayedInit() { if (!this._initialized) { this._initialized = true; Experiments.instance(); // for side effects } }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { switch (topic) { case "profile-after-change": if (gExperimentsEnabled) { diff --git a/browser/experiments/test/xpcshell/test_activate.js b/browser/experiments/test/xpcshell/test_activate.js index 60deafbfb3d5..3e62c896241d 100644 --- a/browser/experiments/test/xpcshell/test_activate.js +++ b/browser/experiments/test/xpcshell/test_activate.js @@ -52,7 +52,7 @@ function isApplicable(experiment) { let deferred = Promise.defer(); experiment.isApplicable().then( result => deferred.resolve({ applicable: true, reason: null }), - reason => deferred.resolve({ applicable: false, reason: reason }) + reason => deferred.resolve({ applicable: false, reason }) ); return deferred.promise; diff --git a/browser/extensions/pdfjs/README.mozilla b/browser/extensions/pdfjs/README.mozilla index b849113a5a09..2e82c74f2c6a 100644 --- a/browser/extensions/pdfjs/README.mozilla +++ b/browser/extensions/pdfjs/README.mozilla @@ -1,3 +1,3 @@ This is the pdf.js project output, https://github.com/mozilla/pdf.js -Current extension version is: 1.6.401 +Current extension version is: 1.6.418 diff --git a/browser/extensions/pdfjs/content/PdfJs.jsm b/browser/extensions/pdfjs/content/PdfJs.jsm index c25804cdec48..d67a6c5f8486 100644 --- a/browser/extensions/pdfjs/content/PdfJs.jsm +++ b/browser/extensions/pdfjs/content/PdfJs.jsm @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* jshint esnext:true */ /* globals Components, Services, XPCOMUtils, PdfjsChromeUtils, PdfjsContentUtils, PdfStreamConverter */ diff --git a/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm b/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm index 275da9d87b31..0d34cd50e67c 100644 --- a/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm +++ b/browser/extensions/pdfjs/content/PdfJsTelemetry.jsm @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* jshint esnext:true, maxlen: 100 */ +/* eslint max-len: ["error", 100] */ /* globals Components, Services */ 'use strict'; diff --git a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm index 3b9f9de26788..128d8aad2ab0 100644 --- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm +++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* jshint esnext:true */ /* globals Components, Services, XPCOMUtils, NetUtil, PrivateBrowsingUtils, dump, NetworkManager, PdfJsTelemetry, PdfjsContentUtils */ diff --git a/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm b/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm index 57f07af92ccd..2d97206f967e 100644 --- a/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm +++ b/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* jshint esnext:true */ /* globals Components, Services, XPCOMUtils */ 'use strict'; diff --git a/browser/extensions/pdfjs/content/PdfjsContentUtils.jsm b/browser/extensions/pdfjs/content/PdfjsContentUtils.jsm index 3dec5f38902d..4318fbfdf96e 100644 --- a/browser/extensions/pdfjs/content/PdfjsContentUtils.jsm +++ b/browser/extensions/pdfjs/content/PdfjsContentUtils.jsm @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* jshint esnext:true */ /* globals Components, Services, XPCOMUtils */ 'use strict'; diff --git a/browser/extensions/pdfjs/content/build/pdf.js b/browser/extensions/pdfjs/content/build/pdf.js index d5b17e9b3359..3183afb10e30 100644 --- a/browser/extensions/pdfjs/content/build/pdf.js +++ b/browser/extensions/pdfjs/content/build/pdf.js @@ -23,8 +23,8 @@ } }(this, function (exports) { 'use strict'; - var pdfjsVersion = '1.6.401'; - var pdfjsBuild = 'b629be05'; + var pdfjsVersion = '1.6.418'; + var pdfjsBuild = '59afb4b9'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsLibs = {}; (function pdfjsWrapper() { @@ -1808,6 +1808,15 @@ switch (fieldType) { case 'Tx': return new TextWidgetAnnotationElement(parameters); + case 'Btn': + if (parameters.data.radioButton) { + return new RadioButtonWidgetAnnotationElement(parameters); + } else if (parameters.data.checkBox) { + return new CheckboxWidgetAnnotationElement(parameters); + } else { + warn('Unimplemented button widget annotation: pushbutton'); + } + break; case 'Ch': return new ChoiceWidgetAnnotationElement(parameters); } @@ -2075,6 +2084,45 @@ }); return TextWidgetAnnotationElement; }(); + var CheckboxWidgetAnnotationElement = function CheckboxWidgetAnnotationElementClosure() { + function CheckboxWidgetAnnotationElement(parameters) { + WidgetAnnotationElement.call(this, parameters, parameters.renderInteractiveForms); + } + Util.inherit(CheckboxWidgetAnnotationElement, WidgetAnnotationElement, { + render: function CheckboxWidgetAnnotationElement_render() { + this.container.className = 'buttonWidgetAnnotation checkBox'; + var element = document.createElement('input'); + element.disabled = this.data.readOnly; + element.type = 'checkbox'; + if (this.data.fieldValue && this.data.fieldValue !== 'Off') { + element.setAttribute('checked', true); + } + this.container.appendChild(element); + return this.container; + } + }); + return CheckboxWidgetAnnotationElement; + }(); + var RadioButtonWidgetAnnotationElement = function RadioButtonWidgetAnnotationElementClosure() { + function RadioButtonWidgetAnnotationElement(parameters) { + WidgetAnnotationElement.call(this, parameters, parameters.renderInteractiveForms); + } + Util.inherit(RadioButtonWidgetAnnotationElement, WidgetAnnotationElement, { + render: function RadioButtonWidgetAnnotationElement_render() { + this.container.className = 'buttonWidgetAnnotation radioButton'; + var element = document.createElement('input'); + element.disabled = this.data.readOnly; + element.type = 'radio'; + element.name = this.data.fieldName; + if (this.data.fieldValue === this.data.buttonValue) { + element.setAttribute('checked', true); + } + this.container.appendChild(element); + return this.container; + } + }); + return RadioButtonWidgetAnnotationElement; + }(); var ChoiceWidgetAnnotationElement = function ChoiceWidgetAnnotationElementClosure() { function ChoiceWidgetAnnotationElement(parameters) { WidgetAnnotationElement.call(this, parameters, parameters.renderInteractiveForms); diff --git a/browser/extensions/pdfjs/content/build/pdf.worker.js b/browser/extensions/pdfjs/content/build/pdf.worker.js index 14746010d357..53587e11b279 100644 --- a/browser/extensions/pdfjs/content/build/pdf.worker.js +++ b/browser/extensions/pdfjs/content/build/pdf.worker.js @@ -23,8 +23,8 @@ } }(this, function (exports) { 'use strict'; - var pdfjsVersion = '1.6.401'; - var pdfjsBuild = 'b629be05'; + var pdfjsVersion = '1.6.418'; + var pdfjsBuild = '59afb4b9'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsLibs = {}; (function pdfjsWrapper() { @@ -45245,10 +45245,10 @@ } if (!font.vertical) { textChunk.lastAdvanceWidth = width; - textChunk.width += width * textChunk.textAdvanceScale; + textChunk.width += width; } else { textChunk.lastAdvanceHeight = height; - textChunk.height += Math.abs(height * textChunk.textAdvanceScale); + textChunk.height += Math.abs(height); } return textChunk; } @@ -45269,6 +45269,8 @@ if (!textContentItem.initialized) { return; } + textContentItem.width *= textContentItem.textAdvanceScale; + textContentItem.height *= textContentItem.textAdvanceScale; textContent.items.push(runBidiTransform(textContentItem)); textContentItem.initialized = false; textContentItem.str.length = 0; @@ -45381,16 +45383,16 @@ advance = items[j] * textState.fontSize / 1000; var breakTextRun = false; if (textState.font.vertical) { - offset = advance * (textState.textHScale * textState.textMatrix[2] + textState.textMatrix[3]); - textState.translateTextMatrix(0, advance); + offset = advance; + textState.translateTextMatrix(0, offset); breakTextRun = textContentItem.textRunBreakAllowed && advance > textContentItem.fakeMultiSpaceMax; if (!breakTextRun) { textContentItem.height += offset; } } else { advance = -advance; - offset = advance * (textState.textHScale * textState.textMatrix[0] + textState.textMatrix[1]); - textState.translateTextMatrix(advance, 0); + offset = advance * textState.textHScale; + textState.translateTextMatrix(offset, 0); breakTextRun = textContentItem.textRunBreakAllowed && advance > textContentItem.fakeMultiSpaceMax; if (!breakTextRun) { textContentItem.width += offset; @@ -45884,7 +45886,16 @@ } else if (isRef(entry)) { hash.update(entry.toString()); } else if (isArray(entry)) { - hash.update(entry.length.toString()); + var diffLength = entry.length, diffBuf = new Array(diffLength); + for (var j = 0; j < diffLength; j++) { + var diffEntry = entry[j]; + if (isName(diffEntry)) { + diffBuf[j] = diffEntry.name; + } else if (isNum(diffEntry) || isRef(diffEntry)) { + diffBuf[j] = diffEntry.toString(); + } + } + hash.update(diffBuf.join()); } } } @@ -47160,6 +47171,8 @@ switch (fieldType) { case 'Tx': return new TextWidgetAnnotation(parameters); + case 'Btn': + return new ButtonWidgetAnnotation(parameters); case 'Ch': return new ChoiceWidgetAnnotation(parameters); } @@ -47587,17 +47600,72 @@ }); return TextWidgetAnnotation; }(); + var ButtonWidgetAnnotation = function ButtonWidgetAnnotationClosure() { + function ButtonWidgetAnnotation(params) { + WidgetAnnotation.call(this, params); + this.data.checkBox = !this.hasFieldFlag(AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); + if (this.data.checkBox) { + if (!isName(this.data.fieldValue)) { + return; + } + this.data.fieldValue = this.data.fieldValue.name; + } + this.data.radioButton = this.hasFieldFlag(AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); + if (this.data.radioButton) { + this.data.fieldValue = this.data.buttonValue = null; + var fieldParent = params.dict.get('Parent'); + if (!isDict(fieldParent) || !fieldParent.has('V')) { + return; + } + var fieldParentValue = fieldParent.get('V'); + if (!isName(fieldParentValue)) { + return; + } + this.data.fieldValue = fieldParentValue.name; + var appearanceStates = params.dict.get('AP'); + if (!isDict(appearanceStates)) { + return; + } + var normalAppearanceState = appearanceStates.get('N'); + if (!isDict(normalAppearanceState)) { + return; + } + var keys = normalAppearanceState.getKeys(); + for (var i = 0, ii = keys.length; i < ii; i++) { + if (keys[i] !== 'Off') { + this.data.buttonValue = keys[i]; + break; + } + } + } + } + Util.inherit(ButtonWidgetAnnotation, WidgetAnnotation, { + getOperatorList: function ButtonWidgetAnnotation_getOperatorList(evaluator, task, renderForms) { + var operatorList = new OperatorList(); + if (renderForms) { + return Promise.resolve(operatorList); + } + if (this.appearance) { + return Annotation.prototype.getOperatorList.call(this, evaluator, task, renderForms); + } + return Promise.resolve(operatorList); + } + }); + return ButtonWidgetAnnotation; + }(); var ChoiceWidgetAnnotation = function ChoiceWidgetAnnotationClosure() { function ChoiceWidgetAnnotation(params) { WidgetAnnotation.call(this, params); this.data.options = []; - var options = params.dict.getArray('Opt'); + var options = params.dict.get('Opt'); if (isArray(options)) { + var xref = params.xref; for (var i = 0, ii = options.length; i < ii; i++) { - var option = options[i]; + var option = xref.fetchIfRef(options[i]); + var isOptionArray = isArray(option); this.data.options[i] = { - exportValue: isArray(option) ? option[0] : option, - displayValue: isArray(option) ? option[1] : option + exportValue: isOptionArray ? xref.fetchIfRef(option[0]) : option, + displayValue: isOptionArray ? xref.fetchIfRef(option[1]) : option }; } } diff --git a/browser/extensions/pdfjs/content/pdfjschildbootstrap.js b/browser/extensions/pdfjs/content/pdfjschildbootstrap.js index 1f44b9c2e8d8..2051e3055d56 100644 --- a/browser/extensions/pdfjs/content/pdfjschildbootstrap.js +++ b/browser/extensions/pdfjs/content/pdfjschildbootstrap.js @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* jshint esnext:true */ /* globals Components, PdfjsContentUtils, PdfJs, Services */ 'use strict'; diff --git a/browser/extensions/pdfjs/content/web/l10n.js b/browser/extensions/pdfjs/content/web/l10n.js index 04346ee1d650..e45cf200a5b9 100644 --- a/browser/extensions/pdfjs/content/web/l10n.js +++ b/browser/extensions/pdfjs/content/web/l10n.js @@ -1,4 +1,3 @@ - 'use strict'; // Small subset of the webL10n API by Fabien Cazenave for pdf.js extension. diff --git a/browser/extensions/pdfjs/content/web/viewer.css b/browser/extensions/pdfjs/content/web/viewer.css index cafa90738577..158842ac69fe 100644 --- a/browser/extensions/pdfjs/content/web/viewer.css +++ b/browser/extensions/pdfjs/content/web/viewer.css @@ -103,7 +103,9 @@ .annotationLayer .textWidgetAnnotation input, .annotationLayer .textWidgetAnnotation textarea, -.annotationLayer .choiceWidgetAnnotation select { +.annotationLayer .choiceWidgetAnnotation select, +.annotationLayer .buttonWidgetAnnotation.checkBox input, +.annotationLayer .buttonWidgetAnnotation.radioButton input { background-color: rgba(0, 54, 255, 0.13); border: 1px solid transparent; box-sizing: border-box; @@ -122,7 +124,9 @@ .annotationLayer .textWidgetAnnotation input[disabled], .annotationLayer .textWidgetAnnotation textarea[disabled], -.annotationLayer .choiceWidgetAnnotation select[disabled] { +.annotationLayer .choiceWidgetAnnotation select[disabled], +.annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], +.annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] { background: none; border: 1px solid transparent; cursor: not-allowed; @@ -130,7 +134,9 @@ .annotationLayer .textWidgetAnnotation input:hover, .annotationLayer .textWidgetAnnotation textarea:hover, -.annotationLayer .choiceWidgetAnnotation select:hover { +.annotationLayer .choiceWidgetAnnotation select:hover, +.annotationLayer .buttonWidgetAnnotation.checkBox input:hover, +.annotationLayer .buttonWidgetAnnotation.radioButton input:hover { border: 1px solid #000; } @@ -157,6 +163,12 @@ width: 115%; } +.annotationLayer .buttonWidgetAnnotation.checkBox input, +.annotationLayer .buttonWidgetAnnotation.radioButton input { + -moz-appearance: none; + appearance: none; +} + .annotationLayer .popupWrapper { position: absolute; width: 20em; diff --git a/browser/extensions/pdfjs/content/web/viewer.js b/browser/extensions/pdfjs/content/web/viewer.js index f853da16b7b9..1ee979322a8a 100644 --- a/browser/extensions/pdfjs/content/web/viewer.js +++ b/browser/extensions/pdfjs/content/web/viewer.js @@ -4119,7 +4119,7 @@ var pdfjsWebLibs; } if (error === 'cancelled') { self.error = null; - return; + return Promise.resolve(undefined); } self.renderingState = RenderingStates.FINISHED; if (self.loadingIconDiv) { @@ -4145,21 +4145,25 @@ var pdfjsWebLibs; pageNumber: self.id, cssTransform: false }); + if (error) { + return Promise.reject(error); + } + return Promise.resolve(undefined); }; var paintTask = this.renderer === RendererType.SVG ? this.paintOnSvg(canvasWrapper) : this.paintOnCanvas(canvasWrapper); paintTask.onRenderContinue = renderContinueCallback; this.paintTask = paintTask; var resultPromise = paintTask.promise.then(function () { - finishPaintTask(null); - if (textLayer) { - pdfPage.getTextContent({ normalizeWhitespace: true }).then(function textContentResolved(textContent) { - textLayer.setTextContent(textContent); - textLayer.render(TEXT_LAYER_RENDER_DELAY); - }); - } + return finishPaintTask(null).then(function () { + if (textLayer) { + pdfPage.getTextContent({ normalizeWhitespace: true }).then(function textContentResolved(textContent) { + textLayer.setTextContent(textContent); + textLayer.render(TEXT_LAYER_RENDER_DELAY); + }); + } + }); }, function (reason) { - finishPaintTask(reason); - throw reason; + return finishPaintTask(reason); }); if (this.annotationLayerFactory) { if (!this.annotationLayer) { diff --git a/browser/extensions/pocket/bootstrap.js b/browser/extensions/pocket/bootstrap.js index a9a70d0b7011..1d2f7313679f 100644 --- a/browser/extensions/pocket/bootstrap.js +++ b/browser/extensions/pocket/bootstrap.js @@ -91,13 +91,13 @@ function CreatePocketWidget(reason) { label: gPocketBundle.GetStringFromName("pocket-button.label"), tooltiptext: gPocketBundle.GetStringFromName("pocket-button.tooltiptext"), // Use forwarding functions here to avoid loading Pocket.jsm on startup: - onViewShowing: function() { + onViewShowing() { return Pocket.onPanelViewShowing.apply(this, arguments); }, - onViewHiding: function() { + onViewHiding() { return Pocket.onPanelViewHiding.apply(this, arguments); }, - onBeforeCreated: function(doc) { + onBeforeCreated(doc) { // Bug 1223127,CUI should make this easier to do. if (doc.getElementById("PanelUI-pocketView")) return; @@ -158,10 +158,10 @@ function CreatePocketWidget(reason) { // PocketContextMenu // When the context menu is opened check if we need to build and enable pocket UI. var PocketContextMenu = { - init: function() { + init() { Services.obs.addObserver(this, "on-build-contextmenu", false); }, - shutdown: function() { + shutdown() { Services.obs.removeObserver(this, "on-build-contextmenu"); // loop through windows and remove context menus // iterate through all windows and add pocket to them @@ -174,7 +174,7 @@ var PocketContextMenu = { } } }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { let subject = aSubject.wrappedJSObject; let document = subject.menu.ownerDocument; let pocketEnabled = CustomizableUI.getPlacementOfWidget("pocket-button"); @@ -240,20 +240,20 @@ var PocketReader = { this._hidden = hide; this.update(); }, - startup: function() { + startup() { // Setup the listeners, update will be called when the widget is added, // no need to do that now. let mm = Services.mm; mm.addMessageListener("Reader:OnSetup", this); mm.addMessageListener("Reader:Clicked-pocket-button", this); }, - shutdown: function() { + shutdown() { let mm = Services.mm; mm.removeMessageListener("Reader:OnSetup", this); mm.removeMessageListener("Reader:Clicked-pocket-button", this); this.hidden = true; }, - update: function() { + update() { if (this.hidden) { Services.mm.broadcastAsyncMessage("Reader:RemoveButton", { id: "pocket-button" }); } else { @@ -263,7 +263,7 @@ var PocketReader = { image: "chrome://pocket/content/panels/img/pocket.svg#pocket-mark" }); } }, - receiveMessage: function(message) { + receiveMessage(message) { switch (message.name) { case "Reader:OnSetup": { // Tell the reader about our button. @@ -299,7 +299,7 @@ var PocketReader = { function pktUIGetter(prop, window) { return { - get: function() { + get() { // delete any getters for properties loaded from main.js so we only load main.js once delete window.pktUI; delete window.pktApi; @@ -313,7 +313,7 @@ function pktUIGetter(prop, window) { } var PocketOverlay = { - startup: function(reason) { + startup(reason) { let styleSheetService = Cc["@mozilla.org/content/style-sheet-service;1"] .getService(Ci.nsIStyleSheetService); this._sheetType = styleSheetService.AUTHOR_SHEET; @@ -329,7 +329,7 @@ var PocketOverlay = { this.onWindowOpened(win); } }, - shutdown: function(reason) { + shutdown(reason) { let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIMessageBroadcaster); ppmm.broadcastAsyncMessage("PocketShuttingDown"); @@ -359,14 +359,14 @@ var PocketOverlay = { PocketContextMenu.shutdown(); PocketReader.shutdown(); }, - onWindowOpened: function(window) { + onWindowOpened(window) { if (window.hasOwnProperty("pktUI")) return; this.setWindowScripts(window); this.addStyles(window); this.updateWindow(window); }, - setWindowScripts: function(window) { + setWindowScripts(window) { XPCOMUtils.defineLazyModuleGetter(window, "Pocket", "chrome://pocket/content/Pocket.jsm"); // Can't use XPCOMUtils for these because the scripts try to define the variables @@ -376,7 +376,7 @@ var PocketOverlay = { Object.defineProperty(window, "pktUIMessaging", pktUIGetter("pktUIMessaging", window)); }, // called for each window as it is opened - updateWindow: function(window) { + updateWindow(window) { // insert our three menu items let document = window.document; let hidden = !CustomizableUI.getPlacementOfWidget("pocket-button"); @@ -438,7 +438,7 @@ var PocketOverlay = { sib.parentNode.insertBefore(menu, sib); } }, - onWidgetAfterDOMChange: function(aWidgetNode) { + onWidgetAfterDOMChange(aWidgetNode) { if (aWidgetNode.id != "pocket-button") { return; } @@ -455,12 +455,12 @@ var PocketOverlay = { PocketReader.hidden = hidden; }, - addStyles: function(win) { + addStyles(win) { let utils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); utils.addSheet(this._cachedSheet, this._sheetType); }, - removeStyles: function(win) { + removeStyles(win) { let utils = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); utils.removeSheet(gPocketStyleURI, this._sheetType); } diff --git a/browser/extensions/pocket/content/AboutPocket.jsm b/browser/extensions/pocket/content/AboutPocket.jsm index c7f57aa87304..53e7788b3e47 100644 --- a/browser/extensions/pocket/content/AboutPocket.jsm +++ b/browser/extensions/pocket/content/AboutPocket.jsm @@ -31,11 +31,11 @@ function AboutPage(chromeURL, aboutHost, classID, description, uriFlags) { AboutPage.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]), - getURIFlags: function(aURI) { // eslint-disable-line no-unused-vars + getURIFlags(aURI) { // eslint-disable-line no-unused-vars return this.uriFlags; }, - newChannel: function(aURI, aLoadInfo) { + newChannel(aURI, aLoadInfo) { let newURI = Services.io.newURI(this.chromeURL, null, null); let channel = Services.io.newChannelFromURIWithLoadInfo(newURI, aLoadInfo); @@ -48,20 +48,20 @@ AboutPage.prototype = { return channel; }, - createInstance: function(outer, iid) { + createInstance(outer, iid) { if (outer !== null) { throw Cr.NS_ERROR_NO_AGGREGATION; } return this.QueryInterface(iid); }, - register: function() { + register() { Cm.QueryInterface(Ci.nsIComponentRegistrar).registerFactory( this.classID, this.description, "@mozilla.org/network/protocol/about;1?what=" + this.aboutHost, this); }, - unregister: function() { + unregister() { Cm.QueryInterface(Ci.nsIComponentRegistrar).unregisterFactory( this.classID, this); } diff --git a/browser/extensions/pocket/content/main.js b/browser/extensions/pocket/content/main.js index ff3b5eccaff2..07147fd2155a 100644 --- a/browser/extensions/pocket/content/main.js +++ b/browser/extensions/pocket/content/main.js @@ -175,7 +175,7 @@ var pktUI = (function() { + inOverflowMenu + "&locale=" + getUILocale(), { - onShow: function() { + onShow() { }, onHide: panelDidHide, width: inOverflowMenu ? overflowMenuWidth : 300, @@ -203,7 +203,7 @@ var pktUI = (function() { } var panelId = showPanel("about:pocket-saved?pockethost=" + Services.prefs.getCharPref("extensions.pocket.site") + "&premiumStatus=" + (pktApi.isPremiumUser() ? '1' : '0') + '&inoverflowmenu=' + inOverflowMenu + "&locale=" + getUILocale(), { - onShow: function() { + onShow() { var saveLinkMessageId = 'saveLink'; // Send error message for invalid url @@ -229,15 +229,15 @@ var pktUI = (function() { // Add url var options = { - success: function(data, request) { + success(data, request) { var item = data.item; var successResponse = { status: "success", - item: item + item }; pktUIMessaging.sendMessageToPanel(panelId, saveLinkMessageId, successResponse); }, - error: function(error, request) { + error(error, request) { // If user is not authorized show singup page if (request.status === 401) { showSignUp(); @@ -418,8 +418,8 @@ var pktUI = (function() { pktUIMessaging.addMessageListener(iframe, _getTagsMessageId, function(panelId, data) { pktApi.getTags(function(tags, usedTags) { pktUIMessaging.sendResponseMessageToPanel(panelId, _getTagsMessageId, { - tags: tags, - usedTags: usedTags + tags, + usedTags }); }); }); @@ -428,17 +428,17 @@ var pktUI = (function() { var _getSuggestedTagsMessageId = "getSuggestedTags"; pktUIMessaging.addMessageListener(iframe, _getSuggestedTagsMessageId, function(panelId, data) { pktApi.getSuggestedTagsForURL(data.url, { - success: function(data, response) { + success(data, response) { var suggestedTags = data.suggested_tags; var successResponse = { status: "success", value: { - suggestedTags: suggestedTags + suggestedTags } } pktUIMessaging.sendResponseMessageToPanel(panelId, _getSuggestedTagsMessageId, successResponse); }, - error: function(error, response) { + error(error, response) { pktUIMessaging.sendErrorResponseMessageToPanel(panelId, _getSuggestedTagsMessageId, error); } }) @@ -448,11 +448,11 @@ var pktUI = (function() { var _addTagsMessageId = "addTags"; pktUIMessaging.addMessageListener(iframe, _addTagsMessageId, function(panelId, data) { pktApi.addTagsToURL(data.url, data.tags, { - success: function(data, response) { + success(data, response) { var successResponse = {status: "success"}; pktUIMessaging.sendResponseMessageToPanel(panelId, _addTagsMessageId, successResponse); }, - error: function(error, response) { + error(error, response) { pktUIMessaging.sendErrorResponseMessageToPanel(panelId, _addTagsMessageId, error); } }); @@ -462,11 +462,11 @@ var pktUI = (function() { var _deleteItemMessageId = "deleteItem"; pktUIMessaging.addMessageListener(iframe, _deleteItemMessageId, function(panelId, data) { pktApi.deleteItem(data.itemId, { - success: function(data, response) { + success(data, response) { var successResponse = {status: "success"}; pktUIMessaging.sendResponseMessageToPanel(panelId, _deleteItemMessageId, successResponse); }, - error: function(error, response) { + error(error, response) { pktUIMessaging.sendErrorResponseMessageToPanel(panelId, _deleteItemMessageId, error); } }) @@ -485,7 +485,7 @@ var pktUI = (function() { strings[str.key] = str.value; } } - pktUIMessaging.sendResponseMessageToPanel(panelId, _initL10NMessageId, { strings: strings }); + pktUIMessaging.sendResponseMessageToPanel(panelId, _initL10NMessageId, { strings }); }); } @@ -588,15 +588,15 @@ var pktUI = (function() { * Public functions */ return { - getPanelFrame: getPanelFrame, + getPanelFrame, - openTabWithUrl: openTabWithUrl, + openTabWithUrl, - pocketPanelDidShow: pocketPanelDidShow, - pocketPanelDidHide: pocketPanelDidHide, + pocketPanelDidShow, + pocketPanelDidHide, - tryToSaveUrl: tryToSaveUrl, - tryToSaveCurrentPage: tryToSaveCurrentPage + tryToSaveUrl, + tryToSaveCurrentPage }; }()); @@ -669,12 +669,12 @@ var pktUIMessaging = (function() { * iframe as a message response */ function sendErrorMessageToPanel(panelId, messageId, error) { - var errorResponse = {status: "error", error: error}; + var errorResponse = {status: "error", error}; sendMessageToPanel(panelId, messageId, errorResponse); } function sendErrorResponseMessageToPanel(panelId, messageId, error) { - var errorResponse = {status: "error", error: error}; + var errorResponse = {status: "error", error}; sendResponseMessageToPanel(panelId, messageId, errorResponse); } @@ -730,10 +730,10 @@ var pktUIMessaging = (function() { * Public */ return { - addMessageListener: addMessageListener, - sendMessageToPanel: sendMessageToPanel, - sendResponseMessageToPanel: sendResponseMessageToPanel, - sendErrorMessageToPanel: sendErrorMessageToPanel, - sendErrorResponseMessageToPanel: sendErrorResponseMessageToPanel + addMessageListener, + sendMessageToPanel, + sendResponseMessageToPanel, + sendErrorMessageToPanel, + sendErrorResponseMessageToPanel } }()); diff --git a/browser/extensions/pocket/content/panels/js/messages.js b/browser/extensions/pocket/content/panels/js/messages.js index ae08c3e73a3b..eeeceb0a78f4 100644 --- a/browser/extensions/pocket/content/panels/js/messages.js +++ b/browser/extensions/pocket/content/panels/js/messages.js @@ -40,7 +40,7 @@ var pktPanelMessaging = (function() { // Payload needs to be an object in format: // { panelId: panelId, data: {} } var messagePayload = { - panelId: panelId, + panelId, data: (payload || {}) }; @@ -70,9 +70,9 @@ var pktPanelMessaging = (function() { * Public functions */ return { - panelIdFromURL: panelIdFromURL, - addMessageListener : addMessageListener, - removeMessageListener : removeMessageListener, - sendMessage: sendMessage + panelIdFromURL, + addMessageListener, + removeMessageListener, + sendMessage }; }()); diff --git a/browser/extensions/pocket/content/panels/js/saved.js b/browser/extensions/pocket/content/panels/js/saved.js index ff47020d040c..64642f474a75 100644 --- a/browser/extensions/pocket/content/panels/js/saved.js +++ b/browser/extensions/pocket/content/panels/js/saved.js @@ -173,7 +173,7 @@ var PKT_SAVED_OVERLAY = function(options) noResultsHideDropdown: true, scrollKeyboard: true, emptyInputLength: 200, - search_function: function(term, cb) { + search_function(term, cb) { var returnlist = []; if (term.length) { var limit = 15; @@ -191,7 +191,7 @@ var PKT_SAVED_OVERLAY = function(options) } cb(returnlist); }, - textToData: function(text) { + textToData(text) { if ($.trim(text).length > 25 || !$.trim(text).length) { if (text.length > 25) { myself.showTagsError(myself.dictJSON.maxtaglength); @@ -205,7 +205,7 @@ var PKT_SAVED_OVERLAY = function(options) myself.hideTagsError(); return {name:myself.sanitizeText(text.toLowerCase())}; }, - onReady: function() { + onReady() { $('.token-input-dropdown').addClass('token-input-dropdown-tag'); inputwrapper.find('.token-input-input-token input').attr('placeholder', $('.tag-input').attr('placeholder')).css('width', '200px'); if ($('.pkt_ext_suggestedtag_detail').length) { @@ -237,22 +237,22 @@ var PKT_SAVED_OVERLAY = function(options) }); myself.checkPlaceholderStatus(); }, - onAdd: function() { + onAdd() { myself.checkValidTagSubmit(); changestamp = Date.now(); myself.hideInactiveTags(); myself.checkPlaceholderStatus(); }, - onDelete: function() { + onDelete() { myself.checkValidTagSubmit(); changestamp = Date.now(); myself.showActiveTags(); myself.checkPlaceholderStatus(); }, - onShowDropdown: function() { + onShowDropdown() { thePKT_SAVED.sendMessage("expandSavePanel"); }, - onHideDropdown: function() { + onHideDropdown() { thePKT_SAVED.sendMessage("collapseSavePanel"); } }); @@ -457,7 +457,7 @@ var PKT_SAVED_OVERLAY = function(options) }; PKT_SAVED_OVERLAY.prototype = { - create : function() + create() { if (this.active) { @@ -497,7 +497,7 @@ PKT_SAVED_OVERLAY.prototype = { this.initOpenListInput(); this.initAutoCloseEvents(); }, - createPremiumFunctionality: function() + createPremiumFunctionality() { if (this.premiumStatus && !$('.pkt_ext_suggestedtag_detail').length) { @@ -512,7 +512,7 @@ PKT_SAVED_OVERLAY.prototype = { var PKT_SAVED = function() {}; PKT_SAVED.prototype = { - init: function() { + init() { if (this.inited) { return; } @@ -522,15 +522,15 @@ PKT_SAVED.prototype = { this.inited = true; }, - addMessageListener: function(messageId, callback) { + addMessageListener(messageId, callback) { pktPanelMessaging.addMessageListener(this.panelId, messageId, callback); }, - sendMessage: function(messageId, payload, callback) { + sendMessage(messageId, payload, callback) { pktPanelMessaging.sendMessage(this.panelId, messageId, payload, callback); }, - create: function() { + create() { var myself = this; var url = window.location.href.match(/premiumStatus=([\w|\d|\.]*)&?/); if (url && url.length > 1) diff --git a/browser/extensions/pocket/content/panels/js/signup.js b/browser/extensions/pocket/content/panels/js/signup.js index 08821be99324..13794995286d 100644 --- a/browser/extensions/pocket/content/panels/js/signup.js +++ b/browser/extensions/pocket/content/panels/js/signup.js @@ -61,7 +61,7 @@ var PKT_SIGNUP_OVERLAY = function(options) }; PKT_SIGNUP_OVERLAY.prototype = { - create : function() + create() { var controlvariant = window.location.href.match(/controlvariant=([\w|\.]*)&?/); if (controlvariant && controlvariant.length > 1) @@ -145,7 +145,7 @@ PKT_SIGNUP_OVERLAY.prototype = { var PKT_SIGNUP = function() {}; PKT_SIGNUP.prototype = { - init: function() { + init() { if (this.inited) { return; } @@ -155,15 +155,15 @@ PKT_SIGNUP.prototype = { this.inited = true; }, - addMessageListener: function(messageId, callback) { + addMessageListener(messageId, callback) { pktPanelMessaging.addMessageListener(this.panelId, messageId, callback); }, - sendMessage: function(messageId, payload, callback) { + sendMessage(messageId, payload, callback) { pktPanelMessaging.sendMessage(this.panelId, messageId, payload, callback); }, - create: function() { + create() { this.overlay.create(); // tell back end we're ready diff --git a/browser/extensions/pocket/content/pktApi.jsm b/browser/extensions/pocket/content/pktApi.jsm index 63b6d415c9e8..f18117ec0a13 100644 --- a/browser/extensions/pocket/content/pktApi.jsm +++ b/browser/extensions/pocket/content/pktApi.jsm @@ -337,7 +337,7 @@ var pktApi = (function() { var sendData = { access_token: accessToken, - url: url, + url, since: since ? since : 0 }; @@ -348,7 +348,7 @@ var pktApi = (function() { return apiRequest({ path: "/firefox/save", data: sendData, - success: function(data) { + success(data) { // Update premium status, tags and since var tags = data.tags; @@ -458,7 +458,7 @@ var pktApi = (function() { * @return {Boolean} Returns Boolean whether the api call started sucessfully */ function addTagsToURL(url, tags, options) { - return addTags({url: url}, tags, options); + return addTags({url}, tags, options); } /** @@ -475,7 +475,7 @@ var pktApi = (function() { // Tags add action var action = { action: "tags_add", - tags: tags + tags }; action = extend(action, actionPart); @@ -584,7 +584,7 @@ var pktApi = (function() { * @return {Boolean} Returns Boolean whether the api call started sucessfully */ function getSuggestedTagsForURL(url, options) { - return getSuggestedTags({url: url}, options); + return getSuggestedTags({url}, options); } /** @@ -600,7 +600,7 @@ var pktApi = (function() { return apiRequest({ path: "/getSuggestedTags", - data: data, + data, success: options.success, error: options.error }); @@ -642,16 +642,16 @@ var pktApi = (function() { * Public functions */ return { - isUserLoggedIn : isUserLoggedIn, - clearUserData: clearUserData, - addLink: addLink, - deleteItem: deleteItem, - addTagsToItem: addTagsToItem, - addTagsToURL: addTagsToURL, - getTags: getTags, - isPremiumUser: isPremiumUser, - getSuggestedTagsForItem: getSuggestedTagsForItem, - getSuggestedTagsForURL: getSuggestedTagsForURL, - getSignupPanelTabTestVariant: getSignupPanelTabTestVariant, + isUserLoggedIn, + clearUserData, + addLink, + deleteItem, + addTagsToItem, + addTagsToURL, + getTags, + isPremiumUser, + getSuggestedTagsForItem, + getSuggestedTagsForURL, + getSignupPanelTabTestVariant, }; }()); diff --git a/browser/extensions/pocket/test/head.js b/browser/extensions/pocket/test/head.js index e044a42c76ba..a4cf877b0196 100644 --- a/browser/extensions/pocket/test/head.js +++ b/browser/extensions/pocket/test/head.js @@ -36,7 +36,7 @@ function promisePocketDisabled() { } return new Promise((resolve, reject) => { let listener = { - onWidgetDestroyed: function(widgetid) { + onWidgetDestroyed(widgetid) { if (widgetid == "pocket-button") { CustomizableUI.removeListener(listener); info( "pocket-button destroyed"); diff --git a/browser/extensions/presentation/bootstrap.js b/browser/extensions/presentation/bootstrap.js index 5cd2f11036b9..d81e3643adaa 100644 --- a/browser/extensions/presentation/bootstrap.js +++ b/browser/extensions/presentation/bootstrap.js @@ -33,7 +33,7 @@ function shutdown(aData, aReason) { // Register/unregister a constructor as a factory. function Factory() {} Factory.prototype = { - register: function(targetConstructor) { + register(targetConstructor) { let proto = targetConstructor.prototype; this._classID = proto.classID; @@ -45,7 +45,7 @@ Factory.prototype = { proto.contractID, factory); }, - unregister: function() { + unregister() { let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar); registrar.unregisterFactory(this._classID, this._factory); this._factory = null; @@ -55,14 +55,14 @@ Factory.prototype = { var Presentation = { // PUBLIC APIs - init: function() { + init() { log("init"); // Register PresentationDevicePrompt into a XPCOM component. Cu.import(PRESENTATION_DEVICE_PROMPT_PATH); this._register(); }, - uninit: function() { + uninit() { log("uninit"); // Unregister PresentationDevicePrompt XPCOM component. this._unregister(); @@ -70,13 +70,13 @@ var Presentation = { }, // PRIVATE APIs - _register: function() { + _register() { log("_register"); this._devicePromptFactory = new Factory(); this._devicePromptFactory.register(PresentationDevicePrompt); }, - _unregister: function() { + _unregister() { log("_unregister"); this._devicePromptFactory.unregister(); delete this._devicePromptFactory; diff --git a/browser/extensions/presentation/content/PresentationDevicePrompt.jsm b/browser/extensions/presentation/content/PresentationDevicePrompt.jsm index 883ffff34fa3..949040192712 100644 --- a/browser/extensions/presentation/content/PresentationDevicePrompt.jsm +++ b/browser/extensions/presentation/content/PresentationDevicePrompt.jsm @@ -171,7 +171,7 @@ PresentationPermissionPrompt.prototype = { } return this.principal.URI.hostPort; }, - _createPopupContent: function() { + _createPopupContent() { log("_createPopupContent"); if (!this._devices.length) { @@ -223,7 +223,7 @@ PresentationDevicePrompt.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIPresentationDevicePrompt]), // This will be fired when window.PresentationRequest(URL).start() is called. - promptDeviceSelection: function(aRequest) { + promptDeviceSelection(aRequest) { log("promptDeviceSelection"); // Cancel request if no available device. @@ -238,7 +238,7 @@ PresentationDevicePrompt.prototype = { let promptUI = new PresentationPermissionPrompt(aRequest, devices); promptUI.prompt(); }, - _loadDevices: function() { + _loadDevices() { let deviceManager = Cc["@mozilla.org/presentation-device/manager;1"] .getService(Ci.nsIPresentationDeviceManager); let devices = deviceManager.getAvailableDevices().QueryInterface(Ci.nsIArray); diff --git a/browser/locales/en-US/chrome/browser/preferences/containers.dtd b/browser/locales/en-US/chrome/browser/preferences/containers.dtd index 58eca1ace804..d715813548c5 100644 --- a/browser/locales/en-US/chrome/browser/preferences/containers.dtd +++ b/browser/locales/en-US/chrome/browser/preferences/containers.dtd @@ -2,9 +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/. --> - + + @@ -13,6 +14,7 @@ + diff --git a/browser/locales/en-US/chrome/browser/preferences/containers.properties b/browser/locales/en-US/chrome/browser/preferences/containers.properties index 9866a06595a8..6b78a9263fca 100644 --- a/browser/locales/en-US/chrome/browser/preferences/containers.properties +++ b/browser/locales/en-US/chrome/browser/preferences/containers.properties @@ -2,14 +2,7 @@ # 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/. -containers.removeButton = Remove -containers.preferencesButton = Preferences -containers.colorHeading = Color: containers.labelMinWidth = 4rem -containers.nameLabel = Name: -containers.namePlaceholder = Enter a container name -containers.submitButton = Done -containers.iconHeading = Icon: containers.updateContainerTitle = %S Container Preferences containers.blue.label = Blue diff --git a/browser/modules/AboutHome.jsm b/browser/modules/AboutHome.jsm index 01cbafba99f4..627e7bd56af2 100644 --- a/browser/modules/AboutHome.jsm +++ b/browser/modules/AboutHome.jsm @@ -104,7 +104,7 @@ var AboutHome = { "AboutHome:MaybeShowAutoMigrationUndoNotification", ], - init: function() { + init() { let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager); for (let msg of this.MESSAGES) { @@ -112,7 +112,7 @@ var AboutHome = { } }, - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { let window = aMessage.target.ownerGlobal; switch (aMessage.name) { @@ -160,7 +160,7 @@ var AboutHome = { // Send all the chrome-privileged data needed by about:home. This // gets re-sent when the search engine changes. - sendAboutHomeData: function(target) { + sendAboutHomeData(target) { let wrapper = {}; Components.utils.import("resource:///modules/sessionstore/SessionStore.jsm", wrapper); diff --git a/browser/modules/AboutNewTab.jsm b/browser/modules/AboutNewTab.jsm index 145cec09a71a..afb04ad499fb 100644 --- a/browser/modules/AboutNewTab.jsm +++ b/browser/modules/AboutNewTab.jsm @@ -22,17 +22,17 @@ var AboutNewTab = { pageListener: null, - init: function() { + init() { this.pageListener = new RemotePages("about:newtab"); this.pageListener.addMessageListener("NewTab:Customize", this.customize.bind(this)); }, - customize: function(message) { + customize(message) { NewTabUtils.allPages.enabled = message.data.enabled; NewTabUtils.allPages.enhanced = message.data.enhanced; }, - uninit: function() { + uninit() { this.pageListener.destroy(); this.pageListener = null; }, diff --git a/browser/modules/BrowserUITelemetry.jsm b/browser/modules/BrowserUITelemetry.jsm index 6e54d45df651..8f74aca423a8 100644 --- a/browser/modules/BrowserUITelemetry.jsm +++ b/browser/modules/BrowserUITelemetry.jsm @@ -170,7 +170,7 @@ const BUCKET_PREFIX = "bucket_"; const BUCKET_SEPARATOR = "|"; this.BrowserUITelemetry = { - init: function() { + init() { UITelemetry.addSimpleMeasureFunction("toolbars", this.getToolbarMeasures.bind(this)); UITelemetry.addSimpleMeasureFunction("contextmenu", @@ -189,7 +189,7 @@ this.BrowserUITelemetry = { CustomizableUI.addListener(this); }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { switch (aTopic) { case "sessionstore-windows-restored": this._gatherFirstWindowMeasurements(); @@ -241,7 +241,7 @@ this.BrowserUITelemetry = { * @returns a reference to the second last object in the chain - * so in our example, that'd be "b". */ - _ensureObjectChain: function(aKeys, aEndWith, aRoot) { + _ensureObjectChain(aKeys, aEndWith, aRoot) { let current = aRoot; let parent = null; aKeys.unshift(this._bucket); @@ -260,13 +260,13 @@ this.BrowserUITelemetry = { }, _countableEvents: {}, - _countEvent: function(aKeyArray, root = this._countableEvents) { + _countEvent(aKeyArray, root = this._countableEvents) { let countObject = this._ensureObjectChain(aKeyArray, 0, root); let lastItemKey = aKeyArray[aKeyArray.length - 1]; countObject[lastItemKey]++; }, - _countMouseUpEvent: function(aCategory, aAction, aButton) { + _countMouseUpEvent(aCategory, aAction, aButton) { const BUTTONS = ["left", "middle", "right"]; let buttonKey = BUTTONS[aButton]; if (buttonKey) { @@ -275,7 +275,7 @@ this.BrowserUITelemetry = { }, _firstWindowMeasurements: null, - _gatherFirstWindowMeasurements: function() { + _gatherFirstWindowMeasurements() { // We'll gather measurements as soon as the session has restored. // We do this here instead of waiting for UITelemetry to ask for // our measurements because at that point all browser windows have @@ -295,7 +295,7 @@ this.BrowserUITelemetry = { }); }, - _registerWindow: function(aWindow) { + _registerWindow(aWindow) { aWindow.addEventListener("unload", this); let document = aWindow.document; @@ -323,7 +323,7 @@ this.BrowserUITelemetry = { WINDOW_DURATION_MAP.set(aWindow, {}); }, - _unregisterWindow: function(aWindow) { + _unregisterWindow(aWindow) { aWindow.removeEventListener("unload", this); let document = aWindow.document; @@ -349,7 +349,7 @@ this.BrowserUITelemetry = { } }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "unload": this._unregisterWindow(aEvent.currentTarget); @@ -363,7 +363,7 @@ this.BrowserUITelemetry = { } }, - _handleMouseUp: function(aEvent) { + _handleMouseUp(aEvent) { let targetID = aEvent.currentTarget.id; switch (targetID) { @@ -381,7 +381,7 @@ this.BrowserUITelemetry = { } }, - _handleMouseDown: function(aEvent) { + _handleMouseDown(aEvent) { if (aEvent.currentTarget.id == "PanelUI-menu-button") { // _countMouseUpEvent expects a detail for the second argument, // but we don't really have any details to give. Just passing in @@ -391,13 +391,13 @@ this.BrowserUITelemetry = { } }, - _PlacesChevronMouseUp: function(aEvent) { + _PlacesChevronMouseUp(aEvent) { let target = aEvent.originalTarget; let result = target.id == "PlacesChevron" ? "chevron" : "overflowed-item"; this._countMouseUpEvent("click-bookmarks-bar", result, aEvent.button); }, - _PlacesToolbarItemsMouseUp: function(aEvent) { + _PlacesToolbarItemsMouseUp(aEvent) { let target = aEvent.originalTarget; // If this isn't a bookmark-item, we don't care about it. if (!target.classList.contains("bookmark-item")) { @@ -408,14 +408,14 @@ this.BrowserUITelemetry = { this._countMouseUpEvent("click-bookmarks-bar", result, aEvent.button); }, - _menubarMouseUp: function(aEvent) { + _menubarMouseUp(aEvent) { let target = aEvent.originalTarget; let tag = target.localName let result = (tag == "menu" || tag == "menuitem") ? tag : "other"; this._countMouseUpEvent("click-menubar", result, aEvent.button); }, - _bookmarksMenuButtonMouseUp: function(aEvent) { + _bookmarksMenuButtonMouseUp(aEvent) { let bookmarksWidget = CustomizableUI.getWidget("bookmarks-menu-button"); if (bookmarksWidget.areaType == CustomizableUI.TYPE_MENU_PANEL) { // In the menu panel, only the star is visible, and that opens up the @@ -441,7 +441,7 @@ this.BrowserUITelemetry = { } }, - _checkForBuiltinItem: function(aEvent) { + _checkForBuiltinItem(aEvent) { let item = aEvent.originalTarget; // We don't want to count clicks on the private browsing @@ -482,7 +482,7 @@ this.BrowserUITelemetry = { } }, - _getWindowMeasurements: function(aWindow, searchResult) { + _getWindowMeasurements(aWindow, searchResult) { let document = aWindow.document; let result = {}; @@ -582,14 +582,14 @@ this.BrowserUITelemetry = { return result; }, - getToolbarMeasures: function() { + getToolbarMeasures() { let result = this._firstWindowMeasurements || {}; result.countableEvents = this._countableEvents; result.durations = this._durations; return result; }, - getSyncState: function() { + getSyncState() { let result = {}; for (let sub of ["desktop", "mobile"]) { let count = 0; @@ -601,11 +601,11 @@ this.BrowserUITelemetry = { return result; }, - countCustomizationEvent: function(aEventType) { + countCustomizationEvent(aEventType) { this._countEvent(["customize", aEventType]); }, - countSearchEvent: function(source, query, selection) { + countSearchEvent(source, query, selection) { this._countEvent(["search", source]); if ((/^[a-zA-Z]+:[^\/\\]/).test(query)) { this._countEvent(["search", "urlbar-keyword"]); @@ -615,35 +615,35 @@ this.BrowserUITelemetry = { } }, - countOneoffSearchEvent: function(id, type, where) { + countOneoffSearchEvent(id, type, where) { this._countEvent(["search-oneoff", id, type, where]); }, - countSearchSettingsEvent: function(source) { + countSearchSettingsEvent(source) { this._countEvent(["click-builtin-item", source, "search-settings"]); }, - countPanicEvent: function(timeId) { + countPanicEvent(timeId) { this._countEvent(["forget-button", timeId]); }, - countTabMutingEvent: function(action, reason) { + countTabMutingEvent(action, reason) { this._countEvent(["tab-audio-control", action, reason || "no reason given"]); }, - countSyncedTabEvent: function(what, where) { + countSyncedTabEvent(what, where) { // "what" will be, eg, "open" // "where" will be "toolbarbutton-subview" or "sidebar" this._countEvent(["synced-tabs", what, where]); }, - countSidebarEvent: function(sidebarID, action) { + countSidebarEvent(sidebarID, action) { // sidebarID is the ID of the sidebar (duh!) // action will be "hide" or "show" this._countEvent(["sidebar", sidebarID, action]); }, - _logAwesomeBarSearchResult: function(url) { + _logAwesomeBarSearchResult(url) { let spec = Services.search.parseSubmissionURL(url); if (spec.engine) { let matchedEngine = "default"; @@ -658,7 +658,7 @@ this.BrowserUITelemetry = { customization: [], }, - onCustomizeStart: function(aWindow) { + onCustomizeStart(aWindow) { this._countEvent(["customize", "start"]); let durationMap = WINDOW_DURATION_MAP.get(aWindow); if (!durationMap) { @@ -672,12 +672,12 @@ this.BrowserUITelemetry = { }; }, - onCustomizeEnd: function(aWindow) { + onCustomizeEnd(aWindow) { let durationMap = WINDOW_DURATION_MAP.get(aWindow); if (durationMap && "customization" in durationMap) { let duration = aWindow.performance.now() - durationMap.customization.start; this._durations.customization.push({ - duration: duration, + duration, bucket: durationMap.customization.bucket, }); delete durationMap.customization; @@ -720,7 +720,7 @@ this.BrowserUITelemetry = { _contextMenuInteractions: {}, - registerContextMenuInteraction: function(keys, itemID) { + registerContextMenuInteraction(keys, itemID) { if (itemID) { if (itemID == "openlinkprivate") { // Don't record anything, not even an other-item count @@ -738,7 +738,7 @@ this.BrowserUITelemetry = { this._countEvent(keys, this._contextMenuInteractions); }, - getContextMenuInfo: function() { + getContextMenuInfo() { return this._contextMenuInteractions; }, @@ -777,7 +777,7 @@ this.BrowserUITelemetry = { * * @param aName Name of bucket, or null for default bucket name (__DEFAULT__) */ - setBucket: function(aName) { + setBucket(aName) { if (this._bucketTimer) { Timer.clearTimeout(this._bucketTimer); this._bucketTimer = null; @@ -820,7 +820,7 @@ this.BrowserUITelemetry = { * timed as though they started expiring 300ms before * setExpiringBucket was called. */ - setExpiringBucket: function(aName, aTimeSteps, aTimeOffset = 0) { + setExpiringBucket(aName, aTimeSteps, aTimeOffset = 0) { if (aTimeSteps.length === 0) { this.setBucket(null); return; @@ -858,7 +858,7 @@ this.BrowserUITelemetry = { * * @return Minimal string representation. */ - _toTimeStr: function(aTimeMS) { + _toTimeStr(aTimeMS) { let timeStr = ""; function reduce(aUnitLength, aSymbol) { diff --git a/browser/modules/CastingApps.jsm b/browser/modules/CastingApps.jsm index 6f9be7c3ba5a..3d4f6f5b0941 100644 --- a/browser/modules/CastingApps.jsm +++ b/browser/modules/CastingApps.jsm @@ -12,17 +12,17 @@ Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm"); var CastingApps = { - _sendEventToVideo: function(element, data) { + _sendEventToVideo(element, data) { let event = element.ownerDocument.createEvent("CustomEvent"); event.initCustomEvent("media-videoCasting", false, true, JSON.stringify(data)); element.dispatchEvent(event); }, - makeURI: function(url, charset, baseURI) { + makeURI(url, charset, baseURI) { return Services.io.newURI(url, charset, baseURI); }, - getVideo: function(element) { + getVideo(element) { if (!element) { return null; } @@ -45,7 +45,7 @@ var CastingApps = { // Use the file extension to guess the mime type let sourceURI = this.makeURI(sourceURL, null, this.makeURI(element.baseURI)); if (this.allowableExtension(sourceURI, extensions)) { - return { element: element, source: sourceURI.spec, poster: posterURL, sourceURI: sourceURI}; + return { element, source: sourceURI.spec, poster: posterURL, sourceURI}; } } @@ -58,14 +58,14 @@ var CastingApps = { // Using the type attribute is our ideal way to guess the mime type. Otherwise, // fallback to using the file extension to guess the mime type if (this.allowableMimeType(sourceNode.type, types) || this.allowableExtension(sourceURI, extensions)) { - return { element: element, source: sourceURI.spec, poster: posterURL, sourceURI: sourceURI, type: sourceNode.type }; + return { element, source: sourceURI.spec, poster: posterURL, sourceURI, type: sourceNode.type }; } } return null; }, - sendVideoToService: function(videoElement, service) { + sendVideoToService(videoElement, service) { if (!service) return; @@ -101,9 +101,9 @@ var CastingApps = { } this.session = { - service: service, - app: app, - remoteMedia: remoteMedia, + service, + app, + remoteMedia, data: { title: video.title, source: video.source, @@ -116,7 +116,7 @@ var CastingApps = { }); }, - getServicesForVideo: function(videoElement) { + getServicesForVideo(videoElement) { let video = this.getVideo(videoElement); if (!video) { return {}; @@ -130,12 +130,12 @@ var CastingApps = { return filteredServices; }, - getServicesForMirroring: function() { + getServicesForMirroring() { return SimpleServiceDiscovery.services.filter(service => service.mirror); }, // RemoteMedia callback API methods - onRemoteMediaStart: function(remoteMedia) { + onRemoteMediaStart(remoteMedia) { if (!this.session) { return; } @@ -148,17 +148,17 @@ var CastingApps = { } }, - onRemoteMediaStop: function(remoteMedia) { + onRemoteMediaStop(remoteMedia) { }, - onRemoteMediaStatus: function(remoteMedia) { + onRemoteMediaStatus(remoteMedia) { }, - allowableExtension: function(uri, extensions) { + allowableExtension(uri, extensions) { return (uri instanceof Ci.nsIURL) && extensions.indexOf(uri.fileExtension) != -1; }, - allowableMimeType: function(type, types) { + allowableMimeType(type, types) { return types.indexOf(type) != -1; } }; diff --git a/browser/modules/ContentClick.jsm b/browser/modules/ContentClick.jsm index 997588bcd5ba..d2e0419054c4 100644 --- a/browser/modules/ContentClick.jsm +++ b/browser/modules/ContentClick.jsm @@ -16,12 +16,12 @@ Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); var ContentClick = { - init: function() { + init() { let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager); mm.addMessageListener("Content:Click", this); }, - receiveMessage: function(message) { + receiveMessage(message) { switch (message.name) { case "Content:Click": this.contentAreaClick(message.json, message.target) @@ -29,7 +29,7 @@ var ContentClick = { } }, - contentAreaClick: function(json, browser) { + contentAreaClick(json, browser) { // This is heavily based on contentAreaClick from browser.js (Bug 903016) // The json is set up in a way to look like an Event. let window = browser.ownerGlobal; diff --git a/browser/modules/ContentCrashHandlers.jsm b/browser/modules/ContentCrashHandlers.jsm index 18dd516391a6..dda1780ac1fc 100644 --- a/browser/modules/ContentCrashHandlers.jsm +++ b/browser/modules/ContentCrashHandlers.jsm @@ -55,7 +55,7 @@ this.TabCrashHandler = { return this.prefs = Services.prefs.getBranch("browser.tabs.crashReporting."); }, - init: function() { + init() { if (this.initialized) return; this.initialized = true; @@ -74,7 +74,7 @@ this.TabCrashHandler = { this.pageListener.addMessageListener("restoreAll", this.receiveMessage.bind(this)); }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { switch (aTopic) { case "ipc:content-shutdown": { aSubject.QueryInterface(Ci.nsIPropertyBag2); @@ -140,7 +140,7 @@ this.TabCrashHandler = { } }, - receiveMessage: function(message) { + receiveMessage(message) { let browser = message.target.browser; let gBrowser = browser.ownerGlobal.gBrowser; let tab = gBrowser.getTabForBrowser(browser); @@ -400,7 +400,7 @@ this.TabCrashHandler = { this.removeSubmitCheckboxesForSameCrash(childID); }, - removeSubmitCheckboxesForSameCrash: function(childID) { + removeSubmitCheckboxesForSameCrash(childID) { let enumerator = Services.wm.getEnumerator("navigator:browser"); while (enumerator.hasMoreElements()) { let window = enumerator.getNext(); @@ -428,7 +428,7 @@ this.TabCrashHandler = { } }, - onAboutTabCrashedLoad: function(message) { + onAboutTabCrashedLoad(message) { this._crashedTabCount++; // Broadcast to all about:tabcrashed pages a count of @@ -834,7 +834,7 @@ this.UnsubmittedCrashHandler = { }, { label: gNavigatorBundle.GetStringFromName("pendingCrashReports.viewAll"), - callback: function() { + callback() { chromeWin.openUILinkIn("about:crashes", "tab"); return true; }, diff --git a/browser/modules/ContentLinkHandler.jsm b/browser/modules/ContentLinkHandler.jsm index 443cae2daf71..90e33470d0f5 100644 --- a/browser/modules/ContentLinkHandler.jsm +++ b/browser/modules/ContentLinkHandler.jsm @@ -27,7 +27,7 @@ const SIZES_TELEMETRY_ENUM = { }; this.ContentLinkHandler = { - init: function(chromeGlobal) { + init(chromeGlobal) { chromeGlobal.addEventListener("DOMLinkAdded", (event) => { this.onLinkEvent(event, chromeGlobal); }, false); @@ -36,7 +36,7 @@ this.ContentLinkHandler = { }, false); }, - onLinkEvent: function(event, chromeGlobal) { + onLinkEvent(event, chromeGlobal) { var link = event.originalTarget; var rel = link.rel && link.rel.toLowerCase(); if (!link || !link.ownerDocument || !rel || !link.href) @@ -124,7 +124,7 @@ this.ContentLinkHandler = { { let engine = { title: link.title, href: link.href }; chromeGlobal.sendAsyncMessage("Link:AddSearch", - {engine: engine, + {engine, url: link.ownerDocument.documentURI}); searchAdded = true; } @@ -134,7 +134,7 @@ this.ContentLinkHandler = { } }, - getLinkIconURI: function(aLink) { + getLinkIconURI(aLink) { let targetDoc = aLink.ownerDocument; var uri = BrowserUtils.makeURI(aLink.href, targetDoc.characterSet); try { diff --git a/browser/modules/ContentSearch.jsm b/browser/modules/ContentSearch.jsm index 42525702905c..a825cc698559 100644 --- a/browser/modules/ContentSearch.jsm +++ b/browser/modules/ContentSearch.jsm @@ -108,7 +108,7 @@ this.ContentSearch = { // fetch cancellation from _cancelSuggestions. _currentSuggestion: null, - init: function() { + init() { Cc["@mozilla.org/globalmessagemanager;1"]. getService(Ci.nsIMessageListenerManager). addMessageListener(INBOUND_MESSAGE, this); @@ -133,7 +133,7 @@ this.ContentSearch = { return this._searchSuggestionUIStrings; }, - destroy: function() { + destroy() { if (this._destroyedPromise) { return this._destroyedPromise; } @@ -154,13 +154,13 @@ this.ContentSearch = { * @param messageManager * The MessageManager object of the selected browser. */ - focusInput: function(messageManager) { + focusInput(messageManager) { messageManager.sendAsyncMessage(OUTBOUND_MESSAGE, { type: "FocusInput" }); }, - receiveMessage: function(msg) { + receiveMessage(msg) { // Add a temporary event handler that exists only while the message is in // the event queue. If the message's source docshell changes browsers in // the meantime, then we need to update msg.target. event.detail will be @@ -190,13 +190,13 @@ this.ContentSearch = { this._processEventQueue(); }, - observe: function(subj, topic, data) { + observe(subj, topic, data) { switch (topic) { case "nsPref:changed": case "browser-search-engine-modified": this._eventQueue.push({ type: "Observe", - data: data, + data, }); this._processEventQueue(); break; @@ -207,7 +207,7 @@ this.ContentSearch = { } }, - removeFormHistoryEntry: function(msg, entry) { + removeFormHistoryEntry(msg, entry) { let browserData = this._suggestionDataForBrowser(msg.target); if (browserData && browserData.previousFormHistoryResult) { let { previousFormHistoryResult } = browserData; @@ -220,7 +220,7 @@ this.ContentSearch = { } }, - performSearch: function(msg, data) { + performSearch(msg, data) { this._ensureDataHasProperties(data, [ "engineName", "searchString", @@ -273,7 +273,7 @@ this.ContentSearch = { let priv = PrivateBrowsingUtils.isBrowserPrivate(browser); // fetch() rejects its promise if there's a pending request, but since we // process our event queue serially, there's never a pending request. - this._currentSuggestion = { controller: controller, target: browser }; + this._currentSuggestion = { controller, target: browser }; let suggestions = yield controller.fetch(searchString, priv, engine); this._currentSuggestion = null; @@ -350,7 +350,7 @@ this.ContentSearch = { return state; }), - _processEventQueue: function() { + _processEventQueue() { if (this._currentEventPromise || !this._eventQueue.length) { return; } @@ -369,7 +369,7 @@ this.ContentSearch = { }.bind(this)); }, - _cancelSuggestions: function(msg) { + _cancelSuggestions(msg) { let cancelled = false; // cancel active suggestion request if (this._currentSuggestion && this._currentSuggestion.target === msg.target) { @@ -401,25 +401,25 @@ this.ContentSearch = { } }), - _onMessageGetState: function(msg, data) { + _onMessageGetState(msg, data) { return this.currentStateObj().then(state => { this._reply(msg, "State", state); }); }, - _onMessageGetStrings: function(msg, data) { + _onMessageGetStrings(msg, data) { this._reply(msg, "Strings", this.searchSuggestionUIStrings); }, - _onMessageSearch: function(msg, data) { + _onMessageSearch(msg, data) { this.performSearch(msg, data); }, - _onMessageSetCurrentEngine: function(msg, data) { + _onMessageSetCurrentEngine(msg, data) { Services.search.currentEngine = Services.search.getEngineByName(data); }, - _onMessageManageEngines: function(msg, data) { + _onMessageManageEngines(msg, data) { let browserWin = msg.target.ownerGlobal; browserWin.openPreferences("paneSearch"); }, @@ -444,11 +444,11 @@ this.ContentSearch = { yield this.addFormHistoryEntry(msg, entry); }), - _onMessageRemoveFormHistoryEntry: function(msg, entry) { + _onMessageRemoveFormHistoryEntry(msg, entry) { this.removeFormHistoryEntry(msg, entry); }, - _onMessageSpeculativeConnect: function(msg, engineName) { + _onMessageSpeculativeConnect(msg, engineName) { let engine = Services.search.getEngineByName(engineName); if (!engine) { throw new Error("Unknown engine name: " + engineName); @@ -473,7 +473,7 @@ this.ContentSearch = { } }), - _suggestionDataForBrowser: function(browser, create = false) { + _suggestionDataForBrowser(browser, create = false) { let data = this._suggestionMap.get(browser); if (!data && create) { // Since one SearchSuggestionController instance is meant to be used per @@ -487,7 +487,7 @@ this.ContentSearch = { return data; }, - _reply: function(msg, type, data) { + _reply(msg, type, data) { // We reply asyncly to messages, and by the time we reply the browser we're // responding to may have been destroyed. messageManager is null then. if (!Cu.isDeadWrapper(msg.target) && msg.target.messageManager) { @@ -495,16 +495,16 @@ this.ContentSearch = { } }, - _broadcast: function(type, data) { + _broadcast(type, data) { Cc["@mozilla.org/globalmessagemanager;1"]. getService(Ci.nsIMessageListenerManager). broadcastAsyncMessage(...this._msgArgs(type, data)); }, - _msgArgs: function(type, data) { + _msgArgs(type, data) { return [OUTBOUND_MESSAGE, { - type: type, - data: data, + type, + data, }]; }, @@ -515,13 +515,13 @@ this.ContentSearch = { "searchWithEngine", [engine.name], 1); let obj = { name: engine.name, - placeholder: placeholder, + placeholder, iconBuffer: yield this._arrayBufferFromDataURI(favicon), }; return obj; }), - _arrayBufferFromDataURI: function(uri) { + _arrayBufferFromDataURI(uri) { if (!uri) { return Promise.resolve(null); } @@ -546,7 +546,7 @@ this.ContentSearch = { return deferred.promise; }, - _ensureDataHasProperties: function(data, requiredProperties) { + _ensureDataHasProperties(data, requiredProperties) { for (let prop of requiredProperties) { if (!(prop in data)) { throw new Error("Message data missing required property: " + prop); @@ -554,7 +554,7 @@ this.ContentSearch = { } }, - _initService: function() { + _initService() { if (!this._initServicePromise) { let deferred = Promise.defer(); this._initServicePromise = deferred.promise; diff --git a/browser/modules/ContentWebRTC.jsm b/browser/modules/ContentWebRTC.jsm index 24c25a3b2b19..bc6930ea34ba 100644 --- a/browser/modules/ContentWebRTC.jsm +++ b/browser/modules/ContentWebRTC.jsm @@ -19,7 +19,7 @@ const kBrowserURL = "chrome://browser/content/browser.xul"; this.ContentWebRTC = { _initialized: false, - init: function() { + init() { if (this._initialized) return; @@ -33,7 +33,7 @@ this.ContentWebRTC = { Services.obs.addObserver(processShutdown, "content-child-shutdown", false); }, - uninit: function() { + uninit() { Services.obs.removeObserver(handleGUMRequest, "getUserMedia:request"); Services.obs.removeObserver(handlePCRequest, "PeerConnection:request"); Services.obs.removeObserver(updateIndicators, "recording-device-events"); @@ -46,7 +46,7 @@ this.ContentWebRTC = { }, // Called only for 'unload' to remove pending gUM prompts in reloaded frames. - handleEvent: function(aEvent) { + handleEvent(aEvent) { let contentWindow = aEvent.target.defaultView; let mm = getMessageManagerForWindow(contentWindow); for (let key of contentWindow.pendingGetUserMediaRequests.keys()) { @@ -57,7 +57,7 @@ this.ContentWebRTC = { } }, - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { switch (aMessage.name) { case "rtcpeer:Allow": case "rtcpeer:Deny": { @@ -115,9 +115,9 @@ function handlePCRequest(aSubject, aTopic, aData) { contentWindow.pendingPeerConnectionRequests.add(callID); let request = { - windowID: windowID, - innerWindowID: innerWindowID, - callID: callID, + windowID, + innerWindowID, + callID, documentURI: contentWindow.document.documentURI, secure: isSecure, }; @@ -210,11 +210,11 @@ function prompt(aContentWindow, aWindowID, aCallID, aConstraints, aDevices, aSec windowID: aWindowID, documentURI: aContentWindow.document.documentURI, secure: aSecure, - requestTypes: requestTypes, - sharingScreen: sharingScreen, - sharingAudio: sharingAudio, - audioDevices: audioDevices, - videoDevices: videoDevices + requestTypes, + sharingScreen, + sharingAudio, + audioDevices, + videoDevices }; let mm = getMessageManagerForWindow(aContentWindow); diff --git a/browser/modules/DirectoryLinksProvider.jsm b/browser/modules/DirectoryLinksProvider.jsm index 9a15397a410f..2563436c553e 100644 --- a/browser/modules/DirectoryLinksProvider.jsm +++ b/browser/modules/DirectoryLinksProvider.jsm @@ -268,7 +268,7 @@ var DirectoryLinksProvider = { } }, - _cacheSuggestedLinks: function(link) { + _cacheSuggestedLinks(link) { // Don't cache links that don't have the expected 'frecent_sites' if (!link.frecent_sites) { return; @@ -729,7 +729,7 @@ var DirectoryLinksProvider = { }.bind(this)); }, - _handleManyLinksChanged: function() { + _handleManyLinksChanged() { this._topSitesWithSuggestedLinks.clear(); this._suggestedLinks.forEach((suggestedLinks, site) => { if (NewTabUtils.isTopPlacesSite(site)) { @@ -744,7 +744,7 @@ var DirectoryLinksProvider = { * * @return true if _topSitesWithSuggestedLinks was modified, false otherwise. */ - _handleLinkChanged: function(aLink) { + _handleLinkChanged(aLink) { let changedLinkSite = NewTabUtils.extractSite(aLink.url); let linkStored = this._topSitesWithSuggestedLinks.has(changedLinkSite); @@ -768,13 +768,13 @@ var DirectoryLinksProvider = { return false; }, - _populatePlacesLinks: function() { + _populatePlacesLinks() { NewTabUtils.links.populateProviderCache(NewTabUtils.placesProvider, () => { this._handleManyLinksChanged(); }); }, - onDeleteURI: function(aProvider, aLink) { + onDeleteURI(aProvider, aLink) { let {url} = aLink; // remove clicked flag for that url and // call observer upon disk write completion @@ -783,14 +783,14 @@ var DirectoryLinksProvider = { }); }, - onClearHistory: function() { + onClearHistory() { // remove all clicked flags and call observers upon file write this._removeAllTileClicks().then(() => { this._callObservers("onClearHistory"); }); }, - onLinkChanged: function(aProvider, aLink) { + onLinkChanged(aProvider, aLink) { // Make sure NewTabUtils.links handles the notification first. setTimeout(() => { if (this._handleLinkChanged(aLink) || this._shouldUpdateSuggestedTile()) { @@ -799,14 +799,14 @@ var DirectoryLinksProvider = { }, 0); }, - onManyLinksChanged: function() { + onManyLinksChanged() { // Make sure NewTabUtils.links handles the notification first. setTimeout(() => { this._handleManyLinksChanged(); }, 0); }, - _getCurrentTopSiteCount: function() { + _getCurrentTopSiteCount() { let visibleTopSiteCount = 0; let newTabLinks = NewTabUtils.links.getLinks(); for (let link of newTabLinks.slice(0, MIN_VISIBLE_HISTORY_TILES)) { @@ -822,7 +822,7 @@ var DirectoryLinksProvider = { return visibleTopSiteCount; }, - _shouldUpdateSuggestedTile: function() { + _shouldUpdateSuggestedTile() { let sortedLinks = NewTabUtils.getProviderLinks(this); let mostFrecentLink = {}; @@ -850,7 +850,7 @@ var DirectoryLinksProvider = { * * @return the chosen suggested tile, or undefined if there isn't one */ - _updateSuggestedTile: function() { + _updateSuggestedTile() { let sortedLinks = NewTabUtils.getProviderLinks(this); if (!sortedLinks) { @@ -1249,7 +1249,7 @@ var DirectoryLinksProvider = { } }, - _removeObservers: function() { + _removeObservers() { this._observers.clear(); } }; diff --git a/browser/modules/E10SUtils.jsm b/browser/modules/E10SUtils.jsm index fdfde0a157d0..5f6e9243d152 100644 --- a/browser/modules/E10SUtils.jsm +++ b/browser/modules/E10SUtils.jsm @@ -46,13 +46,13 @@ this.E10SUtils = { WEB_REMOTE_TYPE, FILE_REMOTE_TYPE, - canLoadURIInProcess: function(aURL, aProcess) { + canLoadURIInProcess(aURL, aProcess) { let remoteType = aProcess == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT ? DEFAULT_REMOTE_TYPE : NOT_REMOTE; return remoteType == this.getRemoteTypeForURI(aURL, true, remoteType); }, - getRemoteTypeForURI: function(aURL, aMultiProcess, + getRemoteTypeForURI(aURL, aMultiProcess, aPreferredRemoteType = DEFAULT_REMOTE_TYPE) { if (!aMultiProcess) { return NOT_REMOTE; @@ -143,12 +143,12 @@ this.E10SUtils = { return validatedWebRemoteType(aPreferredRemoteType); }, - shouldLoadURIInThisProcess: function(aURI) { + shouldLoadURIInThisProcess(aURI) { let remoteType = Services.appinfo.remoteType; return remoteType == this.getRemoteTypeForURI(aURI.spec, true, remoteType); }, - shouldLoadURI: function(aDocShell, aURI, aReferrer) { + shouldLoadURI(aDocShell, aURI, aReferrer) { // Inner frames should always load in the current process if (aDocShell.QueryInterface(Ci.nsIDocShellTreeItem).sameTypeParent) return true; @@ -157,7 +157,7 @@ this.E10SUtils = { return this.shouldLoadURIInThisProcess(aURI); }, - redirectLoad: function(aDocShell, aURI, aReferrer, aFreshProcess) { + redirectLoad(aDocShell, aURI, aReferrer, aFreshProcess) { // Retarget the load to the correct process let messageManager = aDocShell.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIContentFrameMessageManager); @@ -175,7 +175,7 @@ this.E10SUtils = { return false; }, - wrapHandlingUserInput: function(aWindow, aIsHandling, aCallback) { + wrapHandlingUserInput(aWindow, aIsHandling, aCallback) { var handlingUserInput; try { handlingUserInput = aWindow.QueryInterface(Ci.nsIInterfaceRequestor) diff --git a/browser/modules/Feeds.jsm b/browser/modules/Feeds.jsm index 179d2b83d23e..c9708488080a 100644 --- a/browser/modules/Feeds.jsm +++ b/browser/modules/Feeds.jsm @@ -72,7 +72,7 @@ this.Feeds = { * Whether this is already a known feed or not, if true only a security * check will be performed. */ - isValidFeed: function(aLink, aPrincipal, aIsFeed) { + isValidFeed(aLink, aPrincipal, aIsFeed) { if (!aLink || !aPrincipal) return false; diff --git a/browser/modules/FormSubmitObserver.jsm b/browser/modules/FormSubmitObserver.jsm index 7de3ab30de8a..01bd144739df 100644 --- a/browser/modules/FormSubmitObserver.jsm +++ b/browser/modules/FormSubmitObserver.jsm @@ -38,7 +38,7 @@ FormSubmitObserver.prototype = * Public apis */ - init: function(aWindow, aTabChildGlobal) + init(aWindow, aTabChildGlobal) { this._content = aWindow; this._tab = aTabChildGlobal; @@ -57,7 +57,7 @@ FormSubmitObserver.prototype = this._tab.addEventListener("unload", this, false); }, - uninit: function() + uninit() { Services.obs.removeObserver(this, "invalidformsubmit"); this._content.removeEventListener("pageshow", this, false); @@ -72,7 +72,7 @@ FormSubmitObserver.prototype = * Events */ - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "pageshow": if (this._isRootDocumentEvent(aEvent)) { @@ -95,7 +95,7 @@ FormSubmitObserver.prototype = * nsIFormSubmitObserver */ - notifyInvalidSubmit : function(aFormElement, aInvalidElements) + notifyInvalidSubmit(aFormElement, aInvalidElements) { // We are going to handle invalid form submission attempt by focusing the // first invalid element and show the corresponding validation message in a @@ -149,7 +149,7 @@ FormSubmitObserver.prototype = * with. Updates the validation message or closes the popup if form data * becomes valid. */ - _onInput: function(aEvent) { + _onInput(aEvent) { let element = aEvent.originalTarget; // If the form input is now valid, hide the popup. @@ -170,7 +170,7 @@ FormSubmitObserver.prototype = * Blur event handler in which we disconnect from the form element and * hide the popup. */ - _onBlur: function(aEvent) { + _onBlur(aEvent) { aEvent.originalTarget.removeEventListener("input", this, false); aEvent.originalTarget.removeEventListener("blur", this, false); this._element = null; @@ -182,7 +182,7 @@ FormSubmitObserver.prototype = * information. Can be called repetitively to update the currently * displayed popup position and text. */ - _showPopup: function(aElement) { + _showPopup(aElement) { // Collect positional information and show the popup let panelData = {}; @@ -214,15 +214,15 @@ FormSubmitObserver.prototype = this._mm.sendAsyncMessage("FormValidation:ShowPopup", panelData); }, - _hidePopup: function() { + _hidePopup() { this._mm.sendAsyncMessage("FormValidation:HidePopup", {}); }, - _getWindowUtils: function() { + _getWindowUtils() { return this._content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); }, - _isRootDocumentEvent: function(aEvent) { + _isRootDocumentEvent(aEvent) { if (this._content == null) { return true; } diff --git a/browser/modules/FormValidationHandler.jsm b/browser/modules/FormValidationHandler.jsm index 62565af58d97..0193d644dfe6 100644 --- a/browser/modules/FormValidationHandler.jsm +++ b/browser/modules/FormValidationHandler.jsm @@ -25,13 +25,13 @@ var FormValidationHandler = * Public apis */ - init: function() { + init() { let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager); mm.addMessageListener("FormValidation:ShowPopup", this); mm.addMessageListener("FormValidation:HidePopup", this); }, - uninit: function() { + uninit() { let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager); mm.removeMessageListener("FormValidation:ShowPopup", this); mm.removeMessageListener("FormValidation:HidePopup", this); @@ -39,7 +39,7 @@ var FormValidationHandler = this._anchor = null; }, - hidePopup: function() { + hidePopup() { this._hidePopup(); }, @@ -47,7 +47,7 @@ var FormValidationHandler = * Events */ - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { let window = aMessage.target.ownerGlobal; let json = aMessage.json; let tabBrowser = window.gBrowser; @@ -66,11 +66,11 @@ var FormValidationHandler = } }, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { this._hidePopup(); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "FullZoomChange": case "TextZoomChange": @@ -88,7 +88,7 @@ var FormValidationHandler = * Internal */ - _onPopupHiding: function(aEvent) { + _onPopupHiding(aEvent) { aEvent.originalTarget.removeEventListener("popuphiding", this, true); let tabBrowser = aEvent.originalTarget.ownerDocument.getElementById("content"); tabBrowser.selectedBrowser.removeEventListener("scroll", this, true); @@ -115,7 +115,7 @@ var FormValidationHandler = * position - popup positional string constants. * message - the form element validation message text. */ - _showPopup: function(aWindow, aPanelData) { + _showPopup(aWindow, aPanelData) { let previouslyShown = !!this._panel; this._panel = aWindow.document.getElementById("invalid-form-popup"); this._panel.firstChild.textContent = aPanelData.message; @@ -149,7 +149,7 @@ var FormValidationHandler = * Hide the popup if currently displayed. Will fire an event to onPopupHiding * above if visible. */ - _hidePopup: function() { + _hidePopup() { if (this._panel) { this._panel.hidePopup(); } diff --git a/browser/modules/HiddenFrame.jsm b/browser/modules/HiddenFrame.jsm index b5582bd97f37..207ffe9bf50e 100644 --- a/browser/modules/HiddenFrame.jsm +++ b/browser/modules/HiddenFrame.jsm @@ -39,7 +39,7 @@ HiddenFrame.prototype = { * @returns Promise Returns a promise which is resolved when the hidden frame has finished * loading. */ - get: function() { + get() { if (!this._deferred) { this._deferred = PromiseUtils.defer(); this._create(); @@ -48,7 +48,7 @@ HiddenFrame.prototype = { return this._deferred.promise; }, - destroy: function() { + destroy() { clearTimeout(this._retryTimerId); if (this._frame) { @@ -62,7 +62,7 @@ HiddenFrame.prototype = { } }, - handleEvent: function() { + handleEvent() { let contentWindow = this._frame.contentWindow; if (contentWindow.location.href === XUL_PAGE) { this._frame.removeEventListener("load", this, true); @@ -72,7 +72,7 @@ HiddenFrame.prototype = { } }, - _create: function() { + _create() { if (this.isReady) { let doc = this.hiddenDOMDocument; this._frame = doc.createElementNS(HTML_NS, "iframe"); diff --git a/browser/modules/NetworkPrioritizer.jsm b/browser/modules/NetworkPrioritizer.jsm index ef71d320dfb6..82cdc6dd03be 100644 --- a/browser/modules/NetworkPrioritizer.jsm +++ b/browser/modules/NetworkPrioritizer.jsm @@ -87,7 +87,7 @@ var BrowserHelper = { windowEntry.lastSelectedBrowser = aBrowser; }, - onRemotenessChange: function(aBrowser) { + onRemotenessChange(aBrowser) { aBrowser.setPriority(_priorityBackup.get(aBrowser.permanentKey)); }, diff --git a/browser/modules/PermissionUI.jsm b/browser/modules/PermissionUI.jsm index 19b4faaabdb8..e6d95ab437eb 100644 --- a/browser/modules/PermissionUI.jsm +++ b/browser/modules/PermissionUI.jsm @@ -481,7 +481,7 @@ GeolocationPermissionPrompt.prototype = { gBrowserBundle.GetStringFromName("geolocation.allowLocation.accesskey"), action: null, expireType: null, - callback: function(state) { + callback(state) { if (state && state.checkboxChecked) { secHistogram.add(ALWAYS_SHARE); } else { @@ -496,7 +496,7 @@ GeolocationPermissionPrompt.prototype = { expireType: PrivateBrowsingUtils.isWindowPrivate(this.browser.ownerGlobal) ? Ci.nsIPermissionManager.EXPIRE_SESSION : null, - callback: function(state) { + callback(state) { if (state && state.checkboxChecked) { secHistogram.add(NEVER_SHARE); } diff --git a/browser/modules/PluginContent.jsm b/browser/modules/PluginContent.jsm index 7c1139f6285a..c087576e842f 100644 --- a/browser/modules/PluginContent.jsm +++ b/browser/modules/PluginContent.jsm @@ -31,7 +31,7 @@ const FLASH_MIME_TYPE = "application/x-shockwave-flash"; const REPLACEMENT_STYLE_SHEET = Services.io.newURI("chrome://pluginproblem/content/pluginReplaceBinding.css", null, null); PluginContent.prototype = { - init: function(global) { + init(global) { this.global = global; // Need to hold onto the content window or else it'll get destroyed this.content = this.global.content; @@ -62,7 +62,7 @@ PluginContent.prototype = { Services.obs.addObserver(this, "decoder-doctor-notification", false); }, - uninit: function() { + uninit() { let global = this.global; global.removeEventListener("PluginBindingAttached", this, true); @@ -89,7 +89,7 @@ PluginContent.prototype = { delete this.content; }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "BrowserPlugins:ActivatePlugins": this.activatePlugins(msg.data.pluginInfo, msg.data.newState); @@ -143,7 +143,7 @@ PluginContent.prototype = { } }, - onPageShow: function(event) { + onPageShow(event) { // Ignore events that aren't from the main document. if (!this.content || event.target != this.content.document) { return; @@ -157,7 +157,7 @@ PluginContent.prototype = { } }, - onPageHide: function(event) { + onPageHide(event) { // Ignore events that aren't from the main document. if (!this.content || event.target != this.content.document) { return; @@ -168,12 +168,12 @@ PluginContent.prototype = { this.haveShownNotification = false; }, - getPluginUI: function(plugin, anonid) { + getPluginUI(plugin, anonid) { return plugin.ownerDocument. getAnonymousElementByAttribute(plugin, "anonid", anonid); }, - _getPluginInfo: function(pluginElement) { + _getPluginInfo(pluginElement) { if (pluginElement instanceof Ci.nsIDOMHTMLAnchorElement) { // Anchor elements are our place holders, and we only have them for Flash let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost); @@ -223,11 +223,11 @@ PluginContent.prototype = { } return { mimetype: tagMimetype, - pluginName: pluginName, - pluginTag: pluginTag, - permissionString: permissionString, - fallbackType: fallbackType, - blocklistState: blocklistState, + pluginName, + pluginTag, + permissionString, + fallbackType, + blocklistState, }; }, @@ -237,7 +237,7 @@ PluginContent.prototype = { * nsIObjectLoadingContent. This only should happen if the plugin is * click-to-play (see bug 1186948). */ - _getPluginInfoForTag: function(pluginTag, tagMimetype) { + _getPluginInfoForTag(pluginTag, tagMimetype) { let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost); let pluginName = gNavigatorBundle.GetStringFromName("pluginInfo.unknownPlugin"); @@ -268,22 +268,22 @@ PluginContent.prototype = { } return { mimetype: tagMimetype, - pluginName: pluginName, - pluginTag: pluginTag, - permissionString: permissionString, + pluginName, + pluginTag, + permissionString, // Since we should only have entered _getPluginInfoForTag when // examining a click-to-play plugin, we can safely hard-code // this fallback type, since we don't actually have an // nsIObjectLoadingContent to check. fallbackType: Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY, - blocklistState: blocklistState, + blocklistState, }; }, /** * Update the visibility of the plugin overlay. */ - setVisibility : function(plugin, overlay, shouldShow) { + setVisibility(plugin, overlay, shouldShow) { overlay.classList.toggle("visible", shouldShow); if (shouldShow) { overlay.removeAttribute("dismissed"); @@ -298,7 +298,7 @@ PluginContent.prototype = { * This function will handle showing or hiding the overlay. * @returns true if the plugin is invisible. */ - shouldShowOverlay : function(plugin, overlay) { + shouldShowOverlay(plugin, overlay) { // If the overlay size is 0, we haven't done layout yet. Presume that // plugins are visible until we know otherwise. if (overlay.scrollWidth == 0) { @@ -347,7 +347,7 @@ PluginContent.prototype = { return true; }, - addLinkClickCallback: function(linkNode, callbackName /* callbackArgs...*/) { + addLinkClickCallback(linkNode, callbackName /* callbackArgs...*/) { // XXX just doing (callback)(arg) was giving a same-origin error. bug? let self = this; let callbackArgs = Array.prototype.slice.call(arguments).slice(2); @@ -378,7 +378,7 @@ PluginContent.prototype = { }, // Helper to get the binding handler type from a plugin object - _getBindingType : function(plugin) { + _getBindingType(plugin) { if (!(plugin instanceof Ci.nsIObjectLoadingContent)) return null; @@ -403,7 +403,7 @@ PluginContent.prototype = { } }, - handleEvent: function(event) { + handleEvent(event) { let eventType = event.type; if (eventType == "unload") { @@ -583,7 +583,7 @@ PluginContent.prototype = { } }, - _recordFlashPluginTelemetry: function(eventType, plugin) { + _recordFlashPluginTelemetry(eventType, plugin) { if (!Services.telemetry.canRecordExtended) { return; } @@ -618,7 +618,7 @@ PluginContent.prototype = { } }, - _finishRecordingFlashPluginTelemetry: function() { + _finishRecordingFlashPluginTelemetry() { if (this.flashPluginStats) { Services.telemetry.getHistogramById('FLASH_PLUGIN_INSTANCES_ON_PAGE') .add(this.flashPluginStats.instancesCount); @@ -626,12 +626,12 @@ PluginContent.prototype = { } }, - isKnownPlugin: function(objLoadingContent) { + isKnownPlugin(objLoadingContent) { return (objLoadingContent.getContentTypeForMIMEType(objLoadingContent.actualType) == Ci.nsIObjectLoadingContent.TYPE_PLUGIN); }, - canActivatePlugin: function(objLoadingContent) { + canActivatePlugin(objLoadingContent) { // if this isn't a known plugin, we can't activate it // (this also guards pluginHost.getPermissionStringForType against // unexpected input) @@ -652,7 +652,7 @@ PluginContent.prototype = { isFallbackTypeValid; }, - hideClickToPlayOverlay: function(plugin) { + hideClickToPlayOverlay(plugin) { let overlay = this.getPluginUI(plugin, "main"); if (overlay) { overlay.classList.remove("visible"); @@ -660,7 +660,7 @@ PluginContent.prototype = { }, // Forward a link click callback to the chrome process. - forwardCallback: function(name, pluginTag) { + forwardCallback(name, pluginTag) { this.global.sendAsyncMessage("PluginContent:LinkClickCallback", { name, pluginTag }); }, @@ -692,12 +692,12 @@ PluginContent.prototype = { { runID, keyVals, submitURLOptIn }); }, - reloadPage: function() { + reloadPage() { this.global.content.location.reload(); }, // Event listener for click-to-play plugins. - _handleClickToPlayEvent: function(plugin) { + _handleClickToPlayEvent(plugin) { let doc = plugin.ownerDocument; let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost); let permissionString; @@ -730,7 +730,7 @@ PluginContent.prototype = { } }, - onOverlayClick: function(event) { + onOverlayClick(event) { let document = event.target.ownerDocument; let plugin = document.getBindingParent(event.target); let contentWindow = plugin.ownerGlobal.top; @@ -747,7 +747,7 @@ PluginContent.prototype = { } }, - reshowClickToPlayNotification: function() { + reshowClickToPlayNotification() { let contentWindow = this.global.content; let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils); @@ -766,7 +766,7 @@ PluginContent.prototype = { /** * Activate the plugins that the user has specified. */ - activatePlugins: function(pluginInfo, newState) { + activatePlugins(pluginInfo, newState) { let contentWindow = this.global.content; let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils); @@ -812,7 +812,7 @@ PluginContent.prototype = { this.updateNotificationUI(); }, - _showClickToPlayNotification: function(plugin, showNow) { + _showClickToPlayNotification(plugin, showNow) { let plugins = []; // If plugin is null, that means the user has navigated back to a page with @@ -872,8 +872,8 @@ PluginContent.prototype = { this.global.sendAsyncMessage("PluginContent:ShowClickToPlayNotification", { plugins: [...this.pluginData.values()], - showNow: showNow, - location: location, + showNow, + location, }, null, principal); }, @@ -888,7 +888,7 @@ PluginContent.prototype = { * document). If this parameter is omitted, it defaults * to the current top-level document. */ - updateNotificationUI: function(document) { + updateNotificationUI(document) { document = document || this.content.document; // We're only interested in the top-level document, since that's @@ -953,23 +953,23 @@ PluginContent.prototype = { // If there are any items remaining in `actions` now, they are hidden // plugins that need a notification bar. this.global.sendAsyncMessage("PluginContent:UpdateHiddenPluginUI", { - haveInsecure: haveInsecure, + haveInsecure, actions: [...actions.values()], - location: location, + location, }, null, principal); }, - removeNotification: function(name) { - this.global.sendAsyncMessage("PluginContent:RemoveNotification", { name: name }); + removeNotification(name) { + this.global.sendAsyncMessage("PluginContent:RemoveNotification", { name }); }, - clearPluginCaches: function() { + clearPluginCaches() { this.pluginData.clear(); this.pluginCrashData.clear(); }, - hideNotificationBar: function(name) { - this.global.sendAsyncMessage("PluginContent:HideNotificationBar", { name: name }); + hideNotificationBar(name) { + this.global.sendAsyncMessage("PluginContent:HideNotificationBar", { name }); }, /** @@ -983,7 +983,7 @@ PluginContent.prototype = { * @returns bool * True if the plugin is a descendant of the full screen DOM element, false otherwise. **/ - isWithinFullScreenElement: function(fullScreenElement, domElement) { + isWithinFullScreenElement(fullScreenElement, domElement) { /** * Traverses down iframes until it find a non-iframe full screen DOM element. @@ -1018,7 +1018,7 @@ PluginContent.prototype = { * fired for both NPAPI and Gecko Media plugins. In the latter case, the * target of the event is the document that the GMP is being used in. */ - onPluginCrashed: function(target, aEvent) { + onPluginCrashed(target, aEvent) { if (!(aEvent instanceof this.content.PluginCrashedEvent)) return; @@ -1057,7 +1057,7 @@ PluginContent.prototype = { }); }, - NPAPIPluginProcessCrashed: function({pluginName, runID, state}) { + NPAPIPluginProcessCrashed({pluginName, runID, state}) { let message = gNavigatorBundle.formatStringFromName("crashedpluginsMessage.title", [pluginName], 1); @@ -1086,8 +1086,8 @@ PluginContent.prototype = { // WeakSet. Once the WeakSet is empty, we can clear the map. if (!this.pluginCrashData.has(runID)) { this.pluginCrashData.set(runID, { - state: state, - message: message, + state, + message, instances: new WeakSet(), }); } @@ -1098,7 +1098,7 @@ PluginContent.prototype = { } }, - setCrashedNPAPIPluginState: function({plugin, state, message}) { + setCrashedNPAPIPluginState({plugin, state, message}) { // Force a layout flush so the binding is attached. plugin.clientTop; let overlay = this.getPluginUI(plugin, "main"); @@ -1165,7 +1165,7 @@ PluginContent.prototype = { } }, - NPAPIPluginCrashReportSubmitted: function({ runID, state }) { + NPAPIPluginCrashReportSubmitted({ runID, state }) { this.pluginCrashData.delete(runID); let contentWindow = this.global.content; let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor) @@ -1181,7 +1181,7 @@ PluginContent.prototype = { } }, - GMPCrashed: function(aEvent) { + GMPCrashed(aEvent) { let target = aEvent.target; let pluginName = aEvent.pluginName; let gmpPlugin = aEvent.gmpPlugin; diff --git a/browser/modules/ProcessHangMonitor.jsm b/browser/modules/ProcessHangMonitor.jsm index 7c7c86b2c129..8f439f4335c6 100644 --- a/browser/modules/ProcessHangMonitor.jsm +++ b/browser/modules/ProcessHangMonitor.jsm @@ -49,7 +49,7 @@ var ProcessHangMonitor = { /** * Initialize hang reporting. Called once in the parent process. */ - init: function() { + init() { Services.obs.addObserver(this, "process-hang-report", false); Services.obs.addObserver(this, "clear-hang-report", false); Services.obs.addObserver(this, "xpcom-shutdown", false); @@ -60,7 +60,7 @@ var ProcessHangMonitor = { * Terminate JavaScript associated with the hang being reported for * the selected browser in |win|. */ - terminateScript: function(win) { + terminateScript(win) { this.handleUserInput(win, report => report.terminateScript()); }, @@ -68,7 +68,7 @@ var ProcessHangMonitor = { * Start devtools debugger for JavaScript associated with the hang * being reported for the selected browser in |win|. */ - debugScript: function(win) { + debugScript(win) { this.handleUserInput(win, report => { function callback() { report.endStartingDebugger(); @@ -87,7 +87,7 @@ var ProcessHangMonitor = { * for the selected browser in |win|. Will attempt to generate a combined * crash report for all processes. */ - terminatePlugin: function(win) { + terminatePlugin(win) { this.handleUserInput(win, report => report.terminatePlugin()); }, @@ -95,7 +95,7 @@ var ProcessHangMonitor = { * Dismiss the browser notification and invoke an appropriate action based on * the hang type. */ - stopIt: function(win) { + stopIt(win) { let report = this.findActiveReport(win.gBrowser.selectedBrowser); if (!report) { return; @@ -115,7 +115,7 @@ var ProcessHangMonitor = { * Dismiss the notification, clear the report from the active list and set up * a new timer to track a wait period during which we won't notify. */ - waitLonger: function(win) { + waitLonger(win) { let report = this.findActiveReport(win.gBrowser.selectedBrowser); if (!report) { return; @@ -155,7 +155,7 @@ var ProcessHangMonitor = { * |win|, invoke |func| on that report and stop notifying the user * about it. */ - handleUserInput: function(win, func) { + handleUserInput(win, func) { let report = this.findActiveReport(win.gBrowser.selectedBrowser); if (!report) { return null; @@ -165,7 +165,7 @@ var ProcessHangMonitor = { return func(report); }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { switch (topic) { case "xpcom-shutdown": Services.obs.removeObserver(this, "xpcom-shutdown"); @@ -198,7 +198,7 @@ var ProcessHangMonitor = { /** * Find a active hang report for the given element. */ - findActiveReport: function(browser) { + findActiveReport(browser) { let frameLoader = browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader; for (let report of this._activeReports) { if (report.isReportForBrowser(frameLoader)) { @@ -211,7 +211,7 @@ var ProcessHangMonitor = { /** * Find a paused hang report for the given element. */ - findPausedReport: function(browser) { + findPausedReport(browser) { let frameLoader = browser.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader; for (let [report, ] of this._pausedReports) { if (report.isReportForBrowser(frameLoader)) { @@ -225,7 +225,7 @@ var ProcessHangMonitor = { * Remove an active hang report from the active list and cancel the timer * associated with it. */ - removeActiveReport: function(report) { + removeActiveReport(report) { this._activeReports.delete(report); this.updateWindows(); }, @@ -234,7 +234,7 @@ var ProcessHangMonitor = { * Remove a paused hang report from the paused list and cancel the timer * associated with it. */ - removePausedReport: function(report) { + removePausedReport(report) { let timer = this._pausedReports.get(report); if (timer) { timer.cancel(); @@ -248,7 +248,7 @@ var ProcessHangMonitor = { * each window to watch for events that would cause a different hang * report to be displayed. */ - updateWindows: function() { + updateWindows() { let e = Services.wm.getEnumerator("navigator:browser"); while (e.hasMoreElements()) { let win = e.getNext(); @@ -267,7 +267,7 @@ var ProcessHangMonitor = { /** * If there is a hang report for the current tab in |win|, display it. */ - updateWindow: function(win) { + updateWindow(win) { let report = this.findActiveReport(win.gBrowser.selectedBrowser); if (report) { @@ -280,7 +280,7 @@ var ProcessHangMonitor = { /** * Show the notification for a hang. */ - showNotification: function(win, report) { + showNotification(win, report) { let nb = win.document.getElementById("high-priority-global-notificationbox"); let notification = nb.getNotificationWithValue("process-hang"); if (notification) { @@ -292,14 +292,14 @@ var ProcessHangMonitor = { let buttons = [{ label: bundle.getString("processHang.button_stop.label"), accessKey: bundle.getString("processHang.button_stop.accessKey"), - callback: function() { + callback() { ProcessHangMonitor.stopIt(win); } }, { label: bundle.getString("processHang.button_wait.label"), accessKey: bundle.getString("processHang.button_wait.accessKey"), - callback: function() { + callback() { ProcessHangMonitor.waitLonger(win); } }]; @@ -308,7 +308,7 @@ var ProcessHangMonitor = { buttons.push({ label: bundle.getString("processHang.button_debug.label"), accessKey: bundle.getString("processHang.button_debug.accessKey"), - callback: function() { + callback() { ProcessHangMonitor.debugScript(win); } }); @@ -323,7 +323,7 @@ var ProcessHangMonitor = { /** * Ensure that no hang notifications are visible in |win|. */ - hideNotification: function(win) { + hideNotification(win) { let nb = win.document.getElementById("high-priority-global-notificationbox"); let notification = nb.getNotificationWithValue("process-hang"); if (notification) { @@ -335,17 +335,17 @@ var ProcessHangMonitor = { * Install event handlers on |win| to watch for events that would * cause a different hang report to be displayed. */ - trackWindow: function(win) { + trackWindow(win) { win.gBrowser.tabContainer.addEventListener("TabSelect", this, true); win.gBrowser.tabContainer.addEventListener("TabRemotenessChange", this, true); }, - untrackWindow: function(win) { + untrackWindow(win) { win.gBrowser.tabContainer.removeEventListener("TabSelect", this, true); win.gBrowser.tabContainer.removeEventListener("TabRemotenessChange", this, true); }, - handleEvent: function(event) { + handleEvent(event) { let win = event.target.ownerGlobal; // If a new tab is selected or if a tab changes remoteness, then @@ -360,7 +360,7 @@ var ProcessHangMonitor = { * Handle a potentially new hang report. If it hasn't been seen * before, show a notification for it in all open XUL windows. */ - reportHang: function(report) { + reportHang(report) { // If this hang was already reported reset the timer for it. if (this._activeReports.has(report)) { // if this report is in active but doesn't have a notification associated @@ -389,7 +389,7 @@ var ProcessHangMonitor = { this.updateWindows(); }, - clearHang: function(report) { + clearHang(report) { this.removeActiveReport(report); this.removePausedReport(report); report.userCanceled(); diff --git a/browser/modules/ReaderParent.jsm b/browser/modules/ReaderParent.jsm index 6fcaada42685..8b59ac5d15a9 100644 --- a/browser/modules/ReaderParent.jsm +++ b/browser/modules/ReaderParent.jsm @@ -28,20 +28,20 @@ var ReaderParent = { "Reader:UpdateReaderButton", ], - init: function() { + init() { let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager); for (let msg of this.MESSAGES) { mm.addMessageListener(msg, this); } }, - receiveMessage: function(message) { + receiveMessage(message) { switch (message.name) { case "Reader:ArticleGet": this._getArticle(message.data.url, message.target).then((article) => { // Make sure the target browser is still alive before trying to send data back. if (message.target.messageManager) { - message.target.messageManager.sendAsyncMessage("Reader:ArticleData", { article: article }); + message.target.messageManager.sendAsyncMessage("Reader:ArticleData", { article }); } }, e => { if (e && e.newURL) { @@ -80,7 +80,7 @@ var ReaderParent = { } }, - updateReaderButton: function(browser) { + updateReaderButton(browser) { let win = browser.ownerGlobal; if (browser != win.gBrowser.selectedBrowser) { return; @@ -124,7 +124,7 @@ var ReaderParent = { } }, - forceShowReaderIcon: function(browser) { + forceShowReaderIcon(browser) { browser.isArticle = true; this.updateReaderButton(browser); }, @@ -136,7 +136,7 @@ var ReaderParent = { this.toggleReaderMode(event); }, - toggleReaderMode: function(event) { + toggleReaderMode(event) { let win = event.target.ownerGlobal; let browser = win.gBrowser.selectedBrowser; browser.messageManager.sendAsyncMessage("Reader:ToggleReaderMode"); diff --git a/browser/modules/RemotePrompt.jsm b/browser/modules/RemotePrompt.jsm index da4945c2eb8d..9dde55b8f6dd 100644 --- a/browser/modules/RemotePrompt.jsm +++ b/browser/modules/RemotePrompt.jsm @@ -17,12 +17,12 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/SharedPromptUtils.jsm"); var RemotePrompt = { - init: function() { + init() { let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager); mm.addMessageListener("Prompt:Open", this); }, - receiveMessage: function(message) { + receiveMessage(message) { switch (message.name) { case "Prompt:Open": if (message.data.uri) { @@ -34,7 +34,7 @@ var RemotePrompt = { } }, - openTabPrompt: function(args, browser) { + openTabPrompt(args, browser) { let window = browser.ownerGlobal; let tabPrompt = window.gBrowser.getTabModalPromptBox(browser) let newPrompt; @@ -92,7 +92,7 @@ var RemotePrompt = { } }, - openModalWindow: function(args, browser) { + openModalWindow(args, browser) { let window = browser.ownerGlobal; try { PromptUtils.fireDialogEvent(window, "DOMWillOpenModalDialog", browser); diff --git a/browser/modules/SelfSupportBackend.jsm b/browser/modules/SelfSupportBackend.jsm index d25b4a74fbd6..d8fbb71dca54 100644 --- a/browser/modules/SelfSupportBackend.jsm +++ b/browser/modules/SelfSupportBackend.jsm @@ -53,11 +53,11 @@ const IS_UNIFIED_TELEMETRY = Preferences.get(PREF_TELEMETRY_UNIFIED, false); var gLogAppenderDump = null; this.SelfSupportBackend = Object.freeze({ - init: function() { + init() { SelfSupportBackendInternal.init(); }, - uninit: function() { + uninit() { SelfSupportBackendInternal.uninit(); }, }); @@ -75,7 +75,7 @@ var SelfSupportBackendInternal = { /** * Initializes the self support backend. */ - init: function() { + init() { this._configureLogging(); this._log.trace("init"); @@ -108,7 +108,7 @@ var SelfSupportBackendInternal = { /** * Shut down the self support backend, if active. */ - uninit: function() { + uninit() { this._log.trace("uninit"); Preferences.ignore(PREF_BRANCH_LOG, this._configureLogging, this); @@ -142,7 +142,7 @@ var SelfSupportBackendInternal = { * Handle notifications. Once all windows are created, we wait a little bit more * since tabs might still be loading. Then, we open the self support. */ - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { this._log.trace("observe - Topic " + aTopic); if (aTopic === "sessionstore-windows-restored") { @@ -154,7 +154,7 @@ var SelfSupportBackendInternal = { /** * Configure the logger based on the preferences. */ - _configureLogging: function() { + _configureLogging() { if (!this._log) { this._log = Log.repository.getLogger(LOGGER_NAME); @@ -183,7 +183,7 @@ var SelfSupportBackendInternal = { * Create an hidden frame to host our |browser|, then load the SelfSupport page in it. * @param aURL The URL to load in the browser. */ - _makeHiddenBrowser: function(aURL) { + _makeHiddenBrowser(aURL) { this._frame = new HiddenFrame(); return this._frame.get().then(aFrame => { let doc = aFrame.document; @@ -197,7 +197,7 @@ var SelfSupportBackendInternal = { }); }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { this._log.trace("handleEvent - aEvent.type " + aEvent.type + ", Trusted " + aEvent.isTrusted); if (aEvent.type === "DOMWindowClose") { @@ -217,7 +217,7 @@ var SelfSupportBackendInternal = { /** * Called when the self support page correctly loads. */ - _pageSuccessCallback: function() { + _pageSuccessCallback() { this._log.debug("_pageSuccessCallback - Page correctly loaded."); this._browser.removeProgressListener(this._progressListener); this._progressListener.destroy(); @@ -230,7 +230,7 @@ var SelfSupportBackendInternal = { /** * Called when the self support page fails to load. */ - _pageLoadErrorCallback: function() { + _pageLoadErrorCallback() { this._log.info("_pageLoadErrorCallback - Too many failed load attempts. Giving up."); this.uninit(); }, @@ -240,7 +240,7 @@ var SelfSupportBackendInternal = { * self support page and attempt to load the page content. If loading fails, try again * after an interval. */ - _loadSelfSupport: function() { + _loadSelfSupport() { // Fetch the Self Support URL from the preferences. let unformattedURL = Preferences.get(PREF_URL, null); let url = Services.urlFormatter.formatURL(unformattedURL); @@ -290,7 +290,7 @@ function ProgressListener(aLoadErrorCallback, aLoadSuccessCallback) { } ProgressListener.prototype = { - onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) { + onLocationChange(aWebProgress, aRequest, aLocation, aFlags) { if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) { this._log.warn("onLocationChange - There was a problem fetching the SelfSupport URL (attempt " + this._loadAttempts + ")."); @@ -312,7 +312,7 @@ ProgressListener.prototype = { } }, - onStateChange: function(aWebProgress, aRequest, aFlags, aStatus) { + onStateChange(aWebProgress, aRequest, aFlags, aStatus) { if (aFlags & Ci.nsIWebProgressListener.STATE_STOP && aFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK && aFlags & Ci.nsIWebProgressListener.STATE_IS_WINDOW && @@ -321,7 +321,7 @@ ProgressListener.prototype = { } }, - destroy: function() { + destroy() { // Make sure we don't try to reload self support when shutting down. clearTimeout(this._reloadTimerId); }, diff --git a/browser/modules/SitePermissions.jsm b/browser/modules/SitePermissions.jsm index 38fd1ab93b61..c384a22cfa63 100644 --- a/browser/modules/SitePermissions.jsm +++ b/browser/modules/SitePermissions.jsm @@ -27,7 +27,7 @@ this.SitePermissions = { * * install addon permission is excluded, check bug 1303108 */ - getAllByURI: function(aURI) { + getAllByURI(aURI) { let result = []; if (!this.isSupportedURI(aURI)) { return result; @@ -64,7 +64,7 @@ this.SitePermissions = { * - id: the state constant * - label: the translated label of that state */ - getPermissionItem: function(aId, aState) { + getPermissionItem(aId, aState) { let availableStates = this.getAvailableStates(aId).map(state => { return { id: state, label: this.getStateLabel(aId, state) }; }); @@ -77,7 +77,7 @@ this.SitePermissions = { /* Returns a list of objects representing all permissions that are currently * set for the given URI. See getPermissionItem for the content of each object. */ - getPermissionDetailsByURI: function(aURI) { + getPermissionDetailsByURI(aURI) { let permissions = []; for (let {state, id} of this.getAllByURI(aURI)) { permissions.push(this.getPermissionItem(id, state)); @@ -90,20 +90,20 @@ this.SitePermissions = { * URI. This excludes file URIs, for instance, as they don't have a host, * even though nsIPermissionManager can still handle them. */ - isSupportedURI: function(aURI) { + isSupportedURI(aURI) { return aURI.schemeIs("http") || aURI.schemeIs("https"); }, /* Returns an array of all permission IDs. */ - listPermissions: function() { + listPermissions() { return Object.keys(gPermissionObject); }, /* Returns an array of permission states to be exposed to the user for a * permission with the given ID. */ - getAvailableStates: function(aPermissionID) { + getAvailableStates(aPermissionID) { if (aPermissionID in gPermissionObject && gPermissionObject[aPermissionID].states) return gPermissionObject[aPermissionID].states; @@ -116,7 +116,7 @@ this.SitePermissions = { /* Returns the default state of a particular permission. */ - getDefault: function(aPermissionID) { + getDefault(aPermissionID) { if (aPermissionID in gPermissionObject && gPermissionObject[aPermissionID].getDefault) return gPermissionObject[aPermissionID].getDefault(); @@ -126,7 +126,7 @@ this.SitePermissions = { /* Returns the state of a particular permission for a given URI. */ - get: function(aURI, aPermissionID) { + get(aURI, aPermissionID) { if (!this.isSupportedURI(aURI)) return this.UNKNOWN; @@ -141,7 +141,7 @@ this.SitePermissions = { /* Sets the state of a particular permission for a given URI. */ - set: function(aURI, aPermissionID, aState) { + set(aURI, aPermissionID, aState) { if (!this.isSupportedURI(aURI)) return; @@ -155,7 +155,7 @@ this.SitePermissions = { /* Removes the saved state of a particular permission for a given URI. */ - remove: function(aURI, aPermissionID) { + remove(aURI, aPermissionID) { if (!this.isSupportedURI(aURI)) return; @@ -165,7 +165,7 @@ this.SitePermissions = { /* Returns the localized label for the permission with the given ID, to be * used in a UI for managing permissions. */ - getPermissionLabel: function(aPermissionID) { + getPermissionLabel(aPermissionID) { let labelID = gPermissionObject[aPermissionID].labelID || aPermissionID; return gStringBundle.GetStringFromName("permission." + labelID + ".label"); }, @@ -173,7 +173,7 @@ this.SitePermissions = { /* Returns the localized label for the given permission state, to be used in * a UI for managing permissions. */ - getStateLabel: function(aPermissionID, aState, aInUse = false) { + getStateLabel(aPermissionID, aState, aInUse = false) { switch (aState) { case this.UNKNOWN: if (aInUse) @@ -215,7 +215,7 @@ var gPermissionObject = { */ "image": { - getDefault: function() { + getDefault() { return Services.prefs.getIntPref("permissions.default.image") == 2 ? SitePermissions.BLOCK : SitePermissions.ALLOW; } @@ -223,7 +223,7 @@ var gPermissionObject = { "cookie": { states: [ SitePermissions.ALLOW, SitePermissions.SESSION, SitePermissions.BLOCK ], - getDefault: function() { + getDefault() { if (Services.prefs.getIntPref("network.cookie.cookieBehavior") == 2) return SitePermissions.BLOCK; @@ -246,14 +246,14 @@ var gPermissionObject = { }, "popup": { - getDefault: function() { + getDefault() { return Services.prefs.getBoolPref("dom.disable_open_during_load") ? SitePermissions.BLOCK : SitePermissions.ALLOW; } }, "install": { - getDefault: function() { + getDefault() { return Services.prefs.getBoolPref("xpinstall.whitelist.required") ? SitePermissions.BLOCK : SitePermissions.ALLOW; } diff --git a/browser/modules/Social.jsm b/browser/modules/Social.jsm index 25e9a6f41614..510c2d4acf4d 100644 --- a/browser/modules/Social.jsm +++ b/browser/modules/Social.jsm @@ -92,14 +92,14 @@ this.Social = { return deferred.promise; }, - _updateEnabledState: function(enable) { + _updateEnabledState(enable) { for (let p of Social.providers) { p.enabled = enable; } }, // Called to update our cache of providers and set the current provider - _updateProviderCache: function(providers) { + _updateProviderCache(providers) { this.providers = providers; Services.obs.notifyObservers(null, "social:providers-changed", null); }, @@ -108,7 +108,7 @@ this.Social = { return !this._disabledForSafeMode && this.providers.length > 0; }, - _getProviderFromOrigin: function(origin) { + _getProviderFromOrigin(origin) { for (let p of this.providers) { if (p.origin == origin) { return p; @@ -117,20 +117,20 @@ this.Social = { return null; }, - getManifestByOrigin: function(origin) { + getManifestByOrigin(origin) { return SocialService.getManifestByOrigin(origin); }, - installProvider: function(data, installCallback, options = {}) { + installProvider(data, installCallback, options = {}) { SocialService.installProvider(data, installCallback, options); }, - uninstallProvider: function(origin, aCallback) { + uninstallProvider(origin, aCallback) { SocialService.uninstallProvider(origin, aCallback); }, // Activation functionality - activateFromOrigin: function(origin, callback) { + activateFromOrigin(origin, callback) { // It's OK if the provider has already been activated - we still get called // back with it. SocialService.enableProvider(origin, callback); @@ -225,7 +225,7 @@ DynamicResizeWatcher.prototype = { this.OpenGraphBuilder = { - generateEndpointURL: function(URLTemplate, pageData) { + generateEndpointURL(URLTemplate, pageData) { // support for existing oexchange style endpoints by supporting their // querystring arguments. parse the query string template and do // replacements where necessary the query names may be different than ours, diff --git a/browser/modules/SocialService.jsm b/browser/modules/SocialService.jsm index 2cc4255d1f00..c1dfce37fc20 100644 --- a/browser/modules/SocialService.jsm +++ b/browser/modules/SocialService.jsm @@ -58,7 +58,7 @@ var SocialServiceInternal = { get manifests() { return this.manifestsGenerator(); }, - getManifestPrefname: function(origin) { + getManifestPrefname(origin) { // Retrieve the prefname for a given origin/manifest. // If no existing pref, return a generated prefname. let MANIFEST_PREFS = Services.prefs.getBranch("social.manifest."); @@ -77,7 +77,7 @@ var SocialServiceInternal = { let originUri = Services.io.newURI(origin, null, null); return originUri.hostPort.replace('.', '-'); }, - orderedProviders: function(aCallback) { + orderedProviders(aCallback) { if (SocialServiceInternal.providerArray.length < 2) { schedule(function() { aCallback(SocialServiceInternal.providerArray); @@ -106,7 +106,7 @@ var SocialServiceInternal = { try { stmt.executeAsync({ - handleResult: function(aResultSet) { + handleResult(aResultSet) { let row; while ((row = aResultSet.getNextRow())) { let rh = row.getResultByName("host"); @@ -114,10 +114,10 @@ var SocialServiceInternal = { providers[rh].frecency = parseInt(frecency) || 0; } }, - handleError: function(aError) { + handleError(aError) { Cu.reportError(aError.message + " (Result = " + aError.result + ")"); }, - handleCompletion: function(aReason) { + handleCompletion(aReason) { // the query may not have returned all our providers, so we have // stamped the frecency on the provider and sort here. This makes sure // all enabled providers get sorted even with frecency zero. @@ -177,21 +177,21 @@ var ActiveProviders = { return this._providers; }, - has: function(origin) { + has(origin) { return (origin in this._providers); }, - add: function(origin) { + add(origin) { this._providers[origin] = 1; this._deferredTask.arm(); }, - delete: function(origin) { + delete(origin) { delete this._providers[origin]; this._deferredTask.arm(); }, - flush: function() { + flush() { this._deferredTask.disarm(); this._persist(); }, @@ -201,7 +201,7 @@ var ActiveProviders = { return this._deferredTask = new DeferredTask(this._persist.bind(this), 0); }, - _persist: function() { + _persist() { let string = Cc["@mozilla.org/supports-string;1"]. createInstance(Ci.nsISupportsString); string.data = JSON.stringify(this._providers); @@ -454,13 +454,13 @@ this.SocialService = { }, // Returns an unordered array of installed providers - getProviderList: function(onDone) { + getProviderList(onDone) { schedule(function() { onDone(SocialServiceInternal.providerArray); }); }, - getManifestByOrigin: function(origin) { + getManifestByOrigin(origin) { for (let manifest of SocialServiceInternal.manifests) { if (origin == manifest.origin) { return manifest; @@ -470,11 +470,11 @@ this.SocialService = { }, // Returns an array of installed providers, sorted by frecency - getOrderedProviderList: function(onDone) { + getOrderedProviderList(onDone) { SocialServiceInternal.orderedProviders(onDone); }, - getOriginActivationType: function(origin) { + getOriginActivationType(origin) { return getOriginActivationType(origin); }, @@ -486,7 +486,7 @@ this.SocialService = { this._providerListeners.delete(listener); }, - _notifyProviderListeners: function(topic, origin, providers) { + _notifyProviderListeners(topic, origin, providers) { for (let [listener, ] of this._providerListeners) { try { listener(topic, origin, providers); @@ -496,7 +496,7 @@ this.SocialService = { } }, - _manifestFromData: function(type, data, installOrigin) { + _manifestFromData(type, data, installOrigin) { let featureURLs = ['shareURL']; let resolveURLs = featureURLs.concat(['postActivationURL']); @@ -541,7 +541,7 @@ this.SocialService = { return data; }, - _showInstallNotification: function(data, aAddonInstaller) { + _showInstallNotification(data, aAddonInstaller) { let brandBundle = Services.strings.createBundle("chrome://branding/locale/brand.properties"); let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties"); @@ -560,7 +560,7 @@ this.SocialService = { let action = { label: browserBundle.GetStringFromName("service.install.ok.label"), accessKey: browserBundle.GetStringFromName("service.install.ok.accesskey"), - callback: function() { + callback() { aAddonInstaller.install(); }, }; @@ -576,7 +576,7 @@ this.SocialService = { action, [], options); }, - installProvider: function(data, installCallback, options = {}) { + installProvider(data, installCallback, options = {}) { data.installType = getOriginActivationType(data.origin); // if we get data, we MUST have a valid manifest generated from the data let manifest = this._manifestFromData(data.installType, data.manifest, data.origin); @@ -611,7 +611,7 @@ this.SocialService = { }.bind(this)); }, - _installProvider: function(data, options, installCallback) { + _installProvider(data, options, installCallback) { if (!data.manifest) throw new Error("Cannot install provider without manifest data"); @@ -633,7 +633,7 @@ this.SocialService = { this._showInstallNotification(data, installer); }, - createWrapper: function(manifest) { + createWrapper(manifest) { return new AddonWrapper(manifest); }, @@ -642,7 +642,7 @@ this.SocialService = { * have knowledge of the currently selected provider here, we will notify * the front end to deal with any reload. */ - updateProvider: function(aUpdateOrigin, aManifest) { + updateProvider(aUpdateOrigin, aManifest) { let installType = this.getOriginActivationType(aUpdateOrigin); // if we get data, we MUST have a valid manifest generated from the data let manifest = this._manifestFromData(installType, aManifest, aUpdateOrigin); @@ -670,7 +670,7 @@ this.SocialService = { }, - uninstallProvider: function(origin, aCallback) { + uninstallProvider(origin, aCallback) { let manifest = SocialService.getManifestByOrigin(origin); let addon = new AddonWrapper(manifest); addon.uninstall(aCallback); @@ -716,7 +716,7 @@ function SocialProvider(input) { } SocialProvider.prototype = { - reload: function() { + reload() { // calling terminate/activate does not set the enabled state whereas setting // enabled will call terminate/activate this.enabled = false; @@ -747,7 +747,7 @@ SocialProvider.prototype = { return SocialService.getManifestByOrigin(this.origin); }, - getPageSize: function(name) { + getPageSize(name) { let manifest = this.manifest; if (manifest && manifest.pageSize) return manifest.pageSize[name]; @@ -854,11 +854,11 @@ function AddonInstaller(sourceURI, aManifest, installCallback) { } var SocialAddonProvider = { - startup: function() {}, + startup() {}, - shutdown: function() {}, + shutdown() {}, - updateAddonAppDisabledStates: function() { + updateAddonAppDisabledStates() { // we wont bother with "enabling" services that are released from blocklist for (let manifest of SocialServiceInternal.manifests) { try { @@ -874,7 +874,7 @@ var SocialAddonProvider = { } }, - getAddonByID: function(aId, aCallback) { + getAddonByID(aId, aCallback) { for (let manifest of SocialServiceInternal.manifests) { if (aId == getAddonIDFromOrigin(manifest.origin)) { aCallback(new AddonWrapper(manifest)); @@ -884,7 +884,7 @@ var SocialAddonProvider = { aCallback(null); }, - getAddonsByTypes: function(aTypes, aCallback) { + getAddonsByTypes(aTypes, aCallback) { if (aTypes && aTypes.indexOf(ADDON_TYPE_SERVICE) == -1) { aCallback([]); return; @@ -892,7 +892,7 @@ var SocialAddonProvider = { aCallback([...SocialServiceInternal.manifests].map(a => new AddonWrapper(a))); }, - removeAddon: function(aAddon, aCallback) { + removeAddon(aAddon, aCallback) { AddonManagerPrivate.callAddonListeners("onUninstalling", aAddon, false); aAddon.pendingOperations |= AddonManager.PENDING_UNINSTALL; Services.prefs.clearUserPref(getPrefnameFromOrigin(aAddon.manifest.origin)); @@ -943,7 +943,7 @@ AddonWrapper.prototype = { return false; }, - isCompatibleWith: function(appVersion, platformVersion) { + isCompatibleWith(appVersion, platformVersion) { return true; }, @@ -993,7 +993,7 @@ AddonWrapper.prototype = { return permissions; }, - findUpdates: function(listener, reason, appVersion, platformVersion) { + findUpdates(listener, reason, appVersion, platformVersion) { if ("onNoCompatibilityUpdateAvailable" in listener) listener.onNoCompatibilityUpdateAvailable(this); if ("onNoUpdateAvailable" in listener) @@ -1069,7 +1069,7 @@ AddonWrapper.prototype = { return val; }, - uninstall: function(aCallback) { + uninstall(aCallback) { let prefName = getPrefnameFromOrigin(this.manifest.origin); if (Services.prefs.prefHasUserValue(prefName)) { if (ActiveProviders.has(this.manifest.origin)) { @@ -1084,7 +1084,7 @@ AddonWrapper.prototype = { } }, - cancelUninstall: function() { + cancelUninstall() { this._pending -= AddonManager.PENDING_UNINSTALL; AddonManagerPrivate.callAddonListeners("onOperationCancelled", this); } diff --git a/browser/modules/TransientPrefs.jsm b/browser/modules/TransientPrefs.jsm index aa2bd20c9ab2..a12c3c2c94d6 100644 --- a/browser/modules/TransientPrefs.jsm +++ b/browser/modules/TransientPrefs.jsm @@ -15,7 +15,7 @@ var prefVisibility = new Map; application. */ this.TransientPrefs = { - prefShouldBeVisible: function(prefName) { + prefShouldBeVisible(prefName) { if (Preferences.isSet(prefName)) prefVisibility.set(prefName, true); diff --git a/browser/modules/URLBarZoom.jsm b/browser/modules/URLBarZoom.jsm index 3e1c0f70761c..c496c339bbbc 100644 --- a/browser/modules/URLBarZoom.jsm +++ b/browser/modules/URLBarZoom.jsm @@ -11,7 +11,7 @@ Components.utils.import("resource://gre/modules/Services.jsm"); var URLBarZoom = { - init: function(aWindow) { + init(aWindow) { // Register ourselves with the service so we know when the zoom prefs change. Services.obs.addObserver(updateZoomButton, "browser-fullZoom:zoomChange", false); Services.obs.addObserver(updateZoomButton, "browser-fullZoom:zoomReset", false); diff --git a/browser/modules/Windows8WindowFrameColor.jsm b/browser/modules/Windows8WindowFrameColor.jsm index 911333747f6f..245ced4aea5e 100644 --- a/browser/modules/Windows8WindowFrameColor.jsm +++ b/browser/modules/Windows8WindowFrameColor.jsm @@ -14,7 +14,7 @@ var Registry = Cu.import("resource://gre/modules/WindowsRegistry.jsm").WindowsRe var Windows8WindowFrameColor = { _windowFrameColor: null, - get: function() { + get() { if (this._windowFrameColor) return this._windowFrameColor; diff --git a/browser/modules/WindowsJumpLists.jsm b/browser/modules/WindowsJumpLists.jsm index fff70148690f..8f4088cf257f 100644 --- a/browser/modules/WindowsJumpLists.jsm +++ b/browser/modules/WindowsJumpLists.jsm @@ -426,7 +426,7 @@ this.WinTaskbarJumpList = // Return the pending statement to the caller, to allow cancelation. return PlacesUtils.history.QueryInterface(Ci.nsPIPlacesDatabase) .asyncExecuteLegacyQueries([query], 1, options, { - handleResult: function(aResultSet) { + handleResult(aResultSet) { for (let row; (row = aResultSet.getNextRow());) { try { aCallback.call(aScope, @@ -436,11 +436,11 @@ this.WinTaskbarJumpList = } catch (e) {} } }, - handleError: function(aError) { + handleError(aError) { Components.utils.reportError( "Async execution error (" + aError.result + "): " + aError.message); }, - handleCompletion: function(aReason) { + handleCompletion(aReason) { aCallback.call(WinTaskbarJumpList, null); }, }); diff --git a/browser/modules/WindowsPreviewPerTab.jsm b/browser/modules/WindowsPreviewPerTab.jsm index 66488310f2eb..04d76feb4fbc 100644 --- a/browser/modules/WindowsPreviewPerTab.jsm +++ b/browser/modules/WindowsPreviewPerTab.jsm @@ -72,7 +72,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "PageThumbs", // nsIURI -> imgIContainer function _imageFromURI(uri, privateMode, callback) { let channel = NetUtil.newChannel({ - uri: uri, + uri, loadUsingSystemPrincipal: true, contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE }); @@ -158,7 +158,7 @@ PreviewController.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsITaskbarPreviewController, Ci.nsIDOMEventListener]), - destroy: function() { + destroy() { this.tab.removeEventListener("TabAttrModified", this, false); // Break cycles, otherwise we end up leaking the window with everything @@ -172,7 +172,7 @@ PreviewController.prototype = { }, // Resizes the canvasPreview to 0x0, essentially freeing its memory. - resetCanvasPreview: function() { + resetCanvasPreview() { this.canvasPreview.width = 0; this.canvasPreview.height = 0; }, @@ -180,7 +180,7 @@ PreviewController.prototype = { /** * Set the canvas dimensions. */ - resizeCanvasPreview: function(aRequestedWidth, aRequestedHeight) { + resizeCanvasPreview(aRequestedWidth, aRequestedHeight) { this.canvasPreview.width = aRequestedWidth; this.canvasPreview.height = aRequestedHeight; }, @@ -204,13 +204,13 @@ PreviewController.prototype = { return this.tab.linkedBrowser.getBoundingClientRect(); }, - cacheBrowserDims: function() { + cacheBrowserDims() { let dims = this.browserDims; this._cachedWidth = dims.width; this._cachedHeight = dims.height; }, - testCacheBrowserDims: function() { + testCacheBrowserDims() { let dims = this.browserDims; return this._cachedWidth == dims.width && this._cachedHeight == dims.height; @@ -220,7 +220,7 @@ PreviewController.prototype = { * Capture a new thumbnail image for this preview. Called by the controller * in response to a request for a new thumbnail image. */ - updateCanvasPreview: function(aFullScale, aCallback) { + updateCanvasPreview(aFullScale, aCallback) { // Update our cached browser dims so that delayed resize // events don't trigger another invalidation if this tab becomes active. this.cacheBrowserDims(); @@ -231,7 +231,7 @@ PreviewController.prototype = { AeroPeek.resetCacheTimer(); }, - updateTitleAndTooltip: function() { + updateTitleAndTooltip() { let title = this.win.tabbrowser.getWindowTitleForBrowser(this.linkedBrowser); this.preview.title = title; this.preview.tooltip = title; @@ -264,7 +264,7 @@ PreviewController.prototype = { * * @param aTaskbarCallback nsITaskbarPreviewCallback results callback */ - requestPreview: function(aTaskbarCallback) { + requestPreview(aTaskbarCallback) { // Grab a high res content preview this.resetCanvasPreview(); this.updateCanvasPreview(true, (aPreviewCanvas) => { @@ -312,7 +312,7 @@ PreviewController.prototype = { * @param aRequestedWidth width of the requested thumbnail * @param aRequestedHeight height of the requested thumbnail */ - requestThumbnail: function(aTaskbarCallback, aRequestedWidth, aRequestedHeight) { + requestThumbnail(aTaskbarCallback, aRequestedWidth, aRequestedHeight) { this.resizeCanvasPreview(aRequestedWidth, aRequestedHeight); this.updateCanvasPreview(false, (aThumbnailCanvas) => { aTaskbarCallback.done(aThumbnailCanvas, false); @@ -321,11 +321,11 @@ PreviewController.prototype = { // Event handling - onClose: function() { + onClose() { this.win.tabbrowser.removeTab(this.tab); }, - onActivate: function() { + onActivate() { this.win.tabbrowser.selectedTab = this.tab; // Accept activation - this will restore the browser window @@ -334,7 +334,7 @@ PreviewController.prototype = { }, // nsIDOMEventListener - handleEvent: function(evt) { + handleEvent(evt) { switch (evt.type) { case "TabAttrModified": this.updateTitleAndTooltip(); @@ -389,7 +389,7 @@ TabWindow.prototype = { tabEvents: ["TabOpen", "TabClose", "TabSelect", "TabMove"], winEvents: ["resize"], - destroy: function() { + destroy() { this._destroying = true; let tabs = this.tabbrowser.tabs; @@ -417,17 +417,17 @@ TabWindow.prototype = { return this.win.innerHeight; }, - cacheDims: function() { + cacheDims() { this._cachedWidth = this.width; this._cachedHeight = this.height; }, - testCacheDims: function() { + testCacheDims() { return this._cachedWidth == this.width && this._cachedHeight == this.height; }, // Invoked when the given tab is added to this window - newTab: function(tab) { + newTab(tab) { let controller = new PreviewController(this, tab); // It's OK to add the preview now while the favicon still loads. this.previews.set(tab, controller.preview); @@ -437,7 +437,7 @@ TabWindow.prototype = { controller.updateTitleAndTooltip(); }, - createTabPreview: function(controller) { + createTabPreview(controller) { let docShell = this.win .QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) @@ -451,7 +451,7 @@ TabWindow.prototype = { }, // Invoked when the given tab is closed - removeTab: function(tab) { + removeTab(tab) { let preview = this.previewFromTab(tab); preview.active = false; preview.visible = false; @@ -478,11 +478,11 @@ TabWindow.prototype = { this.updateTabOrdering(); }, - previewFromTab: function(tab) { + previewFromTab(tab) { return this.previews.get(tab); }, - updateTabOrdering: function() { + updateTabOrdering() { let previews = this.previews; let tabs = this.tabbrowser.tabs; @@ -505,7 +505,7 @@ TabWindow.prototype = { }, // nsIDOMEventListener - handleEvent: function(evt) { + handleEvent(evt) { let tab = evt.originalTarget; switch (evt.type) { case "TabOpen": @@ -531,7 +531,7 @@ TabWindow.prototype = { }, // Set or reset a timer that will invalidate visible thumbnails soon. - setInvalidationTimer: function() { + setInvalidationTimer() { if (!this.invalidateTimer) { this.invalidateTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); } @@ -551,7 +551,7 @@ TabWindow.prototype = { }, 1000, Ci.nsITimer.TYPE_ONE_SHOT); }, - onResize: function() { + onResize() { // Specific to a window. // Call invalidate on each tab thumbnail so that Windows will request an @@ -569,7 +569,7 @@ TabWindow.prototype = { this.setInvalidationTimer(); }, - invalidateTabPreview: function(aBrowser) { + invalidateTabPreview(aBrowser) { for (let [tab, preview] of this.previews) { if (aBrowser == tab.linkedBrowser) { preview.invalidate(); @@ -580,13 +580,13 @@ TabWindow.prototype = { // Browser progress listener - onLocationChange: function(aBrowser) { + onLocationChange(aBrowser) { // I'm not sure we need this, onStateChange does a really good job // of picking up page changes. // this.invalidateTabPreview(aBrowser); }, - onStateChange: function(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { + onStateChange(aBrowser, aWebProgress, aRequest, aStateFlags, aStatus) { if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP && aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) { this.invalidateTabPreview(aBrowser); @@ -596,7 +596,7 @@ TabWindow.prototype = { directRequestProtocols: new Set([ "file", "chrome", "resource", "about" ]), - onLinkIconAvailable: function(aBrowser, aIconURL) { + onLinkIconAvailable(aBrowser, aIconURL) { let requestURL = null; if (aIconURL) { let shouldRequestFaviconURL = true; @@ -662,7 +662,7 @@ this.AeroPeek = { // Length of time in seconds that previews are cached cacheLifespan: 20, - initialize: function() { + initialize() { if (!(WINTASKBAR_CONTRACTID in Cc)) return; this.taskbar = Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar); @@ -752,25 +752,25 @@ this.AeroPeek = { } }, - addPreview: function(preview) { + addPreview(preview) { this.previews.push(preview); this.checkPreviewCount(); }, - removePreview: function(preview) { + removePreview(preview) { let idx = this.previews.indexOf(preview); this.previews.splice(idx, 1); this.checkPreviewCount(); }, - checkPreviewCount: function() { + checkPreviewCount() { if (!this._prefenabled) { return; } this.enabled = this.previews.length <= this.maxpreviews; }, - onOpenWindow: function(win) { + onOpenWindow(win) { // This occurs when the taskbar service is not available (xp, vista) if (!this.available || !this._prefenabled) return; @@ -778,7 +778,7 @@ this.AeroPeek = { win.gTaskbarTabGroup = new TabWindow(win); }, - onCloseWindow: function(win) { + onCloseWindow(win) { // This occurs when the taskbar service is not available (xp, vista) if (!this.available || !this._prefenabled) return; @@ -790,13 +790,13 @@ this.AeroPeek = { this.destroy(); }, - resetCacheTimer: function() { + resetCacheTimer() { this.cacheTimer.cancel(); this.cacheTimer.init(this, 1000 * this.cacheLifespan, Ci.nsITimer.TYPE_ONE_SHOT); }, // nsIObserver - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (aTopic == "nsPref:changed" && aData == TOGGLE_PREF_NAME) { this._prefenabled = this.prefs.getBoolPref(TOGGLE_PREF_NAME); } diff --git a/browser/modules/offlineAppCache.jsm b/browser/modules/offlineAppCache.jsm index 5d0e3481a713..cbf561943467 100644 --- a/browser/modules/offlineAppCache.jsm +++ b/browser/modules/offlineAppCache.jsm @@ -10,7 +10,7 @@ const Cc = Components.classes; const Ci = Components.interfaces; this.OfflineAppCacheHelper = { - clear: function() { + clear() { var cacheService = Cc["@mozilla.org/netwerk/cache-storage-service;1"].getService(Ci.nsICacheStorageService); var appCacheStorage = cacheService.appCacheStorage(LoadContextInfo.default, null); try { diff --git a/browser/modules/test/browser_ContentSearch.js b/browser/modules/test/browser_ContentSearch.js index 22665f21bc18..ae2f2b1b8dc8 100644 --- a/browser/modules/test/browser_ContentSearch.js +++ b/browser/modules/test/browser_ContentSearch.js @@ -97,7 +97,7 @@ add_task(function* search() { engine.getSubmission(data.searchString, "", data.whence).uri.spec; gMsgMan.sendAsyncMessage(TEST_MSG, { type: "Search", - data: data, + data, expectedURL: submissionURL, }); let msg = yield waitForTestMsg("loadStopped"); @@ -121,7 +121,7 @@ add_task(function* searchInBackgroundTab() { engine.getSubmission(data.searchString, "", data.whence).uri.spec; gMsgMan.sendAsyncMessage(TEST_MSG, { type: "Search", - data: data, + data, expectedURL: submissionURL, }); @@ -315,11 +315,11 @@ function waitForNewEngine(basename, numImages) { let addDeferred = Promise.defer(); let url = getRootDirectory(gTestPath) + basename; Services.search.addEngine(url, null, "", false, { - onSuccess: function(engine) { + onSuccess(engine) { info("Search engine added: " + basename); addDeferred.resolve(engine); }, - onError: function(errCode) { + onError(errCode) { ok(false, "addEngine failed with error code " + errCode); addDeferred.reject(); }, diff --git a/browser/modules/test/browser_PermissionUI.js b/browser/modules/test/browser_PermissionUI.js index ddb8832ebfae..f396217f7974 100644 --- a/browser/modules/test/browser_PermissionUI.js +++ b/browser/modules/test/browser_PermissionUI.js @@ -223,7 +223,7 @@ add_task(function* test_with_permission_key() { accessKey: "M", action: Ci.nsIPermissionManager.ALLOW_ACTION, expiryType: Ci.nsIPermissionManager.EXPIRE_SESSION, - callback: function() { + callback() { allowed = true; } }; @@ -234,7 +234,7 @@ add_task(function* test_with_permission_key() { accessKey: "D", action: Ci.nsIPermissionManager.DENY_ACTION, expiryType: Ci.nsIPermissionManager.EXPIRE_SESSION, - callback: function() { + callback() { denied = true; } }; @@ -376,7 +376,7 @@ add_task(function* test_no_request() { let mainAction = { label: "Allow", accessKey: "M", - callback: function() { + callback() { allowed = true; } }; @@ -385,7 +385,7 @@ add_task(function* test_no_request() { let secondaryAction = { label: "Deny", accessKey: "D", - callback: function() { + callback() { denied = true; } }; diff --git a/browser/modules/test/browser_ProcessHangNotifications.js b/browser/modules/test/browser_ProcessHangNotifications.js index 715801b35b66..87a7c8811a8c 100644 --- a/browser/modules/test/browser_ProcessHangNotifications.js +++ b/browser/modules/test/browser_ProcessHangNotifications.js @@ -44,7 +44,7 @@ let gTestHangReport = { TEST_CALLBACK_TERMPLUGIN: 3, _hangType: 1, - _tcb: function(aCallbackType) {}, + _tcb(aCallbackType) {}, get hangType() { return this._hangType; @@ -58,26 +58,26 @@ let gTestHangReport = { this._tcb = aValue; }, - QueryInterface: function(aIID) { + QueryInterface(aIID) { if (aIID.equals(Components.interfaces.nsIHangReport) || aIID.equals(Components.interfaces.nsISupports)) return this; throw Components.results.NS_NOINTERFACE; }, - userCanceled: function() { + userCanceled() { this._tcb(this.TEST_CALLBACK_CANCELED); }, - terminateScript: function() { + terminateScript() { this._tcb(this.TEST_CALLBACK_TERMSCRIPT); }, - terminatePlugin: function() { + terminatePlugin() { this._tcb(this.TEST_CALLBACK_TERMPLUGIN); }, - isReportForBrowser: function(aFrameLoader) { + isReportForBrowser(aFrameLoader) { return true; } }; diff --git a/browser/modules/test/contentSearch.js b/browser/modules/test/contentSearch.js index fda68a7a4104..8b2b498da7a8 100644 --- a/browser/modules/test/contentSearch.js +++ b/browser/modules/test/contentSearch.js @@ -30,7 +30,7 @@ addMessageListener(TEST_MSG, msg => { waitForLoadAndStopIt(msg.data.expectedURL, url => { sendAsyncMessage(TEST_MSG, { type: "loadStopped", - url: url, + url, }); }); } @@ -41,7 +41,7 @@ function waitForLoadAndStopIt(expectedURL, callback) { let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebProgress); let listener = { - onStateChange: function(webProg, req, flags, status) { + onStateChange(webProg, req, flags, status) { if (req instanceof Ci.nsIChannel) { let url = req.originalURI.spec; dump("waitForLoadAndStopIt: onStateChange " + url + "\n"); diff --git a/browser/modules/test/unit/social/head.js b/browser/modules/test/unit/social/head.js index b7f06d33b2d4..0a94f536deec 100644 --- a/browser/modules/test/unit/social/head.js +++ b/browser/modules/test/unit/social/head.js @@ -132,7 +132,7 @@ function AsyncRunner() { this._callbacks = { done: do_test_finished, - error: function(err) { + error(err) { // xpcshell test functions like do_check_eq throw NS_ERROR_ABORT on // failure. Ignore those so they aren't rethrown here. if (err !== Cr.NS_ERROR_ABORT) { @@ -143,7 +143,7 @@ function AsyncRunner() { do_throw(err); } }, - consoleError: function(scriptErr) { + consoleError(scriptErr) { // Try to ensure the error is related to the test. let filename = scriptErr.sourceName || scriptErr.toString() || ""; if (filename.indexOf("/toolkit/components/social/") >= 0) diff --git a/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js b/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js index b74250fc69c4..a72dbd492e4d 100644 --- a/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js +++ b/browser/modules/test/xpcshell/test_DirectoryLinksProvider.js @@ -247,7 +247,7 @@ function setTimeout(fun, timeout) { let timer = Components.classes["@mozilla.org/timer;1"] .createInstance(Components.interfaces.nsITimer); var event = { - notify: function() { + notify() { fun(); } }; @@ -1062,7 +1062,7 @@ add_task(function* test_DirectoryLinksProvider_getEnhancedLink() { do_check_eq(links.length, 0); // There are no directory links. function checkEnhanced(url, image) { - let enhanced = DirectoryLinksProvider.getEnhancedLink({url: url}); + let enhanced = DirectoryLinksProvider.getEnhancedLink({url}); do_check_eq(enhanced && enhanced.enhancedImageURI, image); } @@ -1487,7 +1487,7 @@ add_task(function* test_DirectoryLinksProvider_getFrequencyCapReportSiteAction() targetedSite: "foo.com", url: "bar.com" }, - isPinned: function() { return false; }, + isPinned() { return false; }, }], "view", 0); // read file content and ensure that view counters are updated @@ -1531,9 +1531,9 @@ add_task(function* test_DirectoryLinksProvider_ClickRemoval() { }] }, { - handleError: function() { do_check_true(false); }, - handleResult: function() {}, - handleCompletion: function() { resolve(); } + handleError() { do_check_true(false); }, + handleResult() {}, + handleCompletion() { resolve(); } } ); }); @@ -1827,7 +1827,7 @@ add_task(function* test_blockSuggestedTiles() { // block suggested tile in a regular way DirectoryLinksProvider.reportSitesAction([{ - isPinned: function() { return false; }, + isPinned() { return false; }, link: Object.assign({frecency: 1000}, suggestedLink) }], "block", 0); diff --git a/browser/modules/webrtcUI.jsm b/browser/modules/webrtcUI.jsm index 4f818a6194d1..fd40ca0cf1fb 100644 --- a/browser/modules/webrtcUI.jsm +++ b/browser/modules/webrtcUI.jsm @@ -29,7 +29,7 @@ this.webrtcUI = { peerConnectionBlockers: new Set(), emitter: new EventEmitter(), - init: function() { + init() { Services.obs.addObserver(maybeAddMenuIndicator, "browser-delayed-startup-finished", false); let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] @@ -47,7 +47,7 @@ this.webrtcUI = { mm.addMessageListener("webrtc:UpdateBrowserIndicators", this); }, - uninit: function() { + uninit() { Services.obs.removeObserver(maybeAddMenuIndicator, "browser-delayed-startup-finished"); let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] @@ -113,7 +113,7 @@ this.webrtcUI = { _streams: [], // The boolean parameters indicate which streams should be included in the result. - getActiveStreams: function(aCamera, aMicrophone, aScreen) { + getActiveStreams(aCamera, aMicrophone, aScreen) { return webrtcUI._streams.filter(aStream => { let state = aStream.state; return aCamera && state.camera || @@ -127,22 +127,22 @@ this.webrtcUI = { let browserWindow = browser.ownerGlobal; let tab = browserWindow.gBrowser && browserWindow.gBrowser.getTabForBrowser(browser); - return {uri: state.documentURI, tab: tab, browser: browser, types: types}; + return {uri: state.documentURI, tab, browser, types}; }); }, - swapBrowserForNotification: function(aOldBrowser, aNewBrowser) { + swapBrowserForNotification(aOldBrowser, aNewBrowser) { for (let stream of this._streams) { if (stream.browser == aOldBrowser) stream.browser = aNewBrowser; } }, - forgetStreamsFromBrowser: function(aBrowser) { + forgetStreamsFromBrowser(aBrowser) { this._streams = this._streams.filter(stream => stream.browser != aBrowser); }, - showSharingDoorhanger: function(aActiveStream) { + showSharingDoorhanger(aActiveStream) { let browserWindow = aActiveStream.browser.ownerGlobal; if (aActiveStream.tab) { browserWindow.gBrowser.selectedTab = aActiveStream.tab; @@ -165,7 +165,7 @@ this.webrtcUI = { identityBox.click(); }, - updateWarningLabel: function(aMenuList) { + updateWarningLabel(aMenuList) { let type = aMenuList.selectedItem.getAttribute("devicetype"); let document = aMenuList.ownerDocument; document.getElementById("webRTC-all-windows-shared").hidden = type != "Screen"; @@ -195,23 +195,23 @@ this.webrtcUI = { // is canceled. (This would typically be used in // conjunction with a blocking handler to cancel // a user prompt or other work done by the handler) - addPeerConnectionBlocker: function(aCallback) { + addPeerConnectionBlocker(aCallback) { this.peerConnectionBlockers.add(aCallback); }, - removePeerConnectionBlocker: function(aCallback) { + removePeerConnectionBlocker(aCallback) { this.peerConnectionBlockers.delete(aCallback); }, - on: function(...args) { + on(...args) { return this.emitter.on(...args); }, - off: function(...args) { + off(...args) { return this.emitter.off(...args); }, - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { switch (aMessage.name) { case "rtcpeer:Request": { @@ -348,14 +348,14 @@ function prompt(aBrowser, aRequest) { // The real callback will be set during the "showing" event. The // empty function here is so that PopupNotifications.show doesn't // reject the action. - callback: function() {} + callback() {} }; let secondaryActions = [ { label: stringBundle.getString("getUserMedia.dontAllow.label"), accessKey: stringBundle.getString("getUserMedia.dontAllow.accesskey"), - callback: function(aState) { + callback(aState) { denyRequest(notification.browser, aRequest); if (aState && aState.checkboxChecked) { let perms = Services.perms; @@ -393,7 +393,7 @@ function prompt(aBrowser, aRequest) { [productName]) } : undefined, }, - eventCallback: function(aTopic, aNewBrowser) { + eventCallback(aTopic, aNewBrowser) { if (aTopic == "swapping") return true; @@ -746,11 +746,11 @@ function getGlobalIndicator() { _statusBar: Cc["@mozilla.org/widget/macsystemstatusbar;1"] .getService(Ci.nsISystemStatusBar), - _command: function(aEvent) { + _command(aEvent) { webrtcUI.showSharingDoorhanger(aEvent.target.stream); }, - _popupShowing: function(aEvent) { + _popupShowing(aEvent) { let type = this.getAttribute("type"); let activeStreams; if (type == "Camera") { @@ -809,12 +809,12 @@ function getGlobalIndicator() { return true; }, - _popupHiding: function(aEvent) { + _popupHiding(aEvent) { while (this.firstChild) this.firstChild.remove(); }, - _setIndicatorState: function(aName, aState) { + _setIndicatorState(aName, aState) { let field = "_" + aName.toLowerCase(); if (aState && !this[field]) { let menu = this._hiddenDoc.createElement("menu"); @@ -840,12 +840,12 @@ function getGlobalIndicator() { this[field] = null } }, - updateIndicatorState: function() { + updateIndicatorState() { this._setIndicatorState("Camera", webrtcUI.showCameraIndicator); this._setIndicatorState("Microphone", webrtcUI.showMicrophoneIndicator); this._setIndicatorState("Screen", webrtcUI.showScreenSharingIndicator); }, - close: function() { + close() { this._setIndicatorState("Camera", false); this._setIndicatorState("Microphone", false); this._setIndicatorState("Screen", false); diff --git a/browser/themes/shared/preferences/containers.css b/browser/themes/shared/preferences/containers.css index 3fb965331631..b7a372a4b4e7 100644 --- a/browser/themes/shared/preferences/containers.css +++ b/browser/themes/shared/preferences/containers.css @@ -10,12 +10,12 @@ --preference-active-color: #858585; } -radiogroup { +.radio-buttons { display: flex; margin-inline-start: 0.35rem; } -radio { +.radio-buttons > radio { flex: auto; display: flex; align-items: center; @@ -35,19 +35,23 @@ radio { fill: #4d4d4d; } +.radio-buttons > radio { + padding-inline-start: 2px; +} + radio > [data-identity-icon] { inline-size: 22px; block-size: 22px; } -radio[selected=true] { +.radio-buttons > radio[selected=true] { outline-color: var(--preference-unselected-color); } -radio[focused=true] { +.radio-buttons > radio[focused=true] { outline-color: var(--preference-selected-color); } -radio:hover:active { +.radio-buttons > radio:hover:active { outline-color: var(--preference-active-color); } diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm index 557b867b9bf1..5feb7bd17093 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm @@ -150,7 +150,7 @@ this.TestRunner = { // helpers - _performCombo: function*(combo) { + *_performCombo(combo) { let paddedComboIndex = padLeft(this.currentComboIndex + 1, String(this.combos.length).length); log.info("Combination " + paddedComboIndex + "/" + this.combos.length + ": " + this._comboName(combo).substring(1)); diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm index 97d8354d5b0a..f501ea140422 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/Buttons.jsm @@ -64,7 +64,7 @@ this.Buttons = { function createWidget() { let id = "screenshot-widget"; let spec = { - id: id, + id, label: "My Button", removable: true, tooltiptext: "", diff --git a/build/clang-plugin/CustomTypeAnnotation.cpp b/build/clang-plugin/CustomTypeAnnotation.cpp index 4dbed3d0202f..b61538ecc346 100644 --- a/build/clang-plugin/CustomTypeAnnotation.cpp +++ b/build/clang-plugin/CustomTypeAnnotation.cpp @@ -3,6 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "CustomTypeAnnotation.h" +#include "Utils.h" CustomTypeAnnotation StackClass = CustomTypeAnnotation("moz_stack_class", "stack"); diff --git a/build/clang-plugin/MozCheckAction.cpp b/build/clang-plugin/MozCheckAction.cpp index 15362be24b81..c2e2a28fa746 100644 --- a/build/clang-plugin/MozCheckAction.cpp +++ b/build/clang-plugin/MozCheckAction.cpp @@ -2,7 +2,9 @@ * 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/. */ +#include "plugin.h" #include "DiagnosticsMatcher.h" +#include "clang/Frontend/FrontendPluginRegistry.h" class MozCheckAction : public PluginASTAction { public: diff --git a/build/clang-plugin/plugin.h b/build/clang-plugin/plugin.h index 02303a76cbce..9fc547d3487e 100644 --- a/build/clang-plugin/plugin.h +++ b/build/clang-plugin/plugin.h @@ -12,7 +12,6 @@ #include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Basic/Version.h" #include "clang/Frontend/CompilerInstance.h" -#include "clang/Frontend/FrontendPluginRegistry.h" #include "clang/Frontend/MultiplexConsumer.h" #include "clang/Sema/Sema.h" #include "llvm/ADT/DenseMap.h" diff --git a/caps/nsNullPrincipalURI.cpp b/caps/nsNullPrincipalURI.cpp index 020d2a1a7c84..c643b3adb1c0 100644 --- a/caps/nsNullPrincipalURI.cpp +++ b/caps/nsNullPrincipalURI.cpp @@ -165,6 +165,32 @@ nsNullPrincipalURI::SetPath(const nsACString &aPath) return NS_ERROR_NOT_IMPLEMENTED; } +NS_IMETHODIMP +nsNullPrincipalURI::GetFilePath(nsACString &aFilePath) +{ + aFilePath.Truncate(); + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsNullPrincipalURI::SetFilePath(const nsACString &aFilePath) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsNullPrincipalURI::GetQuery(nsACString &aQuery) +{ + aQuery.Truncate(); + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP +nsNullPrincipalURI::SetQuery(const nsACString &aQuery) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + NS_IMETHODIMP nsNullPrincipalURI::GetRef(nsACString &_ref) { diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_addon-panels.js b/devtools/client/debugger/test/mochitest/browser_dbg_addon-panels.js index aeda501b0381..5b370e1cf2e2 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_addon-panels.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_addon-panels.js @@ -17,6 +17,7 @@ var PREFS = [ ["devtools.netmonitor.enabled", true], ["devtools.scratchpad.enabled", true] ]; + function test() { Task.spawn(function* () { // Store and enable all optional dev tools panels @@ -26,20 +27,19 @@ function test() { let addonDebugger = yield initAddonDebugger(ADDON_ID); // Check only valid tabs are shown - let tabs = addonDebugger.frame.contentDocument.getElementById("toolbox-tabs").children; + let tabs = addonDebugger.frame.contentDocument.querySelectorAll(".toolbox-tabs button") + let expectedTabs = ["webconsole", "jsdebugger", "scratchpad"]; is(tabs.length, expectedTabs.length, "displaying only " + expectedTabs.length + " tabs in addon debugger"); Array.forEach(tabs, (tab, i) => { let toolName = expectedTabs[i]; - is(tab.getAttribute("toolid"), toolName, "displaying " + toolName); + is(tab.getAttribute("data-id"), toolName, "displaying " + toolName); }); // Check no toolbox buttons are shown - let buttons = addonDebugger.frame.contentDocument.getElementById("toolbox-buttons").children; - Array.forEach(buttons, (btn, i) => { - is(btn.hidden, true, "no toolbox buttons for the addon debugger -- " + btn.className); - }); + let buttons = addonDebugger.frame.contentDocument.querySelectorAll("#toolbox-buttons-end button"); + is(buttons.length, 0, "no toolbox buttons for the addon debugger"); yield addonDebugger.destroy(); yield removeAddon(addon); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_on-pause-highlight.js b/devtools/client/debugger/test/mochitest/browser_dbg_on-pause-highlight.js index 07e2360afcb7..52f09bf565c3 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_on-pause-highlight.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_on-pause-highlight.js @@ -35,18 +35,14 @@ function testPause() { gDebugger.gThreadClient.addOneTimeListener("paused", () => { gToolbox.selectTool("webconsole").then(() => { - ok(gToolboxTab.hasAttribute("highlighted") && - gToolboxTab.getAttribute("highlighted") == "true", + ok(gToolboxTab.classList.contains("highlighted"), "The highlighted class is present"); - ok(!gToolboxTab.hasAttribute("selected") || - gToolboxTab.getAttribute("selected") != "true", + ok(!gToolboxTab.classList.contains("selected"), "The tab is not selected"); }).then(() => gToolbox.selectTool("jsdebugger")).then(() => { - ok(gToolboxTab.hasAttribute("highlighted") && - gToolboxTab.getAttribute("highlighted") == "true", + ok(gToolboxTab.classList.contains("highlighted"), "The highlighted class is present"); - ok(gToolboxTab.hasAttribute("selected") && - gToolboxTab.getAttribute("selected") == "true", + ok(gToolboxTab.classList.contains("selected"), "...and the tab is selected, so the glow will not be present."); }).then(testResume); }); @@ -66,8 +62,7 @@ function testResume() { gToolbox.selectTool("webconsole").then(() => { ok(!gToolboxTab.classList.contains("highlighted"), "The highlighted class is not present now after the resume"); - ok(!gToolboxTab.hasAttribute("selected") || - gToolboxTab.getAttribute("selected") != "true", + ok(!gToolboxTab.classList.contains("selected"), "The tab is not selected"); }).then(() => closeDebuggerAndFinish(gPanel)); }); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_on-pause-raise.js b/devtools/client/debugger/test/mochitest/browser_dbg_on-pause-raise.js index 6f6f152477b7..8cf8fb80162d 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_on-pause-raise.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_on-pause-raise.js @@ -79,18 +79,14 @@ add_task(function *() { } yield toolbox.selectTool("webconsole"); - ok(toolboxTab.hasAttribute("highlighted") && - toolboxTab.getAttribute("highlighted") == "true", + ok(toolboxTab.classList.contains("highlighted"), "The highlighted class is present"); - ok(!toolboxTab.hasAttribute("selected") || - toolboxTab.getAttribute("selected") != "true", + ok(!toolboxTab.classList.contains("selected"), "The tab is not selected"); yield toolbox.selectTool("jsdebugger"); - ok(toolboxTab.hasAttribute("highlighted") && - toolboxTab.getAttribute("highlighted") == "true", + ok(toolboxTab.classList.contains("highlighted"), "The highlighted class is present"); - ok(toolboxTab.hasAttribute("selected") && - toolboxTab.getAttribute("selected") == "true", + ok(toolboxTab.classList.contains("selected"), "...and the tab is selected, so the glow will not be present."); } @@ -104,11 +100,9 @@ add_task(function *() { yield onPaused; yield toolbox.selectTool("webconsole"); - ok(!toolboxTab.hasAttribute("highlighted") || - toolboxTab.getAttribute("highlighted") != "true", + ok(!toolboxTab.classList.contains("highlighted"), "The highlighted class is not present now after the resume"); - ok(!toolboxTab.hasAttribute("selected") || - toolboxTab.getAttribute("selected") != "true", + ok(!toolboxTab.classList.contains("selected"), "The tab is not selected"); } }); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_worker-window.js b/devtools/client/debugger/test/mochitest/browser_dbg_worker-window.js index 46198d31cd7f..19ef1c15cf10 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_worker-window.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_worker-window.js @@ -48,7 +48,7 @@ add_task(function* () { "worker URL in host title"); let toolTabs = toolbox.doc.querySelectorAll(".devtools-tab"); - let activeTools = [...toolTabs].map(tab=>tab.getAttribute("toolid")); + let activeTools = [...toolTabs].map(tab=>tab.getAttribute("data-id")); is(activeTools.join(","), "webconsole,jsdebugger,scratchpad,options", "Correct set of tools supported by worker"); diff --git a/devtools/client/definitions.js b/devtools/client/definitions.js index fc85bf43965f..d8135508dbf1 100644 --- a/devtools/client/definitions.js +++ b/devtools/client/definitions.js @@ -470,6 +470,11 @@ exports.defaultThemes = [ // addons that have manually inserted toolbarbuttons into DOM. // (By default, supported target is only local tab) exports.ToolboxButtons = [ + { id: "command-button-pick", + isTargetSupported: target => { + return target.activeTab && target.activeTab.traits.frames; + } + }, { id: "command-button-frames", isTargetSupported: target => { return target.activeTab && target.activeTab.traits.frames; diff --git a/devtools/client/framework/components/moz.build b/devtools/client/framework/components/moz.build new file mode 100644 index 000000000000..96e5e94a35a8 --- /dev/null +++ b/devtools/client/framework/components/moz.build @@ -0,0 +1,12 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# 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/. + + +DevToolsModules( + 'toolbox-controller.js', + 'toolbox-tab.js', + 'toolbox-toolbar.js', +) diff --git a/devtools/client/framework/components/toolbox-controller.js b/devtools/client/framework/components/toolbox-controller.js new file mode 100644 index 000000000000..cd212d1e8cd0 --- /dev/null +++ b/devtools/client/framework/components/toolbox-controller.js @@ -0,0 +1,151 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ +"use strict"; + +const {createClass, createFactory} = require("devtools/client/shared/vendor/react"); +const ToolboxToolbar = createFactory(require("devtools/client/framework/components/toolbox-toolbar")); +const ELEMENT_PICKER_ID = "command-button-pick"; + +/** + * This component serves as a state controller for the toolbox React component. It's a + * thin layer for translating events and state of the outside world into the React update + * cycle. This solution was used to keep the amount of code changes to a minimimum while + * adapting the existing codebase to start using React. + */ +module.exports = createClass({ + displayName: "ToolboxController", + + getInitialState() { + // See the ToolboxToolbar propTypes for documentation on each of these items in state, + // and for the defintions of the props that are expected to be passed in. + return { + focusedButton: ELEMENT_PICKER_ID, + currentToolId: null, + canRender: false, + highlightedTool: "", + areDockButtonsEnabled: true, + panelDefinitions: [], + hostTypes: [], + canCloseToolbox: true, + toolboxButtons: [], + buttonIds: [], + checkedButtonsUpdated: () => { + this.forceUpdate(); + } + }; + }, + + componentWillUnmount() { + this.state.toolboxButtons.forEach(button => { + button.off("updatechecked", this.state.checkedButtonsUpdated); + }); + }, + + /** + * The button and tab ids must be known in order to be able to focus left and right + * using the arrow keys. + */ + updateButtonIds() { + const {panelDefinitions, toolboxButtons, optionsPanel, hostTypes, + canCloseToolbox} = this.state; + + // This is a little gnarly, but go through all of the state and extract the IDs. + this.setState({ + buttonIds: [ + ...toolboxButtons.filter(btn => btn.isInStartContainer).map(({id}) => id), + ...panelDefinitions.map(({id}) => id), + ...toolboxButtons.filter(btn => !btn.isInStartContainer).map(({id}) => id), + optionsPanel ? optionsPanel.id : null, + ...hostTypes.map(({position}) => "toolbox-dock-" + position), + canCloseToolbox ? "toolbox-close" : null + ].filter(id => id) + }); + + this.updateFocusedButton(); + }, + + updateFocusedButton() { + this.setFocusedButton(this.state.focusedButton); + }, + + setFocusedButton(focusedButton) { + const {buttonIds} = this.state; + + this.setState({ + focusedButton: focusedButton && buttonIds.includes(focusedButton) + ? focusedButton + : buttonIds[0] + }); + }, + + setCurrentToolId(currentToolId) { + this.setState({currentToolId}); + // Also set the currently focused button to this tool. + this.setFocusedButton(currentToolId); + }, + + setCanRender() { + this.setState({ canRender: true }); + this.updateButtonIds(); + }, + + setOptionsPanel(optionsPanel) { + this.setState({ optionsPanel }); + this.updateButtonIds(); + }, + + highlightTool(highlightedTool) { + this.setState({ highlightedTool }); + }, + + unhighlightTool(id) { + if (this.state.highlightedTool === id) { + this.setState({ highlightedTool: "" }); + } + }, + + setDockButtonsEnabled(areDockButtonsEnabled) { + this.setState({ areDockButtonsEnabled }); + this.updateButtonIds(); + }, + + setHostTypes(hostTypes) { + this.setState({ hostTypes }); + this.updateButtonIds(); + }, + + setCanCloseToolbox(canCloseToolbox) { + this.setState({ canCloseToolbox }); + this.updateButtonIds(); + }, + + setPanelDefinitions(panelDefinitions) { + this.setState({ panelDefinitions }); + this.updateButtonIds(); + }, + + setToolboxButtons(toolboxButtons) { + // Listen for updates of the checked attribute. + this.state.toolboxButtons.forEach(button => { + button.off("updatechecked", this.state.checkedButtonsUpdated); + }); + toolboxButtons.forEach(button => { + button.on("updatechecked", this.state.checkedButtonsUpdated); + }); + + this.setState({ toolboxButtons }); + this.updateButtonIds(); + }, + + setCanMinimize(canMinimize) { + /* Bug 1177463 - The minimize button is currently hidden until we agree on + the UI for it, and until bug 1173849 is fixed too. */ + + // this.setState({ canMinimize }); + }, + + render() { + return ToolboxToolbar(Object.assign({}, this.props, this.state)); + } +}); diff --git a/devtools/client/framework/components/toolbox-tab.js b/devtools/client/framework/components/toolbox-tab.js new file mode 100644 index 000000000000..643f231714a3 --- /dev/null +++ b/devtools/client/framework/components/toolbox-tab.js @@ -0,0 +1,62 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ +"use strict"; + +const {DOM, createClass} = require("devtools/client/shared/vendor/react"); +const {img, button} = DOM; + +module.exports = createClass({ + displayName: "ToolboxTab", + + renderIcon(definition, isHighlighted) { + const {icon, highlightedicon} = definition; + if (!icon) { + return []; + } + return [ + img({ + className: "default-icon", + src: icon + }), + img({ + className: "highlighted-icon", + src: highlightedicon || icon + }) + ]; + }, + + render() { + const {panelDefinition, currentToolId, highlightedTool, selectTool, + focusedButton, focusButton} = this.props; + const {id, tooltip, label, iconOnly} = panelDefinition; + const isHighlighted = id === currentToolId; + + const className = [ + "devtools-tab", + panelDefinition.invertIconForLightTheme || panelDefinition.invertIconForDarkTheme + ? "icon-invertable" + : "", + panelDefinition.invertIconForLightTheme ? "icon-invertable-light-theme" : "", + panelDefinition.invertIconForDarkTheme ? "icon-invertable-dark-theme" : "", + currentToolId === id ? "selected" : "", + highlightedTool === id ? "highlighted" : "", + iconOnly ? "devtools-tab-icon-only" : "" + ].join(" "); + + return button( + { + className, + id: `toolbox-tab-${id}`, + "data-id": id, + title: tooltip, + type: "button", + tabIndex: focusedButton === id ? "0" : "-1", + onFocus: () => focusButton(id), + onClick: () => selectTool(id), + }, + ...this.renderIcon(panelDefinition, isHighlighted), + iconOnly ? null : label + ); + } +}); diff --git a/devtools/client/framework/components/toolbox-toolbar.js b/devtools/client/framework/components/toolbox-toolbar.js new file mode 100644 index 000000000000..bc8a470cd136 --- /dev/null +++ b/devtools/client/framework/components/toolbox-toolbar.js @@ -0,0 +1,250 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * 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/. */ +"use strict"; + +const {DOM, createClass, createFactory, PropTypes} = require("devtools/client/shared/vendor/react"); +const {div, button} = DOM; +const ToolboxTab = createFactory(require("devtools/client/framework/components/toolbox-tab")); + +/** + * This is the overall component for the toolbox toolbar. It is designed to not know how + * the state is being managed, and attempts to be as pure as possible. The + * ToolboxController component controls the changing state, and passes in everything as + * props. + */ +module.exports = createClass({ + displayName: "ToolboxToolbar", + + propTypes: { + // The currently focused item (for arrow keyboard navigation) + // This ID determines the tabindex being 0 or -1. + focusedButton: PropTypes.string, + // List of command button definitions. + toolboxButtons: PropTypes.array, + // The id of the currently selected tool, e.g. "inspector" + currentToolId: PropTypes.string, + // An optionally highlighted tool, e.g. "inspector" + highlightedTool: PropTypes.string, + // List of tool panel definitions. + panelDefinitions: PropTypes.array, + // Function to select a tool based on its id. + selectTool: PropTypes.func, + // Keep a record of what button is focused. + focusButton: PropTypes.func, + // The options button definition. + optionsPanel: PropTypes.object, + // Hold off displaying the toolbar until enough information is ready for it to render + // nicely. + canRender: PropTypes.bool, + // Localization interface. + L10N: PropTypes.object, + }, + + /** + * The render function is kept fairly short for maintainability. See the individual + * render functions for how each of the sections is rendered. + */ + render() { + const containerProps = {className: "devtools-tabbar"}; + return this.props.canRender + ? ( + div( + containerProps, + renderToolboxButtonsStart(this.props), + renderTabs(this.props), + renderToolboxButtonsEnd(this.props), + renderOptions(this.props), + renderSeparator(), + renderDockButtons(this.props) + ) + ) + : div(containerProps); + } +}); + +/** + * Render all of the tabs, this takes in the panel definitions and builds out + * the buttons for each of them. + * + * @param {Array} panelDefinitions - Array of objects that define panels. + * @param {String} currentToolId - The currently selected tool's id; e.g. "inspector". + * @param {String} highlightedTool - If a tool is highlighted, this is it's id. + * @param {Function} selectTool - Function to select a tool in the toolbox. + * @param {String} focusedButton - The id of the focused button. + * @param {Function} focusButton - Keep a record of the currently focused button. + */ +function renderTabs({panelDefinitions, currentToolId, highlightedTool, selectTool, + focusedButton, focusButton}) { + // A wrapper is needed to get flex sizing correct in XUL. + return div({className: "toolbox-tabs-wrapper"}, + div({className: "toolbox-tabs"}, + ...panelDefinitions.map(panelDefinition => ToolboxTab({ + panelDefinition, + currentToolId, + highlightedTool, + selectTool, + focusedButton, + focusButton, + })) + ) + ); +} + +/** + * A little helper function to call renderToolboxButtons for buttons at the start + * of the toolbox. + */ +function renderToolboxButtonsStart(props) { + return renderToolboxButtons(props, true); +} + +/** +* A little helper function to call renderToolboxButtons for buttons at the end +* of the toolbox. + */ +function renderToolboxButtonsEnd(props) { + return renderToolboxButtons(props, false); +} + +/** + * Render all of the tabs, this takes in a list of toolbox button states. These are plain + * objects that have all of the relevant information needed to render the button. + * See Toolbox.prototype._createButtonState in devtools/client/framework/toolbox.js for + * documentation on this object. + * + * @param {Array} toolboxButtons - Array of objects that define the command buttons. + * @param {String} focusedButton - The id of the focused button. + * @param {Function} focusButton - Keep a record of the currently focused button. + * @param {boolean} isStart - Render either the starting buttons, or ending buttons. + */ +function renderToolboxButtons({toolboxButtons, focusedButton, focusButton}, isStart) { + const visibleButtons = toolboxButtons.filter(command => { + const {isVisible, isInStartContainer} = command; + return isVisible && (isStart ? isInStartContainer : !isInStartContainer); + }); + + if (visibleButtons.length === 0) { + return null; + } + + return div({id: `toolbox-buttons-${isStart ? "start" : "end"}`}, + ...visibleButtons.map(command => { + const {id, description, onClick, isChecked, className: buttonClass} = command; + return button({ + id, + title: description, + className: ( + "command-button command-button-invertable devtools-button " + + buttonClass + (isChecked ? " checked" : "") + ), + onClick: (event) => { + onClick(event); + focusButton(id); + }, + onFocus: () => focusButton(id), + tabIndex: id === focusedButton ? "0" : "-1" + }); + }) + ); +} + +/** + * The options button is a ToolboxTab just like in the renderTabs() function. However + * it is separate from the normal tabs, so deal with it separately here. + * + * @param {Object} optionsPanel - A single panel definition for the options panel. + * @param {String} currentToolId - The currently selected tool's id; e.g. "inspector". + * @param {Function} selectTool - Function to select a tool in the toolbox. + * @param {String} focusedButton - The id of the focused button. + * @param {Function} focusButton - Keep a record of the currently focused button. + */ +function renderOptions({optionsPanel, currentToolId, selectTool, focusedButton, + focusButton}) { + return div({id: "toolbox-option-container"}, ToolboxTab({ + panelDefinition: optionsPanel, + currentToolId, + selectTool, + focusedButton, + focusButton, + })); +} + +/** + * Render a separator. + */ +function renderSeparator() { + return div({ + id: "toolbox-controls-separator", + className: "devtools-separator" + }); +} + +/** + * Render the dock buttons, and handle all the cases for what type of host the toolbox + * is attached to. The following props are expected. + * + * @property {String} focusedButton - The id of the focused button. + * @property {Function} closeToolbox - Completely close the toolbox. + * @property {Array} hostTypes - Array of host type objects, containing: + * @property {String} position - Position name + * @property {Function} switchHost - Function to switch the host. + * @property {Function} focusButton - Keep a record of the currently focused button. + * @property {Object} L10N - Localization interface. + * @property {Boolean} areDockButtonsEnabled - They are not enabled in certain situations + * like when they are in the WebIDE. + * @property {Boolean} canCloseToolbox - Are the tools in a context where they can be + * closed? This is not always the case, e.g. in the + * WebIDE. + */ +function renderDockButtons(props) { + const { + focusedButton, + closeToolbox, + hostTypes, + focusButton, + L10N, + areDockButtonsEnabled, + canCloseToolbox, + } = props; + + let buttons = []; + + if (areDockButtonsEnabled) { + hostTypes.forEach(hostType => { + const id = "toolbox-dock-" + hostType.position; + buttons.push(button({ + id, + onFocus: () => focusButton(id), + className: "toolbox-dock-button devtools-button", + title: L10N.getStr(`toolboxDockButtons.${hostType.position}.tooltip`), + onClick: e => { + hostType.switchHost(); + focusButton(id); + }, + tabIndex: focusedButton === id ? "0" : "-1", + })); + }); + } + + const closeButtonId = "toolbox-close"; + + const closeButton = canCloseToolbox + ? button({ + id: closeButtonId, + onFocus: () => focusButton(closeButtonId), + className: "devtools-button", + title: L10N.getStr("toolbox.closebutton.tooltip"), + onClick: () => { + closeToolbox(); + focusButton(closeButtonId); + }, + tabIndex: focusedButton === "toolbox-close" ? "0" : "-1", + }) + : null; + + return div({id: "toolbox-controls"}, + div({id: "toolbox-dock-buttons"}, ...buttons), + closeButton + ); +} diff --git a/devtools/client/framework/moz.build b/devtools/client/framework/moz.build index 7b28b4b9e749..2b2c26f434a0 100644 --- a/devtools/client/framework/moz.build +++ b/devtools/client/framework/moz.build @@ -9,6 +9,10 @@ TEST_HARNESS_FILES.xpcshell.devtools.client.framework.test += [ 'test/shared-redux-head.js', ] +DIRS += [ + 'components', +] + DevToolsModules( 'about-devtools-toolbox.js', 'attach-thread.js', diff --git a/devtools/client/framework/test/browser_devtools_api.js b/devtools/client/framework/test/browser_devtools_api.js index 72d415c0b6b5..93e3838eb668 100644 --- a/devtools/client/framework/test/browser_devtools_api.js +++ b/devtools/client/framework/test/browser_devtools_api.js @@ -152,11 +152,13 @@ var continueTests = Task.async(function* (toolbox, panel) { ok(toolbox.getCurrentPanel(), "panel value is correct"); is(toolbox.currentToolId, toolId2, "toolbox _currentToolId is correct"); - ok(!toolbox.doc.getElementById("toolbox-tab-" + toolId2).hasAttribute("icon-invertable"), - "The tool tab does not have the invertable attribute"); + ok(!toolbox.doc.getElementById("toolbox-tab-" + toolId2) + .classList.contains("icon-invertable"), + "The tool tab does not have the invertable class"); - ok(toolbox.doc.getElementById("toolbox-tab-inspector").hasAttribute("icon-invertable"), - "The builtin tool tabs do have the invertable attribute"); + ok(toolbox.doc.getElementById("toolbox-tab-inspector") + .classList.contains("icon-invertable"), + "The builtin tool tabs do have the invertable class"); let toolDefinitions = gDevTools.getToolDefinitionMap(); ok(toolDefinitions.has(toolId2), "The tool is in gDevTools"); diff --git a/devtools/client/framework/test/browser_new_activation_workflow.js b/devtools/client/framework/test/browser_new_activation_workflow.js index 4092bf1a7421..365a6486b96b 100644 --- a/devtools/client/framework/test/browser_new_activation_workflow.js +++ b/devtools/client/framework/test/browser_new_activation_workflow.js @@ -41,7 +41,7 @@ function checkToolLoading() { function selectAndCheckById(id) { return toolbox.selectTool(id).then(function () { let tab = toolbox.doc.getElementById("toolbox-tab-" + id); - is(tab.hasAttribute("selected"), true, "The " + id + " tab is selected"); + is(tab.classList.contains("selected"), true, "The " + id + " tab is selected"); }); } diff --git a/devtools/client/framework/test/browser_toolbox_dynamic_registration.js b/devtools/client/framework/test/browser_toolbox_dynamic_registration.js index 57cb88190e6c..8b89a88701fd 100644 --- a/devtools/client/framework/test/browser_toolbox_dynamic_registration.js +++ b/devtools/client/framework/test/browser_toolbox_dynamic_registration.js @@ -97,8 +97,9 @@ function toolUnregistered(event, toolId) function cleanup() { - toolbox.destroy(); - toolbox = null; - gBrowser.removeCurrentTab(); - finish(); + toolbox.destroy().then(() => {; + toolbox = null; + gBrowser.removeCurrentTab(); + finish(); + }) } diff --git a/devtools/client/framework/test/browser_toolbox_highlight.js b/devtools/client/framework/test/browser_toolbox_highlight.js index d197fdc99195..fe6e9bc804b4 100644 --- a/devtools/client/framework/test/browser_toolbox_highlight.js +++ b/devtools/client/framework/test/browser_toolbox_highlight.js @@ -8,74 +8,78 @@ var {Toolbox} = require("devtools/client/framework/toolbox"); var toolbox = null; function test() { - const URL = "data:text/plain;charset=UTF-8,Nothing to see here, move along"; + Task.spawn(function* () { + const URL = "data:text/plain;charset=UTF-8,Nothing to see here, move along"; - const TOOL_ID_1 = "jsdebugger"; - const TOOL_ID_2 = "webconsole"; + const TOOL_ID_1 = "jsdebugger"; + const TOOL_ID_2 = "webconsole"; + yield addTab(URL); - addTab(URL).then(() => { - let target = TargetFactory.forTab(gBrowser.selectedTab); - gDevTools.showToolbox(target, TOOL_ID_1, Toolbox.HostType.BOTTOM) - .then(aToolbox => { - toolbox = aToolbox; - // select tool 2 - toolbox.selectTool(TOOL_ID_2) - // and highlight the first one - .then(highlightTab.bind(null, TOOL_ID_1)) - // to see if it has the proper class. - .then(checkHighlighted.bind(null, TOOL_ID_1)) - // Now switch back to first tool - .then(() => toolbox.selectTool(TOOL_ID_1)) - // to check again. But there is no easy way to test if - // it is showing orange or not. - .then(checkNoHighlightWhenSelected.bind(null, TOOL_ID_1)) - // Switch to tool 2 again - .then(() => toolbox.selectTool(TOOL_ID_2)) - // and check again. - .then(checkHighlighted.bind(null, TOOL_ID_1)) - // Now unhighlight the tool - .then(unhighlightTab.bind(null, TOOL_ID_1)) - // to see the classes gone. - .then(checkNoHighlight.bind(null, TOOL_ID_1)) - // Now close the toolbox and exit. - .then(() => executeSoon(() => { - toolbox.destroy() - .then(() => { - toolbox = null; - gBrowser.removeCurrentTab(); - finish(); - }); - })); - }); + const target = TargetFactory.forTab(gBrowser.selectedTab); + toolbox = yield gDevTools.showToolbox(target, TOOL_ID_1, Toolbox.HostType.BOTTOM) + + // select tool 2 + yield toolbox.selectTool(TOOL_ID_2) + // and highlight the first one + yield highlightTab(TOOL_ID_1); + // to see if it has the proper class. + yield checkHighlighted(TOOL_ID_1); + // Now switch back to first tool + yield toolbox.selectTool(TOOL_ID_1); + // to check again. But there is no easy way to test if + // it is showing orange or not. + yield checkNoHighlightWhenSelected(TOOL_ID_1); + // Switch to tool 2 again + yield toolbox.selectTool(TOOL_ID_2); + // and check again. + yield checkHighlighted(TOOL_ID_1); + // Now unhighlight the tool + yield unhighlightTab(TOOL_ID_1); + // to see the classes gone. + yield checkNoHighlight(TOOL_ID_1); + + // Now close the toolbox and exit. + executeSoon(() => { + toolbox.destroy().then(() => { + toolbox = null; + gBrowser.removeCurrentTab(); + finish(); + }); + }); + }) + .catch(error => { + ok(false, "There was an error running the test."); }); } function highlightTab(toolId) { - info("Highlighting tool " + toolId + "'s tab."); - toolbox.highlightTool(toolId); + info(`Highlighting tool ${toolId}'s tab.`); + return toolbox.highlightTool(toolId); } function unhighlightTab(toolId) { - info("Unhighlighting tool " + toolId + "'s tab."); - toolbox.unhighlightTool(toolId); + info(`Unhighlighting tool ${toolId}'s tab.`); + return toolbox.unhighlightTool(toolId); } function checkHighlighted(toolId) { let tab = toolbox.doc.getElementById("toolbox-tab-" + toolId); - ok(tab.hasAttribute("highlighted"), "The highlighted attribute is present"); - ok(!tab.hasAttribute("selected") || tab.getAttribute("selected") != "true", - "The tab is not selected"); + ok(tab.classList.contains("highlighted"), + `The highlighted class is present in ${toolId}.`); + ok(!tab.classList.contains("selected"), + `The tab is not selected in ${toolId}`); } function checkNoHighlightWhenSelected(toolId) { let tab = toolbox.doc.getElementById("toolbox-tab-" + toolId); - ok(tab.hasAttribute("highlighted"), "The highlighted attribute is present"); - ok(tab.hasAttribute("selected") && tab.getAttribute("selected") == "true", - "and the tab is selected, so the orange glow will not be present."); + ok(tab.classList.contains("highlighted"), + `The highlighted class is present in ${toolId}`); + ok(tab.classList.contains("selected"), + `And the tab is selected, so the orange glow will not be present. in ${toolId}`); } function checkNoHighlight(toolId) { let tab = toolbox.doc.getElementById("toolbox-tab-" + toolId); - ok(!tab.hasAttribute("highlighted"), - "The highlighted attribute is not present"); + ok(!tab.classList.contains("highlighted"), + `The highlighted class is not present in ${toolId}`); } diff --git a/devtools/client/framework/test/browser_toolbox_hosts.js b/devtools/client/framework/test/browser_toolbox_hosts.js index e16563ba7c87..adb0512a6af0 100644 --- a/devtools/client/framework/test/browser_toolbox_hosts.js +++ b/devtools/client/framework/test/browser_toolbox_hosts.js @@ -134,6 +134,6 @@ function* testPreviousHost() { } function checkToolboxLoaded(iframe) { - let tabs = iframe.contentDocument.getElementById("toolbox-tabs"); + let tabs = iframe.contentDocument.querySelector(".toolbox-tabs"); ok(tabs, "toolbox UI has been loaded into iframe"); } diff --git a/devtools/client/framework/test/browser_toolbox_options.js b/devtools/client/framework/test/browser_toolbox_options.js index 57430cefa080..79d4216617fc 100644 --- a/devtools/client/framework/test/browser_toolbox_options.js +++ b/devtools/client/framework/test/browser_toolbox_options.js @@ -293,22 +293,8 @@ function checkRegistered(toolId, deferred, event, data) { if (data == toolId) { ok(true, "Correct tool added back"); // checking tab on the toolbox - let radio = doc.getElementById("toolbox-tab-" + toolId); - ok(radio, "Tab added back for " + toolId); - if (radio.previousSibling) { - ok(+radio.getAttribute("ordinal") >= - +radio.previousSibling.getAttribute("ordinal"), - "Inserted tab's ordinal is greater than equal to its previous tab." + - "Expected " + radio.getAttribute("ordinal") + " >= " + - radio.previousSibling.getAttribute("ordinal")); - } - if (radio.nextSibling) { - ok(+radio.getAttribute("ordinal") < - +radio.nextSibling.getAttribute("ordinal"), - "Inserted tab's ordinal is less than its next tab. Expected " + - radio.getAttribute("ordinal") + " < " + - radio.nextSibling.getAttribute("ordinal")); - } + let button = doc.getElementById("toolbox-tab-" + toolId); + ok(button, "Tab added back for " + toolId); } else { ok(false, "Something went wrong, " + toolId + " was not registered"); } diff --git a/devtools/client/framework/test/browser_toolbox_options_disable_buttons.js b/devtools/client/framework/test/browser_toolbox_options_disable_buttons.js index 09cde4393e24..9240963192da 100644 --- a/devtools/client/framework/test/browser_toolbox_options_disable_buttons.js +++ b/devtools/client/framework/test/browser_toolbox_options_disable_buttons.js @@ -60,19 +60,16 @@ function testPreferenceAndUIStateIsConsistent() { let checkNodes = [...panelWin.document.querySelectorAll( "#enabled-toolbox-buttons-box input[type=checkbox]")]; let toolboxButtonNodes = [...doc.querySelectorAll(".command-button")]; - toolboxButtonNodes.push(doc.getElementById("command-button-frames")); - let toggleableTools = toolbox.toolboxButtons; // The noautohide button is only displayed in the browser toolbox - toggleableTools = toggleableTools.filter( + let toolbarButtons = toolbox.toolbarButtons.filter( tool => tool.id != "command-button-noautohide"); - for (let tool of toggleableTools) { + for (let tool of toolbarButtons) { let isVisible = getBoolPref(tool.visibilityswitch); - let button = toolboxButtonNodes.filter( - toolboxButton => toolboxButton.id === tool.id)[0]; - is(!button.hasAttribute("hidden"), isVisible, + let button = toolboxButtonNodes.find(toolboxButton => toolboxButton.id === tool.id); + is(!!button, isVisible, "Button visibility matches pref for " + tool.id); let check = checkNodes.filter(node => node.id === tool.id)[0]; @@ -84,48 +81,52 @@ function testPreferenceAndUIStateIsConsistent() { function testToggleToolboxButtons() { let checkNodes = [...panelWin.document.querySelectorAll( "#enabled-toolbox-buttons-box input[type=checkbox]")]; - let toolboxButtonNodes = [...doc.querySelectorAll(".command-button")]; - let toggleableTools = toolbox.toolboxButtons; // The noautohide button is only displayed in the browser toolbox, and the element // picker button is not toggleable. - toggleableTools = toggleableTools.filter( - tool => tool.id != "command-button-noautohide" && tool.id != "command-button-pick"); - toolboxButtonNodes = toolboxButtonNodes.filter( - btn => btn.id != "command-button-noautohide" && btn.id != "command-button-pick"); + let toolbarButtons = toolbox.toolbarButtons.filter( + tool => tool.id != "command-button-noautohide"); - is(checkNodes.length, toggleableTools.length, + let visibleToolbarButtons = toolbox.toolbarButtons.filter(tool => tool.isVisible); + + let toolbarButtonNodes = [...doc.querySelectorAll(".command-button")].filter( + btn => btn.id != "command-button-noautohide"); + + is(checkNodes.length, toolbarButtons.length, "All of the buttons are toggleable."); - is(checkNodes.length, toolboxButtonNodes.length, + is(visibleToolbarButtons.length, toolbarButtonNodes.length, "All of the DOM buttons are toggleable."); - for (let tool of toggleableTools) { + for (let tool of toolbarButtons) { let id = tool.id; let matchedCheckboxes = checkNodes.filter(node => node.id === id); - let matchedButtons = toolboxButtonNodes.filter(button => button.id === id); + let matchedButtons = toolbarButtonNodes.filter(button => button.id === id); is(matchedCheckboxes.length, 1, "There should be a single toggle checkbox for: " + id); - is(matchedButtons.length, 1, - "There should be a DOM button for: " + id); - is(matchedButtons[0], tool.button, - "DOM buttons should match for: " + id); + if (tool.isVisible) { + is(matchedButtons.length, 1, + "There should be a DOM button for the visible: " + id); + is(matchedButtons[0].getAttribute("title"), tool.description, + "The tooltip for button matches the tool definition."); + } else { + is(matchedButtons.length, 0, + "There should not be a DOM button for the invisible: " + id); + } - is(matchedCheckboxes[0].nextSibling.textContent, tool.label, + is(matchedCheckboxes[0].nextSibling.textContent, tool.description, "The label for checkbox matches the tool definition."); - is(matchedButtons[0].getAttribute("title"), tool.label, - "The tooltip for button matches the tool definition."); } // Store modified pref names so that they can be cleared on error. - for (let tool of toggleableTools) { + for (let tool of toolbarButtons) { let pref = tool.visibilityswitch; modifiedPrefs.push(pref); } // Try checking each checkbox, making sure that it changes the preference for (let node of checkNodes) { - let tool = toggleableTools.filter( - toggleableTool => toggleableTool.id === node.id)[0]; + let tool = toolbarButtons.filter( + commandButton => commandButton.id === node.id)[0]; let isVisible = getBoolPref(tool.visibilityswitch); testPreferenceAndUIStateIsConsistent(); diff --git a/devtools/client/framework/test/browser_toolbox_tools_per_toolbox_registration.js b/devtools/client/framework/test/browser_toolbox_tools_per_toolbox_registration.js index 8c43286597c9..51e0084cec87 100644 --- a/devtools/client/framework/test/browser_toolbox_tools_per_toolbox_registration.js +++ b/devtools/client/framework/test/browser_toolbox_tools_per_toolbox_registration.js @@ -132,8 +132,9 @@ function toolboxToolUnregistered() { } function cleanup() { - toolbox.destroy(); - toolbox = null; - gBrowser.removeCurrentTab(); - finish(); + toolbox.destroy().then(() => {; + toolbox = null; + gBrowser.removeCurrentTab(); + finish(); + }); } diff --git a/devtools/client/framework/test/browser_toolbox_transport_events.js b/devtools/client/framework/test/browser_toolbox_transport_events.js index 1e2b67ac48f7..106596cc2961 100644 --- a/devtools/client/framework/test/browser_toolbox_transport_events.js +++ b/devtools/client/framework/test/browser_toolbox_transport_events.js @@ -30,10 +30,12 @@ function cleanUp(toolbox) { off(DebuggerClient, "connect", onDebuggerClientConnect); toolbox.destroy().then(function () { - gBrowser.removeCurrentTab(); - executeSoon(function () { - finish(); - }); + setTimeout(() => { + gBrowser.removeCurrentTab(); + executeSoon(function () { + finish(); + }); + }, 1000); }); } diff --git a/devtools/client/framework/test/browser_toolbox_window_title_frame_select.js b/devtools/client/framework/test/browser_toolbox_window_title_frame_select.js index 1e3d6664684b..b0abfbc744eb 100644 --- a/devtools/client/framework/test/browser_toolbox_window_title_frame_select.js +++ b/devtools/client/framework/test/browser_toolbox_window_title_frame_select.js @@ -44,11 +44,11 @@ add_task(function* () { // Open frame menu and wait till it's available on the screen. // Also check 'open' attribute on the command button. let btn = toolbox.doc.getElementById("command-button-frames"); - ok(!btn.getAttribute("open"), "The open attribute must not be present"); + ok(!btn.classList.contains("checked"), "The checked class must not be present"); let menu = toolbox.showFramesMenu({target: btn}); yield once(menu, "open"); - is(btn.getAttribute("open"), "true", "The open attribute must be set"); + ok(btn.classList.contains("checked"), "The checked class must be set"); // Verify that the frame list menu is populated let frames = menu.items; diff --git a/devtools/client/framework/toolbox-highlighter-utils.js b/devtools/client/framework/toolbox-highlighter-utils.js index 3488e7cf8ccd..0bff5a4d7bcf 100644 --- a/devtools/client/framework/toolbox-highlighter-utils.js +++ b/devtools/client/framework/toolbox-highlighter-utils.js @@ -122,7 +122,7 @@ exports.getHighlighterUtils = function (toolbox) { } isPicking = true; - toolbox.pickerButtonChecked = true; + toolbox.pickerButton.isChecked = true; yield toolbox.selectTool("inspector"); toolbox.on("select", cancelPicker); @@ -156,7 +156,7 @@ exports.getHighlighterUtils = function (toolbox) { } isPicking = false; - toolbox.pickerButtonChecked = false; + toolbox.pickerButton.isChecked = false; if (isRemoteHighlightable()) { yield toolbox.highlighter.cancelPick(); diff --git a/devtools/client/framework/toolbox-options.js b/devtools/client/framework/toolbox-options.js index 80d377854347..9885ac5fb08a 100644 --- a/devtools/client/framework/toolbox-options.js +++ b/devtools/client/framework/toolbox-options.js @@ -135,30 +135,36 @@ OptionsPanel.prototype = { } }, - setupToolbarButtonsList: function () { + setupToolbarButtonsList: Task.async(function* () { + // Ensure the toolbox is open, and the buttons are all set up. + yield this.toolbox.isOpen; + let enabledToolbarButtonsBox = this.panelDoc.getElementById( "enabled-toolbox-buttons-box"); - let toggleableButtons = this.toolbox.toolboxButtons; - let setToolboxButtonsVisibility = - this.toolbox.setToolboxButtonsVisibility.bind(this.toolbox); + let toolbarButtons = this.toolbox.toolbarButtons; + + if (!toolbarButtons) { + console.warn("The command buttons weren't initiated yet."); + return; + } let onCheckboxClick = (checkbox) => { - let toolDefinition = toggleableButtons.filter( + let commandButton = toolbarButtons.filter( toggleableButton => toggleableButton.id === checkbox.id)[0]; Services.prefs.setBoolPref( - toolDefinition.visibilityswitch, checkbox.checked); - setToolboxButtonsVisibility(); + commandButton.visibilityswitch, checkbox.checked); + this.toolbox.updateToolboxButtonsVisibility(); }; - let createCommandCheckbox = tool => { + let createCommandCheckbox = button => { let checkboxLabel = this.panelDoc.createElement("label"); let checkboxSpanLabel = this.panelDoc.createElement("span"); - checkboxSpanLabel.textContent = tool.label; + checkboxSpanLabel.textContent = button.description; let checkboxInput = this.panelDoc.createElement("input"); checkboxInput.setAttribute("type", "checkbox"); - checkboxInput.setAttribute("id", tool.id); - if (InfallibleGetBoolPref(tool.visibilityswitch)) { + checkboxInput.setAttribute("id", button.id); + if (button.isVisible) { checkboxInput.setAttribute("checked", true); } checkboxInput.addEventListener("change", @@ -169,14 +175,14 @@ OptionsPanel.prototype = { return checkboxLabel; }; - for (let tool of toggleableButtons) { - if (!tool.isTargetSupported(this.toolbox.target)) { + for (let button of toolbarButtons) { + if (!button.isTargetSupported(this.toolbox.target)) { continue; } - enabledToolbarButtonsBox.appendChild(createCommandCheckbox(tool)); + enabledToolbarButtonsBox.appendChild(createCommandCheckbox(button)); } - }, + }), setupToolsList: function () { let defaultToolsBox = this.panelDoc.getElementById("default-tools-box"); diff --git a/devtools/client/framework/toolbox.js b/devtools/client/framework/toolbox.js index a413d004ceb7..c7c14df2967d 100644 --- a/devtools/client/framework/toolbox.js +++ b/devtools/client/framework/toolbox.js @@ -7,6 +7,7 @@ const MAX_ORDINAL = 99; const SPLITCONSOLE_ENABLED_PREF = "devtools.toolbox.splitconsoleEnabled"; const SPLITCONSOLE_HEIGHT_PREF = "devtools.toolbox.splitconsoleHeight"; +const DISABLE_AUTOHIDE_PREF = "ui.popup.disable_autohide"; const OS_HISTOGRAM = "DEVTOOLS_OS_ENUMERATED_PER_USER"; const OS_IS_64_BITS = "DEVTOOLS_OS_IS_64_BITS_PER_USER"; const HOST_HISTOGRAM = "DEVTOOLS_TOOLBOX_HOST"; @@ -62,6 +63,8 @@ loader.lazyRequireGetter(this, "settleAll", "devtools/shared/ThreadSafeDevToolsUtils", true); loader.lazyRequireGetter(this, "ToolboxButtons", "devtools/client/definitions", true); +loader.lazyRequireGetter(this, "ViewHelpers", + "devtools/client/shared/widgets/view-helpers", true); loader.lazyGetter(this, "registerHarOverlay", () => { return require("devtools/client/netmonitor/har/toolbox-overlay").register; @@ -105,7 +108,7 @@ function Toolbox(target, selectedTool, hostType, contentWindow, frameId) { this._toolRegistered = this._toolRegistered.bind(this); this._toolUnregistered = this._toolUnregistered.bind(this); this._refreshHostTitle = this._refreshHostTitle.bind(this); - this._toggleAutohide = this._toggleAutohide.bind(this); + this._toggleNoAutohide = this._toggleNoAutohide.bind(this); this.showFramesMenu = this.showFramesMenu.bind(this); this._updateFrames = this._updateFrames.bind(this); this._splitConsoleOnKeypress = this._splitConsoleOnKeypress.bind(this); @@ -127,12 +130,13 @@ function Toolbox(target, selectedTool, hostType, contentWindow, frameId) { this._onPerformanceFrontEvent = this._onPerformanceFrontEvent.bind(this); this._onBottomHostWillChange = this._onBottomHostWillChange.bind(this); this._toggleMinimizeMode = this._toggleMinimizeMode.bind(this); - this._onTabbarFocus = this._onTabbarFocus.bind(this); - this._onTabbarArrowKeypress = this._onTabbarArrowKeypress.bind(this); + this._onToolbarFocus = this._onToolbarFocus.bind(this); + this._onToolbarArrowKeypress = this._onToolbarArrowKeypress.bind(this); this._onPickerClick = this._onPickerClick.bind(this); this._onPickerKeypress = this._onPickerKeypress.bind(this); this._onPickerStarted = this._onPickerStarted.bind(this); this._onPickerStopped = this._onPickerStopped.bind(this); + this.selectTool = this.selectTool.bind(this); this._target.on("close", this.destroy); @@ -143,6 +147,9 @@ function Toolbox(target, selectedTool, hostType, contentWindow, frameId) { this._hostType = hostType; + this._isOpenDeferred = defer(); + this.isOpen = this._isOpenDeferred.promise; + EventEmitter.decorate(this); this._target.on("navigate", this._refreshHostTitle); @@ -180,7 +187,52 @@ Toolbox.prototype = { SIDE_ENABLED: "devtools.toolbox.sideEnabled", }, - currentToolId: null, + get currentToolId() { + return this._currentToolId; + }, + + set currentToolId(id) { + this._currentToolId = id; + this.component.setCurrentToolId(id); + }, + + get panelDefinitions() { + return this._panelDefinitions; + }, + + set panelDefinitions(definitions) { + this._panelDefinitions = definitions; + this._combineAndSortPanelDefinitions(); + }, + + get visibleAdditionalTools() { + if (!this._visibleAdditionalTools) { + this._visibleAdditionalTools = []; + } + + return this._visibleAdditionalTools; + }, + + set visibleAdditionalTools(tools) { + this._visibleAdditionalTools = tools; + this._combineAndSortPanelDefinitions(); + }, + + /** + * Combines the built-in panel definitions and the additional tool definitions that + * can be set by add-ons. + */ + _combineAndSortPanelDefinitions() { + const definitions = [...this._panelDefinitions, ...this.getVisibleAdditionalTools()]; + definitions.sort(definition => { + return -1 * (definition.ordinal == undefined || definition.ordinal < 0 + ? MAX_ORDINAL + : definition.ordinal + ); + }); + this.component.setPanelDefinitions(definitions); + }, + lastUsedToolId: null, /** @@ -366,21 +418,10 @@ Toolbox.prototype = { this.isReady = true; let framesPromise = this._listFrames(); - this.closeButton = this.doc.getElementById("toolbox-close"); - this.closeButton.addEventListener("click", this.destroy, true); - Services.prefs.addObserver("devtools.cache.disabled", this._applyCacheSettings, false); Services.prefs.addObserver("devtools.serviceWorkers.testing.enabled", this._applyServiceWorkersTestingSettings, false); - Services.prefs.addObserver("devtools.screenshot.clipboard.enabled", - this._buildButtons, false); - - let framesMenu = this.doc.getElementById("command-button-frames"); - framesMenu.addEventListener("click", this.showFramesMenu, false); - - let noautohideMenu = this.doc.getElementById("command-button-noautohide"); - noautohideMenu.addEventListener("click", this._toggleAutohide, true); this.textBoxContextMenuPopup = this.doc.getElementById("toolbox-textbox-context-popup"); @@ -390,6 +431,10 @@ Toolbox.prototype = { this.shortcuts = new KeyShortcuts({ window: this.doc.defaultView }); + // Get the DOM element to mount the ToolboxController to. + this._componentMount = this.doc.getElementById("toolbox-toolbar-mount"); + + this._mountReactComponent(); this._buildDockButtons(); this._buildOptions(); this._buildTabs(); @@ -403,10 +448,7 @@ Toolbox.prototype = { ZoomKeys.register(this.win); } - this.tabbar = this.doc.querySelector(".devtools-tabbar"); - this.tabbar.addEventListener("focus", this._onTabbarFocus, true); - this.tabbar.addEventListener("click", this._onTabbarFocus, true); - this.tabbar.addEventListener("keypress", this._onTabbarArrowKeypress); + this._componentMount.addEventListener("keypress", this._onToolbarArrowKeypress); this.webconsolePanel = this.doc.querySelector("#toolbox-panel-webconsole"); this.webconsolePanel.height = Services.prefs.getIntPref(SPLITCONSOLE_HEIGHT_PREF); @@ -424,6 +466,10 @@ Toolbox.prototype = { this._defaultToolId = "webconsole"; } + // Start rendering the toolbox toolbar before selecting the tool, as the tools + // can take a few hundred milliseconds seconds to start up. + this.component.setCanRender(); + yield this.selectTool(this._defaultToolId); // Wait until the original tool is selected so that the split @@ -451,6 +497,7 @@ Toolbox.prototype = { } this.emit("ready"); + this._isOpenDeferred.resolve(); }.bind(this)).then(null, console.error.bind(console)); }, @@ -470,6 +517,10 @@ Toolbox.prototype = { return this.browserRequire("devtools/client/shared/vendor/react-redux"); }, + get ToolboxController() { + return this.browserRequire("devtools/client/framework/components/toolbox-controller"); + }, + // Return HostType id for telemetry _getTelemetryHostId: function () { switch (this.hostType) { @@ -492,6 +543,51 @@ Toolbox.prototype = { this._telemetry.log(HOST_HISTOGRAM, this._getTelemetryHostId()); }, + /** + * Create a simple object to store the state of a toolbox button. The checked state of + * a button can be updated arbitrarily outside of the scope of the toolbar and its + * controllers. In order to simplify this interaction this object emits an + * "updatechecked" event any time the isChecked value is updated, allowing any consuming + * components to listen and respond to updates. + * + * @param {Object} options: + * + * @property {String} id - The id of the button or command. + * @property {String} className - An optional additional className for the button. + * @property {String} description - The value that will display as a tooltip and in + * the options panel for enabling/disabling. + * @property {Function} onClick - The function to run when the button is activated by + * click or keyboard shortcut. + * @property {Boolean} isInStartContainer - Buttons can either be placed at the start + * of the toolbar, or at the end. + */ + _createButtonState: function (options) { + let isChecked = false; + const {id, className, description, onClick, isInStartContainer} = options; + const button = { + id, + className, + description, + onClick, + get isChecked() { + return isChecked; + }, + set isChecked(value) { + isChecked = value; + this.emit("updatechecked"); + }, + // The preference for having this button visible. + visibilityswitch: `devtools.${id}.enabled`, + // The toolbar has a container at the start and end of the toolbar for + // holding buttons. By default the buttons are placed in the end container. + isInStartContainer: !!isInStartContainer + }; + + EventEmitter.decorate(button); + + return button; + }, + _buildOptions: function () { let selectOptions = (name, event) => { // Flip back to the last used panel if we are already @@ -754,29 +850,14 @@ Toolbox.prototype = { * the host changes. */ _buildDockButtons: function () { - let dockBox = this.doc.getElementById("toolbox-dock-buttons"); - - while (dockBox.firstChild) { - dockBox.removeChild(dockBox.firstChild); - } - if (!this._target.isLocalTab) { + this.component.setDockButtonsEnabled(false); return; } // Bottom-type host can be minimized, add a button for this. if (this.hostType == Toolbox.HostType.BOTTOM) { - let minimizeBtn = this.doc.createElementNS(HTML_NS, "button"); - minimizeBtn.id = "toolbox-dock-bottom-minimize"; - minimizeBtn.className = "devtools-button"; - /* Bug 1177463 - The minimize button is currently hidden until we agree on - the UI for it, and until bug 1173849 is fixed too. */ - minimizeBtn.setAttribute("hidden", "true"); - - minimizeBtn.addEventListener("click", this._toggleMinimizeMode); - dockBox.appendChild(minimizeBtn); - // Show the button in its maximized state. - this._onBottomHostMaximized(); + this.component.setCanMinimize(true); // Maximize again when a tool gets selected. this.on("before-select", this._onToolSelectWhileMinimized); @@ -784,14 +865,12 @@ Toolbox.prototype = { this.once("host-will-change", this._onBottomHostWillChange); } - if (this.hostType == Toolbox.HostType.WINDOW) { - this.closeButton.setAttribute("hidden", "true"); - } else { - this.closeButton.removeAttribute("hidden"); - } + this.component.setDockButtonsEnabled(true); + this.component.setCanCloseToolbox(this.hostType !== Toolbox.HostType.WINDOW); let sideEnabled = Services.prefs.getBoolPref(this._prefs.SIDE_ENABLED); + let hostTypes = []; for (let type in Toolbox.HostType) { let position = Toolbox.HostType[type]; if (position == this.hostType || @@ -800,39 +879,21 @@ Toolbox.prototype = { continue; } - let button = this.doc.createElementNS(HTML_NS, "button"); - button.id = "toolbox-dock-" + position; - button.className = "toolbox-dock-button devtools-button"; - button.setAttribute("title", L10N.getStr("toolboxDockButtons." + - position + ".tooltip")); - button.addEventListener("click", this.switchHost.bind(this, position)); - - dockBox.appendChild(button); + hostTypes.push({ + position, + switchHost: this.switchHost.bind(this, position) + }); } - }, - _getMinimizeButtonShortcutTooltip: function () { - let str = L10N.getStr("toolbox.minimize.key"); - let key = KeyShortcuts.parseElectronKey(this.win, str); - return "(" + KeyShortcuts.stringify(key) + ")"; + this.component.setHostTypes(hostTypes); }, _onBottomHostMinimized: function () { - let btn = this.doc.querySelector("#toolbox-dock-bottom-minimize"); - btn.className = "minimized"; - - btn.setAttribute("title", - L10N.getStr("toolboxDockButtons.bottom.maximize") + " " + - this._getMinimizeButtonShortcutTooltip()); + this.component.setMinimizeState("minimized"); }, _onBottomHostMaximized: function () { - let btn = this.doc.querySelector("#toolbox-dock-bottom-minimize"); - btn.className = "maximized"; - - btn.setAttribute("title", - L10N.getStr("toolboxDockButtons.bottom.minimize") + " " + - this._getMinimizeButtonShortcutTooltip()); + this.component.setMinimizeState("maximized"); }, _onToolSelectWhileMinimized: function () { @@ -867,8 +928,8 @@ Toolbox.prototype = { // Calculate the height to which the host should be minimized so the // tabbar is still visible. - let toolbarHeight = this.tabbar.getBoxQuads({box: "content"})[0].bounds - .height; + let toolbarHeight = this._componentMount.getBoxQuads({box: "content"})[0].bounds + .height; this.postMessage({ name: "toggle-minimize-mode", toolbarHeight @@ -876,50 +937,63 @@ Toolbox.prototype = { }, /** - * Add tabs to the toolbox UI for registered tools + * Initiate ToolboxTabs React component and all it's properties. Do the initial render. */ _buildTabs: function () { - // Build tabs for global registered tools. - for (let definition of gDevTools.getToolDefinitionArray()) { - this._buildTabForTool(definition); - } + // Get the initial list of tab definitions. This list can be amended at a later time + // by tools registering themselves. + const definitions = gDevTools.getToolDefinitionArray(); + definitions.forEach(definition => this._buildPanelForTool(definition)); + + // Get the definitions that will only affect the main tab area. + this.panelDefinitions = definitions.filter(definition => + definition.isTargetSupported(this._target) && definition.id !== "options"); + + this.optionsDefinition = definitions.find(({id}) => id === "options"); + // The options tool is treated slightly differently, and is in a different area. + this.component.setOptionsPanel(definitions.find(({id}) => id === "options")); + }, + + _mountReactComponent: function () { + // Ensure the toolbar doesn't try to render until the tool is ready. + const element = this.React.createElement(this.ToolboxController, { + L10N, + currentToolId: this.currentToolId, + selectTool: this.selectTool, + closeToolbox: this.destroy, + focusButton: this._onToolbarFocus, + toggleMinimizeMode: this._toggleMinimizeMode, + }); + + this.component = this.ReactDOM.render(element, this._componentMount); }, /** - * Get all dev tools tab bar focusable elements. These are visible elements - * such as buttons or elements with tabindex. - */ - get tabbarFocusableElms() { - return [...this.tabbar.querySelectorAll( - "[tabindex]:not([hidden]), button:not([hidden])")]; - }, - - /** - * Reset tabindex attributes across all focusable elements inside the tabbar. + * Reset tabindex attributes across all focusable elements inside the toolbar. * Only have one element with tabindex=0 at a time to make sure that tabbing - * results in navigating away from the tabbar container. + * results in navigating away from the toolbar container. * @param {FocusEvent} event */ - _onTabbarFocus: function (event) { - this.tabbarFocusableElms.forEach(elm => - elm.setAttribute("tabindex", event.target === elm ? "0" : "-1")); + _onToolbarFocus: function (id) { + this.component.setFocusedButton(id); }, /** - * On left/right arrow press, attempt to move the focus inside the tabbar to - * the previous/next focusable element. + * On left/right arrow press, attempt to move the focus inside the toolbar to + * the previous/next focusable element. This is not in the React component + * as it is difficult to coordinate between different component elements. + * The components are responsible for setting the correct tabindex value + * for if they are the focused element. * @param {KeyboardEvent} event */ - _onTabbarArrowKeypress: function (event) { + _onToolbarArrowKeypress: function (event) { let { key, target } = event; - let focusableElms = this.tabbarFocusableElms; - let curIndex = focusableElms.indexOf(target); + let buttons = [...this._componentMount.querySelectorAll("button")]; + let curIndex = buttons.indexOf(target); if (curIndex === -1) { console.warn(target + " is not found among Developer Tools tab bar " + - "focusable elements. It needs to either be a button or have " + - "tabindex. If it is intended to be hidden, 'hidden' attribute must " + - "be used."); + "focusable elements."); return; } @@ -930,19 +1004,17 @@ Toolbox.prototype = { if (curIndex === 0) { return; } - newTarget = focusableElms[curIndex - 1]; + newTarget = buttons[curIndex - 1]; } else if (key === "ArrowRight") { // Do nothing if already at the end. - if (curIndex === focusableElms.length - 1) { + if (curIndex === buttons.length - 1) { return; } - newTarget = focusableElms[curIndex + 1]; + newTarget = buttons[curIndex + 1]; } else { return; } - focusableElms.forEach(elm => - elm.setAttribute("tabindex", newTarget === elm ? "0" : "-1")); newTarget.focus(); event.preventDefault(); @@ -952,62 +1024,70 @@ Toolbox.prototype = { /** * Add buttons to the UI as specified in the devtools.toolbox.toolbarSpec pref */ - _buildButtons: function () { - if (this.target.getTrait("highlightable")) { - this._buildPickerButton(); + _buildButtons: Task.async(function* () { + // Beyond the normal preference filtering + this.toolbarButtons = [ + this._buildPickerButton(), + this._buildFrameButton(), + yield this._buildNoAutoHideButton() + ]; + + // Build buttons from the GCLI commands only if the GCLI actor is supported and the + // target isn't chrome. + if (this.target.hasActor("gcli") && !this.target.chrome) { + const options = { + environment: CommandUtils.createEnvironment(this, "_target") + }; + + this._requisition = yield CommandUtils.createRequisition(this.target, options); + const spec = this.getToolbarSpec(); + const commandButtons = yield CommandUtils.createCommandButtons( + spec, this.target, this.doc, this._requisition, this._createButtonState); + this.toolbarButtons = [...this.toolbarButtons, ...commandButtons]; } - this.setToolboxButtonsVisibility(); - - // Old servers don't have a GCLI Actor, so just return - if (!this.target.hasActor("gcli")) { - return promise.resolve(); - } - // Disable gcli in browser toolbox until there is usages of it - if (this.target.chrome) { - return promise.resolve(); - } - - const options = { - environment: CommandUtils.createEnvironment(this, "_target") - }; - - return CommandUtils.createRequisition(this.target, options).then(requisition => { - this._requisition = requisition; - - let spec = this.getToolbarSpec(); - return CommandUtils.createButtons(spec, this.target, this.doc, requisition) - .then(buttons => { - let container = this.doc.getElementById("toolbox-buttons"); - buttons.forEach(button => { - let currentButton = this.doc.getElementById(button.id); - if (currentButton) { - container.replaceChild(button, currentButton); - } else { - container.appendChild(button); - } - }); - this.setToolboxButtonsVisibility(); - }); + // Mutate the objects here with their visibility. + this.toolbarButtons.forEach(command => { + const definition = ToolboxButtons.find(t => t.id === command.id); + command.isTargetSupported = definition.isTargetSupported + ? definition.isTargetSupported + : target => target.isLocalTab; + command.isVisible = this._commandIsVisible(command.id); }); + + this.component.setToolboxButtons(this.toolbarButtons); + }), + + /** + * Button to select a frame for the inspector to target. + */ + _buildFrameButton() { + this.frameButton = this._createButtonState({ + id: "command-button-frames", + description: L10N.getStr("toolbox.frames.tooltip"), + onClick: this.showFramesMenu + }); + + return this.frameButton; }, /** - * Adding the element picker button is done here unlike the other buttons - * since we want it to work for remote targets too + * Button that disables/enables auto-hiding XUL pop-ups. When enabled, XUL + * pop-ups will not automatically close when they lose focus. */ - _buildPickerButton: function () { - this._pickerButton = this.doc.createElementNS(HTML_NS, "button"); - this._pickerButton.id = "command-button-pick"; - this._pickerButton.className = - "command-button command-button-invertable devtools-button"; - this._pickerButton.setAttribute("title", L10N.getStr("pickButton.tooltip")); + _buildNoAutoHideButton: Task.async(function* () { + this.autohideButton = this._createButtonState({ + id: "command-button-noautohide", + description: L10N.getStr("toolbox.noautohide.tooltip"), + onClick: this._toggleNoAutohide + }); - let container = this.doc.querySelector("#toolbox-picker-container"); - container.appendChild(this._pickerButton); + this._isDisableAutohideEnabled().then(enabled => { + this.autohideButton.isChecked = enabled; + }); - this._pickerButton.addEventListener("click", this._onPickerClick, false); - }, + return this.autohideButton; + }), /** * Toggle the picker, but also decide whether or not the highlighter should @@ -1041,6 +1121,21 @@ Toolbox.prototype = { this.doc.removeEventListener("keypress", this._onPickerKeypress, true); }, + /** + * The element picker button enables the ability to select a DOM node by clicking + * it on the page. + */ + _buildPickerButton() { + this.pickerButton = this._createButtonState({ + id: "command-button-pick", + description: L10N.getStr("pickButton.tooltip"), + onClick: this._onPickerClick, + isInStartContainer: true + }); + + return this.pickerButton; + }, + /** * Apply the current cache setting from devtools.cache.disabled to this * toolbox's tab. @@ -1070,9 +1165,9 @@ Toolbox.prototype = { } }, - /** - * Get the toolbar spec for toolbox - */ + /** + * Get the toolbar spec for toolbox + */ getToolbarSpec: function () { let spec = CommandUtils.getCommandbarSpec("devtools.toolbox.toolbarSpec"); // Special case for screenshot command button to check for clipboard preference @@ -1088,173 +1183,73 @@ Toolbox.prototype = { return spec; }, - /** - * Setter for the checked state of the picker button in the toolbar - * @param {Boolean} isChecked - */ - set pickerButtonChecked(isChecked) { - if (isChecked) { - this._pickerButton.setAttribute("checked", "true"); - } else { - this._pickerButton.removeAttribute("checked"); - } - }, + /** + * Return all toolbox buttons (command buttons, plus any others that were + * added manually). /** - * Return all toolbox buttons (command buttons, plus any others that were - * added manually). + * Update the visibility of the buttons. */ - get toolboxButtons() { - return ToolboxButtons.map(options => { - let button = this.doc.getElementById(options.id); - // Some buttons may not exist inside of Browser Toolbox - if (!button) { - return false; - } - - return { - id: options.id, - button: button, - label: button.getAttribute("title"), - visibilityswitch: "devtools." + options.id + ".enabled", - isTargetSupported: options.isTargetSupported - ? options.isTargetSupported - : target => target.isLocalTab, - }; - }).filter(button=>button); - }, - - /** - * Ensure the visibility of each toolbox button matches the - * preference value. Simply hide buttons that are preffed off. - */ - setToolboxButtonsVisibility: function () { - this.toolboxButtons.forEach(buttonSpec => { - let { visibilityswitch, button, isTargetSupported } = buttonSpec; - let on = true; - try { - on = Services.prefs.getBoolPref(visibilityswitch); - } catch (ex) { - // Do nothing. - } - - on = on && isTargetSupported(this.target); - - if (button) { - if (on) { - button.removeAttribute("hidden"); - } else { - button.setAttribute("hidden", "true"); - } - } + updateToolboxButtonsVisibility() { + this.toolbarButtons.forEach(command => { + command.isVisible = this._commandIsVisible(command.id); }); - - this._updateNoautohideButton(); + this.component.setToolboxButtons(this.toolbarButtons); }, /** - * Build a tab for one tool definition and add to the toolbox + * Ensure the visibility of each toolbox button matches the preference value. + */ + _commandIsVisible: function (id) { + const { + isTargetSupported, + visibilityswitch + } = this.toolbarButtons.find(btn => btn.id === id); + + let visible = true; + try { + visible = Services.prefs.getBoolPref(visibilityswitch); + } catch (ex) { + // Do nothing. + } + + if (isTargetSupported) { + return visible && isTargetSupported(this.target); + } + + return visible; + }, + + /** + * Build a panel for a tool definition. * * @param {string} toolDefinition * Tool definition of the tool to build a tab for. */ - _buildTabForTool: function (toolDefinition) { + _buildPanelForTool: function (toolDefinition) { if (!toolDefinition.isTargetSupported(this._target)) { return; } - let tabs = this.doc.getElementById("toolbox-tabs"); let deck = this.doc.getElementById("toolbox-deck"); - let id = toolDefinition.id; if (toolDefinition.ordinal == undefined || toolDefinition.ordinal < 0) { toolDefinition.ordinal = MAX_ORDINAL; } - let radio = this.doc.createElement("radio"); - // The radio element is not being used in the conventional way, thus - // the devtools-tab class replaces the radio XBL binding with its base - // binding (the control-item binding). - radio.className = "devtools-tab"; - radio.id = "toolbox-tab-" + id; - radio.setAttribute("toolid", id); - radio.setAttribute("tabindex", "0"); - radio.setAttribute("ordinal", toolDefinition.ordinal); - radio.setAttribute("tooltiptext", toolDefinition.tooltip); - if (toolDefinition.invertIconForLightTheme) { - radio.setAttribute("icon-invertable", "light-theme"); - } else if (toolDefinition.invertIconForDarkTheme) { - radio.setAttribute("icon-invertable", "dark-theme"); - } - - radio.addEventListener("command", this.selectTool.bind(this, id)); - - // spacer lets us center the image and label, while allowing cropping - let spacer = this.doc.createElement("spacer"); - spacer.setAttribute("flex", "1"); - radio.appendChild(spacer); - - if (toolDefinition.icon) { - let image = this.doc.createElement("image"); - image.className = "default-icon"; - image.setAttribute("src", - toolDefinition.icon || toolDefinition.highlightedicon); - radio.appendChild(image); - // Adding the highlighted icon image - image = this.doc.createElement("image"); - image.className = "highlighted-icon"; - image.setAttribute("src", - toolDefinition.highlightedicon || toolDefinition.icon); - radio.appendChild(image); - } - - if (toolDefinition.label && !toolDefinition.iconOnly) { - let label = this.doc.createElement("label"); - label.setAttribute("value", toolDefinition.label); - label.setAttribute("crop", "end"); - label.setAttribute("flex", "1"); - radio.appendChild(label); - } - if (!toolDefinition.bgTheme) { toolDefinition.bgTheme = "theme-toolbar"; } - let vbox = this.doc.createElement("vbox"); - vbox.className = "toolbox-panel " + toolDefinition.bgTheme; + let panel = this.doc.createElement("vbox"); + panel.className = "toolbox-panel " + toolDefinition.bgTheme; // There is already a container for the webconsole frame. if (!this.doc.getElementById("toolbox-panel-" + id)) { - vbox.id = "toolbox-panel-" + id; + panel.id = "toolbox-panel-" + id; } - if (id === "options") { - // Options panel is special. It doesn't belong in the same container as - // the other tabs. - radio.setAttribute("role", "button"); - let optionTabContainer = this.doc.getElementById("toolbox-option-container"); - optionTabContainer.appendChild(radio); - deck.appendChild(vbox); - } else { - radio.setAttribute("role", "tab"); - - // If there is no tab yet, or the ordinal to be added is the largest one. - if (tabs.childNodes.length == 0 || - tabs.lastChild.getAttribute("ordinal") <= toolDefinition.ordinal) { - tabs.appendChild(radio); - deck.appendChild(vbox); - } else { - // else, iterate over all the tabs to get the correct location. - Array.some(tabs.childNodes, (node, i) => { - if (+node.getAttribute("ordinal") > toolDefinition.ordinal) { - tabs.insertBefore(radio, node); - deck.insertBefore(vbox, deck.childNodes[i]); - return true; - } - return false; - }); - } - } + deck.appendChild(panel); this._addKeysToWindow(); }, @@ -1282,7 +1277,21 @@ Toolbox.prototype = { * the array of additional tool definitions registered on this toolbox. */ getAdditionalTools() { - return Array.from(this.additionalToolDefinitions.values()); + if (this._additionalToolDefinitions) { + return Array.from(this.additionalToolDefinitions.values()); + } + return []; + }, + + /** + * Get the additional tools that have been registered and are visible. + * + * @return {Array} + * the array of additional tool definitions registered on this toolbox. + */ + getVisibleAdditionalTools() { + return this.visibleAdditionalTools + .map(toolId => this.additionalToolDefinitions.get(toolId)); }, /** @@ -1313,9 +1322,11 @@ Toolbox.prototype = { throw new Error("Tool definition already registered: " + definition.id); } - this.additionalToolDefinitions.set(definition.id, definition); - this._buildTabForTool(definition); + this.visibleAdditionalTools = [...this.visibleAdditionalTools, definition.id]; + + this._combineAndSortPanelDefinitions(); + this._buildPanelForTool(definition); }, /** @@ -1330,8 +1341,10 @@ Toolbox.prototype = { toolId); } - this.unloadTool(toolId); this.additionalToolDefinitions.delete(toolId); + this.visibleAdditionalTools = this.visibleAdditionalTools + .filter(id => id !== toolId); + this.unloadTool(toolId); }, /** @@ -1385,6 +1398,7 @@ Toolbox.prototype = { if (!iframe.parentNode) { let vbox = this.doc.getElementById("toolbox-panel-" + id); vbox.appendChild(iframe); + vbox.visibility = "visible"; } let onLoad = () => { @@ -1522,18 +1536,6 @@ Toolbox.prototype = { selectTool: function (id) { this.emit("before-select", id); - let tabs = this.doc.querySelectorAll(".devtools-tab"); - this.selectSingleNode(tabs, "toolbox-tab-" + id); - - // If options is selected, the separator between it and the - // command buttons should be hidden. - let sep = this.doc.getElementById("toolbox-controls-separator"); - if (id === "options") { - sep.setAttribute("invisible", "true"); - } else { - sep.removeAttribute("invisible"); - } - if (this.currentToolId == id) { let panel = this._toolPanels.get(id); if (panel) { @@ -1554,9 +1556,10 @@ Toolbox.prototype = { throw new Error("Can't select tool, wait for toolbox 'ready' event"); } - let tab = this.doc.getElementById("toolbox-tab-" + id); - - if (tab) { + // Check if the tool exists. + if (this.panelDefinitions.find((definition) => definition.id === id) || + id === "options" || + this.additionalToolDefinitions.get(id)) { if (this.currentToolId) { this._telemetry.toolClosed(this.currentToolId); } @@ -1565,12 +1568,6 @@ Toolbox.prototype = { throw new Error("No tool found"); } - let tabstrip = this.doc.getElementById("toolbox-tabs"); - - // select the right tab, making 0th index the default tab if right tab not - // found. - tabstrip.selectedItem = tab || tabstrip.childNodes[0]; - // and select the right iframe let toolboxPanels = this.doc.querySelectorAll(".toolbox-panel"); this.selectSingleNode(toolboxPanels, "toolbox-panel-" + id); @@ -1644,9 +1641,9 @@ Toolbox.prototype = { this._splitConsole = true; Services.prefs.setBoolPref(SPLITCONSOLE_ENABLED_PREF, true); this._refreshConsoleDisplay(); - this.emit("split-console"); return this.loadTool("webconsole").then(() => { + this.emit("split-console"); this.focusConsoleInput(); }); }, @@ -1697,24 +1694,28 @@ Toolbox.prototype = { * Loads the tool next to the currently selected tool. */ selectNextTool: function () { - let tools = this.doc.querySelectorAll(".devtools-tab"); - let selected = this.doc.querySelector(".devtools-tab[selected]"); - let nextIndex = [...tools].indexOf(selected) + 1; - let next = tools[nextIndex] || tools[0]; - let tool = next.getAttribute("toolid"); - return this.selectTool(tool); + const index = this.panelDefinitions.findIndex(({id}) => id === this.currentToolId); + let definition = this.panelDefinitions[index + 1]; + if (!definition) { + definition = index === -1 + ? this.panelDefinitions[0] + : this.optionsDefinition; + } + return this.selectTool(definition.id); }, /** * Loads the tool just left to the currently selected tool. */ selectPreviousTool: function () { - let tools = this.doc.querySelectorAll(".devtools-tab"); - let selected = this.doc.querySelector(".devtools-tab[selected]"); - let prevIndex = [...tools].indexOf(selected) - 1; - let prev = tools[prevIndex] || tools[tools.length - 1]; - let tool = prev.getAttribute("toolid"); - return this.selectTool(tool); + const index = this.panelDefinitions.findIndex(({id}) => id === this.currentToolId); + let definition = this.panelDefinitions[index - 1]; + if (!definition) { + definition = index === -1 + ? this.panelDefinitions[this.panelDefinitions.length - 1] + : this.optionsDefinition; + } + return this.selectTool(definition.id); }, /** @@ -1723,10 +1724,12 @@ Toolbox.prototype = { * @param {string} id * The id of the tool to highlight */ - highlightTool: function (id) { - let tab = this.doc.getElementById("toolbox-tab-" + id); - tab && tab.setAttribute("highlighted", "true"); - }, + highlightTool: Task.async(function* (id) { + if (!this.component) { + yield this.isOpen; + } + this.component.highlightTool(id); + }), /** * De-highlights the tool's tab. @@ -1734,10 +1737,12 @@ Toolbox.prototype = { * @param {string} id * The id of the tool to unhighlight */ - unhighlightTool: function (id) { - let tab = this.doc.getElementById("toolbox-tab-" + id); - tab && tab.removeAttribute("highlighted"); - }, + unhighlightTool: Task.async(function* (id) { + if (!this.component) { + yield this.isOpen; + } + this.component.unhighlightTool(id); + }), /** * Raise the toolbox host. @@ -1767,36 +1772,35 @@ Toolbox.prototype = { // Returns an instance of the preference actor get _preferenceFront() { - return this.target.root.then(rootForm => { - return getPreferenceFront(this.target.client, rootForm); + return this.isOpen.then(() => { + return this.target.root.then(rootForm => { + return getPreferenceFront(this.target.client, rootForm); + }); }); }, - _toggleAutohide: Task.async(function* () { - let prefName = "ui.popup.disable_autohide"; + _toggleNoAutohide: Task.async(function* () { let front = yield this._preferenceFront; - let current = yield front.getBoolPref(prefName); - yield front.setBoolPref(prefName, !current); + let toggledValue = !(yield this._isDisableAutohideEnabled(front)); - this._updateNoautohideButton(); + front.setBoolPref(DISABLE_AUTOHIDE_PREF, toggledValue); + + this.autohideButton.isChecked = toggledValue; }), - _updateNoautohideButton: Task.async(function* () { - let menu = this.doc.getElementById("command-button-noautohide"); - if (menu.getAttribute("hidden") === "true") { - return; + _isDisableAutohideEnabled: Task.async(function* (prefFront) { + // Ensure that the tools are open, and the button is visible. + yield this.isOpen; + if (!this.autohideButton.isVisible) { + return false; } - if (!this.target.root) { - return; - } - let prefName = "ui.popup.disable_autohide"; - let front = yield this._preferenceFront; - let current = yield front.getBoolPref(prefName); - if (current) { - menu.setAttribute("checked", "true"); - } else { - menu.removeAttribute("checked"); + + // If no prefFront was provided, then get one. + if (!prefFront) { + prefFront = yield this._preferenceFront; } + + return yield prefFront.getBoolPref(DISABLE_AUTOHIDE_PREF); }), _listFrames: function (event) { @@ -1838,11 +1842,11 @@ Toolbox.prototype = { }); menu.once("open").then(() => { - target.setAttribute("open", "true"); + this.frameButton.isChecked = true; }); menu.once("close").then(() => { - target.removeAttribute("open"); + this.frameButton.isChecked = false; }); // Show a drop down menu with frames. @@ -1930,13 +1934,12 @@ Toolbox.prototype = { // Note that only child frame has parentID. let frame = this.frameMap.get(this.selectedFrameId); let topFrameSelected = frame ? !frame.parentID : false; - let button = this.doc.getElementById("command-button-frames"); - button.removeAttribute("checked"); + this._framesButtonChecked = false; // If non-top level frame is selected the toolbar button is // marked as 'checked' indicating that a child frame is active. if (!topFrameSelected && this.selectedFrameId) { - button.setAttribute("checked", "true"); + this._framesButtonChecked = false; } }, @@ -2040,25 +2043,32 @@ Toolbox.prototype = { this._toolPanels.delete(toolId); } - let radio = this.doc.getElementById("toolbox-tab-" + toolId); let panel = this.doc.getElementById("toolbox-panel-" + toolId); - if (radio) { - if (this.currentToolId == toolId) { - let nextToolName = null; - if (radio.nextSibling) { - nextToolName = radio.nextSibling.getAttribute("toolid"); - } - if (radio.previousSibling) { - nextToolName = radio.previousSibling.getAttribute("toolid"); - } - if (nextToolName) { - this.selectTool(nextToolName); - } + // Select another tool. + if (this.currentToolId == toolId) { + let index = this.panelDefinitions.findIndex(({id}) => id === toolId); + let nextTool = this.panelDefinitions[index + 1]; + let previousTool = this.panelDefinitions[index - 1]; + let toolNameToSelect; + + if (nextTool) { + toolNameToSelect = nextTool.id; + } + if (previousTool) { + toolNameToSelect = previousTool.id; + } + if (toolNameToSelect) { + this.selectTool(toolNameToSelect); } - radio.parentNode.removeChild(radio); } + // Remove this tool from the current panel definitions. + this.panelDefinitions = this.panelDefinitions.filter(({id}) => id !== toolId); + this.visibleAdditionalTools = this.visibleAdditionalTools + .filter(id => id !== toolId); + this._combineAndSortPanelDefinitions(); + if (panel) { panel.parentNode.removeChild(panel); } @@ -2080,17 +2090,28 @@ Toolbox.prototype = { * Id of the tool that was registered */ _toolRegistered: function (event, toolId) { - let tool = this.getToolDefinition(toolId); - if (!tool) { - // Ignore if the tool is not found, when a per-toolbox tool - // has been toggle in the toolbox options view, every toolbox will receive - // the toolbox-register and toolbox-unregister events. - return; + // Tools can either be in the global devtools, or added to this specific toolbox + // as an additional tool. + let definition = gDevTools.getToolDefinition(toolId); + let isAdditionalTool = false; + if (!definition) { + definition = this.additionalToolDefinitions.get(toolId); + isAdditionalTool = true; + } + + if (definition.isTargetSupported(this._target)) { + if (isAdditionalTool) { + this.visibleAdditionalTools = [...this.visibleAdditionalTools, toolId]; + this._combineAndSortPanelDefinitions(); + } else { + this.panelDefinitions = this.panelDefinitions.concat(definition); + } + this._buildPanelForTool(definition); + + // Emit the event so tools can listen to it from the toolbox level + // instead of gDevTools. + this.emit("tool-registered", toolId); } - this._buildTabForTool(tool); - // Emit the event so tools can listen to it from the toolbox level - // instead of gDevTools. - this.emit("tool-registered", toolId); }, /** @@ -2146,6 +2167,10 @@ Toolbox.prototype = { return; } + // Ensure that the inspector isn't still being initiated, otherwise race conditions + // in the initialization process can throw errors. + yield this._initInspector; + // Releasing the walker (if it has been created) // This can fail, but in any case, we want to continue destroying the // inspector/highlighter/selection @@ -2236,20 +2261,15 @@ Toolbox.prototype = { this._saveSplitConsoleHeight); this.webconsolePanel = null; } - if (this.closeButton) { - this.closeButton.removeEventListener("click", this.destroy, true); - this.closeButton = null; - } if (this.textBoxContextMenuPopup) { this.textBoxContextMenuPopup.removeEventListener("popupshowing", this._updateTextBoxMenuItems, true); this.textBoxContextMenuPopup = null; } - if (this.tabbar) { - this.tabbar.removeEventListener("focus", this._onTabbarFocus, true); - this.tabbar.removeEventListener("click", this._onTabbarFocus, true); - this.tabbar.removeEventListener("keypress", this._onTabbarArrowKeypress); - this.tabbar = null; + if (this._componentMount) { + this._componentMount.removeEventListener("keypress", this._onToolbarArrowKeypress); + this.ReactDOM.unmountComponentAtNode(this._componentMount); + this._componentMount = null; } let outstanding = []; @@ -2278,17 +2298,14 @@ Toolbox.prototype = { } // Destroying the walker and inspector fronts - outstanding.push(this.destroyInspector().then(() => { - // Removing buttons - if (this._pickerButton) { - this._pickerButton.removeEventListener("click", this._togglePicker, false); - this._pickerButton = null; - } - })); + outstanding.push(this.destroyInspector()); // Destroy the profiler connection outstanding.push(this.destroyPerformance()); + // Destroy the preference front + outstanding.push(this.destroyPreference()); + // Detach the thread detachThread(this._threadClient); this._threadClient = null; @@ -2451,6 +2468,14 @@ Toolbox.prototype = { this._performance = null; }), + /** + * Destroy the preferences actor when the toolbox is unloaded. + */ + destroyPreference: Task.async(function* () { + let front = yield this._preferenceFront; + front.destroy(); + }), + /** * Called when any event comes from the PerformanceFront. If the performance tool is * already loaded when the first event comes in, immediately unbind this handler, as diff --git a/devtools/client/framework/toolbox.xul b/devtools/client/framework/toolbox.xul index 94aaecebdd8a..0ac4dd8afb32 100644 --- a/devtools/client/framework/toolbox.xul +++ b/devtools/client/framework/toolbox.xul @@ -47,28 +47,7 @@
- - - - - - - - - - - - +
- - - - - diff --git a/devtools/client/locales/en-US/toolbox.properties b/devtools/client/locales/en-US/toolbox.properties index 225bd320bc7d..0217b578959c 100644 --- a/devtools/client/locales/en-US/toolbox.properties +++ b/devtools/client/locales/en-US/toolbox.properties @@ -158,3 +158,18 @@ toolbox.minimize.key=CmdOrCtrl+Shift+U # LOCALIZATION NOTE (toolbox.toggleHost.key) # Key shortcut used to move the toolbox in bottom or side of the browser window toolbox.toggleHost.key=CmdOrCtrl+Shift+D + +# LOCALIZATION NOTE (toolbox.frames.tooltip): This is the label for +# the iframes menu list that appears only when the document has some. +# It allows you to switch the context of the whole toolbox. +toolbox.frames.tooltip=Select an iframe as the currently targeted document + +# LOCALIZATION NOTE (toolbox.noautohide.tooltip): This is the label for +# the button to force the popups/panels to stay visible on blur. +# This is only visible in the browser toolbox as it is meant for +# addon developers and Firefox contributors. +toolbox.noautohide.tooltip=Disable popup auto hide + +# LOCALIZATION NOTE (toolbox.closebutton.tooltip): This is the tooltip for +# the close button the developer tools toolbox. +toolbox.closebutton.tooltip=Close Developer Tools diff --git a/devtools/client/netmonitor/components/filter-buttons.js b/devtools/client/netmonitor/components/filter-buttons.js index 97114dc13913..5fa69e1ebf90 100644 --- a/devtools/client/netmonitor/components/filter-buttons.js +++ b/devtools/client/netmonitor/components/filter-buttons.js @@ -21,6 +21,7 @@ function FilterButtons({ return button({ id: `requests-menu-filter-${type}-button`, + key: type, className: classList.join(" "), "data-key": type, onClick: toggleRequestFilterType, @@ -32,8 +33,8 @@ function FilterButtons({ } FilterButtons.propTypes = { - state: PropTypes.object.isRequired, - toggleRequestFilterType: PropTypes.func.iRequired, + requestFilterTypes: PropTypes.object.isRequired, + toggleRequestFilterType: PropTypes.func.isRequired, }; module.exports = connect( diff --git a/devtools/client/netmonitor/shared/components/security-panel.js b/devtools/client/netmonitor/shared/components/security-panel.js index 75d7373ed209..83a6a39081bd 100644 --- a/devtools/client/netmonitor/shared/components/security-panel.js +++ b/devtools/client/netmonitor/shared/components/security-panel.js @@ -104,8 +104,8 @@ function SecurityPanel({ SecurityPanel.displayName = "SecurityPanel"; SecurityPanel.propTypes = { - securityInfo: PropTypes.object.isRequired, - url: PropTypes.string.isRequired, + securityInfo: PropTypes.object, + url: PropTypes.string, }; function renderValue(weaknessReasons = [], props) { @@ -124,7 +124,7 @@ function renderValue(weaknessReasons = [], props) { // Display one line selectable text for security details input({ className: "textbox-input", - readonly: "true", + readOnly: "true", value, }) , diff --git a/devtools/client/performance/test/browser_perf-highlighted.js b/devtools/client/performance/test/browser_perf-highlighted.js index 72ad905476dd..111747ce0296 100644 --- a/devtools/client/performance/test/browser_perf-highlighted.js +++ b/devtools/client/performance/test/browser_perf-highlighted.js @@ -21,27 +21,27 @@ add_task(function* () { let tab = toolbox.doc.getElementById("toolbox-tab-performance"); yield console.profile("rust"); - yield waitUntil(() => tab.hasAttribute("highlighted")); + yield waitUntil(() => tab.classList.contains("highlighted")); - ok(tab.hasAttribute("highlighted"), "Performance tab is highlighted during recording " + - "from console.profile when unloaded."); + ok(tab.classList.contains("highlighted"), "Performance tab is highlighted during " + + "recording from console.profile when unloaded."); yield console.profileEnd("rust"); - yield waitUntil(() => !tab.hasAttribute("highlighted")); + yield waitUntil(() => !tab.classList.contains("highlighted")); - ok(!tab.hasAttribute("highlighted"), + ok(!tab.classList.contains("highlighted"), "Performance tab is no longer highlighted when console.profile recording finishes."); let { panel } = yield initPerformanceInTab({ tab: target.tab }); yield startRecording(panel); - ok(tab.hasAttribute("highlighted"), + ok(tab.classList.contains("highlighted"), "Performance tab is highlighted during recording while in performance tool."); yield stopRecording(panel); - ok(!tab.hasAttribute("highlighted"), + ok(!tab.classList.contains("highlighted"), "Performance tab is no longer highlighted when recording finishes."); yield teardownToolboxAndRemoveTab(panel); diff --git a/devtools/client/preferences/devtools.js b/devtools/client/preferences/devtools.js index b17362ff8693..325eb17b4472 100644 --- a/devtools/client/preferences/devtools.js +++ b/devtools/client/preferences/devtools.js @@ -37,6 +37,7 @@ pref("devtools.toolbox.splitconsoleEnabled", false); pref("devtools.toolbox.splitconsoleHeight", 100); // Toolbox Button preferences +pref("devtools.command-button-pick.enabled", true); pref("devtools.command-button-frames.enabled", true); pref("devtools.command-button-splitconsole.enabled", true); pref("devtools.command-button-paintflashing.enabled", false); diff --git a/devtools/client/shared/components/splitter/split-box.js b/devtools/client/shared/components/splitter/split-box.js index 2229b334e1eb..676b941d536c 100644 --- a/devtools/client/shared/components/splitter/split-box.js +++ b/devtools/client/shared/components/splitter/split-box.js @@ -97,6 +97,7 @@ const SplitBox = React.createClass({ const win = doc.defaultView; let size; + let ratio = win.devicePixelRatio || 1; let { endPanelControl } = this.props; if (this.state.vert) { @@ -107,7 +108,7 @@ const SplitBox = React.createClass({ endPanelControl = !endPanelControl; } - let innerOffset = x - win.mozInnerScreenX; + let innerOffset = (x / ratio) - win.mozInnerScreenX; size = endPanelControl ? (node.offsetLeft + node.offsetWidth) - innerOffset : innerOffset - node.offsetLeft; @@ -116,7 +117,7 @@ const SplitBox = React.createClass({ width: size }); } else { - let innerOffset = y - win.mozInnerScreenY; + let innerOffset = (y / ratio) - win.mozInnerScreenY; size = endPanelControl ? (node.offsetTop + node.offsetHeight) - innerOffset : innerOffset - node.offsetTop; diff --git a/devtools/client/shared/developer-toolbar.js b/devtools/client/shared/developer-toolbar.js index e80193dbe848..009006f64d5c 100644 --- a/devtools/client/shared/developer-toolbar.js +++ b/devtools/client/shared/developer-toolbar.js @@ -10,7 +10,6 @@ const defer = require("devtools/shared/defer"); const Services = require("Services"); const { TargetFactory } = require("devtools/client/framework/target"); const Telemetry = require("devtools/client/shared/telemetry"); -const {ViewHelpers} = require("devtools/client/shared/widgets/view-helpers"); const {LocalizationHelper} = require("devtools/shared/l10n"); const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties"); const {Task} = require("devtools/shared/task"); @@ -67,71 +66,56 @@ var CommandUtils = { }, /** - * A toolbarSpec is an array of strings each of which is a GCLI command. + * Create a list of props for React components that manage the state of the buttons. + * + * @param {Array} toolbarSpec - An array of strings each of which is a GCLI command. + * @param {Object} target + * @param {Object} document - Used to listen to unload event of the window. + * @param {Requisition} requisition + * @param {Function} createButtonState - A function that provides a common interface + * to create a button for the toolbox. + * + * @return {Array} List of ToolboxButton objects.. * * Warning: this method uses the unload event of the window that owns the * buttons that are of type checkbox. this means that we don't properly * unregister event handlers until the window is destroyed. */ - createButtons: function (toolbarSpec, target, document, requisition) { + createCommandButtons: function (toolbarSpec, target, document, requisition, + createButtonState) { return util.promiseEach(toolbarSpec, typed => { // Ask GCLI to parse the typed string (doesn't execute it) return requisition.update(typed).then(() => { - let button = document.createElementNS(NS_XHTML, "button"); - // Ignore invalid commands let command = requisition.commandAssignment.value; if (command == null) { throw new Error("No command '" + typed + "'"); } - - if (command.buttonId != null) { - button.id = command.buttonId; - if (command.buttonClass != null) { - button.className = command.buttonClass; - } - } else { - button.setAttribute("text-as-image", "true"); - button.setAttribute("label", command.name); + if (!command.buttonId) { + throw new Error("Attempting to add a button to the toolbar, and the command " + + "did not have an id."); } + // Create the ToolboxButton. + let button = createButtonState({ + id: command.buttonId, + className: command.buttonClass, + description: command.tooltipText || command.description, + onClick: requisition.updateExec.bind(requisition, typed) + }); - button.classList.add("devtools-button"); - - if (command.tooltipText != null) { - button.setAttribute("title", command.tooltipText); - } else if (command.description != null) { - button.setAttribute("title", command.description); - } - - button.addEventListener("click", - requisition.updateExec.bind(requisition, typed)); - - button.addEventListener("keypress", (event) => { - if (ViewHelpers.isSpaceOrReturn(event)) { - event.preventDefault(); - requisition.updateExec(typed); - } - }, false); - - // Allow the command button to be toggleable - let onChange = null; + // Allow the command button to be toggleable. if (command.state) { - button.setAttribute("autocheck", false); - /** * The onChange event should be called with an event object that * contains a target property which specifies which target the event * applies to. For legacy reasons the event object can also contain * a tab property. */ - onChange = (eventName, ev) => { + const onChange = (eventName, ev) => { if (ev.target == target || ev.tab == target.tab) { let updateChecked = (checked) => { - if (checked) { - button.setAttribute("checked", true); - } else if (button.hasAttribute("checked")) { - button.removeAttribute("checked"); - } + // This will emit a ToolboxButton update event. + button.isChecked = checked; }; // isChecked would normally be synchronous. An annoying quirk @@ -150,14 +134,13 @@ var CommandUtils = { command.state.onChange(target, onChange); onChange("", { target: target }); + + document.defaultView.addEventListener("unload", function (event) { + if (command.state.offChange) { + command.state.offChange(target, onChange); + } + }, { once: true }); } - document.defaultView.addEventListener("unload", function (event) { - if (onChange && command.state.offChange) { - command.state.offChange(target, onChange); - } - button.remove(); - button = null; - }, { once: true }); requisition.clear(); diff --git a/devtools/client/shared/test/browser_telemetry_button_paintflashing.js b/devtools/client/shared/test/browser_telemetry_button_paintflashing.js index dcce8f738c5f..1e3e78de09a8 100644 --- a/devtools/client/shared/test/browser_telemetry_button_paintflashing.js +++ b/devtools/client/shared/test/browser_telemetry_button_paintflashing.js @@ -13,6 +13,7 @@ const TOOL_DELAY = 200; add_task(function* () { yield addTab(TEST_URI); let Telemetry = loadTelemetryAndRecordLogs(); + yield pushPref("devtools.command-button-paintflashing.enabled", true); let target = TargetFactory.forTab(gBrowser.selectedTab); let toolbox = yield gDevTools.showToolbox(target, "inspector"); diff --git a/devtools/client/shared/test/browser_telemetry_button_scratchpad.js b/devtools/client/shared/test/browser_telemetry_button_scratchpad.js index e191bb25777a..11ee1f726fdf 100644 --- a/devtools/client/shared/test/browser_telemetry_button_scratchpad.js +++ b/devtools/client/shared/test/browser_telemetry_button_scratchpad.js @@ -14,6 +14,8 @@ add_task(function* () { yield addTab(TEST_URI); let Telemetry = loadTelemetryAndRecordLogs(); + yield pushPref("devtools.command-button-scratchpad.enabled", true); + let target = TargetFactory.forTab(gBrowser.selectedTab); let toolbox = yield gDevTools.showToolbox(target, "inspector"); info("inspector opened"); diff --git a/devtools/client/shared/vendor/REACT_UPGRADING b/devtools/client/shared/vendor/REACT_UPGRADING index 0532ce93522c..dfd722e67240 100644 --- a/devtools/client/shared/vendor/REACT_UPGRADING +++ b/devtools/client/shared/vendor/REACT_UPGRADING @@ -53,9 +53,40 @@ version over: You also need to copy the ReactDOM and ReactDOMServer package. It requires React, so right now we are just manually changing the path from `react` to -`devtools/client/shared/vendor/react`. +`devtools/client/shared/vendor/react`. Also, to have React's event system working +correctly in certain XUL situations, ReactDOM must be monkey patched with a fix. This +fix is currently applied in devtools/client/shared/vendor/react-dom.js. When upgrading, +copy and paste the existing block of code into the new file in the same location. It is +delimited by a header and footer, and then the monkeyPatchReactDOM() needs to be applied +to the returned value. + +e.g. Turn this: + +``` +})(function(React) { + return React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; +}); +``` + +Into this: + +``` +})(function(React) { + //-------------------------------------------------------------------------------------- + // START MONKEY PATCH + + ... + + // END MONKEY PATCH + //-------------------------------------------------------------------------------------- + + return monkeyPatchReactDOM(React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED); +}); +``` * cp build/react-dom.js /devtools/client/shared/vendor/react-dom.js * (change `require('react')` at the top of the file to the right path) +* Copy/paste existing monkey patch +* Apply monkeyPatchReactDOM() to the returned object ReactDOM object. * cp build/react-dom.js /devtools/client/shared/vendor/react-dom-server.js * (change `require('react')` at the top of the file to the right path) diff --git a/devtools/client/shared/vendor/react-dom.js b/devtools/client/shared/vendor/react-dom.js index 7621c33dfcea..9e734f965751 100644 --- a/devtools/client/shared/vendor/react-dom.js +++ b/devtools/client/shared/vendor/react-dom.js @@ -38,5 +38,155 @@ } })(function(React) { - return React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; + //-------------------------------------------------------------------------------------- + // START MONKEY PATCH + /** + * This section contains a monkey patch for React DOM, so that it functions correctly in + * certain XUL situations. React centralizes events to specific DOM nodes by only + * binding a single listener to the document of the page. It then captures these events, + * and then uses a SyntheticEvent system to dispatch these throughout the page. + * + * In privileged XUL with a XUL iframe, and React in both documents, this system breaks. + * By design, these XUL frames can still talk to each other, while in a normal HTML + * situation, they would not be able to. The events from the XUL iframe propagate to the + * parent document as well. This leads to the React event system incorrectly dispatching + * TWO SyntheticEvents for for every ONE action. + * + * The fix here is trick React into thinking that the owning document for every node in + * a XUL iframe to be the toolbox.xul. This is done by creating a Proxy object that + * captures any usage of HTMLElement.ownerDocument, and then passing in the toolbox.xul + * document rather than (for example) the netmonitor.xul document. React will then hook + * up the event system correctly on the top level controlling document. + * + * @return {object} The proxied and monkey patched ReactDOM + */ + function monkeyPatchReactDOM(ReactDOM) { + // This is the actual monkey patched function. + const reactDomRender = monkeyPatchRender(ReactDOM); + + // Proxied method calls might need to be bound, but do this lazily with caching. + const lazyFunctionBinding = functionLazyBinder(); + + // Create a proxy, but the render property is not writable on the ReactDOM object, so + // a direct proxy will fail with an error. Instead, create a proxy on a a blank object. + // Pass on getting and setting behaviors. + return new Proxy({}, { + get: (target, name) => { + return name === "render" + ? reactDomRender + : lazyFunctionBinding(ReactDOM, name); + }, + set: (target, name, value) => { + ReactDOM[name] = value; + } + }); + }; + + /** + * Creates a function that replaces the ReactDOM.render method. It does this by + * creating a proxy for the dom node being mounted. This proxy rewrites the + * "ownerDocument" property to point to the toolbox.xul document. This function + * is only used for XUL iframes inside of a XUL document. + * + * @param {object} ReactDOM + * @return {function} The patched ReactDOM.render function. + */ + function monkeyPatchRender(ReactDOM) { + const elementProxyCache = new WeakMap(); + + return (...args) => { + const container = args[1]; + const toolboxDoc = getToolboxDocIfXulOnly(container); + + if (toolboxDoc) { + // Re-use any existing cached HTMLElement proxies. + let proxy = elementProxyCache.get(container); + + if (!proxy) { + // Proxied method calls need to be bound, but do this lazily. + const lazyFunctionBinding = functionLazyBinder(); + + // Create a proxy to the container HTMLElement. If React tries to access the + // ownerDocument, pass in the toolbox's document, as the event dispatching system + // is rooted from the toolbox document. + proxy = new Proxy(container, { + get: function (target, name) { + if (name === "ownerDocument") { + return toolboxDoc; + } + return lazyFunctionBinding(target, name); + } + }); + + elementProxyCache.set(container, proxy); + } + + // Update the args passed to ReactDOM.render. + args[1] = proxy; + } + + return ReactDOM.render.apply(this, args); + }; + } + + /** + * Try to access the containing toolbox XUL document, but only if all of the iframes + * in the heirarchy are XUL documents. Events dispatch differently in the case of all + * privileged XUL documents. Events that fire in an iframe propagate up to the parent + * frame. This does not happen when HTML is in the mix. Only return the toolbox if + * it matches the proper case of a XUL iframe inside of a XUL document. + * + * @param {HTMLElement} node - The DOM node inside of an iframe. + * @return {XULDocument|null} The toolbox.xul document, or null. + */ + function getToolboxDocIfXulOnly(node) { + // This execution context doesn't know about XULDocuments, so don't get the toolbox. + if (typeof XULDocument !== "function") { + return null; + } + + let doc = node.ownerDocument; + + while (doc instanceof XULDocument) { + const {frameElement} = doc.defaultView; + + if (!frameElement) { + // We're at the root element, and no toolbox was found. + return null; + } + + doc = frameElement.parentElement.ownerDocument; + if (doc.documentURI === "about:devtools-toolbox") { + return doc; + } + } + + return null; + } + + /** + * When accessing proxied functions, the instance becomes unbound to the method. This + * utility either passes a value through if it's not a function, or automatically binds a + * function and caches that bound function for repeated calls. + */ + function functionLazyBinder() { + const boundFunctions = {}; + + return (target, name) => { + if (typeof target[name] === "function") { + // Lazily cache function bindings. + if (boundFunctions[name]) { + return boundFunctions[name]; + } + boundFunctions[name] = target[name].bind(target); + return boundFunctions[name]; + } + return target[name]; + }; + } + + // END MONKEY PATCH + //-------------------------------------------------------------------------------------- + + return monkeyPatchReactDOM(React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED); }); diff --git a/devtools/client/themes/common.css b/devtools/client/themes/common.css index 9f9ce94e0c8c..620a018e76e5 100644 --- a/devtools/client/themes/common.css +++ b/devtools/client/themes/common.css @@ -385,7 +385,6 @@ checkbox:-moz-focusring { .devtools-button:disabled, .devtools-button[disabled], .devtools-toolbarbutton[disabled] { - pointer-events: none; opacity: 0.5 !important; } diff --git a/devtools/client/themes/firebug-theme.css b/devtools/client/themes/firebug-theme.css index 17b29ce8a458..21bf02031f2b 100644 --- a/devtools/client/themes/firebug-theme.css +++ b/devtools/client/themes/firebug-theme.css @@ -94,6 +94,22 @@ .theme-firebug .devtools-sidebar-tabs tab { } +.theme-firebug .devtools-tab span { + padding-inline-end: 0; +} + +/* Tweak the margin and padding values differently for sidebar and the main tab bar */ +.theme-firebug .devtools-tab, +.theme-firebug .devtools-tab.selected { + padding: 2px 4px 0 4px; + margin: 3px 1px -1px; +} + +.theme-firebug .devtools-sidebar-tabs tab { + margin: 3px 0 -1px 0; + padding: 2px 0 0 0; +} + /* In order to hide bottom-border of side panel tabs we need to make the parent element overflow visible, so child element can move one pixel down to hide the bottom border of the parent. */ @@ -107,7 +123,7 @@ border-bottom: 1px solid transparent; } -.theme-firebug .devtools-tab[selected], +.theme-firebug .devtools-tab.selected, .theme-firebug .devtools-sidebar-tabs tab[selected] { background-color: rgb(247, 251, 254); border: 1px solid rgb(170, 188, 207) !important; @@ -116,8 +132,8 @@ color: inherit; } -.theme-firebug .devtools-tab spacer, -.theme-firebug .devtools-tab image { +.theme-firebug .devtools-tabbar .devtools-separator, +.theme-firebug .devtools-tab img { display: none; } @@ -135,7 +151,7 @@ margin: 0 4px !important; } -.theme-firebug #panelSideBox .devtools-tab[selected], +.theme-firebug #panelSideBox .devtools-tab.selected, .theme-firebug .devtools-sidebar-tabs tab[selected] { background-color: white; } @@ -155,13 +171,21 @@ .theme-firebug #toolbox-tab-options::before { content: url(chrome://devtools/skin/images/firebug/tool-options.svg); display: block; - margin: 4px 7px 0; + margin: 4px 4px 0; } .theme-firebug #toolbox-tab-options:not([selected]):hover::before { filter: brightness(80%); } +/* Element picker */ +.theme-firebug #toolbox-buttons-start { + border: none; +} + +.theme-firebug #command-button-pick { + top: 6px; +} /* Toolbar */ .theme-firebug .theme-toolbar, @@ -233,3 +257,9 @@ .theme-firebug #element-picker { min-height: 21px; } + +/* Make sure the toolbar buttons shrink nicely. */ + +#toolbox-buttons-end { + background-image: linear-gradient(rgba(253, 253, 253, 0.2), rgba(253, 253, 253, 0)); +} diff --git a/devtools/client/themes/toolbars.css b/devtools/client/themes/toolbars.css index c515ee5da118..4dc89b463895 100644 --- a/devtools/client/themes/toolbars.css +++ b/devtools/client/themes/toolbars.css @@ -187,7 +187,7 @@ /* Invert the colors of certain light theme images for displaying * inside of the dark theme. */ -.devtools-tab[icon-invertable] > image, +.devtools-tab.icon-invertable > img, .devtools-toolbarbutton > image, .devtools-button::before, #breadcrumb-separator-normal, diff --git a/devtools/client/themes/toolbox.css b/devtools/client/themes/toolbox.css index 1db2bd01c944..5f3549cabd5a 100644 --- a/devtools/client/themes/toolbox.css +++ b/devtools/client/themes/toolbox.css @@ -49,15 +49,32 @@ padding: 0; background: var(--theme-tab-toolbar-background); border-bottom-color: var(--theme-splitter-color); + display: flex; } -#toolbox-tabs { +.toolbox-tabs { margin: 0; + flex: 1; +} + +.toolbox-tabs-wrapper { + position: relative; + display: flex; + flex: 1; +} + +.toolbox-tabs { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: flex; } /* Set flex attribute to Toolbox buttons and Picker container so, - they don't overlapp with the tab bar */ -#toolbox-buttons { + they don't overlap with the tab bar */ +#toolbox-buttons-end { display: flex; } @@ -65,22 +82,38 @@ display: flex; } -/* Toolbox tabs */ +#toolbox-buttons-start { + border: solid 0 var(--theme-splitter-color); + border-inline-end-width: 1px; +} +/* Toolbox tabs */ .devtools-tab { - -moz-appearance: none; - -moz-binding: url("chrome://global/content/bindings/general.xml#control-item"); - -moz-box-align: center; min-width: 32px; min-height: 24px; - max-width: 100px; margin: 0; padding: 0; border-style: solid; border-width: 0; border-inline-start-width: 1px; - -moz-box-align: center; - -moz-box-flex: 1; + padding-inline-end: 10px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + background-color: transparent; +} + +.devtools-tab-icon-only { + padding-inline-end: 2px; +} + +.devtools-tab span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding-inline-end: 13px; + position: relative; + top: 1px; } /* Save space on the tab-strip in Firebug theme */ @@ -114,17 +147,17 @@ background-color: var(--toolbar-tab-hover-active); } -.theme-dark .devtools-tab:not([selected])[highlighted] { +.theme-dark .devtools-tab:not(.selected).highlighted { background-color: hsla(99, 100%, 14%, .3); } -.theme-light .devtools-tab:not([selected])[highlighted] { +.theme-light .devtools-tab:not(.selected).highlighted { background-color: rgba(44, 187, 15, .2); } /* Display execution pointer in the Debugger tab to indicate that the debugger is paused. */ -.theme-firebug #toolbox-tab-jsdebugger.devtools-tab:not([selected])[highlighted] { +.theme-firebug #toolbox-tab-jsdebugger.devtools-tab:not(.selected).highlighted { background-color: rgba(89, 178, 234, .2); background-image: url(chrome://devtools/skin/images/firebug/tool-debugger-paused.svg); background-repeat: no-repeat; @@ -132,27 +165,29 @@ background-position: 3px 6px; } -.devtools-tab > image { +.devtools-tab > img { border: none; margin: 0; - margin-inline-start: 4px; + margin-inline-start: 10px; opacity: 0.6; max-height: 16px; width: 16px; /* Prevents collapse during theme switching */ + vertical-align: text-top; + margin-inline-end: 6px; } /* Support invertable icon flags and make icon white when it's on a blue background */ -.theme-light .devtools-tab[icon-invertable="light-theme"]:not([selected]) > image, -.devtools-tab[icon-invertable="dark-theme"][selected] > image { +.theme-light .devtools-tab.icon-invertable-light-theme:not(.selected) > img, +.devtools-tab.icon-invertable-dark-theme.selected > img { filter: invert(1); } /* Don't apply any filter to non-invertable command button icons */ .command-button:not(.command-button-invertable), -/* [icon-invertable="light-theme"] icons are white, so do not invert them for the dark theme */ -.theme-dark .devtools-tab[icon-invertable="light-theme"] > image, +/* icon-invertable-light-theme icons are white, so do not invert them for the dark theme */ +.theme-dark .devtools-tab.icon-invertable-light-theme > img, /* Since "highlighted" icons are green, we should omit the filter */ -.devtools-tab[icon-invertable][highlighted]:not([selected]) > image { +.devtools-tab.icon-invertable.highlighted:not(.selected) > img { filter: none; } @@ -161,55 +196,50 @@ margin: 0 4px; } -.devtools-tab:hover > image { +.devtools-tab:hover > img { opacity: 0.8; } -.devtools-tab:active > image, -.devtools-tab[selected] > image { +.devtools-tab:active > img, +.devtools-tab.selected > img { opacity: 1; } -.devtools-tabbar .devtools-tab[selected], -.devtools-tabbar .devtools-tab[selected]:hover:active { +.devtools-tabbar .devtools-tab.selected, +.devtools-tabbar .devtools-tab.selected:hover:active { color: var(--theme-selection-color); background-color: var(--theme-selection-background); } -#toolbox-tabs .devtools-tab[selected], -#toolbox-tabs .devtools-tab[highlighted] { +.toolbox-tabs .devtools-tab.selected, +.toolbox-tabs .devtools-tab.highlighted { border-width: 0; padding-inline-start: 1px; } -#toolbox-tabs .devtools-tab[selected]:last-child, -#toolbox-tabs .devtools-tab[highlighted]:last-child { - padding-inline-end: 1px; -} - -#toolbox-tabs .devtools-tab[selected] + .devtools-tab, -#toolbox-tabs .devtools-tab[highlighted] + .devtools-tab { +.toolbox-tabs .devtools-tab.selected + .devtools-tab, +.toolbox-tabs .devtools-tab.highlighted + .devtools-tab { border-inline-start-width: 0; padding-inline-start: 1px; } -#toolbox-tabs .devtools-tab:first-child[selected] { +.toolbox-tabs .devtools-tab:first-child { border-inline-start-width: 0; } -#toolbox-tabs .devtools-tab:last-child { +.toolbox-tabs .devtools-tab:last-child { border-inline-end-width: 1px; } -.devtools-tab:not([highlighted]) > .highlighted-icon, -.devtools-tab[selected] > .highlighted-icon, -.devtools-tab:not([selected])[highlighted] > .default-icon { - visibility: collapse; +.devtools-tab:not(.highlighted) > .highlighted-icon, +.devtools-tab.selected > .highlighted-icon, +.devtools-tab:not(.selected).highlighted > .default-icon { + display: none; } /* The options tab is special - it doesn't have the same parent as the other tabs (toolbox-option-container vs toolbox-tabs) */ -#toolbox-option-container .devtools-tab:not([selected]) { +#toolbox-option-container .devtools-tab:not(.selected) { background-color: transparent; } #toolbox-option-container .devtools-tab { @@ -217,12 +247,16 @@ border-width: 0; padding-inline-start: 1px; } -#toolbox-tab-options > image { - margin: 0 8px; +#toolbox-option-container img { + margin-inline-end: 6px; + margin-inline-start: 6px; } /* Toolbox controls */ +#toolbox-controls, #toolbox-dock-buttons { + display: flex; +} #toolbox-controls > button, #toolbox-dock-buttons > button { -moz-appearance: none; @@ -263,7 +297,16 @@ background-image: url("chrome://devtools/skin/images/dock-bottom-maximize@2x.png"); } -#toolbox-buttons:empty + .devtools-separator, +/** + * Ensure that when the toolbar collapses in on itself when there is not enough room + * that it still looks reasonable. + */ +.devtools-tabbar > div { + background-color: var(--theme-tab-toolbar-background); + z-index: 0; +} + +#toolbox-buttons-end:empty + .devtools-separator, .devtools-separator[invisible] { visibility: hidden; } @@ -293,12 +336,12 @@ } .command-button:hover:active, -.command-button[checked=true]:not(:hover) { +.command-button.checked:not(:hover) { background-color: var(--toolbar-tab-hover-active) } .theme-light .command-button:hover:active, -.theme-light .command-button[checked=true]:not(:hover) { +.theme-light .command-button.checked:not(:hover) { background-color: inherit; } @@ -307,8 +350,8 @@ } .command-button:hover:active::before, -.command-button[checked=true]::before, -.command-button[open=true]::before { +.command-button.checked::before, +.command-button.open::before { opacity: 1; } diff --git a/devtools/client/webconsole/test/browser_webconsole_split.js b/devtools/client/webconsole/test/browser_webconsole_split.js index 0242d94b4c01..a855a246922c 100644 --- a/devtools/client/webconsole/test/browser_webconsole_split.js +++ b/devtools/client/webconsole/test/browser_webconsole_split.js @@ -85,17 +85,15 @@ function runTest() { webconsoleHeight: webconsoleHeight, splitterVisibility: splitterVisibility, openedConsolePanel: openedConsolePanel, - buttonSelected: cmdButton.hasAttribute("checked") + buttonSelected: cmdButton.classList.contains("checked") }; } - function checkWebconsolePanelOpened() { + const checkWebconsolePanelOpened = Task.async(function* () { info("About to check special cases when webconsole panel is open."); - let deferred = promise.defer(); - // Start with console split, so we can test for transition to main panel. - toolbox.toggleSplitConsole(); + yield toolbox.toggleSplitConsole(); let currentUIState = getCurrentUIState(); @@ -109,78 +107,54 @@ function runTest() { "The console panel is not the current tool"); ok(currentUIState.buttonSelected, "The command button is selected"); - openPanel("webconsole").then(() => { - currentUIState = getCurrentUIState(); + yield openPanel("webconsole"); + currentUIState = getCurrentUIState(); - ok(!currentUIState.splitterVisibility, - "Splitter is hidden when console is opened."); - is(currentUIState.deckHeight, 0, - "Deck has a height == 0 when console is opened."); - is(currentUIState.webconsoleHeight, currentUIState.containerHeight, - "Web console is full height."); - ok(currentUIState.openedConsolePanel, - "The console panel is the current tool"); - ok(currentUIState.buttonSelected, - "The command button is still selected."); + ok(!currentUIState.splitterVisibility, + "Splitter is hidden when console is opened."); + is(currentUIState.deckHeight, 0, + "Deck has a height == 0 when console is opened."); + is(currentUIState.webconsoleHeight, currentUIState.containerHeight, + "Web console is full height."); + ok(currentUIState.openedConsolePanel, + "The console panel is the current tool"); + ok(currentUIState.buttonSelected, + "The command button is still selected."); - // Make sure splitting console does nothing while webconsole is opened - toolbox.toggleSplitConsole(); + // Make sure splitting console does nothing while webconsole is opened + yield toolbox.toggleSplitConsole(); - currentUIState = getCurrentUIState(); + currentUIState = getCurrentUIState(); - ok(!currentUIState.splitterVisibility, - "Splitter is hidden when console is opened."); - is(currentUIState.deckHeight, 0, - "Deck has a height == 0 when console is opened."); - is(currentUIState.webconsoleHeight, currentUIState.containerHeight, - "Web console is full height."); - ok(currentUIState.openedConsolePanel, - "The console panel is the current tool"); - ok(currentUIState.buttonSelected, - "The command button is still selected."); + ok(!currentUIState.splitterVisibility, + "Splitter is hidden when console is opened."); + is(currentUIState.deckHeight, 0, + "Deck has a height == 0 when console is opened."); + is(currentUIState.webconsoleHeight, currentUIState.containerHeight, + "Web console is full height."); + ok(currentUIState.openedConsolePanel, + "The console panel is the current tool"); + ok(currentUIState.buttonSelected, + "The command button is still selected."); - // Make sure that split state is saved after opening another panel - openPanel("inspector").then(() => { - currentUIState = getCurrentUIState(); - ok(currentUIState.splitterVisibility, - "Splitter is visible when console is split"); - ok(currentUIState.deckHeight > 0, - "Deck has a height > 0 when console is split"); - ok(currentUIState.webconsoleHeight > 0, - "Web console has a height > 0 when console is split"); - ok(!currentUIState.openedConsolePanel, - "The console panel is not the current tool"); - ok(currentUIState.buttonSelected, - "The command button is still selected."); + // Make sure that split state is saved after opening another panel + yield openPanel("inspector"); + currentUIState = getCurrentUIState(); + ok(currentUIState.splitterVisibility, + "Splitter is visible when console is split"); + ok(currentUIState.deckHeight > 0, + "Deck has a height > 0 when console is split"); + ok(currentUIState.webconsoleHeight > 0, + "Web console has a height > 0 when console is split"); + ok(!currentUIState.openedConsolePanel, + "The console panel is not the current tool"); + ok(currentUIState.buttonSelected, + "The command button is still selected."); - toolbox.toggleSplitConsole(); - deferred.resolve(); - }); - }); - return deferred.promise; - } + yield toolbox.toggleSplitConsole(); + }); - function openPanel(toolId) { - let deferred = promise.defer(); - let target = TargetFactory.forTab(gBrowser.selectedTab); - gDevTools.showToolbox(target, toolId).then(function (box) { - toolbox = box; - deferred.resolve(); - }).then(null, console.error); - return deferred.promise; - } - - function openAndCheckPanel(toolId) { - let deferred = promise.defer(); - openPanel(toolId).then(() => { - info("Checking toolbox for " + toolId); - checkToolboxUI(toolbox.getCurrentPanel()); - deferred.resolve(); - }); - return deferred.promise; - } - - function checkToolboxUI() { + const checkToolboxUI = Task.async(function* () { let currentUIState = getCurrentUIState(); ok(!currentUIState.splitterVisibility, "Splitter is hidden by default"); @@ -192,7 +166,7 @@ function runTest() { "The console panel is not the current tool"); ok(!currentUIState.buttonSelected, "The command button is not selected."); - toolbox.toggleSplitConsole(); + yield toolbox.toggleSplitConsole(); currentUIState = getCurrentUIState(); @@ -209,7 +183,7 @@ function runTest() { "The console panel is not the current tool"); ok(currentUIState.buttonSelected, "The command button is selected."); - toolbox.toggleSplitConsole(); + yield toolbox.toggleSplitConsole(); currentUIState = getCurrentUIState(); @@ -221,6 +195,23 @@ function runTest() { ok(!currentUIState.openedConsolePanel, "The console panel is not the current tool"); ok(!currentUIState.buttonSelected, "The command button is not selected."); + }); + + function openPanel(toolId) { + let deferred = promise.defer(); + let target = TargetFactory.forTab(gBrowser.selectedTab); + gDevTools.showToolbox(target, toolId).then(function (box) { + toolbox = box; + deferred.resolve(); + }).then(null, console.error); + return deferred.promise; + } + + function openAndCheckPanel(toolId) { + return openPanel(toolId).then(() => { + info("Checking toolbox for " + toolId); + return checkToolboxUI(toolbox.getCurrentPanel()); + }); } function testBottomHost() { diff --git a/devtools/client/webconsole/test/browser_webconsole_split_persist.js b/devtools/client/webconsole/test/browser_webconsole_split_persist.js index e11bd48118f2..ea28e6843939 100644 --- a/devtools/client/webconsole/test/browser_webconsole_split_persist.js +++ b/devtools/client/webconsole/test/browser_webconsole_split_persist.js @@ -99,7 +99,7 @@ function isCommandButtonChecked() { return toolbox.doc.querySelector("#command-button-splitconsole") - .hasAttribute("checked"); + .classList.contains("checked"); } function toggleSplitConsoleWithEscape() { diff --git a/devtools/shared/client/connection-manager.js b/devtools/shared/client/connection-manager.js index ef242db85302..6b6a1e5e85c9 100644 --- a/devtools/shared/client/connection-manager.js +++ b/devtools/shared/client/connection-manager.js @@ -6,9 +6,8 @@ "use strict"; -const {Cc, Ci, Cu, Cr} = require("chrome"); +const {Cc, Ci, Cr} = require("chrome"); const EventEmitter = require("devtools/shared/event-emitter"); -const DevToolsUtils = require("devtools/shared/DevToolsUtils"); const { DebuggerServer } = require("devtools/server/main"); const { DebuggerClient } = require("devtools/shared/client/main"); const Services = require("Services"); @@ -70,8 +69,10 @@ const REMOTE_TIMEOUT = "devtools.debugger.remote-timeout"; * . Connection.Events.CONNECTING Trying to connect to host:port * . Connection.Events.CONNECTED Connection is successful * . Connection.Events.DISCONNECTING Trying to disconnect from server - * . Connection.Events.DISCONNECTED Disconnected (at client request, or because of a timeout or connection error) - * . Connection.Events.STATUS_CHANGED The connection status (connection.status) has changed + * . Connection.Events.DISCONNECTED Disconnected (at client request, + * or because of a timeout or connection error) + * . Connection.Events.STATUS_CHANGED The connection status (connection.status) + * has changed * . Connection.Events.TIMEOUT Connection timeout * . Connection.Events.HOST_CHANGED Host has changed * . Connection.Events.PORT_CHANGED Port has changed @@ -168,8 +169,9 @@ Connection.prototype = { }, set host(value) { - if (this._host && this._host == value) + if (this._host && this._host == value) { return; + } this._host = value; this.emit(Connection.Events.HOST_CHANGED); }, @@ -179,8 +181,9 @@ Connection.prototype = { }, set port(value) { - if (this._port && this._port == value) + if (this._port && this._port == value) { return; + } this._port = value; this.emit(Connection.Events.PORT_CHANGED); }, @@ -334,8 +337,9 @@ Connection.prototype = { }, _setStatus: function (value) { - if (this._status && this._status == value) + if (this._status && this._status == value) { return; + } this._status = value; this.emit(value); this.emit(Connection.Events.STATUS_CHANGED, value); @@ -357,7 +361,9 @@ Connection.prototype = { this.log("disconnected (unexpected)"); break; case Connection.Status.CONNECTING: - this.log("connection error. Possible causes: USB port not connected, port not forwarded (adb forward), wrong host or port, remote debugging not enabled on the device."); + this.log("connection error. Possible causes: USB port not connected, port not " + + "forwarded (adb forward), wrong host or port, remote debugging not " + + "enabled on the device."); break; default: this.log("disconnected"); diff --git a/devtools/shared/client/main.js b/devtools/shared/client/main.js index 408c0b277edc..b1e3295aff64 100644 --- a/devtools/shared/client/main.js +++ b/devtools/shared/client/main.js @@ -7,7 +7,6 @@ "use strict"; const { Ci, Cu } = require("chrome"); -const Services = require("Services"); const DevToolsUtils = require("devtools/shared/DevToolsUtils"); const { getStack, callFunctionWithAsyncStack } = require("devtools/shared/platform/stack"); @@ -28,22 +27,22 @@ const noop = () => {}; * augmented with the necessary facilities by passing its prototype to this * function. * - * @param aProto object + * @param proto object * The prototype object that will be modified. */ -function eventSource(aProto) { +function eventSource(proto) { /** * Add a listener to the event source for a given event. * - * @param aName string + * @param name string * The event to listen for. - * @param aListener function + * @param listener function * Called when the event is fired. If the same listener * is added more than once, it will be called once per * addListener call. */ - aProto.addListener = function (aName, aListener) { - if (typeof aListener != "function") { + proto.addListener = function (name, listener) { + if (typeof listener != "function") { throw TypeError("Listeners must be functions."); } @@ -51,47 +50,46 @@ function eventSource(aProto) { this._listeners = {}; } - this._getListeners(aName).push(aListener); + this._getListeners(name).push(listener); }; /** * Add a listener to the event source for a given event. The * listener will be removed after it is called for the first time. * - * @param aName string + * @param name string * The event to listen for. - * @param aListener function + * @param listener function * Called when the event is fired. */ - aProto.addOneTimeListener = function (aName, aListener) { + proto.addOneTimeListener = function (name, listener) { let l = (...args) => { - this.removeListener(aName, l); - aListener.apply(null, args); + this.removeListener(name, l); + listener.apply(null, args); }; - this.addListener(aName, l); + this.addListener(name, l); }; /** * Remove a listener from the event source previously added with * addListener(). * - * @param aName string + * @param name string * The event name used during addListener to add the listener. - * @param aListener function + * @param listener function * The callback to remove. If addListener was called multiple * times, all instances will be removed. */ - aProto.removeListener = function (aName, aListener) { - if (!this._listeners || (aListener && !this._listeners[aName])) { + proto.removeListener = function (name, listener) { + if (!this._listeners || (listener && !this._listeners[name])) { return; } - if (!aListener) { - this._listeners[aName] = []; - } - else { - this._listeners[aName] = - this._listeners[aName].filter(function (l) { return l != aListener; }); + if (!listener) { + this._listeners[name] = []; + } else { + this._listeners[name] = + this._listeners[name].filter(l => l != listener); } }; @@ -99,27 +97,27 @@ function eventSource(aProto) { * Returns the listeners for the specified event name. If none are defined it * initializes an empty list and returns that. * - * @param aName string + * @param name string * The event name. */ - aProto._getListeners = function (aName) { - if (aName in this._listeners) { - return this._listeners[aName]; + proto._getListeners = function (name) { + if (name in this._listeners) { + return this._listeners[name]; } - this._listeners[aName] = []; - return this._listeners[aName]; + this._listeners[name] = []; + return this._listeners[name]; }; /** * Notify listeners of an event. * - * @param aName string + * @param name string * The event to fire. * @param arguments * All arguments will be passed along to the listeners, * including the name argument. */ - aProto.emit = function () { + proto.emit = function () { if (!this._listeners) { return; } @@ -202,9 +200,8 @@ const UnsolicitedPauses = { * provides the means to communicate with the server and exchange the messages * required by the protocol in a traditional JavaScript API. */ -const DebuggerClient = exports.DebuggerClient = function (aTransport) -{ - this._transport = aTransport; +const DebuggerClient = exports.DebuggerClient = function (transport) { + this._transport = transport; this._transport.hooks = this; // Map actor ID to client instance for each actor type. @@ -224,18 +221,18 @@ const DebuggerClient = exports.DebuggerClient = function (aTransport) * the connection's root actor. */ this.mainRoot = null; - this.expectReply("root", (aPacket) => { - this.mainRoot = new RootClient(this, aPacket); - this.emit("connected", aPacket.applicationType, aPacket.traits); + this.expectReply("root", (packet) => { + this.mainRoot = new RootClient(this, packet); + this.emit("connected", packet.applicationType, packet.traits); }); }; /** * A declarative helper for defining methods that send requests to the server. * - * @param aPacketSkeleton + * @param packetSkeleton * The form of the packet to send. Can specify fields to be filled from - * the parameters by using the |args| function. + * the parameters by using the |arg| function. * @param before * The function to call before sending the packet. Is passed the packet, * and the return value is used as the new packet. The |this| context is @@ -249,21 +246,21 @@ const DebuggerClient = exports.DebuggerClient = function (aTransport) * The `Request` object that is a Promise object and resolves once * we receive the response. (See request method for more details) */ -DebuggerClient.requester = function (aPacketSkeleton, config = {}) { +DebuggerClient.requester = function (packetSkeleton, config = {}) { let { before, after } = config; return DevToolsUtils.makeInfallible(function (...args) { let outgoingPacket = { - to: aPacketSkeleton.to || this.actor + to: packetSkeleton.to || this.actor }; let maxPosition = -1; - for (let k of Object.keys(aPacketSkeleton)) { - if (aPacketSkeleton[k] instanceof DebuggerClient.Argument) { - let { position } = aPacketSkeleton[k]; - outgoingPacket[k] = aPacketSkeleton[k].getArgument(args); + for (let k of Object.keys(packetSkeleton)) { + if (packetSkeleton[k] instanceof DebuggerClient.Argument) { + let { position } = packetSkeleton[k]; + outgoingPacket[k] = packetSkeleton[k].getArgument(args); maxPosition = Math.max(position, maxPosition); } else { - outgoingPacket[k] = aPacketSkeleton[k]; + outgoingPacket[k] = packetSkeleton[k]; } } @@ -271,37 +268,37 @@ DebuggerClient.requester = function (aPacketSkeleton, config = {}) { outgoingPacket = before.call(this, outgoingPacket); } - return this.request(outgoingPacket, DevToolsUtils.makeInfallible((aResponse) => { + return this.request(outgoingPacket, DevToolsUtils.makeInfallible((response) => { if (after) { - let { from } = aResponse; - aResponse = after.call(this, aResponse); - if (!aResponse.from) { - aResponse.from = from; + let { from } = response; + response = after.call(this, response); + if (!response.from) { + response.from = from; } } // The callback is always the last parameter. let thisCallback = args[maxPosition + 1]; if (thisCallback) { - thisCallback(aResponse); + thisCallback(response); } }, "DebuggerClient.requester request callback")); }, "DebuggerClient.requester"); }; -function args(aPos) { - return new DebuggerClient.Argument(aPos); +function arg(pos) { + return new DebuggerClient.Argument(pos); } -DebuggerClient.Argument = function (aPosition) { - this.position = aPosition; +DebuggerClient.Argument = function (position) { + this.position = position; }; -DebuggerClient.Argument.prototype.getArgument = function (aParams) { - if (!(this.position in aParams)) { +DebuggerClient.Argument.prototype.getArgument = function (params) { + if (!(this.position in params)) { throw new Error("Bad index into params: " + this.position); } - return aParams[this.position]; + return params[this.position]; }; // Expose these to save callers the trouble of importing DebuggerSocket @@ -320,7 +317,7 @@ DebuggerClient.prototype = { /** * Connect to the server and start exchanging protocol messages. * - * @param aOnConnected function + * @param onConnected function * If specified, will be called when the greeting packet is * received from the debugging server. * @@ -330,7 +327,7 @@ DebuggerClient.prototype = { * element is the traits object (help figure out the features * and behaviors of the server we connect to. See RootActor). */ - connect: function (aOnConnected) { + connect: function (onConnected) { let deferred = promise.defer(); this.emit("connect"); @@ -338,12 +335,12 @@ DebuggerClient.prototype = { // so it's possible to track all instances. events.emit(DebuggerClient, "connect", this); - this.addOneTimeListener("connected", (aName, aApplicationType, aTraits) => { - this.traits = aTraits; - if (aOnConnected) { - aOnConnected(aApplicationType, aTraits); + this.addOneTimeListener("connected", (name, applicationType, traits) => { + this.traits = traits; + if (onConnected) { + onConnected(applicationType, traits); } - deferred.resolve([aApplicationType, aTraits]); + deferred.resolve([applicationType, traits]); }); this._transport.ready(); @@ -353,17 +350,17 @@ DebuggerClient.prototype = { /** * Shut down communication with the debugging server. * - * @param aOnClosed function + * @param onClosed function * If specified, will be called when the debugging connection * has been closed. This parameter is deprecated - please use * the returned Promise. * @return Promise * Resolves after the underlying transport is closed. */ - close: function (aOnClosed) { + close: function (onClosed) { let deferred = promise.defer(); - if (aOnClosed) { - deferred.promise.then(aOnClosed); + if (onClosed) { + deferred.promise.then(onClosed); } // Disable detach event notifications, because event handlers will be in a @@ -413,198 +410,206 @@ DebuggerClient.prototype = { * This function exists only to preserve DebuggerClient's interface; * new code should say 'client.mainRoot.listTabs()'. */ - listTabs: function (aOnResponse) { return this.mainRoot.listTabs(aOnResponse); }, + listTabs: function (onResponse) { + return this.mainRoot.listTabs(onResponse); + }, /* * This function exists only to preserve DebuggerClient's interface; * new code should say 'client.mainRoot.listAddons()'. */ - listAddons: function (aOnResponse) { return this.mainRoot.listAddons(aOnResponse); }, + listAddons: function (onResponse) { + return this.mainRoot.listAddons(onResponse); + }, - getTab: function (aFilter) { return this.mainRoot.getTab(aFilter); }, + getTab: function (filter) { + return this.mainRoot.getTab(filter); + }, /** * Attach to a tab actor. * - * @param string aTabActor + * @param string tabActor * The actor ID for the tab to attach. - * @param function aOnResponse + * @param function onResponse * Called with the response packet and a TabClient * (which will be undefined on error). */ - attachTab: function (aTabActor, aOnResponse = noop) { - if (this._clients.has(aTabActor)) { - let cachedTab = this._clients.get(aTabActor); + attachTab: function (tabActor, onResponse = noop) { + if (this._clients.has(tabActor)) { + let cachedTab = this._clients.get(tabActor); let cachedResponse = { cacheDisabled: cachedTab.cacheDisabled, javascriptEnabled: cachedTab.javascriptEnabled, traits: cachedTab.traits, }; - DevToolsUtils.executeSoon(() => aOnResponse(cachedResponse, cachedTab)); + DevToolsUtils.executeSoon(() => onResponse(cachedResponse, cachedTab)); return promise.resolve([cachedResponse, cachedTab]); } let packet = { - to: aTabActor, + to: tabActor, type: "attach" }; - return this.request(packet).then(aResponse => { + return this.request(packet).then(response => { let tabClient; - if (!aResponse.error) { - tabClient = new TabClient(this, aResponse); + if (!response.error) { + tabClient = new TabClient(this, response); this.registerClient(tabClient); } - aOnResponse(aResponse, tabClient); - return [aResponse, tabClient]; + onResponse(response, tabClient); + return [response, tabClient]; }); }, - attachWorker: function DC_attachWorker(aWorkerActor, aOnResponse = noop) { - let workerClient = this._clients.get(aWorkerActor); + attachWorker: function (workerActor, onResponse = noop) { + let workerClient = this._clients.get(workerActor); if (workerClient !== undefined) { let response = { from: workerClient.actor, type: "attached", url: workerClient.url }; - DevToolsUtils.executeSoon(() => aOnResponse(response, workerClient)); + DevToolsUtils.executeSoon(() => onResponse(response, workerClient)); return promise.resolve([response, workerClient]); } - return this.request({ to: aWorkerActor, type: "attach" }).then(aResponse => { - if (aResponse.error) { - aOnResponse(aResponse, null); - return [aResponse, null]; + return this.request({ to: workerActor, type: "attach" }).then(response => { + if (response.error) { + onResponse(response, null); + return [response, null]; } - let workerClient = new WorkerClient(this, aResponse); + workerClient = new WorkerClient(this, response); this.registerClient(workerClient); - aOnResponse(aResponse, workerClient); - return [aResponse, workerClient]; + onResponse(response, workerClient); + return [response, workerClient]; }); }, /** * Attach to an addon actor. * - * @param string aAddonActor + * @param string addonActor * The actor ID for the addon to attach. - * @param function aOnResponse + * @param function onResponse * Called with the response packet and a AddonClient * (which will be undefined on error). */ - attachAddon: function DC_attachAddon(aAddonActor, aOnResponse = noop) { + attachAddon: function (addonActor, onResponse = noop) { let packet = { - to: aAddonActor, + to: addonActor, type: "attach" }; - return this.request(packet).then(aResponse => { + return this.request(packet).then(response => { let addonClient; - if (!aResponse.error) { - addonClient = new AddonClient(this, aAddonActor); + if (!response.error) { + addonClient = new AddonClient(this, addonActor); this.registerClient(addonClient); this.activeAddon = addonClient; } - aOnResponse(aResponse, addonClient); - return [aResponse, addonClient]; + onResponse(response, addonClient); + return [response, addonClient]; }); }, /** * Attach to a Web Console actor. * - * @param string aConsoleActor + * @param string consoleActor * The ID for the console actor to attach to. - * @param array aListeners + * @param array listeners * The console listeners you want to start. - * @param function aOnResponse + * @param function onResponse * Called with the response packet and a WebConsoleClient * instance (which will be undefined on error). */ attachConsole: - function (aConsoleActor, aListeners, aOnResponse = noop) { + function (consoleActor, listeners, onResponse = noop) { let packet = { - to: aConsoleActor, + to: consoleActor, type: "startListeners", - listeners: aListeners, + listeners: listeners, }; - return this.request(packet).then(aResponse => { + return this.request(packet).then(response => { let consoleClient; - if (!aResponse.error) { - if (this._clients.has(aConsoleActor)) { - consoleClient = this._clients.get(aConsoleActor); + if (!response.error) { + if (this._clients.has(consoleActor)) { + consoleClient = this._clients.get(consoleActor); } else { - consoleClient = new WebConsoleClient(this, aResponse); + consoleClient = new WebConsoleClient(this, response); this.registerClient(consoleClient); } } - aOnResponse(aResponse, consoleClient); - return [aResponse, consoleClient]; + onResponse(response, consoleClient); + return [response, consoleClient]; }); }, /** * Attach to a global-scoped thread actor for chrome debugging. * - * @param string aThreadActor + * @param string threadActor * The actor ID for the thread to attach. - * @param function aOnResponse + * @param function onResponse * Called with the response packet and a ThreadClient * (which will be undefined on error). - * @param object aOptions + * @param object options * Configuration options. * - useSourceMaps: whether to use source maps or not. */ - attachThread: function (aThreadActor, aOnResponse = noop, aOptions = {}) { - if (this._clients.has(aThreadActor)) { - let client = this._clients.get(aThreadActor); - DevToolsUtils.executeSoon(() => aOnResponse({}, client)); + attachThread: function (threadActor, onResponse = noop, options = {}) { + if (this._clients.has(threadActor)) { + let client = this._clients.get(threadActor); + DevToolsUtils.executeSoon(() => onResponse({}, client)); return promise.resolve([{}, client]); } let packet = { - to: aThreadActor, + to: threadActor, type: "attach", - options: aOptions + options, }; - return this.request(packet).then(aResponse => { - if (!aResponse.error) { - var threadClient = new ThreadClient(this, aThreadActor); + return this.request(packet).then(response => { + let threadClient; + if (!response.error) { + threadClient = new ThreadClient(this, threadActor); this.registerClient(threadClient); } - aOnResponse(aResponse, threadClient); - return [aResponse, threadClient]; + onResponse(response, threadClient); + return [response, threadClient]; }); }, /** * Attach to a trace actor. * - * @param string aTraceActor + * @param string traceActor * The actor ID for the tracer to attach. - * @param function aOnResponse + * @param function onResponse * Called with the response packet and a TraceClient * (which will be undefined on error). */ - attachTracer: function (aTraceActor, aOnResponse = noop) { - if (this._clients.has(aTraceActor)) { - let client = this._clients.get(aTraceActor); - DevToolsUtils.executeSoon(() => aOnResponse({}, client)); + attachTracer: function (traceActor, onResponse = noop) { + if (this._clients.has(traceActor)) { + let client = this._clients.get(traceActor); + DevToolsUtils.executeSoon(() => onResponse({}, client)); return promise.resolve([{}, client]); } let packet = { - to: aTraceActor, + to: traceActor, type: "attach" }; - return this.request(packet).then(aResponse => { - if (!aResponse.error) { - var traceClient = new TraceClient(this, aTraceActor); + return this.request(packet).then(response => { + let traceClient; + if (!response.error) { + traceClient = new TraceClient(this, traceActor); this.registerClient(traceClient); } - aOnResponse(aResponse, traceClient); - return [aResponse, traceClient]; + onResponse(response, traceClient); + return [response, traceClient]; }); }, @@ -612,17 +617,17 @@ DebuggerClient.prototype = { * Fetch the ChromeActor for the main process or ChildProcessActor for a * a given child process ID. * - * @param number aId + * @param number id * The ID for the process to attach (returned by `listProcesses`). * Connected to the main process if omitted, or is 0. */ - getProcess: function (aId) { + getProcess: function (id) { let packet = { to: "root", type: "getProcess" }; - if (typeof (aId) == "number") { - packet.id = aId; + if (typeof (id) == "number") { + packet.id = id; } return this.request(packet); }, @@ -630,23 +635,23 @@ DebuggerClient.prototype = { /** * Release an object actor. * - * @param string aActor + * @param string actor * The actor ID to send the request to. - * @param aOnResponse function + * @param onResponse function * If specified, will be called with the response packet when * debugging server responds. */ release: DebuggerClient.requester({ - to: args(0), + to: arg(0), type: "release" }), /** * Send a request to the debugging server. * - * @param aRequest object + * @param packet object * A JSON packet to send to the debugging server. - * @param aOnResponse function + * @param onResponse function * If specified, will be called with the JSON response packet when * debugging server responds. * @return Request @@ -656,7 +661,7 @@ DebuggerClient.prototype = { * whenever a JSON or a Bulk response is received; and is rejected * if the response is an error. * Note: This return value can be ignored if you are using JSON alone, - * because the callback provided in |aOnResponse| will be bound to the + * because the callback provided in |onResponse| will be bound to the * "json-reply" event automatically. * * Events emitted: @@ -688,30 +693,30 @@ DebuggerClient.prototype = { * This object also emits "progress" events for each chunk * that is copied. See stream-utils.js. */ - request: function (aRequest, aOnResponse) { + request: function (packet, onResponse) { if (!this.mainRoot) { throw Error("Have not yet received a hello packet from the server."); } - let type = aRequest.type || ""; - if (!aRequest.to) { + let type = packet.type || ""; + if (!packet.to) { throw Error("'" + type + "' request packet has no destination."); } if (this._closed) { let msg = "'" + type + "' request packet to " + - "'" + aRequest.to + "' " + + "'" + packet.to + "' " + "can't be sent as the connection is closed."; let resp = { error: "connectionClosed", message: msg }; - if (aOnResponse) { - aOnResponse(resp); + if (onResponse) { + onResponse(resp); } return promise.reject(resp); } - let request = new Request(aRequest); + let request = new Request(packet); request.format = "json"; request.stack = getStack(); - if (aOnResponse) { - request.on("json-reply", aOnResponse); + if (onResponse) { + request.on("json-reply", onResponse); } this._sendOrQueueRequest(request); @@ -861,7 +866,7 @@ DebuggerClient.prototype = { if (request.format === "json") { this._transport.send(request.request); - return false; + return; } this._transport.startBulkSend(request.request).then((...args) => { @@ -899,28 +904,28 @@ DebuggerClient.prototype = { }, /** - * Arrange to hand the next reply from |aActor| to the handler bound to - * |aRequest|. + * Arrange to hand the next reply from |actor| to the handler bound to + * |request|. * * DebuggerClient.prototype.request / startBulkRequest usually takes care of * establishing the handler for a given request, but in rare cases (well, * greetings from new root actors, is the only case at the moment) we must be * prepared for a "reply" that doesn't correspond to any request we sent. */ - expectReply: function (aActor, aRequest) { - if (this._activeRequests.has(aActor)) { - throw Error("clashing handlers for next reply from " + uneval(aActor)); + expectReply: function (actor, request) { + if (this._activeRequests.has(actor)) { + throw Error("clashing handlers for next reply from " + actor); } // If a handler is passed directly (as it is with the handler for the root // actor greeting), create a dummy request to bind this to. - if (typeof aRequest === "function") { - let handler = aRequest; - aRequest = new Request(); - aRequest.on("json-reply", handler); + if (typeof request === "function") { + let handler = request; + request = new Request(); + request.on("json-reply", handler); } - this._activeRequests.set(aActor, aRequest); + this._activeRequests.set(actor, request); }, // Transport hooks. @@ -928,23 +933,23 @@ DebuggerClient.prototype = { /** * Called by DebuggerTransport to dispatch incoming packets as appropriate. * - * @param aPacket object + * @param packet object * The incoming packet. */ - onPacket: function (aPacket) { - if (!aPacket.from) { + onPacket: function (packet) { + if (!packet.from) { DevToolsUtils.reportException( "onPacket", new Error("Server did not specify an actor, dropping packet: " + - JSON.stringify(aPacket))); + JSON.stringify(packet))); return; } // If we have a registered Front for this actor, let it handle the packet // and skip all the rest of this unpleasantness. - let front = this.getActor(aPacket.from); + let front = this.getActor(packet.from); if (front) { - front.onPacket(aPacket); + front.onPacket(packet); return; } @@ -952,17 +957,17 @@ DebuggerClient.prototype = { // This is necessary because we might receive this event while the client is closing, // and the clients have already been removed by that point. if (this.mainRoot && - aPacket.from == this.mainRoot.actor && - aPacket.type == "forwardingCancelled") { - this.purgeRequests(aPacket.prefix); + packet.from == this.mainRoot.actor && + packet.type == "forwardingCancelled") { + this.purgeRequests(packet.prefix); return; } - if (this._clients.has(aPacket.from) && aPacket.type) { - let client = this._clients.get(aPacket.from); - let type = aPacket.type; + if (this._clients.has(packet.from) && packet.type) { + let client = this._clients.get(packet.from); + let type = packet.type; if (client.events.indexOf(type) != -1) { - client.emit(type, aPacket); + client.emit(type, packet); // we ignore the rest, as the client is expected to handle this packet. return; } @@ -972,24 +977,24 @@ DebuggerClient.prototype = { // See if we have a handler function waiting for a reply from this // actor. (Don't count unsolicited notifications or pauses as // replies.) - if (this._activeRequests.has(aPacket.from) && - !(aPacket.type in UnsolicitedNotifications) && - !(aPacket.type == ThreadStateTypes.paused && - aPacket.why.type in UnsolicitedPauses)) { - activeRequest = this._activeRequests.get(aPacket.from); - this._activeRequests.delete(aPacket.from); + if (this._activeRequests.has(packet.from) && + !(packet.type in UnsolicitedNotifications) && + !(packet.type == ThreadStateTypes.paused && + packet.why.type in UnsolicitedPauses)) { + activeRequest = this._activeRequests.get(packet.from); + this._activeRequests.delete(packet.from); } // If there is a subsequent request for the same actor, hand it off to the // transport. Delivery of packets on the other end is always async, even // in the local transport case. - this._attemptNextRequest(aPacket.from); + this._attemptNextRequest(packet.from); // Packets that indicate thread state changes get special treatment. - if (aPacket.type in ThreadStateTypes && - this._clients.has(aPacket.from) && - typeof this._clients.get(aPacket.from)._onThreadState == "function") { - this._clients.get(aPacket.from)._onThreadState(aPacket); + if (packet.type in ThreadStateTypes && + this._clients.has(packet.from) && + typeof this._clients.get(packet.from)._onThreadState == "function") { + this._clients.get(packet.from)._onThreadState(packet); } // TODO: Bug 1151156 - Remove once Gecko 40 is on b2g-stable. @@ -997,10 +1002,10 @@ DebuggerClient.prototype = { // On navigation the server resumes, so the client must resume as well. // We achieve that by generating a fake resumption packet that triggers // the client's thread state change listeners. - if (aPacket.type == UnsolicitedNotifications.tabNavigated && - this._clients.has(aPacket.from) && - this._clients.get(aPacket.from).thread) { - let thread = this._clients.get(aPacket.from).thread; + if (packet.type == UnsolicitedNotifications.tabNavigated && + this._clients.has(packet.from) && + this._clients.get(packet.from).thread) { + let thread = this._clients.get(packet.from).thread; let resumption = { from: thread._actor, type: "resumed" }; thread._onThreadState(resumption); } @@ -1008,12 +1013,12 @@ DebuggerClient.prototype = { // Only try to notify listeners on events, not responses to requests // that lack a packet type. - if (aPacket.type) { - this.emit(aPacket.type, aPacket); + if (packet.type) { + this.emit(packet.type, packet); } if (activeRequest) { - let emitReply = () => activeRequest.emit("json-reply", aPacket); + let emitReply = () => activeRequest.emit("json-reply", packet); if (activeRequest.stack) { callFunctionWithAsyncStack(emitReply, activeRequest.stack, "DevTools RDP"); @@ -1054,7 +1059,7 @@ DebuggerClient.prototype = { * that is copied. See stream-utils.js. */ onBulkPacket: function (packet) { - let { actor, type, length } = packet; + let { actor } = packet; if (!actor) { DevToolsUtils.reportException( @@ -1084,7 +1089,7 @@ DebuggerClient.prototype = { /** * Called by DebuggerTransport when the underlying stream is closed. * - * @param aStatus nsresult + * @param status nsresult * The status code that corresponds to the reason for closing * the stream. */ @@ -1280,7 +1285,9 @@ DebuggerClient.prototype = { poolFor: function (actorID) { for (let pool of this._pools) { - if (pool.has(actorID)) return pool; + if (pool.has(actorID)) { + return pool; + } } return null; }, @@ -1315,7 +1322,9 @@ Request.prototype = { events.emit(this, type, ...args); }, - get actor() { return this.request.to || this.request.actor; } + get actor() { + return this.request.to || this.request.actor; + } }; @@ -1324,76 +1333,80 @@ Request.prototype = { * is a front to the tab actor created in the server side, hiding the protocol * details in a traditional JavaScript API. * - * @param aClient DebuggerClient + * @param client DebuggerClient * The debugger client parent. - * @param aForm object + * @param form object * The protocol form for this tab. */ -function TabClient(aClient, aForm) { - this.client = aClient; - this._actor = aForm.from; - this._threadActor = aForm.threadActor; - this.javascriptEnabled = aForm.javascriptEnabled; - this.cacheDisabled = aForm.cacheDisabled; +function TabClient(client, form) { + this.client = client; + this._actor = form.from; + this._threadActor = form.threadActor; + this.javascriptEnabled = form.javascriptEnabled; + this.cacheDisabled = form.cacheDisabled; this.thread = null; this.request = this.client.request; - this.traits = aForm.traits || {}; + this.traits = form.traits || {}; this.events = ["workerListChanged"]; } TabClient.prototype = { - get actor() { return this._actor; }, - get _transport() { return this.client._transport; }, + get actor() { + return this._actor; + }, + get _transport() { + return this.client._transport; + }, /** * Attach to a thread actor. * - * @param object aOptions + * @param object options * Configuration options. * - useSourceMaps: whether to use source maps or not. - * @param function aOnResponse + * @param function onResponse * Called with the response packet and a ThreadClient * (which will be undefined on error). */ - attachThread: function (aOptions = {}, aOnResponse = noop) { + attachThread: function (options = {}, onResponse = noop) { if (this.thread) { - DevToolsUtils.executeSoon(() => aOnResponse({}, this.thread)); + DevToolsUtils.executeSoon(() => onResponse({}, this.thread)); return promise.resolve([{}, this.thread]); } let packet = { to: this._threadActor, type: "attach", - options: aOptions + options, }; - return this.request(packet).then(aResponse => { - if (!aResponse.error) { + return this.request(packet).then(response => { + if (!response.error) { this.thread = new ThreadClient(this, this._threadActor); this.client.registerClient(this.thread); } - aOnResponse(aResponse, this.thread); - return [aResponse, this.thread]; + onResponse(response, this.thread); + return [response, this.thread]; }); }, /** * Detach the client from the tab actor. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ detach: DebuggerClient.requester({ type: "detach" }, { - before: function (aPacket) { + before: function (packet) { if (this.thread) { this.thread.detach(); } - return aPacket; + return packet; }, - after: function (aResponse) { + after: function (response) { this.client.unregisterClient(this); - return aResponse; + return response; }, }), @@ -1416,7 +1429,7 @@ TabClient.prototype = { }, _reload: DebuggerClient.requester({ type: "reload", - options: args(0) + options: arg(0) }), /** @@ -1427,28 +1440,28 @@ TabClient.prototype = { */ navigateTo: DebuggerClient.requester({ type: "navigateTo", - url: args(0) + url: arg(0) }), /** * Reconfigure the tab actor. * - * @param object aOptions + * @param object options * A dictionary object of the new options to use in the tab actor. - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ reconfigure: DebuggerClient.requester({ type: "reconfigure", - options: args(0) + options: arg(0) }), listWorkers: DebuggerClient.requester({ type: "listWorkers" }), - attachWorker: function (aWorkerActor, aOnResponse) { - this.client.attachWorker(aWorkerActor, aOnResponse); + attachWorker: function (workerActor, onResponse) { + this.client.attachWorker(workerActor, onResponse); }, /** @@ -1461,17 +1474,17 @@ TabClient.prototype = { */ resolveLocation: DebuggerClient.requester({ type: "resolveLocation", - location: args(0) + location: arg(0) }), }; eventSource(TabClient.prototype); -function WorkerClient(aClient, aForm) { - this.client = aClient; - this._actor = aForm.from; +function WorkerClient(client, form) { + this.client = client; + this._actor = form.from; this._isClosed = false; - this._url = aForm.url; + this._url = form.url; this._onClose = this._onClose.bind(this); @@ -1502,23 +1515,23 @@ WorkerClient.prototype = { }, detach: DebuggerClient.requester({ type: "detach" }, { - after: function (aResponse) { + after: function (response) { if (this.thread) { this.client.unregisterClient(this.thread); } this.client.unregisterClient(this); - return aResponse; + return response; }, }), - attachThread: function (aOptions = {}, aOnResponse = noop) { + attachThread: function (options = {}, onResponse = noop) { if (this.thread) { let response = [{ type: "connected", threadActor: this.thread._actor, consoleActor: this.consoleActor, }, this.thread]; - DevToolsUtils.executeSoon(() => aOnResponse(response)); + DevToolsUtils.executeSoon(() => onResponse(response)); return response; } @@ -1526,31 +1539,31 @@ WorkerClient.prototype = { return this.request({ to: this._actor, type: "connect", - options: aOptions, - }).then(connectReponse => { - if (connectReponse.error) { - aOnResponse(connectReponse, null); + options, + }).then(connectResponse => { + if (connectResponse.error) { + onResponse(connectResponse, null); return [connectResponse, null]; } return this.request({ - to: connectReponse.threadActor, + to: connectResponse.threadActor, type: "attach", - options: aOptions + options, }).then(attachResponse => { if (attachResponse.error) { - aOnResponse(attachResponse, null); + onResponse(attachResponse, null); } - this.thread = new ThreadClient(this, connectReponse.threadActor); - this.consoleActor = connectReponse.consoleActor; + this.thread = new ThreadClient(this, connectResponse.threadActor); + this.consoleActor = connectResponse.consoleActor; this.client.registerClient(this.thread); - aOnResponse(connectReponse, this.thread); + onResponse(connectResponse, this.thread); return [connectResponse, this.thread]; }); }, error => { - aOnResponse(error, null); + onResponse(error, null); }); }, @@ -1573,32 +1586,36 @@ WorkerClient.prototype = { eventSource(WorkerClient.prototype); -function AddonClient(aClient, aActor) { - this._client = aClient; - this._actor = aActor; +function AddonClient(client, actor) { + this._client = client; + this._actor = actor; this.request = this._client.request; this.events = []; } AddonClient.prototype = { - get actor() { return this._actor; }, - get _transport() { return this._client._transport; }, + get actor() { + return this._actor; + }, + get _transport() { + return this._client._transport; + }, /** * Detach the client from the addon actor. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ detach: DebuggerClient.requester({ type: "detach" }, { - after: function (aResponse) { + after: function (response) { if (this._client.activeAddon === this) { this._client.activeAddon = null; } this._client.unregisterClient(this); - return aResponse; + return response; }, }) }; @@ -1609,9 +1626,9 @@ AddonClient.prototype = { * for the initial connection; DebuggerClient's 'listTabs' and * 'listChildProcesses' methods forward to that root actor. * - * @param aClient object + * @param client object * The client connection to which this actor belongs. - * @param aGreeting string + * @param greeting string * The greeting packet from the root actor we're to represent. * * Properties of a RootClient instance: @@ -1623,11 +1640,11 @@ AddonClient.prototype = { * @property traits object * The traits object, as given in the root actor's greeting packet. */ -function RootClient(aClient, aGreeting) { - this._client = aClient; - this.actor = aGreeting.from; - this.applicationType = aGreeting.applicationType; - this.traits = aGreeting.traits; +function RootClient(client, greeting) { + this._client = client; + this.actor = greeting.from; + this.applicationType = greeting.applicationType; + this.traits = greeting.traits; } exports.RootClient = RootClient; @@ -1637,7 +1654,7 @@ RootClient.prototype = { /** * List the open tabs. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ listTabs: DebuggerClient.requester({ type: "listTabs" }), @@ -1645,7 +1662,7 @@ RootClient.prototype = { /** * List the installed addons. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ listAddons: DebuggerClient.requester({ type: "listAddons" }), @@ -1653,7 +1670,7 @@ RootClient.prototype = { /** * List the registered workers. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ listWorkers: DebuggerClient.requester({ type: "listWorkers" }), @@ -1661,7 +1678,7 @@ RootClient.prototype = { /** * List the registered service workers. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ listServiceWorkerRegistrations: DebuggerClient.requester({ @@ -1671,7 +1688,7 @@ RootClient.prototype = { /** * List the running processes. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ listProcesses: DebuggerClient.requester({ type: "listProcesses" }), @@ -1680,7 +1697,7 @@ RootClient.prototype = { * Fetch the TabActor for the currently selected tab, or for a specific * tab given as first parameter. * - * @param [optional] object aFilter + * @param [optional] object filter * A dictionary object with following optional attributes: * - outerWindowID: used to match tabs in parent process * - tabId: used to match tabs in child processes @@ -1688,19 +1705,19 @@ RootClient.prototype = { * If nothing is specified, returns the actor for the currently * selected tab. */ - getTab: function (aFilter) { + getTab: function (filter) { let packet = { to: this.actor, type: "getTab" }; - if (aFilter) { - if (typeof (aFilter.outerWindowID) == "number") { - packet.outerWindowID = aFilter.outerWindowID; - } else if (typeof (aFilter.tabId) == "number") { - packet.tabId = aFilter.tabId; - } else if ("tab" in aFilter) { - let browser = aFilter.tab.linkedBrowser; + if (filter) { + if (typeof (filter.outerWindowID) == "number") { + packet.outerWindowID = filter.outerWindowID; + } else if (typeof (filter.tabId) == "number") { + packet.tabId = filter.tabId; + } else if ("tab" in filter) { + let browser = filter.tab.linkedBrowser; if (browser.frameLoader.tabParent) { // Tabs in child process packet.tabId = browser.frameLoader.tabParent.tabId; @@ -1727,7 +1744,7 @@ RootClient.prototype = { /** * Description of protocol's actors and methods. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ protocolDescription: DebuggerClient.requester({ type: "protocolDescription" }), @@ -1736,8 +1753,12 @@ RootClient.prototype = { * Methods constructed by DebuggerClient.requester require these forwards * on their 'this'. */ - get _transport() { return this._client._transport; }, - get request() { return this._client.request; } + get _transport() { + return this._client._transport; + }, + get request() { + return this._client.request; + } }; /** @@ -1745,16 +1766,16 @@ RootClient.prototype = { * is a front to the thread actor created in the server side, hiding the * protocol details in a traditional JavaScript API. * - * @param aClient DebuggerClient|TabClient + * @param client DebuggerClient|TabClient * The parent of the thread (tab for tab-scoped debuggers, DebuggerClient * for chrome debuggers). - * @param aActor string + * @param actor string * The actor ID for this thread. */ -function ThreadClient(aClient, aActor) { - this._parent = aClient; - this.client = aClient instanceof DebuggerClient ? aClient : aClient.client; - this._actor = aActor; +function ThreadClient(client, actor) { + this._parent = client; + this.client = client instanceof DebuggerClient ? client : client.client; + this._actor = actor; this._frameCache = []; this._scriptCache = {}; this._pauseGrips = {}; @@ -1764,40 +1785,48 @@ function ThreadClient(aClient, aActor) { ThreadClient.prototype = { _state: "paused", - get state() { return this._state; }, - get paused() { return this._state === "paused"; }, + get state() { + return this._state; + }, + get paused() { + return this._state === "paused"; + }, _pauseOnExceptions: false, _ignoreCaughtExceptions: false, _pauseOnDOMEvents: null, _actor: null, - get actor() { return this._actor; }, + get actor() { + return this._actor; + }, - get _transport() { return this.client._transport; }, + get _transport() { + return this.client._transport; + }, - _assertPaused: function (aCommand) { + _assertPaused: function (command) { if (!this.paused) { - throw Error(aCommand + " command sent while not paused. Currently " + this._state); + throw Error(command + " command sent while not paused. Currently " + this._state); } }, /** - * Resume a paused thread. If the optional aLimit parameter is present, then + * Resume a paused thread. If the optional limit parameter is present, then * the thread will also pause when that limit is reached. * - * @param [optional] object aLimit + * @param [optional] object limit * An object with a type property set to the appropriate limit (next, * step, or finish) per the remote debugging protocol specification. * Use null to specify no limit. - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ _doResume: DebuggerClient.requester({ type: "resume", - resumeLimit: args(0) + resumeLimit: arg(0) }, { - before: function (aPacket) { + before: function (packet) { this._assertPaused("resume"); // Put the client in a tentative "resuming" state so we can prevent @@ -1806,150 +1835,152 @@ ThreadClient.prototype = { this._state = "resuming"; if (this._pauseOnExceptions) { - aPacket.pauseOnExceptions = this._pauseOnExceptions; + packet.pauseOnExceptions = this._pauseOnExceptions; } if (this._ignoreCaughtExceptions) { - aPacket.ignoreCaughtExceptions = this._ignoreCaughtExceptions; + packet.ignoreCaughtExceptions = this._ignoreCaughtExceptions; } if (this._pauseOnDOMEvents) { - aPacket.pauseOnDOMEvents = this._pauseOnDOMEvents; + packet.pauseOnDOMEvents = this._pauseOnDOMEvents; } - return aPacket; + return packet; }, - after: function (aResponse) { - if (aResponse.error && this._state == "resuming") { + after: function (response) { + if (response.error && this._state == "resuming") { // There was an error resuming, update the state to the new one // reported by the server, if given (only on wrongState), otherwise // reset back to the previous state. - if (aResponse.state) { - this._state = ThreadStateTypes[aResponse.state]; + if (response.state) { + this._state = ThreadStateTypes[response.state]; } else { this._state = this._previousState; } } delete this._previousState; - return aResponse; + return response; }, }), /** * Reconfigure the thread actor. * - * @param object aOptions + * @param object options * A dictionary object of the new options to use in the thread actor. - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ reconfigure: DebuggerClient.requester({ type: "reconfigure", - options: args(0) + options: arg(0) }), /** * Resume a paused thread. */ - resume: function (aOnResponse) { - return this._doResume(null, aOnResponse); + resume: function (onResponse) { + return this._doResume(null, onResponse); }, /** * Resume then pause without stepping. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ - resumeThenPause: function (aOnResponse) { - return this._doResume({ type: "break" }, aOnResponse); + resumeThenPause: function (onResponse) { + return this._doResume({ type: "break" }, onResponse); }, /** * Step over a function call. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ - stepOver: function (aOnResponse) { - return this._doResume({ type: "next" }, aOnResponse); + stepOver: function (onResponse) { + return this._doResume({ type: "next" }, onResponse); }, /** * Step into a function call. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ - stepIn: function (aOnResponse) { - return this._doResume({ type: "step" }, aOnResponse); + stepIn: function (onResponse) { + return this._doResume({ type: "step" }, onResponse); }, /** * Step out of a function call. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ - stepOut: function (aOnResponse) { - return this._doResume({ type: "finish" }, aOnResponse); + stepOut: function (onResponse) { + return this._doResume({ type: "finish" }, onResponse); }, /** * Immediately interrupt a running thread. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ - interrupt: function (aOnResponse) { - return this._doInterrupt(null, aOnResponse); + interrupt: function (onResponse) { + return this._doInterrupt(null, onResponse); }, /** * Pause execution right before the next JavaScript bytecode is executed. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ - breakOnNext: function (aOnResponse) { - return this._doInterrupt("onNext", aOnResponse); + breakOnNext: function (onResponse) { + return this._doInterrupt("onNext", onResponse); }, /** * Interrupt a running thread. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ _doInterrupt: DebuggerClient.requester({ type: "interrupt", - when: args(0) + when: arg(0) }), /** * Enable or disable pausing when an exception is thrown. * - * @param boolean aFlag + * @param boolean pauseOnExceptions * Enables pausing if true, disables otherwise. - * @param function aOnResponse + * @param boolean ignoreCaughtExceptions + * Whether to ignore caught exceptions + * @param function onResponse * Called with the response packet. */ - pauseOnExceptions: function (aPauseOnExceptions, - aIgnoreCaughtExceptions, - aOnResponse = noop) { - this._pauseOnExceptions = aPauseOnExceptions; - this._ignoreCaughtExceptions = aIgnoreCaughtExceptions; + pauseOnExceptions: function (pauseOnExceptions, + ignoreCaughtExceptions, + onResponse = noop) { + this._pauseOnExceptions = pauseOnExceptions; + this._ignoreCaughtExceptions = ignoreCaughtExceptions; // Otherwise send the flag using a standard resume request. if (!this.paused) { - return this.interrupt(aResponse => { - if (aResponse.error) { + return this.interrupt(response => { + if (response.error) { // Can't continue if pausing failed. - aOnResponse(aResponse); - return aResponse; + onResponse(response); + return response; } - return this.resume(aOnResponse); + return this.resume(onResponse); }); } - aOnResponse(); + onResponse(); return promise.resolve(); }, @@ -1988,48 +2019,48 @@ ThreadClient.prototype = { * Send a clientEvaluate packet to the debuggee. Response * will be a resume packet. * - * @param string aFrame + * @param string frame * The actor ID of the frame where the evaluation should take place. - * @param string aExpression + * @param string expression * The expression that will be evaluated in the scope of the frame * above. - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ eval: DebuggerClient.requester({ type: "clientEvaluate", - frame: args(0), - expression: args(1) + frame: arg(0), + expression: arg(1) }, { - before: function (aPacket) { + before: function (packet) { this._assertPaused("eval"); // Put the client in a tentative "resuming" state so we can prevent // further requests that should only be sent in the paused state. this._state = "resuming"; - return aPacket; + return packet; }, - after: function (aResponse) { - if (aResponse.error) { + after: function (response) { + if (response.error) { // There was an error resuming, back to paused state. this._state = "paused"; } - return aResponse; + return response; }, }), /** * Detach from the thread actor. * - * @param function aOnResponse + * @param function onResponse * Called with the response packet. */ detach: DebuggerClient.requester({ type: "detach" }, { - after: function (aResponse) { + after: function (response) { this.client.unregisterClient(this); this._parent.thread = null; - return aResponse; + return response; }, }), @@ -2043,7 +2074,7 @@ ThreadClient.prototype = { */ releaseMany: DebuggerClient.requester({ type: "releaseMany", - actors: args(0), + actors: arg(0), }), /** @@ -2054,13 +2085,13 @@ ThreadClient.prototype = { */ threadGrips: DebuggerClient.requester({ type: "threadGrips", - actors: args(0) + actors: arg(0) }), /** * Return the event listeners defined on the page. * - * @param aOnResponse Function + * @param onResponse Function * Called with the thread's response. */ eventListeners: DebuggerClient.requester({ @@ -2070,7 +2101,7 @@ ThreadClient.prototype = { /** * Request the loaded sources for the current thread. * - * @param aOnResponse Function + * @param onResponse Function * Called with the thread's response. */ getSources: DebuggerClient.requester({ @@ -2091,19 +2122,19 @@ ThreadClient.prototype = { /** * Request frames from the callstack for the current thread. * - * @param aStart integer + * @param start integer * The number of the youngest stack frame to return (the youngest * frame is 0). - * @param aCount integer + * @param count integer * The maximum number of frames to return, or null to return all * frames. - * @param aOnResponse function + * @param onResponse function * Called with the thread's response. */ getFrames: DebuggerClient.requester({ type: "frames", - start: args(0), - count: args(1) + start: arg(0), + count: arg(1) }), /** @@ -2111,7 +2142,9 @@ ThreadClient.prototype = { * framescleared event to keep up to date on changes to this cache, * and can fill it using the fillFrames method. */ - get cachedFrames() { return this._frameCache; }, + get cachedFrames() { + return this._frameCache; + }, /** * true if there are more stack frames available on the server. @@ -2122,34 +2155,34 @@ ThreadClient.prototype = { }, /** - * Ensure that at least aTotal stack frames have been loaded in the + * Ensure that at least total stack frames have been loaded in the * ThreadClient's stack frame cache. A framesadded event will be * sent when the stack frame cache is updated. * - * @param aTotal number + * @param total number * The minimum number of stack frames to be included. - * @param aCallback function + * @param callback function * Optional callback function called when frames have been loaded * @returns true if a framesadded notification should be expected. */ - fillFrames: function (aTotal, aCallback = noop) { + fillFrames: function (total, callback = noop) { this._assertPaused("fillFrames"); - if (this._frameCache.length >= aTotal) { + if (this._frameCache.length >= total) { return false; } let numFrames = this._frameCache.length; - this.getFrames(numFrames, aTotal - numFrames, (aResponse) => { - if (aResponse.error) { - aCallback(aResponse); + this.getFrames(numFrames, total - numFrames, (response) => { + if (response.error) { + callback(response); return; } let threadGrips = DevToolsUtils.values(this._threadGrips); - for (let i in aResponse.frames) { - let frame = aResponse.frames[i]; + for (let i in response.frames) { + let frame = response.frames[i]; if (!frame.where.source) { // Older servers use urls instead, so we need to resolve // them to source actors @@ -2167,7 +2200,7 @@ ThreadClient.prototype = { // frames available. this.emit("framesadded"); - aCallback(aResponse); + callback(response); }); return true; @@ -2187,16 +2220,16 @@ ThreadClient.prototype = { /** * Return a ObjectClient object for the given object grip. * - * @param aGrip object + * @param grip object * A pause-lifetime object grip returned by the protocol. */ - pauseGrip: function (aGrip) { - if (aGrip.actor in this._pauseGrips) { - return this._pauseGrips[aGrip.actor]; + pauseGrip: function (grip) { + if (grip.actor in this._pauseGrips) { + return this._pauseGrips[grip.actor]; } - let client = new ObjectClient(this.client, aGrip); - this._pauseGrips[aGrip.actor] = client; + let client = new ObjectClient(this.client, grip); + this._pauseGrips[grip.actor] = client; return client; }, @@ -2204,19 +2237,19 @@ ThreadClient.prototype = { * Get or create a long string client, checking the grip client cache if it * already exists. * - * @param aGrip Object + * @param grip Object * The long string grip returned by the protocol. - * @param aGripCacheName String + * @param gripCacheName String * The property name of the grip client cache to check for existing * clients in. */ - _longString: function (aGrip, aGripCacheName) { - if (aGrip.actor in this[aGripCacheName]) { - return this[aGripCacheName][aGrip.actor]; + _longString: function (grip, gripCacheName) { + if (grip.actor in this[gripCacheName]) { + return this[gripCacheName][grip.actor]; } - let client = new LongStringClient(this.client, aGrip); - this[aGripCacheName][aGrip.actor] = client; + let client = new LongStringClient(this.client, grip); + this[gripCacheName][grip.actor] = client; return client; }, @@ -2224,35 +2257,35 @@ ThreadClient.prototype = { * Return an instance of LongStringClient for the given long string grip that * is scoped to the current pause. * - * @param aGrip Object + * @param grip Object * The long string grip returned by the protocol. */ - pauseLongString: function (aGrip) { - return this._longString(aGrip, "_pauseGrips"); + pauseLongString: function (grip) { + return this._longString(grip, "_pauseGrips"); }, /** * Return an instance of LongStringClient for the given long string grip that * is scoped to the thread lifetime. * - * @param aGrip Object + * @param grip Object * The long string grip returned by the protocol. */ - threadLongString: function (aGrip) { - return this._longString(aGrip, "_threadGrips"); + threadLongString: function (grip) { + return this._longString(grip, "_threadGrips"); }, /** * Clear and invalidate all the grip clients from the given cache. * - * @param aGripCacheName + * @param gripCacheName * The property name of the grip cache we want to clear. */ - _clearObjectClients: function (aGripCacheName) { - for (let id in this[aGripCacheName]) { - this[aGripCacheName][id].valid = false; + _clearObjectClients: function (gripCacheName) { + for (let id in this[gripCacheName]) { + this[gripCacheName][id].valid = false; } - this[aGripCacheName] = {}; + this[gripCacheName] = {}; }, /** @@ -2275,16 +2308,16 @@ ThreadClient.prototype = { * Handle thread state change by doing necessary cleanup and notifying all * registered listeners. */ - _onThreadState: function (aPacket) { - this._state = ThreadStateTypes[aPacket.type]; + _onThreadState: function (packet) { + this._state = ThreadStateTypes[packet.type]; // The debugger UI may not be initialized yet so we want to keep // the packet around so it knows what to pause state to display // when it's initialized - this._lastPausePacket = aPacket.type === "resumed" ? null : aPacket; + this._lastPausePacket = packet.type === "resumed" ? null : packet; this._clearFrames(); this._clearPauseGrips(); - aPacket.type === ThreadStateTypes.detached && this._clearThreadGrips(); - this.client._eventsEnabled && this.emit(aPacket.type, aPacket); + packet.type === ThreadStateTypes.detached && this._clearThreadGrips(); + this.client._eventsEnabled && this.emit(packet.type, packet); }, getLastPausePacket: function () { @@ -2294,32 +2327,33 @@ ThreadClient.prototype = { /** * Return an EnvironmentClient instance for the given environment actor form. */ - environment: function (aForm) { - return new EnvironmentClient(this.client, aForm); + environment: function (form) { + return new EnvironmentClient(this.client, form); }, /** * Return an instance of SourceClient for the given source actor form. */ - source: function (aForm) { - if (aForm.actor in this._threadGrips) { - return this._threadGrips[aForm.actor]; + source: function (form) { + if (form.actor in this._threadGrips) { + return this._threadGrips[form.actor]; } - return this._threadGrips[aForm.actor] = new SourceClient(this, aForm); + this._threadGrips[form.actor] = new SourceClient(this, form); + return this._threadGrips[form.actor]; }, /** * Request the prototype and own properties of mutlipleObjects. * - * @param aOnResponse function + * @param onResponse function * Called with the request's response. * @param actors [string] * List of actor ID of the queried objects. */ getPrototypesAndProperties: DebuggerClient.requester({ type: "prototypesAndProperties", - actors: args(0) + actors: arg(0) }), events: ["newSource"] @@ -2333,14 +2367,14 @@ eventSource(ThreadClient.prototype); * server side, hiding the protocol details in a traditional * JavaScript API. * - * @param aClient DebuggerClient + * @param client DebuggerClient * The debugger client parent. - * @param aActor string + * @param actor string * The actor ID for this thread. */ -function TraceClient(aClient, aActor) { - this._client = aClient; - this._actor = aActor; +function TraceClient(client, actor) { + this._client = client; + this._actor = actor; this._activeTraces = new Set(); this._waitingPackets = new Map(); this._expectedPacket = 0; @@ -2349,10 +2383,16 @@ function TraceClient(aClient, aActor) { } TraceClient.prototype = { - get actor() { return this._actor; }, - get tracing() { return this._activeTraces.size > 0; }, + get actor() { + return this._actor; + }, + get tracing() { + return this._activeTraces.size > 0; + }, - get _transport() { return this._client._transport; }, + get _transport() { + return this._client._transport; + }, /** * Detach from the trace actor. @@ -2360,41 +2400,41 @@ TraceClient.prototype = { detach: DebuggerClient.requester({ type: "detach" }, { - after: function (aResponse) { + after: function (response) { this._client.unregisterClient(this); - return aResponse; + return response; }, }), /** * Start a new trace. * - * @param aTrace [string] + * @param trace [string] * An array of trace types to be recorded by the new trace. * - * @param aName string + * @param name string * The name of the new trace. * - * @param aOnResponse function + * @param onResponse function * Called with the request's response. */ startTrace: DebuggerClient.requester({ type: "startTrace", - name: args(1), - trace: args(0) + name: arg(1), + trace: arg(0) }, { - after: function (aResponse) { - if (aResponse.error) { - return aResponse; + after: function (response) { + if (response.error) { + return response; } if (!this.tracing) { this._waitingPackets.clear(); this._expectedPacket = 0; } - this._activeTraces.add(aResponse.name); + this._activeTraces.add(response.name); - return aResponse; + return response; }, }), @@ -2402,24 +2442,24 @@ TraceClient.prototype = { * End a trace. If a name is provided, stop the named * trace. Otherwise, stop the most recently started trace. * - * @param aName string + * @param name string * The name of the trace to stop. * - * @param aOnResponse function + * @param onResponse function * Called with the request's response. */ stopTrace: DebuggerClient.requester({ type: "stopTrace", - name: args(0) + name: arg(0) }, { - after: function (aResponse) { - if (aResponse.error) { - return aResponse; + after: function (response) { + if (response.error) { + return response; } - this._activeTraces.delete(aResponse.name); + this._activeTraces.delete(response.name); - return aResponse; + return response; }, }) }; @@ -2427,22 +2467,25 @@ TraceClient.prototype = { /** * Grip clients are used to retrieve information about the relevant object. * - * @param aClient DebuggerClient + * @param client DebuggerClient * The debugger client parent. - * @param aGrip object + * @param grip object * A pause-lifetime object grip returned by the protocol. */ -function ObjectClient(aClient, aGrip) -{ - this._grip = aGrip; - this._client = aClient; +function ObjectClient(client, grip) { + this._grip = grip; + this._client = client; this.request = this._client.request; } exports.ObjectClient = ObjectClient; ObjectClient.prototype = { - get actor() { return this._grip.actor; }, - get _transport() { return this._client._transport; }, + get actor() { + return this._grip.actor; + }, + get _transport() { + return this._client._transport; + }, valid: true, @@ -2459,18 +2502,18 @@ ObjectClient.prototype = { getDefinitionSite: DebuggerClient.requester({ type: "definitionSite" }, { - before: function (aPacket) { + before: function (packet) { if (this._grip.class != "Function") { throw new Error("getDefinitionSite is only valid for function grips."); } - return aPacket; + return packet; } }), /** * Request the names of a function's formal parameters. * - * @param aOnResponse function + * @param onResponse function * Called with an object of the form: * { parameterNames:[, ...] } * where each is the name of a parameter. @@ -2478,11 +2521,11 @@ ObjectClient.prototype = { getParameterNames: DebuggerClient.requester({ type: "parameterNames" }, { - before: function (aPacket) { - if (this._grip["class"] !== "Function") { + before: function (packet) { + if (this._grip.class !== "Function") { throw new Error("getParameterNames is only valid for function grips."); } - return aPacket; + return packet; }, }), @@ -2490,7 +2533,7 @@ ObjectClient.prototype = { * Request the names of the properties defined on the object and not its * prototype. * - * @param aOnResponse function Called with the request's response. + * @param onResponse function Called with the request's response. */ getOwnPropertyNames: DebuggerClient.requester({ type: "ownPropertyNames" @@ -2499,7 +2542,7 @@ ObjectClient.prototype = { /** * Request the prototype and own properties of the object. * - * @param aOnResponse function Called with the request's response. + * @param onResponse function Called with the request's response. */ getPrototypeAndProperties: DebuggerClient.requester({ type: "prototypeAndProperties" @@ -2521,17 +2564,17 @@ ObjectClient.prototype = { * - sort Boolean * If true, the iterator will sort the properties by name * before dispatching them. - * @param aOnResponse function Called with the client instance. + * @param onResponse function Called with the client instance. */ enumProperties: DebuggerClient.requester({ type: "enumProperties", - options: args(0) + options: arg(0) }, { - after: function (aResponse) { - if (aResponse.iterator) { - return { iterator: new PropertyIteratorClient(this._client, aResponse.iterator) }; + after: function (response) { + if (response.iterator) { + return { iterator: new PropertyIteratorClient(this._client, response.iterator) }; } - return aResponse; + return response; }, }), @@ -2539,7 +2582,7 @@ ObjectClient.prototype = { * Request a PropertyIteratorClient instance to enumerate entries in a * Map/Set-like object. * - * @param aOnResponse function Called with the request's response. + * @param onResponse function Called with the request's response. */ enumEntries: DebuggerClient.requester({ type: "enumEntries" @@ -2563,18 +2606,18 @@ ObjectClient.prototype = { /** * Request the property descriptor of the object's specified property. * - * @param aName string The name of the requested property. - * @param aOnResponse function Called with the request's response. + * @param name string The name of the requested property. + * @param onResponse function Called with the request's response. */ getProperty: DebuggerClient.requester({ type: "property", - name: args(0) + name: arg(0) }), /** * Request the prototype of the object. * - * @param aOnResponse function Called with the request's response. + * @param onResponse function Called with the request's response. */ getPrototype: DebuggerClient.requester({ type: "prototype" @@ -2583,7 +2626,7 @@ ObjectClient.prototype = { /** * Request the display string of the object. * - * @param aOnResponse function Called with the request's response. + * @param onResponse function Called with the request's response. */ getDisplayString: DebuggerClient.requester({ type: "displayString" @@ -2592,16 +2635,16 @@ ObjectClient.prototype = { /** * Request the scope of the object. * - * @param aOnResponse function Called with the request's response. + * @param onResponse function Called with the request's response. */ getScope: DebuggerClient.requester({ type: "scope" }, { - before: function (aPacket) { + before: function (packet) { if (this._grip.class !== "Function") { throw new Error("scope is only valid for function grips."); } - return aPacket; + return packet; }, }), @@ -2611,12 +2654,12 @@ ObjectClient.prototype = { getDependentPromises: DebuggerClient.requester({ type: "dependentPromises" }, { - before: function (aPacket) { + before: function (packet) { if (this._grip.class !== "Promise") { throw new Error("getDependentPromises is only valid for promise " + "grips."); } - return aPacket; + return packet; } }), @@ -2626,11 +2669,11 @@ ObjectClient.prototype = { getPromiseAllocationStack: DebuggerClient.requester({ type: "allocationStack" }, { - before: function (aPacket) { + before: function (packet) { if (this._grip.class !== "Promise") { throw new Error("getAllocationStack is only valid for promise grips."); } - return aPacket; + return packet; } }), @@ -2672,25 +2715,29 @@ ObjectClient.prototype = { * this is controled while creating the PropertyIteratorClient * from ObjectClient.enumProperties. * - * @param aClient DebuggerClient + * @param client DebuggerClient * The debugger client parent. - * @param aGrip Object + * @param grip Object * A PropertyIteratorActor grip returned by the protocol via * TabActor.enumProperties request. */ -function PropertyIteratorClient(aClient, aGrip) { - this._grip = aGrip; - this._client = aClient; +function PropertyIteratorClient(client, grip) { + this._grip = grip; + this._client = client; this.request = this._client.request; } PropertyIteratorClient.prototype = { - get actor() { return this._grip.actor; }, + get actor() { + return this._grip.actor; + }, /** * Get the total number of properties available in the iterator. */ - get count() { return this._grip.count; }, + get count() { + return this._grip.count; + }, /** * Get one or more property names that correspond to the positions in the @@ -2698,12 +2745,12 @@ PropertyIteratorClient.prototype = { * * @param indexes Array * An array of property indexes. - * @param aCallback Function + * @param callback Function * The function called when we receive the property names. */ names: DebuggerClient.requester({ type: "names", - indexes: args(0) + indexes: arg(0) }, {}), /** @@ -2713,19 +2760,19 @@ PropertyIteratorClient.prototype = { * The index of the first property to fetch. * @param count Number * The number of properties to fetch. - * @param aCallback Function + * @param callback Function * The function called when we receive the property values. */ slice: DebuggerClient.requester({ type: "slice", - start: args(0), - count: args(1) + start: arg(0), + count: arg(1) }, {}), /** * Get all the property values. * - * @param aCallback Function + * @param callback Function * The function called when we receive the property values. */ all: DebuggerClient.requester({ @@ -2737,57 +2784,65 @@ PropertyIteratorClient.prototype = { * A LongStringClient provides a way to access "very long" strings from the * debugger server. * - * @param aClient DebuggerClient + * @param client DebuggerClient * The debugger client parent. - * @param aGrip Object + * @param grip Object * A pause-lifetime long string grip returned by the protocol. */ -function LongStringClient(aClient, aGrip) { - this._grip = aGrip; - this._client = aClient; +function LongStringClient(client, grip) { + this._grip = grip; + this._client = client; this.request = this._client.request; } exports.LongStringClient = LongStringClient; LongStringClient.prototype = { - get actor() { return this._grip.actor; }, - get length() { return this._grip.length; }, - get initial() { return this._grip.initial; }, - get _transport() { return this._client._transport; }, + get actor() { + return this._grip.actor; + }, + get length() { + return this._grip.length; + }, + get initial() { + return this._grip.initial; + }, + get _transport() { + return this._client._transport; + }, valid: true, /** - * Get the substring of this LongString from aStart to aEnd. + * Get the substring of this LongString from start to end. * - * @param aStart Number + * @param start Number * The starting index. - * @param aEnd Number + * @param end Number * The ending index. - * @param aCallback Function + * @param callback Function * The function called when we receive the substring. */ substring: DebuggerClient.requester({ type: "substring", - start: args(0), - end: args(1) + start: arg(0), + end: arg(1) }), }; /** * A SourceClient provides a way to access the source text of a script. * - * @param aClient ThreadClient + * @param client ThreadClient * The thread client parent. - * @param aForm Object + * @param form Object * The form sent across the remote debugging protocol. */ -function SourceClient(aClient, aForm) { - this._form = aForm; - this._isBlackBoxed = aForm.isBlackBoxed; - this._isPrettyPrinted = aForm.isPrettyPrinted; - this._activeThread = aClient; - this._client = aClient.client; +function SourceClient(client, form) { + this._form = form; + this._isBlackBoxed = form.isBlackBoxed; + this._isPrettyPrinted = form.isPrettyPrinted; + this._activeThread = client; + this._client = client.client; } SourceClient.prototype = { @@ -2813,47 +2868,47 @@ SourceClient.prototype = { /** * Black box this SourceClient's source. * - * @param aCallback Function + * @param callback Function * The callback function called when we receive the response from the server. */ blackBox: DebuggerClient.requester({ type: "blackbox" }, { - after: function (aResponse) { - if (!aResponse.error) { + after: function (response) { + if (!response.error) { this._isBlackBoxed = true; if (this._activeThread) { this._activeThread.emit("blackboxchange", this); } } - return aResponse; + return response; } }), /** * Un-black box this SourceClient's source. * - * @param aCallback Function + * @param callback Function * The callback function called when we receive the response from the server. */ unblackBox: DebuggerClient.requester({ type: "unblackbox" }, { - after: function (aResponse) { - if (!aResponse.error) { + after: function (response) { + if (!response.error) { this._isBlackBoxed = false; if (this._activeThread) { this._activeThread.emit("blackboxchange", this); } } - return aResponse; + return response; } }), /** * Get Executable Lines from a source * - * @param aCallback Function + * @param callback Function * The callback function called when we receive the response from the server. */ getExecutableLines: function (cb = noop) { @@ -2871,105 +2926,105 @@ SourceClient.prototype = { /** * Get a long string grip for this SourceClient's source. */ - source: function (aCallback = noop) { + source: function (callback = noop) { let packet = { to: this._form.actor, type: "source" }; - return this._client.request(packet).then(aResponse => { - return this._onSourceResponse(aResponse, aCallback); + return this._client.request(packet).then(response => { + return this._onSourceResponse(response, callback); }); }, /** * Pretty print this source's text. */ - prettyPrint: function (aIndent, aCallback = noop) { + prettyPrint: function (indent, callback = noop) { const packet = { to: this._form.actor, type: "prettyPrint", - indent: aIndent + indent }; - return this._client.request(packet).then(aResponse => { - if (!aResponse.error) { + return this._client.request(packet).then(response => { + if (!response.error) { this._isPrettyPrinted = true; this._activeThread._clearFrames(); this._activeThread.emit("prettyprintchange", this); } - return this._onSourceResponse(aResponse, aCallback); + return this._onSourceResponse(response, callback); }); }, /** * Stop pretty printing this source's text. */ - disablePrettyPrint: function (aCallback = noop) { + disablePrettyPrint: function (callback = noop) { const packet = { to: this._form.actor, type: "disablePrettyPrint" }; - return this._client.request(packet).then(aResponse => { - if (!aResponse.error) { + return this._client.request(packet).then(response => { + if (!response.error) { this._isPrettyPrinted = false; this._activeThread._clearFrames(); this._activeThread.emit("prettyprintchange", this); } - return this._onSourceResponse(aResponse, aCallback); + return this._onSourceResponse(response, callback); }); }, - _onSourceResponse: function (aResponse, aCallback) { - if (aResponse.error) { - aCallback(aResponse); - return aResponse; + _onSourceResponse: function (response, callback) { + if (response.error) { + callback(response); + return response; } - if (typeof aResponse.source === "string") { - aCallback(aResponse); - return aResponse; + if (typeof response.source === "string") { + callback(response); + return response; } - let { contentType, source } = aResponse; + let { contentType, source } = response; let longString = this._activeThread.threadLongString(source); - return longString.substring(0, longString.length).then(function (aResponse) { - if (aResponse.error) { - aCallback(aResponse); - return aReponse; + return longString.substring(0, longString.length).then(function (resp) { + if (resp.error) { + callback(resp); + return resp; } - let response = { - source: aResponse.substring, + let newResponse = { + source: resp.substring, contentType: contentType }; - aCallback(response); - return response; + callback(newResponse); + return newResponse; }); }, /** * Request to set a breakpoint in the specified location. * - * @param object aLocation + * @param object location * The location and condition of the breakpoint in * the form of { line[, column, condition] }. - * @param function aOnResponse + * @param function onResponse * Called with the thread's response. */ - setBreakpoint: function ({ line, column, condition, noSliding }, aOnResponse = noop) { + setBreakpoint: function ({ line, column, condition, noSliding }, onResponse = noop) { // A helper function that sets the breakpoint. - let doSetBreakpoint = aCallback => { + let doSetBreakpoint = callback => { let root = this._client.mainRoot; let location = { - line: line, - column: column + line, + column, }; let packet = { to: this.actor, type: "setBreakpoint", - location: location, - condition: condition, - noSliding: noSliding + location, + condition, + noSliding, }; // Backwards compatibility: send the breakpoint request to the @@ -2979,24 +3034,24 @@ SourceClient.prototype = { packet.location.url = this.url; } - return this._client.request(packet).then(aResponse => { + return this._client.request(packet).then(response => { // Ignoring errors, since the user may be setting a breakpoint in a // dead script that will reappear on a page reload. let bpClient; - if (aResponse.actor) { + if (response.actor) { bpClient = new BreakpointClient( this._client, this, - aResponse.actor, + response.actor, location, root.traits.conditionalBreakpoints ? condition : undefined ); } - aOnResponse(aResponse, bpClient); - if (aCallback) { - aCallback(); + onResponse(response, bpClient); + if (callback) { + callback(); } - return [aResponse, bpClient]; + return [response, bpClient]; }); }; @@ -3005,14 +3060,14 @@ SourceClient.prototype = { return doSetBreakpoint(); } // Otherwise, force a pause in order to set the breakpoint. - return this._activeThread.interrupt().then(aResponse => { - if (aResponse.error) { + return this._activeThread.interrupt().then(response => { + if (response.error) { // Can't set the breakpoint if pausing failed. - aOnResponse(aResponse); - return aResponse; + onResponse(response); + return response; } - const { type, why } = aResponse; + const { type, why } = response; const cleanUp = type == "paused" && why.type == "interrupted" ? () => this._activeThread.resume() : noop; @@ -3025,38 +3080,42 @@ SourceClient.prototype = { /** * Breakpoint clients are used to remove breakpoints that are no longer used. * - * @param aClient DebuggerClient + * @param client DebuggerClient * The debugger client parent. - * @param aSourceClient SourceClient + * @param sourceClient SourceClient * The source where this breakpoint exists - * @param aActor string + * @param actor string * The actor ID for this breakpoint. - * @param aLocation object + * @param location object * The location of the breakpoint. This is an object with two properties: * url and line. - * @param aCondition string + * @param condition string * The conditional expression of the breakpoint */ -function BreakpointClient(aClient, aSourceClient, aActor, aLocation, aCondition) { - this._client = aClient; - this._actor = aActor; - this.location = aLocation; - this.location.actor = aSourceClient.actor; - this.location.url = aSourceClient.url; - this.source = aSourceClient; +function BreakpointClient(client, sourceClient, actor, location, condition) { + this._client = client; + this._actor = actor; + this.location = location; + this.location.actor = sourceClient.actor; + this.location.url = sourceClient.url; + this.source = sourceClient; this.request = this._client.request; // The condition property should only exist if it's a truthy value - if (aCondition) { - this.condition = aCondition; + if (condition) { + this.condition = condition; } } BreakpointClient.prototype = { _actor: null, - get actor() { return this._actor; }, - get _transport() { return this._client._transport; }, + get actor() { + return this._actor; + }, + get _transport() { + return this._client._transport; + }, /** * Remove the breakpoint from the server. @@ -3074,9 +3133,8 @@ BreakpointClient.prototype = { // conditional breakpoints if (root.traits.conditionalBreakpoints) { return "condition" in this; - } else { - return "conditionalExpression" in this; } + return "conditionalExpression" in this; }, /** @@ -3090,15 +3148,14 @@ BreakpointClient.prototype = { let root = this._client.mainRoot; if (root.traits.conditionalBreakpoints) { return this.condition; - } else { - return this.conditionalExpression; } + return this.conditionalExpression; }, /** * Set the condition of this breakpoint */ - setCondition: function (gThreadClient, aCondition) { + setCondition: function (gThreadClient, condition) { let root = this._client.mainRoot; let deferred = promise.defer(); @@ -3106,32 +3163,31 @@ BreakpointClient.prototype = { let info = { line: this.location.line, column: this.location.column, - condition: aCondition + condition: condition }; // Remove the current breakpoint and add a new one with the // condition. - this.remove(aResponse => { - if (aResponse && aResponse.error) { - deferred.reject(aResponse); + this.remove(response => { + if (response && response.error) { + deferred.reject(response); return; } - this.source.setBreakpoint(info, (aResponse, aNewBreakpoint) => { - if (aResponse && aResponse.error) { - deferred.reject(aResponse); + this.source.setBreakpoint(info, (resp, newBreakpoint) => { + if (resp && resp.error) { + deferred.reject(resp); } else { - deferred.resolve(aNewBreakpoint); + deferred.resolve(newBreakpoint); } }); }); } else { // The property shouldn't even exist if the condition is blank - if (aCondition === "") { + if (condition === "") { delete this.conditionalExpression; - } - else { - this.conditionalExpression = aCondition; + } else { + this.conditionalExpression = condition; } deferred.resolve(this); } @@ -3145,14 +3201,14 @@ eventSource(BreakpointClient.prototype); /** * Environment clients are used to manipulate the lexical environment actors. * - * @param aClient DebuggerClient + * @param client DebuggerClient * The debugger client parent. - * @param aForm Object + * @param form Object * The form sent across the remote debugging protocol. */ -function EnvironmentClient(aClient, aForm) { - this._client = aClient; - this._form = aForm; +function EnvironmentClient(client, form) { + this._client = client; + this._form = form; this.request = this._client.request; } exports.EnvironmentClient = EnvironmentClient; @@ -3162,7 +3218,9 @@ EnvironmentClient.prototype = { get actor() { return this._form.actor; }, - get _transport() { return this._client._transport; }, + get _transport() { + return this._client._transport; + }, /** * Fetches the bindings introduced by this lexical environment. @@ -3177,8 +3235,8 @@ EnvironmentClient.prototype = { */ assign: DebuggerClient.requester({ type: "assign", - name: args(0), - value: args(1) + name: arg(0), + value: arg(1) }) }; diff --git a/devtools/shared/discovery/discovery.js b/devtools/shared/discovery/discovery.js index d0b49f1290cd..a07f21d445e7 100644 --- a/devtools/shared/discovery/discovery.js +++ b/devtools/shared/discovery/discovery.js @@ -47,8 +47,8 @@ const REPLY_TIMEOUT = 5000; const { XPCOMUtils } = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {}); XPCOMUtils.defineLazyGetter(this, "converter", () => { - let conv = Cc["@mozilla.org/intl/scriptableunicodeconverter"]. - createInstance(Ci.nsIScriptableUnicodeConverter); + let conv = Cc["@mozilla.org/intl/scriptableunicodeconverter"] + .createInstance(Ci.nsIScriptableUnicodeConverter); conv.charset = "utf8"; return conv; }); @@ -77,7 +77,8 @@ function log(msg) { function Transport(port) { EventEmitter.decorate(this); try { - this.socket = new UDPSocket(port, false, Services.scriptSecurityManager.getSystemPrincipal()); + this.socket = new UDPSocket(port, false, + Services.scriptSecurityManager.getSystemPrincipal()); this.socket.joinMulticast(ADDRESS); this.socket.asyncListen(this); } catch (e) { @@ -146,7 +147,8 @@ function LocalDevice() { Cc["@mozilla.org/settingsService;1"].getService(Ci.nsISettingsService); Services.obs.addObserver(this, "mozsettings-changed", false); } - this._get(); // Trigger |_get| to load name eagerly + // Trigger |_get| to load name eagerly + this._get(); } LocalDevice.SETTING = "devtools.discovery.device"; @@ -344,7 +346,8 @@ Discovery.prototype = { _startListeningForScan: function () { if (this._transports.scan) { - return; // Already listening + // Already listening + return; } log("LISTEN FOR SCAN"); this._transports.scan = new this.Transport(SCAN_PORT); @@ -353,7 +356,8 @@ Discovery.prototype = { _stopListeningForScan: function () { if (!this._transports.scan) { - return; // Not listening + // Not listening + return; } this._transports.scan.off("message", this._onRemoteScan); this._transports.scan.destroy(); @@ -362,7 +366,8 @@ Discovery.prototype = { _startListeningForUpdate: function () { if (this._transports.update) { - return; // Already listening + // Already listening + return; } log("LISTEN FOR UPDATE"); this._transports.update = new this.Transport(UPDATE_PORT); @@ -371,7 +376,8 @@ Discovery.prototype = { _stopListeningForUpdate: function () { if (!this._transports.update) { - return; // Not listening + // Not listening + return; } this._transports.update.off("message", this._onRemoteUpdate); this._transports.update.destroy(); diff --git a/devtools/shared/discovery/tests/unit/.eslintrc.js b/devtools/shared/discovery/tests/unit/.eslintrc.js new file mode 100644 index 000000000000..f21b71f67ad0 --- /dev/null +++ b/devtools/shared/discovery/tests/unit/.eslintrc.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + // Extend from the shared list of defined globals for mochitests. + "extends": "../../../../.eslintrc.xpcshell.js" +}; \ No newline at end of file diff --git a/devtools/shared/discovery/tests/unit/test_discovery.js b/devtools/shared/discovery/tests/unit/test_discovery.js index c31340b08966..56b0bc1e7c94 100644 --- a/devtools/shared/discovery/tests/unit/test_discovery.js +++ b/devtools/shared/discovery/tests/unit/test_discovery.js @@ -8,7 +8,6 @@ var Cu = Components.utils; const { require } = Cu.import("resource://devtools/shared/Loader.jsm", {}); const Services = require("Services"); -const promise = require("promise"); const defer = require("devtools/shared/defer"); const EventEmitter = require("devtools/shared/event-emitter"); const discovery = require("devtools/shared/discovery/discovery"); diff --git a/devtools/shared/performance/recording-common.js b/devtools/shared/performance/recording-common.js index d0826bd1881e..8aa6440e4ee1 100644 --- a/devtools/shared/performance/recording-common.js +++ b/devtools/shared/performance/recording-common.js @@ -9,7 +9,7 @@ * and LegacyPerformanceRecording for helper methods to access data. */ -const PerformanceRecordingCommon = exports.PerformanceRecordingCommon = { +exports.PerformanceRecordingCommon = { // Private fields, only needed when a recording is started or stopped. _console: false, _imported: false, @@ -35,18 +35,32 @@ const PerformanceRecordingCommon = exports.PerformanceRecordingCommon = { * Helper methods for returning the status of the recording. * These methods should be consistent on both the front and actor. */ - isRecording: function () { return this._recording; }, - isCompleted: function () { return this._completed || this.isImported(); }, - isFinalizing: function () { return !this.isRecording() && !this.isCompleted(); }, - isConsole: function () { return this._console; }, - isImported: function () { return this._imported; }, + isRecording: function () { + return this._recording; + }, + isCompleted: function () { + return this._completed || this.isImported(); + }, + isFinalizing: function () { + return !this.isRecording() && !this.isCompleted(); + }, + isConsole: function () { + return this._console; + }, + isImported: function () { + return this._imported; + }, /** * Helper methods for returning configuration for the recording. * These methods should be consistent on both the front and actor. */ - getConfiguration: function () { return this._configuration; }, - getLabel: function () { return this._label; }, + getConfiguration: function () { + return this._configuration; + }, + getLabel: function () { + return this._label; + }, /** * Gets duration of this recording, in milliseconds. @@ -59,25 +73,43 @@ const PerformanceRecordingCommon = exports.PerformanceRecordingCommon = { // the duration from the profiler; if between recording and being finalized, // use the last estimated duration. if (this.isRecording()) { - return this._estimatedDuration = Date.now() - this._localStartTime; - } else { - return this._duration || this._estimatedDuration || 0; + this._estimatedDuration = Date.now() - this._localStartTime; + return this._estimatedDuration; } + return this._duration || this._estimatedDuration || 0; }, /** * Helper methods for returning recording data. * These methods should be consistent on both the front and actor. */ - getMarkers: function () { return this._markers; }, - getFrames: function () { return this._frames; }, - getMemory: function () { return this._memory; }, - getTicks: function () { return this._ticks; }, - getAllocations: function () { return this._allocations; }, - getProfile: function () { return this._profile; }, - getHostSystemInfo: function () { return this._systemHost; }, - getClientSystemInfo: function () { return this._systemClient; }, - getStartingBufferStatus: function () { return this._startingBufferStatus; }, + getMarkers: function () { + return this._markers; + }, + getFrames: function () { + return this._frames; + }, + getMemory: function () { + return this._memory; + }, + getTicks: function () { + return this._ticks; + }, + getAllocations: function () { + return this._allocations; + }, + getProfile: function () { + return this._profile; + }, + getHostSystemInfo: function () { + return this._systemHost; + }, + getClientSystemInfo: function () { + return this._systemClient; + }, + getStartingBufferStatus: function () { + return this._startingBufferStatus; + }, getAllData: function () { let label = this.getLabel(); @@ -92,6 +124,18 @@ const PerformanceRecordingCommon = exports.PerformanceRecordingCommon = { let systemHost = this.getHostSystemInfo(); let systemClient = this.getClientSystemInfo(); - return { label, duration, markers, frames, memory, ticks, allocations, profile, configuration, systemHost, systemClient }; + return { + label, + duration, + markers, + frames, + memory, + ticks, + allocations, + profile, + configuration, + systemHost, + systemClient + }; }, }; diff --git a/devtools/shared/performance/recording-utils.js b/devtools/shared/performance/recording-utils.js index 64ed12c71f1c..3b9c4cbca0fd 100644 --- a/devtools/shared/performance/recording-utils.js +++ b/devtools/shared/performance/recording-utils.js @@ -3,7 +3,6 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; -const { Cc, Ci, Cu, Cr } = require("chrome"); loader.lazyRequireGetter(this, "extend", "sdk/util/object", true); @@ -16,7 +15,8 @@ function mapRecordingOptions(type, options) { if (type === "profiler") { return { entries: options.bufferSize, - interval: options.sampleFrequency ? (1000 / (options.sampleFrequency * 1000)) : void 0 + interval: options.sampleFrequency ? (1000 / (options.sampleFrequency * 1000)) + : void 0 }; } @@ -568,7 +568,8 @@ UniqueStacks.prototype.getOrAddFrameIndex = function (frame) { let implementationIndex = this.getOrAddStringIndex(frame.implementation); // Super dumb. - let hash = `${locationIndex} ${implementationIndex || ""} ${frame.line || ""} ${frame.category || ""}`; + let hash = `${locationIndex} ${implementationIndex || ""} ` + + `${frame.line || ""} ${frame.category || ""}`; let index = frameHash[hash]; if (index !== undefined) { diff --git a/devtools/shared/performance/test/.eslintrc.js b/devtools/shared/performance/test/.eslintrc.js new file mode 100644 index 000000000000..90ed7706421b --- /dev/null +++ b/devtools/shared/performance/test/.eslintrc.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + // Extend from the shared list of defined globals for mochitests. + "extends": "../../../.eslintrc.xpcshell.js" +}; \ No newline at end of file diff --git a/devtools/shared/performance/test/head.js b/devtools/shared/performance/test/head.js index 9e7748055723..414831c96443 100644 --- a/devtools/shared/performance/test/head.js +++ b/devtools/shared/performance/test/head.js @@ -1,7 +1,10 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ + +/* exported require */ + "use strict"; -var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; +var { utils: Cu } = Components; var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {}); diff --git a/devtools/shared/performance/test/test_perf-utils-allocations-to-samples.js b/devtools/shared/performance/test/test_perf-utils-allocations-to-samples.js index 6429eff2d434..141395652275 100644 --- a/devtools/shared/performance/test/test_perf-utils-allocations-to-samples.js +++ b/devtools/shared/performance/test/test_perf-utils-allocations-to-samples.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + /** * Tests if allocations data received from the performance actor is properly * converted to something that follows the same structure as the samples data @@ -65,9 +67,15 @@ var EXPECTED_OUTPUT = { }, "data": [ null, - [ null, 1 ], // x (A:1:2) - [ 1, 2 ], // x (A:1:2) > y (B:3:4) - [ 2, 3 ] // x (A:1:2) > y (B:3:4) > C:5:6 + + // x (A:1:2) + [ null, 1 ], + + // x (A:1:2) > y (B:3:4) + [ 1, 2 ], + + // x (A:1:2) > y (B:3:4) > C:5:6 + [ 2, 3 ] ] }, frameTable: { diff --git a/devtools/shared/qrcode/index.js b/devtools/shared/qrcode/index.js index ec3442426402..7bf97e1babc0 100644 --- a/devtools/shared/qrcode/index.js +++ b/devtools/shared/qrcode/index.js @@ -4,7 +4,6 @@ "use strict"; -const { Cu } = require("chrome"); const promise = require("promise"); const defer = require("devtools/shared/defer"); diff --git a/devtools/shared/qrcode/tests/unit/.eslintrc.js b/devtools/shared/qrcode/tests/unit/.eslintrc.js new file mode 100644 index 000000000000..f21b71f67ad0 --- /dev/null +++ b/devtools/shared/qrcode/tests/unit/.eslintrc.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + // Extend from the shared list of defined globals for mochitests. + "extends": "../../../../.eslintrc.xpcshell.js" +}; \ No newline at end of file diff --git a/devtools/shared/security/auth.js b/devtools/shared/security/auth.js index 9272f602ebdc..52c9070b77bc 100644 --- a/devtools/shared/security/auth.js +++ b/devtools/shared/security/auth.js @@ -8,7 +8,6 @@ var { Ci, Cc } = require("chrome"); var Services = require("Services"); -var promise = require("promise"); var defer = require("devtools/shared/defer"); var DevToolsUtils = require("devtools/shared/DevToolsUtils"); var { dumpn, dumpv } = DevToolsUtils; @@ -408,7 +407,8 @@ OOBCert.Client.prototype = { }), _createRandom() { - const length = 16; // 16 bytes / 128 bits + // 16 bytes / 128 bits + const length = 16; let rng = Cc["@mozilla.org/security/random-generator;1"] .createInstance(Ci.nsIRandomGenerator); let bytes = rng.generateRandomBytes(length); @@ -545,9 +545,11 @@ OOBCert.Server.prototype = { switch (authResult) { case AuthenticationResult.ALLOW_PERSIST: case AuthenticationResult.ALLOW: - break; // Further processing + // Further processing + break; default: - return authResult; // Abort for any negative results + // Abort for any negative results + return authResult; } // Examine additional data for authentication diff --git a/devtools/shared/security/cert.js b/devtools/shared/security/cert.js index 7dbeded63116..7c101f3dbf0e 100644 --- a/devtools/shared/security/cert.js +++ b/devtools/shared/security/cert.js @@ -7,7 +7,6 @@ "use strict"; var { Ci, Cc } = require("chrome"); -var promise = require("promise"); var defer = require("devtools/shared/defer"); var DevToolsUtils = require("devtools/shared/DevToolsUtils"); DevToolsUtils.defineLazyGetter(this, "localCertService", () => { diff --git a/devtools/shared/security/socket.js b/devtools/shared/security/socket.js index 068a8ea81f0a..64d882c01b5d 100644 --- a/devtools/shared/security/socket.js +++ b/devtools/shared/security/socket.js @@ -6,7 +6,7 @@ "use strict"; -var { Ci, Cc, CC, Cr, Cu } = require("chrome"); +var { Ci, Cc, CC, Cr } = require("chrome"); // Ensure PSM is initialized to support TLS sockets Cc["@mozilla.org/psm;1"].getService(Ci.nsISupports); @@ -143,7 +143,8 @@ var _getTransport = Task.async(function* (settings) { let attempt = yield _attemptTransport(settings); if (attempt.transport) { - return attempt.transport; // Success + // Success + return attempt.transport; } // If the server cert failed validation, store a temporary override and make @@ -156,7 +157,8 @@ var _getTransport = Task.async(function* (settings) { attempt = yield _attemptTransport(settings); if (attempt.transport) { - return attempt.transport; // Success + // Success + return attempt.transport; } throw new Error("Connection failed even after cert override"); @@ -356,7 +358,7 @@ function _storeCertOverride(s, host, port) { let overrideBits = Ci.nsICertOverrideService.ERROR_UNTRUSTED | Ci.nsICertOverrideService.ERROR_MISMATCH; certOverrideService.rememberValidityOverride(host, port, cert, overrideBits, - true /* temporary */); + true /* temporary */); // eslint-disable-line } /** diff --git a/devtools/shared/security/tests/chrome/.eslintrc.js b/devtools/shared/security/tests/chrome/.eslintrc.js new file mode 100644 index 000000000000..6dc0ab32b6e9 --- /dev/null +++ b/devtools/shared/security/tests/chrome/.eslintrc.js @@ -0,0 +1,6 @@ +"use strict"; + +module.exports = { + // Extend from the shared list of defined globals for mochitests. + "extends": "../../../../../testing/mochitest/chrome.eslintrc.js" +}; diff --git a/devtools/shared/security/tests/chrome/test_websocket-transport.html b/devtools/shared/security/tests/chrome/test_websocket-transport.html index 542206ecfbfe..edcb5b2ffad7 100644 --- a/devtools/shared/security/tests/chrome/test_websocket-transport.html +++ b/devtools/shared/security/tests/chrome/test_websocket-transport.html @@ -9,7 +9,9 @@ diff --git a/devtools/shared/security/tests/unit/head_dbg.js b/devtools/shared/security/tests/unit/head_dbg.js index f3b2a9a9744d..790675c56dc7 100644 --- a/devtools/shared/security/tests/unit/head_dbg.js +++ b/devtools/shared/security/tests/unit/head_dbg.js @@ -2,20 +2,14 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ "use strict"; -var Cc = Components.classes; -var Ci = Components.interfaces; -var Cu = Components.utils; -var Cr = Components.results; -var CC = Components.Constructor; +/* exported defer, DebuggerClient, initTestDebuggerServer */ + +const { classes: Cc, interfaces: Ci, utils: Cu } = Components; const { require } = Cu.import("resource://devtools/shared/Loader.jsm", {}); -const promise = require("promise"); const defer = require("devtools/shared/defer"); -const { Task } = require("devtools/shared/task"); - const Services = require("Services"); -const DevToolsUtils = require("devtools/shared/DevToolsUtils"); const xpcInspector = require("xpcInspector"); const { DebuggerServer } = require("devtools/server/main"); const { DebuggerClient } = require("devtools/shared/client/main"); @@ -31,43 +25,43 @@ Services.prefs.setBoolPref("devtools.debugger.remote-enabled", true); // Fast timeout for TLS tests Services.prefs.setIntPref("devtools.remote.tls-handshake-timeout", 1000); -// Convert an nsIScriptError 'aFlags' value into an appropriate string. -function scriptErrorFlagsToKind(aFlags) { - var kind; - if (aFlags & Ci.nsIScriptError.warningFlag) +// Convert an nsIScriptError 'flags' value into an appropriate string. +function scriptErrorFlagsToKind(flags) { + let kind; + if (flags & Ci.nsIScriptError.warningFlag) { kind = "warning"; - if (aFlags & Ci.nsIScriptError.exceptionFlag) + } + if (flags & Ci.nsIScriptError.exceptionFlag) { kind = "exception"; - else + } else { kind = "error"; + } - if (aFlags & Ci.nsIScriptError.strictFlag) + if (flags & Ci.nsIScriptError.strictFlag) { kind = "strict " + kind; + } return kind; } // Register a console listener, so console messages don't just disappear // into the ether. -var errorCount = 0; var listener = { - observe: function (aMessage) { - errorCount++; + observe: function (message) { + let string; try { - // If we've been given an nsIScriptError, then we can print out - // something nicely formatted, for tools like Emacs to pick up. - var scriptError = aMessage.QueryInterface(Ci.nsIScriptError); - dump(aMessage.sourceName + ":" + aMessage.lineNumber + ": " + - scriptErrorFlagsToKind(aMessage.flags) + ": " + - aMessage.errorMessage + "\n"); - var string = aMessage.errorMessage; - } catch (x) { + message.QueryInterface(Ci.nsIScriptError); + dump(message.sourceName + ":" + message.lineNumber + ": " + + scriptErrorFlagsToKind(message.flags) + ": " + + message.errorMessage + "\n"); + string = message.errorMessage; + } catch (ex) { // Be a little paranoid with message, as the whole goal here is to lose // no information. try { - var string = "" + aMessage.message; - } catch (x) { - var string = ""; + string = "" + message.message; + } catch (e) { + string = ""; } } @@ -77,7 +71,7 @@ var listener = { } // Print in most cases, but ignore the "strict" messages - if (!(aMessage.flags & Ci.nsIScriptError.strictFlag)) { + if (!(message.flags & Ci.nsIScriptError.strictFlag)) { do_print("head_dbg.js got console message: " + string + "\n"); } } diff --git a/devtools/shared/security/tests/unit/test_oob_cert_auth.js b/devtools/shared/security/tests/unit/test_oob_cert_auth.js index 1e820af52b2e..e37a0f589d80 100644 --- a/devtools/shared/security/tests/unit/test_oob_cert_auth.js +++ b/devtools/shared/security/tests/unit/test_oob_cert_auth.js @@ -38,7 +38,8 @@ add_task(function* () { serverAuth.allowConnection = () => { return DebuggerServer.AuthenticationResult.ALLOW; }; - serverAuth.receiveOOB = () => oobData.promise; // Skip prompt for tests + // Skip prompt for tests + serverAuth.receiveOOB = () => oobData.promise; let listener = DebuggerServer.createListener(); ok(listener, "Socket listener created"); @@ -98,7 +99,8 @@ add_task(function* () { serverAuth.allowConnection = () => { return DebuggerServer.AuthenticationResult.ALLOW; }; - serverAuth.receiveOOB = () => oobData.promise; // Skip prompt for tests + // Skip prompt for tests + serverAuth.receiveOOB = () => oobData.promise; let listener = DebuggerServer.createListener(); ok(listener, "Socket listener created"); @@ -161,7 +163,8 @@ add_task(function* () { serverAuth.allowConnection = () => { return DebuggerServer.AuthenticationResult.ALLOW; }; - serverAuth.receiveOOB = () => oobData.promise; // Skip prompt for tests + // Skip prompt for tests + serverAuth.receiveOOB = () => oobData.promise; let clientAuth = new AuthenticatorType.Client(); clientAuth.sendOOB = ({ oob }) => { @@ -215,7 +218,8 @@ add_task(function* () { serverAuth.allowConnection = () => { return DebuggerServer.AuthenticationResult.ALLOW; }; - serverAuth.receiveOOB = () => oobData.promise; // Skip prompt for tests + // Skip prompt for tests + serverAuth.receiveOOB = () => oobData.promise; let clientAuth = new AuthenticatorType.Client(); clientAuth.sendOOB = ({ oob }) => { diff --git a/devtools/shared/security/tests/unit/testactors.js b/devtools/shared/security/tests/unit/testactors.js index 80d5d4e18abe..1a170cba78e9 100644 --- a/devtools/shared/security/tests/unit/testactors.js +++ b/devtools/shared/security/tests/unit/testactors.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + const { ActorPool, appendExtraActors, createExtraActors } = require("devtools/server/actors/common"); const { RootActor } = require("devtools/server/actors/root"); @@ -9,8 +11,8 @@ const { DebuggerServer } = require("devtools/server/main"); const promise = require("promise"); var gTestGlobals = []; -DebuggerServer.addTestGlobal = function (aGlobal) { - gTestGlobals.push(aGlobal); +DebuggerServer.addTestGlobal = function (global) { + gTestGlobals.push(global); }; // A mock tab list, for use by tests. This simply presents each global in @@ -20,18 +22,18 @@ DebuggerServer.addTestGlobal = function (aGlobal) { // As implemented now, we consult gTestGlobals when we're constructed, not // when we're iterated over, so tests have to add their globals before the // root actor is created. -function TestTabList(aConnection) { - this.conn = aConnection; +function TestTabList(connection) { + this.conn = connection; // An array of actors for each global added with // DebuggerServer.addTestGlobal. this._tabActors = []; // A pool mapping those actors' names to the actors. - this._tabActorPool = new ActorPool(aConnection); + this._tabActorPool = new ActorPool(connection); for (let global of gTestGlobals) { - let actor = new TestTabActor(aConnection, global); + let actor = new TestTabActor(connection, global); actor.selected = false; this._tabActors.push(actor); this._tabActorPool.addActor(actor); @@ -40,7 +42,7 @@ function TestTabList(aConnection) { this._tabActors[0].selected = true; } - aConnection.addActorPool(this._tabActorPool); + connection.addActorPool(this._tabActorPool); } TestTabList.prototype = { @@ -50,18 +52,18 @@ TestTabList.prototype = { } }; -function createRootActor(aConnection) { - let root = new RootActor(aConnection, { - tabList: new TestTabList(aConnection), +function createRootActor(connection) { + let root = new RootActor(connection, { + tabList: new TestTabList(connection), globalActorFactories: DebuggerServer.globalActorFactories }); root.applicationType = "xpcshell-tests"; return root; } -function TestTabActor(aConnection, aGlobal) { - this.conn = aConnection; - this._global = aGlobal; +function TestTabActor(connection, global) { + this.conn = connection; + this._global = global; this._threadActor = new ThreadActor(this, this._global); this.conn.addActor(this._threadActor); this._attached = false; @@ -96,7 +98,7 @@ TestTabActor.prototype = { return response; }, - onAttach: function (aRequest) { + onAttach: function (request) { this._attached = true; let response = { type: "tabAttached", threadActor: this._threadActor.actorID }; @@ -105,9 +107,9 @@ TestTabActor.prototype = { return response; }, - onDetach: function (aRequest) { + onDetach: function (request) { if (!this._attached) { - return { "error":"wrongState" }; + return { "error": "wrongState" }; } return { type: "detached" }; }, diff --git a/devtools/shared/shims/event-emitter.js b/devtools/shared/shims/event-emitter.js index 6b3672162917..bf648e373ad4 100644 --- a/devtools/shared/shims/event-emitter.js +++ b/devtools/shared/shims/event-emitter.js @@ -9,10 +9,13 @@ * specific path. */ -(function (factory) { // Module boilerplate - if (this.module && module.id.indexOf("event-emitter") >= 0) { // require +(function (factory) { + // Module boilerplate + if (this.module && module.id.indexOf("event-emitter") >= 0) { + // require factory.call(this, require, exports, module); - } else { // Cu.import + } else { + // Cu.import const Cu = Components.utils; const { require } = Cu.import("resource://devtools/shared/Loader.jsm", {}); diff --git a/devtools/shared/tests/browser/browser_async_storage.js b/devtools/shared/tests/browser/browser_async_storage.js index 4329d639aee2..141965cf00b4 100644 --- a/devtools/shared/tests/browser/browser_async_storage.js +++ b/devtools/shared/tests/browser/browser_async_storage.js @@ -30,7 +30,7 @@ add_task(function* () { }); add_task(function* () { - var object = { + let object = { x: 1, y: "foo", z: true diff --git a/devtools/shared/tests/unit/exposeLoader.js b/devtools/shared/tests/unit/exposeLoader.js index 949640a03e4e..7c8acdd75945 100644 --- a/devtools/shared/tests/unit/exposeLoader.js +++ b/devtools/shared/tests/unit/exposeLoader.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + exports.exerciseLazyRequire = (name, path) => { const o = {}; loader.lazyRequireGetter(o, name, path); diff --git a/devtools/shared/tests/unit/head_devtools.js b/devtools/shared/tests/unit/head_devtools.js index f0f47c93ac15..2854d9389758 100644 --- a/devtools/shared/tests/unit/head_devtools.js +++ b/devtools/shared/tests/unit/head_devtools.js @@ -1,13 +1,12 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ -"use strict"; -var Cc = Components.classes; -var Ci = Components.interfaces; -var Cu = Components.utils; -var Cr = Components.results; +/* exported DevToolsUtils, DevToolsLoader */ -const {require, DevToolsLoader, devtools} = Cu.import("resource://devtools/shared/Loader.jsm", {}); +"use strict"; + +const { classes: Cc, interfaces: Ci, utils: Cu } = Components; +const { require, DevToolsLoader } = Cu.import("resource://devtools/shared/Loader.jsm", {}); const DevToolsUtils = require("devtools/shared/DevToolsUtils"); const flags = require("devtools/shared/flags"); @@ -23,25 +22,22 @@ do_register_cleanup(() => { // failures, set this to true. var ALLOW_CONSOLE_ERRORS = false; -var errorCount = 0; var listener = { - observe: function (aMessage) { - errorCount++; + observe: function (message) { + let string; try { - // If we've been given an nsIScriptError, then we can print out - // something nicely formatted, for tools like Emacs to pick up. - var scriptError = aMessage.QueryInterface(Ci.nsIScriptError); - dump(aMessage.sourceName + ":" + aMessage.lineNumber + ": " + - scriptErrorFlagsToKind(aMessage.flags) + ": " + - aMessage.errorMessage + "\n"); - var string = aMessage.errorMessage; - } catch (x) { + message.QueryInterface(Ci.nsIScriptError); + dump(message.sourceName + ":" + message.lineNumber + ": " + + scriptErrorFlagsToKind(message.flags) + ": " + + message.errorMessage + "\n"); + string = message.errorMessage; + } catch (ex) { // Be a little paranoid with message, as the whole goal here is to lose // no information. try { - var string = "" + aMessage.message; - } catch (x) { - var string = ""; + string = "" + message.message; + } catch (e) { + string = ""; } } diff --git a/devtools/shared/tests/unit/test_assert.js b/devtools/shared/tests/unit/test_assert.js index b871717511a4..e5fe01974139 100644 --- a/devtools/shared/tests/unit/test_assert.js +++ b/devtools/shared/tests/unit/test_assert.js @@ -2,6 +2,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test DevToolsUtils.assert ALLOW_CONSOLE_ERRORS = true; @@ -32,5 +34,6 @@ function run_test() { } ok(assertionFailed, - "The assertion should have failed, which should throw an error when assertions are enabled."); + "The assertion should have failed, which should throw an error when assertions " + + "are enabled."); } diff --git a/devtools/shared/tests/unit/test_async-utils.js b/devtools/shared/tests/unit/test_async-utils.js index 2b09b82608ca..8c640c473bca 100644 --- a/devtools/shared/tests/unit/test_async-utils.js +++ b/devtools/shared/tests/unit/test_async-utils.js @@ -2,6 +2,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test async-utils.js const {Task} = require("devtools/shared/task"); @@ -60,12 +62,13 @@ function test_async_return(async) { function test_async_throw(async) { let obj = { method: async(function* () { - throw "boom"; + throw new Error("boom"); }) }; return obj.method().then(null, error => { - do_check_eq(error, "boom"); + do_check_true(error instanceof Error); + do_check_eq(error.message, "boom"); }); } @@ -116,7 +119,6 @@ function test_async_once() { function test_async_invoke() { return Task.spawn(function* () { function func(a, b, expectedThis, callback) { - "use strict"; do_check_eq(a, "foo"); do_check_eq(b, "bar"); do_check_eq(this, expectedThis); @@ -127,13 +129,11 @@ function test_async_invoke() { let callResult = yield promiseCall(func, "foo", "bar", undefined); do_check_eq(callResult, "foobar"); - // Test invoke. let obj = { method: func }; let invokeResult = yield promiseInvoke(obj, obj.method, "foo", "bar", obj); do_check_eq(invokeResult, "foobar"); - // Test passing multiple values to the callback. function multipleResults(callback) { callback("foo", "bar"); @@ -144,14 +144,14 @@ function test_async_invoke() { do_check_eq(results[0], "foo"); do_check_eq(results[1], "bar"); - // Test throwing from the function. function thrower() { - throw "boom"; + throw new Error("boom"); } yield promiseCall(thrower).then(null, error => { - do_check_eq(error, "boom"); + do_check_true(error instanceof Error); + do_check_eq(error.message, "boom"); }); }); } diff --git a/devtools/shared/tests/unit/test_console_filtering.js b/devtools/shared/tests/unit/test_console_filtering.js index 6ee620ebbe6f..e126981d0cfa 100644 --- a/devtools/shared/tests/unit/test_console_filtering.js +++ b/devtools/shared/tests/unit/test_console_filtering.js @@ -11,19 +11,19 @@ var seenMessages = 0; var seenTypes = 0; var callback = { - onConsoleAPICall: function (aMessage) { - if (aMessage.consoleID && aMessage.consoleID == "addon/foo") { - do_check_eq(aMessage.level, "warn"); - do_check_eq(aMessage.arguments[0], "Warning from foo"); + onConsoleAPICall: function (message) { + if (message.consoleID && message.consoleID == "addon/foo") { + do_check_eq(message.level, "warn"); + do_check_eq(message.arguments[0], "Warning from foo"); seenTypes |= 1; - } else if (aMessage.originAttributes && - aMessage.originAttributes.addonId == "bar") { - do_check_eq(aMessage.level, "error"); - do_check_eq(aMessage.arguments[0], "Error from bar"); + } else if (message.originAttributes && + message.originAttributes.addonId == "bar") { + do_check_eq(message.level, "error"); + do_check_eq(message.arguments[0], "Error from bar"); seenTypes |= 2; } else { - do_check_eq(aMessage.level, "log"); - do_check_eq(aMessage.arguments[0], "Hello from default console"); + do_check_eq(message.level, "log"); + do_check_eq(message.arguments[0], "Hello from default console"); seenTypes |= 4; } seenMessages++; diff --git a/devtools/shared/tests/unit/test_defineLazyPrototypeGetter.js b/devtools/shared/tests/unit/test_defineLazyPrototypeGetter.js index d729e747398d..452d01847306 100644 --- a/devtools/shared/tests/unit/test_defineLazyPrototypeGetter.js +++ b/devtools/shared/tests/unit/test_defineLazyPrototypeGetter.js @@ -1,13 +1,13 @@ -/* -*- js-indent-level: 2; indent-tabs-mode: nil -*- */ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test DevToolsUtils.defineLazyPrototypeGetter function Class() {} DevToolsUtils.defineLazyPrototypeGetter(Class.prototype, "foo", () => []); - function run_test() { test_prototype_attributes(); test_instance_attributes(); diff --git a/devtools/shared/tests/unit/test_executeSoon.js b/devtools/shared/tests/unit/test_executeSoon.js index 6154a3e67e35..78bdcd6a4ea3 100644 --- a/devtools/shared/tests/unit/test_executeSoon.js +++ b/devtools/shared/tests/unit/test_executeSoon.js @@ -11,7 +11,6 @@ */ var { executeSoon } = require("devtools/shared/DevToolsUtils"); -var promise = require("promise"); var defer = require("devtools/shared/defer"); var Services = require("Services"); diff --git a/devtools/shared/tests/unit/test_flatten.js b/devtools/shared/tests/unit/test_flatten.js index f5a186770cc0..11c2ac047479 100644 --- a/devtools/shared/tests/unit/test_flatten.js +++ b/devtools/shared/tests/unit/test_flatten.js @@ -2,6 +2,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test ThreadSafeDevToolsUtils.flatten function run_test() { diff --git a/devtools/shared/tests/unit/test_independent_loaders.js b/devtools/shared/tests/unit/test_independent_loaders.js index 20abed27d208..6d3aaead6935 100644 --- a/devtools/shared/tests/unit/test_independent_loaders.js +++ b/devtools/shared/tests/unit/test_independent_loaders.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + /** * Ensure that each instance of the Dev Tools loader contains its own loader * instance, and also returns unique objects. This ensures there is no sharing diff --git a/devtools/shared/tests/unit/test_isSet.js b/devtools/shared/tests/unit/test_isSet.js index f85d6ae3c3f1..a9e1fcafa9ab 100644 --- a/devtools/shared/tests/unit/test_isSet.js +++ b/devtools/shared/tests/unit/test_isSet.js @@ -2,6 +2,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test ThreadSafeDevToolsUtils.isSet function run_test() { diff --git a/devtools/shared/tests/unit/test_require.js b/devtools/shared/tests/unit/test_require.js index 005e5665633e..2d10d1e0f8c0 100644 --- a/devtools/shared/tests/unit/test_require.js +++ b/devtools/shared/tests/unit/test_require.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test require // Ensure that DevtoolsLoader.require doesn't spawn multiple diff --git a/devtools/shared/tests/unit/test_require_lazy.js b/devtools/shared/tests/unit/test_require_lazy.js index 8ef5a7d23e7b..72c83e880fcb 100644 --- a/devtools/shared/tests/unit/test_require_lazy.js +++ b/devtools/shared/tests/unit/test_require_lazy.js @@ -1,6 +1,9 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + +const { devtools } = Cu.import("resource://devtools/shared/Loader.jsm", {}); // Test devtools.lazyRequireGetter function run_test() { @@ -18,7 +21,8 @@ function run_test() { const o2 = {}; let loader = new DevToolsLoader(); - // We have to init the loader by loading any module before lazyRequireGetter is available + // We have to init the loader by loading any module before + // lazyRequireGetter is available loader.require("devtools/shared/DevToolsUtils"); loader.lazyRequireGetter(o2, name, path); diff --git a/devtools/shared/tests/unit/test_require_raw.js b/devtools/shared/tests/unit/test_require_raw.js index 5bec82b55bb0..1cfd0d3f3d22 100644 --- a/devtools/shared/tests/unit/test_require_raw.js +++ b/devtools/shared/tests/unit/test_require_raw.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test require using "raw!". function run_test() { diff --git a/devtools/shared/tests/unit/test_safeErrorString.js b/devtools/shared/tests/unit/test_safeErrorString.js index 9892f34d1e63..afde7d7c97c5 100644 --- a/devtools/shared/tests/unit/test_safeErrorString.js +++ b/devtools/shared/tests/unit/test_safeErrorString.js @@ -2,6 +2,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test DevToolsUtils.safeErrorString function run_test() { diff --git a/devtools/shared/tests/unit/test_stack.js b/devtools/shared/tests/unit/test_stack.js index ef747c83f6de..7342526e45eb 100644 --- a/devtools/shared/tests/unit/test_stack.js +++ b/devtools/shared/tests/unit/test_stack.js @@ -1,6 +1,8 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + // Test stack.js. function run_test() { diff --git a/devtools/shared/touch/simulator-content.js b/devtools/shared/touch/simulator-content.js index 0b10579ca586..6c9f3f2bfdec 100644 --- a/devtools/shared/touch/simulator-content.js +++ b/devtools/shared/touch/simulator-content.js @@ -1,7 +1,7 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * 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/. */ - /* globals addMessageListener, sendAsyncMessage */ + /* globals addMessageListener, sendAsyncMessage, docShell */ "use strict"; const { utils: Cu } = Components; diff --git a/devtools/shared/touch/simulator-core.js b/devtools/shared/touch/simulator-core.js index 6933f9207cbd..52ff5c124df2 100644 --- a/devtools/shared/touch/simulator-core.js +++ b/devtools/shared/touch/simulator-core.js @@ -1,6 +1,9 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * 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/. */ + +/* global XPCNativeWrapper */ + "use strict"; const { Ci, Cu } = require("chrome"); @@ -272,12 +275,14 @@ SimulatorCore.prototype = { } } let unwrapped = XPCNativeWrapper.unwrap(target); + /* eslint-disable no-inline-comments */ unwrapped.sendTouchEvent(name, clone([0]), // event type, id clone([evt.clientX]), // x clone([evt.clientY]), // y clone([1]), clone([1]), // rx, ry clone([0]), clone([0]), // rotation, force 1); // count + /* eslint-enable no-inline-comments */ return; } let document = target.ownerDocument; @@ -339,10 +344,10 @@ SimulatorCore.prototype = { let utils = content.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils); - let allowZoom = {}, - minZoom = {}, - maxZoom = {}, - autoSize = {}; + let allowZoom = {}; + let minZoom = {}; + let maxZoom = {}; + let autoSize = {}; utils.getViewportInfo(content.innerWidth, content.innerHeight, {}, allowZoom, minZoom, maxZoom, {}, {}, autoSize); @@ -352,14 +357,15 @@ SimulatorCore.prototype = { // delay. But Firefox didn't support this property now, we can't get // this value from utils.getVisitedDependentComputedStyle() to check // if we should suppress 300ms delay. + /* eslint-disable no-inline-comments */ if (!allowZoom.value || // user-scalable = no minZoom.value === maxZoom.value || // minimum-scale = maximum-scale autoSize.value // width = device-width ) { + /* eslint-enable no-inline-comments */ return 0; - } else { - return 300; } + return 300; } }; diff --git a/dom/animation/test/crashtests/crashtests.list b/dom/animation/test/crashtests/crashtests.list index 55cc00611526..9c67f2cee189 100644 --- a/dom/animation/test/crashtests/crashtests.list +++ b/dom/animation/test/crashtests/crashtests.list @@ -1,18 +1,18 @@ pref(dom.animations-api.core.enabled,true) load 1239889-1.html asserts-if(stylo,3) pref(dom.animations-api.core.enabled,true) load 1244595-1.html # bug 1324696 -asserts-if(stylo,3-4) pref(dom.animations-api.core.enabled,true) load 1216842-1.html # bug 1324695 -asserts-if(stylo,3-5) pref(dom.animations-api.core.enabled,true) load 1216842-2.html # bug 1324695 +asserts-if(stylo,3-10) pref(dom.animations-api.core.enabled,true) load 1216842-1.html # bug 1324695 +asserts-if(stylo,3-10) pref(dom.animations-api.core.enabled,true) load 1216842-2.html # bug 1324695 asserts-if(stylo,3) pref(dom.animations-api.core.enabled,true) load 1216842-3.html # bug 1324691 asserts-if(stylo,3) pref(dom.animations-api.core.enabled,true) load 1216842-4.html # bug 1324691 -asserts-if(stylo,4-5) pref(dom.animations-api.core.enabled,true) load 1216842-5.html # bug 1324693 -asserts-if(stylo,4-5) pref(dom.animations-api.core.enabled,true) load 1216842-6.html # bug 1324693 -asserts-if(stylo,3-5) pref(dom.animations-api.core.enabled,true) load 1272475-1.html # bug 1324693 -asserts-if(stylo,4-7) pref(dom.animations-api.core.enabled,true) load 1272475-2.html # bug 1324693 +asserts-if(stylo,4-10) pref(dom.animations-api.core.enabled,true) load 1216842-5.html # bug 1324693 +asserts-if(stylo,4-10) pref(dom.animations-api.core.enabled,true) load 1216842-6.html # bug 1324693 +asserts-if(stylo,3-10) pref(dom.animations-api.core.enabled,true) load 1272475-1.html # bug 1324693 +asserts-if(stylo,4-10) pref(dom.animations-api.core.enabled,true) load 1272475-2.html # bug 1324693 asserts-if(stylo,5) pref(dom.animations-api.core.enabled,true) load 1278485-1.html # bug 1324691 asserts-if(stylo,31) pref(dom.animations-api.core.enabled,true) load 1277272-1.html # bug 1324694 asserts-if(stylo,2) pref(dom.animations-api.core.enabled,true) load 1290535-1.html # bug 1324690 pref(dom.animations-api.core.enabled,true) load 1304886-1.html pref(dom.animations-api.core.enabled,true) load 1322382-1.html skip-if(stylo) pref(dom.animations-api.core.enabled,true) load 1322291-1.html # bug 1323733 -pref(dom.animations-api.core.enabled,true) load 1323114-1.html -pref(dom.animations-api.core.enabled,true) load 1323114-2.html +asserts-if(stylo,0-5) pref(dom.animations-api.core.enabled,true) load 1323114-1.html # bug 1324690 +asserts-if(stylo,0-5) pref(dom.animations-api.core.enabled,true) load 1323114-2.html # bug 1324690 diff --git a/dom/base/Element.cpp b/dom/base/Element.cpp index 634ff3304ad2..7849a98f9ba8 100644 --- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -448,7 +448,6 @@ Element::GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult) nsCOMPtr shell = aDocument->GetShell(); if (!shell || GetPrimaryFrame() || !isXULorPluginElement) { *aResult = nullptr; - return true; } @@ -457,8 +456,7 @@ Element::GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult) nsComputedDOMStyle::GetStyleContextForElementNoFlush(this, nullptr, shell); NS_ENSURE_TRUE(sc, false); - *aResult = sc->StyleDisplay()->mBinding; - + NS_IF_ADDREF(*aResult = sc->StyleDisplay()->mBinding); return true; } @@ -535,42 +533,40 @@ Element::WrapObject(JSContext *aCx, JS::Handle aGivenProto) // Make sure the style context goes away _before_ we load the binding // since that can destroy the relevant presshell. - mozilla::css::URLValue *bindingURL; - bool ok = GetBindingURL(doc, &bindingURL); - if (!ok) { - dom::Throw(aCx, NS_ERROR_FAILURE); - return nullptr; - } - - if (!bindingURL) { - // No binding, nothing left to do here. - return obj; - } - - nsCOMPtr uri = bindingURL->GetURI(); - nsCOMPtr principal = bindingURL->mOriginPrincipal.get(); - - // We have a binding that must be installed. - bool dummy; - - nsXBLService* xblService = nsXBLService::GetInstance(); - if (!xblService) { - dom::Throw(aCx, NS_ERROR_NOT_AVAILABLE); - return nullptr; - } { // Make a scope so that ~nsRefPtr can GC before returning obj. - RefPtr binding; - xblService->LoadBindings(this, uri, principal, getter_AddRefs(binding), &dummy); + RefPtr bindingURL; + bool ok = GetBindingURL(doc, getter_AddRefs(bindingURL)); + if (!ok) { + dom::Throw(aCx, NS_ERROR_FAILURE); + return nullptr; + } - if (binding) { - if (nsContentUtils::IsSafeToRunScript()) { - binding->ExecuteAttachedHandler(); + if (bindingURL) { + nsCOMPtr uri = bindingURL->GetURI(); + nsCOMPtr principal = bindingURL->mOriginPrincipal.get(); + + // We have a binding that must be installed. + bool dummy; + + nsXBLService* xblService = nsXBLService::GetInstance(); + if (!xblService) { + dom::Throw(aCx, NS_ERROR_NOT_AVAILABLE); + return nullptr; } - else { - nsContentUtils::AddScriptRunner( - NewRunnableMethod(binding, &nsXBLBinding::ExecuteAttachedHandler)); + + RefPtr binding; + xblService->LoadBindings(this, uri, principal, getter_AddRefs(binding), + &dummy); + + if (binding) { + if (nsContentUtils::IsSafeToRunScript()) { + binding->ExecuteAttachedHandler(); + } else { + nsContentUtils::AddScriptRunner( + NewRunnableMethod(binding, &nsXBLBinding::ExecuteAttachedHandler)); + } } } } diff --git a/dom/base/Element.h b/dom/base/Element.h index 05e9044c67ba..b115a31f5aa7 100644 --- a/dom/base/Element.h +++ b/dom/base/Element.h @@ -387,7 +387,7 @@ public: } } - bool GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult); + bool GetBindingURL(nsIDocument* aDocument, css::URLValue **aResult); // The bdi element defaults to dir=auto if it has no dir attribute set. // Other elements will only have dir=auto if they have an explicit dir=auto, diff --git a/dom/base/Location.cpp b/dom/base/Location.cpp index e3b614931a5e..bdae4d07c0bd 100644 --- a/dom/base/Location.cpp +++ b/dom/base/Location.cpp @@ -581,15 +581,12 @@ Location::GetPathname(nsAString& aPathname) result = GetURI(getter_AddRefs(uri)); - nsCOMPtr url(do_QueryInterface(uri)); - if (url) { - nsAutoCString file; + nsAutoCString file; - result = url->GetFilePath(file); + result = uri->GetFilePath(file); - if (NS_SUCCEEDED(result)) { - AppendUTF8toUTF16(file, aPathname); - } + if (NS_SUCCEEDED(result)) { + AppendUTF8toUTF16(file, aPathname); } return result; @@ -604,8 +601,7 @@ Location::SetPathname(const nsAString& aPathname) return rv; } - nsCOMPtr url(do_QueryInterface(uri)); - if (url && NS_SUCCEEDED(url->SetFilePath(NS_ConvertUTF16toUTF8(aPathname)))) { + if (NS_SUCCEEDED(uri->SetFilePath(NS_ConvertUTF16toUTF8(aPathname)))) { return SetURI(uri); } diff --git a/dom/base/TabGroup.cpp b/dom/base/TabGroup.cpp index d09fe2c6f98d..4e266a8e9106 100644 --- a/dom/base/TabGroup.cpp +++ b/dom/base/TabGroup.cpp @@ -51,6 +51,7 @@ TabGroup::~TabGroup() { MOZ_ASSERT(mDocGroups.IsEmpty()); MOZ_ASSERT(mWindows.IsEmpty()); + MOZ_RELEASE_ASSERT(mLastWindowLeft); } void @@ -149,6 +150,7 @@ TabGroup::Join(nsPIDOMWindowOuter* aWindow, TabGroup* aTabGroup) if (!tabGroup) { tabGroup = new TabGroup(); } + MOZ_RELEASE_ASSERT(!tabGroup->mLastWindowLeft); MOZ_ASSERT(!tabGroup->mWindows.Contains(aWindow)); tabGroup->mWindows.AppendElement(aWindow); return tabGroup.forget(); @@ -258,7 +260,13 @@ TabGroup::EventTargetFor(TaskCategory aCategory) const MOZ_RELEASE_ASSERT(mThrottledQueuesInitialized || this == sChromeTabGroup); } - MOZ_RELEASE_ASSERT(!mLastWindowLeft); + if (NS_WARN_IF(mLastWindowLeft)) { + // Once we've disconnected everything, we still allow people to + // dispatch. We'll just go directly to the main thread. + nsCOMPtr main = do_GetMainThread(); + return main; + } + return mEventTargets[size_t(aCategory)]; } diff --git a/dom/base/crashtests/crashtests.list b/dom/base/crashtests/crashtests.list index 6c1c0f9b4406..615f55bfaaaa 100644 --- a/dom/base/crashtests/crashtests.list +++ b/dom/base/crashtests/crashtests.list @@ -1,4 +1,4 @@ -load 43040-1.html +asserts-if(stylo,0-1) load 43040-1.html # bug 1324691 load 90613-1.html load 116848-1.html load 149320-1.html @@ -193,7 +193,7 @@ load 930250.html load 942979.html load 973401.html load 978646.html -asserts-if(stylo,3) pref(dom.webcomponents.enabled,true) load 1024428-1.html # bug 1324671 +asserts-if(stylo,1-11) pref(dom.webcomponents.enabled,true) load 1024428-1.html # bug 1324671 load 1026714.html pref(dom.webcomponents.enabled,true) load 1027461-1.html pref(dom.webcomponents.enabled,true) load 1029710.html diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 6d15c8f08afe..206d19760eb8 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -1347,6 +1347,12 @@ nsDOMConstructor::HasInstance(nsIXPConnectWrappedNative *wrapper, JS::Rooted dot_prototype(cx, &desc.value().toObject()); JS::Rooted proto(cx, dom_obj); + JSAutoCompartment ac(cx, proto); + + if (!JS_WrapObject(cx, &dot_prototype)) { + return NS_ERROR_UNEXPECTED; + } + for (;;) { if (!JS_GetPrototype(cx, proto, &proto)) { return NS_ERROR_UNEXPECTED; diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index d2199aace111..10a9eadbdec7 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -5957,10 +5957,10 @@ nsDocument::RegisterElement(JSContext* aCx, const nsAString& aType, options.mExtends.Construct(lcName); } - RootedCallback> functionConstructor(aCx); - functionConstructor = new binding_detail::FastFunction(aCx, wrappedConstructor, sgo); + RefPtr functionConstructor = + new Function(aCx, wrappedConstructor, sgo); - registry->Define(lcType, functionConstructor, options, rv); + registry->Define(lcType, *functionConstructor, options, rv); aRetval.set(wrappedConstructor); } diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index de38308fba18..faa8935c2f97 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -13398,8 +13398,7 @@ nsGlobalWindow::SetCursorOuter(const nsAString& aCursor, ErrorResult& aError) cursor = NS_STYLE_CURSOR_AUTO; else { nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(aCursor); - if (eCSSKeyword_UNKNOWN == keyword || - !nsCSSProps::FindKeyword(keyword, nsCSSProps::kCursorKTable, cursor)) { + if (!nsCSSProps::FindKeyword(keyword, nsCSSProps::kCursorKTable, cursor)) { return; } } diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini index 6590fa6c99e5..e40730ddf353 100644 --- a/dom/base/test/mochitest.ini +++ b/dom/base/test/mochitest.ini @@ -655,7 +655,7 @@ skip-if = (toolkit == 'android') # Android: Bug 775227 [test_innersize_scrollport.html] [test_integer_attr_with_leading_zero.html] [test_intersectionobservers.html] -skip-if = (os == "android") # Timing issues +skip-if = true # Track Bug 1320704 [test_link_prefetch.html] skip-if = !e10s # Track Bug 1281415 [test_link_stylesheet.html] diff --git a/dom/bindings/CallbackFunction.h b/dom/bindings/CallbackFunction.h index ac2b3e8b3531..29122b4182c1 100644 --- a/dom/bindings/CallbackFunction.h +++ b/dom/bindings/CallbackFunction.h @@ -63,11 +63,9 @@ protected: } // See CallbackObject for an explanation of the arguments. - CallbackFunction(JSContext* aCx, JS::Handle aCallable, - nsIGlobalObject* aIncumbentGlobal, + CallbackFunction(JS::Handle aCallable, const FastCallbackConstructor&) - : CallbackObject(aCx, aCallable, aIncumbentGlobal, - FastCallbackConstructor()) + : CallbackObject(aCallable, FastCallbackConstructor()) { } }; diff --git a/dom/bindings/CallbackInterface.h b/dom/bindings/CallbackInterface.h index 3ba5182e7e9a..6bb645f05f50 100644 --- a/dom/bindings/CallbackInterface.h +++ b/dom/bindings/CallbackInterface.h @@ -44,11 +44,9 @@ protected: JS::MutableHandle aCallable); // See CallbackObject for an explanation of the arguments. - CallbackInterface(JSContext* aCx, JS::Handle aCallable, - nsIGlobalObject* aIncumbentGlobal, + CallbackInterface(JS::Handle aCallable, const FastCallbackConstructor&) - : CallbackObject(aCx, aCallable, aIncumbentGlobal, - FastCallbackConstructor()) + : CallbackObject(aCallable, FastCallbackConstructor()) { } }; diff --git a/dom/bindings/CallbackObject.cpp b/dom/bindings/CallbackObject.cpp index 7c7d2c6b4c97..204cca4c986c 100644 --- a/dom/bindings/CallbackObject.cpp +++ b/dom/bindings/CallbackObject.cpp @@ -56,11 +56,22 @@ CallbackObject::Trace(JSTracer* aTracer) } void -CallbackObject::HoldJSObjectsIfMoreThanOneOwner() +CallbackObject::FinishSlowJSInitIfMoreThanOneOwner(JSContext* aCx) { MOZ_ASSERT(mRefCnt.get() > 0); if (mRefCnt.get() > 1) { mozilla::HoldJSObjects(this); + if (JS::ContextOptionsRef(aCx).asyncStack()) { + JS::RootedObject stack(aCx); + if (!JS::CaptureCurrentStack(aCx, &stack)) { + JS_ClearPendingException(aCx); + } + mCreationStack = stack; + } + mIncumbentGlobal = GetIncumbentGlobal(); + if (mIncumbentGlobal) { + mIncumbentJSGlobal = mIncumbentGlobal->GetGlobalJSObject(); + } } else { // We can just forget all our stuff. ClearJSReferences(); diff --git a/dom/bindings/CallbackObject.h b/dom/bindings/CallbackObject.h index 8a3d45dfce21..826e78147a81 100644 --- a/dom/bindings/CallbackObject.h +++ b/dom/bindings/CallbackObject.h @@ -213,9 +213,10 @@ protected: void Trace(JSTracer* aTracer); // For use from subclasses that want to be traced for a bit then possibly - // switch to HoldJSObjects. If we have more than one owner, this will - // HoldJSObjects; otherwise it will just forget all our JS references. - void HoldJSObjectsIfMoreThanOneOwner(); + // switch to HoldJSObjects and do other slow JS-related init work we might do. + // If we have more than one owner, this will HoldJSObjects and do said slow + // init work; otherwise it will just forget all our JS references. + void FinishSlowJSInitIfMoreThanOneOwner(JSContext* aCx); // Struct used as a way to force a CallbackObject constructor to not call // HoldJSObjects. We're putting it here so that CallbackObject subclasses will @@ -227,21 +228,14 @@ protected: }; // Just like the public version without the FastCallbackConstructor argument, - // except for not calling HoldJSObjects. If you use this, you MUST ensure - // that the object is traced until the HoldJSObjects happens! - CallbackObject(JSContext* aCx, JS::Handle aCallback, - nsIGlobalObject* aIncumbentGlobal, + // except for not calling HoldJSObjects and not capturing async stacks (on the + // assumption that we will do that last whenever we decide to actually + // HoldJSObjects; see FinishSlowJSInitIfMoreThanOneOwner). If you use this, + // you MUST ensure that the object is traced until the HoldJSObjects happens! + CallbackObject(JS::Handle aCallback, const FastCallbackConstructor&) { - if (aCx && JS::ContextOptionsRef(aCx).asyncStack()) { - JS::RootedObject stack(aCx); - if (!JS::CaptureCurrentStack(aCx, &stack)) { - JS_ClearPendingException(aCx); - } - InitNoHold(aCallback, stack, aIncumbentGlobal); - } else { - InitNoHold(aCallback, nullptr, aIncumbentGlobal); - } + InitNoHold(aCallback, nullptr, nullptr); } // mCallback is not unwrapped, so it can be a cross-compartment-wrapper. @@ -545,11 +539,12 @@ ImplCycleCollectionUnlink(CallbackObjectHolder& aField) // it ensures that the callback is traced, and that if something is holding onto // the callback when we're done with it HoldJSObjects is called. template -class RootedCallback : public JS::Rooted +class MOZ_RAII RootedCallback : public JS::Rooted { public: explicit RootedCallback(JSContext* cx) : JS::Rooted(cx) + , mCx(cx) {} // We need a way to make assignment from pointers (how we're normally used) @@ -576,11 +571,11 @@ public: ~RootedCallback() { // Ensure that our callback starts holding on to its own JS objects as - // needed. Having to null-check here when T is OwningNonNull is a bit - // silly, but it's simpler than creating two separate RootedCallback - // instantiations for OwningNonNull and RefPtr. + // needed. We really do need to check that things are initialized even when + // T is OwningNonNull, because we might be running before the OwningNonNull + // ever got assigned to! if (IsInitialized(this->get())) { - this->get()->HoldJSObjectsIfMoreThanOneOwner(); + this->get()->FinishSlowJSInitIfMoreThanOneOwner(mCx); } } @@ -599,6 +594,8 @@ private: { return aOwningNonNull.isInitialized(); } + + JSContext* mCx; }; } // namespace dom diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 2730092022fe..ff2f7ef9fe33 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -4290,17 +4290,6 @@ class FailureFatalCastableObjectUnwrapper(CastableObjectUnwrapper): isCallbackReturnValue) -class CGCallbackTempRoot(CGGeneric): - def __init__(self, name): - define = dedent(""" - { // Scope for tempRoot - JS::Rooted tempRoot(cx, &${val}.toObject()); - ${declName} = new %s(cx, tempRoot, mozilla::dom::GetIncumbentGlobal()); - } - """) % name - CGGeneric.__init__(self, define=define) - - def getCallbackConversionInfo(type, idlObject, isMember, isCallbackReturnValue, isOptional): """ @@ -4316,6 +4305,11 @@ def getCallbackConversionInfo(type, idlObject, isMember, isCallbackReturnValue, not isOptional) if useFastCallback: name = "binding_detail::Fast%s" % name + argsPre = "" + argsPost = "" + else: + argsPre = "cx, " + argsPost = ", GetIncumbentGlobal()" if type.nullable() or isCallbackReturnValue: declType = CGGeneric("RefPtr<%s>" % name) @@ -4328,7 +4322,16 @@ def getCallbackConversionInfo(type, idlObject, isMember, isCallbackReturnValue, else: declArgs = None - conversion = indent(CGCallbackTempRoot(name).define()) + conversion = fill( + """ + { // scope for tempRoot + JS::Rooted tempRoot(cx, &$${val}.toObject()); + $${declName} = new ${name}(${argsPre}tempRoot${argsPost}); + } + """, + name=name, + argsPre=argsPre, + argsPost=argsPost) return (declType, declArgs, conversion) @@ -15176,15 +15179,13 @@ class CGCallback(CGClass): ], body=body), ClassConstructor( - [Argument("JSContext*", "aCx"), - Argument("JS::Handle", "aCallback"), - Argument("nsIGlobalObject*", "aIncumbentGlobal"), + [Argument("JS::Handle", "aCallback"), Argument("const FastCallbackConstructor&", "")], bodyInHeader=True, visibility="public", explicit=True, baseConstructors=[ - "%s(aCx, aCallback, aIncumbentGlobal, FastCallbackConstructor())" % self.baseName, + "%s(aCallback, FastCallbackConstructor())" % self.baseName, ], body=body), ClassConstructor( @@ -15357,14 +15358,12 @@ class CGFastCallback(CGClass): self._deps = idlObject.getDeps() baseName = idlObject.identifier.name constructor = ClassConstructor( - [Argument("JSContext*", "aCx"), - Argument("JS::Handle", "aCallback"), - Argument("nsIGlobalObject*", "aIncumbentGlobal")], + [Argument("JS::Handle", "aCallback")], bodyInHeader=True, visibility="public", explicit=True, baseConstructors=[ - "%s(aCx, aCallback, aIncumbentGlobal, FastCallbackConstructor())" % + "%s(aCallback, FastCallbackConstructor())" % baseName, ], body="") @@ -15375,13 +15374,13 @@ class CGFastCallback(CGClass): bodyInHeader=True, visibility="public", body="%s::Trace(aTracer);\n" % baseName) - holdMethod = ClassMethod("HoldJSObjectsIfMoreThanOneOwner", "void", - [], + holdMethod = ClassMethod("FinishSlowJSInitIfMoreThanOneOwner", "void", + [Argument("JSContext*", "aCx")], inline=True, bodyInHeader=True, visibility="public", body=( - "%s::HoldJSObjectsIfMoreThanOneOwner();\n" % + "%s::FinishSlowJSInitIfMoreThanOneOwner(aCx);\n" % baseName)) CGClass.__init__(self, "Fast%s" % baseName, diff --git a/dom/canvas/WebGL2Context.cpp b/dom/canvas/WebGL2Context.cpp index 9c659ca7da5d..f9a1eba4bff9 100644 --- a/dom/canvas/WebGL2Context.cpp +++ b/dom/canvas/WebGL2Context.cpp @@ -163,6 +163,8 @@ WebGLContext::InitWebGL2(FailureReason* const out_failReason) mDefaultTransformFeedback = new WebGLTransformFeedback(this, 0); mBoundTransformFeedback = mDefaultTransformFeedback; + gl->fGenTransformFeedbacks(1, &mEmptyTFO); + //// if (!gl->IsGLES()) { diff --git a/dom/canvas/WebGL2ContextBuffers.cpp b/dom/canvas/WebGL2ContextBuffers.cpp index efa18b42bc78..f59fa08b836e 100644 --- a/dom/canvas/WebGL2ContextBuffers.cpp +++ b/dom/canvas/WebGL2ContextBuffers.cpp @@ -132,11 +132,26 @@ WebGL2Context::GetBufferSubData(GLenum target, GLintptr srcByteOffset, const ScopedLazyBind readBind(gl, target, buffer); if (byteLen) { - const auto mappedBytes = gl->fMapBufferRange(target, srcByteOffset, glByteLen, + const bool isTF = (target == LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER); + GLenum mapTarget = target; + if (isTF) { + gl->fBindTransformFeedback(LOCAL_GL_TRANSFORM_FEEDBACK, mEmptyTFO); + gl->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, buffer->mGLName); + mapTarget = LOCAL_GL_ARRAY_BUFFER; + } + + const auto mappedBytes = gl->fMapBufferRange(mapTarget, srcByteOffset, glByteLen, LOCAL_GL_MAP_READ_BIT); - // Warning: Possibly shared memory. See bug 1225033. memcpy(bytes, mappedBytes, byteLen); - gl->fUnmapBuffer(target); + gl->fUnmapBuffer(mapTarget); + + if (isTF) { + const GLuint vbo = (mBoundArrayBuffer ? mBoundArrayBuffer->mGLName : 0); + gl->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, vbo); + const GLuint tfo = (mBoundTransformFeedback ? mBoundTransformFeedback->mGLName + : 0); + gl->fBindTransformFeedback(LOCAL_GL_TRANSFORM_FEEDBACK, tfo); + } } } diff --git a/dom/canvas/WebGL2ContextTransformFeedback.cpp b/dom/canvas/WebGL2ContextTransformFeedback.cpp index ee2f99341535..48bdf756c97c 100644 --- a/dom/canvas/WebGL2ContextTransformFeedback.cpp +++ b/dom/canvas/WebGL2ContextTransformFeedback.cpp @@ -81,10 +81,18 @@ WebGL2Context::BindTransformFeedback(GLenum target, WebGLTransformFeedback* tf) //// + if (mBoundTransformFeedback) { + mBoundTransformFeedback->AddBufferBindCounts(-1); + } + mBoundTransformFeedback = (tf ? tf : mDefaultTransformFeedback); MakeContextCurrent(); gl->fBindTransformFeedback(target, mBoundTransformFeedback->mGLName); + + if (mBoundTransformFeedback) { + mBoundTransformFeedback->AddBufferBindCounts(+1); + } } void diff --git a/dom/canvas/WebGLBuffer.cpp b/dom/canvas/WebGLBuffer.cpp index 4558a4603f9e..f202c9950d1c 100644 --- a/dom/canvas/WebGLBuffer.cpp +++ b/dom/canvas/WebGLBuffer.cpp @@ -18,6 +18,8 @@ WebGLBuffer::WebGLBuffer(WebGLContext* webgl, GLuint buf) , mContent(Kind::Undefined) , mUsage(LOCAL_GL_STATIC_DRAW) , mByteLength(0) + , mTFBindCount(0) + , mNonTFBindCount(0) { mContext->mBuffers.insertBack(this); } diff --git a/dom/canvas/WebGLBuffer.h b/dom/canvas/WebGLBuffer.h index c60bc9b5d81f..883712aad451 100644 --- a/dom/canvas/WebGLBuffer.h +++ b/dom/canvas/WebGLBuffer.h @@ -26,7 +26,6 @@ class WebGLBuffer final friend class WebGLContext; friend class WebGL2Context; friend class WebGLTexture; - friend class WebGLTransformFeedback; public: enum class Kind { @@ -66,6 +65,35 @@ public: bool ValidateCanBindToTarget(const char* funcName, GLenum target); void BufferData(GLenum target, size_t size, const void* data, GLenum usage); + //// + + static void AddBindCount(GLenum target, WebGLBuffer* buffer, int8_t addVal) { + if (!buffer) + return; + + if (target == LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER) { + MOZ_ASSERT_IF(addVal < 0, buffer->mTFBindCount >= size_t(-addVal)); + buffer->mTFBindCount += addVal; + } else { + MOZ_ASSERT_IF(addVal < 0, buffer->mNonTFBindCount >= size_t(-addVal)); + buffer->mNonTFBindCount += addVal; + } + } + + static void SetSlot(GLenum target, WebGLBuffer* newBuffer, + WebGLRefPtr* const out_slot) + { + WebGLBuffer* const oldBuffer = *out_slot; + AddBindCount(target, oldBuffer, -1); + AddBindCount(target, newBuffer, +1); + *out_slot = newBuffer; + } + + bool IsBoundForTF() const { return bool(mTFBindCount); } + bool IsBoundForNonTF() const { return bool(mNonTFBindCount); } + + //// + const GLenum mGLName; NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLBuffer) @@ -78,6 +106,8 @@ protected: GLenum mUsage; size_t mByteLength; UniquePtr mCache; + size_t mTFBindCount; + size_t mNonTFBindCount; }; } // namespace mozilla diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index 3c0fd978c395..3d8ae73699fd 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -120,7 +120,7 @@ WebGLContext::WebGLContext() , mMaxFetchedInstances(0) , mLayerIsMirror(false) , mBypassShaderValidation(false) - , mBuffersForUB_Dirty(true) + , mEmptyTFO(0) , mContextLossHandler(this) , mNeedsFakeNoAlpha(false) , mNeedsFakeNoDepth(false) @@ -250,7 +250,6 @@ WebGLContext::DestroyResourcesAndContext() mQuerySlot_TimeElapsed = nullptr; mIndexedUniformBufferBindings.clear(); - OnUBIndexedBindingsChanged(); ////// @@ -268,6 +267,13 @@ WebGLContext::DestroyResourcesAndContext() ////// + if (mEmptyTFO) { + gl->fDeleteTransformFeedbacks(1, &mEmptyTFO); + mEmptyTFO = 0; + } + + ////// + mFakeBlack_2D_0000 = nullptr; mFakeBlack_2D_0001 = nullptr; mFakeBlack_CubeMap_0000 = nullptr; @@ -2385,42 +2391,6 @@ WebGLContext::ValidateArrayBufferView(const char* funcName, return true; } -//// - -const decltype(WebGLContext::mBuffersForUB)& -WebGLContext::BuffersForUB() const -{ - if (mBuffersForUB_Dirty) { - mBuffersForUB.clear(); - for (const auto& cur : mIndexedUniformBufferBindings) { - if (cur.mBufferBinding) { - mBuffersForUB.insert(cur.mBufferBinding.get()); - } - } - mBuffersForUB_Dirty = false; - } - return mBuffersForUB; -} - -//// - -bool -WebGLContext::ValidateForNonTransformFeedback(const char* funcName, WebGLBuffer* buffer) -{ - if (!mBoundTransformFeedback) - return true; - - const auto& buffersForTF = mBoundTransformFeedback->BuffersForTF(); - if (buffersForTF.count(buffer)) { - ErrorInvalidOperation("%s: Specified WebGLBuffer is currently bound for transform" - " feedback.", - funcName); - return false; - } - - return true; -} - //////////////////////////////////////////////////////////////////////////////// // XPCOM goop diff --git a/dom/canvas/WebGLContext.h b/dom/canvas/WebGLContext.h index 2b657f95a26b..0648c52c4d9f 100644 --- a/dom/canvas/WebGLContext.h +++ b/dom/canvas/WebGLContext.h @@ -1654,8 +1654,6 @@ protected: return true; } - bool ValidateForNonTransformFeedback(const char* funcName, WebGLBuffer* buffer); - public: template bool ValidateNonNull(const char* funcName, const dom::Nullable& maybe) { @@ -1882,17 +1880,9 @@ protected: //////////////////////////////////// -private: - mutable bool mBuffersForUB_Dirty; - mutable std::set mBuffersForUB; - -public: - void OnUBIndexedBindingsChanged() const { mBuffersForUB_Dirty = true; } - const decltype(mBuffersForUB)& BuffersForUB() const; - - //////////////////////////////////// - protected: + GLuint mEmptyTFO; + // Generic Vertex Attributes // Though CURRENT_VERTEX_ATTRIB is listed under "Vertex Shader State" in the spec // state tables, this isn't vertex shader /object/ state. This array is merely state diff --git a/dom/canvas/WebGLContextBuffers.cpp b/dom/canvas/WebGLContextBuffers.cpp index 9fd108632abf..af506c01c1be 100644 --- a/dom/canvas/WebGLContextBuffers.cpp +++ b/dom/canvas/WebGLContextBuffers.cpp @@ -75,8 +75,27 @@ WebGLContext::ValidateBufferSelection(const char* funcName, GLenum target) return nullptr; } - if (!ValidateForNonTransformFeedback(funcName, buffer.get())) - return nullptr; + if (target == LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER) { + if (mBoundTransformFeedback->IsActiveAndNotPaused()) { + ErrorInvalidOperation("%s: Cannot select TRANSFORM_FEEDBACK_BUFFER when" + " transform feedback is active and unpaused.", + funcName); + return nullptr; + } + if (buffer->IsBoundForNonTF()) { + ErrorInvalidOperation("%s: Specified WebGLBuffer is currently bound for" + " non-transform-feedback.", + funcName); + return nullptr; + } + } else { + if (buffer->IsBoundForTF()) { + ErrorInvalidOperation("%s: Specified WebGLBuffer is currently bound for" + " transform feedback.", + funcName); + return nullptr; + } + } return buffer.get(); } @@ -132,7 +151,7 @@ WebGLContext::BindBuffer(GLenum target, WebGLBuffer* buffer) gl->MakeCurrent(); gl->fBindBuffer(target, buffer ? buffer->mGLName : 0); - *slot = buffer; + WebGLBuffer::SetSlot(target, buffer, slot); if (buffer) { buffer->SetContentAfterBind(target); } @@ -201,23 +220,14 @@ WebGLContext::BindBufferBase(GLenum target, GLuint index, WebGLBuffer* buffer) //// - *genericBinding = buffer; - indexedBinding->mBufferBinding = buffer; + WebGLBuffer::SetSlot(target, buffer, genericBinding); + WebGLBuffer::SetSlot(target, buffer, &indexedBinding->mBufferBinding); indexedBinding->mRangeStart = 0; indexedBinding->mRangeSize = 0; if (buffer) { buffer->SetContentAfterBind(target); } - - switch (target) { - case LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER: - mBoundTransformFeedback->OnIndexedBindingsChanged(); - break; - case LOCAL_GL_UNIFORM: - OnUBIndexedBindingsChanged(); - break; - } } void @@ -296,23 +306,14 @@ WebGLContext::BindBufferRange(GLenum target, GLuint index, WebGLBuffer* buffer, //// - *genericBinding = buffer; - indexedBinding->mBufferBinding = buffer; + WebGLBuffer::SetSlot(target, buffer, genericBinding); + WebGLBuffer::SetSlot(target, buffer, &indexedBinding->mBufferBinding); indexedBinding->mRangeStart = offset; indexedBinding->mRangeSize = size; if (buffer) { buffer->SetContentAfterBind(target); } - - switch (target) { - case LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER: - mBoundTransformFeedback->OnIndexedBindingsChanged(); - break; - case LOCAL_GL_UNIFORM: - OnUBIndexedBindingsChanged(); - break; - } } //////////////////////////////////////// @@ -477,39 +478,41 @@ WebGLContext::DeleteBuffer(WebGLBuffer* buffer) //// - const auto fnClearIfBuffer = [&](WebGLRefPtr& bindPoint) { + const auto fnClearIfBuffer = [&](GLenum target, WebGLRefPtr& bindPoint) { if (bindPoint == buffer) { - bindPoint = nullptr; + WebGLBuffer::SetSlot(target, nullptr, &bindPoint); } }; - fnClearIfBuffer(mBoundArrayBuffer); - fnClearIfBuffer(mBoundVertexArray->mElementArrayBuffer); + fnClearIfBuffer(0, mBoundArrayBuffer); + fnClearIfBuffer(0, mBoundVertexArray->mElementArrayBuffer); + + for (auto& cur : mBoundVertexArray->mAttribs) { + fnClearIfBuffer(0, cur.mBuf); + } // WebGL binding points if (IsWebGL2()) { - fnClearIfBuffer(mBoundCopyReadBuffer); - fnClearIfBuffer(mBoundCopyWriteBuffer); - fnClearIfBuffer(mBoundPixelPackBuffer); - fnClearIfBuffer(mBoundPixelUnpackBuffer); - fnClearIfBuffer(mBoundUniformBuffer); - fnClearIfBuffer(mBoundTransformFeedback->mGenericBufferBinding); + fnClearIfBuffer(0, mBoundCopyReadBuffer); + fnClearIfBuffer(0, mBoundCopyWriteBuffer); + fnClearIfBuffer(0, mBoundPixelPackBuffer); + fnClearIfBuffer(0, mBoundPixelUnpackBuffer); + fnClearIfBuffer(0, mBoundUniformBuffer); + fnClearIfBuffer(LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER, + mBoundTransformFeedback->mGenericBufferBinding); if (!mBoundTransformFeedback->mIsActive) { for (auto& binding : mBoundTransformFeedback->mIndexedBindings) { - fnClearIfBuffer(binding.mBufferBinding); + fnClearIfBuffer(LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER, + binding.mBufferBinding); } } for (auto& binding : mIndexedUniformBufferBindings) { - fnClearIfBuffer(binding.mBufferBinding); + fnClearIfBuffer(0, binding.mBufferBinding); } } - for (auto& cur : mBoundVertexArray->mAttribs) { - fnClearIfBuffer(cur.mBuf); - } - //// buffer->RequestDelete(); diff --git a/dom/canvas/WebGLContextDraw.cpp b/dom/canvas/WebGLContextDraw.cpp index f895fdced0bf..04cd6bfcac46 100644 --- a/dom/canvas/WebGLContextDraw.cpp +++ b/dom/canvas/WebGLContextDraw.cpp @@ -356,6 +356,7 @@ public: // Check UBO sizes. const auto& linkInfo = mWebGL->mActiveProgramLinkInfo; + for (const auto& cur : linkInfo->uniformBlocks) { const auto& dataSize = cur->mDataSize; const auto& binding = cur->mBinding; @@ -374,18 +375,10 @@ public: *out_error = true; return; } - } - //// - - const auto& tfo = mWebGL->mBoundTransformFeedback; - if (tfo) { - const auto& buffersForTF = tfo->BuffersForTF(); - const auto& buffersForUB = mWebGL->BuffersForUB(); - if (DoSetsIntersect(buffersForTF, buffersForUB)) { - mWebGL->ErrorInvalidOperation("%s: At least one WebGLBuffer is bound for" - " both transform feedback and as a uniform" - " buffer.", + if (binding->mBufferBinding->IsBoundForTF()) { + mWebGL->ErrorInvalidOperation("%s: Buffer for uniform block is bound or" + " in use for transform feedback.", funcName); *out_error = true; return; @@ -394,7 +387,38 @@ public: //// - for (const auto& progAttrib : mWebGL->mActiveProgramLinkInfo->attribs) { + const auto& tfo = mWebGL->mBoundTransformFeedback; + if (tfo && tfo->IsActiveAndNotPaused()) { + uint32_t numUsed; + switch (linkInfo->transformFeedbackBufferMode) { + case LOCAL_GL_INTERLEAVED_ATTRIBS: + numUsed = 1; + break; + + case LOCAL_GL_SEPARATE_ATTRIBS: + numUsed = linkInfo->transformFeedbackVaryings.size(); + break; + + default: + MOZ_CRASH(); + } + + for (uint32_t i = 0; i < numUsed; ++i) { + const auto& buffer = tfo->mIndexedBindings[i].mBufferBinding; + if (buffer->IsBoundForNonTF()) { + mWebGL->ErrorInvalidOperation("%s: Transform feedback varying %u's" + " buffer is bound for" + " non-transform-feedback.", + funcName, i); + *out_error = true; + return; + } + } + } + + //// + + for (const auto& progAttrib : linkInfo->attribs) { const auto& loc = progAttrib.mLoc; if (loc == -1) continue; @@ -404,6 +428,14 @@ public: GLenum attribDataBaseType; if (attribData.mEnabled) { attribDataBaseType = attribData.BaseType(); + + if (attribData.mBuf->IsBoundForTF()) { + mWebGL->ErrorInvalidOperation("%s: Vertex attrib %u's buffer is bound" + " or in use for transform feedback.", + funcName, loc); + *out_error = true; + return; + } } else { attribDataBaseType = mWebGL->mGenericVertexAttribTypes[loc]; } diff --git a/dom/canvas/WebGLContextFramebufferOperations.cpp b/dom/canvas/WebGLContextFramebufferOperations.cpp index 438118b75379..8b797d8a8e5c 100644 --- a/dom/canvas/WebGLContextFramebufferOperations.cpp +++ b/dom/canvas/WebGLContextFramebufferOperations.cpp @@ -37,8 +37,10 @@ WebGLContext::Clear(GLbitfield mask) return; if (mask & LOCAL_GL_COLOR_BUFFER_BIT) { - const auto& resolvedData = mBoundDrawFramebuffer->ResolvedCompleteData(); - for (const auto& cur : resolvedData->colorDrawBuffers) { + for (const auto& cur : mBoundDrawFramebuffer->ColorDrawBuffers()) { + if (!cur->IsDefined()) + continue; + switch (cur->Format()->format->componentType) { case webgl::ComponentType::Float: case webgl::ComponentType::NormInt: diff --git a/dom/canvas/WebGLContextGL.cpp b/dom/canvas/WebGLContextGL.cpp index 25a54445ca95..dfd52184f869 100644 --- a/dom/canvas/WebGLContextGL.cpp +++ b/dom/canvas/WebGLContextGL.cpp @@ -592,12 +592,19 @@ WebGLContext::GetAttribLocation(const WebGLProgram& prog, const nsAString& name) JS::Value WebGLContext::GetBufferParameter(GLenum target, GLenum pname) { + const char funcName[] = "getBufferParameter"; if (IsContextLost()) return JS::NullValue(); - const auto& buffer = ValidateBufferSelection("getBufferParameter", target); - if (!buffer) + const auto& slot = ValidateBufferSlot(funcName, target); + if (!slot) return JS::NullValue(); + const auto& buffer = *slot; + + if (!buffer) { + ErrorInvalidOperation("%s: Buffer for `target` is null.", funcName); + return JS::NullValue(); + } switch (pname) { case LOCAL_GL_BUFFER_SIZE: diff --git a/dom/canvas/WebGLContextVertexArray.cpp b/dom/canvas/WebGLContextVertexArray.cpp index e9f16d3f75e2..5b7a10f220c7 100644 --- a/dom/canvas/WebGLContextVertexArray.cpp +++ b/dom/canvas/WebGLContextVertexArray.cpp @@ -25,6 +25,10 @@ WebGLContext::BindVertexArray(WebGLVertexArray* array) MakeContextCurrent(); + if (mBoundVertexArray) { + mBoundVertexArray->AddBufferBindCounts(-1); + } + if (array == nullptr) { array = mDefaultVertexArray; } @@ -32,6 +36,9 @@ WebGLContext::BindVertexArray(WebGLVertexArray* array) array->BindVertexArray(); MOZ_ASSERT(mBoundVertexArray == array); + if (mBoundVertexArray) { + mBoundVertexArray->AddBufferBindCounts(+1); + } } already_AddRefed diff --git a/dom/canvas/WebGLFramebuffer.cpp b/dom/canvas/WebGLFramebuffer.cpp index becc58bbfde4..0880a120353d 100644 --- a/dom/canvas/WebGLFramebuffer.cpp +++ b/dom/canvas/WebGLFramebuffer.cpp @@ -879,12 +879,11 @@ WebGLFramebuffer::ValidateClearBufferType(const char* funcName, GLenum buffer, return true; const auto& attach = mColorAttachments[drawBuffer]; - if (!count(mResolvedCompleteData->colorDrawBuffers.begin(), - mResolvedCompleteData->colorDrawBuffers.end(), - &attach)) - { + if (!attach.IsDefined()) + return true; + + if (!count(mColorDrawBuffers.begin(), mColorDrawBuffers.end(), &attach)) return true; // DRAW_BUFFERi set to NONE. - } GLenum attachType; switch (attach.Format()->format->componentType) { @@ -1081,32 +1080,14 @@ WebGLFramebuffer::ResolveAttachmentData(const char* funcName) const } WebGLFramebuffer::ResolvedData::ResolvedData(const WebGLFramebuffer& parent) - : hasSampleBuffers(false) - , depthBuffer(nullptr) - , stencilBuffer(nullptr) { - if (parent.mDepthAttachment.IsDefined()) { - depthBuffer = &parent.mDepthAttachment; - } - if (parent.mStencilAttachment.IsDefined()) { - stencilBuffer = &parent.mStencilAttachment; - } - if (parent.mDepthStencilAttachment.IsDefined()) { - depthBuffer = &parent.mDepthStencilAttachment; - stencilBuffer = &parent.mDepthStencilAttachment; - } - //// - - colorDrawBuffers.reserve(parent.mColorDrawBuffers.size()); texDrawBuffers.reserve(parent.mColorDrawBuffers.size() + 2); // +2 for depth+stencil. const auto fnCommon = [&](const WebGLFBAttachPoint& attach) { if (!attach.IsDefined()) return false; - hasSampleBuffers |= bool(attach.Samples()); - if (attach.Texture()) { texDrawBuffers.push_back(&attach); } @@ -1135,7 +1116,6 @@ WebGLFramebuffer::ResolvedData::ResolvedData(const WebGLFramebuffer& parent) return; drawSet.insert(WebGLFBAttachPoint::Ordered(attach)); - colorDrawBuffers.push_back(&attach); } if (parent.mColorReadBuffer) { @@ -1628,46 +1608,51 @@ WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, GLbitfield mask, GLenum filter) { const char funcName[] = "blitFramebuffer"; - auto& gl = webgl->gl; - + const auto& gl = webgl->gl; //// // Collect data - const auto fnGetFormat = [](const WebGLFBAttachPoint* cur) -> const webgl::FormatInfo* + const auto fnGetDepthAndStencilAttach = [](const WebGLFramebuffer* fb, + const WebGLFBAttachPoint** const out_depth, + const WebGLFBAttachPoint** const out_stencil) { - if (!cur) - return nullptr; + *out_depth = nullptr; + *out_stencil = nullptr; - MOZ_ASSERT(cur->IsDefined()); - return cur->Format()->format; + if (!fb) + return; + + if (fb->mDepthStencilAttachment.IsDefined()) { + *out_depth = *out_stencil = &fb->mDepthStencilAttachment; + return; + } + if (fb->mDepthAttachment.IsDefined()) { + *out_depth = &fb->mDepthAttachment; + } + if (fb->mStencilAttachment.IsDefined()) { + *out_stencil = &fb->mStencilAttachment; + } }; - bool srcSampleBuffers; - const webgl::FormatInfo* srcColorFormat; - const webgl::FormatInfo* srcDepthFormat; - const webgl::FormatInfo* srcStencilFormat; - - if (srcFB) { - srcSampleBuffers = srcFB->mResolvedCompleteData->hasSampleBuffers; - - srcColorFormat = fnGetFormat(srcFB->mColorReadBuffer); - srcDepthFormat = fnGetFormat(srcFB->mResolvedCompleteData->depthBuffer); - srcStencilFormat = fnGetFormat(srcFB->mResolvedCompleteData->stencilBuffer); - } else { - srcSampleBuffers = false; // Always false. - - GetBackbufferFormats(webgl, &srcColorFormat, &srcDepthFormat, &srcStencilFormat); - } + const WebGLFBAttachPoint* srcDepthAttach; + const WebGLFBAttachPoint* srcStencilAttach; + fnGetDepthAndStencilAttach(srcFB, &srcDepthAttach, &srcStencilAttach); + const WebGLFBAttachPoint* dstDepthAttach; + const WebGLFBAttachPoint* dstStencilAttach; + fnGetDepthAndStencilAttach(dstFB, &dstDepthAttach, &dstStencilAttach); //// - bool dstSampleBuffers; - const webgl::FormatInfo* dstDepthFormat; - const webgl::FormatInfo* dstStencilFormat; - bool dstHasColor = false; - bool colorFormatsMatch = true; - bool colorTypesMatch = true; + const auto fnGetFormat = [](const WebGLFBAttachPoint* cur, + bool* const out_hasSamples) -> const webgl::FormatInfo* + { + if (!cur || !cur->IsDefined()) + return nullptr; + + *out_hasSamples |= bool(cur->Samples()); + return cur->Format()->format; + }; const auto fnNarrowComponentType = [&](const webgl::FormatInfo* format) { switch (format->componentType) { @@ -1680,25 +1665,58 @@ WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, } }; + bool srcHasSamples; + const webgl::FormatInfo* srcColorFormat; + webgl::ComponentType srcColorType = webgl::ComponentType::None; + const webgl::FormatInfo* srcDepthFormat; + const webgl::FormatInfo* srcStencilFormat; + + if (srcFB) { + srcHasSamples = false; + srcColorFormat = fnGetFormat(srcFB->mColorReadBuffer, &srcHasSamples); + srcDepthFormat = fnGetFormat(srcDepthAttach, &srcHasSamples); + srcStencilFormat = fnGetFormat(srcStencilAttach, &srcHasSamples); + } else { + srcHasSamples = false; // Always false. + + GetBackbufferFormats(webgl, &srcColorFormat, &srcDepthFormat, &srcStencilFormat); + } + + if (srcColorFormat) { + srcColorType = fnNarrowComponentType(srcColorFormat); + } + + //// + + bool dstHasSamples; + const webgl::FormatInfo* dstDepthFormat; + const webgl::FormatInfo* dstStencilFormat; + bool dstHasColor = false; + bool colorFormatsMatch = true; + bool colorTypesMatch = true; + const auto fnCheckColorFormat = [&](const webgl::FormatInfo* dstFormat) { MOZ_ASSERT(dstFormat->r || dstFormat->g || dstFormat->b || dstFormat->a); dstHasColor = true; colorFormatsMatch &= (dstFormat == srcColorFormat); - colorTypesMatch &= ( fnNarrowComponentType(dstFormat) == - fnNarrowComponentType(srcColorFormat) ); + colorTypesMatch &= ( fnNarrowComponentType(dstFormat) == srcColorType ); }; if (dstFB) { - dstSampleBuffers = dstFB->mResolvedCompleteData->hasSampleBuffers; + dstHasSamples = false; - dstDepthFormat = fnGetFormat(dstFB->mResolvedCompleteData->depthBuffer); - dstStencilFormat = fnGetFormat(dstFB->mResolvedCompleteData->stencilBuffer); + for (const auto& cur : dstFB->mColorDrawBuffers) { + const auto& format = fnGetFormat(cur, &dstHasSamples); + if (!format) + continue; - for (const auto& cur : dstFB->mResolvedCompleteData->colorDrawBuffers) { - fnCheckColorFormat(cur->Format()->format); + fnCheckColorFormat(format); } + + dstDepthFormat = fnGetFormat(dstDepthAttach, &dstHasSamples); + dstStencilFormat = fnGetFormat(dstStencilAttach, &dstHasSamples); } else { - dstSampleBuffers = bool(gl->Screen()->Samples()); + dstHasSamples = bool(gl->Screen()->Samples()); const webgl::FormatInfo* dstColorFormat; GetBackbufferFormats(webgl, &dstColorFormat, &dstDepthFormat, &dstStencilFormat); @@ -1772,7 +1790,7 @@ WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, * or I could be missing an interaction in one of the earlier paragraphs. */ if (mask & LOCAL_GL_DEPTH_BUFFER_BIT && - dstDepthFormat != srcDepthFormat) + dstDepthFormat && dstDepthFormat != srcDepthFormat) { webgl->ErrorInvalidOperation("%s: Depth buffer formats must match if selected.", funcName); @@ -1780,7 +1798,7 @@ WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, } if (mask & LOCAL_GL_STENCIL_BUFFER_BIT && - dstStencilFormat != srcStencilFormat) + dstStencilFormat && dstStencilFormat != srcStencilFormat) { webgl->ErrorInvalidOperation("%s: Stencil buffer formats must match if selected.", funcName); @@ -1789,16 +1807,16 @@ WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, //// - if (dstSampleBuffers) { + if (dstHasSamples) { webgl->ErrorInvalidOperation("%s: DRAW_FRAMEBUFFER may not have multiple" " samples.", funcName); return; } - if (srcSampleBuffers) { + if (srcHasSamples) { if (mask & LOCAL_GL_COLOR_BUFFER_BIT && - !colorFormatsMatch) + dstHasColor && !colorFormatsMatch) { webgl->ErrorInvalidOperation("%s: Color buffer formats must match if" " selected, when reading from a multisampled" @@ -1826,27 +1844,25 @@ WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, const WebGLFBAttachPoint* feedback = nullptr; if (mask & LOCAL_GL_COLOR_BUFFER_BIT) { - for (const auto& cur : dstFB->mResolvedCompleteData->colorDrawBuffers) { - if (srcFB->mColorReadBuffer->IsEquivalent(*cur)) { + MOZ_ASSERT(srcFB->mColorReadBuffer->IsDefined()); + for (const auto& cur : dstFB->mColorDrawBuffers) { + if (srcFB->mColorReadBuffer->IsEquivalentForFeedback(*cur)) { feedback = cur; + break; } } } - const auto& srcDepthBuffer = srcFB->mResolvedCompleteData->depthBuffer; - const auto& dstDepthBuffer = dstFB->mResolvedCompleteData->depthBuffer; if (mask & LOCAL_GL_DEPTH_BUFFER_BIT && - srcDepthBuffer->IsEquivalent(*dstDepthBuffer)) + srcDepthAttach->IsEquivalentForFeedback(*dstDepthAttach)) { - feedback = dstDepthBuffer; + feedback = dstDepthAttach; } - const auto& srcStencilBuffer = srcFB->mResolvedCompleteData->stencilBuffer; - const auto& dstStencilBuffer = dstFB->mResolvedCompleteData->stencilBuffer; if (mask & LOCAL_GL_STENCIL_BUFFER_BIT && - srcStencilBuffer->IsEquivalent(*dstStencilBuffer)) + srcStencilAttach->IsEquivalentForFeedback(*dstStencilAttach)) { - feedback = dstStencilBuffer; + feedback = dstStencilAttach; } if (feedback) { diff --git a/dom/canvas/WebGLFramebuffer.h b/dom/canvas/WebGLFramebuffer.h index 41c059c58403..ac457c09881d 100644 --- a/dom/canvas/WebGLFramebuffer.h +++ b/dom/canvas/WebGLFramebuffer.h @@ -102,8 +102,9 @@ public: void OnBackingStoreRespecified() const; - bool IsEquivalent(const WebGLFBAttachPoint& other) const { - MOZ_ASSERT(IsDefined() && other.IsDefined()); + bool IsEquivalentForFeedback(const WebGLFBAttachPoint& other) const { + if (!IsDefined() || !other.IsDefined()) + return false; #define _(X) X == other.X return ( _(mRenderbufferPtr) && @@ -183,12 +184,6 @@ protected: //// struct ResolvedData { - // BlitFramebuffer - bool hasSampleBuffers; - std::vector colorDrawBuffers; // Non-null, defined - const WebGLFBAttachPoint* depthBuffer; // null if not defined - const WebGLFBAttachPoint* stencilBuffer; // null if not defined - // IsFeedback std::vector texDrawBuffers; // Non-null std::set drawSet; diff --git a/dom/canvas/WebGLProgram.cpp b/dom/canvas/WebGLProgram.cpp index 01c7f8d617e9..73567b8c4ed7 100644 --- a/dom/canvas/WebGLProgram.cpp +++ b/dom/canvas/WebGLProgram.cpp @@ -435,6 +435,7 @@ QueryProgramInfo(WebGLProgram* prog, gl::GLContext* gl) webgl::LinkedProgramInfo::LinkedProgramInfo(WebGLProgram* prog) : prog(prog) + , transformFeedbackBufferMode(prog->mNextLink_TransformFeedbackBufferMode) { } webgl::LinkedProgramInfo::~LinkedProgramInfo() @@ -697,21 +698,35 @@ WebGLProgram::GetProgramParameter(GLenum pname) const if (mContext->IsWebGL2()) { switch (pname) { case LOCAL_GL_ACTIVE_UNIFORM_BLOCKS: - return JS::Int32Value(GetProgramiv(gl, mGLName, pname)); + if (!IsLinked()) + return JS::NumberValue(0); + return JS::NumberValue(LinkInfo()->uniformBlocks.size()); case LOCAL_GL_TRANSFORM_FEEDBACK_VARYINGS: - return JS::Int32Value(mNextLink_TransformFeedbackVaryings.size()); + if (!IsLinked()) + return JS::NumberValue(0); + return JS::NumberValue(LinkInfo()->transformFeedbackVaryings.size()); case LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER_MODE: - return JS::Int32Value(mNextLink_TransformFeedbackBufferMode); + if (!IsLinked()) + return JS::NumberValue(LOCAL_GL_INTERLEAVED_ATTRIBS); + return JS::NumberValue(LinkInfo()->transformFeedbackBufferMode); } } switch (pname) { case LOCAL_GL_ATTACHED_SHADERS: + return JS::NumberValue( int(bool(mVertShader.get())) + int(bool(mFragShader)) ); + case LOCAL_GL_ACTIVE_UNIFORMS: + if (!IsLinked()) + return JS::NumberValue(0); + return JS::NumberValue(LinkInfo()->uniforms.size()); + case LOCAL_GL_ACTIVE_ATTRIBUTES: - return JS::Int32Value(GetProgramiv(gl, mGLName, pname)); + if (!IsLinked()) + return JS::NumberValue(0); + return JS::NumberValue(LinkInfo()->attribs.size()); case LOCAL_GL_DELETE_STATUS: return JS::BooleanValue(IsDeleteRequested()); @@ -725,6 +740,7 @@ WebGLProgram::GetProgramParameter(GLenum pname) const if (gl->WorkAroundDriverBugs()) return JS::BooleanValue(true); #endif + // Todo: Implement this in our code. return JS::BooleanValue(bool(GetProgramiv(gl, mGLName, pname))); default: diff --git a/dom/canvas/WebGLProgram.h b/dom/canvas/WebGLProgram.h index 14a6ba86b2fa..0f08d3df3eb9 100644 --- a/dom/canvas/WebGLProgram.h +++ b/dom/canvas/WebGLProgram.h @@ -87,6 +87,7 @@ struct LinkedProgramInfo final ////// WebGLProgram* const prog; + const GLenum transformFeedbackBufferMode; std::vector attribs; std::vector uniforms; // Owns its contents. diff --git a/dom/canvas/WebGLShaderValidator.cpp b/dom/canvas/WebGLShaderValidator.cpp index 2bacbac5c3ce..0c736b2f3ff1 100644 --- a/dom/canvas/WebGLShaderValidator.cpp +++ b/dom/canvas/WebGLShaderValidator.cpp @@ -271,7 +271,7 @@ ShaderValidator::CanLinkTo(const ShaderValidator* prev, nsCString* const out_log continue; if (!itrVert->isSameUniformAtLinkTime(*itrFrag)) { - nsPrintfCString error("Uniform `%s`is not linkable between" + nsPrintfCString error("Uniform `%s` is not linkable between" " attached shaders.", itrFrag->name.c_str()); *out_log = error; @@ -282,6 +282,32 @@ ShaderValidator::CanLinkTo(const ShaderValidator* prev, nsCString* const out_log } } } + { + const auto vertVars = sh::GetInterfaceBlocks(prev->mHandle); + const auto fragVars = sh::GetInterfaceBlocks(mHandle); + if (!vertVars || !fragVars) { + nsPrintfCString error("Could not create uniform block list."); + *out_log = error; + return false; + } + + for (const auto& fragVar : *fragVars) { + for (const auto& vertVar : *vertVars) { + if (vertVar.name != fragVar.name) + continue; + + if (!vertVar.isSameInterfaceBlockAtLinkTime(fragVar)) { + nsPrintfCString error("Interface block `%s` is not linkable between" + " attached shaders.", + fragVar.name.c_str()); + *out_log = error; + return false; + } + + break; + } + } + } const auto& vertVaryings = ShGetVaryings(prev->mHandle); const auto& fragVaryings = ShGetVaryings(mHandle); diff --git a/dom/canvas/WebGLTextureUpload.cpp b/dom/canvas/WebGLTextureUpload.cpp index a469e73f0d76..d4469d65d8bc 100644 --- a/dom/canvas/WebGLTextureUpload.cpp +++ b/dom/canvas/WebGLTextureUpload.cpp @@ -1925,7 +1925,21 @@ ValidateCopyDestUsage(const char* funcName, WebGLContext* webgl, const auto dstFormat = dstUsage->format; - if (dstFormat->componentType != srcFormat->componentType) { + const auto fnNarrowType = [&](webgl::ComponentType type) { + switch (type) { + case webgl::ComponentType::NormInt: + case webgl::ComponentType::NormUInt: + // These both count as "fixed-point". + return webgl::ComponentType::NormInt; + + default: + return type; + } + }; + + const auto srcType = fnNarrowType(srcFormat->componentType); + const auto dstType = fnNarrowType(dstFormat->componentType); + if (dstType != srcType) { webgl->ErrorInvalidOperation("%s: For sized internalFormats, source and dest" " component types must match. (source: %s, dest:" " %s)", diff --git a/dom/canvas/WebGLTransformFeedback.cpp b/dom/canvas/WebGLTransformFeedback.cpp index 6e5c0b745444..feec581eaaef 100644 --- a/dom/canvas/WebGLTransformFeedback.cpp +++ b/dom/canvas/WebGLTransformFeedback.cpp @@ -17,7 +17,6 @@ WebGLTransformFeedback::WebGLTransformFeedback(WebGLContext* webgl, GLuint tf) , mIndexedBindings(webgl->mGLMaxTransformFeedbackSeparateAttribs) , mIsPaused(false) , mIsActive(false) - , mBuffersForTF_Dirty(true) { mContext->mTransformFeedbacks.insertBack(this); } @@ -37,28 +36,6 @@ WebGLTransformFeedback::Delete() removeFrom(mContext->mTransformFeedbacks); } -//// - -const decltype(WebGLTransformFeedback::mBuffersForTF)& -WebGLTransformFeedback::BuffersForTF() const -{ - // The generic bind point cannot incur undefined read/writes because otherwise it - // would be impossible to read back from this. The spec implies that readback from - // the TRANSFORM_FEEDBACK target is possible, just not simultaneously with being - // "bound or in use for transform feedback". - // Therefore, only the indexed bindings of the TFO count. - if (mBuffersForTF_Dirty) { - mBuffersForTF.clear(); - for (const auto& cur : mIndexedBindings) { - if (cur.mBufferBinding) { - mBuffersForTF.insert(cur.mBufferBinding.get()); - } - } - mBuffersForTF_Dirty = false; - } - return mBuffersForTF; -} - //////////////////////////////////////// void @@ -209,6 +186,18 @@ WebGLTransformFeedback::ResumeTransformFeedback() //////////////////////////////////////// +void +WebGLTransformFeedback::AddBufferBindCounts(int8_t addVal) const +{ + const GLenum target = LOCAL_GL_TRANSFORM_FEEDBACK_BUFFER; + WebGLBuffer::AddBindCount(target, mGenericBufferBinding.get(), addVal); + for (const auto& binding : mIndexedBindings) { + WebGLBuffer::AddBindCount(target, binding.mBufferBinding.get(), addVal); + } +} + +//////////////////////////////////////// + JSObject* WebGLTransformFeedback::WrapObject(JSContext* cx, JS::Handle givenProto) { diff --git a/dom/canvas/WebGLTransformFeedback.h b/dom/canvas/WebGLTransformFeedback.h index d97484a99b47..aa57372a5956 100644 --- a/dom/canvas/WebGLTransformFeedback.h +++ b/dom/canvas/WebGLTransformFeedback.h @@ -17,6 +17,7 @@ class WebGLTransformFeedback final , public WebGLRefCountedObject , public LinkedListElement { + friend class ScopedDrawHelper; friend class ScopedDrawWithTransformFeedback; friend class WebGLContext; friend class WebGL2Context; @@ -36,9 +37,6 @@ private: MOZ_INIT_OUTSIDE_CTOR size_t mActive_VertPosition; MOZ_INIT_OUTSIDE_CTOR size_t mActive_VertCapacity; - mutable bool mBuffersForTF_Dirty; - mutable std::set mBuffersForTF; - public: WebGLTransformFeedback(WebGLContext* webgl, GLuint tf); private: @@ -52,10 +50,9 @@ public: WebGLContext* GetParentObject() const { return mContext; } virtual JSObject* WrapObject(JSContext*, JS::Handle) override; - //// + bool IsActiveAndNotPaused() const { return mIsActive && !mIsPaused; } - void OnIndexedBindingsChanged() const { mBuffersForTF_Dirty = true; } - const decltype(mBuffersForTF)& BuffersForTF() const; + void AddBufferBindCounts(int8_t addVal) const; // GL Funcs void BeginTransformFeedback(GLenum primMode); diff --git a/dom/canvas/WebGLVertexArray.cpp b/dom/canvas/WebGLVertexArray.cpp index 180135b6880b..e0c30ab51eb9 100644 --- a/dom/canvas/WebGLVertexArray.cpp +++ b/dom/canvas/WebGLVertexArray.cpp @@ -28,6 +28,21 @@ WebGLVertexArray::WebGLVertexArray(WebGLContext* webgl) mContext->mVertexArrays.insertBack(this); } +WebGLVertexArray::~WebGLVertexArray() +{ + MOZ_ASSERT(IsDeleted()); +} + +void +WebGLVertexArray::AddBufferBindCounts(int8_t addVal) const +{ + const GLenum target = 0; // Anything non-TF is fine. + WebGLBuffer::AddBindCount(target, mElementArrayBuffer.get(), addVal); + for (const auto& attrib : mAttribs) { + WebGLBuffer::AddBindCount(target, attrib.mBuf.get(), addVal); + } +} + WebGLVertexArray* WebGLVertexArray::Create(WebGLContext* webgl) { diff --git a/dom/canvas/WebGLVertexArray.h b/dom/canvas/WebGLVertexArray.h index 516fbaa1bd43..74f714af13b9 100644 --- a/dom/canvas/WebGLVertexArray.h +++ b/dom/canvas/WebGLVertexArray.h @@ -10,7 +10,6 @@ #include "mozilla/LinkedList.h" #include "nsWrapperCache.h" -#include "WebGLBuffer.h" #include "WebGLObjectModel.h" #include "WebGLStrongTypes.h" #include "WebGLVertexAttribData.h" @@ -48,12 +47,11 @@ public: GLuint GLName() const { return mGLName; } + void AddBufferBindCounts(int8_t addVal) const; + protected: explicit WebGLVertexArray(WebGLContext* webgl); - - virtual ~WebGLVertexArray() { - MOZ_ASSERT(IsDeleted()); - } + virtual ~WebGLVertexArray(); virtual void GenVertexArray() = 0; virtual void BindVertexArrayImpl() = 0; diff --git a/dom/canvas/WebGLVertexAttribData.cpp b/dom/canvas/WebGLVertexAttribData.cpp index e62014c3bc01..b5aee18e5c42 100644 --- a/dom/canvas/WebGLVertexAttribData.cpp +++ b/dom/canvas/WebGLVertexAttribData.cpp @@ -6,6 +6,7 @@ #include "WebGLVertexAttribData.h" #include "GLContext.h" +#include "WebGLBuffer.h" namespace mozilla { @@ -71,7 +72,7 @@ WebGLVertexAttribData::VertexAttribPointer(bool integerFunc, WebGLBuffer* buf, uint32_t stride, uint64_t byteOffset) { mIntegerFunc = integerFunc; - mBuf = buf; + WebGLBuffer::SetSlot(0, buf, &mBuf); mType = type; mBaseType = AttribPointerBaseType(integerFunc, type); mSize = size; diff --git a/dom/canvas/test/webgl-conf/checkout/conformance2/buffers/bound-buffer-size-change-test.html b/dom/canvas/test/webgl-conf/checkout/conformance2/buffers/bound-buffer-size-change-test.html index 35532834c99f..a9d13496abd1 100644 --- a/dom/canvas/test/webgl-conf/checkout/conformance2/buffers/bound-buffer-size-change-test.html +++ b/dom/canvas/test/webgl-conf/checkout/conformance2/buffers/bound-buffer-size-change-test.html @@ -61,8 +61,6 @@ shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0)", "0"); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0)", "0"); gl.bufferData(gl.TRANSFORM_FEEDBACK_BUFFER, 4, gl.STATIC_DRAW); -wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION); - shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0)", "buffer1"); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0)", "0"); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0)", "0"); @@ -99,13 +97,11 @@ shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0)", "8"); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0)", "4"); gl.bufferData(gl.TRANSFORM_FEEDBACK_BUFFER, 4, gl.STATIC_DRAW); -wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0)", "buffer3"); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0)", "8"); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0)", "4"); gl.bufferData(gl.TRANSFORM_FEEDBACK_BUFFER, 12, gl.STATIC_DRAW); -wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0)", "buffer3"); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_SIZE, 0)", "8"); shouldBe("gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_START, 0)", "4"); diff --git a/dom/crypto/CryptoKey.cpp b/dom/crypto/CryptoKey.cpp index 8763835bf335..453dfeb48515 100644 --- a/dom/crypto/CryptoKey.cpp +++ b/dom/crypto/CryptoKey.cpp @@ -6,7 +6,6 @@ #include "CryptoKey.h" -#include "ScopedNSSTypes.h" #include "cryptohi.h" #include "mozilla/ArrayUtils.h" #include "mozilla/dom/SubtleCryptoBinding.h" @@ -85,19 +84,21 @@ PrivateKeyFromPrivateKeyTemplate(CK_ATTRIBUTE* aTemplate, CK_ULONG aTemplateSize) { // Create a generic object with the contents of the key - ScopedPK11SlotInfo slot(PK11_GetInternalSlot()); + UniquePK11SlotInfo slot(PK11_GetInternalSlot()); if (!slot) { return nullptr; } // Generate a random 160-bit object ID. This ID must be unique. - ScopedSECItem objID(::SECITEM_AllocItem(nullptr, nullptr, 20)); - SECStatus rv = PK11_GenerateRandomOnSlot(slot, objID->data, objID->len); + UniqueSECItem objID(::SECITEM_AllocItem(nullptr, nullptr, 20)); + SECStatus rv = PK11_GenerateRandomOnSlot(slot.get(), objID->data, objID->len); if (rv != SECSuccess) { return nullptr; } // Check if something is already using this ID. - SECKEYPrivateKey* preexistingKey = PK11_FindKeyByKeyID(slot, objID, nullptr); + SECKEYPrivateKey* preexistingKey = PK11_FindKeyByKeyID(slot.get(), + objID.get(), + nullptr); if (preexistingKey) { // Note that we can't just call SECKEY_DestroyPrivateKey here because that // will destroy the PKCS#11 object that is backing a preexisting key (that @@ -106,11 +107,11 @@ PrivateKeyFromPrivateKeyTemplate(CK_ATTRIBUTE* aTemplate, // fail. DestroyPrivateKeyWithoutDestroyingPKCS11Object(preexistingKey); // Try again with a new ID (but only once - collisions are very unlikely). - rv = PK11_GenerateRandomOnSlot(slot, objID->data, objID->len); + rv = PK11_GenerateRandomOnSlot(slot.get(), objID->data, objID->len); if (rv != SECSuccess) { return nullptr; } - preexistingKey = PK11_FindKeyByKeyID(slot, objID, nullptr); + preexistingKey = PK11_FindKeyByKeyID(slot.get(), objID.get(), nullptr); if (preexistingKey) { DestroyPrivateKeyWithoutDestroyingPKCS11Object(preexistingKey); return nullptr; @@ -133,7 +134,7 @@ PrivateKeyFromPrivateKeyTemplate(CK_ATTRIBUTE* aTemplate, idAttributeSlot->pValue = objID->data; idAttributeSlot->ulValueLen = objID->len; - ScopedPK11GenericObject obj(PK11_CreateGenericObject(slot, + UniquePK11GenericObject obj(PK11_CreateGenericObject(slot.get(), aTemplate, aTemplateSize, PR_FALSE)); @@ -146,7 +147,7 @@ PrivateKeyFromPrivateKeyTemplate(CK_ATTRIBUTE* aTemplate, } // Have NSS translate the object to a private key. - return PK11_FindKeyByKeyID(slot, objID, nullptr); + return PK11_FindKeyByKeyID(slot.get(), objID.get(), nullptr); } CryptoKey::CryptoKey(nsIGlobalObject* aGlobal) @@ -331,7 +332,7 @@ CryptoKey::AddPublicKeyData(SECKEYPublicKey* aPublicKey) // Read EC params. ScopedAutoSECItem params; - SECStatus rv = PK11_ReadRawAttribute(PK11_TypePrivKey, mPrivateKey, + SECStatus rv = PK11_ReadRawAttribute(PK11_TypePrivKey, mPrivateKey.get(), CKA_EC_PARAMS, ¶ms); if (rv != SECSuccess) { return NS_ERROR_DOM_OPERATION_ERR; @@ -339,7 +340,8 @@ CryptoKey::AddPublicKeyData(SECKEYPublicKey* aPublicKey) // Read private value. ScopedAutoSECItem value; - rv = PK11_ReadRawAttribute(PK11_TypePrivKey, mPrivateKey, CKA_VALUE, &value); + rv = PK11_ReadRawAttribute(PK11_TypePrivKey, mPrivateKey.get(), CKA_VALUE, + &value); if (rv != SECSuccess) { return NS_ERROR_DOM_OPERATION_ERR; } @@ -362,8 +364,8 @@ CryptoKey::AddPublicKeyData(SECKEYPublicKey* aPublicKey) { CKA_VALUE, value.data, value.len }, }; - mPrivateKey = PrivateKeyFromPrivateKeyTemplate(keyTemplate, - ArrayLength(keyTemplate)); + mPrivateKey = UniqueSECKEYPrivateKey( + PrivateKeyFromPrivateKeyTemplate(keyTemplate, ArrayLength(keyTemplate))); NS_ENSURE_TRUE(mPrivateKey, NS_ERROR_DOM_OPERATION_ERR); return NS_OK; @@ -459,7 +461,7 @@ CryptoKey::SetPrivateKey(SECKEYPrivateKey* aPrivateKey) return NS_OK; } - mPrivateKey = SECKEY_CopyPrivateKey(aPrivateKey); + mPrivateKey = UniqueSECKEYPrivateKey(SECKEY_CopyPrivateKey(aPrivateKey)); return mPrivateKey ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } @@ -473,7 +475,7 @@ CryptoKey::SetPublicKey(SECKEYPublicKey* aPublicKey) return NS_OK; } - mPublicKey = SECKEY_CopyPublicKey(aPublicKey); + mPublicKey = UniqueSECKEYPublicKey(SECKEY_CopyPublicKey(aPublicKey)); return mPublicKey ? NS_OK : NS_ERROR_OUT_OF_MEMORY; } @@ -510,8 +512,8 @@ void CryptoKey::virtualDestroyNSSReference() void CryptoKey::destructorSafeDestroyNSSReference() { - mPrivateKey.dispose(); - mPublicKey.dispose(); + mPrivateKey = nullptr; + mPublicKey = nullptr; } @@ -522,18 +524,18 @@ CryptoKey::PrivateKeyFromPkcs8(CryptoBuffer& aKeyData, const nsNSSShutDownPreventionLock& /*proofOfLock*/) { SECKEYPrivateKey* privKey; - ScopedPK11SlotInfo slot(PK11_GetInternalSlot()); + UniquePK11SlotInfo slot(PK11_GetInternalSlot()); if (!slot) { return nullptr; } - ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); + UniquePLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); if (!arena) { return nullptr; } SECItem pkcs8Item = { siBuffer, nullptr, 0 }; - if (!aKeyData.ToSECItem(arena, &pkcs8Item)) { + if (!aKeyData.ToSECItem(arena.get(), &pkcs8Item)) { return nullptr; } @@ -554,17 +556,18 @@ SECKEYPublicKey* CryptoKey::PublicKeyFromSpki(CryptoBuffer& aKeyData, const nsNSSShutDownPreventionLock& /*proofOfLock*/) { - ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); + UniquePLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); if (!arena) { return nullptr; } SECItem spkiItem = { siBuffer, nullptr, 0 }; - if (!aKeyData.ToSECItem(arena, &spkiItem)) { + if (!aKeyData.ToSECItem(arena.get(), &spkiItem)) { return nullptr; } - ScopedCERTSubjectPublicKeyInfo spki(SECKEY_DecodeDERSubjectPublicKeyInfo(&spkiItem)); + UniqueCERTSubjectPublicKeyInfo spki( + SECKEY_DecodeDERSubjectPublicKeyInfo(&spkiItem)); if (!spki) { return nullptr; } @@ -599,12 +602,12 @@ CryptoKey::PublicKeyFromSpki(CryptoBuffer& aKeyData, } } - ScopedSECKEYPublicKey tmp(SECKEY_ExtractPublicKey(spki.get())); + UniqueSECKEYPublicKey tmp(SECKEY_ExtractPublicKey(spki.get())); if (!tmp.get() || !PublicKeyValid(tmp.get())) { return nullptr; } - return SECKEY_CopyPublicKey(tmp); + return SECKEY_CopyPublicKey(tmp.get()); } nsresult @@ -612,7 +615,7 @@ CryptoKey::PrivateKeyToPkcs8(SECKEYPrivateKey* aPrivKey, CryptoBuffer& aRetVal, const nsNSSShutDownPreventionLock& /*proofOfLock*/) { - ScopedSECItem pkcs8Item(PK11_ExportDERPrivateKeyInfo(aPrivKey, nullptr)); + UniqueSECItem pkcs8Item(PK11_ExportDERPrivateKeyInfo(aPrivKey, nullptr)); if (!pkcs8Item.get()) { return NS_ERROR_DOM_INVALID_ACCESS_ERR; } @@ -661,18 +664,18 @@ CryptoKey::PublicKeyToSpki(SECKEYPublicKey* aPubKey, CryptoBuffer& aRetVal, const nsNSSShutDownPreventionLock& /*proofOfLock*/) { - ScopedCERTSubjectPublicKeyInfo spki; + UniqueCERTSubjectPublicKeyInfo spki; // NSS doesn't support exporting DH public keys. if (aPubKey->keyType == dhKey) { // Mimic the behavior of SECKEY_CreateSubjectPublicKeyInfo() and create // a new arena for the SPKI object. - ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); + UniquePLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); if (!arena) { return NS_ERROR_DOM_OPERATION_ERR; } - spki = PORT_ArenaZNew(arena, CERTSubjectPublicKeyInfo); + spki.reset(PORT_ArenaZNew(arena.get(), CERTSubjectPublicKeyInfo)); if (!spki) { return NS_ERROR_DOM_OPERATION_ERR; } @@ -680,12 +683,12 @@ CryptoKey::PublicKeyToSpki(SECKEYPublicKey* aPubKey, // Assign |arena| to |spki| and null the variable afterwards so that the // arena created above that holds the SPKI object is free'd when |spki| // goes out of scope, not when |arena| does. - spki->arena = arena.forget(); + spki->arena = arena.release(); - nsresult rv = PublicDhKeyToSpki(aPubKey, spki); + nsresult rv = PublicDhKeyToSpki(aPubKey, spki.get()); NS_ENSURE_SUCCESS(rv, rv); } else { - spki = SECKEY_CreateSubjectPublicKeyInfo(aPubKey); + spki.reset(SECKEY_CreateSubjectPublicKeyInfo(aPubKey)); if (!spki) { return NS_ERROR_DOM_OPERATION_ERR; } @@ -713,7 +716,7 @@ CryptoKey::PublicKeyToSpki(SECKEYPublicKey* aPubKey, } const SEC_ASN1Template* tpl = SEC_ASN1_GET(CERT_SubjectPublicKeyInfoTemplate); - ScopedSECItem spkiItem(SEC_ASN1EncodeItem(nullptr, nullptr, spki, tpl)); + UniqueSECItem spkiItem(SEC_ASN1EncodeItem(nullptr, nullptr, spki.get(), tpl)); if (!aRetVal.Assign(spkiItem.get())) { return NS_ERROR_DOM_OPERATION_ERR; @@ -767,7 +770,7 @@ CryptoKey::PrivateKeyFromJwk(const JsonWebKey& aJwk, return nullptr; } - ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); + UniquePLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); if (!arena) { return nullptr; } @@ -816,11 +819,6 @@ CryptoKey::PrivateKeyFromJwk(const JsonWebKey& aJwk, return nullptr; } - ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); - if (!arena) { - return nullptr; - } - // Populate template from parameters CK_KEY_TYPE rsaValue = CKK_RSA; CK_ATTRIBUTE keyTemplate[14] = { @@ -915,8 +913,8 @@ ECKeyToJwk(const PK11ObjectType aKeyType, void* aKey, const SECItem* aEcParams, return false; } - ScopedSECItem ecPointX(::SECITEM_AllocItem(nullptr, nullptr, flen)); - ScopedSECItem ecPointY(::SECITEM_AllocItem(nullptr, nullptr, flen)); + UniqueSECItem ecPointX(::SECITEM_AllocItem(nullptr, nullptr, flen)); + UniqueSECItem ecPointY(::SECITEM_AllocItem(nullptr, nullptr, flen)); if (!ecPointX || !ecPointY) { return false; } @@ -926,8 +924,10 @@ ECKeyToJwk(const PK11ObjectType aKeyType, void* aKey, const SECItem* aEcParams, memcpy(ecPointY->data, aPublicValue->data + 1 + flen, flen); CryptoBuffer x, y; - if (!x.Assign(ecPointX) || NS_FAILED(x.ToJwkBase64(aRetVal.mX.Value())) || - !y.Assign(ecPointY) || NS_FAILED(y.ToJwkBase64(aRetVal.mY.Value()))) { + if (!x.Assign(ecPointX.get()) || + NS_FAILED(x.ToJwkBase64(aRetVal.mX.Value())) || + !y.Assign(ecPointY.get()) || + NS_FAILED(y.ToJwkBase64(aRetVal.mY.Value()))) { return false; } @@ -1003,16 +1003,16 @@ CryptoKey::PrivateKeyToJwk(SECKEYPrivateKey* aPrivKey, SECKEYPublicKey* CreateECPublicKey(const SECItem* aKeyData, const nsString& aNamedCurve) { - ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); + UniquePLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); if (!arena) { return nullptr; } - // It's important that this be a ScopedSECKEYPublicKey, as this ensures that + // It's important that this be a UniqueSECKEYPublicKey, as this ensures that // SECKEY_DestroyPublicKey will be called on it. If this doesn't happen, when // CryptoKey::PublicKeyValid is called on it and it gets moved to the internal // PKCS#11 slot, it will leak a reference to the slot. - ScopedSECKEYPublicKey key(PORT_ArenaZNew(arena, SECKEYPublicKey)); + UniqueSECKEYPublicKey key(PORT_ArenaZNew(arena.get(), SECKEYPublicKey)); if (!key) { return nullptr; } @@ -1023,7 +1023,7 @@ CreateECPublicKey(const SECItem* aKeyData, const nsString& aNamedCurve) key->pkcs11ID = CK_INVALID_HANDLE; // Create curve parameters. - SECItem* params = CreateECParamsForCurve(aNamedCurve, arena); + SECItem* params = CreateECParamsForCurve(aNamedCurve, arena.get()); if (!params) { return nullptr; } @@ -1033,11 +1033,11 @@ CreateECPublicKey(const SECItem* aKeyData, const nsString& aNamedCurve) key->u.ec.publicValue = *aKeyData; // Ensure the given point is on the curve. - if (!CryptoKey::PublicKeyValid(key)) { + if (!CryptoKey::PublicKeyValid(key.get())) { return nullptr; } - return SECKEY_CopyPublicKey(key); + return SECKEY_CopyPublicKey(key.get()); } SECKEYPublicKey* @@ -1068,7 +1068,7 @@ CryptoKey::PublicKeyFromJwk(const JsonWebKey& aJwk, {0,} }; - ScopedSECItem pkDer(SEC_ASN1EncodeItem(nullptr, nullptr, &input, + UniqueSECItem pkDer(SEC_ASN1EncodeItem(nullptr, nullptr, &input, rsaPublicKeyTemplate)); if (!pkDer.get()) { return nullptr; @@ -1086,7 +1086,7 @@ CryptoKey::PublicKeyFromJwk(const JsonWebKey& aJwk, return nullptr; } - ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); + UniquePLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); if (!arena) { return nullptr; } @@ -1146,12 +1146,12 @@ CryptoKey::PublicDhKeyFromRaw(CryptoBuffer& aKeyData, const CryptoBuffer& aGenerator, const nsNSSShutDownPreventionLock& /*proofOfLock*/) { - ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); + UniquePLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); if (!arena) { return nullptr; } - SECKEYPublicKey* key = PORT_ArenaZNew(arena, SECKEYPublicKey); + SECKEYPublicKey* key = PORT_ArenaZNew(arena.get(), SECKEYPublicKey); if (!key) { return nullptr; } @@ -1161,9 +1161,9 @@ CryptoKey::PublicDhKeyFromRaw(CryptoBuffer& aKeyData, key->pkcs11ID = CK_INVALID_HANDLE; // Set DH public key params. - if (!aPrime.ToSECItem(arena, &key->u.dh.prime) || - !aGenerator.ToSECItem(arena, &key->u.dh.base) || - !aKeyData.ToSECItem(arena, &key->u.dh.publicValue)) { + if (!aPrime.ToSECItem(arena.get(), &key->u.dh.prime) || + !aGenerator.ToSECItem(arena.get(), &key->u.dh.base) || + !aKeyData.ToSECItem(arena.get(), &key->u.dh.publicValue)) { return nullptr; } @@ -1190,13 +1190,13 @@ CryptoKey::PublicECKeyFromRaw(CryptoBuffer& aKeyData, const nsString& aNamedCurve, const nsNSSShutDownPreventionLock& /*proofOfLock*/) { - ScopedPLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); + UniquePLArenaPool arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)); if (!arena) { return nullptr; } SECItem rawItem = { siBuffer, nullptr, 0 }; - if (!aKeyData.ToSECItem(arena, &rawItem)) { + if (!aKeyData.ToSECItem(arena.get(), &rawItem)) { return nullptr; } @@ -1239,7 +1239,7 @@ CryptoKey::PublicECKeyToRaw(SECKEYPublicKey* aPubKey, bool CryptoKey::PublicKeyValid(SECKEYPublicKey* aPubKey) { - ScopedPK11SlotInfo slot(PK11_GetInternalSlot()); + UniquePK11SlotInfo slot(PK11_GetInternalSlot()); if (!slot.get()) { return false; } @@ -1247,12 +1247,12 @@ CryptoKey::PublicKeyValid(SECKEYPublicKey* aPubKey) // This assumes that NSS checks the validity of a public key when // it is imported into a PKCS#11 module, and returns CK_INVALID_HANDLE // if it is invalid. - CK_OBJECT_HANDLE id = PK11_ImportPublicKey(slot, aPubKey, PR_FALSE); + CK_OBJECT_HANDLE id = PK11_ImportPublicKey(slot.get(), aPubKey, PR_FALSE); if (id == CK_INVALID_HANDLE) { return false; } - SECStatus rv = PK11_DestroyObject(slot, id); + SECStatus rv = PK11_DestroyObject(slot.get(), id); return (rv == SECSuccess); } @@ -1273,13 +1273,14 @@ CryptoKey::WriteStructuredClone(JSStructuredCloneWriter* aWriter) const CryptoBuffer priv, pub; if (mPrivateKey) { - if (NS_FAILED(CryptoKey::PrivateKeyToPkcs8(mPrivateKey, priv, locker))) { + if (NS_FAILED(CryptoKey::PrivateKeyToPkcs8(mPrivateKey.get(), priv, + locker))) { return false; } } if (mPublicKey) { - if (NS_FAILED(CryptoKey::PublicKeyToSpki(mPublicKey, pub, locker))) { + if (NS_FAILED(CryptoKey::PublicKeyToSpki(mPublicKey.get(), pub, locker))) { return false; } } @@ -1321,10 +1322,12 @@ CryptoKey::ReadStructuredClone(JSStructuredCloneReader* aReader) return false; } if (priv.Length() > 0) { - mPrivateKey = CryptoKey::PrivateKeyFromPkcs8(priv, locker); + mPrivateKey = UniqueSECKEYPrivateKey( + CryptoKey::PrivateKeyFromPkcs8(priv, locker)); } if (pub.Length() > 0) { - mPublicKey = CryptoKey::PublicKeyFromSpki(pub, locker); + mPublicKey = UniqueSECKEYPublicKey( + CryptoKey::PublicKeyFromSpki(pub, locker)); } // Ensure that what we've read is consistent diff --git a/dom/crypto/CryptoKey.h b/dom/crypto/CryptoKey.h index 31f7a84aabf0..422c5c2a77a6 100644 --- a/dom/crypto/CryptoKey.h +++ b/dom/crypto/CryptoKey.h @@ -202,8 +202,8 @@ private: // Only one key handle should be set, according to the KeyType CryptoBuffer mSymKey; - ScopedSECKEYPrivateKey mPrivateKey; - ScopedSECKEYPublicKey mPublicKey; + UniqueSECKEYPrivateKey mPrivateKey; + UniqueSECKEYPublicKey mPublicKey; }; } // namespace dom diff --git a/dom/events/EventListenerManager.cpp b/dom/events/EventListenerManager.cpp index f11e2b20ba8c..cf24c7b231bb 100644 --- a/dom/events/EventListenerManager.cpp +++ b/dom/events/EventListenerManager.cpp @@ -29,8 +29,13 @@ #include "mozilla/dom/TouchEvent.h" #include "mozilla/TimelineConsumers.h" #include "mozilla/EventTimelineMarker.h" +#include "mozilla/TimeStamp.h" #include "EventListenerService.h" +#include "GeckoProfiler.h" +#ifdef MOZ_ENABLE_PROFILER_SPS +#include "ProfilerMarkers.h" +#endif #include "nsCOMArray.h" #include "nsCOMPtr.h" #include "nsContentUtils.h" @@ -1281,7 +1286,39 @@ EventListenerManager::HandleEventInternal(nsPresContext* aPresContext, listener = listenerHolder.ptr(); hasRemovedListener = true; } - if (NS_FAILED(HandleEventSubType(listener, *aDOMEvent, aCurrentTarget))) { + + nsresult rv = NS_OK; + if (profiler_is_active()) { +#ifdef MOZ_ENABLE_PROFILER_SPS + // Add a profiler label and a profiler marker for the actual + // dispatch of the event. + // This is a very hot code path, so we need to make sure not to + // do this extra work when we're not profiling. + nsAutoString typeStr; + (*aDOMEvent)->GetType(typeStr); + PROFILER_LABEL_PRINTF("EventListenerManager", "HandleEventInternal", + js::ProfileEntry::Category::EVENTS, + "%s", + NS_LossyConvertUTF16toASCII(typeStr).get()); + TimeStamp startTime = TimeStamp::Now(); + + rv = HandleEventSubType(listener, *aDOMEvent, aCurrentTarget); + + TimeStamp endTime = TimeStamp::Now(); + uint16_t phase; + (*aDOMEvent)->GetEventPhase(&phase); + PROFILER_MARKER_PAYLOAD("DOMEvent", + new DOMEventMarkerPayload(typeStr, phase, + startTime, + endTime)); +#else + MOZ_CRASH("SPS profiler is N/A but profiler_is_active() returned true"); +#endif + } else { + rv = HandleEventSubType(listener, *aDOMEvent, aCurrentTarget); + } + + if (NS_FAILED(rv)) { aEvent->mFlags.mExceptionWasRaised = true; } aEvent->mFlags.mInPassiveListener = false; diff --git a/dom/gamepad/windows/WindowsGamepad.cpp b/dom/gamepad/windows/WindowsGamepad.cpp index 5f60fd0b79d8..9f2c30654024 100644 --- a/dom/gamepad/windows/WindowsGamepad.cpp +++ b/dom/gamepad/windows/WindowsGamepad.cpp @@ -329,11 +329,31 @@ private: HMODULE mModule; }; +HWND sHWnd = nullptr; + +static void +DirectInputMessageLoopOnceCallback(nsITimer *aTimer, void* aClosure) +{ + MOZ_ASSERT(NS_GetCurrentThread() == gMonitorThread); + MSG msg; + while (PeekMessageW(&msg, sHWnd, 0, 0, PM_REMOVE) > 0) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + aTimer->Cancel(); + if (!sIsShutdown) { + aTimer->InitWithFuncCallback(DirectInputMessageLoopOnceCallback, + nullptr, kWindowsGamepadPollInterval, + nsITimer::TYPE_ONE_SHOT); + } +} + class WindowsGamepadService { public: WindowsGamepadService() { + mDirectInputTimer = do_CreateInstance("@mozilla.org/timer;1"); mXInputTimer = do_CreateInstance("@mozilla.org/timer;1"); mDeviceChangeTimer = do_CreateInstance("@mozilla.org/timer;1"); } @@ -343,6 +363,15 @@ class WindowsGamepadService } void DevicesChanged(bool aIsStablizing); + + void StartMessageLoop() + { + MOZ_ASSERT(mDirectInputTimer); + mDirectInputTimer->InitWithFuncCallback(DirectInputMessageLoopOnceCallback, + nullptr, kWindowsGamepadPollInterval, + nsITimer::TYPE_ONE_SHOT); + } + void Startup(); void Shutdown(); // Parse gamepad input from a WM_INPUT message. @@ -373,6 +402,7 @@ class WindowsGamepadService HIDLoader mHID; XInputLoader mXInput; + nsCOMPtr mDirectInputTimer; nsCOMPtr mXInputTimer; nsCOMPtr mDeviceChangeTimer; }; @@ -892,6 +922,9 @@ void WindowsGamepadService::Cleanup() { mIsXInputMonitoring = false; + if (mDirectInputTimer) { + mDirectInputTimer->Cancel(); + } if (mXInputTimer) { mXInputTimer->Cancel(); } @@ -914,8 +947,6 @@ WindowsGamepadService::DevicesChanged(bool aIsStablizing) } } -HWND sHWnd = nullptr; - bool RegisterRawInput(HWND hwnd, bool enable) { @@ -964,29 +995,6 @@ GamepadWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return DefWindowProc(hwnd, msg, wParam, lParam); } -class WindowGamepadMessageLoopOnceRunnable final : public Runnable -{ -public: - WindowGamepadMessageLoopOnceRunnable() {} - NS_IMETHOD Run() override - { - MOZ_ASSERT(NS_GetCurrentThread() == gMonitorThread); - MSG msg; - while (PeekMessageW(&msg, sHWnd, 0, 0, PM_REMOVE) > 0) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - if (!sIsShutdown) { - nsCOMPtr runnable = new WindowGamepadMessageLoopOnceRunnable(); - NS_DelayedDispatchToCurrentThread(runnable.forget(), - kWindowsGamepadPollInterval); - } - return NS_OK; - } -private: - ~WindowGamepadMessageLoopOnceRunnable() {} -}; - class StartWindowsGamepadServiceRunnable final : public Runnable { public: @@ -1017,7 +1025,7 @@ public: } // Explicitly start the message loop - NS_DispatchToCurrentThread(new WindowGamepadMessageLoopOnceRunnable()); + gService->StartMessageLoop(); return NS_OK; } diff --git a/dom/html/TextTrackManager.cpp b/dom/html/TextTrackManager.cpp index f138e686c224..1c5782c4cf71 100644 --- a/dom/html/TextTrackManager.cpp +++ b/dom/html/TextTrackManager.cpp @@ -491,11 +491,13 @@ class CompareSimpleTextTrackEvents { private: int32_t TrackChildPosition(SimpleTextTrackEvent* aEvent) const { - HTMLTrackElement* trackElement = aEvent->mTrack->GetTrackElement();; - if (!trackElement) { - return -1; + if (aEvent->mTrack) { + HTMLTrackElement* trackElement = aEvent->mTrack->GetTrackElement(); + if (trackElement) { + return mMediaElement->IndexOf(trackElement); + } } - return mMediaElement->IndexOf(trackElement); + return -1; } HTMLMediaElement* mMediaElement; public: diff --git a/dom/indexedDB/test/unit/wasm_recompile_profile.zip b/dom/indexedDB/test/unit/wasm_recompile_profile.zip index 5e1144db47be..50ca3ef898de 100644 Binary files a/dom/indexedDB/test/unit/wasm_recompile_profile.zip and b/dom/indexedDB/test/unit/wasm_recompile_profile.zip differ diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 86d09cfd8bef..a43571de96d3 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -4793,6 +4793,7 @@ ContentParent::RecvPURLClassifierConstructor(PURLClassifierParent* aActor, { MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(aActor); + *aSuccess = false; auto* actor = static_cast(aActor); nsCOMPtr principal(aPrincipal); diff --git a/dom/ipc/URLClassifierParent.cpp b/dom/ipc/URLClassifierParent.cpp index 816802e9b962..987ee59395f5 100644 --- a/dom/ipc/URLClassifierParent.cpp +++ b/dom/ipc/URLClassifierParent.cpp @@ -18,6 +18,7 @@ URLClassifierParent::StartClassify(nsIPrincipal* aPrincipal, bool aUseTrackingProtection, bool* aSuccess) { + *aSuccess = false; nsresult rv = NS_OK; // Note that in safe mode, the URL classifier service isn't available, so we // should handle the service not being present gracefully. @@ -34,6 +35,7 @@ URLClassifierParent::StartClassify(nsIPrincipal* aPrincipal, // without ever calling out callback in both cases. // This means that code using this in the child process will only get a hit // on its callback if some classification actually happens. + *aSuccess = false; ClassificationFailed(); } return IPC_OK(); diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index 51779615c9b1..8b4785e0fc35 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -432,7 +432,8 @@ public: // need to create the promise even it is not used at all. RefPtr x = mPendingSeek.mPromise.Ensure(__func__); - mMaster->Reset(); + mMaster->ResetDecode(); + mMaster->StopMediaSink(); mMaster->mReader->ReleaseResources(); } @@ -556,6 +557,8 @@ public: SLOG("Exiting DECODING, decoded for %.3lfs", decodeDuration.ToSeconds()); } mDormantTimer.Reset(); + mOnAudioPopped.DisconnectIfExists(); + mOnVideoPopped.DisconnectIfExists(); } void Step() override @@ -751,6 +754,9 @@ private: // Fired when playback is paused for a while to enter dormant. DelayedScheduler mDormantTimer; + + MediaEventListener mOnAudioPopped; + MediaEventListener mOnVideoPopped; }; /** @@ -971,9 +977,10 @@ private: mDoneVideoSeeking = !Info().HasVideo(); if (mSeekJob.mTarget->IsVideoOnly()) { - mMaster->Reset(TrackInfo::kVideoTrack); + mMaster->ResetDecode(TrackInfo::kVideoTrack); } else { - mMaster->Reset(); + mMaster->ResetDecode(); + mMaster->StopMediaSink(); } DemuxerSeek(); @@ -1989,6 +1996,15 @@ DecodingState::Enter() return; } + mOnAudioPopped = AudioQueue().PopEvent().Connect( + OwnerThread(), [this] () { + mMaster->DispatchAudioDecodeTaskIfNeeded(); + }); + mOnVideoPopped = VideoQueue().PopEvent().Connect( + OwnerThread(), [this] () { + mMaster->DispatchVideoDecodeTaskIfNeeded(); + }); + mMaster->UpdateNextFrameStatus(MediaDecoderOwner::NEXT_FRAME_AVAILABLE); mDecodeStartTime = TimeStamp::Now(); @@ -2270,8 +2286,8 @@ ShutdownState::Enter() master->mAudioWaitRequest.DisconnectIfExists(); master->mVideoWaitRequest.DisconnectIfExists(); - master->Reset(); - + master->ResetDecode(); + master->StopMediaSink(); master->mMediaSink->Shutdown(); // Prevent dangling pointers by disconnecting the listeners. @@ -2615,9 +2631,7 @@ void MediaDecoderStateMachine::OnAudioPopped(const RefPtr& aSample) { MOZ_ASSERT(OnTaskQueue()); - mPlaybackOffset = std::max(mPlaybackOffset.Ref(), aSample->mOffset); - DispatchAudioDecodeTaskIfNeeded(); } void @@ -2625,7 +2639,6 @@ MediaDecoderStateMachine::OnVideoPopped(const RefPtr& aSample) { MOZ_ASSERT(OnTaskQueue()); mPlaybackOffset = std::max(mPlaybackOffset.Ref(), aSample->mOffset); - DispatchVideoDecodeTaskIfNeeded(); } bool @@ -3365,7 +3378,7 @@ MediaDecoderStateMachine::RunStateMachine() } void -MediaDecoderStateMachine::Reset(TrackSet aTracks) +MediaDecoderStateMachine::ResetDecode(TrackSet aTracks) { MOZ_ASSERT(OnTaskQueue()); DECODER_LOG("MediaDecoderStateMachine::Reset"); @@ -3382,14 +3395,6 @@ MediaDecoderStateMachine::Reset(TrackSet aTracks) // don't currently support resetting just the audio track. MOZ_ASSERT(aTracks.contains(TrackInfo::kVideoTrack)); - if (aTracks.contains(TrackInfo::kAudioTrack) && - aTracks.contains(TrackInfo::kVideoTrack)) { - // Stop the audio thread. Otherwise, MediaSink might be accessing AudioQueue - // outside of the decoder monitor while we are clearing the queue and causes - // crash for no samples to be popped. - StopMediaSink(); - } - if (aTracks.contains(TrackInfo::kVideoTrack)) { mDecodedVideoEndTime = 0; mVideoCompleted = false; diff --git a/dom/media/MediaDecoderStateMachine.h b/dom/media/MediaDecoderStateMachine.h index feef469c64c3..0644c2b6011f 100644 --- a/dom/media/MediaDecoderStateMachine.h +++ b/dom/media/MediaDecoderStateMachine.h @@ -324,10 +324,10 @@ private: // be held. bool IsPlaying() const; - // Resets all state related to decoding and playback, emptying all buffers - // and aborting all pending operations on the decode task queue. - void Reset(TrackSet aTracks = TrackSet(TrackInfo::kAudioTrack, - TrackInfo::kVideoTrack)); + // Resets all states related to decoding and aborts all pending requests + // to the decoders. + void ResetDecode(TrackSet aTracks = TrackSet(TrackInfo::kAudioTrack, + TrackInfo::kVideoTrack)); protected: virtual ~MediaDecoderStateMachine(); diff --git a/dom/media/MediaQueue.h b/dom/media/MediaQueue.h index ecbf1c7f52f3..b98b887ec55e 100644 --- a/dom/media/MediaQueue.h +++ b/dom/media/MediaQueue.h @@ -43,6 +43,7 @@ public: inline void Push(T* aItem) { ReentrantMonitorAutoEnter mon(mReentrantMonitor); + MOZ_ASSERT(!mEndOfStream); MOZ_ASSERT(aItem); NS_ADDREF(aItem); MOZ_ASSERT(aItem->GetEndTime() >= aItem->mTime); @@ -50,13 +51,6 @@ public: mPushEvent.Notify(RefPtr(aItem)); } - inline void PushFront(T* aItem) { - ReentrantMonitorAutoEnter mon(mReentrantMonitor); - MOZ_ASSERT(aItem); - NS_ADDREF(aItem); - nsDeque::PushFront(aItem); - } - inline already_AddRefed PopFront() { ReentrantMonitorAutoEnter mon(mReentrantMonitor); RefPtr rv = dont_AddRef(static_cast(nsDeque::PopFront())); @@ -66,11 +60,6 @@ public: return rv.forget(); } - inline RefPtr Peek() const { - ReentrantMonitorAutoEnter mon(mReentrantMonitor); - return static_cast(nsDeque::Peek()); - } - inline RefPtr PeekFront() const { ReentrantMonitorAutoEnter mon(mReentrantMonitor); return static_cast(nsDeque::PeekFront()); @@ -100,8 +89,10 @@ public: // Informs the media queue that it won't be receiving any more items. void Finish() { ReentrantMonitorAutoEnter mon(mReentrantMonitor); - mEndOfStream = true; - mFinishEvent.Notify(); + if (!mEndOfStream) { + mEndOfStream = true; + mFinishEvent.Notify(); + } } // Returns the approximate number of microseconds of items in the queue. diff --git a/dom/media/MediaStreamGraph.cpp b/dom/media/MediaStreamGraph.cpp index a1f32a2fb53f..038437df7d91 100644 --- a/dom/media/MediaStreamGraph.cpp +++ b/dom/media/MediaStreamGraph.cpp @@ -2899,8 +2899,8 @@ SourceMediaStream::AddDirectTrackListenerImpl(already_AddRefed listener = aListener; @@ -2909,44 +2909,29 @@ SourceMediaStream::AddDirectTrackListenerImpl(already_AddRefedmData->GetType() == MediaSegment::AUDIO; - isVideo = data->mData->GetType() == MediaSegment::VIDEO; + updateData = FindDataForTrack(aTrackID); + track = FindTrack(aTrackID); + if (track) { + isAudio = track->GetType() == MediaSegment::AUDIO; + isVideo = track->GetType() == MediaSegment::VIDEO; } - // The track might be removed from mUpdateTrack but still exist in - // mTracks. - auto streamTrack = FindTrack(aTrackID); - bool foundTrack = !!streamTrack; - if (foundTrack) { - MediaStreamVideoSink* videoSink = listener->AsMediaStreamVideoSink(); + if (track && isVideo && listener->AsMediaStreamVideoSink()) { // Re-send missed VideoSegment to new added MediaStreamVideoSink. - if (streamTrack->GetType() == MediaSegment::VIDEO && videoSink) { - VideoSegment videoSegment; - if (mTracks.GetForgottenDuration() < streamTrack->GetSegment()->GetDuration()) { - videoSegment.AppendSlice(*streamTrack->GetSegment(), - mTracks.GetForgottenDuration(), - streamTrack->GetSegment()->GetDuration()); - } else { - VideoSegment* streamTrackSegment = static_cast(streamTrack->GetSegment()); - VideoChunk* lastChunk = streamTrackSegment->GetLastChunk(); - if (lastChunk) { - StreamTime startTime = streamTrackSegment->GetDuration() - lastChunk->GetDuration(); - videoSegment.AppendSlice(*streamTrackSegment, - startTime, - streamTrackSegment->GetDuration()); - } - } - if (found) { - videoSegment.AppendSlice(*data->mData, 0, data->mData->GetDuration()); - } - videoSink->SetCurrentFrames(videoSegment); + VideoSegment* trackSegment = static_cast(track->GetSegment()); + VideoSegment videoSegment; + if (mTracks.GetForgottenDuration() < trackSegment->GetDuration()) { + videoSegment.AppendSlice(*trackSegment, + mTracks.GetForgottenDuration(), + trackSegment->GetDuration()); } + if (updateData) { + videoSegment.AppendSlice(*updateData->mData, 0, updateData->mData->GetDuration()); + } + listener->NotifyRealtimeTrackData(Graph(), 0, videoSegment); } - if (found && (isAudio || isVideo)) { + if (track && (isAudio || isVideo)) { for (auto entry : mDirectTrackListeners) { if (entry.mListener == listener && (entry.mTrackID == TRACK_ANY || entry.mTrackID == aTrackID)) { @@ -2962,7 +2947,7 @@ SourceMediaStream::AddDirectTrackListenerImpl(already_AddRefedmTrackID = aTrackID; } } - if (!found) { + if (!track) { STREAM_LOG(LogLevel::Warning, ("Couldn't find source track for direct track listener %p", listener.get())); listener->NotifyDirectListenerInstalled( @@ -2976,9 +2961,15 @@ SourceMediaStream::AddDirectTrackListenerImpl(already_AddRefedNotifyDirectListenerInstalled( DirectMediaStreamTrackListener::InstallationResult::SUCCESS); + if (!updateData) { + // The track exists but the mUpdateTracks entry was removed. + // This means that the track has ended. + listener->NotifyEnded(); + } } void diff --git a/dom/media/PeerConnection.js b/dom/media/PeerConnection.js index 52a242b5d4a0..9f4bee8fc7ef 100644 --- a/dom/media/PeerConnection.js +++ b/dom/media/PeerConnection.js @@ -182,19 +182,11 @@ GlobalPCList.prototype = { } } else if (topic == "profile-change-net-teardown" || topic == "network:offline-about-to-go-offline") { - // Delete all peerconnections on shutdown - mostly synchronously (we - // need them to be done deleting transports and streams before we - // return)! All socket operations must be queued to STS thread - // before we return to here. - // Also kill them if "Work Offline" is selected - more can be created - // while offline, but attempts to connect them should fail. - for (let winId in this._list) { - cleanupWinId(this._list, winId); - } + // As Necko doesn't prevent us from accessing the network we still need to + // monitor the network offline/online state here. See bug 1326483 this._networkdown = true; } else if (topic == "network:offline-status-changed") { if (data == "offline") { - // this._list shold be empty here this._networkdown = true; } else if (data == "online") { this._networkdown = false; @@ -1211,9 +1203,11 @@ RTCPeerConnection.prototype = { }, changeIceConnectionState: function(state) { - this._iceConnectionState = state; - _globalPCList.notifyLifecycleObservers(this, "iceconnectionstatechange"); - this.dispatchEvent(new this._win.Event("iceconnectionstatechange")); + if (state != this._iceConnectionState) { + this._iceConnectionState = state; + _globalPCList.notifyLifecycleObservers(this, "iceconnectionstatechange"); + this.dispatchEvent(new this._win.Event("iceconnectionstatechange")); + } }, getStats: function(selector, onSucc, onErr) { @@ -1370,35 +1364,25 @@ PeerConnectionObserver.prototype = { // // iceConnectionState: // ------------------- - // new The ICE Agent is gathering addresses and/or waiting for - // remote candidates to be supplied. + // new Any of the RTCIceTransports are in the new state and none + // of them are in the checking, failed or disconnected state. // - // checking The ICE Agent has received remote candidates on at least - // one component, and is checking candidate pairs but has not - // yet found a connection. In addition to checking, it may - // also still be gathering. + // checking Any of the RTCIceTransports are in the checking state and + // none of them are in the failed or disconnected state. // - // connected The ICE Agent has found a usable connection for all - // components but is still checking other candidate pairs to - // see if there is a better connection. It may also still be - // gathering. - // - // completed The ICE Agent has finished gathering and checking and found - // a connection for all components. Open issue: it is not - // clear how the non controlling ICE side knows it is in the + // connected All RTCIceTransports are in the connected, completed or + // closed state and at least one of them is in the connected // state. // - // failed The ICE Agent is finished checking all candidate pairs and - // failed to find a connection for at least one component. - // Connections may have been found for some components. + // completed All RTCIceTransports are in the completed or closed state + // and at least one of them is in the completed state. // - // disconnected Liveness checks have failed for one or more components. - // This is more aggressive than failed, and may trigger - // intermittently (and resolve itself without action) on a - // flaky network. + // failed Any of the RTCIceTransports are in the failed state. // - // closed The ICE Agent has shut down and is no longer responding to - // STUN requests. + // disconnected Any of the RTCIceTransports are in the disconnected state + // and none of them are in the failed state. + // + // closed All of the RTCIceTransports are in the closed state. handleIceConnectionStateChange: function(iceConnectionState) { let pc = this._dompc; diff --git a/dom/media/gmp/GMPChild.cpp b/dom/media/gmp/GMPChild.cpp index 2eddc1c808dd..daea4f52b7c0 100644 --- a/dom/media/gmp/GMPChild.cpp +++ b/dom/media/gmp/GMPChild.cpp @@ -168,7 +168,10 @@ GetPluginPaths(const nsAString& aPluginPath, // Mac sandbox rules expect paths to actual files and directories -- not // soft links. + libDirectory->Normalize(); aPluginDirectoryPath = GetNativeTarget(libDirectory); + + libFile->Normalize(); aPluginFilePath = GetNativeTarget(libFile); return true; diff --git a/dom/media/test/test_streams_element_capture_reset.html b/dom/media/test/test_streams_element_capture_reset.html index 1290e4618b0f..888c3bec9d2d 100644 --- a/dom/media/test/test_streams_element_capture_reset.html +++ b/dom/media/test/test_streams_element_capture_reset.html @@ -17,8 +17,6 @@ SimpleTest.waitForExplicitFinish(); var v = document.getElementById('v'); var vout = document.getElementById('vout'); var vout_untilended = document.getElementById('vout_untilended'); -vout.srcObject = v.mozCaptureStream(); -vout_untilended.srcObject = v.mozCaptureStreamUntilEnded(); function dumpEvent(event) { var v = event.target; @@ -101,17 +99,27 @@ function startTest(test) { v.addEventListener("ended", ended, false); vout_untilended.addEventListener("ended", ended, false); - v.src = test.name; - v.name = test.name; - v.play(); - function checkNoEnded() { ok(false, "ended event received unexpectedly"); }; vout.addEventListener("ended", checkNoEnded, false); - vout.play(); - vout_untilended.play(); + + v.src = test.name; + v.name = test.name; + v.preload = "metadata"; + + function loadedmetadata() { + vout.srcObject = v.mozCaptureStream(); + vout.play(); + + vout_untilended.srcObject = v.mozCaptureStreamUntilEnded(); + vout_untilended.play(); + + v.play(); + }; + + v.addEventListener("loadedmetadata", loadedmetadata, {once: true}); } var testVideo = getPlayableVideo(gSmallTests); diff --git a/dom/media/tests/mochitest/mochitest.ini b/dom/media/tests/mochitest/mochitest.ini index 6ac08f95fddd..cc001b167923 100644 --- a/dom/media/tests/mochitest/mochitest.ini +++ b/dom/media/tests/mochitest/mochitest.ini @@ -40,6 +40,7 @@ skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulato [test_enumerateDevices.html] [test_ondevicechange.html] skip-if = os == 'android' +[test_getUserMedia_active_autoplay.html] [test_getUserMedia_audioCapture.html] skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator) [test_getUserMedia_addTrackRemoveTrack.html] diff --git a/dom/performance/PerformanceMainThread.cpp b/dom/performance/PerformanceMainThread.cpp index 31dbb7bd20e0..16149e1b48e6 100644 --- a/dom/performance/PerformanceMainThread.cpp +++ b/dom/performance/PerformanceMainThread.cpp @@ -25,7 +25,8 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(PerformanceMainThread, Performance) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTiming, mNavigation) - NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS + // Performance inherits DOMEventTargetHelper which calls + // NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(PerformanceMainThread, diff --git a/dom/smil/nsSMILAnimationController.cpp b/dom/smil/nsSMILAnimationController.cpp index 8350e3163fb9..b041fb7cdef4 100644 --- a/dom/smil/nsSMILAnimationController.cpp +++ b/dom/smil/nsSMILAnimationController.cpp @@ -736,7 +736,7 @@ nsSMILAnimationController::AddStyleUpdatesTo(RestyleTracker& aTracker) // mIsCSS true means that the rules are the ones returned from // Element::GetSMILOverrideStyleDeclaration (via nsSMILCSSProperty objects), // and mIsCSS false means the rules are nsSMILMappedAttribute objects - // returned from nsSVGElement::GetAnimatedContentStyleRule. + // returned from nsSVGElement::GetAnimatedContentDeclarationBlock. nsRestyleHint rshint = key.mIsCSS ? eRestyle_StyleAttribute_Animations : eRestyle_SVGAttrAnimations; aTracker.AddPendingRestyle(key.mElement, rshint, nsChangeHint(0)); diff --git a/dom/smil/nsSMILMappedAttribute.cpp b/dom/smil/nsSMILMappedAttribute.cpp index b43469facb23..34c11d11fa44 100644 --- a/dom/smil/nsSMILMappedAttribute.cpp +++ b/dom/smil/nsSMILMappedAttribute.cpp @@ -131,7 +131,7 @@ nsSMILMappedAttribute::FlushChangesToTargetAttr() const { // Clear animated content-style-rule mElement->DeleteProperty(SMIL_MAPPED_ATTR_ANIMVAL, - SMIL_MAPPED_ATTR_STYLERULE_ATOM); + SMIL_MAPPED_ATTR_STYLEDECL_ATOM); nsIDocument* doc = mElement->GetUncomposedDoc(); // Request animation restyle diff --git a/dom/smil/nsSMILMappedAttribute.h b/dom/smil/nsSMILMappedAttribute.h index 212b65c92030..8068494e3eb4 100644 --- a/dom/smil/nsSMILMappedAttribute.h +++ b/dom/smil/nsSMILMappedAttribute.h @@ -12,14 +12,14 @@ #include "mozilla/Attributes.h" #include "nsSMILCSSProperty.h" -/* We'll use the empty-string atom |nsGkAtoms::_empty| as the key for storing - * an element's animated content style rule in its Property Table, under the +/* We'll use the empty-string atom |nsGkAtoms::_empty| as the key for storing an + * element's animated content style declaration in its Property Table, under the * property-category SMIL_MAPPED_ATTR_ANIMVAL. Everything else stored in that * category is keyed off of the XML attribute name, so the empty string is a * good "reserved" key to use for storing the style rule (since XML attributes * all have nonempty names). */ -#define SMIL_MAPPED_ATTR_STYLERULE_ATOM nsGkAtoms::_empty +#define SMIL_MAPPED_ATTR_STYLEDECL_ATOM nsGkAtoms::_empty /** * nsSMILMappedAttribute: Implements the nsISMILAttr interface for SMIL diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp index 932a95abaf0a..8f355107d322 100644 --- a/dom/svg/nsSVGElement.cpp +++ b/dom/svg/nsSVGElement.cpp @@ -20,7 +20,6 @@ #include "nsError.h" #include "nsIPresShell.h" #include "nsGkAtoms.h" -#include "mozilla/css/StyleRule.h" #include "nsRuleWalker.h" #include "mozilla/css/Declaration.h" #include "nsCSSProps.h" @@ -53,6 +52,8 @@ #include "nsAttrValueOrString.h" #include "nsSMILAnimationController.h" #include "mozilla/dom/SVGElementBinding.h" +#include "mozilla/DeclarationBlock.h" +#include "mozilla/DeclarationBlockInlines.h" #include "mozilla/Unused.h" #include "mozilla/RestyleManagerHandle.h" #include "mozilla/RestyleManagerHandleInlines.h" @@ -94,6 +95,10 @@ nsSVGElement::nsSVGElement(already_AddRefed& aNodeInfo) { } +nsSVGElement::~nsSVGElement() +{ +} + JSObject* nsSVGElement::WrapNode(JSContext *aCx, JS::Handle aGivenProto) { @@ -293,12 +298,11 @@ nsSVGElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName, "Unexpected use of nsMappedAttributes within SVG"); // If this is an svg presentation attribute we need to map it into - // the content stylerule. + // the content declaration block. // XXX For some reason incremental mapping doesn't work, so for now - // just delete the style rule and lazily reconstruct it in - // GetContentStyleRule() + // just delete the style rule and lazily reconstruct it as needed). if (aNamespaceID == kNameSpaceID_None && IsAttributeMapped(aName)) { - mContentStyleRule = nullptr; + mContentDeclarationBlock = nullptr; } if (IsEventAttributeName(aName) && aValue) { @@ -659,9 +663,11 @@ nsSVGElement::UnsetAttrInternal(int32_t aNamespaceID, nsIAtom* aName, // Maybe consolidate? if (aNamespaceID == kNameSpaceID_None) { - // If this is an svg presentation attribute, remove rule to force an update - if (IsAttributeMapped(aName)) - mContentStyleRule = nullptr; + // If this is an svg presentation attribute, remove declaration block to + // force an update + if (IsAttributeMapped(aName)) { + mContentDeclarationBlock = nullptr; + } if (IsEventAttributeName(aName)) { EventListenerManager* manager = GetExistingListenerManager(); @@ -903,11 +909,12 @@ nsSVGElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker) #ifdef DEBUG // printf("nsSVGElement(%p)::WalkContentStyleRules()\n", this); #endif - if (!mContentStyleRule) - UpdateContentStyleRule(); + if (!mContentDeclarationBlock) { + UpdateContentDeclarationBlock(); + } - if (mContentStyleRule) { - css::Declaration* declaration = mContentStyleRule->GetDeclaration(); + if (mContentDeclarationBlock) { + css::Declaration* declaration = mContentDeclarationBlock->AsGecko(); declaration->SetImmutable(); aRuleWalker->Forward(declaration); } @@ -930,13 +937,13 @@ nsSVGElement::WalkAnimatedContentStyleRules(nsRuleWalker* aRuleWalker) "WalkAnimatedContentStyleRules"); if (!restyleManager->AsGecko()->SkipAnimationRules()) { // update/walk the animated content style rule. - css::StyleRule* animContentStyleRule = GetAnimatedContentStyleRule(); - if (!animContentStyleRule) { - UpdateAnimatedContentStyleRule(); - animContentStyleRule = GetAnimatedContentStyleRule(); + DeclarationBlock* animContentDeclBlock = GetAnimatedContentDeclarationBlock(); + if (!animContentDeclBlock) { + UpdateAnimatedContentDeclarationBlock(); + animContentDeclBlock = GetAnimatedContentDeclarationBlock(); } - if (animContentStyleRule) { - css::Declaration* declaration = animContentStyleRule->GetDeclaration(); + if (animContentDeclBlock) { + css::Declaration* declaration = animContentDeclBlock->AsGecko(); declaration->SetImmutable(); aRuleWalker->Forward(declaration); } @@ -1153,10 +1160,10 @@ public: void ParseMappedAttrValue(nsIAtom* aMappedAttrName, const nsAString& aMappedAttrValue); - // If we've parsed any values for mapped attributes, this method returns - // a new already_AddRefed css::StyleRule that incorporates the parsed + // If we've parsed any values for mapped attributes, this method returns the + // already_AddRefed css::Declaration that incorporates the parsed // values. Otherwise, this method returns null. - already_AddRefed CreateStyleRule(); + already_AddRefed GetDeclarationBlock(); private: // MEMBER DATA @@ -1168,7 +1175,7 @@ private: nsCOMPtr mBaseURI; // Declaration for storing parsed values (lazily initialized) - css::Declaration* mDecl; + RefPtr mDecl; // For reporting use counters nsSVGElement* mElement; @@ -1179,15 +1186,15 @@ MappedAttrParser::MappedAttrParser(css::Loader* aLoader, already_AddRefed aBaseURI, nsSVGElement* aElement) : mParser(aLoader), mDocURI(aDocURI), mBaseURI(aBaseURI), - mDecl(nullptr), mElement(aElement) + mElement(aElement) { } MappedAttrParser::~MappedAttrParser() { MOZ_ASSERT(!mDecl, - "If mDecl was initialized, it should have been converted " - "into a style rule (and had its pointer cleared)"); + "If mDecl was initialized, it should have been returned via " + "GetDeclarationBlock (and had its pointer cleared)"); } void @@ -1241,16 +1248,10 @@ MappedAttrParser::ParseMappedAttrValue(nsIAtom* aMappedAttrName, } } -already_AddRefed -MappedAttrParser::CreateStyleRule() +already_AddRefed +MappedAttrParser::GetDeclarationBlock() { - if (!mDecl) { - return nullptr; // No mapped attributes were parsed - } - - RefPtr rule = new css::StyleRule(nullptr, mDecl, 0, 0); - mDecl = nullptr; // We no longer own the declaration -- drop our pointer to it - return rule.forget(); + return mDecl.forget(); } } // namespace @@ -1259,9 +1260,10 @@ MappedAttrParser::CreateStyleRule() // Implementation Helpers: void -nsSVGElement::UpdateContentStyleRule() +nsSVGElement::UpdateContentDeclarationBlock() { - NS_ASSERTION(!mContentStyleRule, "we already have a content style rule"); + NS_ASSERTION(!mContentDeclarationBlock, + "we already have a content declaration block"); uint32_t attrCount = mAttrsAndChildren.AttrCount(); if (!attrCount) { @@ -1310,7 +1312,7 @@ nsSVGElement::UpdateContentStyleRule() mAttrsAndChildren.AttrAt(i)->ToString(value); mappedAttrParser.ParseMappedAttrValue(attrName->Atom(), value); } - mContentStyleRule = mappedAttrParser.CreateStyleRule(); + mContentDeclarationBlock = mappedAttrParser.GetDeclarationBlock(); } static void @@ -1319,7 +1321,7 @@ ParseMappedAttrAnimValueCallback(void* aObject, void* aPropertyValue, void* aData) { - MOZ_ASSERT(aPropertyName != SMIL_MAPPED_ATTR_STYLERULE_ATOM, + MOZ_ASSERT(aPropertyName != SMIL_MAPPED_ATTR_STYLEDECL_ATOM, "animated content style rule should have been removed " "from properties table already (we're rebuilding it now)"); @@ -1335,25 +1337,25 @@ ParseMappedAttrAnimValueCallback(void* aObject, mappedAttrParser->ParseMappedAttrValue(aPropertyName, animValStr); } -// Callback for freeing animated content style rule, in property table. +// Callback for freeing animated content decl block, in property table. static void -ReleaseStyleRule(void* aObject, /* unused */ +ReleaseDeclBlock(void* aObject, /* unused */ nsIAtom* aPropertyName, void* aPropertyValue, void* aData /* unused */) { - MOZ_ASSERT(aPropertyName == SMIL_MAPPED_ATTR_STYLERULE_ATOM, + MOZ_ASSERT(aPropertyName == SMIL_MAPPED_ATTR_STYLEDECL_ATOM, "unexpected property name, for animated content style rule"); - css::StyleRule* styleRule = static_cast(aPropertyValue); - MOZ_ASSERT(styleRule, "unexpected null style rule"); - styleRule->Release(); + auto decl = static_cast(aPropertyValue); + MOZ_ASSERT(decl, "unexpected null decl"); + decl->Release(); } void -nsSVGElement::UpdateAnimatedContentStyleRule() +nsSVGElement::UpdateAnimatedContentDeclarationBlock() { - MOZ_ASSERT(!GetAnimatedContentStyleRule(), - "Animated content style rule already set"); + MOZ_ASSERT(!GetAnimatedContentDeclarationBlock(), + "Animated content declaration block already set"); nsIDocument* doc = OwnerDoc(); if (!doc) { @@ -1366,30 +1368,29 @@ nsSVGElement::UpdateAnimatedContentStyleRule() doc->PropertyTable(SMIL_MAPPED_ATTR_ANIMVAL)-> Enumerate(this, ParseMappedAttrAnimValueCallback, &mappedAttrParser); - RefPtr - animContentStyleRule(mappedAttrParser.CreateStyleRule()); + RefPtr animContentDeclBlock = + mappedAttrParser.GetDeclarationBlock(); - if (animContentStyleRule) { + if (animContentDeclBlock) { #ifdef DEBUG nsresult rv = #endif SetProperty(SMIL_MAPPED_ATTR_ANIMVAL, - SMIL_MAPPED_ATTR_STYLERULE_ATOM, - animContentStyleRule.get(), - ReleaseStyleRule); - Unused << animContentStyleRule.forget(); + SMIL_MAPPED_ATTR_STYLEDECL_ATOM, + animContentDeclBlock.forget().take(), + ReleaseDeclBlock); MOZ_ASSERT(rv == NS_OK, "SetProperty failed (or overwrote something)"); } } -css::StyleRule* -nsSVGElement::GetAnimatedContentStyleRule() +DeclarationBlock* +nsSVGElement::GetAnimatedContentDeclarationBlock() { return - static_cast(GetProperty(SMIL_MAPPED_ATTR_ANIMVAL, - SMIL_MAPPED_ATTR_STYLERULE_ATOM, - nullptr)); + static_cast(GetProperty(SMIL_MAPPED_ATTR_ANIMVAL, + SMIL_MAPPED_ATTR_STYLEDECL_ATOM, + nullptr)); } /** diff --git a/dom/svg/nsSVGElement.h b/dom/svg/nsSVGElement.h index d51740cec174..33c55fc45821 100644 --- a/dom/svg/nsSVGElement.h +++ b/dom/svg/nsSVGElement.h @@ -13,7 +13,6 @@ */ #include "mozilla/Attributes.h" -#include "mozilla/css/StyleRule.h" #include "nsAutoPtr.h" #include "nsChangeHint.h" #include "nsCOMPtr.h" @@ -39,6 +38,8 @@ class nsSVGString; class nsSVGViewBox; namespace mozilla { +class DeclarationBlock; + namespace dom { class SVGSVGElement; @@ -78,7 +79,7 @@ protected: friend nsresult NS_NewSVGElement(mozilla::dom::Element **aResult, already_AddRefed&& aNodeInfo); nsresult Init(); - virtual ~nsSVGElement(){} + virtual ~nsSVGElement(); public: @@ -343,9 +344,9 @@ protected: nsIAtom* aAttribute, const nsAString& aValue); - void UpdateContentStyleRule(); - void UpdateAnimatedContentStyleRule(); - mozilla::css::StyleRule* GetAnimatedContentStyleRule(); + void UpdateContentDeclarationBlock(); + void UpdateAnimatedContentDeclarationBlock(); + mozilla::DeclarationBlock* GetAnimatedContentDeclarationBlock(); nsAttrValue WillChangeValue(nsIAtom* aName); // aNewValue is set to the old value. This value may be invalid if @@ -635,7 +636,7 @@ private: nsSVGClass mClassAttribute; nsAutoPtr mClassAnimAttr; - RefPtr mContentStyleRule; + RefPtr mContentDeclarationBlock; }; /** diff --git a/dom/tests/mochitest/general/test_interfaces.html b/dom/tests/mochitest/general/test_interfaces.html index 7a878968321b..0123040ac859 100644 --- a/dom/tests/mochitest/general/test_interfaces.html +++ b/dom/tests/mochitest/general/test_interfaces.html @@ -619,9 +619,9 @@ var interfaceNamesInGlobalScope = // IMPORTANT: Do not change this list without review from a DOM peer! "InstallTrigger", // IMPORTANT: Do not change this list without review from a DOM peer! - "IntersectionObserver", + {name: "IntersectionObserver", disabled: true}, // IMPORTANT: Do not change this list without review from a DOM peer! - "IntersectionObserverEntry", + {name: "IntersectionObserverEntry", disabled: true}, // IMPORTANT: Do not change this list without review from a DOM peer! "KeyEvent", // IMPORTANT: Do not change this list without review from a DOM peer! diff --git a/dom/url/URL.cpp b/dom/url/URL.cpp index 1f15e115142e..c8724c3597b0 100644 --- a/dom/url/URL.cpp +++ b/dom/url/URL.cpp @@ -17,7 +17,6 @@ #include "nsEscape.h" #include "nsHostObjectProtocolHandler.h" #include "nsIIOService.h" -#include "nsIURIWithQuery.h" #include "nsIURL.h" #include "nsNetCID.h" #include "nsNetUtil.h" @@ -525,21 +524,10 @@ URLMainThread::GetPathname(nsAString& aPathname, ErrorResult& aRv) const // Do not throw! Not having a valid URI or URL should result in an empty // string. - nsCOMPtr url(do_QueryInterface(mURI)); - if (url) { - nsAutoCString file; - nsresult rv = url->GetFilePath(file); - if (NS_SUCCEEDED(rv)) { - CopyUTF8toUTF16(file, aPathname); - } - - return; - } - - nsAutoCString path; - nsresult rv = mURI->GetPath(path); + nsAutoCString file; + nsresult rv = mURI->GetFilePath(file); if (NS_SUCCEEDED(rv)) { - CopyUTF8toUTF16(path, aPathname); + CopyUTF8toUTF16(file, aPathname); } } @@ -548,11 +536,7 @@ URLMainThread::SetPathname(const nsAString& aPathname, ErrorResult& aRv) { // Do not throw! - nsCOMPtr url(do_QueryInterface(mURI)); - if (url) { - url->SetFilePath(NS_ConvertUTF16toUTF8(aPathname)); - return; - } + mURI->SetFilePath(NS_ConvertUTF16toUTF8(aPathname)); } void @@ -566,13 +550,9 @@ URLMainThread::GetSearch(nsAString& aSearch, ErrorResult& aRv) const nsAutoCString search; nsresult rv; - nsCOMPtr url(do_QueryInterface(mURI)); - if (url) { - rv = url->GetQuery(search); - if (NS_SUCCEEDED(rv) && !search.IsEmpty()) { - CopyUTF8toUTF16(NS_LITERAL_CSTRING("?") + search, aSearch); - } - return; + rv = mURI->GetQuery(search); + if (NS_SUCCEEDED(rv) && !search.IsEmpty()) { + CopyUTF8toUTF16(NS_LITERAL_CSTRING("?") + search, aSearch); } } @@ -603,11 +583,7 @@ URLMainThread::SetSearchInternal(const nsAString& aSearch, ErrorResult& aRv) { // Ignore failures to be compatible with NS4. - nsCOMPtr uriWithQuery(do_QueryInterface(mURI)); - if (uriWithQuery) { - uriWithQuery->SetQuery(NS_ConvertUTF16toUTF8(aSearch)); - return; - } + mURI->SetQuery(NS_ConvertUTF16toUTF8(aSearch)); } } // anonymous namespace diff --git a/dom/xbl/nsXBLService.cpp b/dom/xbl/nsXBLService.cpp index 57503a51f306..f17ad5abe0d6 100644 --- a/dom/xbl/nsXBLService.cpp +++ b/dom/xbl/nsXBLService.cpp @@ -462,7 +462,14 @@ nsXBLService::LoadBindings(nsIContent* aContent, nsIURI* aURL, // anonymous content created in this function, explicit children for which we // defer styling until after XBL bindings are applied, and elements whose existing // style was invalidated by a call to SetXBLInsertionParent. - AutoStyleNewChildren styleNewChildren(aContent->AsElement()); + // + // However, we skip this styling if aContent is not in the document, since we + // should keep such elements unstyled. (There are some odd cases where we do + // apply bindings to elements not in the document.) + Maybe styleNewChildren; + if (aContent->IsInComposedDoc()) { + styleNewChildren.emplace(aContent->AsElement()); + } nsXBLBinding *binding = aContent->GetXBLBinding(); if (binding) { diff --git a/dom/xhr/XMLHttpRequestMainThread.cpp b/dom/xhr/XMLHttpRequestMainThread.cpp index 7bd4a247294b..9a5f417209f2 100644 --- a/dom/xhr/XMLHttpRequestMainThread.cpp +++ b/dom/xhr/XMLHttpRequestMainThread.cpp @@ -3381,7 +3381,10 @@ XMLHttpRequestMainThread::OnRedirectVerifyCallback(nsresult result) mRedirectCallback->OnRedirectVerifyCallback(result); mRedirectCallback = nullptr; - return result; + // It's important that we return success here. If we return the result code + // that we were passed, JavaScript callers who cancel the redirect will wind + // up throwing an exception in the process. + return NS_OK; } ///////////////////////////////////////////////////// diff --git a/editor/libeditor/crashtests/crashtests.list b/editor/libeditor/crashtests/crashtests.list index 5296c752da0a..e018186a7164 100644 --- a/editor/libeditor/crashtests/crashtests.list +++ b/editor/libeditor/crashtests/crashtests.list @@ -1,5 +1,5 @@ load 336081-1.xhtml -asserts-if(stylo,2) load 336104.html # bug 1324669 +asserts-if(stylo,2-3) load 336104.html # bug 1324669 skip-if(stylo) load 382527-1.html # bug 1323649 load 382778-1.html asserts-if(stylo,1) load 402172-1.html # bug 1324663 diff --git a/gfx/harfbuzz/configure.ac b/gfx/harfbuzz/configure.ac index b38ba98c74bd..53d7af02ca09 100644 --- a/gfx/harfbuzz/configure.ac +++ b/gfx/harfbuzz/configure.ac @@ -147,7 +147,7 @@ AC_ARG_WITH(glib, [Use glib @<:@default=auto@:>@])],, [with_glib=auto]) have_glib=false -GLIB_DEPS="glib-2.0 >= 2.38" +GLIB_DEPS="glib-2.0 >= 2.19.1" AC_SUBST(GLIB_DEPS) if test "x$with_glib" = "xyes" -o "x$with_glib" = "xauto"; then PKG_CHECK_MODULES(GLIB, $GLIB_DEPS, have_glib=true, :) diff --git a/gfx/harfbuzz/src/hb-glib.cc b/gfx/harfbuzz/src/hb-glib.cc index e203524754c2..2b91b5b6511c 100644 --- a/gfx/harfbuzz/src/hb-glib.cc +++ b/gfx/harfbuzz/src/hb-glib.cc @@ -382,6 +382,7 @@ hb_glib_get_unicode_funcs (void) return const_cast (&_hb_glib_unicode_funcs); } +#if GLIB_CHECK_VERSION(2,31,10) /** * hb_glib_blob_create: * @@ -398,3 +399,4 @@ hb_glib_blob_create (GBytes *gbytes) g_bytes_ref (gbytes), (hb_destroy_func_t) g_bytes_unref); } +#endif diff --git a/gfx/harfbuzz/src/hb-glib.h b/gfx/harfbuzz/src/hb-glib.h index 12c3e3b3a899..5f04183ba19f 100644 --- a/gfx/harfbuzz/src/hb-glib.h +++ b/gfx/harfbuzz/src/hb-glib.h @@ -46,9 +46,10 @@ hb_glib_script_from_script (hb_script_t script); HB_EXTERN hb_unicode_funcs_t * hb_glib_get_unicode_funcs (void); +#if GLIB_CHECK_VERSION(2,31,10) HB_EXTERN hb_blob_t * hb_glib_blob_create (GBytes *gbytes); - +#endif HB_END_DECLS diff --git a/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp b/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp index ecbae26de76d..cef415ad04a2 100644 --- a/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp +++ b/gfx/skia/skia/src/ports/SkFontHost_cairo.cpp @@ -332,6 +332,8 @@ SkScalerContext_CairoFT::SkScalerContext_CairoFT(SkTypeface* typeface, const SkS computeShapeMatrix(matrix); + fRec.fFlags |= SkScalerContext::kEmbeddedBitmapText_Flag; + #ifdef CAIRO_HAS_FC_FONT resolvePattern(pattern); #endif @@ -414,9 +416,6 @@ void SkScalerContext_CairoFT::parsePattern(FcPattern* pattern) if (FcPatternGetBool(pattern, FC_AUTOHINT, 0, &autohint) == FcResultMatch && autohint) { fRec.fFlags |= SkScalerContext::kForceAutohinting_Flag; } - if (FcPatternGetBool(pattern, FC_EMBEDDED_BITMAP, 0, &bitmap) == FcResultMatch && bitmap) { - fRec.fFlags |= SkScalerContext::kEmbeddedBitmapText_Flag; - } if (FcPatternGetBool(pattern, FC_EMBOLDEN, 0, &embolden) == FcResultMatch && embolden) { fRec.fFlags |= SkScalerContext::kEmbolden_Flag; } @@ -424,8 +423,16 @@ void SkScalerContext_CairoFT::parsePattern(FcPattern* pattern) fRec.fFlags |= SkScalerContext::kVertical_Flag; } - if (fRec.fMaskFormat != SkMask::kBW_Format && - (FcPatternGetBool(pattern, FC_ANTIALIAS, 0, &antialias) != FcResultMatch || antialias)) { + // Match cairo-ft's handling of embeddedbitmap: + // If AA is explicitly disabled, leave bitmaps enabled. + // Otherwise, disable embedded bitmaps unless explicitly enabled. + if (FcPatternGetBool(pattern, FC_ANTIALIAS, 0, &antialias) == FcResultMatch && !antialias) { + fRec.fMaskFormat = SkMask::kBW_Format; + } else if (FcPatternGetBool(pattern, FC_EMBEDDED_BITMAP, 0, &bitmap) != FcResultMatch || !bitmap) { + fRec.fFlags &= ~SkScalerContext::kEmbeddedBitmapText_Flag; + } + + if (fRec.fMaskFormat != SkMask::kBW_Format) { int rgba; if (!isLCD(fRec) || FcPatternGetInteger(pattern, FC_RGBA, 0, &rgba) != FcResultMatch) { @@ -470,8 +477,6 @@ void SkScalerContext_CairoFT::parsePattern(FcPattern* pattern) break; } } - } else { - fRec.fMaskFormat = SkMask::kBW_Format; } if (fRec.getHinting() != SkPaint::kNo_Hinting) { diff --git a/image/decoders/icon/nsIconURI.cpp b/image/decoders/icon/nsIconURI.cpp index 2c2788c8f1ed..632a733fe9a6 100644 --- a/image/decoders/icon/nsIconURI.cpp +++ b/image/decoders/icon/nsIconURI.cpp @@ -371,6 +371,32 @@ nsMozIconURI::SetPath(const nsACString& aPath) return NS_ERROR_FAILURE; } +NS_IMETHODIMP +nsMozIconURI::GetFilePath(nsACString& aFilePath) +{ + aFilePath.Truncate(); + return NS_OK; +} + +NS_IMETHODIMP +nsMozIconURI::SetFilePath(const nsACString& aFilePath) +{ + return NS_ERROR_FAILURE; +} + +NS_IMETHODIMP +nsMozIconURI::GetQuery(nsACString& aQuery) +{ + aQuery.Truncate(); + return NS_OK; +} + +NS_IMETHODIMP +nsMozIconURI::SetQuery(const nsACString& aQuery) +{ + return NS_ERROR_FAILURE; +} + NS_IMETHODIMP nsMozIconURI::GetRef(nsACString& aRef) { diff --git a/intl/icu-patches/bug-1325858-close-key.diff b/intl/icu-patches/bug-1325858-close-key.diff new file mode 100644 index 000000000000..8068f06182d7 --- /dev/null +++ b/intl/icu-patches/bug-1325858-close-key.diff @@ -0,0 +1,26 @@ +getTZKeyName in common/wintz.cpp leaks registry handle. + +https://ssl.icu-project.org/trac/ticket/12908 + +diff --git a/intl/icu/source/common/wintz.c b/intl/icu/source/common/wintz.c +--- a/intl/icu/source/common/wintz.c ++++ b/intl/icu/source/common/wintz.c +@@ -211,16 +211,18 @@ static LONG getTZKeyName(char* tzKeyName + hkey, + "TimeZoneKeyName", + NULL, + NULL, + (LPBYTE)tzKeyName, + &cbData); + } + ++ RegCloseKey(hkey); ++ + return result; + } + + /* + This code attempts to detect the Windows time zone, as set in the + Windows Date and Time control panel. It attempts to work on + multiple flavors of Windows (9x, Me, NT, 2000, XP) and on localized + installs. It works by directly interrogating the registry and diff --git a/intl/icu/source/common/wintz.c b/intl/icu/source/common/wintz.c index a8696af39d4a..14fc476040c7 100644 --- a/intl/icu/source/common/wintz.c +++ b/intl/icu/source/common/wintz.c @@ -216,6 +216,8 @@ static LONG getTZKeyName(char* tzKeyName, int32_t length) { &cbData); } + RegCloseKey(hkey); + return result; } diff --git a/intl/update-icu.sh b/intl/update-icu.sh index 8311dc6cc9fb..7dc54eb6f9d3 100755 --- a/intl/update-icu.sh +++ b/intl/update-icu.sh @@ -61,6 +61,7 @@ for patch in \ bug-1172609-timezone-recreateDefault.diff \ bug-1198952-workaround-make-3.82-bug.diff \ bug-1228227-bug-1263325-libc++-gcc_hidden.diff \ + bug-1325858-close-key.diff \ ucol_getKeywordValuesForLocale-ulist_resetList.diff \ unum_formatDoubleForFields.diff \ ; do diff --git a/js/src/builtin/Intl.cpp b/js/src/builtin/Intl.cpp index 639d54049b42..42d1ea429260 100644 --- a/js/src/builtin/Intl.cpp +++ b/js/src/builtin/Intl.cpp @@ -20,6 +20,7 @@ #include "jsapi.h" #include "jsatom.h" #include "jscntxt.h" +#include "jsfriendapi.h" #include "jsobj.h" #include "jsstr.h" @@ -3706,6 +3707,9 @@ CreatePluralRulesPrototype(JSContext* cx, HandleObject Intl, HandlecreateBlankPrototype(cx, &PluralRulesClass)); if (!proto) return nullptr; + MOZ_ASSERT(proto->getReservedSlot(UPLURAL_RULES_SLOT).isUndefined(), + "improperly creating PluralRules more than once for a single " + "global?"); proto->setReservedSlot(UPLURAL_RULES_SLOT, PrivateValue(nullptr)); if (!LinkConstructorAndPrototype(cx, ctor, proto)) @@ -3734,6 +3738,37 @@ CreatePluralRulesPrototype(JSContext* cx, HandleObject Intl, Handle global = cx->global(); + + { + const HeapSlot& slot = global->getReservedSlotRef(PLURAL_RULES_PROTO); + if (!slot.isUndefined()) { + MOZ_ASSERT(slot.isObject()); + MOZ_ASSERT(slot.toObject().hasClass(&PluralRulesClass)); + JS_ReportErrorASCII(cx, + "the PluralRules constructor can't be added " + "multiple times in the same global"); + return false; + } + } + + JSObject* pluralRulesProto = CreatePluralRulesPrototype(cx, intl, global); + if (!pluralRulesProto) + return false; + + global->setReservedSlot(PLURAL_RULES_PROTO, ObjectValue(*pluralRulesProto)); + return true; +} + +bool +js::AddPluralRulesConstructor(JSContext* cx, JS::Handle intl) +{ + return GlobalObject::addPluralRulesConstructor(cx, intl); +} + bool js::intl_PluralRules_availableLocales(JSContext* cx, unsigned argc, Value* vp) { @@ -4430,9 +4465,6 @@ GlobalObject::initIntlObject(JSContext* cx, Handle global) RootedObject numberFormatProto(cx, CreateNumberFormatPrototype(cx, intl, global)); if (!numberFormatProto) return false; - RootedObject pluralRulesProto(cx, CreatePluralRulesPrototype(cx, intl, global)); - if (!pluralRulesProto) - return false; // The |Intl| object is fully set up now, so define the global property. RootedValue intlValue(cx, ObjectValue(*intl)); @@ -4454,7 +4486,6 @@ GlobalObject::initIntlObject(JSContext* cx, Handle global) global->setReservedSlot(COLLATOR_PROTO, ObjectValue(*collatorProto)); global->setReservedSlot(DATE_TIME_FORMAT_PROTO, ObjectValue(*dateTimeFormatProto)); global->setReservedSlot(NUMBER_FORMAT_PROTO, ObjectValue(*numberFormatProto)); - global->setReservedSlot(PLURAL_RULES_PROTO, ObjectValue(*pluralRulesProto)); // Also cache |Intl| to implement spec language that conditions behavior // based on values being equal to "the standard built-in |Intl| object". diff --git a/js/src/builtin/Intl.h b/js/src/builtin/Intl.h index a7fc61fa6277..f3e6db9ad960 100644 --- a/js/src/builtin/Intl.h +++ b/js/src/builtin/Intl.h @@ -496,6 +496,7 @@ UCharToChar16(const UChar* chars) { return reinterpret_cast(chars); } + #endif // ENABLE_INTL_API } // namespace js diff --git a/js/src/builtin/Intl.js b/js/src/builtin/Intl.js index 478547808989..e6aae2194a5c 100644 --- a/js/src/builtin/Intl.js +++ b/js/src/builtin/Intl.js @@ -1786,11 +1786,11 @@ function resolveNumberFormatInternals(lazyNumberFormatData) { // Compute formatting options. // Step 15. - var s = lazyNumberFormatData.style; - internalProps.style = s; + var style = lazyNumberFormatData.style; + internalProps.style = style; // Steps 19, 21. - if (s === "currency") { + if (style === "currency") { internalProps.currency = lazyNumberFormatData.currency; internalProps.currencyDisplay = lazyNumberFormatData.currencyDisplay; } @@ -1954,15 +1954,15 @@ function InitializeNumberFormat(numberFormat, locales, options) { // Compute formatting options. // Step 14. - var s = GetOption(options, "style", "string", ["decimal", "percent", "currency"], "decimal"); - lazyNumberFormatData.style = s; + var style = GetOption(options, "style", "string", ["decimal", "percent", "currency"], "decimal"); + lazyNumberFormatData.style = style; // Steps 16-19. var c = GetOption(options, "currency", "string", undefined, undefined); if (c !== undefined && !IsWellFormedCurrencyCode(c)) ThrowRangeError(JSMSG_INVALID_CURRENCY_CODE, c); var cDigits; - if (s === "currency") { + if (style === "currency") { if (c === undefined) ThrowTypeError(JSMSG_UNDEFINED_CURRENCY); @@ -1974,17 +1974,17 @@ function InitializeNumberFormat(numberFormat, locales, options) { // Step 20. var cd = GetOption(options, "currencyDisplay", "string", ["code", "symbol", "name"], "symbol"); - if (s === "currency") + if (style === "currency") lazyNumberFormatData.currencyDisplay = cd; // Steps 22-24. - SetNumberFormatDigitOptions(lazyNumberFormatData, options, s === "currency" ? cDigits: 0); + SetNumberFormatDigitOptions(lazyNumberFormatData, options, style === "currency" ? cDigits: 0); // Step 25. if (lazyNumberFormatData.maximumFractionDigits === undefined) { - let mxfdDefault = s === "currency" + let mxfdDefault = style === "currency" ? cDigits - : s === "percent" + : style === "percent" ? 0 : 3; lazyNumberFormatData.maximumFractionDigits = diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp index b63c37d4ad11..e62f4be0825d 100644 --- a/js/src/builtin/Object.cpp +++ b/js/src/builtin/Object.cpp @@ -1314,8 +1314,8 @@ FinishObjectClassInit(JSContext* cx, JS::HandleObject ctor, JS::HandleObject pro * only set the [[Prototype]] if it hasn't already been set. */ Rooted tagged(cx, TaggedProto(proto)); - if (global->shouldSplicePrototype(cx)) { - if (!global->splicePrototype(cx, global->getClass(), tagged)) + if (global->shouldSplicePrototype()) { + if (!JSObject::splicePrototype(cx, global, global->getClass(), tagged)) return false; } return true; diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 75a3640108f2..a31d830de56e 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -3337,7 +3337,8 @@ GetConstructorName(JSContext* cx, unsigned argc, Value* vp) } RootedAtom name(cx); - if (!args[0].toObject().constructorDisplayAtom(cx, &name)) + RootedObject obj(cx, &args[0].toObject()); + if (!JSObject::constructorDisplayAtom(cx, obj, &name)) return false; if (name) { diff --git a/js/src/devtools/automation/autospider.py b/js/src/devtools/automation/autospider.py index 08de8c372025..288c88edf835 100755 --- a/js/src/devtools/automation/autospider.py +++ b/js/src/devtools/automation/autospider.py @@ -216,6 +216,15 @@ if word_bits == 32: elif platform.system() == 'Linux': if UNAME_M != 'arm': CONFIGURE_ARGS += ' --target=i686-pc-linux --host=i686-pc-linux' + + # Add SSE2 support for x86/x64 architectures. + if UNAME_M != 'arm': + if platform.system() == 'Windows': + sse_flags = '-arch:SSE2' + else: + sse_flags = '-msse -msse2 -mfpmath=sse' + env['CCFLAGS'] = '{0} {1}'.format(env.get('CCFLAGS', ''), sse_flags) + env['CXXFLAGS'] = '{0} {1}'.format(env.get('CXXFLAGS', ''), sse_flags) else: if platform.system() == 'Windows': CONFIGURE_ARGS += ' --target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32' diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index 9f97b68b7b3d..211dc041ab56 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -2902,13 +2902,13 @@ BytecodeEmitter::reportError(ParseNode* pn, unsigned errorNumber, ...) } bool -BytecodeEmitter::reportStrictWarning(ParseNode* pn, unsigned errorNumber, ...) +BytecodeEmitter::reportExtraWarning(ParseNode* pn, unsigned errorNumber, ...) { TokenPos pos = pn ? pn->pn_pos : tokenStream()->currentToken().pos; va_list args; va_start(args, errorNumber); - bool result = tokenStream()->reportStrictWarningErrorNumberVA(pos.begin, errorNumber, args); + bool result = tokenStream()->reportExtraWarningErrorNumberVA(pos.begin, errorNumber, args); va_end(args); return result; } @@ -7918,13 +7918,13 @@ BytecodeEmitter::emitStatement(ParseNode* pn) } if (directive) { - if (!reportStrictWarning(pn2, JSMSG_CONTRARY_NONDIRECTIVE, directive)) + if (!reportExtraWarning(pn2, JSMSG_CONTRARY_NONDIRECTIVE, directive)) return false; } } else { current->currentLine = parser->tokenStream.srcCoords.lineNum(pn2->pn_pos.begin); current->lastColumn = 0; - if (!reportStrictWarning(pn2, JSMSG_USELESS_EXPR)) + if (!reportExtraWarning(pn2, JSMSG_USELESS_EXPR)) return false; } } diff --git a/js/src/frontend/BytecodeEmitter.h b/js/src/frontend/BytecodeEmitter.h index 066c06672943..3d83f47bf985 100644 --- a/js/src/frontend/BytecodeEmitter.h +++ b/js/src/frontend/BytecodeEmitter.h @@ -386,7 +386,7 @@ struct MOZ_STACK_CLASS BytecodeEmitter } bool reportError(ParseNode* pn, unsigned errorNumber, ...); - bool reportStrictWarning(ParseNode* pn, unsigned errorNumber, ...); + bool reportExtraWarning(ParseNode* pn, unsigned errorNumber, ...); bool reportStrictModeError(ParseNode* pn, unsigned errorNumber, ...); // If pn contains a useful expression, return true with *answer set to true. diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 16b2215629d9..35cf8f8744fb 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -567,12 +567,94 @@ FunctionBox::initWithEnclosingScope(Scope* enclosingScope) computeInWith(enclosingScope); } -template -bool -Parser::reportHelper(ParseReportKind kind, bool strict, uint32_t offset, - unsigned errorNumber, va_list args) +void +ParserBase::error(unsigned errorNumber, ...) { + va_list args; + va_start(args, errorNumber); +#ifdef DEBUG + bool result = +#endif + tokenStream.reportCompileErrorNumberVA(pos().begin, JSREPORT_ERROR, errorNumber, args); + MOZ_ASSERT(!result, "reporting an error returned true?"); + va_end(args); +} + +void +ParserBase::errorAt(uint32_t offset, unsigned errorNumber, ...) +{ + va_list args; + va_start(args, errorNumber); +#ifdef DEBUG + bool result = +#endif + tokenStream.reportCompileErrorNumberVA(offset, JSREPORT_ERROR, errorNumber, args); + MOZ_ASSERT(!result, "reporting an error returned true?"); + va_end(args); +} + +bool +ParserBase::warning(unsigned errorNumber, ...) +{ + va_list args; + va_start(args, errorNumber); + bool result = + tokenStream.reportCompileErrorNumberVA(pos().begin, JSREPORT_WARNING, errorNumber, args); + va_end(args); + return result; +} + +bool +ParserBase::warningAt(uint32_t offset, unsigned errorNumber, ...) +{ + va_list args; + va_start(args, errorNumber); + bool result = + tokenStream.reportCompileErrorNumberVA(offset, JSREPORT_WARNING, errorNumber, args); + va_end(args); + return result; +} + +bool +ParserBase::extraWarning(unsigned errorNumber, ...) +{ + va_list args; + va_start(args, errorNumber); + bool result = tokenStream.reportExtraWarningErrorNumberVA(pos().begin, errorNumber, args); + va_end(args); + return result; +} + +bool +ParserBase::strictModeError(unsigned errorNumber, ...) +{ + va_list args; + va_start(args, errorNumber); + bool res = + tokenStream.reportStrictModeErrorNumberVA(pos().begin, pc->sc()->strict(), + errorNumber, args); + va_end(args); + return res; +} + +bool +ParserBase::strictModeErrorAt(uint32_t offset, unsigned errorNumber, ...) +{ + va_list args; + va_start(args, errorNumber); + bool res = + tokenStream.reportStrictModeErrorNumberVA(offset, pc->sc()->strict(), errorNumber, args); + va_end(args); + return res; +} + +bool +ParserBase::reportNoOffset(ParseReportKind kind, bool strict, unsigned errorNumber, ...) +{ + va_list args; + va_start(args, errorNumber); bool result = false; + uint32_t offset = TokenStream::NoOffset; switch (kind) { case ParseError: result = tokenStream.reportCompileErrorNumberVA(offset, JSREPORT_ERROR, errorNumber, args); @@ -582,105 +664,12 @@ Parser::reportHelper(ParseReportKind kind, bool strict, uint32_t o tokenStream.reportCompileErrorNumberVA(offset, JSREPORT_WARNING, errorNumber, args); break; case ParseExtraWarning: - result = tokenStream.reportStrictWarningErrorNumberVA(offset, errorNumber, args); + result = tokenStream.reportExtraWarningErrorNumberVA(offset, errorNumber, args); break; case ParseStrictError: result = tokenStream.reportStrictModeErrorNumberVA(offset, strict, errorNumber, args); break; } - return result; -} - -template -void -Parser::error(unsigned errorNumber, ...) -{ - va_list args; - va_start(args, errorNumber); -#ifdef DEBUG - bool result = -#endif - reportHelper(ParseError, false, pos().begin, errorNumber, args); - MOZ_ASSERT(!result, "reporting an error returned true?"); - va_end(args); -} - -template -void -Parser::errorAt(uint32_t offset, unsigned errorNumber, ...) -{ - va_list args; - va_start(args, errorNumber); -#ifdef DEBUG - bool result = -#endif - reportHelper(ParseError, false, offset, errorNumber, args); - MOZ_ASSERT(!result, "reporting an error returned true?"); - va_end(args); -} - -template -bool -Parser::warning(unsigned errorNumber, ...) -{ - va_list args; - va_start(args, errorNumber); - bool result = reportHelper(ParseWarning, false, pos().begin, errorNumber, args); - va_end(args); - return result; -} - -template -bool -Parser::warningAt(uint32_t offset, unsigned errorNumber, ...) -{ - va_list args; - va_start(args, errorNumber); - bool result = reportHelper(ParseWarning, false, offset, errorNumber, args); - va_end(args); - return result; -} - -template -bool -Parser::extraWarning(unsigned errorNumber, ...) -{ - va_list args; - va_start(args, errorNumber); - bool result = reportHelper(ParseExtraWarning, false, pos().begin, errorNumber, args); - va_end(args); - return result; -} - -template -bool -Parser::strictModeError(unsigned errorNumber, ...) -{ - va_list args; - va_start(args, errorNumber); - bool res = reportHelper(ParseStrictError, pc->sc()->strict(), pos().begin, errorNumber, args); - va_end(args); - return res; -} - -template -bool -Parser::strictModeErrorAt(uint32_t offset, unsigned errorNumber, ...) -{ - va_list args; - va_start(args, errorNumber); - bool res = reportHelper(ParseStrictError, pc->sc()->strict(), offset, errorNumber, args); - va_end(args); - return res; -} - -template -bool -Parser::reportNoOffset(ParseReportKind kind, bool strict, unsigned errorNumber, ...) -{ - va_list args; - va_start(args, errorNumber); - bool result = reportHelper(kind, strict, TokenStream::NoOffset, errorNumber, args); va_end(args); return result; } @@ -701,16 +690,14 @@ Parser::abortIfSyntaxParser() return false; } -template -Parser::Parser(ExclusiveContext* cx, LifoAlloc& alloc, - const ReadOnlyCompileOptions& options, - const char16_t* chars, size_t length, - bool foldConstants, - UsedNameTracker& usedNames, - Parser* syntaxParser, - LazyScript* lazyOuterFunction) - : AutoGCRooter(cx, PARSER), - context(cx), +ParserBase::ParserBase(ExclusiveContext* cx, LifoAlloc& alloc, + const ReadOnlyCompileOptions& options, + const char16_t* chars, size_t length, + bool foldConstants, + UsedNameTracker& usedNames, + Parser* syntaxParser, + LazyScript* lazyOuterFunction) + : context(cx), alloc(alloc), tokenStream(cx, options, chars, length, thisForCtor()), traceListHead(nullptr), @@ -724,38 +711,14 @@ Parser::Parser(ExclusiveContext* cx, LifoAlloc& alloc, checkOptionsCalled(false), #endif abortedSyntaxParse(false), - isUnexpectedEOF_(false), - handler(cx, alloc, tokenStream, syntaxParser, lazyOuterFunction) + isUnexpectedEOF_(false) { cx->perThreadData->frontendCollectionPool.addActiveCompilation(); - - // The Mozilla specific JSOPTION_EXTRA_WARNINGS option adds extra warnings - // which are not generated if functions are parsed lazily. Note that the - // standard "use strict" does not inhibit lazy parsing. - if (options.extraWarningsOption) - handler.disableSyntaxParser(); - tempPoolMark = alloc.mark(); } -template -bool -Parser::checkOptions() +ParserBase::~ParserBase() { -#ifdef DEBUG - checkOptionsCalled = true; -#endif - - if (!tokenStream.checkOptions()) - return false; - - return true; -} - -template -Parser::~Parser() -{ - MOZ_ASSERT(checkOptionsCalled); alloc.release(tempPoolMark); /* @@ -768,6 +731,43 @@ Parser::~Parser() context->perThreadData->frontendCollectionPool.removeActiveCompilation(); } +template +Parser::Parser(ExclusiveContext* cx, LifoAlloc& alloc, + const ReadOnlyCompileOptions& options, + const char16_t* chars, size_t length, + bool foldConstants, + UsedNameTracker& usedNames, + Parser* syntaxParser, + LazyScript* lazyOuterFunction) + : ParserBase(cx, alloc, options, chars, length, foldConstants, usedNames, syntaxParser, + lazyOuterFunction), + AutoGCRooter(cx, PARSER), + handler(cx, alloc, tokenStream, syntaxParser, lazyOuterFunction) +{ + // The Mozilla specific JSOPTION_EXTRA_WARNINGS option adds extra warnings + // which are not generated if functions are parsed lazily. Note that the + // standard "use strict" does not inhibit lazy parsing. + if (options.extraWarningsOption) + handler.disableSyntaxParser(); +} + +template +bool +Parser::checkOptions() +{ +#ifdef DEBUG + checkOptionsCalled = true; +#endif + + return tokenStream.checkOptions(); +} + +template +Parser::~Parser() +{ + MOZ_ASSERT(checkOptionsCalled); +} + template ObjectBox* Parser::newObjectBox(JSObject* obj) @@ -894,9 +894,8 @@ Parser::parse() * Strict mode forbids introducing new definitions for 'eval', 'arguments', or * for any strict mode reserved keyword. */ -template bool -Parser::isValidStrictBinding(PropertyName* name) +ParserBase::isValidStrictBinding(PropertyName* name) { return name != context->names().eval && name != context->names().arguments && @@ -9544,9 +9543,8 @@ Parser::exprInParens(InHandling inHandling, YieldHandling yieldHan return expr(inHandling, yieldHandling, tripledotHandling, possibleError, PredictInvoked); } -template void -Parser::addTelemetry(JSCompartment::DeprecatedLanguageExtension e) +ParserBase::addTelemetry(JSCompartment::DeprecatedLanguageExtension e) { JSContext* cx = context->maybeJSContext(); if (!cx) @@ -9554,9 +9552,8 @@ Parser::addTelemetry(JSCompartment::DeprecatedLanguageExtension e) cx->compartment()->addTelemetry(getFilename(), e); } -template bool -Parser::warnOnceAboutExprClosure() +ParserBase::warnOnceAboutExprClosure() { #ifndef RELEASE_OR_BETA JSContext* cx = context->maybeJSContext(); @@ -9572,9 +9569,8 @@ Parser::warnOnceAboutExprClosure() return true; } -template bool -Parser::warnOnceAboutForEach() +ParserBase::warnOnceAboutForEach() { JSContext* cx = context->maybeJSContext(); if (!cx) diff --git a/js/src/frontend/Parser.h b/js/src/frontend/Parser.h index 1f3258cd9d55..0f6f2c77b03a 100644 --- a/js/src/frontend/Parser.h +++ b/js/src/frontend/Parser.h @@ -734,8 +734,140 @@ class UsedNameTracker } }; +class ParserBase : public StrictModeGetter +{ + private: + ParserBase* thisForCtor() { return this; } + + public: + ExclusiveContext* const context; + + LifoAlloc& alloc; + + TokenStream tokenStream; + LifoAlloc::Mark tempPoolMark; + + /* list of parsed objects for GC tracing */ + ObjectBox* traceListHead; + + /* innermost parse context (stack-allocated) */ + ParseContext* pc; + + // For tracking used names in this parsing session. + UsedNameTracker& usedNames; + + /* Compression token for aborting. */ + SourceCompressionTask* sct; + + ScriptSource* ss; + + /* Root atoms and objects allocated for the parsed tree. */ + AutoKeepAtoms keepAtoms; + + /* Perform constant-folding; must be true when interfacing with the emitter. */ + const bool foldConstants:1; + + protected: +#if DEBUG + /* Our fallible 'checkOptions' member function has been called. */ + bool checkOptionsCalled:1; +#endif + + /* + * Not all language constructs can be handled during syntax parsing. If it + * is not known whether the parse succeeds or fails, this bit is set and + * the parse will return false. + */ + bool abortedSyntaxParse:1; + + /* Unexpected end of input, i.e. TOK_EOF not at top-level. */ + bool isUnexpectedEOF_:1; + + public: + ParserBase(ExclusiveContext* cx, LifoAlloc& alloc, const ReadOnlyCompileOptions& options, + const char16_t* chars, size_t length, bool foldConstants, + UsedNameTracker& usedNames, Parser* syntaxParser, + LazyScript* lazyOuterFunction); + ~ParserBase(); + + const char* getFilename() const { return tokenStream.getFilename(); } + JSVersion versionNumber() const { return tokenStream.versionNumber(); } + TokenPos pos() const { return tokenStream.currentToken().pos; } + + // Determine whether |yield| is a valid name in the current context, or + // whether it's prohibited due to strictness, JS version, or occurrence + // inside a star generator. + bool yieldExpressionsSupported() { + return (versionNumber() >= JSVERSION_1_7 || pc->isGenerator()) && !pc->isAsync(); + } + + virtual bool strictMode() { return pc->sc()->strict(); } + bool setLocalStrictMode(bool strict) { + MOZ_ASSERT(tokenStream.debugHasNoLookahead()); + return pc->sc()->setLocalStrictMode(strict); + } + + const ReadOnlyCompileOptions& options() const { + return tokenStream.options(); + } + + bool hadAbortedSyntaxParse() { + return abortedSyntaxParse; + } + void clearAbortedSyntaxParse() { + abortedSyntaxParse = false; + } + + bool isUnexpectedEOF() const { return isUnexpectedEOF_; } + + bool reportNoOffset(ParseReportKind kind, bool strict, unsigned errorNumber, ...); + + /* Report the given error at the current offset. */ + void error(unsigned errorNumber, ...); + + /* Report the given error at the given offset. */ + void errorAt(uint32_t offset, unsigned errorNumber, ...); + + /* + * Handle a strict mode error at the current offset. Report an error if in + * strict mode code, or warn if not, using the given error number and + * arguments. + */ + MOZ_MUST_USE bool strictModeError(unsigned errorNumber, ...); + + /* + * Handle a strict mode error at the given offset. Report an error if in + * strict mode code, or warn if not, using the given error number and + * arguments. + */ + MOZ_MUST_USE bool strictModeErrorAt(uint32_t offset, unsigned errorNumber, ...); + + /* Report the given warning at the current offset. */ + MOZ_MUST_USE bool warning(unsigned errorNumber, ...); + + /* Report the given warning at the given offset. */ + MOZ_MUST_USE bool warningAt(uint32_t offset, unsigned errorNumber, ...); + + /* + * If extra warnings are enabled, report the given warning at the current + * offset. + */ + MOZ_MUST_USE bool extraWarning(unsigned errorNumber, ...); + + bool isValidStrictBinding(PropertyName* name); + + void addTelemetry(JSCompartment::DeprecatedLanguageExtension e); + + bool warnOnceAboutExprClosure(); + bool warnOnceAboutForEach(); + + protected: + enum InvokedPrediction { PredictUninvoked = false, PredictInvoked = true }; + enum ForInitLocation { InForInit, NotInForInit }; +}; + template -class Parser final : private JS::AutoGCRooter, public StrictModeGetter +class Parser final : public ParserBase, private JS::AutoGCRooter { private: using Node = typename ParseHandler::Node; @@ -852,50 +984,6 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter void transferErrorsTo(PossibleError* other); }; - public: - ExclusiveContext* const context; - - LifoAlloc& alloc; - - TokenStream tokenStream; - LifoAlloc::Mark tempPoolMark; - - /* list of parsed objects for GC tracing */ - ObjectBox* traceListHead; - - /* innermost parse context (stack-allocated) */ - ParseContext* pc; - - // For tracking used names in this parsing session. - UsedNameTracker& usedNames; - - /* Compression token for aborting. */ - SourceCompressionTask* sct; - - ScriptSource* ss; - - /* Root atoms and objects allocated for the parsed tree. */ - AutoKeepAtoms keepAtoms; - - /* Perform constant-folding; must be true when interfacing with the emitter. */ - const bool foldConstants:1; - - private: -#if DEBUG - /* Our fallible 'checkOptions' member function has been called. */ - bool checkOptionsCalled:1; -#endif - - /* - * Not all language constructs can be handled during syntax parsing. If it - * is not known whether the parse succeeds or fails, this bit is set and - * the parse will return false. - */ - bool abortedSyntaxParse:1; - - /* Unexpected end of input, i.e. TOK_EOF not at top-level. */ - bool isUnexpectedEOF_:1; - public: /* State specific to the kind of parse being performed. */ ParseHandler handler; @@ -903,44 +991,7 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter void prepareNodeForMutation(Node node) { handler.prepareNodeForMutation(node); } void freeTree(Node node) { handler.freeTree(node); } - private: - bool reportHelper(ParseReportKind kind, bool strict, uint32_t offset, - unsigned errorNumber, va_list args); public: - bool reportNoOffset(ParseReportKind kind, bool strict, unsigned errorNumber, ...); - - /* Report the given error at the current offset. */ - void error(unsigned errorNumber, ...); - - /* Report the given error at the given offset. */ - void errorAt(uint32_t offset, unsigned errorNumber, ...); - - /* - * Handle a strict mode error at the current offset. Report an error if in - * strict mode code, or warn if not, using the given error number and - * arguments. - */ - MOZ_MUST_USE bool strictModeError(unsigned errorNumber, ...); - - /* - * Handle a strict mode error at the given offset. Report an error if in - * strict mode code, or warn if not, using the given error number and - * arguments. - */ - MOZ_MUST_USE bool strictModeErrorAt(uint32_t offset, unsigned errorNumber, ...); - - /* Report the given warning at the current offset. */ - MOZ_MUST_USE bool warning(unsigned errorNumber, ...); - - /* Report the given warning at the given offset. */ - MOZ_MUST_USE bool warningAt(uint32_t offset, unsigned errorNumber, ...); - - /* - * If extra warnings are enabled, report the given warning at the current - * offset. - */ - MOZ_MUST_USE bool extraWarning(unsigned errorNumber, ...); - Parser(ExclusiveContext* cx, LifoAlloc& alloc, const ReadOnlyCompileOptions& options, const char16_t* chars, size_t length, bool foldConstants, UsedNameTracker& usedNames, Parser* syntaxParser, LazyScript* lazyOuterFunction); @@ -970,9 +1021,6 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter friend void js::frontend::TraceParser(JSTracer* trc, JS::AutoGCRooter* parser); - const char* getFilename() const { return tokenStream.getFilename(); } - JSVersion versionNumber() const { return tokenStream.versionNumber(); } - /* * Parse a top-level JS script. */ @@ -997,15 +1045,6 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter void trace(JSTracer* trc); - bool hadAbortedSyntaxParse() { - return abortedSyntaxParse; - } - void clearAbortedSyntaxParse() { - abortedSyntaxParse = false; - } - - bool isUnexpectedEOF() const { return isUnexpectedEOF_; } - bool checkUnescapedName(); private: @@ -1074,32 +1113,11 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter mozilla::Maybe parameterListEnd = mozilla::Nothing(), bool isStandaloneFunction = false); - // Determine whether |yield| is a valid name in the current context, or - // whether it's prohibited due to strictness, JS version, or occurrence - // inside a star generator. - bool yieldExpressionsSupported() { - return (versionNumber() >= JSVERSION_1_7 || pc->isGenerator()) && !pc->isAsync(); - } - // Match the current token against the BindingIdentifier production with // the given Yield parameter. If there is no match, report a syntax // error. PropertyName* bindingIdentifier(YieldHandling yieldHandling); - virtual bool strictMode() { return pc->sc()->strict(); } - bool setLocalStrictMode(bool strict) { - MOZ_ASSERT(tokenStream.debugHasNoLookahead()); - return pc->sc()->setLocalStrictMode(strict); - } - - const ReadOnlyCompileOptions& options() const { - return tokenStream.options(); - } - - private: - enum InvokedPrediction { PredictUninvoked = false, PredictInvoked = true }; - enum ForInitLocation { InForInit, NotInForInit }; - private: /* * JS parsers, from lowest to highest precedence. @@ -1371,8 +1389,6 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter bool hasValidSimpleStrictParameterNames(); - bool isValidStrictBinding(PropertyName* name); - void reportRedeclaration(HandlePropertyName name, DeclarationKind kind, TokenPos pos); bool notePositionalFormalParameter(Node fn, HandlePropertyName name, bool disallowDuplicateParams, bool* duplicatedParam); @@ -1428,14 +1444,7 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter JSAtom* prefixAccessorName(PropertyType propType, HandleAtom propAtom); - TokenPos pos() const { return tokenStream.currentToken().pos; } - bool asmJS(Node list); - - void addTelemetry(JSCompartment::DeprecatedLanguageExtension e); - - bool warnOnceAboutExprClosure(); - bool warnOnceAboutForEach(); }; } /* namespace frontend */ diff --git a/js/src/frontend/TokenStream.cpp b/js/src/frontend/TokenStream.cpp index 179a7c244725..eeac549821a6 100644 --- a/js/src/frontend/TokenStream.cpp +++ b/js/src/frontend/TokenStream.cpp @@ -780,7 +780,7 @@ TokenStream::reportWarning(unsigned errorNumber, ...) } bool -TokenStream::reportStrictWarningErrorNumberVA(uint32_t offset, unsigned errorNumber, va_list args) +TokenStream::reportExtraWarningErrorNumberVA(uint32_t offset, unsigned errorNumber, va_list args) { if (!options().extraWarningsOption) return true; diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h index 03a580072993..6ba9fba5a6dc 100644 --- a/js/src/frontend/TokenStream.h +++ b/js/src/frontend/TokenStream.h @@ -375,8 +375,7 @@ class MOZ_STACK_CLASS TokenStream va_list args); bool reportStrictModeErrorNumberVA(uint32_t offset, bool strictMode, unsigned errorNumber, va_list args); - bool reportStrictWarningErrorNumberVA(uint32_t offset, unsigned errorNumber, - va_list args); + bool reportExtraWarningErrorNumberVA(uint32_t offset, unsigned errorNumber, va_list args); // asm.js reporter void reportAsmJSError(uint32_t offset, unsigned errorNumber, ...); diff --git a/js/src/jit-test/tests/baseline/getgname-uninitialized-let.js b/js/src/jit-test/tests/baseline/getgname-uninitialized-let.js new file mode 100644 index 000000000000..6901ded9639c --- /dev/null +++ b/js/src/jit-test/tests/baseline/getgname-uninitialized-let.js @@ -0,0 +1,8 @@ +for (var i = 0; i < 12; i++) { + try { + // GetGName + void x; + } catch (e) { } +} + +let x; diff --git a/js/src/jit-test/tests/baseline/getname-uninitialized-let.js b/js/src/jit-test/tests/baseline/getname-uninitialized-let.js new file mode 100644 index 000000000000..a20d4a89064a --- /dev/null +++ b/js/src/jit-test/tests/baseline/getname-uninitialized-let.js @@ -0,0 +1,13 @@ +function f() { + for (var i = 0; i < 12; i++) { + try { + eval(""); + + void x; + } catch (e) { } + } +} + +f(); + +let x; diff --git a/js/src/jit-test/tests/ion/bug1188586.js b/js/src/jit-test/tests/ion/bug1188586.js new file mode 100644 index 000000000000..df5f166ba4d8 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1188586.js @@ -0,0 +1,7 @@ +(function(y) { + for (var k = 0; k < 9; ++k) { + try { + y ** y == a; + } catch (e) {} + } +})(); diff --git a/js/src/jit-test/tests/ion/bug1326150.js b/js/src/jit-test/tests/ion/bug1326150.js new file mode 100644 index 000000000000..3c9047c98325 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug1326150.js @@ -0,0 +1,4 @@ +this.x = []; +Function.apply(null, this.x); +Object.defineProperty(this, "x", {get: valueOf}); +assertEq(evaluate("this.x;"), this); diff --git a/js/src/jit/BaselineCacheIRCompiler.cpp b/js/src/jit/BaselineCacheIRCompiler.cpp index 9759226ec928..5e38dc101cd5 100644 --- a/js/src/jit/BaselineCacheIRCompiler.cpp +++ b/js/src/jit/BaselineCacheIRCompiler.cpp @@ -415,9 +415,9 @@ BaselineCacheIRCompiler::emitCallScriptedGetterResult() return true; } -typedef bool (*DoCallNativeGetterFn)(JSContext*, HandleFunction, HandleObject, MutableHandleValue); -static const VMFunction DoCallNativeGetterInfo = - FunctionInfo(DoCallNativeGetter, "DoCallNativeGetter"); +typedef bool (*CallNativeGetterFn)(JSContext*, HandleFunction, HandleObject, MutableHandleValue); +static const VMFunction CallNativeGetterInfo = + FunctionInfo(CallNativeGetter, "CallNativeGetter"); bool BaselineCacheIRCompiler::emitCallNativeGetterResult() @@ -439,7 +439,7 @@ BaselineCacheIRCompiler::emitCallNativeGetterResult() masm.Push(obj); masm.Push(scratch); - if (!callVM(masm, DoCallNativeGetterInfo)) + if (!callVM(masm, CallNativeGetterInfo)) return false; stubFrame.leave(masm); diff --git a/js/src/jit/BaselineDebugModeOSR.cpp b/js/src/jit/BaselineDebugModeOSR.cpp index eac27aa3a2da..d3e57ea76a4d 100644 --- a/js/src/jit/BaselineDebugModeOSR.cpp +++ b/js/src/jit/BaselineDebugModeOSR.cpp @@ -698,7 +698,6 @@ RecompileBaselineScriptForDebugMode(JSContext* cx, JSScript* script, _(Call_ScriptedApplyArray) \ _(Call_ScriptedApplyArguments) \ _(Call_ScriptedFunCall) \ - _(GetProp_CallNativeGlobal) \ _(GetProp_Generic) \ _(SetProp_CallScripted) \ _(SetProp_CallNative) diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp index 1ffc5e41e60a..18097d42b193 100644 --- a/js/src/jit/BaselineIC.cpp +++ b/js/src/jit/BaselineIC.cpp @@ -435,10 +435,6 @@ ICTypeUpdate_ObjectGroup::Compiler::generateStubCode(MacroAssembler& masm) return true; } -typedef bool (*DoCallNativeGetterFn)(JSContext*, HandleFunction, HandleObject, MutableHandleValue); -static const VMFunction DoCallNativeGetterInfo = - FunctionInfo(DoCallNativeGetter, "DoCallNativeGetter"); - // // ToBool_Fallback // @@ -839,6 +835,14 @@ IsCacheableSetPropCall(JSContext* cx, JSObject* obj, JSObject* holder, Shape* sh JSFunction* func = &shape->setterObject()->as(); + if (IsWindow(obj)) { + if (!func->isNative()) + return false; + + if (!func->jitInfo() || func->jitInfo()->needsOuterizedThisObject()) + return false; + } + if (func->isNative()) { *isScripted = false; return true; @@ -963,7 +967,7 @@ DoGetElemFallback(JSContext* cx, BaselineFrame* frame, ICGetElem_Fallback* stub_ if (!attached && !JitOptions.disableCacheIR) { ICStubEngine engine = ICStubEngine::Baseline; GetPropIRGenerator gen(cx, pc, CacheKind::GetElem, engine, &isTemporarilyUnoptimizable, - lhs, rhs); + lhs, rhs, CanAttachGetter::Yes); if (gen.tryAttachStub()) { ICStub* newStub = AttachBaselineCacheIRStub(cx, gen.writerRef(), gen.cacheKind(), engine, info.outerScript(cx), stub); @@ -1101,14 +1105,20 @@ DenseOrUnboxedArraySetElemStubExists(JSContext* cx, ICStub::Kind kind, for (ICStubConstIterator iter = stub->beginChainConst(); !iter.atEnd(); iter++) { if (kind == ICStub::SetElem_DenseOrUnboxedArray && iter->isSetElem_DenseOrUnboxedArray()) { ICSetElem_DenseOrUnboxedArray* nstub = iter->toSetElem_DenseOrUnboxedArray(); - if (obj->maybeShape() == nstub->shape() && obj->getGroup(cx) == nstub->group()) + if (obj->maybeShape() == nstub->shape() && + JSObject::getGroup(cx, obj) == nstub->group()) + { return true; + } } if (kind == ICStub::SetElem_DenseOrUnboxedArrayAdd && iter->isSetElem_DenseOrUnboxedArrayAdd()) { ICSetElem_DenseOrUnboxedArrayAdd* nstub = iter->toSetElem_DenseOrUnboxedArrayAdd(); - if (obj->getGroup(cx) == nstub->group() && SetElemAddHasSameShapes(nstub, obj)) + if (JSObject::getGroup(cx, obj) == nstub->group() && + SetElemAddHasSameShapes(nstub, obj)) + { return true; + } } } return false; @@ -1298,7 +1308,7 @@ DoSetElemFallback(JSContext* cx, BaselineFrame* frame, ICSetElem_Fallback* stub_ &addingCase, &protoDepth)) { RootedShape shape(cx, obj->maybeShape()); - RootedObjectGroup group(cx, obj->getGroup(cx)); + RootedObjectGroup group(cx, JSObject::getGroup(cx, obj)); if (!group) return false; @@ -2357,133 +2367,6 @@ ICIn_Dense::Compiler::generateStubCode(MacroAssembler& masm) return true; } -// Try to update existing SetProp setter call stubs for the given holder in -// place with a new shape and setter. -static bool -UpdateExistingSetPropCallStubs(ICSetProp_Fallback* fallbackStub, - ICStub::Kind kind, - NativeObject* holder, - JSObject* receiver, - JSFunction* setter) -{ - MOZ_ASSERT(kind == ICStub::SetProp_CallScripted || - kind == ICStub::SetProp_CallNative); - MOZ_ASSERT(holder); - MOZ_ASSERT(receiver); - - bool isOwnSetter = (holder == receiver); - bool foundMatchingStub = false; - ReceiverGuard receiverGuard(receiver); - for (ICStubConstIterator iter = fallbackStub->beginChainConst(); !iter.atEnd(); iter++) { - if (iter->kind() == kind) { - ICSetPropCallSetter* setPropStub = static_cast(*iter); - if (setPropStub->holder() == holder && setPropStub->isOwnSetter() == isOwnSetter) { - // If this is an own setter, update the receiver guard as well, - // since that's the shape we'll be guarding on. Furthermore, - // isOwnSetter() relies on holderShape_ and receiverGuard_ being - // the same shape. - if (isOwnSetter) - setPropStub->receiverGuard().update(receiverGuard); - - MOZ_ASSERT(setPropStub->holderShape() != holder->lastProperty() || - !setPropStub->receiverGuard().matches(receiverGuard), - "Why didn't we end up using this stub?"); - - // We want to update the holder shape to match the new one no - // matter what, even if the receiver shape is different. - setPropStub->holderShape() = holder->lastProperty(); - - // Make sure to update the setter, since a shape change might - // have changed which setter we want to use. - setPropStub->setter() = setter; - if (setPropStub->receiverGuard().matches(receiverGuard)) - foundMatchingStub = true; - } - } - } - - return foundMatchingStub; -} - -// Attach an optimized stub for a GETGNAME/CALLGNAME getter op. -static bool -TryAttachGlobalNameAccessorStub(JSContext* cx, HandleScript script, jsbytecode* pc, - ICGetName_Fallback* stub, - Handle globalLexical, - HandlePropertyName name, bool* attached, - bool* isTemporarilyUnoptimizable) -{ - MOZ_ASSERT(globalLexical->isGlobal()); - RootedId id(cx, NameToId(name)); - - // There must not be a shadowing binding on the global lexical scope. - if (globalLexical->lookup(cx, id)) - return true; - - RootedGlobalObject global(cx, &globalLexical->global()); - - // The property must be found, and it must be found as a normal data property. - RootedShape shape(cx); - RootedNativeObject current(cx, global); - while (true) { - shape = current->lookup(cx, id); - if (shape) - break; - JSObject* proto = current->staticPrototype(); - if (!proto || !proto->is()) - return true; - current = &proto->as(); - } - - // Instantiate this global property, for use during Ion compilation. - if (IsIonEnabled(cx)) - EnsureTrackPropertyTypes(cx, current, id); - - // Try to add a getter stub. We don't handle scripted getters yet; if this - // changes we need to make sure IonBuilder::getPropTryCommonGetter (which - // requires a Baseline stub) handles non-outerized this objects correctly. - bool isScripted; - if (IsCacheableGetPropCall(cx, global, current, shape, &isScripted, isTemporarilyUnoptimizable) && - !isScripted) - { - ICStub* monitorStub = stub->fallbackMonitorStub()->firstMonitorStub(); - RootedFunction getter(cx, &shape->getterObject()->as()); - - // The CallNativeGlobal stub needs to generate 3 shape checks: - // - // 1. The global lexical scope shape check. - // 2. The global object shape check. - // 3. The holder shape check. - // - // 1 is done as the receiver check, as for GETNAME the global lexical scope is in the - // receiver position. 2 is done as a manual check that other GetProp stubs don't do. 3 is - // done as the holder check per normal. - // - // In the case the holder is the global object, check 2 is redundant but is not yet - // optimized away. - JitSpew(JitSpew_BaselineIC, " Generating GetName(GlobalName/NativeGetter) stub"); - if (UpdateExistingGetPropCallStubs(stub, ICStub::GetProp_CallNativeGlobal, current, - globalLexical, getter)) - { - *attached = true; - return true; - } - ICGetPropCallNativeCompiler compiler(cx, ICStub::GetProp_CallNativeGlobal, - ICStubCompiler::Engine::Baseline, - monitorStub, globalLexical, current, - getter, script->pcToOffset(pc), - /* inputDefinitelyObject = */ true); - - ICStub* newStub = compiler.getStub(compiler.getStubSpace(script)); - if (!newStub) - return false; - - stub->addNewStub(newStub); - *attached = true; - } - return true; -} - static bool DoGetNameFallback(JSContext* cx, BaselineFrame* frame, ICGetName_Fallback* stub_, HandleObject envChain, MutableHandleValue res) @@ -2502,7 +2385,6 @@ DoGetNameFallback(JSContext* cx, BaselineFrame* frame, ICGetName_Fallback* stub_ RootedPropertyName name(cx, script->getName(pc)); bool attached = false; - bool isTemporarilyUnoptimizable = false; // Attach new stub. if (stub->numOptimizedStubs() >= ICGetName_Fallback::MAX_OPTIMIZED_STUBS) { @@ -2510,12 +2392,16 @@ DoGetNameFallback(JSContext* cx, BaselineFrame* frame, ICGetName_Fallback* stub_ attached = true; } - if (!attached && IsGlobalOp(JSOp(*pc)) && !script->hasNonSyntacticScope()) { - if (!TryAttachGlobalNameAccessorStub(cx, script, pc, stub, - envChain.as(), - name, &attached, &isTemporarilyUnoptimizable)) - { - return false; + if (!attached && !JitOptions.disableCacheIR) { + ICStubEngine engine = ICStubEngine::Baseline; + GetNameIRGenerator gen(cx, pc, script, envChain, name); + if (gen.tryAttachStub()) { + ICStub* newStub = AttachBaselineCacheIRStub(cx, gen.writerRef(), gen.cacheKind(), + engine, info.outerScript(cx), stub); + if (newStub) { + JitSpew(JitSpew_BaselineIC, " Attached CacheIR stub"); + attached = true; + } } } @@ -2538,23 +2424,8 @@ DoGetNameFallback(JSContext* cx, BaselineFrame* frame, ICGetName_Fallback* stub_ // Add a type monitor stub for the resulting value. if (!stub->addMonitorStubForValue(cx, &info, res)) return false; - if (attached) - return true; - if (!JitOptions.disableCacheIR) { - ICStubEngine engine = ICStubEngine::Baseline; - GetNameIRGenerator gen(cx, pc, script, envChain, name); - if (gen.tryAttachStub()) { - ICStub* newStub = AttachBaselineCacheIRStub(cx, gen.writerRef(), gen.cacheKind(), - engine, info.outerScript(cx), stub); - if (newStub) { - JitSpew(JitSpew_BaselineIC, " Attached CacheIR stub"); - attached = true; - } - } - } - - if (!attached && !isTemporarilyUnoptimizable) + if (!attached) stub->noteUnoptimizableAccess(); return true; } @@ -2803,6 +2674,54 @@ TryAttachSetValuePropStub(JSContext* cx, HandleScript script, jsbytecode* pc, IC return true; } +// Try to update existing SetProp setter call stubs for the given holder in +// place with a new shape and setter. +static bool +UpdateExistingSetPropCallStubs(ICSetProp_Fallback* fallbackStub, + ICStub::Kind kind, + NativeObject* holder, + JSObject* receiver, + JSFunction* setter) +{ + MOZ_ASSERT(kind == ICStub::SetProp_CallScripted || + kind == ICStub::SetProp_CallNative); + MOZ_ASSERT(holder); + MOZ_ASSERT(receiver); + + bool isOwnSetter = (holder == receiver); + bool foundMatchingStub = false; + ReceiverGuard receiverGuard(receiver); + for (ICStubConstIterator iter = fallbackStub->beginChainConst(); !iter.atEnd(); iter++) { + if (iter->kind() == kind) { + ICSetPropCallSetter* setPropStub = static_cast(*iter); + if (setPropStub->holder() == holder && setPropStub->isOwnSetter() == isOwnSetter) { + // If this is an own setter, update the receiver guard as well, + // since that's the shape we'll be guarding on. Furthermore, + // isOwnSetter() relies on holderShape_ and receiverGuard_ being + // the same shape. + if (isOwnSetter) + setPropStub->receiverGuard().update(receiverGuard); + + MOZ_ASSERT(setPropStub->holderShape() != holder->lastProperty() || + !setPropStub->receiverGuard().matches(receiverGuard), + "Why didn't we end up using this stub?"); + + // We want to update the holder shape to match the new one no + // matter what, even if the receiver shape is different. + setPropStub->holderShape() = holder->lastProperty(); + + // Make sure to update the setter, since a shape change might + // have changed which setter we want to use. + setPropStub->setter() = setter; + if (setPropStub->receiverGuard().matches(receiverGuard)) + foundMatchingStub = true; + } + } + } + + return foundMatchingStub; +} + // Attach an optimized property set stub for a SETPROP/SETGNAME/SETNAME op on // an accessor property. static bool @@ -2991,7 +2910,7 @@ DoSetPropFallback(JSContext* cx, BaselineFrame* frame, ICSetProp_Fallback* stub_ if (!obj) return false; RootedShape oldShape(cx, obj->maybeShape()); - RootedObjectGroup oldGroup(cx, obj->getGroup(cx)); + RootedObjectGroup oldGroup(cx, JSObject::getGroup(cx, obj)); if (!oldGroup) return false; RootedReceiverGuard oldGuard(cx, ReceiverGuard(obj)); @@ -4011,14 +3930,13 @@ GetTemplateObjectForNative(JSContext* cx, HandleFunction target, const CallArgs& if (native == js::array_slice) { if (args.thisv().isObject()) { - JSObject* obj = &args.thisv().toObject(); + RootedObject obj(cx, &args.thisv().toObject()); if (!obj->isSingleton()) { if (obj->group()->maybePreliminaryObjects()) { *skipAttach = true; return true; } - res.set(NewFullyAllocatedArrayTryReuseGroup(cx, &args.thisv().toObject(), 0, - TenuredObject)); + res.set(NewFullyAllocatedArrayTryReuseGroup(cx, obj, 0, TenuredObject)); if (!res) return false; EnsureArrayGroupAnalyzed(cx, res); @@ -6670,7 +6588,7 @@ ICUpdatedStub* ICSetElemDenseOrUnboxedArrayAddCompiler::getStubSpecific(ICStubSpace* space, Handle shapes) { - RootedObjectGroup group(cx, obj_->getGroup(cx)); + RootedObjectGroup group(cx, JSObject::getGroup(cx, obj_)); if (!group) return nullptr; Rooted stubCode(cx, getStubCode()); @@ -6773,7 +6691,7 @@ ICSetProp_Native::ICSetProp_Native(JitCode* stubCode, ObjectGroup* group, Shape* ICSetProp_Native* ICSetProp_Native::Compiler::getStub(ICStubSpace* space) { - RootedObjectGroup group(cx, obj_->getGroup(cx)); + RootedObjectGroup group(cx, JSObject::getGroup(cx, obj_)); if (!group) return nullptr; diff --git a/js/src/jit/BaselineIC.h b/js/src/jit/BaselineIC.h index 2654fb5b37d6..a4bf859db558 100644 --- a/js/src/jit/BaselineIC.h +++ b/js/src/jit/BaselineIC.h @@ -1275,7 +1275,7 @@ class ICSetPropNativeAddCompiler : public ICStubCompiler template ICUpdatedStub* getStubSpecific(ICStubSpace* space, Handle shapes) { - RootedObjectGroup newGroup(cx, obj_->getGroup(cx)); + RootedObjectGroup newGroup(cx, JSObject::getGroup(cx, obj_)); if (!newGroup) return nullptr; diff --git a/js/src/jit/BaselineInspector.cpp b/js/src/jit/BaselineInspector.cpp index 2d7fa53fe709..967718bda107 100644 --- a/js/src/jit/BaselineInspector.cpp +++ b/js/src/jit/BaselineInspector.cpp @@ -11,6 +11,8 @@ #include "jit/BaselineIC.h" #include "jit/CacheIRCompiler.h" +#include "jsscriptinlines.h" + #include "vm/EnvironmentObject-inl.h" #include "vm/ObjectGroup-inl.h" @@ -670,22 +672,6 @@ BaselineInspector::templateCallObject() return &res->as(); } -static Shape* -GlobalShapeForGetPropFunction(ICStub* stub) -{ - if (stub->isGetProp_CallNativeGlobal()) { - ICGetProp_CallNativeGlobal* nstub = stub->toGetProp_CallNativeGlobal(); - if (nstub->isOwnGetter()) - return nullptr; - - Shape* shape = nstub->globalShape(); - MOZ_ASSERT(shape->getObjectClass()->flags & JSCLASS_IS_GLOBAL); - return shape; - } - - return nullptr; -} - static bool MatchCacheIRReceiverGuard(CacheIRReader& reader, ICCacheIR_Monitored* stub, ObjOperandId objId, ReceiverGuard* receiver) @@ -734,12 +720,89 @@ MatchCacheIRReceiverGuard(CacheIRReader& reader, ICCacheIR_Monitored* stub, ObjO return true; } +static bool +AddCacheIRGlobalGetter(ICCacheIR_Monitored* stub, bool innerized, + JSObject** holder_, Shape** holderShape_, + JSFunction** commonGetter, Shape** globalShape_, bool* isOwnProperty, + BaselineInspector::ReceiverVector& receivers, + BaselineInspector::ObjectGroupVector& convertUnboxedGroups, + JSScript* script) +{ + // We are matching on the IR generated by tryAttachGlobalNameGetter: + // + // GuardShape objId + // globalId = LoadEnclosingEnvironment objId + // GuardShape globalId + // > + // + // CallNativeGetterResult globalId + + CacheIRReader reader(stub->stubInfo()); + + ObjOperandId objId = ObjOperandId(0); + if (!reader.matchOp(CacheOp::GuardShape, objId)) + return false; + Shape* globalLexicalShape = stub->stubInfo()->getStubField(stub, reader.stubOffset()); + + if (!reader.matchOp(CacheOp::LoadEnclosingEnvironment, objId)) + return false; + ObjOperandId globalId = reader.objOperandId(); + + if (!reader.matchOp(CacheOp::GuardShape, globalId)) + return false; + Shape* globalShape = stub->stubInfo()->getStubField(stub, reader.stubOffset()); + MOZ_ASSERT(globalShape->getObjectClass()->flags & JSCLASS_IS_GLOBAL); + + JSObject* holder = &script->global(); + Shape* holderShape = globalShape; + if (reader.matchOp(CacheOp::LoadObject)) { + ObjOperandId holderId = reader.objOperandId(); + holder = stub->stubInfo()->getStubField(stub, reader.stubOffset()).get(); + + if (!reader.matchOp(CacheOp::GuardShape, holderId)) + return false; + holderShape = stub->stubInfo()->getStubField(stub, reader.stubOffset()); + } + + // This guard will always fail, try the next stub. + if (holder->as().lastProperty() != holderShape) + return true; + + if (!reader.matchOp(CacheOp::CallNativeGetterResult, globalId)) + return false; + size_t offset = reader.stubOffset(); + JSFunction* getter = + &stub->stubInfo()->getStubField(stub, offset)->as(); + + ReceiverGuard receiver; + receiver.shape = globalLexicalShape; + if (!AddReceiver(receiver, receivers, convertUnboxedGroups)) + return false; + + if (!*commonGetter) { + *holder_ = holder; + *holderShape_ = holderShape; + *commonGetter = getter; + *globalShape_ = globalShape; + + // This is always false, because the getters never live on the globalLexical. + *isOwnProperty = false; + } else if (*isOwnProperty || holderShape != *holderShape_ || globalShape != *globalShape_) { + return false; + } else { + MOZ_ASSERT(*commonGetter == getter); + } + + return true; +} + static bool AddCacheIRGetPropFunction(ICCacheIR_Monitored* stub, bool innerized, JSObject** holder, Shape** holderShape, JSFunction** commonGetter, Shape** globalShape, bool* isOwnProperty, BaselineInspector::ReceiverVector& receivers, - BaselineInspector::ObjectGroupVector& convertUnboxedGroups) + BaselineInspector::ObjectGroupVector& convertUnboxedGroups, + JSScript* script) { // We match either an own getter: // @@ -768,8 +831,11 @@ AddCacheIRGetPropFunction(ICCacheIR_Monitored* stub, bool innerized, CacheIRReader reader(stub->stubInfo()); ObjOperandId objId = ObjOperandId(0); - if (!reader.matchOp(CacheOp::GuardIsObject, objId)) - return false; + if (!reader.matchOp(CacheOp::GuardIsObject, objId)) { + return AddCacheIRGlobalGetter(stub, innerized, holder, holderShape, commonGetter, + globalShape, isOwnProperty, receivers, convertUnboxedGroups, + script); + } if (innerized) { if (!reader.matchOp(CacheOp::GuardClass, objId) || @@ -880,31 +946,11 @@ BaselineInspector::commonGetPropFunction(jsbytecode* pc, bool innerized, const ICEntry& entry = icEntryFromPC(pc); for (ICStub* stub = entry.firstStub(); stub; stub = stub->next()) { - if (stub->isGetProp_CallNativeGlobal()) { - ICGetPropCallGetter* nstub = static_cast(stub); - bool isOwn = nstub->isOwnGetter(); - if (!isOwn && !AddReceiver(nstub->receiverGuard(), receivers, convertUnboxedGroups)) - return false; - - if (!*commonGetter) { - *holder = isOwn ? nullptr : nstub->holder().get(); - *holderShape = nstub->holderShape(); - *commonGetter = nstub->getter(); - *globalShape = GlobalShapeForGetPropFunction(nstub); - *isOwnProperty = isOwn; - } else if (nstub->holderShape() != *holderShape || - GlobalShapeForGetPropFunction(nstub) != *globalShape || - isOwn != *isOwnProperty) - { - return false; - } else { - MOZ_ASSERT(*commonGetter == nstub->getter()); - } - } else if (stub->isCacheIR_Monitored()) { + if (stub->isCacheIR_Monitored()) { if (!AddCacheIRGetPropFunction(stub->toCacheIR_Monitored(), innerized, holder, holderShape, commonGetter, globalShape, isOwnProperty, receivers, - convertUnboxedGroups)) + convertUnboxedGroups, script)) { return false; } diff --git a/js/src/jit/CacheIR.cpp b/js/src/jit/CacheIR.cpp index 1e518732540a..81bf6693c223 100644 --- a/js/src/jit/CacheIR.cpp +++ b/js/src/jit/CacheIR.cpp @@ -30,12 +30,14 @@ IRGenerator::IRGenerator(JSContext* cx, jsbytecode* pc, CacheKind cacheKind) GetPropIRGenerator::GetPropIRGenerator(JSContext* cx, jsbytecode* pc, CacheKind cacheKind, ICStubEngine engine, bool* isTemporarilyUnoptimizable, - HandleValue val, HandleValue idVal) + HandleValue val, HandleValue idVal, + CanAttachGetter canAttachGetter) : IRGenerator(cx, pc, cacheKind), val_(val), idVal_(idVal), engine_(engine), isTemporarilyUnoptimizable_(isTemporarilyUnoptimizable), + canAttachGetter_(canAttachGetter), preliminaryObjectAction_(PreliminaryObjectAction::None) {} @@ -223,7 +225,8 @@ enum NativeGetPropCacheability { static NativeGetPropCacheability CanAttachNativeGetProp(JSContext* cx, HandleObject obj, HandleId id, MutableHandleNativeObject holder, MutableHandleShape shape, - jsbytecode* pc, ICStubEngine engine, bool* isTemporarilyUnoptimizable) + jsbytecode* pc, ICStubEngine engine, CanAttachGetter canAttachGetter, + bool* isTemporarilyUnoptimizable) { MOZ_ASSERT(JSID_IS_STRING(id) || JSID_IS_SYMBOL(id)); @@ -253,6 +256,9 @@ CanAttachNativeGetProp(JSContext* cx, HandleObject obj, HandleId id, if (IsCacheableNoProperty(cx, obj, holder, shape, id, pc)) return CanAttachReadSlot; + if (canAttachGetter == CanAttachGetter::No) + return CanAttachNone; + if (IsCacheableGetPropCallScripted(obj, holder, shape, isTemporarilyUnoptimizable)) { // See bug 1226816. if (engine != ICStubEngine::IonSharedIC) @@ -425,7 +431,8 @@ GetPropIRGenerator::tryAttachNative(HandleObject obj, ObjOperandId objId, Handle RootedNativeObject holder(cx_); NativeGetPropCacheability type = CanAttachNativeGetProp(cx_, obj, id, &holder, &shape, pc_, - engine_, isTemporarilyUnoptimizable_); + engine_, canAttachGetter_, + isTemporarilyUnoptimizable_); MOZ_ASSERT_IF(idempotent(), type == CanAttachNone || (type == CanAttachReadSlot && holder)); switch (type) { @@ -476,7 +483,8 @@ GetPropIRGenerator::tryAttachWindowProxy(HandleObject obj, ObjOperandId objId, H RootedShape shape(cx_); RootedNativeObject holder(cx_); NativeGetPropCacheability type = CanAttachNativeGetProp(cx_, windowObj, id, &holder, &shape, pc_, - engine_, isTemporarilyUnoptimizable_); + engine_, canAttachGetter_, + isTemporarilyUnoptimizable_); if (type != CanAttachCallGetter || !IsCacheableGetPropCallNative(windowObj, holder, shape)) { @@ -584,7 +592,7 @@ GetPropIRGenerator::tryAttachDOMProxyUnshadowed(HandleObject obj, ObjOperandId o RootedShape shape(cx_); NativeGetPropCacheability canCache = CanAttachNativeGetProp(cx_, checkObj, id, &holder, &shape, - pc_, engine_, + pc_, engine_, canAttachGetter_, isTemporarilyUnoptimizable_); MOZ_ASSERT_IF(idempotent(), canCache == CanAttachNone || (canCache == CanAttachReadSlot && holder)); @@ -1153,12 +1161,44 @@ GetNameIRGenerator::tryAttachStub() if (tryAttachGlobalNameValue(envId, id)) return true; + if (tryAttachGlobalNameGetter(envId, id)) + return true; if (tryAttachEnvironmentName(envId, id)) return true; return false; } +bool +CanAttachGlobalName(JSContext* cx, Handle globalLexical, HandleId id, + MutableHandleNativeObject holder, MutableHandleShape shape) +{ + // The property must be found, and it must be found as a normal data property. + RootedNativeObject current(cx, globalLexical); + while (true) { + shape.set(current->lookup(cx, id)); + if (shape) + break; + + if (current == globalLexical) { + current = &globalLexical->global(); + } else { + // In the browser the global prototype chain should be immutable. + if (!current->staticPrototypeIsImmutable()) + return false; + + JSObject* proto = current->staticPrototype(); + if (!proto || !proto->is()) + return false; + + current = &proto->as(); + } + } + + holder.set(current); + return true; +} + bool GetNameIRGenerator::tryAttachGlobalNameValue(ObjOperandId objId, HandleId id) { @@ -1168,44 +1208,35 @@ GetNameIRGenerator::tryAttachGlobalNameValue(ObjOperandId objId, HandleId id) Handle globalLexical = env_.as(); MOZ_ASSERT(globalLexical->isGlobal()); - // The property must be found, and it must be found as a normal data property. - RootedShape shape(cx_); - RootedNativeObject current(cx_, globalLexical); - while (true) { - shape = current->lookup(cx_, id); - if (shape) - break; - if (current == globalLexical) { - current = &globalLexical->global(); - } else { - // In the browser the global prototype chain should be immutable. - if (!current->staticPrototypeIsImmutable()) - return false; - JSObject* proto = current->staticPrototype(); - if (!proto || !proto->is()) - return false; - current = &proto->as(); - } - } + RootedNativeObject holder(cx_); + RootedShape shape(cx_); + if (!CanAttachGlobalName(cx_, globalLexical, id, &holder, &shape)) + return false; + + // The property must be found, and it must be found as a normal data property. if (!shape->hasDefaultGetter() || !shape->hasSlot()) return false; + // This might still be an uninitialized lexical. + if (holder->getSlot(shape->slot()).isMagic()) + return false; + // Instantiate this global property, for use during Ion compilation. if (IsIonEnabled(cx_)) - EnsureTrackPropertyTypes(cx_, current, id); + EnsureTrackPropertyTypes(cx_, holder, id); - if (current == globalLexical) { + if (holder == globalLexical) { // There is no need to guard on the shape. Lexical bindings are // non-configurable, and this stub cannot be shared across globals. - size_t dynamicSlotOffset = current->dynamicSlotIndex(shape->slot()) * sizeof(Value); + size_t dynamicSlotOffset = holder->dynamicSlotIndex(shape->slot()) * sizeof(Value); writer.loadDynamicSlotResult(objId, dynamicSlotOffset); } else { - // Check the prototype chain from the global to the current + // Check the prototype chain from the global to the holder // prototype. Ignore the global lexical scope as it doesn't figure // into the prototype chain. We guard on the global lexical // scope's shape independently. - if (!IsCacheableGetPropReadSlotForIonOrCacheIR(&globalLexical->global(), current, shape)) + if (!IsCacheableGetPropReadSlotForIonOrCacheIR(&globalLexical->global(), holder, shape)) return false; // Shape guard for global lexical. @@ -1216,19 +1247,59 @@ GetNameIRGenerator::tryAttachGlobalNameValue(ObjOperandId objId, HandleId id) writer.guardShape(globalId, globalLexical->global().lastProperty()); ObjOperandId holderId = globalId; - if (current != &globalLexical->global()) { + if (holder != &globalLexical->global()) { // Shape guard holder. - holderId = writer.loadObject(current); - writer.guardShape(holderId, current->lastProperty()); + holderId = writer.loadObject(holder); + writer.guardShape(holderId, holder->lastProperty()); } - EmitLoadSlotResult(writer, holderId, current, shape); + EmitLoadSlotResult(writer, holderId, holder, shape); } writer.typeMonitorResult(); return true; } +bool +GetNameIRGenerator::tryAttachGlobalNameGetter(ObjOperandId objId, HandleId id) +{ + if (!IsGlobalOp(JSOp(*pc_)) || script_->hasNonSyntacticScope()) + return false; + + Handle globalLexical = env_.as(); + MOZ_ASSERT(globalLexical->isGlobal()); + + RootedNativeObject holder(cx_); + RootedShape shape(cx_); + if (!CanAttachGlobalName(cx_, globalLexical, id, &holder, &shape)) + return false; + + if (holder == globalLexical) + return false; + + if (!IsCacheableGetPropCallNative(&globalLexical->global(), holder, shape)) + return false; + + if (IsIonEnabled(cx_)) + EnsureTrackPropertyTypes(cx_, holder, id); + + // Shape guard for global lexical. + writer.guardShape(objId, globalLexical->lastProperty()); + + // Guard on the shape of the GlobalObject. + ObjOperandId globalId = writer.loadEnclosingEnvironment(objId); + writer.guardShape(globalId, globalLexical->global().lastProperty()); + + if (holder != &globalLexical->global()) { + // Shape guard holder. + ObjOperandId holderId = writer.loadObject(holder); + writer.guardShape(holderId, holder->lastProperty()); + } + + EmitCallGetterResultNoGuards(writer, &globalLexical->global(), holder, shape, globalId); + return true; +} + bool GetNameIRGenerator::tryAttachEnvironmentName(ObjOperandId objId, HandleId id) { @@ -1265,6 +1336,8 @@ GetNameIRGenerator::tryAttachEnvironmentName(ObjOperandId objId, HandleId id) holder = &env->as(); if (!IsCacheableGetPropReadSlotForIonOrCacheIR(holder, holder, shape)) return false; + if (holder->getSlot(shape->slot()).isMagic()) + return false; ObjOperandId lastObjId = objId; env = env_; diff --git a/js/src/jit/CacheIR.h b/js/src/jit/CacheIR.h index e57d3ccbff5f..8522d01d9a84 100644 --- a/js/src/jit/CacheIR.h +++ b/js/src/jit/CacheIR.h @@ -720,6 +720,8 @@ class MOZ_RAII IRGenerator CacheKind cacheKind() const { return cacheKind_; } }; +enum class CanAttachGetter { Yes, No }; + // GetPropIRGenerator generates CacheIR for a GetProp IC. class MOZ_RAII GetPropIRGenerator : public IRGenerator { @@ -727,6 +729,7 @@ class MOZ_RAII GetPropIRGenerator : public IRGenerator HandleValue idVal_; ICStubEngine engine_; bool* isTemporarilyUnoptimizable_; + CanAttachGetter canAttachGetter_; enum class PreliminaryObjectAction { None, Unlink, NotePreliminary }; PreliminaryObjectAction preliminaryObjectAction_; @@ -777,7 +780,8 @@ class MOZ_RAII GetPropIRGenerator : public IRGenerator public: GetPropIRGenerator(JSContext* cx, jsbytecode* pc, CacheKind cacheKind, ICStubEngine engine, - bool* isTemporarilyUnoptimizable, HandleValue val, HandleValue idVal); + bool* isTemporarilyUnoptimizable, HandleValue val, HandleValue idVal, + CanAttachGetter canAttachGetter); bool tryAttachStub(); bool tryAttachIdempotentStub(); @@ -798,6 +802,7 @@ class MOZ_RAII GetNameIRGenerator : public IRGenerator HandlePropertyName name_; bool tryAttachGlobalNameValue(ObjOperandId objId, HandleId id); + bool tryAttachGlobalNameGetter(ObjOperandId objId, HandleId id); bool tryAttachEnvironmentName(ObjOperandId objId, HandleId id); public: diff --git a/js/src/jit/IonCaches.cpp b/js/src/jit/IonCaches.cpp index a8af8b6c9615..da0d7acd80d4 100644 --- a/js/src/jit/IonCaches.cpp +++ b/js/src/jit/IonCaches.cpp @@ -2427,9 +2427,20 @@ IsCacheableSetPropCallNative(HandleObject obj, HandleObject holder, HandleShape if (!shape || !IsCacheableProtoChainForIonOrCacheIR(obj, holder)) return false; - return shape->hasSetterValue() && shape->setterObject() && - shape->setterObject()->is() && - shape->setterObject()->as().isNative(); + if (!shape->hasSetterValue()) + return false; + + if (!shape->setterObject() || !shape->setterObject()->is()) + return false; + + JSFunction& setter = shape->setterObject()->as(); + if (!setter.isNative()) + return false; + + if (setter.jitInfo() && !setter.jitInfo()->needsOuterizedThisObject()) + return true; + + return !IsWindow(obj); } static bool @@ -2438,6 +2449,9 @@ IsCacheableSetPropCallScripted(HandleObject obj, HandleObject holder, HandleShap if (!shape || !IsCacheableProtoChainForIonOrCacheIR(obj, holder)) return false; + if (IsWindow(obj)) + return false; + return shape->hasSetterValue() && shape->setterObject() && shape->setterObject()->is() && shape->setterObject()->as().hasJITCode(); @@ -3690,7 +3704,7 @@ SetPropertyIC::update(JSContext* cx, HandleScript outerScript, size_t cacheIndex RootedObjectGroup oldGroup(cx); RootedShape oldShape(cx); if (cache.canAttachStub()) { - oldGroup = obj->getGroup(cx); + oldGroup = JSObject::getGroup(cx, obj); if (!oldGroup) return false; diff --git a/js/src/jit/IonIC.cpp b/js/src/jit/IonIC.cpp index 5b35a4dbc05f..2e411020e9cc 100644 --- a/js/src/jit/IonIC.cpp +++ b/js/src/jit/IonIC.cpp @@ -127,12 +127,18 @@ IonGetPropertyIC::update(JSContext* cx, HandleScript outerScript, IonGetProperty bool attached = false; if (!JitOptions.disableCacheIR && !ic->disabled()) { if (ic->canAttachStub()) { + // IonBuilder calls PropertyReadNeedsTypeBarrier to determine if it + // needs a type barrier. Unfortunately, PropertyReadNeedsTypeBarrier + // does not account for getters, so we should only attach a getter + // stub if we inserted a type barrier. + CanAttachGetter canAttachGetter = + ic->monitoredResult() ? CanAttachGetter::Yes : CanAttachGetter::No; jsbytecode* pc = ic->idempotent() ? nullptr : ic->pc(); RootedValue objVal(cx, ObjectValue(*obj)); bool isTemporarilyUnoptimizable; GetPropIRGenerator gen(cx, pc, ic->kind(), ICStubEngine::IonIC, &isTemporarilyUnoptimizable, - objVal, idVal); + objVal, idVal, canAttachGetter); if (ic->idempotent() ? gen.tryAttachIdempotentStub() : gen.tryAttachStub()) { attached = ic->attachCacheIRStub(cx, gen.writerRef(), gen.cacheKind(), outerScript); diff --git a/js/src/jit/JitAllocPolicy.h b/js/src/jit/JitAllocPolicy.h index bf162929063f..ab4f8693591c 100644 --- a/js/src/jit/JitAllocPolicy.h +++ b/js/src/jit/JitAllocPolicy.h @@ -173,7 +173,7 @@ struct TempObject "Placement new argument type must inherit from TempObject"); MOZ_ASSERT(pos); return pos; - } + } }; template diff --git a/js/src/jit/JitOptions.cpp b/js/src/jit/JitOptions.cpp index eb5a6c1c2242..fca633662216 100644 --- a/js/src/jit/JitOptions.cpp +++ b/js/src/jit/JitOptions.cpp @@ -237,6 +237,16 @@ DefaultJitOptions::DefaultJitOptions() // included in the bounds check. SET_DEFAULT(wasmFoldOffsets, true); + // Until which wasm bytecode size should we accumulate functions, in order + // to compile efficiently on helper threads (see also bug 1320374). + SET_DEFAULT(wasmBatchThreshold, 10000); + + // In order to have different batching thresholds for Ion and the wasm + // baseline, and since a same batch can contain both Ion and baseline + // compiled functions, we make Ion functions weight more by using a scaling + // factor. + SET_DEFAULT(wasmBatchIonScaleFactor, 9); + // Determines whether we suppress using signal handlers // for interrupting jit-ed code. This is used only for testing. SET_DEFAULT(ionInterruptWithoutSignals, false); diff --git a/js/src/jit/JitOptions.h b/js/src/jit/JitOptions.h index 076980b4e55b..769b42f59759 100644 --- a/js/src/jit/JitOptions.h +++ b/js/src/jit/JitOptions.h @@ -87,6 +87,8 @@ struct DefaultJitOptions uint32_t branchPruningBlockSpanFactor; uint32_t branchPruningEffectfulInstFactor; uint32_t branchPruningThreshold; + uint32_t wasmBatchThreshold; + uint32_t wasmBatchIonScaleFactor; mozilla::Maybe forcedDefaultIonWarmUpThreshold; mozilla::Maybe forcedDefaultIonSmallFunctionWarmUpThreshold; mozilla::Maybe forcedRegisterAllocator; diff --git a/js/src/jit/MIR.cpp b/js/src/jit/MIR.cpp index b49322871b03..e999c434e742 100644 --- a/js/src/jit/MIR.cpp +++ b/js/src/jit/MIR.cpp @@ -160,9 +160,9 @@ EvaluateConstantOperands(TempAllocator& alloc, MBinaryInstruction* ins, bool* pt // bits. This isn't strictly required for either ES or wasm, but it does // avoid making constant-folding observable. if (ins->type() == MIRType::Double) - return MConstant::New(alloc, wasm::RawF64(ret)); + return MConstant::NewRawDouble(alloc, ret); if (ins->type() == MIRType::Float32) - return MConstant::New(alloc, wasm::RawF32(float(ret))); + return MConstant::NewRawFloat32(alloc, float(ret)); Value retVal; retVal.setNumber(JS::CanonicalizeNaN(ret)); @@ -812,6 +812,18 @@ MConstant::New(TempAllocator::Fallible alloc, const Value& v, CompilerConstraint return new(alloc) MConstant(v, constraints); } +MConstant* +MConstant::NewRawFloat32(TempAllocator& alloc, float f) +{ + return new(alloc) MConstant(f); +} + +MConstant* +MConstant::NewRawDouble(TempAllocator& alloc, double d) +{ + return new(alloc) MConstant(d); +} + MConstant* MConstant::NewFloat32(TempAllocator& alloc, double d) { @@ -819,22 +831,6 @@ MConstant::NewFloat32(TempAllocator& alloc, double d) return new(alloc) MConstant(float(d)); } -MConstant* -MConstant::New(TempAllocator& alloc, wasm::RawF32 f) -{ - auto* c = new(alloc) MConstant(Int32Value(f.bits()), nullptr); - c->setResultType(MIRType::Float32); - return c; -} - -MConstant* -MConstant::New(TempAllocator& alloc, wasm::RawF64 d) -{ - auto* c = new(alloc) MConstant(int64_t(d.bits())); - c->setResultType(MIRType::Double); - return c; -} - MConstant* MConstant::NewInt64(TempAllocator& alloc, int64_t i) { @@ -3299,10 +3295,10 @@ MMinMax::foldsTo(TempAllocator& alloc) if (mozilla::NumberEqualsInt32(result, &cast)) return MConstant::New(alloc, Int32Value(cast)); } else if (type() == MIRType::Float32) { - return MConstant::New(alloc, wasm::RawF32(float(result))); + return MConstant::NewRawFloat32(alloc, float(result)); } else { MOZ_ASSERT(type() == MIRType::Double); - return MConstant::New(alloc, wasm::RawF64(result)); + return MConstant::NewRawDouble(alloc, result); } } @@ -4340,10 +4336,8 @@ MToDouble::foldsTo(TempAllocator& alloc) if (input->type() == MIRType::Double) return input; - if (input->isConstant() && input->toConstant()->isTypeRepresentableAsDouble()) { - double out = input->toConstant()->numberToDouble(); - return MConstant::New(alloc, wasm::RawF64(out)); - } + if (input->isConstant() && input->toConstant()->isTypeRepresentableAsDouble()) + return MConstant::NewRawDouble(alloc, input->toConstant()->numberToDouble()); return this; } @@ -4366,10 +4360,8 @@ MToFloat32::foldsTo(TempAllocator& alloc) return input->toToDouble()->input(); } - if (input->isConstant() && input->toConstant()->isTypeRepresentableAsDouble()) { - float out = float(input->toConstant()->numberToDouble()); - return MConstant::New(alloc, wasm::RawF32(out)); - } + if (input->isConstant() && input->toConstant()->isTypeRepresentableAsDouble()) + return MConstant::NewRawFloat32(alloc, float(input->toConstant()->numberToDouble())); return this; } diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index c79443e7c9aa..1651816cf5ce 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -1581,8 +1581,8 @@ class MConstant : public MNullaryInstruction static MConstant* New(TempAllocator::Fallible alloc, const Value& v, CompilerConstraintList* constraints = nullptr); static MConstant* New(TempAllocator& alloc, const Value& v, MIRType type); - static MConstant* New(TempAllocator& alloc, wasm::RawF32 bits); - static MConstant* New(TempAllocator& alloc, wasm::RawF64 bits); + static MConstant* NewRawFloat32(TempAllocator& alloc, float f); + static MConstant* NewRawDouble(TempAllocator& alloc, double d); static MConstant* NewFloat32(TempAllocator& alloc, double d); static MConstant* NewInt64(TempAllocator& alloc, int64_t i); static MConstant* NewConstraintlessObject(TempAllocator& alloc, JSObject* v); @@ -1650,22 +1650,14 @@ class MConstant : public MNullaryInstruction bool isInt32(int32_t i) const { return type() == MIRType::Int32 && payload_.i32 == i; } - double toDouble() const { + const double& toDouble() const { MOZ_ASSERT(type() == MIRType::Double); return payload_.d; } - wasm::RawF64 toRawF64() const { - MOZ_ASSERT(type() == MIRType::Double); - return wasm::RawF64::fromBits(payload_.i64); - } - float toFloat32() const { + const float& toFloat32() const { MOZ_ASSERT(type() == MIRType::Float32); return payload_.f; } - wasm::RawF32 toRawF32() const { - MOZ_ASSERT(type() == MIRType::Float32); - return wasm::RawF32::fromBits(payload_.i32); - } JSString* toString() const { MOZ_ASSERT(type() == MIRType::String); return payload_.str; diff --git a/js/src/jit/SharedIC.cpp b/js/src/jit/SharedIC.cpp index 1155709c7683..61c3bd0350d0 100644 --- a/js/src/jit/SharedIC.cpp +++ b/js/src/jit/SharedIC.cpp @@ -175,7 +175,6 @@ ICStub::NonCacheIRStubMakesGCCalls(Kind kind) case Call_ScriptedFunCall: case Call_StringSplit: case WarmUpCounter_Fallback: - case GetProp_CallNativeGlobal: case GetProp_Generic: case SetProp_CallScripted: case SetProp_CallNative: @@ -352,15 +351,6 @@ ICStub::trace(JSTracer* trc) TraceEdge(trc, &constantStub->value(), "baseline-getintrinsic-constant-value"); break; } - case ICStub::GetProp_CallNativeGlobal: { - ICGetProp_CallNativeGlobal* callStub = toGetProp_CallNativeGlobal(); - callStub->receiverGuard().trace(trc); - TraceEdge(trc, &callStub->holder(), "baseline-getpropcallnativeglobal-stub-holder"); - TraceEdge(trc, &callStub->holderShape(), "baseline-getpropcallnativeglobal-stub-holdershape"); - TraceEdge(trc, &callStub->globalShape(), "baseline-getpropcallnativeglobal-stub-globalshape"); - TraceEdge(trc, &callStub->getter(), "baseline-getpropcallnativeglobal-stub-getter"); - break; - } case ICStub::SetProp_Native: { ICSetProp_Native* propStub = toSetProp_Native(); TraceEdge(trc, &propStub->shape(), "baseline-setpropnative-stub-shape"); @@ -2094,6 +2084,14 @@ IsCacheableGetPropCall(JSContext* cx, JSObject* obj, JSObject* holder, Shape* sh return false; JSFunction* func = &shape->getterObject()->as(); + if (IsWindow(obj)) { + if (!func->isNative()) + return false; + + if (!func->jitInfo() || func->jitInfo()->needsOuterizedThisObject()) + return false; + } + if (func->isNative()) { *isScripted = false; return true; @@ -2108,68 +2106,6 @@ IsCacheableGetPropCall(JSContext* cx, JSObject* obj, JSObject* holder, Shape* sh return true; } -// Try to update all existing GetProp/GetName getter call stubs that match the -// given holder in place with a new shape and getter. fallbackStub can be -// either an ICGetProp_Fallback or an ICGetName_Fallback. -// -// If 'getter' is an own property, holder == receiver must be true. -bool -UpdateExistingGetPropCallStubs(ICFallbackStub* fallbackStub, - ICStub::Kind kind, - HandleNativeObject holder, - HandleObject receiver, - HandleFunction getter) -{ - MOZ_ASSERT(kind == ICStub::GetProp_CallNativeGlobal); - MOZ_ASSERT(fallbackStub->isGetName_Fallback() || - fallbackStub->isGetProp_Fallback()); - MOZ_ASSERT(holder); - MOZ_ASSERT(receiver); - - bool isOwnGetter = (holder == receiver); - bool foundMatchingStub = false; - ReceiverGuard receiverGuard(receiver); - for (ICStubConstIterator iter = fallbackStub->beginChainConst(); !iter.atEnd(); iter++) { - if (iter->kind() == kind) { - ICGetPropCallGetter* getPropStub = static_cast(*iter); - if (getPropStub->holder() == holder && getPropStub->isOwnGetter() == isOwnGetter) { - // If this is an own getter, update the receiver guard as well, - // since that's the shape we'll be guarding on. Furthermore, - // isOwnGetter() relies on holderShape_ and receiverGuard_ being - // the same shape. - if (isOwnGetter) - getPropStub->receiverGuard().update(receiverGuard); - - MOZ_ASSERT(getPropStub->holderShape() != holder->lastProperty() || - !getPropStub->receiverGuard().matches(receiverGuard) || - getPropStub->toGetProp_CallNativeGlobal()->globalShape() != - receiver->as().global().lastProperty(), - "Why didn't we end up using this stub?"); - - // We want to update the holder shape to match the new one no - // matter what, even if the receiver shape is different. - getPropStub->holderShape() = holder->lastProperty(); - - // Make sure to update the getter, since a shape change might - // have changed which getter we want to use. - getPropStub->getter() = getter; - - if (getPropStub->isGetProp_CallNativeGlobal()) { - ICGetProp_CallNativeGlobal* globalStub = - getPropStub->toGetProp_CallNativeGlobal(); - globalStub->globalShape() = - receiver->as().global().lastProperty(); - } - - if (getPropStub->receiverGuard().matches(receiverGuard)) - foundMatchingStub = true; - } - } - } - - return foundMatchingStub; -} - bool CheckHasNoSuchProperty(JSContext* cx, JSObject* obj, jsid id, JSObject** lastProto, size_t* protoChainDepthOut) @@ -2296,7 +2232,7 @@ DoGetPropFallback(JSContext* cx, void* payload, ICGetProp_Fallback* stub_, if (!attached && !JitOptions.disableCacheIR) { RootedValue idVal(cx, StringValue(name)); GetPropIRGenerator gen(cx, pc, CacheKind::GetProp, engine, &isTemporarilyUnoptimizable, - val, idVal); + val, idVal, CanAttachGetter::Yes); if (gen.tryAttachStub()) { ICStub* newStub = AttachBaselineCacheIRStub(cx, gen.writerRef(), gen.cacheKind(), engine, info.outerScript(cx), stub); @@ -2430,18 +2366,6 @@ GuardReceiverObject(MacroAssembler& masm, ReceiverGuard guard, } } -static void -GuardGlobalObject(MacroAssembler& masm, HandleObject holder, Register globalLexicalReg, - Register holderReg, Register scratch, size_t globalShapeOffset, Label* failure) -{ - if (holder->is()) - return; - masm.extractObject(Address(globalLexicalReg, EnvironmentObject::offsetOfEnclosingEnvironment()), - holderReg); - masm.loadPtr(Address(ICStubReg, globalShapeOffset), scratch); - masm.branchTestObjShape(Assembler::NotEqual, holderReg, scratch, failure); -} - bool GetProtoShapes(JSObject* obj, size_t protoChainDepth, MutableHandle shapes) { @@ -2457,135 +2381,6 @@ GetProtoShapes(JSObject* obj, size_t protoChainDepth, MutableHandle return true; } -// -// VM function to help call native getters. -// - -bool -DoCallNativeGetter(JSContext* cx, HandleFunction callee, HandleObject obj, - MutableHandleValue result) -{ - MOZ_ASSERT(callee->isNative()); - JSNative natfun = callee->native(); - - JS::AutoValueArray<2> vp(cx); - vp[0].setObject(*callee.get()); - vp[1].setObject(*obj.get()); - - if (!natfun(cx, 0, vp.begin())) - return false; - - result.set(vp[0]); - return true; -} - -typedef bool (*DoCallNativeGetterFn)(JSContext*, HandleFunction, HandleObject, MutableHandleValue); -static const VMFunction DoCallNativeGetterInfo = - FunctionInfo(DoCallNativeGetter, "DoCallNativeGetter"); - -bool -ICGetPropCallNativeCompiler::generateStubCode(MacroAssembler& masm) -{ - Label failure; - - AllocatableGeneralRegisterSet regs(availableGeneralRegs(1)); - Register objReg = InvalidReg; - - if (inputDefinitelyObject_) { - objReg = R0.scratchReg(); - } else { - // Guard input is an object and unbox. - masm.branchTestObject(Assembler::NotEqual, R0, &failure); - objReg = masm.extractObject(R0, ExtractTemp0); - } - - Register scratch = regs.takeAnyExcluding(ICTailCallReg); - - // Shape guard. - GuardReceiverObject(masm, ReceiverGuard(receiver_), objReg, scratch, - ICGetPropCallGetter::offsetOfReceiverGuard(), &failure); - - if (receiver_ != holder_) { - Register holderReg = regs.takeAny(); - - // If we are generating a non-lexical GETGNAME stub, we must also - // guard on the shape of the GlobalObject. - if (kind == ICStub::GetProp_CallNativeGlobal) { - MOZ_ASSERT(receiver_->is() && - receiver_->as().isGlobal()); - GuardGlobalObject(masm, holder_, objReg, holderReg, scratch, - ICGetProp_CallNativeGlobal::offsetOfGlobalShape(), &failure); - } - - masm.loadPtr(Address(ICStubReg, ICGetPropCallGetter::offsetOfHolder()), holderReg); - masm.loadPtr(Address(ICStubReg, ICGetPropCallGetter::offsetOfHolderShape()), scratch); - masm.branchTestObjShape(Assembler::NotEqual, holderReg, scratch, &failure); - regs.add(holderReg); - } - - // Box and push obj onto baseline frame stack for decompiler - if (engine_ == Engine::Baseline) { - if (inputDefinitelyObject_) - masm.tagValue(JSVAL_TYPE_OBJECT, objReg, R0); - EmitStowICValues(masm, 1); - if (inputDefinitelyObject_) - objReg = masm.extractObject(R0, ExtractTemp0); - } - - // Push a stub frame so that we can perform a non-tail call. - enterStubFrame(masm, scratch); - - // Load callee function. - Register callee = regs.takeAny(); - masm.loadPtr(Address(ICStubReg, ICGetPropCallGetter::offsetOfGetter()), callee); - - // If we're calling a getter on the global, inline the logic for the - // 'this' hook on the global lexical scope and manually push the global. - if (kind == ICStub::GetProp_CallNativeGlobal) - masm.extractObject(Address(objReg, EnvironmentObject::offsetOfEnclosingEnvironment()), - objReg); - - // Push args for vm call. - masm.Push(objReg); - masm.Push(callee); - - regs.add(R0); - - if (!callVM(DoCallNativeGetterInfo, masm)) - return false; - leaveStubFrame(masm); - - if (engine_ == Engine::Baseline) - EmitUnstowICValues(masm, 1, /* discard = */true); - - // Enter type monitor IC to type-check result. - EmitEnterTypeMonitorIC(masm); - - // Failure case - jump to next stub - masm.bind(&failure); - EmitStubGuardFailure(masm); - return true; -} - -ICStub* -ICGetPropCallNativeCompiler::getStub(ICStubSpace* space) -{ - ReceiverGuard guard(receiver_); - Shape* holderShape = holder_->as().lastProperty(); - - switch (kind) { - case ICStub::GetProp_CallNativeGlobal: { - Shape* globalShape = receiver_->as().global().lastProperty(); - return newStub(space, getStubCode(), firstMonitorStub_, - guard, holder_, holderShape, globalShape, - getter_, pcOffset_); - } - - default: - MOZ_CRASH("Bad stub kind"); - } -} - /* static */ ICGetProp_Generic* ICGetProp_Generic::Clone(JSContext* cx, ICStubSpace* space, ICStub* firstMonitorStub, ICGetProp_Generic& other) @@ -2678,31 +2473,6 @@ BaselineScript::noteAccessedGetter(uint32_t pcOffset) stub->toGetProp_Fallback()->noteAccessedGetter(); } -ICGetPropCallGetter::ICGetPropCallGetter(Kind kind, JitCode* stubCode, ICStub* firstMonitorStub, - ReceiverGuard receiverGuard, JSObject* holder, - Shape* holderShape, JSFunction* getter, - uint32_t pcOffset) - : ICMonitoredStub(kind, stubCode, firstMonitorStub), - receiverGuard_(receiverGuard), - holder_(holder), - holderShape_(holderShape), - getter_(getter), - pcOffset_(pcOffset) -{ - MOZ_ASSERT(kind == ICStub::GetProp_CallNativeGlobal); -} - -/* static */ ICGetProp_CallNativeGlobal* -ICGetProp_CallNativeGlobal::Clone(JSContext* cx, ICStubSpace* space, ICStub* firstMonitorStub, - ICGetProp_CallNativeGlobal& other) -{ - return New(cx, space, other.jitCode(), firstMonitorStub, - other.receiverGuard(), other.holder_, - other.holderShape_, other.globalShape_, - other.getter_, other.pcOffset_); -} - -// // TypeMonitor_Fallback // diff --git a/js/src/jit/SharedIC.h b/js/src/jit/SharedIC.h index 184ca2bb95d4..099bde8134a0 100644 --- a/js/src/jit/SharedIC.h +++ b/js/src/jit/SharedIC.h @@ -2256,10 +2256,6 @@ GetProtoShapes(JSObject* obj, size_t protoChainDepth, MutableHandle void CheckForTypedObjectWithDetachedStorage(JSContext* cx, MacroAssembler& masm, Label* failure); -MOZ_MUST_USE bool -DoCallNativeGetter(JSContext* cx, HandleFunction callee, HandleObject obj, - MutableHandleValue result); - void LoadTypedThingData(MacroAssembler& masm, TypedThingLayout layout, Register obj, Register result); @@ -2384,158 +2380,6 @@ ReferenceTypeFromSimpleTypeDescrKey(uint32_t key) return ReferenceTypeDescr::Type(key >> 1); } -class ICGetPropCallGetter : public ICMonitoredStub -{ - friend class ICStubSpace; - - protected: - // Shape/group of receiver object. Used for both own and proto getters. - // In the GetPropCallDOMProxyNative case, the receiver guard enforces - // the proxy handler, because Shape implies Class. - HeapReceiverGuard receiverGuard_; - - // Holder and holder shape. For own getters, guarding on receiverGuard_ is - // sufficient, although Ion may use holder_ and holderShape_ even for own - // getters. In this case holderShape_ == receiverGuard_.shape_ (isOwnGetter - // below relies on this). - GCPtrObject holder_; - - GCPtrShape holderShape_; - - // Function to call. - GCPtrFunction getter_; - - // PC offset of call - uint32_t pcOffset_; - - ICGetPropCallGetter(Kind kind, JitCode* stubCode, ICStub* firstMonitorStub, - ReceiverGuard receiverGuard, JSObject* holder, - Shape* holderShape, JSFunction* getter, uint32_t pcOffset); - - public: - GCPtrObject& holder() { - return holder_; - } - GCPtrShape& holderShape() { - return holderShape_; - } - GCPtrFunction& getter() { - return getter_; - } - HeapReceiverGuard& receiverGuard() { - return receiverGuard_; - } - - bool isOwnGetter() const { - MOZ_ASSERT(holder_->isNative()); - MOZ_ASSERT(holderShape_); - return receiverGuard_.shape() == holderShape_; - } - - static size_t offsetOfHolder() { - return offsetof(ICGetPropCallGetter, holder_); - } - static size_t offsetOfHolderShape() { - return offsetof(ICGetPropCallGetter, holderShape_); - } - static size_t offsetOfGetter() { - return offsetof(ICGetPropCallGetter, getter_); - } - static size_t offsetOfPCOffset() { - return offsetof(ICGetPropCallGetter, pcOffset_); - } - static size_t offsetOfReceiverGuard() { - return offsetof(ICGetPropCallGetter, receiverGuard_); - } - - class Compiler : public ICStubCompiler { - protected: - ICStub* firstMonitorStub_; - RootedObject receiver_; - RootedObject holder_; - RootedFunction getter_; - uint32_t pcOffset_; - - virtual int32_t getKey() const { - // ICGetPropCallNativeCompiler::getKey adds more bits to our - // return value, so be careful when making changes here. - return static_cast(engine_) | - (static_cast(kind) << 1) | - (HeapReceiverGuard::keyBits(receiver_) << 17) | - (static_cast(receiver_ != holder_) << 19); - } - - public: - Compiler(JSContext* cx, ICStub::Kind kind, Engine engine, ICStub* firstMonitorStub, - HandleObject receiver, HandleObject holder, HandleFunction getter, - uint32_t pcOffset) - : ICStubCompiler(cx, kind, engine), - firstMonitorStub_(firstMonitorStub), - receiver_(cx, receiver), - holder_(cx, holder), - getter_(cx, getter), - pcOffset_(pcOffset) - { - MOZ_ASSERT(kind == ICStub::GetProp_CallNativeGlobal); - } - }; -}; - -// Stub for calling a native getter on the GlobalObject. -class ICGetProp_CallNativeGlobal : public ICGetPropCallGetter -{ - friend class ICStubSpace; - - protected: - GCPtrShape globalShape_; - - ICGetProp_CallNativeGlobal(JitCode* stubCode, ICStub* firstMonitorStub, - ReceiverGuard receiverGuard, - JSObject* holder, Shape* holderShape, Shape* globalShape, - JSFunction* getter, uint32_t pcOffset) - : ICGetPropCallGetter(GetProp_CallNativeGlobal, stubCode, firstMonitorStub, - receiverGuard, holder, holderShape, getter, pcOffset), - globalShape_(globalShape) - { } - - public: - static ICGetProp_CallNativeGlobal* Clone(JSContext* cx, ICStubSpace* space, - ICStub* firstMonitorStub, - ICGetProp_CallNativeGlobal& other); - - GCPtrShape& globalShape() { - return globalShape_; - } - static size_t offsetOfGlobalShape() { - return offsetof(ICGetProp_CallNativeGlobal, globalShape_); - } -}; - -class ICGetPropCallNativeCompiler : public ICGetPropCallGetter::Compiler -{ - bool inputDefinitelyObject_; - protected: - MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm); - - virtual int32_t getKey() const { - int32_t baseKey = ICGetPropCallGetter::Compiler::getKey(); - MOZ_ASSERT((baseKey >> 21) == 0); - return baseKey | (static_cast(inputDefinitelyObject_) << 21); - } - - public: - ICGetPropCallNativeCompiler(JSContext* cx, ICStub::Kind kind, ICStubCompiler::Engine engine, - ICStub* firstMonitorStub, HandleObject receiver, - HandleObject holder, HandleFunction getter, uint32_t pcOffset, - bool inputDefinitelyObject = false) - : ICGetPropCallGetter::Compiler(cx, kind, engine, firstMonitorStub, receiver, holder, - getter, pcOffset), - inputDefinitelyObject_(inputDefinitelyObject) - {} - - ICStub* getStub(ICStubSpace* space); -}; - // JSOP_NEWARRAY // JSOP_NEWINIT diff --git a/js/src/jit/SharedICList.h b/js/src/jit/SharedICList.h index 6bf41a0e3fb1..6a4b86eff9bd 100644 --- a/js/src/jit/SharedICList.h +++ b/js/src/jit/SharedICList.h @@ -35,7 +35,6 @@ namespace jit { _(Compare_Int32WithBoolean) \ \ _(GetProp_Fallback) \ - _(GetProp_CallNativeGlobal) \ _(GetProp_Generic) \ \ _(CacheIR_Monitored) \ diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index bb04a3b7c936..9ac0cb0b658d 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -1372,6 +1372,24 @@ ProxyGetPropertyByValue(JSContext* cx, HandleObject proxy, HandleValue idVal, return Proxy::get(cx, proxy, receiver, id, vp); } +bool +CallNativeGetter(JSContext* cx, HandleFunction callee, HandleObject obj, + MutableHandleValue result) +{ + MOZ_ASSERT(callee->isNative()); + JSNative natfun = callee->native(); + + JS::AutoValueArray<2> vp(cx); + vp[0].setObject(*callee.get()); + vp[1].setObject(*obj.get()); + + if (!natfun(cx, 0, vp.begin())) + return false; + + result.set(vp[0]); + return true; +} + bool EqualStringsHelper(JSString* str1, JSString* str2) { diff --git a/js/src/jit/VMFunctions.h b/js/src/jit/VMFunctions.h index a1f386905902..3fe1d71eac4b 100644 --- a/js/src/jit/VMFunctions.h +++ b/js/src/jit/VMFunctions.h @@ -818,6 +818,11 @@ MOZ_MUST_USE bool ProxyGetPropertyByValue(JSContext* cx, HandleObject proxy, HandleValue idVal, MutableHandleValue vp); +MOZ_MUST_USE bool +CallNativeGetter(JSContext* cx, HandleFunction callee, HandleObject obj, + MutableHandleValue result); + + MOZ_MUST_USE bool EqualStringsHelper(JSString* str1, JSString* str2); diff --git a/js/src/jit/arm/Assembler-arm.cpp b/js/src/jit/arm/Assembler-arm.cpp index 261c70a8682f..9f0aa88afd00 100644 --- a/js/src/jit/arm/Assembler-arm.cpp +++ b/js/src/jit/arm/Assembler-arm.cpp @@ -2210,17 +2210,16 @@ Assembler::as_BranchPool(uint32_t value, RepatchLabel* label, ARMBuffer::PoolEnt } BufferOffset -Assembler::as_FImm64Pool(VFPRegister dest, wasm::RawF64 value, Condition c) +Assembler::as_FImm64Pool(VFPRegister dest, double d, Condition c) { MOZ_ASSERT(dest.isDouble()); PoolHintPun php; php.phd.init(0, c, PoolHintData::PoolVDTR, dest); - uint64_t d = value.bits(); return allocEntry(1, 2, (uint8_t*)&php.raw, (uint8_t*)&d); } BufferOffset -Assembler::as_FImm32Pool(VFPRegister dest, wasm::RawF32 value, Condition c) +Assembler::as_FImm32Pool(VFPRegister dest, float f, Condition c) { // Insert floats into the double pool as they have the same limitations on // immediate offset. This wastes 4 bytes padding per float. An alternative @@ -2228,7 +2227,6 @@ Assembler::as_FImm32Pool(VFPRegister dest, wasm::RawF32 value, Condition c) MOZ_ASSERT(dest.isSingle()); PoolHintPun php; php.phd.init(0, c, PoolHintData::PoolVDTR, dest); - uint32_t f = value.bits(); return allocEntry(1, 1, (uint8_t*)&php.raw, (uint8_t*)&f); } diff --git a/js/src/jit/arm/Assembler-arm.h b/js/src/jit/arm/Assembler-arm.h index 4ccb2cb71d07..22a25f5d3a1a 100644 --- a/js/src/jit/arm/Assembler-arm.h +++ b/js/src/jit/arm/Assembler-arm.h @@ -1551,9 +1551,9 @@ class Assembler : public AssemblerShared Label* documentation = nullptr); // Load a 64 bit floating point immediate from a pool into a register. - BufferOffset as_FImm64Pool(VFPRegister dest, wasm::RawF64 value, Condition c = Always); + BufferOffset as_FImm64Pool(VFPRegister dest, double value, Condition c = Always); // Load a 32 bit floating point immediate from a pool into a register. - BufferOffset as_FImm32Pool(VFPRegister dest, wasm::RawF32 value, Condition c = Always); + BufferOffset as_FImm32Pool(VFPRegister dest, float value, Condition c = Always); // Atomic instructions: ldrex, ldrexh, ldrexb, strex, strexh, strexb. // diff --git a/js/src/jit/arm/MacroAssembler-arm.cpp b/js/src/jit/arm/MacroAssembler-arm.cpp index 98817d7be88f..e6cce5d880c4 100644 --- a/js/src/jit/arm/MacroAssembler-arm.cpp +++ b/js/src/jit/arm/MacroAssembler-arm.cpp @@ -25,6 +25,7 @@ using namespace jit; using mozilla::Abs; using mozilla::BitwiseCast; +using mozilla::IsPositiveZero; bool isValueDTRDCandidate(ValueOperand& val) @@ -1527,19 +1528,19 @@ MacroAssemblerARM::ma_vsqrt_f32(FloatRegister src, FloatRegister dest, Condition } static inline uint32_t -DoubleHighWord(wasm::RawF64 value) +DoubleHighWord(double d) { - return static_cast(value.bits() >> 32); + return static_cast(BitwiseCast(d) >> 32); } static inline uint32_t -DoubleLowWord(wasm::RawF64 value) +DoubleLowWord(double d) { - return value.bits() & uint32_t(0xffffffff); + return static_cast(BitwiseCast(d)) & uint32_t(0xffffffff); } void -MacroAssemblerARM::ma_vimm(wasm::RawF64 value, FloatRegister dest, Condition cc) +MacroAssemblerARM::ma_vimm(double value, FloatRegister dest, Condition cc) { if (HasVFPv3()) { if (DoubleLowWord(value) == 0) { @@ -1562,11 +1563,11 @@ MacroAssemblerARM::ma_vimm(wasm::RawF64 value, FloatRegister dest, Condition cc) } void -MacroAssemblerARM::ma_vimm_f32(wasm::RawF32 value, FloatRegister dest, Condition cc) +MacroAssemblerARM::ma_vimm_f32(float value, FloatRegister dest, Condition cc) { VFPRegister vd = VFPRegister(dest).singleOverlay(); if (HasVFPv3()) { - if (value.bits() == 0) { + if (IsPositiveZero(value)) { // To zero a register, load 1.0, then execute sN <- sN - sN. as_vimm(vd, VFPImm::One, cc); as_vsub(vd, vd, vd, cc); @@ -1580,7 +1581,7 @@ MacroAssemblerARM::ma_vimm_f32(wasm::RawF32 value, FloatRegister dest, Condition // paths. It is still necessary to firstly check that the double low // word is zero because some float32 numbers set these bits and this can // not be ignored. - wasm::RawF64 doubleValue(double(value.fp())); + double doubleValue(value); if (DoubleLowWord(doubleValue) == 0) { VFPImm enc(DoubleHighWord(doubleValue)); if (enc.isValid()) { @@ -3161,12 +3162,6 @@ MacroAssemblerARMCompat::int32ValueToFloat32(const ValueOperand& operand, FloatR void MacroAssemblerARMCompat::loadConstantFloat32(float f, FloatRegister dest) -{ - loadConstantFloat32(wasm::RawF32(f), dest); -} - -void -MacroAssemblerARMCompat::loadConstantFloat32(wasm::RawF32 f, FloatRegister dest) { ma_vimm_f32(f, dest); } @@ -3231,12 +3226,6 @@ MacroAssemblerARMCompat::loadInt32OrDouble(Register base, Register index, void MacroAssemblerARMCompat::loadConstantDouble(double dp, FloatRegister dest) -{ - loadConstantDouble(wasm::RawF64(dp), dest); -} - -void -MacroAssemblerARMCompat::loadConstantDouble(wasm::RawF64 dp, FloatRegister dest) { ma_vimm(dp, dest); } diff --git a/js/src/jit/arm/MacroAssembler-arm.h b/js/src/jit/arm/MacroAssembler-arm.h index 1a7aad4462ea..f48517ca673c 100644 --- a/js/src/jit/arm/MacroAssembler-arm.h +++ b/js/src/jit/arm/MacroAssembler-arm.h @@ -376,8 +376,8 @@ class MacroAssemblerARM : public Assembler void ma_vsqrt(FloatRegister src, FloatRegister dest, Condition cc = Always); void ma_vsqrt_f32(FloatRegister src, FloatRegister dest, Condition cc = Always); - void ma_vimm(wasm::RawF64 value, FloatRegister dest, Condition cc = Always); - void ma_vimm_f32(wasm::RawF32 value, FloatRegister dest, Condition cc = Always); + void ma_vimm(double value, FloatRegister dest, Condition cc = Always); + void ma_vimm_f32(float value, FloatRegister dest, Condition cc = Always); void ma_vcmp(FloatRegister src1, FloatRegister src2, Condition cc = Always); void ma_vcmp_f32(FloatRegister src1, FloatRegister src2, Condition cc = Always); @@ -793,7 +793,6 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM void loadInt32OrDouble(Register base, Register index, FloatRegister dest, int32_t shift = defaultShift); void loadConstantDouble(double dp, FloatRegister dest); - void loadConstantDouble(wasm::RawF64 dp, FloatRegister dest); // Treat the value as a boolean, and set condition codes accordingly. Condition testInt32Truthy(bool truthy, const ValueOperand& operand); @@ -804,7 +803,6 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM void boolValueToFloat32(const ValueOperand& operand, FloatRegister dest); void int32ValueToFloat32(const ValueOperand& operand, FloatRegister dest); void loadConstantFloat32(float f, FloatRegister dest); - void loadConstantFloat32(wasm::RawF32 f, FloatRegister dest); void moveValue(const Value& val, Register type, Register data); diff --git a/js/src/jit/arm64/MacroAssembler-arm64.h b/js/src/jit/arm64/MacroAssembler-arm64.h index 5fde70b65908..5e86fb962eab 100644 --- a/js/src/jit/arm64/MacroAssembler-arm64.h +++ b/js/src/jit/arm64/MacroAssembler-arm64.h @@ -1403,12 +1403,6 @@ class MacroAssemblerCompat : public vixl::MacroAssembler convertInt32ToFloat32(operand.valueReg(), dest); } - void loadConstantDouble(wasm::RawF64 d, FloatRegister dest) { - loadConstantDouble(d.fp(), dest); - } - void loadConstantFloat32(wasm::RawF32 f, FloatRegister dest) { - loadConstantFloat32(f.fp(), dest); - } void loadConstantDouble(double d, FloatRegister dest) { Fmov(ARMFPRegister(dest, 64), d); } diff --git a/js/src/jit/arm64/Trampoline-arm64.cpp b/js/src/jit/arm64/Trampoline-arm64.cpp index 638d37bea17e..3535f8013897 100644 --- a/js/src/jit/arm64/Trampoline-arm64.cpp +++ b/js/src/jit/arm64/Trampoline-arm64.cpp @@ -540,13 +540,15 @@ JitRuntime::generateBailoutHandler(JSContext* cx) MacroAssembler masm(cx); GenerateBailoutThunk(cx, masm, NO_FRAME_SIZE_CLASS_ID); + Linker linker(masm); + AutoFlushICache afc("BailoutHandler"); + JitCode* code = linker.newCode(cx, OTHER_CODE); + #ifdef JS_ION_PERF writePerfSpewerJitCodeProfile(code, "BailoutHandler"); #endif - Linker linker(masm); - AutoFlushICache afc("BailoutHandler"); - return linker.newCode(cx, OTHER_CODE); + return code; } JitCode* diff --git a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp index 658cafd36c68..29f89584bf10 100644 --- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp +++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp @@ -1007,15 +1007,6 @@ MacroAssemblerMIPSShared::ma_lis(FloatRegister dest, float value) moveToFloat32(ScratchRegister, dest); } -void -MacroAssemblerMIPSShared::ma_lis(FloatRegister dest, wasm::RawF32 value) -{ - Imm32 imm(value.bits()); - - ma_li(ScratchRegister, imm); - moveToFloat32(ScratchRegister, dest); -} - void MacroAssemblerMIPSShared::ma_liNegZero(FloatRegister dest) { diff --git a/js/src/jit/mips-shared/MacroAssembler-mips-shared.h b/js/src/jit/mips-shared/MacroAssembler-mips-shared.h index 73b81fdf95fa..60e945753c4b 100644 --- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.h +++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.h @@ -164,7 +164,6 @@ class MacroAssemblerMIPSShared : public Assembler // fp instructions void ma_lis(FloatRegister dest, float value); - void ma_lis(FloatRegister dest, wasm::RawF32 value); void ma_liNegZero(FloatRegister dest); void ma_sd(FloatRegister fd, BaseIndex address); diff --git a/js/src/jit/mips32/MacroAssembler-mips32.cpp b/js/src/jit/mips32/MacroAssembler-mips32.cpp index d3d3a75d11c5..2215d722857d 100644 --- a/js/src/jit/mips32/MacroAssembler-mips32.cpp +++ b/js/src/jit/mips32/MacroAssembler-mips32.cpp @@ -1401,12 +1401,6 @@ MacroAssemblerMIPSCompat::loadConstantFloat32(float f, FloatRegister dest) ma_lis(dest, f); } -void -MacroAssemblerMIPSCompat::loadConstantFloat32(wasm::RawF32 f, FloatRegister dest) -{ - ma_lis(dest, f); -} - void MacroAssemblerMIPSCompat::loadInt32OrDouble(const Address& src, FloatRegister dest) { @@ -1457,34 +1451,6 @@ MacroAssemblerMIPSCompat::loadConstantDouble(double dp, FloatRegister dest) ma_lid(dest, dp); } -void -MacroAssemblerMIPSCompat::loadConstantDouble(wasm::RawF64 d, FloatRegister dest) -{ - struct DoubleStruct { - uint32_t lo; - uint32_t hi; - } ; - DoubleStruct intStruct = mozilla::BitwiseCast(d.bits()); - - // put hi part of 64 bit value into the odd register - if (intStruct.hi == 0) { - moveToDoubleHi(zero, dest); - } else { - ScratchRegisterScope scratch(asMasm()); - ma_li(scratch, Imm32(intStruct.hi)); - moveToDoubleHi(scratch, dest); - } - - // put low part of 64 bit value into the even register - if (intStruct.lo == 0) { - moveToDoubleLo(zero, dest); - } else { - ScratchRegisterScope scratch(asMasm()); - ma_li(scratch, Imm32(intStruct.lo)); - moveToDoubleLo(scratch, dest); - } -} - Register MacroAssemblerMIPSCompat::extractObject(const Address& address, Register scratch) { diff --git a/js/src/jit/mips32/MacroAssembler-mips32.h b/js/src/jit/mips32/MacroAssembler-mips32.h index 9b846e25d606..7748f3978cc3 100644 --- a/js/src/jit/mips32/MacroAssembler-mips32.h +++ b/js/src/jit/mips32/MacroAssembler-mips32.h @@ -360,12 +360,10 @@ class MacroAssemblerMIPSCompat : public MacroAssemblerMIPS void loadInt32OrDouble(Register base, Register index, FloatRegister dest, int32_t shift = defaultShift); void loadConstantDouble(double dp, FloatRegister dest); - void loadConstantDouble(wasm::RawF64 d, FloatRegister dest); void boolValueToFloat32(const ValueOperand& operand, FloatRegister dest); void int32ValueToFloat32(const ValueOperand& operand, FloatRegister dest); void loadConstantFloat32(float f, FloatRegister dest); - void loadConstantFloat32(wasm::RawF32 f, FloatRegister dest); void testNullSet(Condition cond, const ValueOperand& value, Register dest); diff --git a/js/src/jit/mips64/MacroAssembler-mips64.cpp b/js/src/jit/mips64/MacroAssembler-mips64.cpp index efdaac8d4a74..b7d6ba318dc0 100644 --- a/js/src/jit/mips64/MacroAssembler-mips64.cpp +++ b/js/src/jit/mips64/MacroAssembler-mips64.cpp @@ -1664,12 +1664,6 @@ MacroAssemblerMIPS64Compat::loadConstantFloat32(float f, FloatRegister dest) ma_lis(dest, f); } -void -MacroAssemblerMIPS64Compat::loadConstantFloat32(wasm::RawF32 f, FloatRegister dest) -{ - ma_lis(dest, f); -} - void MacroAssemblerMIPS64Compat::loadInt32OrDouble(const Address& src, FloatRegister dest) { @@ -1720,15 +1714,6 @@ MacroAssemblerMIPS64Compat::loadConstantDouble(double dp, FloatRegister dest) ma_lid(dest, dp); } -void -MacroAssemblerMIPS64Compat::loadConstantDouble(wasm::RawF64 d, FloatRegister dest) -{ - ImmWord imm(d.bits()); - - ma_li(ScratchRegister, imm); - moveToDouble(ScratchRegister, dest); -} - Register MacroAssemblerMIPS64Compat::extractObject(const Address& address, Register scratch) { diff --git a/js/src/jit/mips64/MacroAssembler-mips64.h b/js/src/jit/mips64/MacroAssembler-mips64.h index 6b98f1f2c05c..208bee0bc37b 100644 --- a/js/src/jit/mips64/MacroAssembler-mips64.h +++ b/js/src/jit/mips64/MacroAssembler-mips64.h @@ -409,12 +409,10 @@ class MacroAssemblerMIPS64Compat : public MacroAssemblerMIPS64 void loadInt32OrDouble(const Address& src, FloatRegister dest); void loadInt32OrDouble(const BaseIndex& addr, FloatRegister dest); void loadConstantDouble(double dp, FloatRegister dest); - void loadConstantDouble(wasm::RawF64 d, FloatRegister dest); void boolValueToFloat32(const ValueOperand& operand, FloatRegister dest); void int32ValueToFloat32(const ValueOperand& operand, FloatRegister dest); void loadConstantFloat32(float f, FloatRegister dest); - void loadConstantFloat32(wasm::RawF32 f, FloatRegister dest); void testNullSet(Condition cond, const ValueOperand& value, Register dest); diff --git a/js/src/jit/none/MacroAssembler-none.h b/js/src/jit/none/MacroAssembler-none.h index add8ae28c54c..51d626f08604 100644 --- a/js/src/jit/none/MacroAssembler-none.h +++ b/js/src/jit/none/MacroAssembler-none.h @@ -393,8 +393,6 @@ class MacroAssemblerNone : public Assembler void loadConstantDouble(double, FloatRegister) { MOZ_CRASH(); } void loadConstantFloat32(float, FloatRegister) { MOZ_CRASH(); } - void loadConstantDouble(wasm::RawF64, FloatRegister) { MOZ_CRASH(); } - void loadConstantFloat32(wasm::RawF32, FloatRegister) { MOZ_CRASH(); } Condition testInt32Truthy(bool, ValueOperand) { MOZ_CRASH(); } Condition testStringTruthy(bool, ValueOperand) { MOZ_CRASH(); } diff --git a/js/src/jit/shared/LIR-shared.h b/js/src/jit/shared/LIR-shared.h index 24780ab232f1..5f9f82296de9 100644 --- a/js/src/jit/shared/LIR-shared.h +++ b/js/src/jit/shared/LIR-shared.h @@ -858,14 +858,14 @@ class LPointer : public LInstructionHelper<1, 0, 0> // Constant double. class LDouble : public LInstructionHelper<1, 0, 0> { - wasm::RawF64 d_; + double d_; public: LIR_HEADER(Double); - explicit LDouble(wasm::RawF64 d) : d_(d) + explicit LDouble(double d) : d_(d) { } - wasm::RawF64 getDouble() const { + const double& getDouble() const { return d_; } }; @@ -873,15 +873,15 @@ class LDouble : public LInstructionHelper<1, 0, 0> // Constant float32. class LFloat32 : public LInstructionHelper<1, 0, 0> { - wasm::RawF32 f_; + float f_; public: LIR_HEADER(Float32); - explicit LFloat32(wasm::RawF32 f) + explicit LFloat32(float f) : f_(f) { } - wasm::RawF32 getFloat() const { + const float& getFloat() const { return f_; } }; diff --git a/js/src/jit/shared/Lowering-shared.cpp b/js/src/jit/shared/Lowering-shared.cpp index 9e903bc285a3..9b4d5cdbb1ef 100644 --- a/js/src/jit/shared/Lowering-shared.cpp +++ b/js/src/jit/shared/Lowering-shared.cpp @@ -81,10 +81,10 @@ LIRGeneratorShared::visitConstant(MConstant* ins) switch (ins->type()) { case MIRType::Double: - define(new(alloc()) LDouble(ins->toRawF64()), ins); + define(new(alloc()) LDouble(ins->toDouble()), ins); break; case MIRType::Float32: - define(new(alloc()) LFloat32(ins->toRawF32()), ins); + define(new(alloc()) LFloat32(ins->toFloat32()), ins); break; case MIRType::Boolean: define(new(alloc()) LInteger(ins->toBoolean()), ins); diff --git a/js/src/jit/shared/Lowering-shared.h b/js/src/jit/shared/Lowering-shared.h index f862df5a0308..4bc3b84351ce 100644 --- a/js/src/jit/shared/Lowering-shared.h +++ b/js/src/jit/shared/Lowering-shared.h @@ -271,10 +271,10 @@ class LIRGeneratorShared : public MDefinitionVisitor public: void lowerConstantDouble(double d, MInstruction* mir) { - define(new(alloc()) LDouble(wasm::RawF64(d)), mir); + define(new(alloc()) LDouble(d), mir); } void lowerConstantFloat32(float f, MInstruction* mir) { - define(new(alloc()) LFloat32(wasm::RawF32(f)), mir); + define(new(alloc()) LFloat32(f), mir); } void visitConstant(MConstant* ins) override; diff --git a/js/src/jit/x64/MacroAssembler-x64.cpp b/js/src/jit/x64/MacroAssembler-x64.cpp index bc05bb963d81..f86c7b252f74 100644 --- a/js/src/jit/x64/MacroAssembler-x64.cpp +++ b/js/src/jit/x64/MacroAssembler-x64.cpp @@ -19,7 +19,7 @@ using namespace js; using namespace js::jit; void -MacroAssemblerX64::loadConstantDouble(wasm::RawF64 d, FloatRegister dest) +MacroAssemblerX64::loadConstantDouble(double d, FloatRegister dest) { if (maybeInlineDouble(d, dest)) return; @@ -36,7 +36,7 @@ MacroAssemblerX64::loadConstantDouble(wasm::RawF64 d, FloatRegister dest) } void -MacroAssemblerX64::loadConstantFloat32(wasm::RawF32 f, FloatRegister dest) +MacroAssemblerX64::loadConstantFloat32(float f, FloatRegister dest) { if (maybeInlineFloat(f, dest)) return; @@ -60,18 +60,6 @@ MacroAssemblerX64::loadConstantSimd128Int(const SimdConstant& v, FloatRegister d propagateOOM(val->uses.append(CodeOffset(j.offset()))); } -void -MacroAssemblerX64::loadConstantFloat32(float f, FloatRegister dest) -{ - loadConstantFloat32(wasm::RawF32(f), dest); -} - -void -MacroAssemblerX64::loadConstantDouble(double d, FloatRegister dest) -{ - loadConstantDouble(wasm::RawF64(d), dest); -} - void MacroAssemblerX64::loadConstantSimd128Float(const SimdConstant&v, FloatRegister dest) { @@ -265,14 +253,14 @@ MacroAssemblerX64::finish() masm.haltingAlign(sizeof(double)); for (const Double& d : doubles_) { bindOffsets(d.uses); - masm.int64Constant(d.value); + masm.doubleConstant(d.value); } if (!floats_.empty()) masm.haltingAlign(sizeof(float)); for (const Float& f : floats_) { bindOffsets(f.uses); - masm.int32Constant(f.value); + masm.floatConstant(f.value); } // SIMD memory values must be suitably aligned. diff --git a/js/src/jit/x64/MacroAssembler-x64.h b/js/src/jit/x64/MacroAssembler-x64.h index a1d6c6c9029a..168c95f33bdb 100644 --- a/js/src/jit/x64/MacroAssembler-x64.h +++ b/js/src/jit/x64/MacroAssembler-x64.h @@ -857,8 +857,6 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared void loadConstantDouble(double d, FloatRegister dest); void loadConstantFloat32(float f, FloatRegister dest); - void loadConstantDouble(wasm::RawF64 d, FloatRegister dest); - void loadConstantFloat32(wasm::RawF32 f, FloatRegister dest); void loadConstantSimd128Int(const SimdConstant& v, FloatRegister dest); void loadConstantSimd128Float(const SimdConstant& v, FloatRegister dest); diff --git a/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp b/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp index 5841f933682e..8fc07d17bcc2 100644 --- a/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp +++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp @@ -254,15 +254,15 @@ MacroAssemblerX86Shared::getConstant(const typename T::Pod& value, Map& map, } MacroAssemblerX86Shared::Float* -MacroAssemblerX86Shared::getFloat(wasm::RawF32 f) +MacroAssemblerX86Shared::getFloat(float f) { - return getConstant(f.bits(), floatMap_, floats_); + return getConstant(f, floatMap_, floats_); } MacroAssemblerX86Shared::Double* -MacroAssemblerX86Shared::getDouble(wasm::RawF64 d) +MacroAssemblerX86Shared::getDouble(double d) { - return getConstant(d.bits(), doubleMap_, doubles_); + return getConstant(d, doubleMap_, doubles_); } MacroAssemblerX86Shared::SimdData* diff --git a/js/src/jit/x86-shared/MacroAssembler-x86-shared.h b/js/src/jit/x86-shared/MacroAssembler-x86-shared.h index 8a0e154f154d..c5ea3f9e578b 100644 --- a/js/src/jit/x86-shared/MacroAssembler-x86-shared.h +++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared.h @@ -66,14 +66,14 @@ class MacroAssemblerX86Shared : public Assembler // Containers use SystemAllocPolicy since wasm releases memory after each // function is compiled, and these need to live until after all functions // are compiled. - using Double = Constant; + using Double = Constant; Vector doubles_; - typedef HashMap, SystemAllocPolicy> DoubleMap; + typedef HashMap, SystemAllocPolicy> DoubleMap; DoubleMap doubleMap_; - using Float = Constant; + using Float = Constant; Vector floats_; - typedef HashMap, SystemAllocPolicy> FloatMap; + typedef HashMap, SystemAllocPolicy> FloatMap; FloatMap floatMap_; struct SimdData : public Constant { @@ -90,8 +90,8 @@ class MacroAssemblerX86Shared : public Assembler template T* getConstant(const typename T::Pod& value, Map& map, Vector& vec); - Float* getFloat(wasm::RawF32 f); - Double* getDouble(wasm::RawF64 d); + Float* getFloat(float f); + Double* getDouble(double d); SimdData* getSimdData(const SimdConstant& v); public: @@ -1210,9 +1210,9 @@ class MacroAssemblerX86Shared : public Assembler inline void clampIntToUint8(Register reg); - bool maybeInlineDouble(wasm::RawF64 d, FloatRegister dest) { + bool maybeInlineDouble(double d, FloatRegister dest) { // Loading zero with xor is specially optimized in hardware. - if (d.bits() == 0) { + if (mozilla::IsPositiveZero(d)) { zeroDouble(dest); return true; } @@ -1228,9 +1228,9 @@ class MacroAssemblerX86Shared : public Assembler return false; } - bool maybeInlineFloat(wasm::RawF32 f, FloatRegister dest) { + bool maybeInlineFloat(float f, FloatRegister dest) { // See comment above - if (f.bits() == 0) { + if (mozilla::IsPositiveZero(f)) { zeroFloat32(dest); return true; } diff --git a/js/src/jit/x86/MacroAssembler-x86-inl.h b/js/src/jit/x86/MacroAssembler-x86-inl.h index 30f134a70116..546873f01001 100644 --- a/js/src/jit/x86/MacroAssembler-x86-inl.h +++ b/js/src/jit/x86/MacroAssembler-x86-inl.h @@ -184,7 +184,7 @@ MacroAssembler::add64(Imm64 imm, Register64 dest) void MacroAssembler::addConstantDouble(double d, FloatRegister dest) { - Double* dbl = getDouble(wasm::RawF64(d)); + Double* dbl = getDouble(d); if (!dbl) return; masm.vaddsd_mr(nullptr, dest.encoding(), dest.encoding()); diff --git a/js/src/jit/x86/MacroAssembler-x86.cpp b/js/src/jit/x86/MacroAssembler-x86.cpp index dec1e6d2bd69..3259e2c2a620 100644 --- a/js/src/jit/x86/MacroAssembler-x86.cpp +++ b/js/src/jit/x86/MacroAssembler-x86.cpp @@ -111,7 +111,7 @@ MacroAssemblerX86::convertUInt64ToDouble(Register64 src, FloatRegister dest, Reg } void -MacroAssemblerX86::loadConstantDouble(wasm::RawF64 d, FloatRegister dest) +MacroAssemblerX86::loadConstantDouble(double d, FloatRegister dest) { if (maybeInlineDouble(d, dest)) return; @@ -123,13 +123,7 @@ MacroAssemblerX86::loadConstantDouble(wasm::RawF64 d, FloatRegister dest) } void -MacroAssemblerX86::loadConstantDouble(double d, FloatRegister dest) -{ - loadConstantDouble(wasm::RawF64(d), dest); -} - -void -MacroAssemblerX86::loadConstantFloat32(wasm::RawF32 f, FloatRegister dest) +MacroAssemblerX86::loadConstantFloat32(float f, FloatRegister dest) { if (maybeInlineFloat(f, dest)) return; @@ -140,12 +134,6 @@ MacroAssemblerX86::loadConstantFloat32(wasm::RawF32 f, FloatRegister dest) propagateOOM(flt->uses.append(CodeOffset(masm.size()))); } -void -MacroAssemblerX86::loadConstantFloat32(float f, FloatRegister dest) -{ - loadConstantFloat32(wasm::RawF32(f), dest); -} - void MacroAssemblerX86::loadConstantSimd128Int(const SimdConstant& v, FloatRegister dest) { @@ -179,7 +167,7 @@ MacroAssemblerX86::finish() CodeOffset cst(masm.currentOffset()); for (CodeOffset use : d.uses) addCodeLabel(CodeLabel(use, cst)); - masm.int64Constant(d.value); + masm.doubleConstant(d.value); if (!enoughMemory_) return; } @@ -190,7 +178,7 @@ MacroAssemblerX86::finish() CodeOffset cst(masm.currentOffset()); for (CodeOffset use : f.uses) addCodeLabel(CodeLabel(use, cst)); - masm.int32Constant(f.value); + masm.floatConstant(f.value); if (!enoughMemory_) return; } diff --git a/js/src/jit/x86/MacroAssembler-x86.h b/js/src/jit/x86/MacroAssembler-x86.h index 2b2507c77701..de5e26957b03 100644 --- a/js/src/jit/x86/MacroAssembler-x86.h +++ b/js/src/jit/x86/MacroAssembler-x86.h @@ -779,8 +779,6 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared void loadConstantDouble(double d, FloatRegister dest); void loadConstantFloat32(float f, FloatRegister dest); - void loadConstantDouble(wasm::RawF64 d, FloatRegister dest); - void loadConstantFloat32(wasm::RawF32 f, FloatRegister dest); void loadConstantSimd128Int(const SimdConstant& v, FloatRegister dest); void loadConstantSimd128Float(const SimdConstant& v, FloatRegister dest); diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 283d9c0f316c..278953a5f6f8 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -697,6 +697,12 @@ JS_SetWrapObjectCallbacks(JSContext* cx, const JSWrapObjectCallbacks* callbacks) cx->wrapObjectCallbacks = callbacks; } +JS_PUBLIC_API(void) +JS_SetExternalStringSizeofCallback(JSContext* cx, JSExternalStringSizeofCallback callback) +{ + cx->externalStringSizeofCallback = callback; +} + JS_PUBLIC_API(JSCompartment*) JS_EnterCompartment(JSContext* cx, JSObject* target) { diff --git a/js/src/jsapi.h b/js/src/jsapi.h index ec970624b182..2a82566f189b 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -728,6 +728,17 @@ typedef void (* JSCompartmentNameCallback)(JSContext* cx, JSCompartment* compartment, char* buf, size_t bufsize); +/** + * Callback used by memory reporting to ask the embedder how much memory an + * external string is keeping alive. The embedder is expected to return a value + * that corresponds to the size of the allocation that will be released by the + * JSStringFinalizer passed to JS_NewExternalString for this string. + * + * Implementations of this callback MUST NOT do anything that can cause GC. + */ +using JSExternalStringSizeofCallback = + size_t (*)(JSString* str, mozilla::MallocSizeOf mallocSizeOf); + /************************************************************************/ static MOZ_ALWAYS_INLINE JS::Value @@ -1295,6 +1306,9 @@ JS_SetCompartmentNameCallback(JSContext* cx, JSCompartmentNameCallback callback) extern JS_PUBLIC_API(void) JS_SetWrapObjectCallbacks(JSContext* cx, const JSWrapObjectCallbacks* callbacks); +extern JS_PUBLIC_API(void) +JS_SetExternalStringSizeofCallback(JSContext* cx, JSExternalStringSizeofCallback callback); + extern JS_PUBLIC_API(void) JS_SetCompartmentPrivate(JSCompartment* compartment, void* data); diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 2fac8d430e46..53c76aa62722 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -621,7 +621,7 @@ js::ArraySetLength(JSContext* cx, Handle arr, HandleId id, // for..in iteration over the array. Keys deleted before being reached // during the iteration must not be visited, and suppressing them here // would be too costly. - ObjectGroup* arrGroup = arr->getGroup(cx); + ObjectGroup* arrGroup = JSObject::getGroup(cx, arr); if (MOZ_UNLIKELY(!arrGroup)) return false; if (!arr->isIndexed() && !MOZ_UNLIKELY(arrGroup->hasAllFlags(OBJECT_FLAG_ITERATED))) { @@ -1324,7 +1324,7 @@ InitArrayElements(JSContext* cx, HandleObject obj, uint32_t start, if (count == 0) return true; - ObjectGroup* group = obj->getGroup(cx); + ObjectGroup* group = JSObject::getGroup(cx, obj); if (!group) return false; @@ -2192,7 +2192,7 @@ ArrayShiftDenseKernel(JSContext* cx, HandleObject obj, MutableHandleValue rval) if (ObjectMayHaveExtraIndexedProperties(obj)) return DenseElementResult::Incomplete; - RootedObjectGroup group(cx, obj->getGroup(cx)); + RootedObjectGroup group(cx, JSObject::getGroup(cx, obj)); if (MOZ_UNLIKELY(!group)) return DenseElementResult::Failure; @@ -2395,7 +2395,7 @@ CanOptimizeForDenseStorage(HandleObject arr, uint32_t startingIndex, uint32_t co * deleted if a hole is moved from one location to another location not yet * visited. See bug 690622. */ - ObjectGroup* arrGroup = arr->getGroup(cx); + ObjectGroup* arrGroup = JSObject::getGroup(cx, arr); if (!arrGroup) { cx->recoverFromOutOfMemory(); return false; @@ -3633,7 +3633,7 @@ js::NewPartlyAllocatedArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup g // UnboxedArrayObject::MaximumCapacity might be exceeded). template static inline JSObject* -NewArrayTryReuseGroup(JSContext* cx, JSObject* obj, size_t length, +NewArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length, NewObjectKind newKind = GenericObject) { if (!obj->is() && !obj->is()) @@ -3642,7 +3642,7 @@ NewArrayTryReuseGroup(JSContext* cx, JSObject* obj, size_t length, if (obj->staticPrototype() != cx->global()->maybeGetArrayPrototype()) return NewArray(cx, length, nullptr, newKind); - RootedObjectGroup group(cx, obj->getGroup(cx)); + RootedObjectGroup group(cx, JSObject::getGroup(cx, obj)); if (!group) return nullptr; @@ -3650,14 +3650,14 @@ NewArrayTryReuseGroup(JSContext* cx, JSObject* obj, size_t length, } JSObject* -js::NewFullyAllocatedArrayTryReuseGroup(JSContext* cx, JSObject* obj, size_t length, +js::NewFullyAllocatedArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length, NewObjectKind newKind) { return NewArrayTryReuseGroup(cx, obj, length, newKind); } JSObject* -js::NewPartlyAllocatedArrayTryReuseGroup(JSContext* cx, JSObject* obj, size_t length) +js::NewPartlyAllocatedArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length) { return NewArrayTryReuseGroup(cx, obj, length); } diff --git a/js/src/jsarray.h b/js/src/jsarray.h index e22cde88106b..5d832b7aedcc 100644 --- a/js/src/jsarray.h +++ b/js/src/jsarray.h @@ -85,11 +85,11 @@ extern JSObject* NewPartlyAllocatedArrayTryUseGroup(ExclusiveContext* cx, HandleObjectGroup group, size_t length); extern JSObject* -NewFullyAllocatedArrayTryReuseGroup(JSContext* cx, JSObject* obj, size_t length, +NewFullyAllocatedArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length, NewObjectKind newKind = GenericObject); extern JSObject* -NewPartlyAllocatedArrayTryReuseGroup(JSContext* cx, JSObject* obj, size_t length); +NewPartlyAllocatedArrayTryReuseGroup(JSContext* cx, HandleObject obj, size_t length); extern JSObject* NewFullyAllocatedArrayForCallingAllocationSite(JSContext* cx, size_t length, diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp index e806a5af16b3..e28b68fbdc0f 100644 --- a/js/src/jsfriendapi.cpp +++ b/js/src/jsfriendapi.cpp @@ -116,7 +116,7 @@ JS_SplicePrototype(JSContext* cx, HandleObject obj, HandleObject proto) } Rooted tagged(cx, TaggedProto(proto)); - return obj->splicePrototype(cx, obj->getClass(), tagged); + return JSObject::splicePrototype(cx, obj, obj->getClass(), tagged); } JS_FRIEND_API(JSObject*) diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h index a37312b0409d..31196f6e99f9 100644 --- a/js/src/jsfriendapi.h +++ b/js/src/jsfriendapi.h @@ -2907,6 +2907,12 @@ ToWindowIfWindowProxy(JSObject* obj); JS_FRIEND_API(bool) AllowGCBarriers(JSContext* cx); +// Create and add the Intl.PluralRules constructor function to the provided +// object. This function throws if called more than once per realm/global +// object. +extern bool +AddPluralRulesConstructor(JSContext* cx, JS::Handle intl); + } /* namespace js */ class NativeProfiler diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 2f0cca76337f..60380b993888 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -849,7 +849,7 @@ CreateFunctionPrototype(JSContext* cx, JSProtoKey key) return nullptr; functionProto->initScript(script); - ObjectGroup* protoGroup = functionProto->getGroup(cx); + ObjectGroup* protoGroup = JSObject::getGroup(cx, functionProto); if (!protoGroup) return nullptr; diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index a28da31b0195..9be307a1532b 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -883,7 +883,7 @@ CreateThisForFunctionWithGroup(JSContext* cx, HandleObjectGroup group, if (newKind == SingletonObject) { Rooted proto(cx, TaggedProto(templateObject->staticPrototype())); - if (!res->splicePrototype(cx, &PlainObject::class_, proto)) + if (!JSObject::splicePrototype(cx, res, &PlainObject::class_, proto)) return nullptr; } else { res->setGroup(group); @@ -1507,9 +1507,9 @@ JSObject::swap(JSContext* cx, HandleObject a, HandleObject b) AutoCompartment ac(cx, a); - if (!a->getGroup(cx)) + if (!JSObject::getGroup(cx, a)) oomUnsafe.crash("JSObject::swap"); - if (!b->getGroup(cx)) + if (!JSObject::getGroup(cx, b)) oomUnsafe.crash("JSObject::swap"); /* @@ -1740,7 +1740,7 @@ DefineConstructorAndPrototype(JSContext* cx, HandleObject obj, JSProtoKey key, H /* Bootstrap Function.prototype (see also JS_InitStandardClasses). */ Rooted tagged(cx, TaggedProto(proto)); - if (ctor->getClass() == clasp && !ctor->splicePrototype(cx, clasp, tagged)) + if (ctor->getClass() == clasp && !JSObject::splicePrototype(cx, ctor, clasp, tagged)) goto bad; } @@ -1880,7 +1880,7 @@ js::SetClassAndProto(JSContext* cx, HandleObject obj, * Just splice the prototype, but mark the properties as unknown for * consistent behavior. */ - if (!obj->splicePrototype(cx, clasp, proto)) + if (!JSObject::splicePrototype(cx, obj, clasp, proto)) return false; MarkObjectGroupUnknownProperties(cx, obj->group()); return true; @@ -3907,10 +3907,10 @@ displayAtomFromObjectGroup(ObjectGroup& group) return script->function()->displayAtom(); } -bool -JSObject::constructorDisplayAtom(JSContext* cx, js::MutableHandleAtom name) +/* static */ bool +JSObject::constructorDisplayAtom(JSContext* cx, js::HandleObject obj, js::MutableHandleAtom name) { - ObjectGroup *g = getGroup(cx); + ObjectGroup *g = JSObject::getGroup(cx, obj); if (!g) return false; diff --git a/js/src/jsobj.h b/js/src/jsobj.h index f1ad20bcdea3..5a559a02fa8e 100644 --- a/js/src/jsobj.h +++ b/js/src/jsobj.h @@ -286,7 +286,8 @@ class JSObject : public js::gc::Cell * If this object was instantiated with `new Ctor`, return the constructor's * display atom. Otherwise, return nullptr. */ - bool constructorDisplayAtom(JSContext* cx, js::MutableHandleAtom name); + static bool constructorDisplayAtom(JSContext* cx, js::HandleObject obj, + js::MutableHandleAtom name); /* * The same as constructorDisplayAtom above, however if this object has a @@ -346,7 +347,7 @@ class JSObject : public js::gc::Cell // Change an existing object to have a singleton group. static bool changeToSingleton(JSContext* cx, js::HandleObject obj); - inline js::ObjectGroup* getGroup(JSContext* cx); + static inline js::ObjectGroup* getGroup(JSContext* cx, js::HandleObject obj); const js::GCPtrObjectGroup& groupFromGC() const { /* Direct field access for use by GC. */ @@ -436,13 +437,14 @@ class JSObject : public js::gc::Cell } /* Set a new prototype for an object with a singleton type. */ - bool splicePrototype(JSContext* cx, const js::Class* clasp, js::Handle proto); + static bool splicePrototype(JSContext* cx, js::HandleObject obj, const js::Class* clasp, + js::Handle proto); /* * For bootstrapping, whether to splice a prototype for Function.prototype * or the global object. */ - bool shouldSplicePrototype(JSContext* cx); + bool shouldSplicePrototype(); /* * Environment chains. diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h index 7bc91388dddc..7ff85ebd00fa 100644 --- a/js/src/jsobjinlines.h +++ b/js/src/jsobjinlines.h @@ -134,17 +134,16 @@ JSObject::setSingleton(js::ExclusiveContext* cx, js::HandleObject obj) return true; } -inline js::ObjectGroup* -JSObject::getGroup(JSContext* cx) +/* static */ inline js::ObjectGroup* +JSObject::getGroup(JSContext* cx, js::HandleObject obj) { - MOZ_ASSERT(cx->compartment() == compartment()); - if (hasLazyGroup()) { - JS::RootedObject self(cx, this); - if (cx->compartment() != compartment()) + MOZ_ASSERT(cx->compartment() == obj->compartment()); + if (obj->hasLazyGroup()) { + if (cx->compartment() != obj->compartment()) MOZ_CRASH(); - return makeLazyGroup(cx, self); + return makeLazyGroup(cx, obj); } - return group_; + return obj->group_; } inline void diff --git a/js/src/moz.build b/js/src/moz.build index 786fc068b92a..a89ab6a55e30 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -498,9 +498,6 @@ elif CONFIG['JS_CODEGEN_ARM']: UNIFIED_SOURCES += [ 'jit/arm/Simulator-arm.cpp' ] - # Configuration used only for testing. - if CONFIG['OS_ARCH'] == 'Linux' or CONFIG['OS_ARCH'] == 'Darwin': - CXXFLAGS += [ '-msse2', '-mfpmath=sse' ] elif CONFIG['OS_ARCH'] == 'Darwin': SOURCES += [ 'jit/arm/llvm-compiler-rt/arm/aeabi_idivmod.S', diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 48a9a5cedba8..090c8b7ba191 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -50,6 +50,7 @@ #include "jsarray.h" #include "jsatom.h" #include "jscntxt.h" +#include "jsfriendapi.h" #include "jsfun.h" #include "jsobj.h" #include "jsprf.h" @@ -912,6 +913,9 @@ AddIntlExtras(JSContext* cx, unsigned argc, Value* vp) if (!JS_DefineFunctions(cx, intl, funcs)) return false; + if (!js::AddPluralRulesConstructor(cx, intl)) + return false; + args.rval().setUndefined(); return true; } @@ -3468,8 +3472,8 @@ GroupOf(JSContext* cx, unsigned argc, JS::Value* vp) JS_ReportErrorASCII(cx, "groupOf: object expected"); return false; } - JSObject* obj = &args[0].toObject(); - ObjectGroup* group = obj->getGroup(cx); + RootedObject obj(cx, &args[0].toObject()); + ObjectGroup* group = JSObject::getGroup(cx, obj); if (!group) return false; args.rval().set(JS_NumberValue(double(uintptr_t(group) >> 3))); @@ -6103,7 +6107,8 @@ static const JSFunctionSpecWithHelp shell_functions[] = { "provided object (this should generally be Intl itself). The added\n" "functions and their behavior are experimental: don't depend upon them\n" "unless you're willing to update your code if these experimental APIs change\n" -"underneath you."), +"underneath you. Calling this function more than once in a realm/global\n" +"will throw."), #endif // ENABLE_INTL_API JS_FS_HELP_END diff --git a/js/src/tests/Intl/PluralRules/construct-newtarget.js b/js/src/tests/Intl/PluralRules/construct-newtarget.js index 6f81075a819e..d0d2f7fb5e4a 100644 --- a/js/src/tests/Intl/PluralRules/construct-newtarget.js +++ b/js/src/tests/Intl/PluralRules/construct-newtarget.js @@ -1,9 +1,10 @@ -// |reftest| skip-if(!this.hasOwnProperty("Intl")) +// |reftest| skip-if(!this.hasOwnProperty("Intl")||!this.hasOwnProperty("addIntlExtras")) /* This Source Code Form is subject to the terms of the Mozilla Public * 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/. */ +addIntlExtras(Intl); // Test subclassing %Intl.PluralRules% works correctly. class MyPluralRules extends Intl.PluralRules {} diff --git a/js/src/tests/Intl/PluralRules/pluralrules.js b/js/src/tests/Intl/PluralRules/pluralrules.js index 001ac42e105f..0ce2ce83d76e 100644 --- a/js/src/tests/Intl/PluralRules/pluralrules.js +++ b/js/src/tests/Intl/PluralRules/pluralrules.js @@ -1,4 +1,4 @@ -// |reftest| skip-if(!this.hasOwnProperty("Intl")) +// |reftest| skip-if(!this.hasOwnProperty("Intl")||!this.hasOwnProperty('addIntlExtras')) /* This Source Code Form is subject to the terms of the Mozilla Public * 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/. */ @@ -7,6 +7,8 @@ var pr; +addIntlExtras(Intl); + pr = new Intl.PluralRules("en-us"); assertEq(pr.resolvedOptions().locale, "en-US"); assertEq(pr.resolvedOptions().type, "cardinal"); diff --git a/js/src/tests/Intl/PluralRules/select.js b/js/src/tests/Intl/PluralRules/select.js index f976cbd22bbf..e49ec89b94af 100644 --- a/js/src/tests/Intl/PluralRules/select.js +++ b/js/src/tests/Intl/PluralRules/select.js @@ -1,4 +1,4 @@ -// |reftest| skip-if(!this.hasOwnProperty("Intl")) +// |reftest| skip-if(!this.hasOwnProperty('Intl')||!this.hasOwnProperty('addIntlExtras')) /* This Source Code Form is subject to the terms of the Mozilla Public * 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/. */ @@ -7,6 +7,8 @@ var pr; +addIntlExtras(Intl); + pr = new Intl.PluralRules("en-us"); assertEq(pr.select(0), "other"); assertEq(pr.select(0.5), "other"); diff --git a/js/src/tests/Intl/PluralRules/supportedLocalesOf.js b/js/src/tests/Intl/PluralRules/supportedLocalesOf.js index afc756636e4a..cd9064390050 100644 --- a/js/src/tests/Intl/PluralRules/supportedLocalesOf.js +++ b/js/src/tests/Intl/PluralRules/supportedLocalesOf.js @@ -1,4 +1,4 @@ -// |reftest| skip-if(!this.hasOwnProperty("Intl")||xulRuntime.shell) +// |reftest| skip-if(!this.hasOwnProperty('Intl')||!this.hasOwnProperty('addIntlExtras')||xulRuntime.shell) // -- test in browser only that ICU has locale data for all Mozilla languages /* This Source Code Form is subject to the terms of the Mozilla Public @@ -366,6 +366,8 @@ var locales = [ "zh-Hant-TW", ]; +addIntlExtras(Intl); + const result = Intl.PluralRules.supportedLocalesOf(locales); assertEqArray(locales, result); diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp index c95383d01efe..a2131646a3b8 100644 --- a/js/src/vm/ArrayBufferObject.cpp +++ b/js/src/vm/ArrayBufferObject.cpp @@ -341,7 +341,7 @@ ArrayBufferObject::detach(JSContext* cx, Handle buffer, // Make sure the global object's group has been instantiated, so the // flag change will be observed. AutoEnterOOMUnsafeRegion oomUnsafe; - if (!cx->global()->getGroup(cx)) + if (!JSObject::getGroup(cx, cx->global())) oomUnsafe.crash("ArrayBufferObject::detach"); MarkObjectGroupFlags(cx, cx->global(), OBJECT_FLAG_TYPED_OBJECT_HAS_DETACHED_BUFFER); cx->compartment()->detachedTypedObjects = 1; diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 65d435de5327..8e9eed732d74 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -2235,7 +2235,7 @@ Debugger::appendAllocationSite(JSContext* cx, HandleObject obj, HandleSavedFrame RootedAtom ctorName(cx); { AutoCompartment ac(cx, obj); - if (!obj->constructorDisplayAtom(cx, &ctorName)) + if (!JSObject::constructorDisplayAtom(cx, obj, &ctorName)) return false; } diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h index ff4ec23fbb68..94e43e0bba5d 100644 --- a/js/src/vm/GlobalObject.h +++ b/js/src/vm/GlobalObject.h @@ -765,6 +765,7 @@ class GlobalObject : public NativeObject // Implemented in Intl.cpp. static bool initIntlObject(JSContext* cx, Handle global); + static bool addPluralRulesConstructor(JSContext* cx, HandleObject intl); // Implemented in builtin/ModuleObject.cpp static bool initModuleProto(JSContext* cx, Handle global); diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp index 0b8b68cff0b1..67c4818b8091 100644 --- a/js/src/vm/Interpreter.cpp +++ b/js/src/vm/Interpreter.cpp @@ -4665,7 +4665,8 @@ js::RunOnceScriptPrologue(JSContext* cx, HandleScript script) // Force instantiation of the script's function's group to ensure the flag // is preserved in type information. - if (!script->functionNonDelazifying()->getGroup(cx)) + RootedFunction fun(cx, script->functionNonDelazifying()); + if (!JSObject::getGroup(cx, fun)) return false; MarkObjectGroupFlags(cx, script->functionNonDelazifying(), OBJECT_FLAG_RUNONCE_INVALIDATED); diff --git a/js/src/vm/ObjectGroup.cpp b/js/src/vm/ObjectGroup.cpp index dffebc3dd496..81fe7f499bc3 100644 --- a/js/src/vm/ObjectGroup.cpp +++ b/js/src/vm/ObjectGroup.cpp @@ -252,7 +252,7 @@ ObjectGroup::useSingletonForAllocationSite(JSScript* script, jsbytecode* pc, con ///////////////////////////////////////////////////////////////////// bool -JSObject::shouldSplicePrototype(JSContext* cx) +JSObject::shouldSplicePrototype() { /* * During bootstrapping, if inference is enabled we need to make sure not @@ -265,19 +265,18 @@ JSObject::shouldSplicePrototype(JSContext* cx) return isSingleton(); } -bool -JSObject::splicePrototype(JSContext* cx, const Class* clasp, Handle proto) +/* static */ bool +JSObject::splicePrototype(JSContext* cx, HandleObject obj, const Class* clasp, + Handle proto) { - MOZ_ASSERT(cx->compartment() == compartment()); - - RootedObject self(cx, this); + MOZ_ASSERT(cx->compartment() == obj->compartment()); /* * For singleton groups representing only a single JSObject, the proto * can be rearranged as needed without destroying type information for * the old or new types. */ - MOZ_ASSERT(self->isSingleton()); + MOZ_ASSERT(obj->isSingleton()); // Windows may not appear on prototype chains. MOZ_ASSERT_IF(proto.isObject(), !IsWindow(proto.toObject())); @@ -286,12 +285,13 @@ JSObject::splicePrototype(JSContext* cx, const Class* clasp, Handle return false; // Force type instantiation when splicing lazy group. - RootedObjectGroup group(cx, self->getGroup(cx)); + RootedObjectGroup group(cx, JSObject::getGroup(cx, obj)); if (!group) return false; RootedObjectGroup protoGroup(cx, nullptr); if (proto.isObject()) { - protoGroup = proto.toObject()->getGroup(cx); + RootedObject protoObj(cx, proto.toObject()); + protoGroup = JSObject::getGroup(cx, protoObj); if (!protoGroup) return false; } diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index fc4bf1f9d177..c059be497357 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -179,6 +179,7 @@ JSRuntime::JSRuntime(JSRuntime* parentRuntime) destroyZoneCallback(nullptr), sweepZoneCallback(nullptr), compartmentNameCallback(nullptr), + externalStringSizeofCallback(nullptr), activityCallback(nullptr), activityCallbackArg(nullptr), requestDepth(0), diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h index a9c2edd54529..4e91e5ac63e4 100644 --- a/js/src/vm/Runtime.h +++ b/js/src/vm/Runtime.h @@ -844,6 +844,9 @@ struct JSRuntime : public JS::shadow::Runtime, /* Call this to get the name of a compartment. */ JSCompartmentNameCallback compartmentNameCallback; + /* Callback for doing memory reporting on external strings. */ + JSExternalStringSizeofCallback externalStringSizeofCallback; + js::ActivityCallback activityCallback; void* activityCallbackArg; void triggerActivityCallback(bool active); diff --git a/js/src/vm/String.cpp b/js/src/vm/String.cpp index 747396d84d5f..a87e4f18d743 100644 --- a/js/src/vm/String.cpp +++ b/js/src/vm/String.cpp @@ -15,6 +15,7 @@ #include "mozilla/Unused.h" #include "gc/Marking.h" +#include "js/GCAPI.h" #include "js/UbiNode.h" #include "vm/SPSProfiler.h" @@ -53,9 +54,16 @@ JSString::sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) : mallocSizeOf(extensible.rawTwoByteChars()); } - // JSExternalString: don't count, the chars could be stored anywhere. - if (isExternal()) + // JSExternalString: Ask the embedding to tell us what's going on. If it + // doesn't want to say, don't count, the chars could be stored anywhere. + if (isExternal()) { + if (auto* cb = runtimeFromMainThread()->externalStringSizeofCallback) { + // Our callback isn't supposed to cause GC. + JS::AutoSuppressGCAnalysis nogc; + return cb(this, mallocSizeOf); + } return 0; + } // JSInlineString, JSFatInlineString [JSInlineAtom, JSFatInlineAtom]: the chars are inline. if (isInline()) diff --git a/js/src/vm/TypeInference.cpp b/js/src/vm/TypeInference.cpp index a80da30464bc..4bc6fac93b86 100644 --- a/js/src/vm/TypeInference.cpp +++ b/js/src/vm/TypeInference.cpp @@ -1324,7 +1324,8 @@ js::EnsureTrackPropertyTypes(JSContext* cx, JSObject* obj, jsid id) AutoEnterAnalysis enter(cx); if (obj->hasLazyGroup()) { AutoEnterOOMUnsafeRegion oomUnsafe; - if (!obj->getGroup(cx)) { + RootedObject objRoot(cx, obj); + if (!JSObject::getGroup(cx, objRoot)) { oomUnsafe.crash("Could not allocate ObjectGroup in EnsureTrackPropertyTypes"); return; } @@ -1343,9 +1344,12 @@ HeapTypeSetKey::instantiate(JSContext* cx) { if (maybeTypes()) return true; - if (object()->isSingleton() && !object()->singleton()->getGroup(cx)) { - cx->clearPendingException(); - return false; + if (object()->isSingleton()) { + RootedObject obj(cx, object()->singleton()); + if (!JSObject::getGroup(cx, obj)) { + cx->clearPendingException(); + return false; + } } JSObject* obj = object()->isSingleton() ? object()->singleton() : nullptr; maybeTypes_ = object()->maybeGroup()->getProperty(cx, obj, id()); @@ -3178,7 +3182,7 @@ js::AddClearDefiniteGetterSetterForPrototypeChain(JSContext* cx, ObjectGroup* gr */ RootedObject proto(cx, group->proto().toObjectOrNull()); while (proto) { - ObjectGroup* protoGroup = proto->getGroup(cx); + ObjectGroup* protoGroup = JSObject::getGroup(cx, proto); if (!protoGroup) { cx->recoverFromOutOfMemory(); return false; diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp index ebb61c1e59d9..29db529dc555 100644 --- a/js/src/vm/TypedArrayObject.cpp +++ b/js/src/vm/TypedArrayObject.cpp @@ -3004,36 +3004,50 @@ js::DefineTypedArrayElement(JSContext* cx, HandleObject obj, uint64_t index, { MOZ_ASSERT(obj->is()); - // These are all substeps of 3.c. - // Steps i-vi. + // These are all substeps of 3.b. + + // Steps i-iii are handled by the caller. + + // Steps iv-v. // We (wrongly) ignore out of range defines with a value. - if (index >= obj->as().length()) + uint32_t length = obj->as().length(); + if (index >= length) return result.succeed(); - // Step vii. + // Step vi. if (desc.isAccessorDescriptor()) return result.fail(JSMSG_CANT_REDEFINE_PROP); - // Step viii. + // Step vii. if (desc.hasConfigurable() && desc.configurable()) return result.fail(JSMSG_CANT_REDEFINE_PROP); - // Step ix. + // Step viii. if (desc.hasEnumerable() && !desc.enumerable()) return result.fail(JSMSG_CANT_REDEFINE_PROP); - // Step x. + // Step ix. if (desc.hasWritable() && !desc.writable()) return result.fail(JSMSG_CANT_REDEFINE_PROP); - // Step xi. + // Step x. if (desc.hasValue()) { - double d; - if (!ToNumber(cx, desc.value(), &d)) + // The following step numbers refer to 9.4.5.9 + // IntegerIndexedElementSet. + + // Steps 1-2 are enforced by the caller. + + // Step 3. + double numValue; + if (!ToNumber(cx, desc.value(), &numValue)) return false; - if (obj->is()) - TypedArrayObject::setElement(obj->as(), index, d); + // Steps 4-5, 8-9. + if (obj->as().hasDetachedBuffer()) + return result.fail(JSMSG_TYPED_ARRAY_DETACHED); + + // Steps 10-16. + TypedArrayObject::setElement(obj->as(), index, numValue); } // Step xii. diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp index 84c7179306a8..a5b3c691bebe 100644 --- a/js/src/wasm/AsmJS.cpp +++ b/js/src/wasm/AsmJS.cpp @@ -59,6 +59,7 @@ using mozilla::Compression::LZ4; using mozilla::HashGeneric; using mozilla::IsNaN; using mozilla::IsNegativeZero; +using mozilla::IsPositiveZero; using mozilla::IsPowerOfTwo; using mozilla::Maybe; using mozilla::Move; @@ -888,14 +889,14 @@ class NumLit return (uint32_t)toInt32(); } - RawF64 toDouble() const { + double toDouble() const { MOZ_ASSERT(which_ == Double); - return RawF64(u.scalar_.toDouble()); + return u.scalar_.toDouble(); } - RawF32 toFloat() const { + float toFloat() const { MOZ_ASSERT(which_ == Float); - return RawF32(float(u.scalar_.toDouble())); + return float(u.scalar_.toDouble()); } Value scalarValue() const { @@ -928,9 +929,9 @@ class NumLit case NumLit::BigUnsigned: return toInt32() == 0; case NumLit::Double: - return toDouble().bits() == 0; + return IsPositiveZero(toDouble()); case NumLit::Float: - return toFloat().bits() == 0; + return IsPositiveZero(toFloat()); case NumLit::Int8x16: case NumLit::Uint8x16: case NumLit::Bool8x16: @@ -7516,14 +7517,14 @@ ValidateGlobalVariable(JSContext* cx, const AsmJSGlobal& global, HandleValue imp float f; if (!RoundFloat32(cx, v, &f)) return false; - *val = Val(RawF32(f)); + *val = Val(f); return true; } case ValType::F64: { double d; if (!ToNumber(cx, v, &d)) return false; - *val = Val(RawF64(d)); + *val = Val(d); return true; } case ValType::I8x16: { @@ -8435,9 +8436,11 @@ StoreAsmJSModuleInCache(AsmJSParser& parser, Module& module, ExclusiveContext* c size_t bytecodeSize, compiledSize; module.serializedSize(&bytecodeSize, &compiledSize); + MOZ_RELEASE_ASSERT(bytecodeSize == 0); + MOZ_RELEASE_ASSERT(compiledSize <= UINT32_MAX); - size_t serializedSize = 2 * sizeof(uint32_t) + - bytecodeSize + compiledSize + + size_t serializedSize = sizeof(uint32_t) + + compiledSize + moduleChars.serializedSize(); JS::OpenAsmJSCacheEntryForWriteOp open = cx->asmJSCacheOps().openEntryForWrite; @@ -8460,16 +8463,10 @@ StoreAsmJSModuleInCache(AsmJSParser& parser, Module& module, ExclusiveContext* c // between any two builds (regardless of platform, architecture, ...). // (The Module::assumptionsMatch() guard everything in the Module and // afterwards.) - MOZ_RELEASE_ASSERT(bytecodeSize <= UINT32_MAX); - MOZ_RELEASE_ASSERT(compiledSize <= UINT32_MAX); - cursor = WriteScalar(cursor, bytecodeSize); cursor = WriteScalar(cursor, compiledSize); - uint8_t* compiledBegin = cursor; - uint8_t* bytecodeBegin = compiledBegin + compiledSize;; - - module.serialize(bytecodeBegin, bytecodeSize, compiledBegin, compiledSize); - cursor = bytecodeBegin + bytecodeSize; + module.serialize(/* bytecodeBegin = */ nullptr, /* bytecodeSize = */ 0, cursor, compiledSize); + cursor += compiledSize; cursor = moduleChars.serialize(cursor); @@ -8500,33 +8497,29 @@ LookupAsmJSModuleInCache(ExclusiveContext* cx, AsmJSParser& parser, bool* loaded size_t remain = entry.serializedSize; const uint8_t* cursor = entry.memory; - uint32_t bytecodeSize, compiledSize; - (cursor = ReadScalarChecked(cursor, &remain, &bytecodeSize)) && - (cursor = ReadScalarChecked(cursor, &remain, &compiledSize)); + uint32_t compiledSize; + cursor = ReadScalarChecked(cursor, &remain, &compiledSize); if (!cursor) return true; - const uint8_t* compiledBegin = cursor; - const uint8_t* bytecodeBegin = compiledBegin + compiledSize; - Assumptions assumptions; if (!assumptions.initBuildIdFromContext(cx)) return false; - if (!Module::assumptionsMatch(assumptions, compiledBegin, remain)) + if (!Module::assumptionsMatch(assumptions, cursor, remain)) return true; MutableAsmJSMetadata asmJSMetadata = cx->new_(); if (!asmJSMetadata) return false; - *module = Module::deserialize(bytecodeBegin, bytecodeSize, compiledBegin, compiledSize, - asmJSMetadata.get()); + *module = Module::deserialize(/* bytecodeBegin = */ nullptr, /* bytecodeSize = */ 0, + cursor, compiledSize, asmJSMetadata.get()); if (!*module) { ReportOutOfMemory(cx); return false; } - cursor = bytecodeBegin + bytecodeSize; + cursor += compiledSize; // Due to the hash comparison made by openEntryForRead, this should succeed // with high probability. diff --git a/js/src/wasm/WasmBaselineCompile.cpp b/js/src/wasm/WasmBaselineCompile.cpp index 2b748b2ee104..2aa9508174e7 100644 --- a/js/src/wasm/WasmBaselineCompile.cpp +++ b/js/src/wasm/WasmBaselineCompile.cpp @@ -512,7 +512,7 @@ class BaseCompiler Assembler::Condition latentIntCmp_; // Comparison operator, if latentOp_ == Compare, int types Assembler::DoubleCondition latentDoubleCmp_;// Comparison operator, if latentOp_ == Compare, float types - FuncCompileResults& compileResults_; + FuncOffsets offsets_; MacroAssembler& masm; // No '_' suffix - too tedious... AllocatableGeneralRegisterSet availGPR_; @@ -567,11 +567,12 @@ class BaseCompiler Decoder& decoder, const FuncBytes& func, const ValTypeVector& locals, - FuncCompileResults& compileResults); + TempAllocator* alloc, + MacroAssembler* masm); MOZ_MUST_USE bool init(); - void finish(); + FuncOffsets finish(); MOZ_MUST_USE bool emitFunction(); @@ -877,8 +878,8 @@ class BaseCompiler RegF64 f64reg_; int32_t i32val_; int64_t i64val_; - RawF32 f32val_; - RawF64 f64val_; + float f32val_; + double f64val_; uint32_t slot_; uint32_t offs_; }; @@ -894,8 +895,11 @@ class BaseCompiler RegF64 f64reg() const { MOZ_ASSERT(kind_ == RegisterF64); return f64reg_; } int32_t i32val() const { MOZ_ASSERT(kind_ == ConstI32); return i32val_; } int64_t i64val() const { MOZ_ASSERT(kind_ == ConstI64); return i64val_; } - RawF32 f32val() const { MOZ_ASSERT(kind_ == ConstF32); return f32val_; } - RawF64 f64val() const { MOZ_ASSERT(kind_ == ConstF64); return f64val_; } + // For these two, use an out-param instead of simply returning, to + // use the normal stack and not the x87 FP stack (which has effect on + // NaNs with the signaling bit set). + void f32val(float* out) const { MOZ_ASSERT(kind_ == ConstF32); *out = f32val_; } + void f64val(double* out) const { MOZ_ASSERT(kind_ == ConstF64); *out = f64val_; } uint32_t slot() const { MOZ_ASSERT(kind_ > MemLast && kind_ <= LocalLast); return slot_; } uint32_t offs() const { MOZ_ASSERT(isMem()); return offs_; } @@ -905,8 +909,8 @@ class BaseCompiler void setF64Reg(RegF64 r) { kind_ = RegisterF64; f64reg_ = r; } void setI32Val(int32_t v) { kind_ = ConstI32; i32val_ = v; } void setI64Val(int64_t v) { kind_ = ConstI64; i64val_ = v; } - void setF32Val(RawF32 v) { kind_ = ConstF32; f32val_ = v; } - void setF64Val(RawF64 v) { kind_ = ConstF64; f64val_ = v; } + void setF32Val(float v) { kind_ = ConstF32; f32val_ = v; } + void setF64Val(double v) { kind_ = ConstF64; f64val_ = v; } void setSlot(Kind k, uint32_t v) { MOZ_ASSERT(k > MemLast && k <= LocalLast); kind_ = k; slot_ = v; } void setOffs(Kind k, uint32_t v) { MOZ_ASSERT(k <= MemLast); kind_ = k; offs_ = v; } }; @@ -1116,7 +1120,9 @@ class BaseCompiler } void loadConstF64(FloatRegister r, Stk &src) { - masm.loadConstantDouble(src.f64val(), r); + double d; + src.f64val(&d); + masm.loadConstantDouble(d, r); } void loadMemF64(FloatRegister r, Stk& src) { @@ -1133,7 +1139,9 @@ class BaseCompiler } void loadConstF32(FloatRegister r, Stk &src) { - masm.loadConstantFloat32(src.f32val(), r); + float f; + src.f32val(&f); + masm.loadConstantFloat32(f, r); } void loadMemF32(FloatRegister r, Stk& src) { @@ -1447,12 +1455,12 @@ class BaseCompiler x.setI64Val(v); } - void pushF64(RawF64 v) { + void pushF64(double v) { Stk& x = push(); x.setF64Val(v); } - void pushF32(RawF32 v) { + void pushF32(float v) { Stk& x = push(); x.setF32Val(v); } @@ -2046,7 +2054,7 @@ class BaseCompiler JitSpew(JitSpew_Codegen, "# Emitting wasm baseline code"); SigIdDesc sigId = env_.funcSigs[func_.index()]->id; - GenerateFunctionPrologue(masm, localSize_, sigId, &compileResults_.offsets()); + GenerateFunctionPrologue(masm, localSize_, sigId, &offsets_); MOZ_ASSERT(masm.framePushed() == uint32_t(localSize_)); @@ -2141,7 +2149,7 @@ class BaseCompiler // Restore the TLS register in case it was overwritten by the function. loadFromFramePtr(WasmTlsReg, frameOffsetFromSlot(tlsSlot_, MIRType::Pointer)); - GenerateFunctionEpilogue(masm, localSize_, &compileResults_.offsets()); + GenerateFunctionEpilogue(masm, localSize_, &offsets_); #if defined(JS_ION_PERF) // FIXME - profiling code missing. Bug 1286948. @@ -2155,7 +2163,7 @@ class BaseCompiler masm.wasmEmitTrapOutOfLineCode(); - compileResults_.offsets().end = masm.currentOffset(); + offsets_.end = masm.currentOffset(); // A frame greater than 256KB is implausible, probably an attack, // so fail the compilation. @@ -7168,7 +7176,7 @@ BaseCompiler::emitBody() // F32 case uint16_t(Op::F32Const): { - RawF32 f32; + float f32; CHECK(iter_.readF32Const(&f32)); if (!deadCode_) pushF32(f32); @@ -7237,7 +7245,7 @@ BaseCompiler::emitBody() // F64 case uint16_t(Op::F64Const): { - RawF64 f64; + double f64; CHECK(iter_.readF64Const(&f64)); if (!deadCode_) pushF64(f64); @@ -7533,12 +7541,13 @@ BaseCompiler::BaseCompiler(const ModuleEnvironment& env, Decoder& decoder, const FuncBytes& func, const ValTypeVector& locals, - FuncCompileResults& compileResults) + TempAllocator* alloc, + MacroAssembler* masm) : env_(env), iter_(decoder, func.lineOrBytecode()), func_(func), lastReadCallSite_(0), - alloc_(compileResults.alloc()), + alloc_(*alloc), locals_(locals), localSize_(0), varLow_(0), @@ -7551,8 +7560,7 @@ BaseCompiler::BaseCompiler(const ModuleEnvironment& env, latentType_(ValType::I32), latentIntCmp_(Assembler::Equal), latentDoubleCmp_(Assembler::DoubleEqual), - compileResults_(compileResults), - masm(compileResults_.masm()), + masm(*masm), availGPR_(GeneralRegisterSet::All()), availFPU_(FloatRegisterSet::All()), #ifdef DEBUG @@ -7695,13 +7703,15 @@ BaseCompiler::init() return true; } -void +FuncOffsets BaseCompiler::finish() { MOZ_ASSERT(done(), "all bytes must be consumed"); MOZ_ASSERT(func_.callSiteLineNums().length() == lastReadCallSite_); masm.flushBuffer(); + + return offsets_; } static LiveRegisterSet @@ -7749,12 +7759,11 @@ js::wasm::BaselineCanCompile(const FunctionGenerator* fg) } bool -js::wasm::BaselineCompileFunction(CompileTask* task) +js::wasm::BaselineCompileFunction(CompileTask* task, FuncCompileUnit* unit) { - MOZ_ASSERT(task->mode() == CompileTask::CompileMode::Baseline); + MOZ_ASSERT(unit->mode() == CompileMode::Baseline); - const FuncBytes& func = task->func(); - FuncCompileResults& results = task->results(); + const FuncBytes& func = unit->func(); Decoder d(func.bytes()); @@ -7768,19 +7777,18 @@ js::wasm::BaselineCompileFunction(CompileTask* task) // The MacroAssembler will sometimes access the jitContext. - JitContext jitContext(&results.alloc()); + JitContext jitContext(&task->alloc()); // One-pass baseline compilation. - BaseCompiler f(task->env(), d, func, locals, results); + BaseCompiler f(task->env(), d, func, locals, &task->alloc(), &task->masm()); if (!f.init()) return false; if (!f.emitFunction()) return false; - f.finish(); - + unit->finish(f.finish()); return true; } diff --git a/js/src/wasm/WasmBaselineCompile.h b/js/src/wasm/WasmBaselineCompile.h index 3c7a0d2e8364..3fc43ba9606a 100644 --- a/js/src/wasm/WasmBaselineCompile.h +++ b/js/src/wasm/WasmBaselineCompile.h @@ -24,6 +24,7 @@ namespace wasm { class FunctionGenerator; class CompileTask; +class FuncCompileUnit; // Return true if BaselineCompileFunction can generate code for the // function held in the FunctionGenerator. If false is returned a @@ -39,7 +40,7 @@ BaselineCanCompile(const FunctionGenerator* fg); // Generate adequate code quickly. bool -BaselineCompileFunction(CompileTask* task); +BaselineCompileFunction(CompileTask* task, FuncCompileUnit* unit); } // namespace wasm } // namespace js diff --git a/js/src/wasm/WasmBinaryIterator.h b/js/src/wasm/WasmBinaryIterator.h index 93f446b03a59..5c98c9900c89 100644 --- a/js/src/wasm/WasmBinaryIterator.h +++ b/js/src/wasm/WasmBinaryIterator.h @@ -308,16 +308,16 @@ class MOZ_STACK_CLASS OpIter : private Policy *out = d_.uncheckedReadVarU64(); return true; } - MOZ_MUST_USE bool readFixedF32(RawF32* out) { + MOZ_MUST_USE bool readFixedF32(float* out) { if (Validate) return d_.readFixedF32(out); - *out = d_.uncheckedReadFixedF32(); + d_.uncheckedReadFixedF32(out); return true; } - MOZ_MUST_USE bool readFixedF64(RawF64* out) { + MOZ_MUST_USE bool readFixedF64(double* out) { if (Validate) return d_.readFixedF64(out); - *out = d_.uncheckedReadFixedF64(); + d_.uncheckedReadFixedF64(out); return true; } MOZ_MUST_USE bool readFixedI8x16(I8x16* out) { @@ -575,8 +575,8 @@ class MOZ_STACK_CLASS OpIter : private Policy MOZ_MUST_USE bool readTeeGlobal(const GlobalDescVector& globals, uint32_t* id, Value* value); MOZ_MUST_USE bool readI32Const(int32_t* i32); MOZ_MUST_USE bool readI64Const(int64_t* i64); - MOZ_MUST_USE bool readF32Const(RawF32* f32); - MOZ_MUST_USE bool readF64Const(RawF64* f64); + MOZ_MUST_USE bool readF32Const(float* f32); + MOZ_MUST_USE bool readF64Const(double* f64); MOZ_MUST_USE bool readI8x16Const(I8x16* i8x16); MOZ_MUST_USE bool readI16x8Const(I16x8* i16x8); MOZ_MUST_USE bool readI32x4Const(I32x4* i32x4); @@ -1618,11 +1618,11 @@ OpIter::readI64Const(int64_t* i64) template inline bool -OpIter::readF32Const(RawF32* f32) +OpIter::readF32Const(float* f32) { MOZ_ASSERT(Classify(op_) == OpKind::F32); - RawF32 unused; + float unused; if (!readFixedF32(Output ? f32 : &unused)) return false; @@ -1634,11 +1634,11 @@ OpIter::readF32Const(RawF32* f32) template inline bool -OpIter::readF64Const(RawF64* f64) +OpIter::readF64Const(double* f64) { MOZ_ASSERT(Classify(op_) == OpKind::F64); - RawF64 unused; + double unused; if (!readFixedF64(Output ? f64 : &unused)) return false; diff --git a/js/src/wasm/WasmBinaryToAST.cpp b/js/src/wasm/WasmBinaryToAST.cpp index 2e90e36a319d..49b0ee1698e5 100644 --- a/js/src/wasm/WasmBinaryToAST.cpp +++ b/js/src/wasm/WasmBinaryToAST.cpp @@ -1044,7 +1044,7 @@ AstDecodeExpr(AstDecodeContext& c) return false; break; case uint16_t(Op::F32Const): { - RawF32 f32; + float f32; if (!c.iter().readF32Const(&f32)) return false; tmp = new(c.lifo) AstConst(Val(f32)); @@ -1053,7 +1053,7 @@ AstDecodeExpr(AstDecodeContext& c) break; } case uint16_t(Op::F64Const): { - RawF64 f64; + double f64; if (!c.iter().readF64Const(&f64)) return false; tmp = new(c.lifo) AstConst(Val(f64)); diff --git a/js/src/wasm/WasmBinaryToExperimentalText.cpp b/js/src/wasm/WasmBinaryToExperimentalText.cpp index 29f79981b697..190827f77594 100644 --- a/js/src/wasm/WasmBinaryToExperimentalText.cpp +++ b/js/src/wasm/WasmBinaryToExperimentalText.cpp @@ -164,13 +164,12 @@ PrintInt64(WasmPrintContext& c, int64_t num) } static bool -PrintDouble(WasmPrintContext& c, RawF64 num) +PrintDouble(WasmPrintContext& c, double d) { - double d = num.fp(); if (IsNegativeZero(d)) return c.buffer.append("-0.0"); if (IsNaN(d)) - return RenderNaN(c.sb(), num); + return RenderNaN(c.sb(), d); if (IsInfinite(d)) { if (d > 0) return c.buffer.append("infinity"); @@ -192,12 +191,11 @@ PrintDouble(WasmPrintContext& c, RawF64 num) } static bool -PrintFloat32(WasmPrintContext& c, RawF32 num) +PrintFloat32(WasmPrintContext& c, float f) { - float f = num.fp(); if (IsNaN(f)) - return RenderNaN(c.sb(), num) && c.buffer.append(".f"); - return PrintDouble(c, RawF64(double(f))) && + return RenderNaN(c.sb(), f) && c.buffer.append(".f"); + return PrintDouble(c, double(f)) && c.buffer.append("f"); } diff --git a/js/src/wasm/WasmBinaryToText.cpp b/js/src/wasm/WasmBinaryToText.cpp index 023ff56ebb4f..9280d11486fd 100644 --- a/js/src/wasm/WasmBinaryToText.cpp +++ b/js/src/wasm/WasmBinaryToText.cpp @@ -101,11 +101,10 @@ RenderInt64(WasmRenderContext& c, int64_t num) } static bool -RenderDouble(WasmRenderContext& c, RawF64 num) +RenderDouble(WasmRenderContext& c, double d) { - double d = num.fp(); if (IsNaN(d)) - return RenderNaN(c.sb(), num); + return RenderNaN(c.sb(), d); if (IsNegativeZero(d)) return c.buffer.append("-0"); if (IsInfinite(d)) { @@ -117,12 +116,11 @@ RenderDouble(WasmRenderContext& c, RawF64 num) } static bool -RenderFloat32(WasmRenderContext& c, RawF32 num) +RenderFloat32(WasmRenderContext& c, float f) { - float f = num.fp(); if (IsNaN(f)) - return RenderNaN(c.sb(), num); - return RenderDouble(c, RawF64(double(f))); + return RenderNaN(c.sb(), f); + return RenderDouble(c, double(f)); } static bool diff --git a/js/src/wasm/WasmCompile.h b/js/src/wasm/WasmCompile.h index d5a19da97a08..87f2b16c675f 100644 --- a/js/src/wasm/WasmCompile.h +++ b/js/src/wasm/WasmCompile.h @@ -19,7 +19,6 @@ #ifndef wasm_compile_h #define wasm_compile_h -#include "wasm/WasmJS.h" #include "wasm/WasmModule.h" namespace js { @@ -40,7 +39,7 @@ struct CompileArgs { Assumptions assumptions; ScriptedCaller scriptedCaller; - MOZ_INIT_OUTSIDE_CTOR bool alwaysBaseline; + bool alwaysBaseline; CompileArgs(Assumptions&& assumptions, ScriptedCaller&& scriptedCaller) : assumptions(Move(assumptions)), diff --git a/js/src/wasm/WasmGenerator.cpp b/js/src/wasm/WasmGenerator.cpp index a2551c871d8f..a89f9aa4a29e 100644 --- a/js/src/wasm/WasmGenerator.cpp +++ b/js/src/wasm/WasmGenerator.cpp @@ -55,6 +55,8 @@ ModuleGenerator::ModuleGenerator() startOfUnpatchedCallsites_(0), parallel_(false), outstanding_(0), + currentTask_(nullptr), + batchedBytecode_(0), activeFuncDef_(nullptr), startedFuncDefs_(false), finishedFuncDefs_(false), @@ -96,6 +98,8 @@ ModuleGenerator::~ModuleGenerator() } else { MOZ_ASSERT(!outstanding_); } + MOZ_ASSERT_IF(finishedFuncDefs_, !batchedBytecode_); + MOZ_ASSERT_IF(finishedFuncDefs_, !currentTask_); } bool @@ -391,42 +395,45 @@ ModuleGenerator::patchFarJumps(const TrapExitOffsetArray& trapExits) bool ModuleGenerator::finishTask(CompileTask* task) { - const FuncBytes& func = task->func(); - FuncCompileResults& results = task->results(); - masm_.haltingAlign(CodeAlignment); // Before merging in the new function's code, if calls in a prior function // body might go out of range, insert far jumps to extend the range. - if ((masm_.size() - startOfUnpatchedCallsites_) + results.masm().size() > JumpRange()) { + if ((masm_.size() - startOfUnpatchedCallsites_) + task->masm().size() > JumpRange()) { startOfUnpatchedCallsites_ = masm_.size(); if (!patchCallSites()) return false; } - // Offset the recorded FuncOffsets by the offset of the function in the - // whole module's code segment. uint32_t offsetInWhole = masm_.size(); - results.offsets().offsetBy(offsetInWhole); + for (const FuncCompileUnit& unit : task->units()) { + const FuncBytes& func = unit.func(); - // Add the CodeRange for this function. - uint32_t funcCodeRangeIndex = metadata_->codeRanges.length(); - if (!metadata_->codeRanges.emplaceBack(func.index(), func.lineOrBytecode(), results.offsets())) - return false; + // Offset the recorded FuncOffsets by the offset of the function in the + // whole module's code segment. + FuncOffsets offsets = unit.offsets(); + offsets.offsetBy(offsetInWhole); - MOZ_ASSERT(!funcIsCompiled(func.index())); - funcToCodeRange_[func.index()] = funcCodeRangeIndex; + // Add the CodeRange for this function. + uint32_t funcCodeRangeIndex = metadata_->codeRanges.length(); + if (!metadata_->codeRanges.emplaceBack(func.index(), func.lineOrBytecode(), offsets)) + return false; + + MOZ_ASSERT(!funcIsCompiled(func.index())); + funcToCodeRange_[func.index()] = funcCodeRangeIndex; + } // Merge the compiled results into the whole-module masm. mozilla::DebugOnly sizeBefore = masm_.size(); - if (!masm_.asmMergeWith(results.masm())) + if (!masm_.asmMergeWith(task->masm())) + return false; + MOZ_ASSERT(masm_.size() == offsetInWhole + task->masm().size()); + + if (!task->reset(&freeFuncBytes_)) return false; - MOZ_ASSERT(masm_.size() == offsetInWhole + results.masm().size()); - UniqueBytes recycled; - task->reset(&recycled); freeTasks_.infallibleAppend(task); - return freeBytes_.emplaceBack(Move(recycled)); + return true; } bool @@ -836,7 +843,10 @@ ModuleGenerator::startFuncDefs() MOZ_ASSERT(threads.threadCount > 1); uint32_t numTasks; - if (CanUseExtraThreads() && threads.wasmCompilationInProgress.compareExchange(false, true)) { + if (CanUseExtraThreads() && + threads.cpuCount > 1 && + threads.wasmCompilationInProgress.compareExchange(false, true)) + { #ifdef DEBUG { AutoLockHelperThreadState lock; @@ -861,15 +871,6 @@ ModuleGenerator::startFuncDefs() for (size_t i = 0; i < numTasks; i++) freeTasks_.infallibleAppend(&tasks_[i]); - if (!freeBytes_.reserve(numTasks)) - return false; - for (size_t i = 0; i < numTasks; i++) { - auto bytes = js::MakeUnique(); - if (!bytes) - return false; - freeBytes_.infallibleAppend(Move(bytes)); - } - startedFuncDefs_ = true; MOZ_ASSERT(!finishedFuncDefs_); return true; @@ -882,58 +883,81 @@ ModuleGenerator::startFuncDef(uint32_t lineOrBytecode, FunctionGenerator* fg) MOZ_ASSERT(!activeFuncDef_); MOZ_ASSERT(!finishedFuncDefs_); - if (!freeBytes_.empty()) { - fg->bytes_ = Move(freeBytes_.back()); - freeBytes_.popBack(); + if (!freeFuncBytes_.empty()) { + fg->funcBytes_ = Move(freeFuncBytes_.back()); + freeFuncBytes_.popBack(); } else { - fg->bytes_ = js::MakeUnique(); - if (!fg->bytes_) + fg->funcBytes_ = js::MakeUnique(); + if (!fg->funcBytes_) return false; } - fg->lineOrBytecode_ = lineOrBytecode; + if (!currentTask_) { + if (freeTasks_.empty() && !finishOutstandingTask()) + return false; + currentTask_ = freeTasks_.popCopy(); + } + + fg->funcBytes_->setLineOrBytecode(lineOrBytecode); fg->m_ = this; activeFuncDef_ = fg; return true; } +bool +ModuleGenerator::launchBatchCompile() +{ + MOZ_ASSERT(currentTask_); + + size_t numBatchedFuncs = currentTask_->units().length(); + MOZ_ASSERT(numBatchedFuncs); + + if (parallel_) { + if (!StartOffThreadWasmCompile(currentTask_)) + return false; + outstanding_++; + } else { + if (!CompileFunction(currentTask_)) + return false; + if (!finishTask(currentTask_)) + return false; + } + + currentTask_ = nullptr; + batchedBytecode_ = 0; + + numFinishedFuncDefs_ += numBatchedFuncs; + return true; +} + bool ModuleGenerator::finishFuncDef(uint32_t funcIndex, FunctionGenerator* fg) { MOZ_ASSERT(activeFuncDef_ == fg); - auto func = js::MakeUnique(Move(fg->bytes_), - funcIndex, - funcSig(funcIndex), - fg->lineOrBytecode_, - Move(fg->callSiteLineNums_)); - if (!func) - return false; + UniqueFuncBytes func = Move(fg->funcBytes_); + + func->setFunc(funcIndex, &funcSig(funcIndex)); auto mode = alwaysBaseline_ && BaselineCanCompile(fg) - ? CompileTask::CompileMode::Baseline - : CompileTask::CompileMode::Ion; + ? CompileMode::Baseline + : CompileMode::Ion; - if (freeTasks_.empty() && !finishOutstandingTask()) + CheckedInt newBatched = func->bytes().length(); + if (mode == CompileMode::Ion) + newBatched *= JitOptions.wasmBatchIonScaleFactor; + newBatched += batchedBytecode_; + + if (!currentTask_->units().emplaceBack(Move(func), mode)) return false; - CompileTask* task = freeTasks_.popCopy(); - task->init(Move(func), mode); - - if (parallel_) { - if (!StartOffThreadWasmCompile(task)) - return false; - outstanding_++; - } else { - if (!CompileFunction(task)) - return false; - if (!finishTask(task)) - return false; - } + if (newBatched.isValid() && newBatched.value() < JitOptions.wasmBatchThreshold) + batchedBytecode_ = newBatched.value(); + else if (!launchBatchCompile()) + return false; fg->m_ = nullptr; activeFuncDef_ = nullptr; - numFinishedFuncDefs_++; return true; } @@ -944,6 +968,9 @@ ModuleGenerator::finishFuncDefs() MOZ_ASSERT(!activeFuncDef_); MOZ_ASSERT(!finishedFuncDefs_); + if (currentTask_ && !launchBatchCompile()) + return false; + while (outstanding_ > 0) { if (!finishOutstandingTask()) return false; @@ -1143,14 +1170,18 @@ wasm::CompileFunction(CompileTask* task) TraceLoggerThread* logger = TraceLoggerForCurrentThread(); AutoTraceLog logCompile(logger, TraceLogger_WasmCompilation); - switch (task->mode()) { - case wasm::CompileTask::CompileMode::Ion: - return wasm::IonCompileFunction(task); - case wasm::CompileTask::CompileMode::Baseline: - return wasm::BaselineCompileFunction(task); - case wasm::CompileTask::CompileMode::None: - break; + for (FuncCompileUnit& unit : task->units()) { + switch (unit.mode()) { + case CompileMode::Ion: + if (!IonCompileFunction(task, &unit)) + return false; + break; + case CompileMode::Baseline: + if (!BaselineCompileFunction(task, &unit)) + return false; + break; + } } - MOZ_CRASH("Uninitialized task"); + return true; } diff --git a/js/src/wasm/WasmGenerator.h b/js/src/wasm/WasmGenerator.h index 9e0fab45f1cf..daa98a005434 100644 --- a/js/src/wasm/WasmGenerator.h +++ b/js/src/wasm/WasmGenerator.h @@ -36,124 +36,158 @@ struct CompileArgs; class FunctionGenerator; -typedef Vector UniqueBytesVector; - // The FuncBytes class represents a single, concurrently-compilable function. // A FuncBytes object is composed of the wasm function body bytes along with the // ambient metadata describing the function necessary to compile it. class FuncBytes { - UniqueBytes bytes_; + Bytes bytes_; uint32_t index_; - const SigWithId& sig_; + const SigWithId* sig_; uint32_t lineOrBytecode_; Uint32Vector callSiteLineNums_; public: - FuncBytes(UniqueBytes bytes, - uint32_t index, - const SigWithId& sig, - uint32_t lineOrBytecode, - Uint32Vector&& callSiteLineNums) - : bytes_(Move(bytes)), - index_(index), - sig_(sig), - lineOrBytecode_(lineOrBytecode), - callSiteLineNums_(Move(callSiteLineNums)) + FuncBytes() + : index_(UINT32_MAX), + sig_(nullptr), + lineOrBytecode_(UINT32_MAX) {} - Bytes& bytes() { return *bytes_; } - const Bytes& bytes() const { return *bytes_; } - UniqueBytes recycle() { return Move(bytes_); } + Bytes& bytes() { + return bytes_; + } + MOZ_MUST_USE bool addCallSiteLineNum(uint32_t lineno) { + return callSiteLineNums_.append(lineno); + } + void setLineOrBytecode(uint32_t lineOrBytecode) { + MOZ_ASSERT(lineOrBytecode_ == UINT32_MAX); + lineOrBytecode_ = lineOrBytecode; + } + void setFunc(uint32_t index, const SigWithId* sig) { + MOZ_ASSERT(index_ == UINT32_MAX); + MOZ_ASSERT(sig_ == nullptr); + index_ = index; + sig_ = sig; + } + void reset() { + bytes_.clear(); + index_ = UINT32_MAX; + sig_ = nullptr; + lineOrBytecode_ = UINT32_MAX; + callSiteLineNums_.clear(); + } + + const Bytes& bytes() const { return bytes_; } uint32_t index() const { return index_; } - const SigWithId& sig() const { return sig_; } + const SigWithId& sig() const { return *sig_; } uint32_t lineOrBytecode() const { return lineOrBytecode_; } const Uint32Vector& callSiteLineNums() const { return callSiteLineNums_; } }; typedef UniquePtr UniqueFuncBytes; +typedef Vector UniqueFuncBytesVector; -// The FuncCompileResults class contains the results of compiling a single -// function body, ready to be merged into the whole-module MacroAssembler. - -class FuncCompileResults +enum class CompileMode { - jit::TempAllocator alloc_; - jit::MacroAssembler masm_; - FuncOffsets offsets_; - - FuncCompileResults(const FuncCompileResults&) = delete; - FuncCompileResults& operator=(const FuncCompileResults&) = delete; - - public: - explicit FuncCompileResults(LifoAlloc& lifo) - : alloc_(&lifo), - masm_(jit::MacroAssembler::WasmToken(), alloc_) - {} - - jit::TempAllocator& alloc() { return alloc_; } - jit::MacroAssembler& masm() { return masm_; } - FuncOffsets& offsets() { return offsets_; } + Baseline, + Ion }; -// A CompileTask represents the task of compiling a single function body. An -// CompileTask is filled with the wasm code to be compiled on the main -// validation thread, sent off to a compilation helper thread which creates -// the FuncCompileResults, and finally sent back to the validation thread. To -// save time allocating and freeing memory, CompileTasks are reset() and -// reused. +// FuncCompileUnit contains all the data necessary to produce and store the +// results of a single function's compilation. + +class FuncCompileUnit +{ + UniqueFuncBytes func_; + CompileMode mode_; + FuncOffsets offsets_; + DebugOnly finished_; + + public: + FuncCompileUnit(UniqueFuncBytes func, CompileMode mode) + : func_(Move(func)), + mode_(mode), + finished_(false) + {} + + const FuncBytes& func() const { return *func_; } + CompileMode mode() const { return mode_; } + FuncOffsets offsets() const { MOZ_ASSERT(finished_); return offsets_; } + + void finish(FuncOffsets offsets) { + MOZ_ASSERT(!finished_); + offsets_ = offsets; + finished_ = true; + } + + UniqueFuncBytes recycle() { + MOZ_ASSERT(finished_); + func_->reset(); + return Move(func_); + } +}; + +typedef Vector FuncCompileUnitVector; + +// A CompileTask represents the task of compiling a batch of functions. It is +// filled with a certain number of function's bodies that are sent off to a +// compilation helper thread, which fills in the resulting code offsets, and +// finally sent back to the validation thread. To save time allocating and +// freeing memory, CompileTasks are reset() and reused. class CompileTask { - public: - enum class CompileMode { None, Baseline, Ion }; - - private: - const ModuleEnvironment& env_; - LifoAlloc lifo_; - UniqueFuncBytes func_; - CompileMode mode_; - Maybe results_; + const ModuleEnvironment& env_; + LifoAlloc lifo_; + Maybe alloc_; + Maybe masm_; + FuncCompileUnitVector units_; CompileTask(const CompileTask&) = delete; CompileTask& operator=(const CompileTask&) = delete; + void init() { + alloc_.emplace(&lifo_); + masm_.emplace(jit::MacroAssembler::WasmToken(), *alloc_); + } + public: CompileTask(const ModuleEnvironment& env, size_t defaultChunkSize) - : env_(env), lifo_(defaultChunkSize), func_(nullptr), mode_(CompileMode::None) - {} + : env_(env), + lifo_(defaultChunkSize) + { + init(); + } LifoAlloc& lifo() { return lifo_; } + jit::TempAllocator& alloc() { + return *alloc_; + } const ModuleEnvironment& env() const { return env_; } - void init(UniqueFuncBytes func, CompileMode mode) { - MOZ_ASSERT(!func_); - func_ = Move(func); - results_.emplace(lifo_); - mode_ = mode; + jit::MacroAssembler& masm() { + return *masm_; } - CompileMode mode() const { - return mode_; + FuncCompileUnitVector& units() { + return units_; } - const FuncBytes& func() const { - MOZ_ASSERT(func_); - return *func_; - } - FuncCompileResults& results() { - return *results_; - } - void reset(UniqueBytes* recycled) { - if (func_) { - *recycled = Move(func_->recycle()); - (*recycled)->clear(); + bool reset(UniqueFuncBytesVector* freeFuncBytes) { + for (FuncCompileUnit& unit : units_) { + if (!freeFuncBytes->emplaceBack(Move(unit.recycle()))) + return false; } - func_.reset(nullptr); - results_.reset(); + + units_.clear(); + masm_.reset(); + alloc_.reset(); lifo_.releaseAll(); - mode_ = CompileMode::None; + + init(); + return true; } }; @@ -196,7 +230,9 @@ class MOZ_STACK_CLASS ModuleGenerator uint32_t outstanding_; CompileTaskVector tasks_; CompileTaskPtrVector freeTasks_; - UniqueBytesVector freeBytes_; + UniqueFuncBytesVector freeFuncBytes_; + CompileTask* currentTask_; + uint32_t batchedBytecode_; // Assertions DebugOnly activeFuncDef_; @@ -206,6 +242,7 @@ class MOZ_STACK_CLASS ModuleGenerator bool funcIsCompiled(uint32_t funcIndex) const; const CodeRange& funcCodeRange(uint32_t funcIndex) const; + uint32_t numFuncImports() const; MOZ_MUST_USE bool patchCallSites(TrapExitOffsetArray* maybeTrapExits = nullptr); MOZ_MUST_USE bool patchFarJumps(const TrapExitOffsetArray& trapExits); MOZ_MUST_USE bool finishTask(CompileTask* task); @@ -217,12 +254,11 @@ class MOZ_STACK_CLASS ModuleGenerator MOZ_MUST_USE bool allocateGlobalBytes(uint32_t bytes, uint32_t align, uint32_t* globalDataOff); MOZ_MUST_USE bool allocateGlobal(GlobalDesc* global); + MOZ_MUST_USE bool launchBatchCompile(); + MOZ_MUST_USE bool initAsmJS(Metadata* asmJSMetadata); MOZ_MUST_USE bool initWasm(); - // Functions declarations: - uint32_t numFuncImports() const; - public: explicit ModuleGenerator(); ~ModuleGenerator(); @@ -275,10 +311,11 @@ class MOZ_STACK_CLASS ModuleGenerator }; // A FunctionGenerator encapsulates the generation of a single function body. -// ModuleGenerator::startFunc must be called after construction and before doing -// anything else. After the body is complete, ModuleGenerator::finishFunc must -// be called before the FunctionGenerator is destroyed and the next function is -// started. +// ModuleGenerator::startFuncDef must be called after construction and before +// doing anything else. +// +// After the body is complete, ModuleGenerator::finishFuncDef must be called +// before the FunctionGenerator is destroyed and the next function is started. class MOZ_STACK_CLASS FunctionGenerator { @@ -288,16 +325,11 @@ class MOZ_STACK_CLASS FunctionGenerator bool usesSimd_; bool usesAtomics_; - // Data created during function generation, then handed over to the - // FuncBytes in ModuleGenerator::finishFunc(). - UniqueBytes bytes_; - Uint32Vector callSiteLineNums_; - - uint32_t lineOrBytecode_; + UniqueFuncBytes funcBytes_; public: FunctionGenerator() - : m_(nullptr), usesSimd_(false), usesAtomics_(false), bytes_(nullptr), lineOrBytecode_(0) + : m_(nullptr), usesSimd_(false), usesAtomics_(false), funcBytes_(nullptr) {} bool usesSimd() const { @@ -315,10 +347,10 @@ class MOZ_STACK_CLASS FunctionGenerator } Bytes& bytes() { - return *bytes_; + return funcBytes_->bytes(); } MOZ_MUST_USE bool addCallSiteLineNum(uint32_t lineno) { - return callSiteLineNums_.append(lineno); + return funcBytes_->addCallSiteLineNum(lineno); } }; diff --git a/js/src/wasm/WasmIonCompile.cpp b/js/src/wasm/WasmIonCompile.cpp index db0f99cc3a27..b1ffb0c9e52a 100644 --- a/js/src/wasm/WasmIonCompile.cpp +++ b/js/src/wasm/WasmIonCompile.cpp @@ -168,8 +168,6 @@ class FunctionCompiler uint32_t blockDepth_; ControlFlowPatchsVector blockPatches_; - FuncCompileResults& compileResults_; - // TLS pointer argument to the current function. MWasmParameter* tlsPointer_; @@ -178,8 +176,7 @@ class FunctionCompiler Decoder& decoder, const FuncBytes& func, const ValTypeVector& locals, - MIRGenerator& mirGen, - FuncCompileResults& compileResults) + MIRGenerator& mirGen) : env_(env), iter_(decoder, func.lineOrBytecode()), func_(func), @@ -194,14 +191,12 @@ class FunctionCompiler maxStackArgBytes_(0), loopDepth_(0), blockDepth_(0), - compileResults_(compileResults), tlsPointer_(nullptr) {} const ModuleEnvironment& env() const { return env_; } IonOpIter& iter() { return iter_; } TempAllocator& alloc() const { return alloc_; } - MacroAssembler& masm() const { return compileResults_.masm(); } const Sig& sig() const { return func_.sig(); } TrapOffset trapOffset() const { @@ -343,6 +338,24 @@ class FunctionCompiler return constant; } + MDefinition* constant(float f) + { + if (inDeadCode()) + return nullptr; + MConstant* constant = MConstant::NewRawFloat32(alloc(), f); + curBlock_->add(constant); + return constant; + } + + MDefinition* constant(double d) + { + if (inDeadCode()) + return nullptr; + MConstant* constant = MConstant::NewRawDouble(alloc(), d); + curBlock_->add(constant); + return constant; + } + MDefinition* constant(int64_t i) { if (inDeadCode()) @@ -352,24 +365,6 @@ class FunctionCompiler return constant; } - MDefinition* constant(RawF32 f) - { - if (inDeadCode()) - return nullptr; - MConstant* constant = MConstant::New(alloc(), f); - curBlock_->add(constant); - return constant; - } - - MDefinition* constant(RawF64 d) - { - if (inDeadCode()) - return nullptr; - MConstant* constant = MConstant::New(alloc(), d); - curBlock_->add(constant); - return constant; - } - template MDefinition* unary(MDefinition* op) { @@ -3334,7 +3329,7 @@ EmitExpr(FunctionCompiler& f) // F32 case Op::F32Const: { - RawF32 f32; + float f32; if (!f.iter().readF32Const(&f32)) return false; @@ -3392,7 +3387,7 @@ EmitExpr(FunctionCompiler& f) // F64 case Op::F64Const: { - RawF64 f64; + double f64; if (!f.iter().readF64Const(&f64)) return false; @@ -3697,12 +3692,12 @@ EmitExpr(FunctionCompiler& f) } bool -wasm::IonCompileFunction(CompileTask* task) +wasm::IonCompileFunction(CompileTask* task, FuncCompileUnit* unit) { - MOZ_ASSERT(task->mode() == CompileTask::CompileMode::Ion); + MOZ_ASSERT(unit->mode() == CompileMode::Ion); - const FuncBytes& func = task->func(); - FuncCompileResults& results = task->results(); + const FuncBytes& func = unit->func(); + const ModuleEnvironment& env = task->env(); Decoder d(func.bytes()); @@ -3711,18 +3706,18 @@ wasm::IonCompileFunction(CompileTask* task) ValTypeVector locals; if (!locals.appendAll(func.sig().args())) return false; - if (!DecodeLocalEntries(d, task->env().kind, &locals)) + if (!DecodeLocalEntries(d, env.kind, &locals)) return false; // Set up for Ion compilation. - JitContext jitContext(&results.alloc()); + JitContext jitContext(&task->alloc()); const JitCompileOptions options; - MIRGraph graph(&results.alloc()); + MIRGraph graph(&task->alloc()); CompileInfo compileInfo(locals.length()); - MIRGenerator mir(nullptr, options, &results.alloc(), &graph, &compileInfo, + MIRGenerator mir(nullptr, options, &task->alloc(), &graph, &compileInfo, IonOptimizations.get(OptimizationLevel::Wasm)); - mir.initMinWasmHeapLength(task->env().minMemoryLength); + mir.initMinWasmHeapLength(env.minMemoryLength); // Capture the prologue's trap site before decoding the function. @@ -3730,7 +3725,7 @@ wasm::IonCompileFunction(CompileTask* task) // Build MIR graph { - FunctionCompiler f(task->env(), d, func, locals, mir, results); + FunctionCompiler f(env, d, func, locals, mir); if (!f.init()) return false; @@ -3770,11 +3765,15 @@ wasm::IonCompileFunction(CompileTask* task) if (!lir) return false; - SigIdDesc sigId = task->env().funcSigs[func.index()]->id; + SigIdDesc sigId = env.funcSigs[func.index()]->id; - CodeGenerator codegen(&mir, lir, &results.masm()); - if (!codegen.generateWasm(sigId, prologueTrapOffset, &results.offsets())) + CodeGenerator codegen(&mir, lir, &task->masm()); + + FuncOffsets offsets; + if (!codegen.generateWasm(sigId, prologueTrapOffset, &offsets)) return false; + + unit->finish(offsets); } return true; diff --git a/js/src/wasm/WasmIonCompile.h b/js/src/wasm/WasmIonCompile.h index e8636a90f90f..a228dbde871d 100644 --- a/js/src/wasm/WasmIonCompile.h +++ b/js/src/wasm/WasmIonCompile.h @@ -25,10 +25,11 @@ namespace js { namespace wasm { class CompileTask; +class FuncCompileUnit; // Generates very fast code at the expense of compilation time. MOZ_MUST_USE bool -IonCompileFunction(CompileTask* task); +IonCompileFunction(CompileTask* task, FuncCompileUnit* unit); } // namespace wasm } // namespace js diff --git a/js/src/wasm/WasmJS.cpp b/js/src/wasm/WasmJS.cpp index a19451a39099..63aaac59f777 100644 --- a/js/src/wasm/WasmJS.cpp +++ b/js/src/wasm/WasmJS.cpp @@ -41,6 +41,8 @@ using namespace js; using namespace js::jit; using namespace js::wasm; + +using mozilla::BitwiseCast; using mozilla::CheckedInt; using mozilla::IsNaN; using mozilla::IsSame; @@ -304,7 +306,9 @@ GetImports(JSContext* cx, uint32_t bits; if (!ReadCustomFloat32NaNObject(cx, v, &bits)) return false; - val = Val(RawF32::fromBits(bits)); + float f; + BitwiseCast(bits, &f); + val = Val(f); break; } if (!v.isNumber()) @@ -312,7 +316,7 @@ GetImports(JSContext* cx, double d; if (!ToNumber(cx, v, &d)) return false; - val = Val(RawF32(float(d))); + val = Val(float(d)); break; } case ValType::F64: { @@ -320,7 +324,9 @@ GetImports(JSContext* cx, uint64_t bits; if (!ReadCustomDoubleNaNObject(cx, v, &bits)) return false; - val = Val(RawF64::fromBits(bits)); + double d; + BitwiseCast(bits, &d); + val = Val(d); break; } if (!v.isNumber()) @@ -328,7 +334,7 @@ GetImports(JSContext* cx, double d; if (!ToNumber(cx, v, &d)) return false; - val = Val(RawF64(d)); + val = Val(d); break; } default: { diff --git a/js/src/wasm/WasmModule.cpp b/js/src/wasm/WasmModule.cpp index f7d33debb1f4..5a530860f79d 100644 --- a/js/src/wasm/WasmModule.cpp +++ b/js/src/wasm/WasmModule.cpp @@ -141,7 +141,7 @@ LinkData::sizeOfExcludingThis(MallocSizeOf mallocSizeOf) const Module::serializedSize(size_t* maybeBytecodeSize, size_t* maybeCompiledSize) const { if (maybeBytecodeSize) - *maybeBytecodeSize = SerializedPodVectorSize(bytecode_->bytes); + *maybeBytecodeSize = bytecode_->bytes.length(); if (maybeCompiledSize) { *maybeCompiledSize = assumptions_.serializedSize() + @@ -164,9 +164,13 @@ Module::serialize(uint8_t* maybeBytecodeBegin, size_t maybeBytecodeSize, if (maybeBytecodeBegin) { // Bytecode deserialization is not guarded by Assumptions and thus must not - // change incompatibly between builds. + // change incompatibly between builds. Thus, for simplicity, the format + // of the bytecode file is simply a .wasm file (thus, backwards + // compatibility is ensured by backwards compatibility of the wasm + // binary format). - uint8_t* bytecodeEnd = SerializePodVector(maybeBytecodeBegin, bytecode_->bytes); + const Bytes& bytes = bytecode_->bytes; + uint8_t* bytecodeEnd = WriteBytes(maybeBytecodeBegin, bytes.begin(), bytes.length()); MOZ_RELEASE_ASSERT(bytecodeEnd == maybeBytecodeBegin + maybeBytecodeSize); } @@ -204,14 +208,10 @@ Module::deserialize(const uint8_t* bytecodeBegin, size_t bytecodeSize, Metadata* maybeMetadata) { MutableBytes bytecode = js_new(); - if (!bytecode) + if (!bytecode || !bytecode->bytes.initLengthUninitialized(bytecodeSize)) return nullptr; - const uint8_t* bytecodeEnd = DeserializePodVector(bytecodeBegin, &bytecode->bytes); - if (!bytecodeEnd) - return nullptr; - - MOZ_RELEASE_ASSERT(bytecodeEnd == bytecodeBegin + bytecodeSize); + memcpy(bytecode->bytes.begin(), bytecodeBegin, bytecodeSize); Assumptions assumptions; const uint8_t* cursor = assumptions.deserialize(compiledBegin, compiledSize); @@ -344,15 +344,15 @@ wasm::DeserializeModule(PRFileDesc* bytecodeFile, PRFileDesc* maybeCompiledFile, compiledMapping.get(), compiledInfo.size); } + // Since the compiled file's assumptions don't match, we must recompile from + // bytecode. The bytecode file format is simply that of a .wasm (see + // Module::serialize). + MutableBytes bytecode = js_new(); - if (!bytecode) + if (!bytecode || !bytecode->bytes.initLengthUninitialized(bytecodeInfo.size)) return nullptr; - const uint8_t* bytecodeEnd = DeserializePodVector(bytecodeMapping.get(), &bytecode->bytes); - if (!bytecodeEnd) - return nullptr; - - MOZ_RELEASE_ASSERT(bytecodeEnd == bytecodeMapping.get() + bytecodeInfo.size); + memcpy(bytecode->bytes.begin(), bytecodeMapping.get(), bytecodeInfo.size); ScriptedCaller scriptedCaller; scriptedCaller.filename = Move(filename); @@ -766,10 +766,9 @@ GetGlobalExport(JSContext* cx, const GlobalDescVector& globals, uint32_t globalI return true; } case ValType::F32: { - float f = val.f32().fp(); + float f = val.f32(); if (JitOptions.wasmTestMode && IsNaN(f)) { - uint32_t bits = val.f32().bits(); - RootedObject obj(cx, CreateCustomNaNObject(cx, (float*)&bits)); + RootedObject obj(cx, CreateCustomNaNObject(cx, &f)); if (!obj) return false; jsval.set(ObjectValue(*obj)); @@ -779,10 +778,9 @@ GetGlobalExport(JSContext* cx, const GlobalDescVector& globals, uint32_t globalI return true; } case ValType::F64: { - double d = val.f64().fp(); + double d = val.f64(); if (JitOptions.wasmTestMode && IsNaN(d)) { - uint64_t bits = val.f64().bits(); - RootedObject obj(cx, CreateCustomNaNObject(cx, (double*)&bits)); + RootedObject obj(cx, CreateCustomNaNObject(cx, &d)); if (!obj) return false; jsval.set(ObjectValue(*obj)); diff --git a/js/src/wasm/WasmSerialize.h b/js/src/wasm/WasmSerialize.h index 71c67d5abc1b..79d759b27cb5 100644 --- a/js/src/wasm/WasmSerialize.h +++ b/js/src/wasm/WasmSerialize.h @@ -137,7 +137,7 @@ static inline uint8_t* SerializePodVector(uint8_t* cursor, const mozilla::Vector& vec) { // This binary format must not change without taking into consideration the - // constraints in Assumptions::serialize and Module::serialize. + // constraints in Assumptions::serialize. cursor = WriteScalar(cursor, vec.length()); cursor = WriteBytes(cursor, vec.begin(), vec.length() * sizeof(T)); diff --git a/js/src/wasm/WasmTextToBinary.cpp b/js/src/wasm/WasmTextToBinary.cpp index 3035cb08c061..d081b2469ae3 100644 --- a/js/src/wasm/WasmTextToBinary.cpp +++ b/js/src/wasm/WasmTextToBinary.cpp @@ -1780,7 +1780,10 @@ ParseNaNLiteral(WasmParseContext& c, WasmToken token, const char16_t* cur, bool } value = (isNegated ? Traits::kSignBit : 0) | Traits::kExponentBits | value; - return new (c.lifo) AstConst(Val(Raw::fromBits(value))); + + Float flt; + BitwiseCast(value, &flt); + return new (c.lifo) AstConst(Val(flt)); error: c.ts.generateError(token, c.error); @@ -1932,7 +1935,7 @@ ParseFloatLiteral(WasmParseContext& c, WasmToken token) } if (token.kind() != WasmToken::Float) - return new (c.lifo) AstConst(Val(Raw(result))); + return new (c.lifo) AstConst(Val(Float(result))); const char16_t* begin = token.begin(); const char16_t* end = token.end(); @@ -1983,7 +1986,7 @@ ParseFloatLiteral(WasmParseContext& c, WasmToken token) if (isNegated) result = -result; - return new (c.lifo) AstConst(Val(Raw(result))); + return new (c.lifo) AstConst(Val(Float(result))); } static AstConst* diff --git a/js/src/wasm/WasmTextUtils.cpp b/js/src/wasm/WasmTextUtils.cpp index 818f63e6d98f..757eb5d96e9a 100644 --- a/js/src/wasm/WasmTextUtils.cpp +++ b/js/src/wasm/WasmTextUtils.cpp @@ -54,18 +54,20 @@ template bool wasm::RenderInBase<10>(StringBuffer& sb, uint64_t num); template bool -wasm::RenderNaN(StringBuffer& sb, Raw num) +wasm::RenderNaN(StringBuffer& sb, T num) { typedef typename mozilla::SelectTrait Traits; + typedef typename Traits::Bits Bits; - MOZ_ASSERT(IsNaN(num.fp())); + MOZ_ASSERT(IsNaN(num)); - if ((num.bits() & Traits::kSignBit) && !sb.append("-")) + Bits bits = mozilla::BitwiseCast(num); + if ((bits & Traits::kSignBit) && !sb.append("-")) return false; if (!sb.append("nan")) return false; - typename Traits::Bits payload = num.bits() & Traits::kSignificandBits; + Bits payload = bits & Traits::kSignificandBits; // Only render the payload if it's not the spec's default NaN. if (payload == ((Traits::kSignificandBits + 1) >> 1)) return true; @@ -74,5 +76,5 @@ wasm::RenderNaN(StringBuffer& sb, Raw num) RenderInBase<16>(sb, payload); } -template MOZ_MUST_USE bool wasm::RenderNaN(StringBuffer& b, Raw num); -template MOZ_MUST_USE bool wasm::RenderNaN(StringBuffer& b, Raw num); +template MOZ_MUST_USE bool wasm::RenderNaN(StringBuffer& b, float num); +template MOZ_MUST_USE bool wasm::RenderNaN(StringBuffer& b, double num); diff --git a/js/src/wasm/WasmTextUtils.h b/js/src/wasm/WasmTextUtils.h index 1bc1eecfdff6..876abd39777e 100644 --- a/js/src/wasm/WasmTextUtils.h +++ b/js/src/wasm/WasmTextUtils.h @@ -30,12 +30,9 @@ template MOZ_MUST_USE bool RenderInBase(StringBuffer& sb, uint64_t num); -template -class Raw; - template MOZ_MUST_USE bool -RenderNaN(StringBuffer& sb, Raw num); +RenderNaN(StringBuffer& sb, T num); // Helper class, StringBuffer wrapper, to track the position (line and column) // within the generated source. diff --git a/js/src/wasm/WasmTypes.h b/js/src/wasm/WasmTypes.h index 8954439f8bd0..babc80617ca0 100644 --- a/js/src/wasm/WasmTypes.h +++ b/js/src/wasm/WasmTypes.h @@ -337,41 +337,6 @@ ToCString(ValType type) return ToCString(ToExprType(type)); } -// Because WebAssembly allows one to define the payload of a NaN value, -// including the signal/quiet bit (highest order bit of payload), another -// represenation of floating-point values is required: on some platforms (x86 -// without SSE2), passing a floating-point argument to a function call may use -// the x87 stack, which has the side-effect of clearing the signal/quiet bit. -// Because the signal/quiet bit must be preserved (by spec), we use the raw -// punned integer representation of floating points instead, in function calls. -// -// When we leave the WebAssembly sandbox back to JS, NaNs are canonicalized, so -// this isn't observable from JS. - -template -class Raw -{ - typedef typename mozilla::FloatingPoint::Bits Bits; - Bits value_; - - public: - Raw() : value_(0) {} - - explicit Raw(T value) - : value_(mozilla::BitwiseCast(value)) - {} - - template MOZ_IMPLICIT Raw(U) = delete; - - static Raw fromBits(Bits bits) { Raw r; r.value_ = bits; return r; } - - Bits bits() const { return value_; } - T fp() const { return mozilla::BitwiseCast(value_); } -}; - -using RawF64 = Raw; -using RawF32 = Raw; - // The Val class represents a single WebAssembly value of a given value type, // mostly for the purpose of numeric literals and initializers. A Val does not // directly map to a JS value since there is not (currently) a precise @@ -385,8 +350,8 @@ class Val union U { uint32_t i32_; uint64_t i64_; - RawF32 f32_; - RawF64 f64_; + float f32_; + double f64_; I8x16 i8x16_; I16x8 i16x8_; I32x4 i32x4_; @@ -400,10 +365,8 @@ class Val explicit Val(uint32_t i32) : type_(ValType::I32) { u.i32_ = i32; } explicit Val(uint64_t i64) : type_(ValType::I64) { u.i64_ = i64; } - explicit Val(RawF32 f32) : type_(ValType::F32) { u.f32_ = f32; } - explicit Val(RawF64 f64) : type_(ValType::F64) { u.f64_ = f64; } - MOZ_IMPLICIT Val(float) = delete; - MOZ_IMPLICIT Val(double) = delete; + explicit Val(float f32) : type_(ValType::F32) { u.f32_ = f32; } + explicit Val(double f64) : type_(ValType::F64) { u.f64_ = f64; } explicit Val(const I8x16& i8x16, ValType type = ValType::I8x16) : type_(type) { MOZ_ASSERT(type_ == ValType::I8x16 || type_ == ValType::B8x16); @@ -426,8 +389,8 @@ class Val uint32_t i32() const { MOZ_ASSERT(type_ == ValType::I32); return u.i32_; } uint64_t i64() const { MOZ_ASSERT(type_ == ValType::I64); return u.i64_; } - RawF32 f32() const { MOZ_ASSERT(type_ == ValType::F32); return u.f32_; } - RawF64 f64() const { MOZ_ASSERT(type_ == ValType::F64); return u.f64_; } + const float& f32() const { MOZ_ASSERT(type_ == ValType::F32); return u.f32_; } + const double& f64() const { MOZ_ASSERT(type_ == ValType::F64); return u.f64_; } const I8x16& i8x16() const { MOZ_ASSERT(type_ == ValType::I8x16 || type_ == ValType::B8x16); diff --git a/js/src/wasm/WasmValidate.cpp b/js/src/wasm/WasmValidate.cpp index 3e51e266272e..4c17c9d9a30e 100644 --- a/js/src/wasm/WasmValidate.cpp +++ b/js/src/wasm/WasmValidate.cpp @@ -1139,14 +1139,14 @@ DecodeInitializerExpression(Decoder& d, const GlobalDescVector& globals, ValType break; } case uint16_t(Op::F32Const): { - RawF32 f32; + float f32; if (!d.readFixedF32(&f32)) return d.fail("failed to read initializer f32 expression"); *init = InitExpr(Val(f32)); break; } case uint16_t(Op::F64Const): { - RawF64 f64; + double f64; if (!d.readFixedF64(&f64)) return d.fail("failed to read initializer f64 expression"); *init = InitExpr(Val(f64)); diff --git a/js/src/wasm/WasmValidate.h b/js/src/wasm/WasmValidate.h index 4ddeba5a242c..bf756e85e715 100644 --- a/js/src/wasm/WasmValidate.h +++ b/js/src/wasm/WasmValidate.h @@ -198,11 +198,11 @@ class Encoder MOZ_MUST_USE bool writeFixedU32(uint32_t i) { return write(i); } - MOZ_MUST_USE bool writeFixedF32(RawF32 f) { - return write(f.bits()); + MOZ_MUST_USE bool writeFixedF32(float f) { + return write(f); } - MOZ_MUST_USE bool writeFixedF64(RawF64 d) { - return write(d.bits()); + MOZ_MUST_USE bool writeFixedF64(double d) { + return write(d); } MOZ_MUST_USE bool writeFixedI8x16(const I8x16& i8x16) { return write(i8x16); @@ -437,19 +437,11 @@ class Decoder MOZ_MUST_USE bool readFixedU32(uint32_t* u) { return read(u); } - MOZ_MUST_USE bool readFixedF32(RawF32* f) { - uint32_t u; - if (!read(&u)) - return false; - *f = RawF32::fromBits(u); - return true; + MOZ_MUST_USE bool readFixedF32(float* f) { + return read(f); } - MOZ_MUST_USE bool readFixedF64(RawF64* d) { - uint64_t u; - if (!read(&u)) - return false; - *d = RawF64::fromBits(u); - return true; + MOZ_MUST_USE bool readFixedF64(double* d) { + return read(d); } MOZ_MUST_USE bool readFixedI8x16(I8x16* i8x16) { return read(i8x16); @@ -556,11 +548,11 @@ class Decoder uint32_t uncheckedReadFixedU32() { return uncheckedRead(); } - RawF32 uncheckedReadFixedF32() { - return RawF32::fromBits(uncheckedRead()); + void uncheckedReadFixedF32(float* out) { + uncheckedRead(out); } - RawF64 uncheckedReadFixedF64() { - return RawF64::fromBits(uncheckedRead()); + void uncheckedReadFixedF64(double* out) { + uncheckedRead(out); } template UInt uncheckedReadVarU() { diff --git a/layout/base/RestyleManager.cpp b/layout/base/RestyleManager.cpp index cf913d7e5fca..a02ffd510f36 100644 --- a/layout/base/RestyleManager.cpp +++ b/layout/base/RestyleManager.cpp @@ -14,6 +14,7 @@ #include "mozilla/EffectSet.h" #include "mozilla/EventStates.h" #include "mozilla/ViewportFrame.h" +#include "mozilla/css/StyleRule.h" // For nsCSSSelector #include "nsLayoutUtils.h" #include "AnimationCommon.h" // For GetLayerAnimationInfo #include "FrameLayerBuilder.h" diff --git a/layout/base/crashtests/crashtests.list b/layout/base/crashtests/crashtests.list index bac72fdcff75..5e250bd234a3 100644 --- a/layout/base/crashtests/crashtests.list +++ b/layout/base/crashtests/crashtests.list @@ -103,7 +103,7 @@ asserts-if(stylo,3) load 343293-2.xhtml # bug 1324663 load 343540-1.html load 344057-1.xhtml load 344064-1.html -asserts-if(stylo,9) load 344300-1.html # bug 1324673 +asserts-if(stylo,1-9) load 344300-1.html # bug 1324673 load 344300-2.html load 344340-1.xul load 347898-1.html @@ -137,7 +137,7 @@ load 367243-1.html load 367498-1.html load 367498-2.html load 369176-1.html -asserts-if(stylo,8-22) load 369547-1.html # bug 1324663 +asserts-if(stylo,0-22) load 369547-1.html # bug 1324663 load 369547-2.html load 369945-1.xhtml load 371681-1.xhtml @@ -460,7 +460,7 @@ asserts-if(stylo,2) load 942690.html # bug 1324705 load 973390-1.html load 1001237.html load 1009036.html -load 1043163-1.html +asserts-if(stylo,1) load 1043163-1.html # bug 1324647 load 1061028.html asserts-if(stylo,3-4) load 1107508-1.html # bug 1324669 load 1116104.html diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index beaaaab485a0..8fa008f723b5 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -1539,7 +1539,6 @@ nsCSSFrameConstructor::nsCSSFrameConstructor(nsIDocument* aDocument, , mRootElementFrame(nullptr) , mRootElementStyleFrame(nullptr) , mDocElementContainingBlock(nullptr) - , mGfxScrollFrame(nullptr) , mPageSequenceFrame(nullptr) , mCurrentDepth(0) #ifdef DEBUG @@ -2792,7 +2791,7 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement) the root element. mDocElementContainingBlock is the parent of mRootElementFrame (i.e. nsCanvasFrame or nsRootBoxFrame) - mGfxScrollFrame is the nsHTMLScrollFrame mentioned above, or null if there isn't one + mPageSequenceFrame is the nsSimplePageSequenceFrame, or null if there isn't one */ @@ -2911,7 +2910,6 @@ nsCSSFrameConstructor::SetUpDocElementContainingBlock(nsIContent* aDocElement) true, newFrame); parentFrame = newFrame; - mGfxScrollFrame = newFrame; } rootFrame->SetStyleContextWithoutNotification(rootPseudoStyle); @@ -8558,7 +8556,6 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer, mRootElementStyleFrame = nullptr; mDocElementContainingBlock = nullptr; mPageSequenceFrame = nullptr; - mGfxScrollFrame = nullptr; mHasRootAbsPosContainingBlock = false; } diff --git a/layout/base/nsCSSFrameConstructor.h b/layout/base/nsCSSFrameConstructor.h index 7d1b8d42fffe..b788a9f44659 100644 --- a/layout/base/nsCSSFrameConstructor.h +++ b/layout/base/nsCSSFrameConstructor.h @@ -2114,7 +2114,6 @@ private: // This is the containing block that contains the root element --- // the real "initial containing block" according to CSS 2.1. nsContainerFrame* mDocElementContainingBlock; - nsIFrame* mGfxScrollFrame; nsIFrame* mPageSequenceFrame; nsQuoteList mQuoteList; nsCounterManager mCounterManager; diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 2d30701b9446..caea3f253b40 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -6851,7 +6851,7 @@ nsLayoutUtils::GetFrameTransparency(nsIFrame* aBackgroundFrame, return eTransparencyTransparent; } const nsStyleBackground* bg = bgSC->StyleBackground(); - if (NS_GET_A(bg->mBackgroundColor) < 255 || + if (NS_GET_A(bg->BackgroundColor(bgSC)) < 255 || // bottom layer's clip is used for the color bg->BottomLayer().mClip != StyleGeometryBox::Border) return eTransparencyTransparent; @@ -8798,8 +8798,9 @@ nsLayoutUtils::ComputeScrollMetadata(nsIFrame* aForFrame, } else { nsStyleContext* backgroundStyle; if (nsCSSRendering::FindBackground(aScrollFrame, &backgroundStyle)) { - metadata.SetBackgroundColor(Color::FromABGR( - backgroundStyle->StyleBackground()->mBackgroundColor)); + nscolor backgroundColor = backgroundStyle-> + StyleBackground()->BackgroundColor(backgroundStyle); + metadata.SetBackgroundColor(Color::FromABGR(backgroundColor)); } } } @@ -9332,4 +9333,4 @@ nsLayoutUtils::ComputeGeometryBox(nsIFrame* aFrame, : ComputeHTMLReferenceRect(aFrame, aGeometryBox); return r; -} \ No newline at end of file +} diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index 673cf565dbbe..8ae67b2a9f37 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -89,21 +89,18 @@ nsFieldSetFrame::GetLegend() const return mFrames.FirstChild(); } -class nsDisplayFieldSetBorderBackground : public nsDisplayItem { +class nsDisplayFieldSetBorder : public nsDisplayItem { public: - nsDisplayFieldSetBorderBackground(nsDisplayListBuilder* aBuilder, - nsFieldSetFrame* aFrame) + nsDisplayFieldSetBorder(nsDisplayListBuilder* aBuilder, + nsFieldSetFrame* aFrame) : nsDisplayItem(aBuilder, aFrame) { - MOZ_COUNT_CTOR(nsDisplayFieldSetBorderBackground); + MOZ_COUNT_CTOR(nsDisplayFieldSetBorder); } #ifdef NS_BUILD_REFCNT_LOGGING - virtual ~nsDisplayFieldSetBorderBackground() { - MOZ_COUNT_DTOR(nsDisplayFieldSetBorderBackground); + virtual ~nsDisplayFieldSetBorder() { + MOZ_COUNT_DTOR(nsDisplayFieldSetBorder); } #endif - virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, - HitTestState* aState, - nsTArray *aOutFrames) override; virtual void Paint(nsDisplayListBuilder* aBuilder, nsRenderingContext* aCtx) override; virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override; @@ -111,21 +108,12 @@ public: const nsDisplayItemGeometry* aGeometry, nsRegion *aInvalidRegion) override; virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) override; - NS_DISPLAY_DECL_NAME("FieldSetBorderBackground", TYPE_FIELDSET_BORDER_BACKGROUND) + NS_DISPLAY_DECL_NAME("FieldSetBorder", TYPE_FIELDSET_BORDER_BACKGROUND) }; -void nsDisplayFieldSetBorderBackground::HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, - HitTestState* aState, nsTArray *aOutFrames) -{ - // aPt is guaranteed to be in this item's bounds. We do the hit test based on the - // frame bounds even though our background doesn't cover the whole frame. - // It's not clear whether this is correct. - aOutFrames->AppendElement(mFrame); -} - void -nsDisplayFieldSetBorderBackground::Paint(nsDisplayListBuilder* aBuilder, - nsRenderingContext* aCtx) +nsDisplayFieldSetBorder::Paint(nsDisplayListBuilder* aBuilder, + nsRenderingContext* aCtx) { DrawResult result = static_cast(mFrame)-> PaintBorder(aBuilder, *aCtx, ToReferenceFrame(), mVisibleRect); @@ -134,15 +122,15 @@ nsDisplayFieldSetBorderBackground::Paint(nsDisplayListBuilder* aBuilder, } nsDisplayItemGeometry* -nsDisplayFieldSetBorderBackground::AllocateGeometry(nsDisplayListBuilder* aBuilder) +nsDisplayFieldSetBorder::AllocateGeometry(nsDisplayListBuilder* aBuilder) { return new nsDisplayItemGenericImageGeometry(this, aBuilder); } void -nsDisplayFieldSetBorderBackground::ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder, - const nsDisplayItemGeometry* aGeometry, - nsRegion *aInvalidRegion) +nsDisplayFieldSetBorder::ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder, + const nsDisplayItemGeometry* aGeometry, + nsRegion *aInvalidRegion) { auto geometry = static_cast(aGeometry); @@ -157,8 +145,8 @@ nsDisplayFieldSetBorderBackground::ComputeInvalidationRegion(nsDisplayListBuilde } nsRect -nsDisplayFieldSetBorderBackground::GetBounds(nsDisplayListBuilder* aBuilder, - bool* aSnap) +nsDisplayFieldSetBorder::GetBounds(nsDisplayListBuilder* aBuilder, + bool* aSnap) { // Just go ahead and claim our frame's overflow rect as the bounds, because we // may have border-image-outset or other features that cause borders to extend @@ -190,7 +178,7 @@ nsFieldSetFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, /* aAllowWillPaintBorderOptimization = */ false); aLists.BorderBackground()->AppendNewToTop(new (aBuilder) - nsDisplayFieldSetBorderBackground(aBuilder, this)); + nsDisplayFieldSetBorder(aBuilder, this)); DisplayOutlineUnconditional(aBuilder, aLists); diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 328c9ff77dd7..b50f97ea0a64 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -1453,7 +1453,7 @@ nsListControlFrame::AboutToDropDown() mLastDropdownBackstopColor = NS_RGBA(0,0,0,0); while (NS_GET_A(mLastDropdownBackstopColor) < 255 && context) { mLastDropdownBackstopColor = - NS_ComposeColors(context->StyleBackground()->mBackgroundColor, + NS_ComposeColors(context->StyleBackground()->BackgroundColor(context), mLastDropdownBackstopColor); context = context->GetParent(); } diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index dce09d285638..88869c794653 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -82,7 +82,7 @@ load 369150-1.html load 369150-2.html load 369227-1.xhtml load 369542-1.html -asserts-if(stylo,2) load 369542-2.html # bug 1324646 +load 369542-2.html load 369547-1.html load 370174-1.html load 370174-2.html @@ -360,7 +360,7 @@ load 494300-1.xul load 494332-1.html load 495875-1.html load 495875-2.html -asserts-if(stylo,4-12) load 496742.html # bug 1324633 +asserts-if(stylo,4-14) load 496742.html # bug 1324633 load 499138.html load 499857-1.html load 499862-1.html @@ -614,7 +614,7 @@ load details-display-none-summary-3.html load details-open-overflow-auto.html load details-open-overflow-hidden.html load details-three-columns.html -asserts-if(stylo,10) load first-letter-638937-1.html # bug 1324663 +load first-letter-638937-1.html load first-letter-638937-2.html load flex-nested-abspos-1.html pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) asserts(0-100) load font-inflation-762332.html # bug 762332 diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 78809fe8b65f..8c8486bf5aac 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -838,9 +838,14 @@ nsBlockFrame::GetPrefISize(nsRenderingContext *aRenderingContext) AutoNoisyIndenter lineindent(gNoisyIntrinsic); #endif if (line->IsBlock()) { + StyleClear breakType; if (!data.mLineIsEmpty || BlockCanIntersectFloats(line->mFirstChild)) { - data.ForceBreak(); + breakType = StyleClear::Both; + } else { + breakType = line->mFirstChild-> + StyleDisplay()->PhysicalBreakType(data.mLineContainerWM); } + data.ForceBreak(breakType); data.mCurrentLine = nsLayoutUtils::IntrinsicForContainer(aRenderingContext, line->mFirstChild, nsLayoutUtils::PREF_ISIZE); data.ForceBreak(); @@ -3893,7 +3898,7 @@ nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState, #endif WritingMode outerWM = aState.mReflowInput.GetWritingMode(); - WritingMode lineWM = GetWritingMode(aLine->mFirstChild); + WritingMode lineWM = WritingModeForLine(outerWM, aLine->mFirstChild); LogicalRect lineRect = aFloatAvailableSpace.mRect.ConvertTo(lineWM, outerWM, aState.ContainerSize()); diff --git a/layout/generic/nsFirstLetterFrame.cpp b/layout/generic/nsFirstLetterFrame.cpp index 623e67fcc238..7019bf495535 100644 --- a/layout/generic/nsFirstLetterFrame.cpp +++ b/layout/generic/nsFirstLetterFrame.cpp @@ -195,7 +195,7 @@ nsFirstLetterFrame::Reflow(nsPresContext* aPresContext, // When there is no lineLayout provided, we provide our own. The // only time that the first-letter-frame is not reflowing in a // line context is when its floating. - WritingMode kidWritingMode = GetWritingMode(kid); + WritingMode kidWritingMode = WritingModeForLine(wm, kid); LogicalSize kidAvailSize = availSize.ConvertTo(kidWritingMode, wm); ReflowInput rs(aPresContext, aReflowInput, kid, kidAvailSize); nsLineLayout ll(aPresContext, nullptr, &aReflowInput, nullptr, nullptr); diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index f78511d66aff..008e788b0a57 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -1116,9 +1116,11 @@ nsIFrame::GetPaddingRect() const } WritingMode -nsIFrame::GetWritingMode(nsIFrame* aSubFrame) const +nsIFrame::WritingModeForLine(WritingMode aSelfWM, + nsIFrame* aSubFrame) const { - WritingMode writingMode = GetWritingMode(); + MOZ_ASSERT(aSelfWM == GetWritingMode()); + WritingMode writingMode = aSelfWM; if (StyleTextReset()->mUnicodeBidi & NS_STYLE_UNICODE_BIDI_PLAINTEXT) { nsBidiLevel frameLevel = nsBidiPresUtils::GetFrameBaseLevel(aSubFrame); @@ -1894,7 +1896,7 @@ nsFrame::DisplayBackgroundUnconditional(nsDisplayListBuilder* aBuilder, // receive a propagated background should just set aForceBackground to // true. if (aBuilder->IsForEventDelivery() || aForceBackground || - !StyleBackground()->IsTransparent() || StyleDisplay()->mAppearance) { + !StyleBackground()->IsTransparent(this) || StyleDisplay()->mAppearance) { return nsDisplayBackgroundImage::AppendBackgroundItemsToTop( aBuilder, this, GetRectRelativeToSelf(), aLists.BorderBackground()); } @@ -4512,9 +4514,17 @@ nsIFrame::InlineMinISizeData::OptionallyBreak(nscoord aHyphenWidth) } void -nsIFrame::InlinePrefISizeData::ForceBreak() +nsIFrame::InlinePrefISizeData::ForceBreak(StyleClear aBreakType) { - if (mFloats.Length() != 0) { + MOZ_ASSERT(aBreakType == StyleClear::None || + aBreakType == StyleClear::Both || + aBreakType == StyleClear::Left || + aBreakType == StyleClear::Right, + "Must be a physical break type"); + + // If this force break is not clearing any float, we can leave all the + // floats to the next force break. + if (mFloats.Length() != 0 && aBreakType != StyleClear::None) { // preferred widths accumulated for floats that have already // been cleared past nscoord floats_done = 0, @@ -4522,11 +4532,12 @@ nsIFrame::InlinePrefISizeData::ForceBreak() // been cleared past floats_cur_left = 0, floats_cur_right = 0; + const WritingMode wm = mLineContainerWM; for (uint32_t i = 0, i_end = mFloats.Length(); i != i_end; ++i) { const FloatInfo& floatInfo = mFloats[i]; const nsStyleDisplay* floatDisp = floatInfo.Frame()->StyleDisplay(); - StyleClear breakType = floatDisp->PhysicalBreakType(mLineContainerWM); + StyleClear breakType = floatDisp->PhysicalBreakType(wm); if (breakType == StyleClear::Left || breakType == StyleClear::Right || breakType == StyleClear::Both) { @@ -4543,7 +4554,7 @@ nsIFrame::InlinePrefISizeData::ForceBreak() } } - StyleFloat floatStyle = floatDisp->PhysicalFloats(mLineContainerWM); + StyleFloat floatStyle = floatDisp->PhysicalFloats(wm); nscoord& floats_cur = floatStyle == StyleFloat::Left ? floats_cur_left : floats_cur_right; nscoord floatWidth = floatInfo.Width(); @@ -4560,7 +4571,44 @@ nsIFrame::InlinePrefISizeData::ForceBreak() mCurrentLine = NSCoordSaturatingAdd(mCurrentLine, floats_done); - mFloats.Clear(); + if (aBreakType == StyleClear::Both) { + mFloats.Clear(); + } else { + // If the break type does not clear all floats, it means there may + // be some floats whose isize should contribute to the intrinsic + // isize of the next line. The code here scans the current mFloats + // and keeps floats which are not cleared by this break. Note that + // floats may be cleared directly or indirectly. See below. + nsTArray newFloats; + MOZ_ASSERT(aBreakType == StyleClear::Left || + aBreakType == StyleClear::Right, + "Other values should have been handled in other branches"); + StyleFloat clearFloatType = + aBreakType == StyleClear::Left ? StyleFloat::Left : StyleFloat::Right; + // Iterate the array in reverse so that we can stop when there are + // no longer any floats we need to keep. See below. + for (FloatInfo& floatInfo : Reversed(mFloats)) { + const nsStyleDisplay* floatDisp = floatInfo.Frame()->StyleDisplay(); + if (floatDisp->PhysicalFloats(wm) != clearFloatType) { + newFloats.AppendElement(floatInfo); + } else { + // This is a float on the side that this break directly clears + // which means we're not keeping it in mFloats. However, if + // this float clears floats on the opposite side (via a value + // of either 'both' or one of 'left'/'right'), any remaining + // (earlier) floats on that side would be indirectly cleared + // as well. Thus, we should break out of this loop and stop + // considering earlier floats to be kept in mFloats. + StyleClear floatBreakType = floatDisp->PhysicalBreakType(wm); + if (floatBreakType != aBreakType && + floatBreakType != StyleClear::None) { + break; + } + } + } + newFloats.Reverse(); + mFloats = Move(newFloats); + } } mCurrentLine = @@ -5390,7 +5438,7 @@ nsRect nsFrame::ComputeSimpleTightBounds(DrawTarget* aDrawTarget) const { if (StyleOutline()->mOutlineStyle != NS_STYLE_BORDER_STYLE_NONE || - StyleBorder()->HasBorder() || !StyleBackground()->IsTransparent() || + StyleBorder()->HasBorder() || !StyleBackground()->IsTransparent(this) || StyleDisplay()->mAppearance) { // Not necessarily tight, due to clipping, negative // outline-offset, and lots of other issues, but that's OK diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 383e684f42bc..9da1ce8c4d86 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -765,13 +765,16 @@ public: } /** - * Get the writing mode of this frame, but if it is styled with - * unicode-bidi: plaintext, reset the direction to the resolved paragraph + * Construct a writing mode for line layout in this frame. This is + * the writing mode of this frame, except that if this frame is styled with + * unicode-bidi:plaintext, we reset the direction to the resolved paragraph * level of the given subframe (typically the first frame on the line), - * not this frame's writing mode, because the container frame could be split - * by hard line breaks into multiple paragraphs with different base direction. + * because the container frame could be split by hard line breaks into + * multiple paragraphs with different base direction. + * @param aSelfWM the WM of 'this' */ - mozilla::WritingMode GetWritingMode(nsIFrame* aSubFrame) const; + mozilla::WritingMode WritingModeForLine(mozilla::WritingMode aSelfWM, + nsIFrame* aSubFrame) const; /** * Bounding rect of the frame. The values are in app units, and the origin is @@ -2020,11 +2023,29 @@ public: }; struct InlinePrefISizeData : public InlineIntrinsicISizeData { + typedef mozilla::StyleClear StyleClear; + InlinePrefISizeData() : mLineIsEmpty(true) {} - void ForceBreak(); + /** + * Finish the current line and start a new line. + * + * @param aBreakType controls whether isize of floats are considered + * and what floats are kept for the next line: + * * |None| skips handling floats, which means no floats are + * removed, and isizes of floats are not considered either. + * * |Both| takes floats into consideration when computing isize + * of the current line, and removes all floats after that. + * * |Left| and |Right| do the same as |Both| except that they only + * remove floats on the given side, and any floats on the other + * side that are prior to a float on the given side that has a + * 'clear' property that clears them. + * All other values of StyleClear must be converted to the four + * physical values above for this function. + */ + void ForceBreak(StyleClear aBreakType = StyleClear::Both); // The default implementation for nsIFrame::AddInlinePrefISize. void DefaultAddInlinePrefISize(nscoord aISize); diff --git a/layout/mathml/nsMathMLChar.cpp b/layout/mathml/nsMathMLChar.cpp index e73dba0627b6..32e6b4311cad 100644 --- a/layout/mathml/nsMathMLChar.cpp +++ b/layout/mathml/nsMathMLChar.cpp @@ -1986,9 +1986,9 @@ nsMathMLChar::Display(nsDisplayListBuilder* aBuilder, nsDisplayMathMLSelectionRect(aBuilder, aForFrame, *aSelectedRect)); } else if (mRect.width && mRect.height) { - const nsStyleBackground* backg = styleContext->StyleBackground(); if (styleContext != parentContext && - NS_GET_A(backg->mBackgroundColor) > 0) { + NS_GET_A(styleContext->StyleBackground()-> + BackgroundColor(styleContext)) > 0) { nsDisplayBackgroundImage::AppendBackgroundItemsToTop( aBuilder, aForFrame, mRect, aLists.BorderBackground(), /* aAllowWillPaintBorderOptimization */ true, styleContext); diff --git a/layout/painting/MaskLayerImageCache.cpp b/layout/painting/MaskLayerImageCache.cpp index e9039070cf51..b47fc3907875 100644 --- a/layout/painting/MaskLayerImageCache.cpp +++ b/layout/painting/MaskLayerImageCache.cpp @@ -4,7 +4,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "MaskLayerImageCache.h" + #include "ImageContainer.h" +#include "mozilla/layers/ShadowLayers.h" using namespace mozilla::layers; diff --git a/layout/painting/nsCSSRendering.cpp b/layout/painting/nsCSSRendering.cpp index fb1e04e9a3ec..824036ba677f 100644 --- a/layout/painting/nsCSSRendering.cpp +++ b/layout/painting/nsCSSRendering.cpp @@ -21,6 +21,7 @@ #include "nsStyleConsts.h" #include "nsPresContext.h" #include "nsIFrame.h" +#include "nsIFrameInlines.h" #include "nsPoint.h" #include "nsRect.h" #include "nsIPresShell.h" @@ -1192,8 +1193,9 @@ nsCSSRendering::FindNonTransparentBackgroundFrame(nsIFrame* aFrame, while (frame) { // No need to call GetVisitedDependentColor because it always uses // this alpha component anyway. - if (NS_GET_A(frame->StyleBackground()->mBackgroundColor) > 0) + if (NS_GET_A(frame->StyleBackground()->BackgroundColor(frame)) > 0) { break; + } if (frame->IsThemed()) break; @@ -1227,7 +1229,7 @@ nsCSSRendering::FindBackgroundStyleFrame(nsIFrame* aForFrame) const nsStyleBackground* result = aForFrame->StyleBackground(); // Check if we need to do propagation from BODY rather than HTML. - if (!result->IsTransparent()) { + if (!result->IsTransparent(aForFrame)) { return aForFrame; } @@ -1333,7 +1335,7 @@ FindElementBackground(nsIFrame* aForFrame, nsIFrame* aRootElementFrame, return true; const nsStyleBackground* htmlBG = aRootElementFrame->StyleBackground(); - return !htmlBG->IsTransparent(); + return !htmlBG->IsTransparent(aRootElementFrame); } bool @@ -2249,7 +2251,7 @@ nsCSSRendering::DetermineBackgroundColor(nsPresContext* aPresContext, // transparent, but we are expected to use white instead of whatever // color was specified. bgColor = NS_RGB(255, 255, 255); - if (aDrawBackgroundImage || !bg->IsTransparent()) { + if (aDrawBackgroundImage || !bg->IsTransparent(aStyleContext)) { aDrawBackgroundColor = true; } else { bgColor = NS_RGBA(0,0,0,0); @@ -4464,17 +4466,17 @@ GetDashInfo(nscoord aBorderLength, } void -nsCSSRendering::DrawTableBorderSegment(DrawTarget& aDrawTarget, - uint8_t aBorderStyle, - nscolor aBorderColor, - const nsStyleBackground* aBGColor, - const nsRect& aBorder, - int32_t aAppUnitsPerDevPixel, - int32_t aAppUnitsPerCSSPixel, - uint8_t aStartBevelSide, - nscoord aStartBevelOffset, - uint8_t aEndBevelSide, - nscoord aEndBevelOffset) +nsCSSRendering::DrawTableBorderSegment(DrawTarget& aDrawTarget, + uint8_t aBorderStyle, + nscolor aBorderColor, + nscolor aBGColor, + const nsRect& aBorder, + int32_t aAppUnitsPerDevPixel, + int32_t aAppUnitsPerCSSPixel, + uint8_t aStartBevelSide, + nscoord aStartBevelOffset, + uint8_t aEndBevelSide, + nscoord aEndBevelOffset) { bool horizontal = ((eSideTop == aStartBevelSide) || (eSideBottom == aStartBevelSide)); nscoord twipsPerPixel = NSIntPixelsToAppUnits(1, aAppUnitsPerCSSPixel); @@ -4564,8 +4566,7 @@ nsCSSRendering::DrawTableBorderSegment(DrawTarget& aDrawTarget, // FIXME: In theory, this should use the visited-dependent // background color, but I don't care. nscolor bevelColor = MakeBevelColor(ridgeGrooveSide, ridgeGroove, - aBGColor->mBackgroundColor, - aBorderColor); + aBGColor, aBorderColor); nsRect rect(aBorder); nscoord half; if (horizontal) { // top, bottom @@ -4604,7 +4605,7 @@ nsCSSRendering::DrawTableBorderSegment(DrawTarget& aDrawTarget, // FIXME: In theory, this should use the visited-dependent // background color, but I don't care. bevelColor = MakeBevelColor(ridgeGrooveSide, ridgeGroove, - aBGColor->mBackgroundColor, aBorderColor); + aBGColor, aBorderColor); if (horizontal) { rect.y = rect.y + half; rect.height = aBorder.height - half; diff --git a/layout/painting/nsCSSRendering.h b/layout/painting/nsCSSRendering.h index ea1347a7e250..ca40ffa16e44 100644 --- a/layout/painting/nsCSSRendering.h +++ b/layout/painting/nsCSSRendering.h @@ -714,17 +714,17 @@ struct nsCSSRendering { // Draw a border segment in the table collapsing border model without // beveling corners - static void DrawTableBorderSegment(DrawTarget& aDrawTarget, - uint8_t aBorderStyle, - nscolor aBorderColor, - const nsStyleBackground* aBGColor, - const nsRect& aBorderRect, - int32_t aAppUnitsPerDevPixel, - int32_t aAppUnitsPerCSSPixel, - uint8_t aStartBevelSide = 0, - nscoord aStartBevelOffset = 0, - uint8_t aEndBevelSide = 0, - nscoord aEndBevelOffset = 0); + static void DrawTableBorderSegment(DrawTarget& aDrawTarget, + uint8_t aBorderStyle, + nscolor aBorderColor, + nscolor aBGColor, + const nsRect& aBorderRect, + int32_t aAppUnitsPerDevPixel, + int32_t aAppUnitsPerCSSPixel, + uint8_t aStartBevelSide = 0, + nscoord aStartBevelOffset = 0, + uint8_t aEndBevelSide = 0, + nscoord aEndBevelOffset = 0); // NOTE: pt, dirtyRect, lineSize, ascent, offset in the following // structs are non-rounded device pixels, not app units. diff --git a/layout/reftests/floats/1322843-1-ref.html b/layout/reftests/floats/1322843-1-ref.html new file mode 100644 index 000000000000..f3b15eb9e024 --- /dev/null +++ b/layout/reftests/floats/1322843-1-ref.html @@ -0,0 +1,10 @@ + +Bug 1322843 - Intrinsic width with float + +
diff --git a/layout/reftests/floats/1322843-1a.html b/layout/reftests/floats/1322843-1a.html new file mode 100644 index 000000000000..c2f7ba285787 --- /dev/null +++ b/layout/reftests/floats/1322843-1a.html @@ -0,0 +1,33 @@ + +Bug 1322843 - Intrinsic width with float + +
+
+
+
+
diff --git a/layout/reftests/floats/1322843-1b.html b/layout/reftests/floats/1322843-1b.html new file mode 100644 index 000000000000..6ab8e1b42a22 --- /dev/null +++ b/layout/reftests/floats/1322843-1b.html @@ -0,0 +1,26 @@ + +Bug 1322843 - Intrinsic width with float + +
+
+
+
diff --git a/layout/reftests/floats/1322843-1c.html b/layout/reftests/floats/1322843-1c.html new file mode 100644 index 000000000000..2625f847df65 --- /dev/null +++ b/layout/reftests/floats/1322843-1c.html @@ -0,0 +1,26 @@ + +Bug 1322843 - Intrinsic width with float + +
+
+
+
diff --git a/layout/reftests/floats/1322843-1d.html b/layout/reftests/floats/1322843-1d.html new file mode 100644 index 000000000000..e8fb14ce46b3 --- /dev/null +++ b/layout/reftests/floats/1322843-1d.html @@ -0,0 +1,41 @@ + +Bug 1322843 - Intrinsic width with float + +
+
+
+
+
+
diff --git a/layout/reftests/floats/1322843-1e.html b/layout/reftests/floats/1322843-1e.html new file mode 100644 index 000000000000..493ed173496a --- /dev/null +++ b/layout/reftests/floats/1322843-1e.html @@ -0,0 +1,26 @@ + +Bug 1322843 - Intrinsic width with float + +
+
+
+
diff --git a/layout/reftests/floats/1322843-1f.html b/layout/reftests/floats/1322843-1f.html new file mode 100644 index 000000000000..49e9189b01a1 --- /dev/null +++ b/layout/reftests/floats/1322843-1f.html @@ -0,0 +1,34 @@ + +Bug 1322843 - Intrinsic width with float + +
+
+
+
+
diff --git a/layout/reftests/floats/reftest.list b/layout/reftests/floats/reftest.list index 948fea3142b9..3ffe35c6857f 100644 --- a/layout/reftests/floats/reftest.list +++ b/layout/reftests/floats/reftest.list @@ -26,6 +26,12 @@ fails == 345369-2.html 345369-2-ref.html == 1260031-1.html?overflow:hidden 1260031-1-ref.html == 1291110-1.html 1291110-1-ref.html == 1291110-2.html 1291110-2-ref.html +== 1322843-1a.html 1322843-1-ref.html +== 1322843-1b.html 1322843-1-ref.html +== 1322843-1c.html 1322843-1-ref.html +== 1322843-1d.html 1322843-1-ref.html +== 1322843-1e.html 1322843-1-ref.html +== 1322843-1f.html 1322843-1-ref.html == float-in-rtl-1a.html float-in-rtl-1-ref.html fuzzy-if(skiaContent,1,27000) == float-in-rtl-1b.html float-in-rtl-1-ref.html fuzzy-if(skiaContent,1,27000) == float-in-rtl-1c.html float-in-rtl-1-ref.html diff --git a/layout/style/DocumentStyleRootIterator.cpp b/layout/style/DocumentStyleRootIterator.cpp index af95c5c4ff4e..c4afb2c744f4 100644 --- a/layout/style/DocumentStyleRootIterator.cpp +++ b/layout/style/DocumentStyleRootIterator.cpp @@ -6,6 +6,7 @@ #include "DocumentStyleRootIterator.h" +#include "mozilla/dom/Element.h" #include "nsContentUtils.h" namespace mozilla { diff --git a/layout/style/DocumentStyleRootIterator.h b/layout/style/DocumentStyleRootIterator.h index 7dcdc7fa1bec..a3293a5b6f10 100644 --- a/layout/style/DocumentStyleRootIterator.h +++ b/layout/style/DocumentStyleRootIterator.h @@ -14,6 +14,10 @@ class nsIDocument; namespace mozilla { +namespace dom { +class Element; +} // namespace dom + /** * DocumentStyleRootIterator traverses the roots of the document from the * perspective of the Servo-backed style system. This will first traverse @@ -25,7 +29,7 @@ public: explicit DocumentStyleRootIterator(nsIDocument* aDocument); ~DocumentStyleRootIterator() { MOZ_COUNT_DTOR(DocumentStyleRootIterator); } - Element* GetNextStyleRoot(); + dom::Element* GetNextStyleRoot(); private: AutoTArray mStyleRoots; diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 796eca4098dd..ccdf9ebd972d 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -53,6 +53,7 @@ #include "mozilla/dom/ShadowRoot.h" #include "mozilla/dom/URL.h" #include "mozilla/AsyncEventDispatcher.h" +#include "mozilla/ServoBindings.h" #include "mozilla/StyleSheet.h" #include "mozilla/StyleSheetInlines.h" #include "mozilla/ConsoleReportCollector.h" @@ -1405,29 +1406,27 @@ Loader::InsertSheetInDoc(StyleSheet* aSheet, nsresult Loader::InsertChildSheet(StyleSheet* aSheet, StyleSheet* aParentSheet, - ImportRule* aParentRule) + ImportRule* aGeckoParentRule, + const RawServoImportRule* aServoParentRule) { LOG(("css::Loader::InsertChildSheet")); - NS_PRECONDITION(aSheet, "Nothing to insert"); - NS_PRECONDITION(aParentSheet, "Need a parent to insert into"); - NS_PRECONDITION(aParentSheet, "How did we get imported?"); - - // XXXheycam The InsertChildSheet API doesn't work with ServoStyleSheets, - // since they won't have Gecko ImportRules in them. - if (aSheet->IsServo()) { - return NS_ERROR_FAILURE; + MOZ_ASSERT(aSheet, "Nothing to insert"); + MOZ_ASSERT(aParentSheet, "Need a parent to insert into"); + MOZ_ASSERT_IF(aSheet->IsGecko(), aGeckoParentRule && !aServoParentRule); + MOZ_ASSERT_IF(aSheet->IsServo(), aServoParentRule && !aGeckoParentRule); + if (aSheet->IsGecko()) { + // child sheets should always start out enabled, even if they got + // cloned off of top-level sheets which were disabled + aSheet->AsGecko()->SetEnabled(true); + aGeckoParentRule->SetSheet(aSheet->AsGecko()); // This sets the ownerRule on the sheet + } else { + RefPtr sheet = + Servo_ImportRule_GetSheet(aServoParentRule).Consume(); + aSheet->AsServo()->SetSheetForImport(sheet); } - - // child sheets should always start out enabled, even if they got - // cloned off of top-level sheets which were disabled - aSheet->AsGecko()->SetEnabled(true); - aParentSheet->AppendStyleSheet(aSheet); - aParentRule->SetSheet(aSheet->AsGecko()); // This sets the ownerRule on the sheet LOG((" Inserting into parent sheet")); - // LOG((" Inserting into parent sheet at position %d", insertionPoint)); - return NS_OK; } @@ -1775,7 +1774,8 @@ Loader::ParseSheet(const nsAString& aInput, aLoadData->mLineNumber); } else { rv = - aLoadData->mSheet->AsServo()->ParseSheet(aInput, sheetURI, baseURI, + aLoadData->mSheet->AsServo()->ParseSheet(this, + aInput, sheetURI, baseURI, aLoadData->mSheet->Principal(), aLoadData->mLineNumber); } @@ -1991,7 +1991,7 @@ Loader::LoadInlineStyle(nsIContent* aElement, bool* aIsAlternate) { LOG(("css::Loader::LoadInlineStyle")); - NS_ASSERTION(mParsingDatas.Length() == 0, "We're in the middle of a parse?"); + MOZ_ASSERT(mParsingDatas.IsEmpty(), "We're in the middle of a parse?"); *aCompleted = true; @@ -2197,13 +2197,19 @@ nsresult Loader::LoadChildSheet(StyleSheet* aParentSheet, nsIURI* aURL, nsMediaList* aMedia, - ImportRule* aParentRule, + ImportRule* aGeckoParentRule, + const RawServoImportRule* aServoParentRule, LoaderReusableStyleSheets* aReusableSheets) { LOG(("css::Loader::LoadChildSheet")); NS_PRECONDITION(aURL, "Must have a URI to load"); NS_PRECONDITION(aParentSheet, "Must have a parent sheet"); + // Servo doesn't support reusable sheets. + MOZ_ASSERT_IF(aReusableSheets, aParentSheet->IsGecko()); + MOZ_ASSERT_IF(aParentSheet->IsGecko(), aGeckoParentRule && !aServoParentRule); + MOZ_ASSERT_IF(aParentSheet->IsServo(), aServoParentRule && !aGeckoParentRule); + if (!mEnabled) { LOG_WARN((" Not enabled")); return NS_ERROR_NOT_AVAILABLE; @@ -2215,7 +2221,11 @@ Loader::LoadChildSheet(StyleSheet* aParentSheet, // check for an owning document: if none, don't bother walking up the parent // sheets - if (aParentSheet->GetOwningDocument()) { + // + // FIXME(emilio): Figure out whether this walk up is necessary (try seems + // green without it), and fix the parenting of stylesheets in the servo case + // if that's the case. + if (aParentSheet->GetOwningDocument() && aParentSheet->IsGecko()) { StyleSheet* topSheet = aParentSheet; while (StyleSheet* parent = topSheet->GetParentSheet()) { topSheet = parent; @@ -2266,7 +2276,7 @@ Loader::LoadChildSheet(StyleSheet* aParentSheet, StyleSheetState state; if (aReusableSheets && aReusableSheets->FindReusableStyleSheet(aURL, reusableSheet)) { sheet = reusableSheet; - aParentRule->SetSheet(reusableSheet); + aGeckoParentRule->SetSheet(reusableSheet); state = eSheetComplete; } else { bool isAlternate; @@ -2283,7 +2293,8 @@ Loader::LoadChildSheet(StyleSheet* aParentSheet, PrepareSheet(sheet, empty, empty, aMedia, nullptr, isAlternate); } - rv = InsertChildSheet(sheet, aParentSheet, aParentRule); + rv = InsertChildSheet(sheet, aParentSheet, aGeckoParentRule, + aServoParentRule); NS_ENSURE_SUCCESS(rv, rv); if (state == eSheetComplete) { diff --git a/layout/style/Loader.h b/layout/style/Loader.h index 209783a80422..a67498d67f65 100644 --- a/layout/style/Loader.h +++ b/layout/style/Loader.h @@ -285,15 +285,19 @@ public: * @param aParentSheet the parent of this child sheet * @param aURL the URL of the child sheet * @param aMedia the already-parsed media list for the child sheet - * @param aRule the @import rule importing this child. This is used to - * properly order the child sheet list of aParentSheet. + * @param aGeckoParentRule the @import rule importing this child, when using + * Gecko's style system. This is used to properly + * order the child sheet list of aParentSheet. + * @param aServoParentRule the @import rule importing this child, when using + * Servo's style system. * @param aSavedSheets any saved style sheets which could be reused * for this load */ nsresult LoadChildSheet(StyleSheet* aParentSheet, nsIURI* aURL, nsMediaList* aMedia, - ImportRule* aRule, + ImportRule* aGeckoParentRule, + const RawServoImportRule* aServoParentRule, LoaderReusableStyleSheets* aSavedSheets); /** @@ -484,7 +488,8 @@ private: nsresult InsertChildSheet(StyleSheet* aSheet, StyleSheet* aParentSheet, - ImportRule* aParentRule); + ImportRule* aGeckoParentRule, + const RawServoImportRule* aServoParentRule); nsresult InternalLoadNonDocumentSheet(nsIURI* aURL, bool aIsPreload, diff --git a/layout/style/ServoArcTypeList.h b/layout/style/ServoArcTypeList.h index ead8d80ef71e..8ebead199656 100644 --- a/layout/style/ServoArcTypeList.h +++ b/layout/style/ServoArcTypeList.h @@ -11,3 +11,4 @@ SERVO_ARC_TYPE(StyleSheet, RawServoStyleSheet) SERVO_ARC_TYPE(ComputedValues, ServoComputedValues) SERVO_ARC_TYPE(DeclarationBlock, RawServoDeclarationBlock) SERVO_ARC_TYPE(StyleRule, RawServoStyleRule) +SERVO_ARC_TYPE(ImportRule, RawServoImportRule) diff --git a/layout/style/ServoBindingList.h b/layout/style/ServoBindingList.h index 09280f6d1675..b7265df4deb7 100644 --- a/layout/style/ServoBindingList.h +++ b/layout/style/ServoBindingList.h @@ -26,12 +26,26 @@ SERVO_BINDING_FUNC(Servo_Element_ShouldTraverse, bool, RawGeckoElementBorrowed n SERVO_BINDING_FUNC(Servo_StyleSheet_Empty, RawServoStyleSheetStrong, mozilla::css::SheetParsingMode parsing_mode) SERVO_BINDING_FUNC(Servo_StyleSheet_FromUTF8Bytes, RawServoStyleSheetStrong, + mozilla::css::Loader* loader, + mozilla::ServoStyleSheet* gecko_stylesheet, const nsACString* data, mozilla::css::SheetParsingMode parsing_mode, const nsACString* base_url, ThreadSafeURIHolder* base, ThreadSafeURIHolder* referrer, ThreadSafePrincipalHolder* principal) +SERVO_BINDING_FUNC(Servo_ImportRule_GetSheet, + RawServoStyleSheetStrong, + const RawServoImportRuleBorrowed import_rule) +SERVO_BINDING_FUNC(Servo_StyleSheet_ClearAndUpdate, + void, + RawServoStyleSheetBorrowed stylesheet, + mozilla::css::Loader* loader, + mozilla::ServoStyleSheet* gecko_stylesheet, + const nsACString* data, + ThreadSafeURIHolder* base, + ThreadSafeURIHolder* referrer, + ThreadSafePrincipalHolder* principal) SERVO_BINDING_FUNC(Servo_StyleSheet_HasRules, bool, RawServoStyleSheetBorrowed sheet) SERVO_BINDING_FUNC(Servo_StyleSheet_GetRules, ServoCssRulesStrong, diff --git a/layout/style/ServoBindings.cpp b/layout/style/ServoBindings.cpp index 9677f5d3fc10..352388a14afe 100644 --- a/layout/style/ServoBindings.cpp +++ b/layout/style/ServoBindings.cpp @@ -10,6 +10,7 @@ #include "StyleStructContext.h" #include "gfxFontFamilyList.h" #include "nsAttrValueInlines.h" +#include "nsCSSParser.h" #include "nsCSSRuleProcessor.h" #include "nsContentUtils.h" #include "nsDOMTokenList.h" @@ -20,6 +21,7 @@ #include "nsINode.h" #include "nsIPrincipal.h" #include "nsNameSpaceManager.h" +#include "nsNetUtil.h" #include "nsRuleNode.h" #include "nsString.h" #include "nsStyleStruct.h" @@ -59,6 +61,12 @@ Gecko_NodeIsElement(RawGeckoNodeBorrowed aNode) return aNode->IsElement(); } +bool +Gecko_IsInDocument(RawGeckoNodeBorrowed aNode) +{ + return aNode->IsInComposedDoc(); +} + RawGeckoNodeBorrowedOrNull Gecko_GetParentNode(RawGeckoNodeBorrowed aNode) { @@ -1021,6 +1029,40 @@ Gecko_CSSValue_GetArrayItem(nsCSSValueBorrowedMut aCSSValue, int32_t aIndex) return &aCSSValue->GetArrayValue()->Item(aIndex); } +void +Gecko_LoadStyleSheet(css::Loader* aLoader, + ServoStyleSheet* aParent, + RawServoImportRuleBorrowed aImportRule, + const uint8_t* aURLString, + uint32_t aURLStringLength, + const uint8_t* aMediaString, + uint32_t aMediaStringLength) +{ + MOZ_ASSERT(aLoader, "Should've catched this before"); + MOZ_ASSERT(aParent, "Only used for @import, so parent should exist!"); + MOZ_ASSERT(aURLString, "Invalid URLs shouldn't be loaded!"); + RefPtr media = new nsMediaList(); + if (aMediaStringLength) { + MOZ_ASSERT(aMediaString); + // TODO(emilio, bug 1325878): This is not great, though this is going away + // soon anyway, when we can have a Servo-backed nsMediaList. + nsDependentCSubstring medium(reinterpret_cast(aMediaString), + aMediaStringLength); + nsCSSParser mediumParser(aLoader); + mediumParser.ParseMediaList( + NS_ConvertUTF8toUTF16(medium), nullptr, 0, media); + } + + nsDependentCSubstring urlSpec(reinterpret_cast(aURLString), + aURLStringLength); + + // Servo's loader guarantees that the URL is valid. + nsCOMPtr uri; + MOZ_ALWAYS_SUCCEEDS(NS_NewURI(getter_AddRefs(uri), urlSpec)); + + aLoader->LoadChildSheet(aParent, uri, media, nullptr, aImportRule, nullptr); +} + NS_IMPL_THREADSAFE_FFI_REFCOUNTING(nsCSSValueSharedList, CSSValueSharedList); #define STYLE_STRUCT(name, checkdata_cb) \ diff --git a/layout/style/ServoBindings.h b/layout/style/ServoBindings.h index 8eeabbdf8540..37cccdff2783 100644 --- a/layout/style/ServoBindings.h +++ b/layout/style/ServoBindings.h @@ -29,6 +29,7 @@ class nsIPrincipal; class nsIURI; struct nsFont; namespace mozilla { + class ServoStyleSheet; class FontFamilyList; enum FontFamilyType : uint32_t; } @@ -83,6 +84,7 @@ NS_DECL_HOLDER_FFI_REFCOUNTING(nsIURI, URI) // DOM Traversal. uint32_t Gecko_ChildrenCount(RawGeckoNodeBorrowed node); bool Gecko_NodeIsElement(RawGeckoNodeBorrowed node); +bool Gecko_IsInDocument(RawGeckoNodeBorrowed node); RawGeckoNodeBorrowedOrNull Gecko_GetParentNode(RawGeckoNodeBorrowed node); RawGeckoNodeBorrowedOrNull Gecko_GetFirstChild(RawGeckoNodeBorrowed node); RawGeckoNodeBorrowedOrNull Gecko_GetLastChild(RawGeckoNodeBorrowed node); @@ -94,6 +96,13 @@ RawGeckoElementBorrowedOrNull Gecko_GetLastChildElement(RawGeckoElementBorrowed RawGeckoElementBorrowedOrNull Gecko_GetPrevSiblingElement(RawGeckoElementBorrowed element); RawGeckoElementBorrowedOrNull Gecko_GetNextSiblingElement(RawGeckoElementBorrowed element); RawGeckoElementBorrowedOrNull Gecko_GetDocumentElement(RawGeckoDocumentBorrowed document); +void Gecko_LoadStyleSheet(mozilla::css::Loader* loader, + mozilla::ServoStyleSheet* parent, + RawServoImportRuleBorrowed import_rule, + const uint8_t* url_bytes, + uint32_t url_length, + const uint8_t* media_bytes, + uint32_t media_length); // By default, Servo walks the DOM by traversing the siblings of the DOM-view // first child. This generally works, but misses anonymous children, which we diff --git a/layout/style/ServoStyleSet.cpp b/layout/style/ServoStyleSet.cpp index fc2db7e13ef9..aa0b6bd5b508 100644 --- a/layout/style/ServoStyleSet.cpp +++ b/layout/style/ServoStyleSet.cpp @@ -9,6 +9,8 @@ #include "mozilla/DocumentStyleRootIterator.h" #include "mozilla/ServoRestyleManager.h" #include "mozilla/dom/ChildIterator.h" +#include "mozilla/dom/Element.h" +#include "mozilla/dom/ElementInlines.h" #include "nsCSSAnonBoxes.h" #include "nsCSSPseudoElements.h" #include "nsIDocumentInlines.h" diff --git a/layout/style/ServoStyleSheet.cpp b/layout/style/ServoStyleSheet.cpp index 0a689b9b2739..e6b72d7233f1 100644 --- a/layout/style/ServoStyleSheet.cpp +++ b/layout/style/ServoStyleSheet.cpp @@ -62,21 +62,17 @@ ServoStyleSheet::GetParentSheet() const void ServoStyleSheet::AppendStyleSheet(ServoStyleSheet* aSheet) { - // XXXheycam: When we implement support for child sheets, we'll have - // to fix SetOwningDocument to propagate the owning document down - // to the children. - MOZ_CRASH("stylo: not implemented"); + aSheet->mDocument = mDocument; } nsresult -ServoStyleSheet::ParseSheet(const nsAString& aInput, +ServoStyleSheet::ParseSheet(css::Loader* aLoader, + const nsAString& aInput, nsIURI* aSheetURI, nsIURI* aBaseURI, nsIPrincipal* aSheetPrincipal, uint32_t aLineNumber) { - DropSheet(); - RefPtr base = new ThreadSafeURIHolder(aBaseURI); RefPtr referrer = new ThreadSafeURIHolder(aSheetURI); RefPtr principal = @@ -87,8 +83,15 @@ ServoStyleSheet::ParseSheet(const nsAString& aInput, NS_ENSURE_SUCCESS(rv, rv); NS_ConvertUTF16toUTF8 input(aInput); - mSheet = Servo_StyleSheet_FromUTF8Bytes(&input, mParsingMode, &baseString, - base, referrer, principal).Consume(); + if (!mSheet) { + mSheet = + Servo_StyleSheet_FromUTF8Bytes(aLoader, this, &input, mParsingMode, + &baseString, base, referrer, + principal).Consume(); + } else { + Servo_StyleSheet_ClearAndUpdate(mSheet, aLoader, this, &input, base, + referrer, principal); + } return NS_OK; } diff --git a/layout/style/ServoStyleSheet.h b/layout/style/ServoStyleSheet.h index c86768b9dd0d..9b324355debc 100644 --- a/layout/style/ServoStyleSheet.h +++ b/layout/style/ServoStyleSheet.h @@ -18,6 +18,10 @@ namespace mozilla { class ServoCSSRuleList; +namespace css { +class Loader; +} + /** * CSS style sheet object that is a wrapper for a Servo Stylesheet. */ @@ -36,7 +40,8 @@ public: ServoStyleSheet* GetParentSheet() const; void AppendStyleSheet(ServoStyleSheet* aSheet); - MOZ_MUST_USE nsresult ParseSheet(const nsAString& aInput, + MOZ_MUST_USE nsresult ParseSheet(css::Loader* aLoader, + const nsAString& aInput, nsIURI* aSheetURI, nsIURI* aBaseURI, nsIPrincipal* aSheetPrincipal, @@ -56,6 +61,10 @@ public: #endif RawServoStyleSheet* RawSheet() const { return mSheet; } + void SetSheetForImport(RawServoStyleSheet* aSheet) { + MOZ_ASSERT(!mSheet); + mSheet = aSheet; + } // WebIDL StyleSheet API nsMediaList* Media() final; diff --git a/layout/style/crashtests/894245-1.html b/layout/style/crashtests/894245-1.html new file mode 100644 index 000000000000..f2ec419afe46 --- /dev/null +++ b/layout/style/crashtests/894245-1.html @@ -0,0 +1,5 @@ + +
+
+
+
diff --git a/layout/style/crashtests/crashtests.list b/layout/style/crashtests/crashtests.list index c8d0f77da047..2d1d62fcd378 100644 --- a/layout/style/crashtests/crashtests.list +++ b/layout/style/crashtests/crashtests.list @@ -103,6 +103,7 @@ load 862113.html asserts-if(stylo,5) load 867487.html # bug 1324634 load 873222.html asserts-if(stylo,2) load 880862.html # bug 1324701 +load 894245-1.html load 915440.html load 927734-1.html load 930270-1.html @@ -158,7 +159,7 @@ asserts-if(stylo,4-64) pref(dom.animations-api.core.enabled,true) load 1282076-2 asserts-if(stylo,2) pref(dom.animations-api.core.enabled,true) load 1290994-1.html # bug 1324690 asserts-if(stylo,2) pref(dom.animations-api.core.enabled,true) load 1290994-2.html # bug 1324690 asserts-if(stylo,1) pref(dom.animations-api.core.enabled,true) load 1290994-3.html # bug 1324690 -skip-if(stylo) load 1290994-4.html # bug 1323717 +load 1290994-4.html load 1314531.html load 1315889-1.html load 1315894-1.html diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 8167dae58717..94e5387a87fd 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -8,6 +8,7 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" +#include "mozilla/Maybe.h" #include "mozilla/Move.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/TypedEnumBits.h" @@ -51,6 +52,7 @@ #include "CSSCalc.h" #include "nsMediaFeatures.h" #include "nsLayoutUtils.h" +#include "mozilla/LookAndFeel.h" #include "mozilla/Preferences.h" #include "nsRuleData.h" #include "mozilla/CSSVariableValues.h" @@ -3796,8 +3798,8 @@ CSSParserImpl::ProcessImport(const nsString& aURLSpec, uint32_t aColumnNumber) { RefPtr rule = new css::ImportRule(aMedia, aURLSpec, - aLineNumber, - aColumnNumber); + aLineNumber, + aColumnNumber); (*aAppendFunc)(rule, aData); // Diagnose bad URIs even if we don't have a child loader. @@ -3815,7 +3817,9 @@ CSSParserImpl::ProcessImport(const nsString& aURLSpec, } if (mChildLoader) { - mChildLoader->LoadChildSheet(mSheet, url, aMedia, rule, mReusableSheets); + mChildLoader->LoadChildSheet(mSheet, url, aMedia, rule, + /* aServoParentRule = */ nullptr, + mReusableSheets); } } @@ -4226,8 +4230,7 @@ CSSParserImpl::ParseFontFeatureValueSet(nsCSSFontFeatureValuesRule // which font-specific variant of font-variant-alternates int32_t whichVariant; nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(mToken.mIdent); - if (keyword == eCSSKeyword_UNKNOWN || - !nsCSSProps::FindKeyword(keyword, + if (!nsCSSProps::FindKeyword(keyword, nsCSSProps::kFontVariantAlternatesFuncsKTable, whichVariant)) { @@ -6689,6 +6692,31 @@ CSSParserImpl::ParseDeclarationBlock(uint32_t aFlags, nsCSSContextType aContext) return declaration.forget(); } +static Maybe +GetEnumColorValue(nsCSSKeyword aKeyword, bool aIsChrome) +{ + int32_t value; + if (!nsCSSProps::FindKeyword(aKeyword, nsCSSProps::kColorKTable, value)) { + // Unknown color keyword. + return Nothing(); + } + if (value < 0) { + // Known special color keyword handled by style system, + // e.g. NS_COLOR_CURRENTCOLOR. See nsStyleConsts.h. + return Some(value); + } + nscolor color; + auto colorID = static_cast(value); + if (NS_FAILED(LookAndFeel::GetColor(colorID, !aIsChrome, &color))) { + // Known LookAndFeel::ColorID, but this platform's LookAndFeel impl + // doesn't map it to a color. (This might be a platform-specific + // ColorID, which only makes sense on another platform.) + return Nothing(); + } + // Known color provided by LookAndFeel. + return Some(value); +} + CSSParseResult CSSParserImpl::ParseColor(nsCSSValue& aValue) { @@ -6726,22 +6754,18 @@ CSSParserImpl::ParseColor(nsCSSValue& aValue) } break; - case eCSSToken_Ident: + case eCSSToken_Ident: { if (NS_ColorNameToRGB(tk->mIdent, &rgba)) { aValue.SetStringValue(tk->mIdent, eCSSUnit_Ident); return CSSParseResult::Ok; } - else { - nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(tk->mIdent); - if (eCSSKeyword_UNKNOWN < keyword) { // known keyword - int32_t value; - if (nsCSSProps::FindKeyword(keyword, nsCSSProps::kColorKTable, value)) { - aValue.SetIntValue(value, eCSSUnit_EnumColor); - return CSSParseResult::Ok; - } - } + nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(tk->mIdent); + if (Maybe value = GetEnumColorValue(keyword, mIsChrome)) { + aValue.SetIntValue(value.value(), eCSSUnit_EnumColor); + return CSSParseResult::Ok; } break; + } case eCSSToken_Function: { bool isRGB; bool isHSL; @@ -7556,12 +7580,10 @@ CSSParserImpl::ParseEnum(nsCSSValue& aValue, return false; } nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(*ident); - if (eCSSKeyword_UNKNOWN < keyword) { - int32_t value; - if (nsCSSProps::FindKeyword(keyword, aKeywordTable, value)) { - aValue.SetIntValue(value, eCSSUnit_Enumerated); - return true; - } + int32_t value; + if (nsCSSProps::FindKeyword(keyword, aKeywordTable, value)) { + aValue.SetIntValue(value, eCSSUnit_Enumerated); + return true; } // Put the unknown identifier back and return @@ -7591,16 +7613,14 @@ CSSParserImpl::ParseAlignEnum(nsCSSValue& aValue, } keyword = nsCSSKeywords::LookupKeyword(*ident); } - if (eCSSKeyword_UNKNOWN < keyword) { - int32_t value; - if (nsCSSProps::FindKeyword(keyword, aKeywordTable, value)) { - if (baselinePrefix == eCSSKeyword_last && - keyword == eCSSKeyword_baseline) { - value = NS_STYLE_ALIGN_LAST_BASELINE; - } - aValue.SetIntValue(value, eCSSUnit_Enumerated); - return true; + int32_t value; + if (nsCSSProps::FindKeyword(keyword, aKeywordTable, value)) { + if (baselinePrefix == eCSSKeyword_last && + keyword == eCSSKeyword_baseline) { + value = NS_STYLE_ALIGN_LAST_BASELINE; } + aValue.SetIntValue(value, eCSSUnit_Enumerated); + return true; } // Put the unknown identifier back and return @@ -10659,8 +10679,7 @@ CSSParserImpl::IsLegacyGradientLine(const nsCSSTokenType& aType, // This is only a gradient line if it's a box position keyword. nsCSSKeyword kw = nsCSSKeywords::LookupKeyword(aId); int32_t junk; - if (kw != eCSSKeyword_UNKNOWN && - nsCSSProps::FindKeyword(kw, nsCSSProps::kImageLayerPositionKTable, + if (nsCSSProps::FindKeyword(kw, nsCSSProps::kImageLayerPositionKTable, junk)) { haveGradientLine = true; } @@ -14469,12 +14488,11 @@ CSSParserImpl::ParseSingleAlternate(int32_t& aWhichFeature, // function ==> e.g. swash(flowing) styleset(alt-g, alt-m) nsCSSKeyword keyword = nsCSSKeywords::LookupKeyword(mToken.mIdent); - if (!(eCSSKeyword_UNKNOWN < keyword && - nsCSSProps::FindKeyword(keyword, - (isIdent ? - nsCSSProps::kFontVariantAlternatesKTable : - nsCSSProps::kFontVariantAlternatesFuncsKTable), - aWhichFeature))) + if (!nsCSSProps::FindKeyword(keyword, + (isIdent ? + nsCSSProps::kFontVariantAlternatesKTable : + nsCSSProps::kFontVariantAlternatesFuncsKTable), + aWhichFeature)) { // failed, pop token UngetToken(); diff --git a/layout/style/nsCSSPropList.h b/layout/style/nsCSSPropList.h index e9a490c848ea..b0fc2d7e741d 100644 --- a/layout/style/nsCSSPropList.h +++ b/layout/style/nsCSSPropList.h @@ -538,7 +538,7 @@ CSS_PROP_BACKGROUND( VARIANT_HC, nullptr, offsetof(nsStyleBackground, mBackgroundColor), - eStyleAnimType_Color) + eStyleAnimType_ComplexColor) CSS_PROP_BACKGROUND( background-image, background_image, diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp index 8301d0831406..478076d8959c 100644 --- a/layout/style/nsComputedDOMStyle.cpp +++ b/layout/style/nsComputedDOMStyle.cpp @@ -85,7 +85,7 @@ already_AddRefed GetBackgroundList(T nsStyleImageLayers::Layer::* aMember, uint32_t nsStyleImageLayers::* aCount, const nsStyleImageLayers& aLayers, - const KTableEntry aTable[]) + const nsCSSProps::KTableEntry aTable[]) { RefPtr valueList = GetROCSSValueList(true); @@ -1870,7 +1870,7 @@ already_AddRefed nsComputedDOMStyle::DoGetBackgroundColor() { RefPtr val = new nsROCSSPrimitiveValue; - SetToRGBAColor(val, StyleBackground()->mBackgroundColor); + SetValueFromComplexColor(val, StyleBackground()->mBackgroundColor); return val.forget(); } diff --git a/layout/style/nsLayoutStylesheetCache.cpp b/layout/style/nsLayoutStylesheetCache.cpp index b259b1f121a9..99df44761756 100644 --- a/layout/style/nsLayoutStylesheetCache.cpp +++ b/layout/style/nsLayoutStylesheetCache.cpp @@ -971,7 +971,10 @@ nsLayoutStylesheetCache::BuildPreferenceSheet(RefPtr* aSheet, if (sheet->IsGecko()) { sheet->AsGecko()->ReparseSheet(sheetText); } else { - nsresult rv = sheet->AsServo()->ParseSheet(sheetText, uri, uri, nullptr, 0); + ServoStyleSheet* servoSheet = sheet->AsServo(); + // NB: The pref sheet never has @import rules. + nsresult rv = + servoSheet->ParseSheet(nullptr, sheetText, uri, uri, nullptr, 0); // Parsing the about:PreferenceStyleSheet URI can only fail on OOM. If we // are OOM before we parsed any documents we might as well abort. MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv)); diff --git a/layout/style/nsRuleNode.cpp b/layout/style/nsRuleNode.cpp index ea27fcee9aab..27f96b74930e 100644 --- a/layout/style/nsRuleNode.cpp +++ b/layout/style/nsRuleNode.cpp @@ -1044,10 +1044,11 @@ static bool SetColor(const nsCSSValue& aValue, const nscolor aParentColor, LookAndFeel::ColorID colorID = (LookAndFeel::ColorID) intValue; bool useStandinsForNativeColors = aPresContext && !aPresContext->IsChrome(); - if (NS_SUCCEEDED(LookAndFeel::GetColor(colorID, - useStandinsForNativeColors, &aResult))) { - result = true; - } + DebugOnly rv = + LookAndFeel::GetColor(colorID, useStandinsForNativeColors, &aResult); + MOZ_ASSERT(NS_SUCCEEDED(rv), + "Unknown enum colors should have been rejected by parser"); + result = true; } else { aResult = NS_RGB(0, 0, 0); @@ -7416,17 +7417,13 @@ nsRuleNode::ComputeBackgroundData(void* aStartStruct, { COMPUTE_START_RESET(Background, bg, parentBG) - // background-color: color, string, inherit - const nsCSSValue* backColorValue = aRuleData->ValueForBackgroundColor(); - if (eCSSUnit_Initial == backColorValue->GetUnit() || - eCSSUnit_Unset == backColorValue->GetUnit()) { - bg->mBackgroundColor = NS_RGBA(0, 0, 0, 0); - } else if (!SetColor(*backColorValue, parentBG->mBackgroundColor, - mPresContext, aContext, bg->mBackgroundColor, - conditions)) { - NS_ASSERTION(eCSSUnit_Null == backColorValue->GetUnit(), - "unexpected color unit"); - } + // background-color: color, inherit + SetComplexColor(*aRuleData->ValueForBackgroundColor(), + parentBG->mBackgroundColor, + StyleComplexColor::FromColor( + NS_RGBA(0, 0, 0, 0)), + mPresContext, + bg->mBackgroundColor, conditions); uint32_t maxItemCount = 1; bool rebuild = false; diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index 736a6dd0f46e..2a839a4a630d 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -2265,7 +2265,7 @@ nsStyleImage::StartDecoding() const if (!req) { return false; } - return req->StartDecodingWithResult(imgIContainer::FLAG_ASYNC_NOTIFY); + return req->StartDecodingWithResult(imgIContainer::FLAG_NONE); } // null image types always return false from IsComplete, so we do the same here. return mType != eStyleImageType_Null ? true : false; @@ -2881,7 +2881,7 @@ nsStyleImageLayers::Layer::CalcDifference(const nsStyleImageLayers::Layer& aNewL nsStyleBackground::nsStyleBackground(StyleStructContext aContext) : mImage(nsStyleImageLayers::LayerType::Background) - , mBackgroundColor(NS_RGBA(0, 0, 0, 0)) + , mBackgroundColor(StyleComplexColor::FromColor(NS_RGBA(0, 0, 0, 0))) { MOZ_COUNT_CTOR(nsStyleBackground); } @@ -2943,12 +2943,34 @@ nsStyleBackground::HasFixedBackground(nsIFrame* aFrame) const return false; } +nscolor +nsStyleBackground::BackgroundColor(const nsIFrame* aFrame) const +{ + return BackgroundColor(aFrame->StyleContext()); +} + +nscolor +nsStyleBackground::BackgroundColor(nsStyleContext* aContext) const +{ + // In majority of cases, background-color should just be a numeric color. + // In that case, we can skip resolving StyleColor(). + return mBackgroundColor.IsNumericColor() + ? mBackgroundColor.mColor + : aContext->StyleColor()->CalcComplexColor(mBackgroundColor); +} + bool -nsStyleBackground::IsTransparent() const +nsStyleBackground::IsTransparent(const nsIFrame* aFrame) const +{ + return IsTransparent(aFrame->StyleContext()); +} + +bool +nsStyleBackground::IsTransparent(nsStyleContext* aContext) const { return BottomLayer().mImage.IsEmpty() && mImage.mImageCount == 1 && - NS_GET_A(mBackgroundColor) == 0; + NS_GET_A(BackgroundColor(aContext)) == 0; } void diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index 7af150538c0c..14acea25f316 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -942,8 +942,13 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleBackground { return nsChangeHint(0); } + // Return the background color as nscolor. + nscolor BackgroundColor(const nsIFrame* aFrame) const; + nscolor BackgroundColor(nsStyleContext* aContext) const; + // True if this background is completely transparent. - bool IsTransparent() const; + bool IsTransparent(const nsIFrame* aFrame) const; + bool IsTransparent(nsStyleContext* aContext) const; // We have to take slower codepaths for fixed background attachment, // but we don't want to do that when there's no image. @@ -958,7 +963,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleBackground { const nsStyleImageLayers::Layer& BottomLayer() const { return mImage.BottomLayer(); } nsStyleImageLayers mImage; - nscolor mBackgroundColor; // [reset] + mozilla::StyleComplexColor mBackgroundColor; // [reset] }; #define NS_SPACING_MARGIN 0 diff --git a/layout/style/nsStyleUtil.cpp b/layout/style/nsStyleUtil.cpp index 37e423199ff8..60663b4a350f 100644 --- a/layout/style/nsStyleUtil.cpp +++ b/layout/style/nsStyleUtil.cpp @@ -516,8 +516,7 @@ nsStyleUtil::ComputeFunctionalAlternates(const nsCSSValueList* aList, NS_ASSERTION(key != eCSSKeyword_UNKNOWN, "unknown alternate property value"); int32_t alternate; - if (key == eCSSKeyword_UNKNOWN || - !nsCSSProps::FindKeyword(key, + if (!nsCSSProps::FindKeyword(key, nsCSSProps::kFontVariantAlternatesFuncsKTable, alternate)) { NS_NOTREACHED("keyword not a font-variant-alternates value"); diff --git a/layout/style/res/forms.css b/layout/style/res/forms.css index 0e15ad258b47..7e87e165841a 100644 --- a/layout/style/res/forms.css +++ b/layout/style/res/forms.css @@ -16,6 +16,9 @@ text-overflow: inherit; overflow: inherit; overflow-clip-box: inherit; + /* Need to inherit border-radius too, so when the fieldset has rounded + borders we don't leak out the corners for hit-testing purposes. */ + border-radius: inherit; padding: inherit; block-size: 100%; /* Need this so percentage block-sizes of kids work right */ /* Please keep the Multicol/Flex/Grid/Align sections below in sync with diff --git a/layout/style/test/test_transitions_per_property.html b/layout/style/test/test_transitions_per_property.html index b854c60a9c65..a72358b8be78 100644 --- a/layout/style/test/test_transitions_per_property.html +++ b/layout/style/test/test_transitions_per_property.html @@ -83,7 +83,7 @@ var supported_properties = { "-moz-outline-radius-topleft": [ test_radius_transition ], "-moz-outline-radius-topright": [ test_radius_transition ], "background-color": [ test_color_transition, - test_currentcolor_transition ], + test_true_currentcolor_transition ], "background-position": [ test_background_position_transition, // FIXME: We don't currently test clamping, // since background-position uses calc() as diff --git a/layout/svg/nsSVGIntegrationUtils.cpp b/layout/svg/nsSVGIntegrationUtils.cpp index 07d37e3cdcf8..215cc38ac2fc 100644 --- a/layout/svg/nsSVGIntegrationUtils.cpp +++ b/layout/svg/nsSVGIntegrationUtils.cpp @@ -750,9 +750,9 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams) return DrawResult::SUCCESS; } - if (maskUsage.opacity == 0.0f) { - return DrawResult::SUCCESS; - } + // XXX Bug 1323912. + MOZ_ASSERT(maskUsage.opacity == 1.0, + "nsSVGIntegrationUtils::PaintMask can not handle opacity now."); gfxContext& ctx = aParams.ctx; nsIFrame* firstFrame = @@ -761,10 +761,7 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams) nsSVGEffects::GetEffectProperties(firstFrame); DrawResult result = DrawResult::SUCCESS; - nsPoint offsetToBoundingBox; - nsPoint offsetToUserSpace; - gfxContextMatrixAutoSaveRestore matSR; - RefPtr maskTarget = ctx.GetDrawTarget(); + RefPtr maskTarget = ctx.GetDrawTarget(); if (maskUsage.shouldGenerateMaskLayer && maskUsage.shouldGenerateClipMaskLayer) { @@ -778,19 +775,25 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams) SurfaceFormat::A8); } + gfxContextMatrixAutoSaveRestore matSR; + nsPoint offsetToBoundingBox; + nsPoint offsetToUserSpace; + + // Paint clip-path-basic-shape onto ctx + gfxContextAutoSaveRestore basicShapeSR; if (maskUsage.shouldApplyBasicShape) { matSR.SetContext(&ctx); SetupContextMatrix(firstFrame, aParams, offsetToBoundingBox, offsetToUserSpace); + basicShapeSR.SetContext(&ctx); nsCSSClipPathInstance::ApplyBasicShapeClip(ctx, frame); if (!maskUsage.shouldGenerateMaskLayer) { // Only have basic-shape clip-path effect. Fill clipped region by // opaque white. - ctx.SetColor(Color(0.0, 0.0, 0.0, 1.0)); + ctx.SetColor(Color(1.0, 1.0, 1.0, 1.0)); ctx.Fill(); - ctx.PopClip(); return result; } @@ -804,26 +807,15 @@ nsSVGIntegrationUtils::PaintMask(const PaintFramesParams& aParams) SetupContextMatrix(frame, aParams, offsetToBoundingBox, offsetToUserSpace); nsTArray maskFrames = effectProperties.GetMaskFrames(); - // XXX Bug 1323912. - MOZ_ASSERT(maskUsage.opacity == 1.0, - "nsSVGIntegrationUtils::PaintMask can not handle opacity now."); + result = PaintMaskSurface(aParams, maskTarget, 1.0, firstFrame->StyleContext(), maskFrames, ctx.CurrentMatrix(), offsetToUserSpace); if (result != DrawResult::SUCCESS) { - if (maskUsage.shouldApplyBasicShape) { - ctx.PopClip(); - } - return result; } } - if (maskUsage.shouldApplyBasicShape) { - ctx.PopClip(); - return result; - } - // Paint clip-path onto ctx. if (maskUsage.shouldGenerateClipMaskLayer || maskUsage.shouldApplyClipPath) { matSR.Restore(); @@ -1027,7 +1019,20 @@ nsSVGIntegrationUtils::PaintMaskAndClipPath(const PaintFramesParams& aParams) nsLayoutUtils::RectToGfxRect(aParams.borderArea, frame->PresContext()->AppUnitsPerDevPixel()); context.Rectangle(drawingRect, true); - context.SetColor(Color(0.0, 1.0, 0.0, 1.0)); + Color overlayColor(0.0f, 0.0f, 0.0f, 0.8f); + if (maskUsage.shouldGenerateMaskLayer) { + overlayColor.r = 1.0f; // red represents css positioned mask. + } + if (maskUsage.shouldApplyClipPath || + maskUsage.shouldGenerateClipMaskLayer) { + overlayColor.g = 1.0f; // green represents clip-path:. + } + if (maskUsage.shouldApplyBasicShape) { + overlayColor.b = 1.0f; // blue represents + // clip-path:||. + } + + context.SetColor(overlayColor); context.Fill(); } diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index ee95a30ce1f6..fe9a4a699ab5 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -320,11 +320,10 @@ nsTableCellFrame::DecorateForSelection(DrawTarget* aDrawTarget, nsPoint aPt) LookAndFeel::GetColor(LookAndFeel::eColorID_TextSelectBackground); } nscoord threePx = nsPresContext::CSSPixelsToAppUnits(3); - if ((mRect.width > threePx) && (mRect.height > threePx)) - { - //compare bordercolor to ((nsStyleColor *)myColor)->mBackgroundColor) - bordercolor = EnsureDifferentColors(bordercolor, - StyleBackground()->mBackgroundColor); + if ((mRect.width > threePx) && (mRect.height > threePx)) { + //compare bordercolor to background-color + bordercolor = EnsureDifferentColors( + bordercolor, StyleBackground()->BackgroundColor(this)); int32_t appUnitsPerDevPixel = PresContext()->AppUnitsPerDevPixel(); Point devPixelOffset = NSPointToPoint(aPt, appUnitsPerDevPixel); @@ -501,7 +500,8 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, // display background if we need to. if (aBuilder->IsForEventDelivery() || - !StyleBackground()->IsTransparent() || StyleDisplay()->mAppearance) { + !StyleBackground()->IsTransparent(this) || + StyleDisplay()->mAppearance) { if (!tableFrame->IsBorderCollapse() || aBuilder->IsAtRootOfPseudoStackingContext() || aBuilder->IsForEventDelivery()) { diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 6f98dd65e934..296c9a7ae634 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -1285,7 +1285,7 @@ static inline bool FrameHasBorderOrBackground(nsTableFrame* tableFrame, nsIFrame if (f->StyleBorder()->HasBorder()) { return true; } - if (!f->StyleBackground()->IsTransparent() || + if (!f->StyleBackground()->IsTransparent(f) || f->StyleDisplay()->mAppearance) { nsTableCellFrame *cellFrame = do_QueryFrame(f); @@ -6362,7 +6362,7 @@ public: nsTableCellMap* mTableCellMap; nsCellMap* mCellMap; WritingMode mTableWM; - const nsStyleBackground* mTableBgColor; + nscolor mTableBgColor; nsTableFrame::RowGroupArray mRowGroups; nsTableRowGroupFrame* mPrevRg; @@ -6480,7 +6480,7 @@ BCPaintBorderIterator::BCPaintBorderIterator(nsTableFrame* aTable) nsIFrame* bgFrame = nsCSSRendering::FindNonTransparentBackgroundFrame(aTable); - mTableBgColor = bgFrame->StyleBackground(); + mTableBgColor = bgFrame->StyleBackground()->BackgroundColor(bgFrame); } bool diff --git a/media/libpng/CHANGES b/media/libpng/CHANGES index 9dd82b434519..f4636eed1aff 100644 --- a/media/libpng/CHANGES +++ b/media/libpng/CHANGES @@ -5754,6 +5754,26 @@ Version 1.6.26 [October 20, 2016] Cosmetic change, "ptr != 0" to "ptr != NULL" in png.c and pngrutil.c Despammed email addresses (replaced "@" with " at "). +Version 1.6.27beta01 [November 2, 2016] + Restrict the new ADLER32-skipping to IDAT chunks. It broke iCCP chunk + handling: an erroneous iCCP chunk would throw a png_error and reject the + entire PNG image instead of rejecting just the iCCP chunk with a warning, + if built with zlib-1.2.8.1. + +Version 1.6.27rc01 [December 27, 2016] + Control ADLER32 checking with new PNG_IGNORE_ADLER32 option. + Removed the use of a macro containing the pre-processor 'defined' + operator. It is unclear whether this is valid; a macro that + "generates" 'defined' is not permitted, but the use of the word + "generates" within the C90 standard seems to imply more than simple + substitution of an expression itself containing a well-formed defined + operation. + Added ARM support to CMakeLists.txt (Andreas Franek). + +Version 1.6.27 [December 29, 2016] + Fixed a potential null pointer dereference in png_set_text_2() (bug report + and patch by Patrick Keshishian). + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/media/libpng/LICENSE b/media/libpng/LICENSE index 0fe5eadff406..852dea73039d 100644 --- a/media/libpng/LICENSE +++ b/media/libpng/LICENSE @@ -26,7 +26,7 @@ Copyright (c) 2016 Google, Inc., and consist of the source files in the This code is released under the libpng license. -libpng versions 1.0.7, July 1, 2000 through 1.6.26, Octoaber 20, 2016 are +libpng versions 1.0.7, July 1, 2000 through 1.6.27, December 29, 2016 are Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are derived from libpng-1.0.6, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals @@ -143,4 +143,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and Glenn Randers-Pehrson glennrp at users.sourceforge.net -October 20, 2016 +December 29, 2016 diff --git a/media/libpng/MOZCHANGES b/media/libpng/MOZCHANGES index 87a11d689f2c..8ca7669557c6 100644 --- a/media/libpng/MOZCHANGES +++ b/media/libpng/MOZCHANGES @@ -1,6 +1,8 @@ Changes made to pristine libpng source by mozilla.org developers. +2016/12/29 -- Synced with libpng-1.6.27 (bug #1326234). + 2016/10/20 -- Synced with libpng-1.6.26 (bug #1311776). 2016/09/01 -- Synced with libpng-1.6.25 (bug #1299590). diff --git a/media/libpng/README b/media/libpng/README index 709c269d0bfb..87e5d1f084ca 100644 --- a/media/libpng/README +++ b/media/libpng/README @@ -1,4 +1,4 @@ -README for libpng version 1.6.26 - October 20, 2016 (shared library 16.0) +README for libpng version 1.6.27 - December 29, 2016 (shared library 16.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. diff --git a/media/libpng/apng.patch b/media/libpng/apng.patch index 58fdafd9b80e..05e7756ccb39 100644 --- a/media/libpng/apng.patch +++ b/media/libpng/apng.patch @@ -14,7 +14,7 @@ Index: LICENSE + This code is released under the libpng license. - libpng versions 1.0.7, July 1, 2000 through 1.6.26, October 20, 2016 are + libpng versions 1.0.7, July 1, 2000 through 1.6.27, December 29, 2016 are Index: pngread.c =================================================================== --- pngread.c @@ -97,7 +97,7 @@ Index: pngread.c + /* discard trailing fdATs for frames other than the first */ + if (have_chunk_after_DAT == 0 && png_ptr->num_frames_read > 1) + png_crc_finish(png_ptr, length - 4); -+ else if(png_ptr->mode & PNG_HAVE_fcTL) ++ else if (png_ptr->mode & PNG_HAVE_fcTL) + { + png_ptr->idat_size = length - 4; + png_ptr->mode |= PNG_HAVE_IDAT; @@ -295,12 +295,12 @@ Index: png.c =================================================================== --- png.c +++ png.c -@@ -775,17 +775,21 @@ +@@ -776,17 +776,21 @@ #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ -- "libpng version 1.6.26 - October 20, 2016" PNG_STRING_NEWLINE \ -+ "libpng version 1.6.26+apng - October 20, 2016" PNG_STRING_NEWLINE \ +- "libpng version 1.6.27 - December 29, 2016" PNG_STRING_NEWLINE \ ++ "libpng version 1.6.27+apng - December 29, 2016" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson" \ PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ @@ -310,8 +310,8 @@ Index: png.c + "Portions Copyright (c) 2006-2007 Andrew Smith" PNG_STRING_NEWLINE \ + "Portions Copyright (c) 2008-2016 Max Stepin" PNG_STRING_NEWLINE ; # else -- return "libpng version 1.6.26 - October 20, 2016\ -+ return "libpng version 1.6.26+apng - October 20, 2016\ +- return "libpng version 1.6.27 - December 29, 2016\ ++ return "libpng version 1.6.27+apng - December 29, 2016\ Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ - Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; @@ -342,11 +342,11 @@ Index: png.h */ /* Version information for png.h - this should match the version in png.c */ --#define PNG_LIBPNG_VER_STRING "1.6.26" --#define PNG_HEADER_VERSION_STRING " libpng version 1.6.26 - October 20, 2016\n" -+#define PNG_LIBPNG_VER_STRING "1.6.26+apng" +-#define PNG_LIBPNG_VER_STRING "1.6.27" +-#define PNG_HEADER_VERSION_STRING " libpng version 1.6.27 - December 29, 2016\n" ++#define PNG_LIBPNG_VER_STRING "1.6.27+apng" +#define PNG_HEADER_VERSION_STRING \ -+ " libpng version 1.6.26+apng - October 20, 2016\n" ++ " libpng version 1.6.27+apng - December 29, 2016\n" #define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_DLLNUM 16 @@ -401,7 +401,7 @@ Index: png.h /* The following callback receives png_uint_32 row_number, int pass for the * png_bytep data of the row. When transforming an interlaced image the -@@ -3246,6 +3276,75 @@ +@@ -3247,6 +3277,75 @@ * END OF HARDWARE AND SOFTWARE OPTIONS ******************************************************************************/ @@ -477,7 +477,7 @@ Index: png.h /* Maintainer: Put new public prototypes here ^, in libpng.3, in project * defs, and in scripts/symbols.def. */ -@@ -3254,7 +3353,11 @@ +@@ -3255,7 +3354,11 @@ * one to use is one more than this.) */ #ifdef PNG_EXPORT_LAST_ORDINAL @@ -1097,7 +1097,7 @@ Index: pngrutil.c =================================================================== --- pngrutil.c +++ pngrutil.c -@@ -860,6 +860,11 @@ +@@ -861,6 +861,11 @@ filter_type = buf[11]; interlace_type = buf[12]; @@ -1109,7 +1109,7 @@ Index: pngrutil.c /* Set internal variables */ png_ptr->width = width; png_ptr->height = height; -@@ -2760,6 +2765,180 @@ +@@ -2761,6 +2766,180 @@ } #endif @@ -1290,7 +1290,7 @@ Index: pngrutil.c #ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED /* Utility function for png_handle_unknown; set up png_ptr::unknown_chunk */ static int -@@ -4022,6 +4201,38 @@ +@@ -4023,6 +4202,38 @@ uInt avail_in; png_bytep buffer; @@ -1329,7 +1329,7 @@ Index: pngrutil.c while (png_ptr->idat_size == 0) { png_crc_finish(png_ptr, 0); -@@ -4033,6 +4244,7 @@ +@@ -4034,6 +4245,7 @@ if (png_ptr->chunk_name != png_IDAT) png_error(png_ptr, "Not enough image data"); } @@ -1337,7 +1337,7 @@ Index: pngrutil.c avail_in = png_ptr->IDAT_read_size; -@@ -4096,6 +4308,9 @@ +@@ -4097,6 +4309,9 @@ png_ptr->mode |= PNG_AFTER_IDAT; png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; @@ -1347,7 +1347,7 @@ Index: pngrutil.c if (png_ptr->zstream.avail_in > 0 || png_ptr->idat_size > 0) png_chunk_benign_error(png_ptr, "Extra compressed data"); -@@ -4542,4 +4757,80 @@ +@@ -4535,4 +4750,80 @@ png_ptr->flags |= PNG_FLAG_ROW_INIT; } diff --git a/media/libpng/libpng-manual.txt b/media/libpng/libpng-manual.txt index a5cd8eeb111f..457a5c6d0f9e 100644 --- a/media/libpng/libpng-manual.txt +++ b/media/libpng/libpng-manual.txt @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.6.26 - October 20, 2016 + libpng version 1.6.27 - December 29, 2016 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2016 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.6.26 - October 20, 2016 + libpng versions 0.97, January 1998, through 1.6.27 - December 29, 2016 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2016 Glenn Randers-Pehrson @@ -5355,7 +5355,7 @@ Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.26 are Y2K compliant. It is my belief that earlier +upward through 1.6.27 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has two year fields. One is a 2-byte unsigned integer diff --git a/media/libpng/png.c b/media/libpng/png.c index e6fe517220ac..ff01dfe15619 100644 --- a/media/libpng/png.c +++ b/media/libpng/png.c @@ -1,7 +1,7 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.6.26 [October 20, 2016] + * Last changed in libpng 1.6.27 [December 29, 2016] * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -14,7 +14,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_26 Your_png_h_is_not_version_1_6_26; +typedef png_libpng_version_1_6_27 Your_png_h_is_not_version_1_6_27; /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another @@ -477,6 +477,7 @@ png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask, png_free(png_ptr, info_ptr->text); info_ptr->text = NULL; info_ptr->num_text = 0; + info_ptr->max_text = 0; } } #endif @@ -775,7 +776,7 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.6.26+apng - October 20, 2016" PNG_STRING_NEWLINE \ + "libpng version 1.6.27+apng - December 29, 2016" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson" \ PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ @@ -784,7 +785,7 @@ png_get_copyright(png_const_structrp png_ptr) "Portions Copyright (c) 2006-2007 Andrew Smith" PNG_STRING_NEWLINE \ "Portions Copyright (c) 2008-2016 Max Stepin" PNG_STRING_NEWLINE ; # else - return "libpng version 1.6.26+apng - October 20, 2016\ + return "libpng version 1.6.27+apng - December 29, 2016\ Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\ diff --git a/media/libpng/png.h b/media/libpng/png.h index 7c9c0f1fbfb1..38b32e36bac2 100644 --- a/media/libpng/png.h +++ b/media/libpng/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.6.26, October 20, 2016 + * libpng version 1.6.27, December 29, 2016 * * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) @@ -12,7 +12,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.6.26, October 20, 2016: + * libpng versions 0.97, January 1998, through 1.6.27, December 29, 2016: * Glenn Randers-Pehrson. * See also "Contributing Authors", below. */ @@ -29,19 +29,13 @@ * and are delimited by "#ifdef PNG_APNG_SUPPORTED / #endif" directives * surrounding them in the modified libpng source files. * - * This modified version of libpng code adds Intel-SSE support and is - * released under the libpng license described below. The modifications are - * Copyright (c) 2016 Google, Inc., and consist of the source files in the - * "sse2" subdirectory and added code in pngpriv.h delimited by - * #ifndef PNG_INTEL_SSE_OPT / #endif directives. - * * This code is released under the libpng license. * * Some files in the "contrib" directory and some configure-generated * files that are distributed with libpng have other copyright owners and * are released under other open source licenses. * - * libpng versions 1.0.7, July 1, 2000 through 1.6.26, October 20, 2016 are + * libpng versions 1.0.7, July 1, 2000 through 1.6.27, December 29, 2016 are * Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are * derived from libpng-1.0.6, and are distributed according to the same * disclaimer and license as libpng-1.0.6 with the following individuals @@ -230,7 +224,7 @@ * ... * 1.5.27 15 10527 15.so.15.27[.0] * ... - * 1.6.26 16 10626 16.so.16.26[.0] + * 1.6.27 16 10627 16.so.16.27[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -258,13 +252,13 @@ * Y2K compliance in libpng: * ========================= * - * October 20, 2016 + * December 29, 2016 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.6.26 are Y2K compliant. It is my belief that + * upward through 1.6.27 are Y2K compliant. It is my belief that * earlier versions were also Y2K compliant. * * Libpng only has two year fields. One is a 2-byte unsigned integer @@ -326,9 +320,9 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.6.26+apng" +#define PNG_LIBPNG_VER_STRING "1.6.27+apng" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.6.26+apng - October 20, 2016\n" + " libpng version 1.6.27+apng - December 29, 2016\n" #define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_DLLNUM 16 @@ -336,7 +330,7 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 6 -#define PNG_LIBPNG_VER_RELEASE 26 +#define PNG_LIBPNG_VER_RELEASE 27 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: @@ -367,7 +361,7 @@ * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10626 /* 1.6.26 */ +#define PNG_LIBPNG_VER 10627 /* 1.6.27 */ /* Library configuration: these options cannot be changed after * the library has been built. @@ -492,7 +486,7 @@ extern "C" { /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef char* png_libpng_version_1_6_26; +typedef char* png_libpng_version_1_6_27; /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. * @@ -3266,7 +3260,8 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory, #ifdef PNG_MIPS_MSA_API_SUPPORTED # define PNG_MIPS_MSA 6 /* HARDWARE: MIPS Msa SIMD instructions supported */ #endif -#define PNG_OPTION_NEXT 8 /* Next option - numbers must be even */ +#define PNG_IGNORE_ADLER32 8 +#define PNG_OPTION_NEXT 10 /* Next option - numbers must be even */ /* Return values: NOTE: there are four values and 'off' is *not* zero */ #define PNG_OPTION_UNSET 0 /* Unset - defaults to off */ diff --git a/media/libpng/pngconf.h b/media/libpng/pngconf.h index 5c891eb8b8ce..d1b746aa7a54 100644 --- a/media/libpng/pngconf.h +++ b/media/libpng/pngconf.h @@ -1,7 +1,7 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.6.26, October 20, 2016 + * libpng version 1.6.27, December 29, 2016 * * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) diff --git a/media/libpng/pngread.c b/media/libpng/pngread.c index 0fac203dfd7f..c11c52570f20 100644 --- a/media/libpng/pngread.c +++ b/media/libpng/pngread.c @@ -317,7 +317,7 @@ png_read_frame_head(png_structp png_ptr, png_infop info_ptr) /* discard trailing fdATs for frames other than the first */ if (have_chunk_after_DAT == 0 && png_ptr->num_frames_read > 1) png_crc_finish(png_ptr, length - 4); - else if(png_ptr->mode & PNG_HAVE_fcTL) + else if (png_ptr->mode & PNG_HAVE_fcTL) { png_ptr->idat_size = length - 4; png_ptr->mode |= PNG_HAVE_IDAT; diff --git a/media/libpng/pngrutil.c b/media/libpng/pngrutil.c index 8537df45d265..b547e109e2ac 100644 --- a/media/libpng/pngrutil.c +++ b/media/libpng/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.6.26 [October 20, 2016] + * Last changed in libpng 1.6.27 [December 29, 2016] * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -418,9 +418,10 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner) png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED; } -#if ZLIB_VERNUM >= 0x1281 - /* Turn off validation of the ADLER32 checksum */ - if ((png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) != 0) +#if ZLIB_VERNUM >= 0x1281 && \ + defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_IGNORE_ADLER32) + if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON) + /* Turn off validation of the ADLER32 checksum in IDAT chunks */ ret = inflateValidate(&png_ptr->zstream, 0); #endif @@ -716,7 +717,7 @@ png_decompress_chunk(png_structrp png_ptr, * the extra space may otherwise be used as a Trojan Horse. */ if (ret == Z_STREAM_END && - chunklength - prefix_size != lzsize) + chunklength - prefix_size != lzsize) png_chunk_benign_error(png_ptr, "extra compressed data"); } @@ -826,7 +827,7 @@ png_inflate_read(png_structrp png_ptr, png_bytep read_buffer, uInt read_size, return Z_STREAM_ERROR; } } -#endif +#endif /* READ_iCCP */ /* Read and check the IDHR chunk */ @@ -4322,15 +4323,7 @@ png_read_IDAT_data(png_structrp png_ptr, png_bytep output, png_zstream_error(png_ptr, ret); if (output != NULL) - { - if(!strncmp(png_ptr->zstream.msg,"incorrect data check",20)) - { - png_chunk_benign_error(png_ptr, "ADLER32 checksum mismatch"); - continue; - } - else - png_chunk_error(png_ptr, png_ptr->zstream.msg); - } + png_chunk_error(png_ptr, png_ptr->zstream.msg); else /* checking */ { diff --git a/media/mtransport/nricectx.cpp b/media/mtransport/nricectx.cpp index 60147fea1807..adc712414416 100644 --- a/media/mtransport/nricectx.cpp +++ b/media/mtransport/nricectx.cpp @@ -971,6 +971,16 @@ nsresult NrIceCtx::Finalize() { return NS_OK; } +void NrIceCtx::UpdateNetworkState(bool online) { + MOZ_MTLOG(ML_INFO, "NrIceCtx(" << name_ << "): updating network state to " << + (online ? "online" : "offline")); + if (online) { + nr_ice_peer_ctx_refresh_consent_all_streams(peer_); + } else { + nr_ice_peer_ctx_disconnect_all_streams(peer_); + } +} + void NrIceCtx::SetConnectionState(ConnectionState state) { if (state == connection_state_) return; diff --git a/media/mtransport/nricectx.h b/media/mtransport/nricectx.h index e6a8a34b567e..a25ff62ba7eb 100644 --- a/media/mtransport/nricectx.h +++ b/media/mtransport/nricectx.h @@ -314,6 +314,9 @@ class NrIceCtx { // Start checking nsresult StartChecks(); + // Notify that the network has gone online/offline + void UpdateNetworkState(bool online); + // Finalize the ICE negotiation. I.e., there will be no // more forking. nsresult Finalize(); diff --git a/media/mtransport/test/ice_unittest.cpp b/media/mtransport/test/ice_unittest.cpp index 0b3216353094..cdcec82ec2c6 100644 --- a/media/mtransport/test/ice_unittest.cpp +++ b/media/mtransport/test/ice_unittest.cpp @@ -1366,6 +1366,26 @@ class IceTestPeer : public sigslot::has_slots<> { NS_DISPATCH_SYNC); } + void ChangeNetworkState_s(bool online) { + ice_ctx_->ctx()->UpdateNetworkState(online); + } + + void ChangeNetworkStateToOffline() { + test_utils_->sts_target()->Dispatch( + WrapRunnable(this, + &IceTestPeer::ChangeNetworkState_s, + false), + NS_DISPATCH_SYNC); + } + + void ChangeNetworkStateToOnline() { + test_utils_->sts_target()->Dispatch( + WrapRunnable(this, + &IceTestPeer::ChangeNetworkState_s, + true), + NS_DISPATCH_SYNC); + } + int trickled() { return trickled_; } void SetControlling(NrIceCtx::Controlling controlling) { @@ -3350,6 +3370,49 @@ TEST_F(WebRtcIceConnectTest, TestConsentDelayed) { SendReceive(); } +TEST_F(WebRtcIceConnectTest, TestNetworkForcedOfflineAndRecovery) { + AddStream(1); + SetupAndCheckConsent(); + p1_->ChangeNetworkStateToOffline(); + ASSERT_TRUE_WAIT(p1_->ice_connected() == 0, kDefaultTimeout); + // Next round of consent check should switch it back to online + ASSERT_TRUE_WAIT(p1_->ice_connected(), kDefaultTimeout); +} + +TEST_F(WebRtcIceConnectTest, TestNetworkForcedOfflineTwice) { + AddStream(1); + SetupAndCheckConsent(); + p2_->ChangeNetworkStateToOffline(); + ASSERT_TRUE_WAIT(p2_->ice_connected() == 0, kDefaultTimeout); + p2_->ChangeNetworkStateToOffline(); + ASSERT_TRUE_WAIT(p2_->ice_connected() == 0, kDefaultTimeout); +} + +TEST_F(WebRtcIceConnectTest, TestNetworkOnlineDoesntChangeState) { + AddStream(1); + SetupAndCheckConsent(); + p2_->ChangeNetworkStateToOnline(); + ASSERT_TRUE(p2_->ice_connected()); + PR_Sleep(1500); + p2_->ChangeNetworkStateToOnline(); + ASSERT_TRUE(p2_->ice_connected()); +} + +TEST_F(WebRtcIceConnectTest, TestNetworkOnlineTriggersConsent) { + // Let's emulate audio + video w/o rtcp-mux + AddStream(2); + AddStream(2); + SetupAndCheckConsent(); + p1_->ChangeNetworkStateToOffline(); + p1_->SetBlockStun(true); + ASSERT_TRUE_WAIT(p1_->ice_connected() == 0, kDefaultTimeout); + PR_Sleep(1500); + ASSERT_TRUE(p1_->ice_connected() == 0); + p1_->SetBlockStun(false); + p1_->ChangeNetworkStateToOnline(); + ASSERT_TRUE_WAIT(p1_->ice_connected(), 500); +} + TEST_F(WebRtcIceConnectTest, TestConnectTurn) { if (turn_server_.empty()) return; diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_component.c b/media/mtransport/third_party/nICEr/src/ice/ice_component.c index 2be25efca370..fc67183687af 100644 --- a/media/mtransport/third_party/nICEr/src/ice/ice_component.c +++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.c @@ -1242,13 +1242,22 @@ static void nr_ice_component_consent_timeout_cb(NR_SOCKET s, int how, void *cb_a } -static void nr_ice_component_consent_request_timed_out(nr_ice_component *comp) +void nr_ice_component_disconnected(nr_ice_component *comp) { if (!comp->can_send) { return; } - nr_ice_peer_ctx_disconnected(comp->stream->pctx); + if (comp->disconnected) { + return; + } + + r_log(LOG_ICE,LOG_WARNING,"ICE(%s)/STREAM(%s)/COMP(%d): component disconnected", + comp->ctx->label, comp->stream->label, comp->component_id); + comp->disconnected = 1; + + /* a single disconnected component disconnects the stream */ + nr_ice_media_stream_set_disconnected(comp->stream, NR_ICE_MEDIA_STREAM_DISCONNECTED); } static void nr_ice_component_consent_refreshed(nr_ice_component *comp) @@ -1264,7 +1273,9 @@ static void nr_ice_component_consent_refreshed(nr_ice_component *comp) comp->ctx->label, comp->stream->label, comp->component_id, comp->consent_last_seen.tv_sec); - nr_ice_peer_ctx_connected(comp->stream->pctx); + comp->disconnected = 0; + + nr_ice_media_stream_check_if_connected(comp->stream); if (comp->consent_timeout) NR_async_timer_cancel(comp->consent_timeout); @@ -1297,7 +1308,7 @@ static void nr_ice_component_refresh_consent_cb(NR_SOCKET s, int how, void *cb_a case NR_STUN_CLIENT_STATE_TIMED_OUT: r_log(LOG_ICE, LOG_INFO, "ICE(%s)/STREAM(%s)/COMP(%d): A single consent refresh request timed out", comp->ctx->label, comp->stream->label, comp->component_id); - nr_ice_component_consent_request_timed_out(comp); + nr_ice_component_disconnected(comp); break; default: break; @@ -1340,6 +1351,9 @@ static void nr_ice_component_consent_timer_cb(NR_SOCKET s, int how, void *cb_arg nr_ice_component *comp=cb_arg; int r; + if (comp->consent_timer) { + NR_async_timer_cancel(comp->consent_timer); + } comp->consent_timer = 0; comp->consent_ctx->params.ice_binding_request.username = @@ -1361,12 +1375,6 @@ static void nr_ice_component_consent_timer_cb(NR_SOCKET s, int how, void *cb_arg comp)) { r_log(LOG_ICE,LOG_ERR,"ICE(%s)/STREAM(%s)/COMP(%d): Refresh consent failed with %d", comp->ctx->label, comp->stream->label, comp->component_id, r); - /* In case our attempt to send the refresh binding request reports an - * error we don't have to wait for timeouts, but declare this connection - * dead right away. */ - if (r != R_WOULDBLOCK) { - nr_ice_component_consent_failed(comp); - } } nr_ice_component_consent_schedule_consent_timer(comp); @@ -1384,6 +1392,11 @@ void nr_ice_component_consent_schedule_consent_timer(nr_ice_component *comp) &comp->consent_timer); } +void nr_ice_component_refresh_consent_now(nr_ice_component *comp) + { + nr_ice_component_consent_timer_cb(0, 0, comp); + } + void nr_ice_component_consent_destroy(nr_ice_component *comp) { if (comp->consent_timer) { @@ -1401,6 +1414,7 @@ void nr_ice_component_consent_destroy(nr_ice_component *comp) } if (comp->consent_ctx) { nr_stun_client_ctx_destroy(&comp->consent_ctx); + comp->consent_ctx = 0; } } @@ -1411,6 +1425,8 @@ int nr_ice_component_setup_consent(nr_ice_component *comp) r_log(LOG_ICE,LOG_DEBUG,"ICE(%s)/STREAM(%s)/COMP(%d): Setting up refresh consent", comp->ctx->label, comp->stream->label, comp->component_id); + nr_ice_component_consent_destroy(comp); + if (r=nr_stun_client_ctx_create("consent", comp->active->local->osock, &comp->active->remote->addr, 0, &comp->consent_ctx)) @@ -1423,6 +1439,7 @@ int nr_ice_component_setup_consent(nr_ice_component *comp) ABORT(r); comp->can_send = 1; + comp->disconnected = 0; nr_ice_component_consent_refreshed(comp); nr_ice_component_consent_calc_consent_timer(comp); diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_component.h b/media/mtransport/third_party/nICEr/src/ice/ice_component.h index 5bb0ea1e7a68..014119e13c3d 100644 --- a/media/mtransport/third_party/nICEr/src/ice/ice_component.h +++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.h @@ -75,6 +75,7 @@ struct nr_ice_component_ { void *consent_timeout; void *consent_handle; int can_send; + int disconnected; struct timeval consent_last_seen; STAILQ_ENTRY(nr_ice_component_)entry; @@ -97,6 +98,8 @@ int nr_ice_component_set_failed(nr_ice_component *comp); int nr_ice_component_finalize(nr_ice_component *lcomp, nr_ice_component *rcomp); int nr_ice_component_insert_pair(nr_ice_component *pcomp, nr_ice_cand_pair *pair); int nr_ice_component_get_default_candidate(nr_ice_component *comp, nr_ice_candidate **candp, int ip_version); +void nr_ice_component_refresh_consent_now(nr_ice_component *comp); +void nr_ice_component_disconnected(nr_ice_component *comp); #ifdef __cplusplus } diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.c b/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.c index b93e45aeb0fa..aaaafde581d5 100644 --- a/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.c +++ b/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.c @@ -43,7 +43,7 @@ static char *RCSSTRING __UNUSED__="$Id: ice_media_stream.c,v 1.2 2008/04/28 17:5 #include "ice_ctx.h" static char *nr_ice_media_stream_states[]={"INVALID", - "UNPAIRED","FROZEN","ACTIVE","COMPLETED","FAILED" + "UNPAIRED","FROZEN","ACTIVE","CONNECTED","FAILED" }; int nr_ice_media_stream_set_state(nr_ice_media_stream *str, int state); @@ -74,6 +74,7 @@ int nr_ice_media_stream_create(nr_ice_ctx *ctx,char *label,int components, nr_ic TAILQ_INIT(&stream->check_list); TAILQ_INIT(&stream->trigger_check_queue); + stream->disconnected = 0; stream->component_ct=components; stream->ice_state = NR_ICE_MEDIA_STREAM_UNPAIRED; *streamp=stream; @@ -339,7 +340,7 @@ static void nr_ice_media_stream_check_timer_cb(NR_SOCKET s, int h, void *cb_arg) pair=TAILQ_NEXT(pair,triggered_check_queue_entry); } - if (stream->ice_state != NR_ICE_MEDIA_STREAM_CHECKS_COMPLETED) { + if (stream->ice_state != NR_ICE_MEDIA_STREAM_CHECKS_CONNECTED) { if(!pair){ /* Find the highest priority WAITING check and move it to RUNNING */ pair=TAILQ_FIRST(&stream->check_list); @@ -392,7 +393,7 @@ int nr_ice_media_stream_start_checks(nr_ice_peer_ctx *pctx, nr_ice_media_stream /* Even if the stream is completed already remote can still create a new * triggered check request which needs to fire, but not change our stream * state. */ - if (stream->ice_state != NR_ICE_MEDIA_STREAM_CHECKS_COMPLETED) { + if (stream->ice_state != NR_ICE_MEDIA_STREAM_CHECKS_CONNECTED) { if(r=nr_ice_media_stream_set_state(stream,NR_ICE_MEDIA_STREAM_CHECKS_ACTIVE)) { ABORT(r); } @@ -584,6 +585,80 @@ int nr_ice_media_stream_set_state(nr_ice_media_stream *str, int state) return(0); } + +void nr_ice_media_stream_refresh_consent_all(nr_ice_media_stream *stream) + { + nr_ice_component *comp; + + comp=STAILQ_FIRST(&stream->components); + while(comp){ + if((comp->state != NR_ICE_COMPONENT_DISABLED) && + (comp->local_component->state != NR_ICE_COMPONENT_DISABLED) && + comp->disconnected) { + nr_ice_component_refresh_consent_now(comp); + } + + comp=STAILQ_NEXT(comp,entry); + } + } + +void nr_ice_media_stream_disconnect_all_components(nr_ice_media_stream *stream) + { + nr_ice_component *comp; + + comp=STAILQ_FIRST(&stream->components); + while(comp){ + if((comp->state != NR_ICE_COMPONENT_DISABLED) && + (comp->local_component->state != NR_ICE_COMPONENT_DISABLED)) { + comp->disconnected = 1; + } + + comp=STAILQ_NEXT(comp,entry); + } + } + +void nr_ice_media_stream_set_disconnected(nr_ice_media_stream *stream, int disconnected) + { + if (stream->disconnected == disconnected) { + return; + } + + if (stream->ice_state != NR_ICE_MEDIA_STREAM_CHECKS_CONNECTED) { + return; + } + stream->disconnected = disconnected; + + if (disconnected == NR_ICE_MEDIA_STREAM_DISCONNECTED) { + nr_ice_peer_ctx_disconnected(stream->pctx); + } else { + nr_ice_peer_ctx_check_if_connected(stream->pctx); + } + } + +int nr_ice_media_stream_check_if_connected(nr_ice_media_stream *stream) + { + nr_ice_component *comp; + + comp=STAILQ_FIRST(&stream->components); + while(comp){ + if((comp->state != NR_ICE_COMPONENT_DISABLED) && + (comp->local_component->state != NR_ICE_COMPONENT_DISABLED) && + comp->disconnected) + break; + + comp=STAILQ_NEXT(comp,entry); + } + + /* At least one disconnected component */ + if(comp) + goto done; + + nr_ice_media_stream_set_disconnected(stream, NR_ICE_MEDIA_STREAM_CONNECTED); + + done: + return(0); + } + /* S OK, this component has a nominated. If every component has a nominated, the stream is ready */ int nr_ice_media_stream_component_nominated(nr_ice_media_stream *stream,nr_ice_component *component) @@ -607,7 +682,7 @@ int nr_ice_media_stream_component_nominated(nr_ice_media_stream *stream,nr_ice_c /* All done... */ r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s)/ICE-STREAM(%s): all active components have nominated candidate pairs",stream->pctx->label,stream->label); - nr_ice_media_stream_set_state(stream,NR_ICE_MEDIA_STREAM_CHECKS_COMPLETED); + nr_ice_media_stream_set_state(stream,NR_ICE_MEDIA_STREAM_CHECKS_CONNECTED); /* Cancel our timer */ if(stream->timer){ @@ -747,8 +822,12 @@ int nr_ice_media_stream_send(nr_ice_peer_ctx *pctx, nr_ice_media_stream *str, in 2. Use the address on the remote side */ if(r=nr_socket_sendto(comp->active->local->osock,data,len,0, - &comp->active->remote->addr)) + &comp->active->remote->addr)) { + if ((r==R_IO_ERROR) || (r==R_EOD)) { + nr_ice_component_disconnected(comp); + } ABORT(r); + } _status=0; abort: diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.h b/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.h index 3d818d5300ec..0730ed34444b 100644 --- a/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.h +++ b/media/mtransport/third_party/nICEr/src/ice/ice_media_stream.h @@ -59,9 +59,14 @@ struct nr_ice_media_stream_ { #define NR_ICE_MEDIA_STREAM_UNPAIRED 1 #define NR_ICE_MEDIA_STREAM_CHECKS_FROZEN 2 #define NR_ICE_MEDIA_STREAM_CHECKS_ACTIVE 3 -#define NR_ICE_MEDIA_STREAM_CHECKS_COMPLETED 4 +#define NR_ICE_MEDIA_STREAM_CHECKS_CONNECTED 4 #define NR_ICE_MEDIA_STREAM_CHECKS_FAILED 5 + int disconnected; + +#define NR_ICE_MEDIA_STREAM_CONNECTED 0 +#define NR_ICE_MEDIA_STREAM_DISCONNECTED 1 + nr_ice_cand_pair_head check_list; nr_ice_cand_pair_head trigger_check_queue; void *timer; /* Check list periodic timer */ @@ -87,6 +92,10 @@ int nr_ice_media_stream_unfreeze_pairs_foundation(nr_ice_media_stream *stream, c int nr_ice_media_stream_dump_state(nr_ice_peer_ctx *pctx, nr_ice_media_stream *stream,FILE *out); int nr_ice_media_stream_component_nominated(nr_ice_media_stream *stream,nr_ice_component *component); int nr_ice_media_stream_component_failed(nr_ice_media_stream *stream,nr_ice_component *component); +void nr_ice_media_stream_refresh_consent_all(nr_ice_media_stream *stream); +void nr_ice_media_stream_disconnect_all_components(nr_ice_media_stream *stream); +void nr_ice_media_stream_set_disconnected(nr_ice_media_stream *stream, int disconnected); +int nr_ice_media_stream_check_if_connected(nr_ice_media_stream *stream); int nr_ice_media_stream_set_state(nr_ice_media_stream *str, int state); int nr_ice_media_stream_get_best_candidate(nr_ice_media_stream *str, int component, nr_ice_candidate **candp); int nr_ice_media_stream_send(nr_ice_peer_ctx *pctx, nr_ice_media_stream *str, int component, UCHAR *data, int len); diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.c b/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.c index d494e45de606..fb92d4a0278d 100644 --- a/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.c +++ b/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.c @@ -648,12 +648,45 @@ int nr_ice_peer_ctx_dump_state(nr_ice_peer_ctx *pctx,FILE *out) } #endif +void nr_ice_peer_ctx_refresh_consent_all_streams(nr_ice_peer_ctx *pctx) + { + nr_ice_media_stream *str; + + r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s): refreshing consent on all streams",pctx->label); + + str=STAILQ_FIRST(&pctx->peer_streams); + while(str) { + nr_ice_media_stream_refresh_consent_all(str); + str=STAILQ_NEXT(str,entry); + } + } + void nr_ice_peer_ctx_disconnected(nr_ice_peer_ctx *pctx) { if (pctx->reported_connected && pctx->handler && pctx->handler->vtbl->ice_disconnected) { pctx->handler->vtbl->ice_disconnected(pctx->handler->obj, pctx); + + pctx->reported_connected = 0; + } + } + +void nr_ice_peer_ctx_disconnect_all_streams(nr_ice_peer_ctx *pctx) + { + nr_ice_media_stream *str; + + r_log(LOG_ICE,LOG_INFO,"ICE-PEER(%s): disconnecting all streams",pctx->label); + + str=STAILQ_FIRST(&pctx->peer_streams); + while(str) { + nr_ice_media_stream_disconnect_all_components(str); + + /* The first stream to be disconnected will cause the peer ctx to signal + the disconnect up. */ + nr_ice_media_stream_set_disconnected(str, NR_ICE_MEDIA_STREAM_DISCONNECTED); + + str=STAILQ_NEXT(str,entry); } } @@ -687,7 +720,7 @@ int nr_ice_peer_ctx_check_if_connected(nr_ice_peer_ctx *pctx) str=STAILQ_FIRST(&pctx->peer_streams); while(str){ - if(str->ice_state==NR_ICE_MEDIA_STREAM_CHECKS_COMPLETED){ + if(str->ice_state==NR_ICE_MEDIA_STREAM_CHECKS_CONNECTED){ succeeded++; } else if(str->ice_state==NR_ICE_MEDIA_STREAM_CHECKS_FAILED){ @@ -716,7 +749,6 @@ int nr_ice_peer_ctx_check_if_connected(nr_ice_peer_ctx *pctx) done: _status=0; -// abort: return(_status); } diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.h b/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.h index 47e3be70408a..0f6de9d0eb79 100644 --- a/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.h +++ b/media/mtransport/third_party/nICEr/src/ice/ice_peer_ctx.h @@ -83,6 +83,8 @@ int nr_ice_peer_ctx_parse_global_attributes(nr_ice_peer_ctx *pctx, char **attrs, int nr_ice_peer_ctx_start_checks(nr_ice_peer_ctx *pctx); int nr_ice_peer_ctx_start_checks2(nr_ice_peer_ctx *pctx, int allow_non_first); void nr_ice_peer_ctx_stream_started_checks(nr_ice_peer_ctx *pctx, nr_ice_media_stream *stream); +void nr_ice_peer_ctx_refresh_consent_all_streams(nr_ice_peer_ctx *pctx); +void nr_ice_peer_ctx_disconnect_all_streams(nr_ice_peer_ctx *pctx); void nr_ice_peer_ctx_disconnected(nr_ice_peer_ctx *pctx); void nr_ice_peer_ctx_connected(nr_ice_peer_ctx *pctx); int nr_ice_peer_ctx_dump_state(nr_ice_peer_ctx *pctx,FILE *out); diff --git a/media/mtransport/third_party/nICEr/src/stun/addrs.c b/media/mtransport/third_party/nICEr/src/stun/addrs.c index 6c7bc7a4bb91..f881acc06b14 100644 --- a/media/mtransport/third_party/nICEr/src/stun/addrs.c +++ b/media/mtransport/third_party/nICEr/src/stun/addrs.c @@ -243,7 +243,9 @@ stun_get_win32_addrs(nr_local_addr addrs[], int maxaddrs, int *count) _status = 0; abort: - RFREE(AdapterAddresses); + if (AdapterAddresses) { + RFREE(AdapterAddresses); + } return _status; } diff --git a/media/webrtc/signaling/gtest/jsep_session_unittest.cpp b/media/webrtc/signaling/gtest/jsep_session_unittest.cpp index f2f7aad7c49f..cb5060edb23b 100644 --- a/media/webrtc/signaling/gtest/jsep_session_unittest.cpp +++ b/media/webrtc/signaling/gtest/jsep_session_unittest.cpp @@ -824,21 +824,26 @@ protected: size_t transportLevel, const std::string& context) const { + Address expectedAddress = "0.0.0.0"; + Port expectedPort = 9U; + if (expectDefault) { // Copy so we can be terse and use [] auto defaultCandidates = mDefaultCandidates; - ASSERT_EQ(defaultCandidates[transportLevel][RTP].first, - msection.GetConnection().GetAddress()) - << context << " (level " << msection.GetLevel() << ")"; - ASSERT_EQ(defaultCandidates[transportLevel][RTP].second, - msection.GetPort()) - << context << " (level " << msection.GetLevel() << ")"; - } else { - ASSERT_EQ("0.0.0.0", msection.GetConnection().GetAddress()) - << context << " (level " << msection.GetLevel() << ")"; - ASSERT_EQ(9U, msection.GetPort()) - << context << " (level " << msection.GetLevel() << ")"; + expectedAddress = defaultCandidates[transportLevel][RTP].first; + expectedPort = defaultCandidates[transportLevel][RTP].second; } + + // if bundle-only attribute is present, expect port 0 + const SdpAttributeList& attrs = msection.GetAttributeList(); + if (attrs.HasAttribute(SdpAttribute::kBundleOnlyAttribute)) { + expectedPort = 0U; + } + + ASSERT_EQ(expectedAddress, msection.GetConnection().GetAddress()) + << context << " (level " << msection.GetLevel() << ")"; + ASSERT_EQ(expectedPort, msection.GetPort()) + << context << " (level " << msection.GetLevel() << ")"; } void CheckDefaultRtcpCandidate(bool expectDefault, @@ -1074,11 +1079,15 @@ private: ASSERT_EQ(SdpMediaSection::kUdpTlsRtpSavpf, msection.GetProtocol()); } - if (msection.GetPort() == 0) { + const SdpAttributeList& attrs = msection.GetAttributeList(); + bool bundle_only = attrs.HasAttribute(SdpAttribute::kBundleOnlyAttribute); + + // port 0 only means disabled when the bundle-only attribute is missing + if (!bundle_only && msection.GetPort() == 0) { ValidateDisabledMSection(&msection); continue; } - const SdpAttributeList& attrs = msection.GetAttributeList(); + ASSERT_EQ(source.mIceUfrag, attrs.GetIceUfrag()); ASSERT_EQ(source.mIcePwd, attrs.GetIcePwd()); const SdpFingerprintAttributeList& fps = attrs.GetFingerprint(); @@ -4152,10 +4161,12 @@ TEST_P(JsepSessionTest, TestMaxBundle) ASSERT_FALSE( parsedOffer->GetMediaSection(0).GetAttributeList().HasAttribute( SdpAttribute::kBundleOnlyAttribute)); + ASSERT_NE(0U, parsedOffer->GetMediaSection(0).GetPort()); for (size_t i = 1; i < parsedOffer->GetMediaSectionCount(); ++i) { ASSERT_TRUE( parsedOffer->GetMediaSection(i).GetAttributeList().HasAttribute( SdpAttribute::kBundleOnlyAttribute)); + ASSERT_EQ(0U, parsedOffer->GetMediaSection(i).GetPort()); } diff --git a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp index 5375110b60ed..0a6565edabee 100644 --- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp +++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp @@ -666,6 +666,8 @@ JsepSessionImpl::SetupBundle(Sdp* sdp) const if (useBundleOnly) { attrs.SetAttribute( new SdpFlagAttribute(SdpAttribute::kBundleOnlyAttribute)); + // Set port to 0 for sections with bundle-only attribute. (mjf) + sdp->GetMediaSection(i).SetPort(0); } mids.push_back(attrs.GetMid()); diff --git a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp index c78f923f482a..9d9eb5ecdd63 100644 --- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp +++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp @@ -1203,7 +1203,7 @@ void MediaPipeline::PacketReceived(TransportLayer *layer, } class MediaPipelineTransmit::PipelineListener - : public DirectMediaStreamTrackListener + : public MediaStreamVideoSink { friend class MediaPipelineTransmit; public: @@ -1291,15 +1291,17 @@ public: void NotifyDirectListenerInstalled(InstallationResult aResult) override; void NotifyDirectListenerUninstalled() override; + // Implement MediaStreamVideoSink + void SetCurrentFrames(const VideoSegment& aSegment) override; + void ClearFrames() override {} + private: void UnsetTrackIdImpl() { MutexAutoLock lock(mMutex); track_id_ = track_id_external_ = TRACK_INVALID; } - void NewData(MediaStreamGraph* graph, - StreamTime offset, - const MediaSegment& media); + void NewData(const MediaSegment& media, TrackRate aRate = 0); RefPtr conduit_; RefPtr audio_processing_; @@ -1388,34 +1390,6 @@ protected: }; #endif -class MediaPipelineTransmit::PipelineVideoSink : - public MediaStreamVideoSink -{ -public: - explicit PipelineVideoSink(const RefPtr& conduit, - MediaPipelineTransmit::PipelineListener* listener) - : conduit_(conduit) - , pipelineListener_(listener) - { - } - - virtual void SetCurrentFrames(const VideoSegment& aSegment) override; - virtual void ClearFrames() override {} - -private: - ~PipelineVideoSink() { - // release conduit on mainthread. Must use forget()! - nsresult rv = NS_DispatchToMainThread(new - ConduitDeleteEvent(conduit_.forget())); - MOZ_ASSERT(!NS_FAILED(rv),"Could not dispatch conduit shutdown to main"); - if (NS_FAILED(rv)) { - MOZ_CRASH(); - } - } - RefPtr conduit_; - MediaPipelineTransmit::PipelineListener* pipelineListener_; -}; - MediaPipelineTransmit::MediaPipelineTransmit( const std::string& pc, nsCOMPtr main_thread, @@ -1430,7 +1404,6 @@ MediaPipelineTransmit::MediaPipelineTransmit( MediaPipeline(pc, TRANSMIT, main_thread, sts_thread, track_id, level, conduit, rtp_transport, rtcp_transport, filter), listener_(new PipelineListener(conduit)), - video_sink_(new PipelineVideoSink(conduit, listener_)), domtrack_(domtrack) { if (!IsVideo()) { @@ -1488,10 +1461,6 @@ void MediaPipelineTransmit::AttachToTrack(const std::string& track_id) { domtrack_->AddDirectListener(listener_); domtrack_->AddListener(listener_); -#if !defined(MOZILLA_EXTERNAL_LINKAGE) - domtrack_->AddDirectListener(video_sink_); -#endif - #ifndef MOZILLA_INTERNAL_API // this enables the unit tests that can't fiddle with principals and the like listener_->SetEnabled(true); @@ -1540,7 +1509,6 @@ MediaPipelineTransmit::DetachMedia() if (domtrack_) { domtrack_->RemoveDirectListener(listener_); domtrack_->RemoveListener(listener_); - domtrack_->RemoveDirectListener(video_sink_); domtrack_ = nullptr; } // Let the listener be destroyed with the pipeline (or later). @@ -1743,7 +1711,14 @@ NotifyRealtimeTrackData(MediaStreamGraph* graph, this << ", offset=" << offset << ", duration=" << media.GetDuration()); - NewData(graph, offset, media); + if (media.GetType() == MediaSegment::VIDEO) { + // We have to call the upstream NotifyRealtimeTrackData and + // MediaStreamVideoSink will route them to SetCurrentFrames. + MediaStreamVideoSink::NotifyRealtimeTrackData(graph, offset, media); + return; + } + + NewData(media, graph->GraphRate()); } void MediaPipelineTransmit::PipelineListener:: @@ -1752,10 +1727,17 @@ NotifyQueuedChanges(MediaStreamGraph* graph, const MediaSegment& queued_media) { MOZ_MTLOG(ML_DEBUG, "MediaPipeline::NotifyQueuedChanges()"); - // ignore non-direct data if we're also getting direct data - if (!direct_connect_) { - NewData(graph, offset, queued_media); + if (queued_media.GetType() == MediaSegment::VIDEO) { + // We always get video from SetCurrentFrames(). + return; } + + if (direct_connect_) { + // ignore non-direct data if we're also getting direct data + return; + } + + NewData(queued_media, graph->GraphRate()); } void MediaPipelineTransmit::PipelineListener:: @@ -1774,9 +1756,7 @@ NotifyDirectListenerUninstalled() { } void MediaPipelineTransmit::PipelineListener:: -NewData(MediaStreamGraph* graph, - StreamTime offset, - const MediaSegment& media) { +NewData(const MediaSegment& media, TrackRate aRate /* = 0 */) { if (!active_) { MOZ_MTLOG(ML_DEBUG, "Discarding packets because transport not ready"); return; @@ -1794,49 +1774,27 @@ NewData(MediaStreamGraph* graph, // track type and it's destined for us // See bug 784517 if (media.GetType() == MediaSegment::AUDIO) { - AudioSegment* audio = const_cast( - static_cast(&media)); + MOZ_RELEASE_ASSERT(aRate > 0); - AudioSegment::ChunkIterator iter(*audio); - while(!iter.IsEnded()) { - TrackRate rate; -#ifdef USE_FAKE_MEDIA_STREAMS - rate = Fake_MediaStream::GraphRate(); -#else - rate = graph->GraphRate(); -#endif - audio_processing_->QueueAudioChunk(rate, *iter, enabled_); - iter.Next(); + AudioSegment* audio = const_cast(static_cast(&media)); + for(AudioSegment::ChunkIterator iter(*audio); !iter.IsEnded(); iter.Next()) { + audio_processing_->QueueAudioChunk(aRate, *iter, enabled_); } +#if !defined(MOZILLA_EXTERNAL_LINKAGE) } else { - // Ignore + VideoSegment* video = const_cast(static_cast(&media)); + VideoSegment::ChunkIterator iter(*video); + for(VideoSegment::ChunkIterator iter(*video); !iter.IsEnded(); iter.Next()) { + converter_->QueueVideoChunk(*iter, !enabled_); + } +#endif // MOZILLA_EXTERNAL_LINKAGE } } -void MediaPipelineTransmit::PipelineVideoSink:: +void MediaPipelineTransmit::PipelineListener:: SetCurrentFrames(const VideoSegment& aSegment) { - MOZ_ASSERT(pipelineListener_); - - if (!pipelineListener_->active_) { - MOZ_MTLOG(ML_DEBUG, "Discarding packets because transport not ready"); - return; - } - - if (conduit_->type() != MediaSessionConduit::VIDEO) { - // Ignore data of wrong kind in case we have a muxed stream - return; - } - -#if !defined(MOZILLA_EXTERNAL_LINKAGE) - VideoSegment* video = const_cast(&aSegment); - - VideoSegment::ChunkIterator iter(*video); - while(!iter.IsEnded()) { - pipelineListener_->converter_->QueueVideoChunk(*iter, !pipelineListener_->enabled_); - iter.Next(); - } -#endif + NewData(aSegment); } class TrackAddedCallback { diff --git a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h index 4265fb99d887..38cc0bf9ab33 100644 --- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h +++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h @@ -348,7 +348,6 @@ public: // Separate classes to allow ref counting class PipelineListener; class VideoFrameFeeder; - class PipelineVideoSink; protected: ~MediaPipelineTransmit(); @@ -360,7 +359,6 @@ public: RefPtr feeder_; RefPtr converter_; #endif - RefPtr video_sink_; dom::MediaStreamTrack* domtrack_; }; diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp index 515258efba91..84134171f9a0 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp @@ -22,9 +22,12 @@ #include "nsServiceManagerUtils.h" // do_GetService #include "nsIObserverService.h" #include "nsIObserver.h" +#include "nsIIOService.h" // NS_IOSERVICE_* #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" +#include "nsCRTGlue.h" + #include "gmp-video-decode.h" // GMP_API_VIDEO_DECODER #include "gmp-video-encode.h" // GMP_API_VIDEO_ENCODER @@ -34,12 +37,12 @@ namespace mozilla { using namespace dom; -class PeerConnectionCtxShutdown : public nsIObserver +class PeerConnectionCtxObserver : public nsIObserver { public: NS_DECL_ISUPPORTS - PeerConnectionCtxShutdown() {} + PeerConnectionCtxObserver() {} void Init() { @@ -55,6 +58,10 @@ public: NS_XPCOM_SHUTDOWN_OBSERVER_ID, false); MOZ_ALWAYS_SUCCEEDS(rv); + rv = observerService->AddObserver(this, + NS_IOSERVICE_OFFLINE_STATUS_TOPIC, + false); + MOZ_ALWAYS_SUCCEEDS(rv); #endif (void) rv; } @@ -71,34 +78,52 @@ public: return NS_ERROR_FAILURE; nsresult rv = observerService->RemoveObserver(this, - NS_XPCOM_SHUTDOWN_OBSERVER_ID); + NS_IOSERVICE_OFFLINE_STATUS_TOPIC); + MOZ_ALWAYS_SUCCEEDS(rv); + rv = observerService->RemoveObserver(this, + NS_XPCOM_SHUTDOWN_OBSERVER_ID); MOZ_ALWAYS_SUCCEEDS(rv); // Make sure we're not deleted while still inside ::Observe() - RefPtr kungFuDeathGrip(this); - PeerConnectionCtx::gPeerConnectionCtxShutdown = nullptr; + RefPtr kungFuDeathGrip(this); + PeerConnectionCtx::gPeerConnectionCtxObserver = nullptr; + } + if (strcmp(aTopic, NS_IOSERVICE_OFFLINE_STATUS_TOPIC) == 0) { + const nsLiteralString onlineString(u"" NS_IOSERVICE_ONLINE); + const nsLiteralString offlineString(u"" NS_IOSERVICE_OFFLINE); + if (NS_strcmp(aData, offlineString.get()) == 0) { + CSFLogDebug(logTag, "Updating network state to offline"); + PeerConnectionCtx::UpdateNetworkState(false); + } else if(NS_strcmp(aData, onlineString.get()) == 0) { + CSFLogDebug(logTag, "Updating network state to online"); + PeerConnectionCtx::UpdateNetworkState(true); + } else { + CSFLogDebug(logTag, "Received unsupported network state event"); + MOZ_CRASH(); + } } return NS_OK; } private: - virtual ~PeerConnectionCtxShutdown() + virtual ~PeerConnectionCtxObserver() { nsCOMPtr observerService = services::GetObserverService(); if (observerService) + observerService->RemoveObserver(this, NS_IOSERVICE_OFFLINE_STATUS_TOPIC); observerService->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID); } }; -NS_IMPL_ISUPPORTS(PeerConnectionCtxShutdown, nsIObserver); +NS_IMPL_ISUPPORTS(PeerConnectionCtxObserver, nsIObserver); } namespace mozilla { PeerConnectionCtx* PeerConnectionCtx::gInstance; nsIThread* PeerConnectionCtx::gMainThread; -StaticRefPtr PeerConnectionCtx::gPeerConnectionCtxShutdown; +StaticRefPtr PeerConnectionCtx::gPeerConnectionCtxObserver; const std::map& PeerConnectionCtx::mGetPeerConnections() @@ -129,9 +154,9 @@ nsresult PeerConnectionCtx::InitializeGlobal(nsIThread *mainThread, gInstance = ctx; - if (!PeerConnectionCtx::gPeerConnectionCtxShutdown) { - PeerConnectionCtx::gPeerConnectionCtxShutdown = new PeerConnectionCtxShutdown(); - PeerConnectionCtx::gPeerConnectionCtxShutdown->Init(); + if (!PeerConnectionCtx::gPeerConnectionCtxObserver) { + PeerConnectionCtx::gPeerConnectionCtxObserver = new PeerConnectionCtxObserver(); + PeerConnectionCtx::gPeerConnectionCtxObserver->Init(); } } @@ -334,6 +359,17 @@ PeerConnectionCtx::EverySecondTelemetryCallback_m(nsITimer* timer, void *closure } #endif +void +PeerConnectionCtx::UpdateNetworkState(bool online) { + auto ctx = GetInstance(); + if (ctx->mPeerConnections.empty()) { + return; + } + for (auto pc : ctx->mPeerConnections) { + pc.second->UpdateNetworkState(online); + } +} + nsresult PeerConnectionCtx::Initialize() { initGMP(); diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h index 3f7d6250b05d..c150e2a06fbc 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h @@ -18,7 +18,7 @@ #include "nsIRunnable.h" namespace mozilla { -class PeerConnectionCtxShutdown; +class PeerConnectionCtxObserver; namespace dom { class WebrtcGlobalInformation; @@ -48,6 +48,8 @@ class PeerConnectionCtx { bool gmpHasH264(); + static void UpdateNetworkState(bool online); + // Make these classes friend so that they can access mPeerconnections. friend class PeerConnectionImpl; friend class PeerConnectionWrapper; @@ -101,7 +103,7 @@ private: static PeerConnectionCtx *gInstance; public: static nsIThread *gMainThread; - static mozilla::StaticRefPtr gPeerConnectionCtxShutdown; + static mozilla::StaticRefPtr gPeerConnectionCtxObserver; }; } // namespace mozilla diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp index 7720982c5379..437149ccb81c 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp @@ -2297,10 +2297,17 @@ PeerConnectionImpl::AddIceCandidate(const char* aCandidate, const char* aMid, un pco->OnAddIceCandidateError(error, ObString(errorString.c_str()), rv); } - UpdateSignalingState(); return NS_OK; } +void +PeerConnectionImpl::UpdateNetworkState(bool online) { + if (!mMedia) { + return; + } + mMedia->UpdateNetworkState(online); +} + NS_IMETHODIMP PeerConnectionImpl::CloseStreams() { PC_AUTO_ENTER_API_CALL(false); @@ -3364,8 +3371,6 @@ PeerConnectionImpl::CandidateReady(const std::string& candidate, CSFLogDebug(logTag, "Passing local candidate to content: %s", candidate.c_str()); SendLocalIceCandidateToContent(level, mid, candidate); - - UpdateSignalingState(); } static void diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h index 49a453e6c40a..b79481eda9fd 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h @@ -414,6 +414,8 @@ public: NS_ConvertUTF16toUTF8(aMid).get(), aLevel); } + void UpdateNetworkState(bool online); + NS_IMETHODIMP CloseStreams(); void CloseStreams(ErrorResult &rv) diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp index e1c66ff4a465..4ff6f8353b5c 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp @@ -858,6 +858,7 @@ PeerConnectionMedia::AddIceCandidate(const std::string& candidate, aMLine), NS_DISPATCH_NORMAL); } + void PeerConnectionMedia::AddIceCandidate_s(const std::string& aCandidate, const std::string& aMid, @@ -877,6 +878,21 @@ PeerConnectionMedia::AddIceCandidate_s(const std::string& aCandidate, } } +void +PeerConnectionMedia::UpdateNetworkState(bool online) { + RUN_ON_THREAD(GetSTSThread(), + WrapRunnable( + RefPtr(this), + &PeerConnectionMedia::UpdateNetworkState_s, + online), + NS_DISPATCH_NORMAL); +} + +void +PeerConnectionMedia::UpdateNetworkState_s(bool online) { + mIceCtxHdlr->ctx()->UpdateNetworkState(online); +} + void PeerConnectionMedia::FlushIceCtxOperationQueueIfReady() { diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h index 3ecddf8ca3d4..da1546235f3d 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h @@ -292,6 +292,9 @@ class PeerConnectionMedia : public sigslot::has_slots<> { void AddIceCandidate(const std::string& candidate, const std::string& mid, uint32_t aMLine); + // Handle notifications of network online/offline events. + void UpdateNetworkState(bool online); + // Handle complete media pipelines. nsresult UpdateMediaPipelines(const JsepSession& session); @@ -491,6 +494,7 @@ class PeerConnectionMedia : public sigslot::has_slots<> { void AddIceCandidate_s(const std::string& aCandidate, const std::string& aMid, uint32_t aMLine); + void UpdateNetworkState_s(bool online); // ICE events void IceGatheringStateChange_s(NrIceCtx* ctx, diff --git a/media/webrtc/signaling/src/sdp/SdpHelper.cpp b/media/webrtc/signaling/src/sdp/SdpHelper.cpp index e476b29e526b..a06e3a769307 100644 --- a/media/webrtc/signaling/src/sdp/SdpHelper.cpp +++ b/media/webrtc/signaling/src/sdp/SdpHelper.cpp @@ -424,14 +424,19 @@ SdpHelper::SetDefaultAddresses(const std::string& defaultCandidateAddr, SdpMediaSection* msection) { msection->GetConnection().SetAddress(defaultCandidateAddr); - msection->SetPort(defaultCandidatePort); + SdpAttributeList& attrList = msection->GetAttributeList(); + + // only set the port if there is no bundle-only attribute + if (!attrList.HasAttribute(SdpAttribute::kBundleOnlyAttribute)) { + msection->SetPort(defaultCandidatePort); + } if (!defaultRtcpCandidateAddr.empty()) { sdp::AddrType ipVersion = sdp::kIPv4; if (defaultRtcpCandidateAddr.find(':') != std::string::npos) { ipVersion = sdp::kIPv6; } - msection->GetAttributeList().SetAttribute(new SdpRtcpAttribute( + attrList.SetAttribute(new SdpRtcpAttribute( defaultRtcpCandidatePort, sdp::kInternet, ipVersion, diff --git a/media/webrtc/signaling/test/FakeMediaStreams.h b/media/webrtc/signaling/test/FakeMediaStreams.h index 117d269055d4..0325bb700b93 100644 --- a/media/webrtc/signaling/test/FakeMediaStreams.h +++ b/media/webrtc/signaling/test/FakeMediaStreams.h @@ -70,6 +70,7 @@ public: gGraph = new MediaStreamGraph(); return gGraph; } + uint32_t GraphRate() { return 16000; } }; } @@ -186,8 +187,6 @@ class Fake_MediaStream { public: Fake_MediaStream () : mListeners(), mTrackListeners(), mMutex("Fake MediaStream") {} - static uint32_t GraphRate() { return 16000; } - void AddListener(Fake_MediaStreamListener *aListener) { mozilla::MutexAutoLock lock(mMutex); mListeners.insert(aListener); diff --git a/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc b/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc index 6e9f0b91e751..eba8c82450bd 100644 --- a/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc +++ b/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc @@ -507,6 +507,13 @@ int VP9EncoderImpl::Encode(const VideoFrame& input_image, if (frame_types && frame_types->size() > 0) { frame_type = (*frame_types)[0]; } + if (input_image.width() != codec_.width || + input_image.height() != codec_.height) { + int ret = UpdateCodecFrameSize(input_image); + if (ret < 0) { + return ret; + } + } RTC_DCHECK_EQ(input_image.width(), static_cast(raw_->d_w)); RTC_DCHECK_EQ(input_image.height(), static_cast(raw_->d_h)); @@ -567,6 +574,44 @@ int VP9EncoderImpl::Encode(const VideoFrame& input_image, return WEBRTC_VIDEO_CODEC_OK; } +int VP9EncoderImpl::UpdateCodecFrameSize( + const VideoFrame& input_image) { + fprintf(stderr, "Reconfiging VP( from %dx%d to %dx%d\n", + codec_.width, codec_.height, input_image.width(), input_image.height()); + // Preserve latest bitrate/framerate setting + uint32_t old_bitrate_kbit = config_->rc_target_bitrate; + uint32_t old_framerate = codec_.maxFramerate; + + codec_.width = input_image.width(); + codec_.height = input_image.height(); + + vpx_img_free(raw_); + raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, + 1, NULL); + // Update encoder context for new frame size. + config_->g_w = codec_.width; + config_->g_h = codec_.height; + + // Determine number of threads based on the image size and #cores. + config_->g_threads = NumberOfThreads(codec_.width, codec_.height, + num_cores_); + // Update the cpu_speed setting for resolution change. + cpu_speed_ = GetCpuSpeed(codec_.width, codec_.height); + + // NOTE: We would like to do this the same way vp8 does it + // (with vpx_codec_enc_config_set()), but that causes asserts + // in AQ 3 (cyclic); and in AQ 0 it works, but on a resize to smaller + // than 1/2 x 1/2 original it asserts in convolve(). Given these + // bugs in trying to do it the "right" way, we basically re-do + // the initialization. + vpx_codec_destroy(encoder_); // clean up old state + int result = InitAndSetControlSettings(&codec_); + if (result == WEBRTC_VIDEO_CODEC_OK) { + return SetRates(old_bitrate_kbit, old_framerate); + } + return result; +} + void VP9EncoderImpl::PopulateCodecSpecific(CodecSpecificInfo* codec_specific, const vpx_codec_cx_pkt& pkt, uint32_t timestamp) { @@ -963,6 +1008,7 @@ int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img, uint32_t timestamp) { return WEBRTC_VIDEO_CODEC_NO_OUTPUT; } +#ifdef USE_WRAPPED_I420_BUFFER // This buffer contains all of |img|'s image data, a reference counted // Vp9FrameBuffer. (libvpx is done with the buffers after a few // vpx_codec_decode calls or vpx_codec_destroy). @@ -972,6 +1018,7 @@ int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img, uint32_t timestamp) { // using a WrappedI420Buffer. rtc::scoped_refptr img_wrapped_buffer( new rtc::RefCountedObject( + img->d_w, img->d_h, img->d_w, img->d_h, img->planes[VPX_PLANE_Y], img->stride[VPX_PLANE_Y], img->planes[VPX_PLANE_U], img->stride[VPX_PLANE_U], img->planes[VPX_PLANE_V], @@ -981,10 +1028,19 @@ int VP9DecoderImpl::ReturnFrame(const vpx_image_t* img, uint32_t timestamp) { // release |img_buffer|. rtc::KeepRefUntilDone(img_buffer))); - VideoFrame decoded_image; - decoded_image.set_video_frame_buffer(img_wrapped_buffer); - decoded_image.set_timestamp(timestamp); - int ret = decode_complete_callback_->Decoded(decoded_image); + VideoFrame decoded_image_; + decoded_image_.set_video_frame_buffer(img_wrapped_buffer); +#else + decoded_image_.CreateFrame(img->planes[VPX_PLANE_Y], + img->planes[VPX_PLANE_U], + img->planes[VPX_PLANE_V], + img->d_w, img->d_h, + img->stride[VPX_PLANE_Y], + img->stride[VPX_PLANE_U], + img->stride[VPX_PLANE_V]); +#endif + decoded_image_.set_timestamp(timestamp); + int ret = decode_complete_callback_->Decoded(decoded_image_); if (ret != 0) return ret; return WEBRTC_VIDEO_CODEC_OK; diff --git a/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h b/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h index b83d292e4f1e..b313ebd71214 100644 --- a/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h +++ b/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h @@ -166,6 +166,11 @@ class VP9DecoderImpl : public VP9Decoder { private: int ReturnFrame(const vpx_image_t* img, uint32_t timeStamp); +#ifndef USE_WRAPPED_I420_BUFFER + // Temporarily keep VideoFrame in a separate buffer + // Once we debug WrappedI420VideoFrame usage, we can get rid of this + VideoFrame decoded_image_; +#endif // Memory pool used to share buffers between libvpx and webrtc. Vp9FrameBufferPool frame_buffer_pool_; DecodedImageCallback* decode_complete_callback_; diff --git a/modules/libjar/nsJARURI.cpp b/modules/libjar/nsJARURI.cpp index e46e51467159..d1e4b5a593c2 100644 --- a/modules/libjar/nsJARURI.cpp +++ b/modules/libjar/nsJARURI.cpp @@ -41,7 +41,6 @@ NS_IMPL_RELEASE(nsJARURI) NS_INTERFACE_MAP_BEGIN(nsJARURI) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIJARURI) NS_INTERFACE_MAP_ENTRY(nsIURI) - NS_INTERFACE_MAP_ENTRY(nsIURIWithQuery) NS_INTERFACE_MAP_ENTRY(nsIURL) NS_INTERFACE_MAP_ENTRY(nsIJARURI) NS_INTERFACE_MAP_ENTRY(nsISerializable) diff --git a/modules/libjar/nsJARURI.h b/modules/libjar/nsJARURI.h index 31271e4ac110..d2608a5c6d0d 100644 --- a/modules/libjar/nsJARURI.h +++ b/modules/libjar/nsJARURI.h @@ -41,7 +41,6 @@ class nsJARURI final : public nsIJARURI, public: NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIURI - NS_DECL_NSIURIWITHQUERY NS_DECL_NSIURL NS_DECL_NSIJARURI NS_DECL_NSISERIALIZABLE diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index a3650ed998e0..61279dd413fc 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -352,7 +352,7 @@ pref("media.wmf.low-latency.enabled", false); pref("media.wmf.skip-blacklist", false); pref("media.wmf.vp9.enabled", true); pref("media.windows-media-foundation.allow-d3d11-dxva", true); -pref("media.wmf.disable-d3d11-for-dlls", "igd10iumd32.dll: 20.19.15.4444, 20.19.15.4424, 20.19.15.4409, 20.19.15.4390, 20.19.15.4380, 20.19.15.4360, 10.18.10.4358, 20.19.15.4331, 20.19.15.4312, 20.19.15.4300, 10.18.15.4281, 10.18.15.4279, 10.18.10.4276, 10.18.15.4268, 10.18.15.4256, 10.18.10.4252, 10.18.15.4248, 10.18.14.4112, 10.18.10.3958, 10.18.10.3496, 10.18.10.3431, 10.18.10.3412, 10.18.10.3355, 9.18.10.3234, 9.18.10.3071, 9.18.10.3055, 9.18.10.3006; igd10umd32.dll: 9.17.10.4229, 9.17.10.3040, 9.17.10.2857, 8.15.10.2274, 8.15.10.2272, 8.15.10.2246, 8.15.10.1840, 8.15.10.1808; igd10umd64.dll: 9.17.10.4229, 9.17.10.2857, 10.18.10.3496; isonyvideoprocessor.dll: 4.1.2247.8090, 4.1.2153.6200; tosqep.dll: 1.2.15.526, 1.1.12.201, 1.0.11.318, 1.0.11.215, 1.0.10.1224; tosqep64.dll: 1.1.12.201, 1.0.11.215; nvwgf2um.dll: 10.18.13.6510, 10.18.13.5891, 10.18.13.5887, 10.18.13.5582, 10.18.13.5382, 9.18.13.4195, 9.18.13.3165; atidxx32.dll: 21.19.151.3, 21.19.137.1, 21.19.134.1, 20.19.0.32837, 20.19.0.32832, 8.17.10.682, 8.17.10.671, 8.17.10.661, 8.17.10.648, 8.17.10.644, 8.17.10.625, 8.17.10.605, 8.17.10.581, 8.17.10.569, 8.17.10.560, 8.17.10.545, 8.17.10.539, 8.17.10.531, 8.17.10.525, 8.17.10.520, 8.17.10.519, 8.17.10.514, 8.17.10.511, 8.17.10.494, 8.17.10.489, 8.17.10.483, 8.17.10.453, 8.17.10.451, 8.17.10.441, 8.17.10.436, 8.17.10.432, 8.17.10.425, 8.17.10.418, 8.17.10.414, 8.17.10.401, 8.17.10.395, 8.17.10.385, 8.17.10.378, 8.17.10.362, 8.17.10.355, 8.17.10.342, 8.17.10.331, 8.17.10.318, 8.17.10.310, 8.17.10.286, 8.17.10.269, 8.17.10.261, 8.17.10.247, 8.17.10.240, 8.15.10.212; atidxx64.dll: 21.19.151.3, 21.19.137.1, 21.19.134.1, 20.19.0.32832, 8.17.10.682, 8.17.10.661, 8.17.10.644, 8.17.10.625; nvumdshim.dll: 10.18.13.6822"); +pref("media.wmf.disable-d3d11-for-dlls", "igd11dxva64.dll: 20.19.15.4463, 20.19.15.4454, 20.19.15.4444, 20.19.15.4416, 20.19.15.4390, 20.19.15.4380, 20.19.15.4377, 20.19.15.4364, 20.19.15.4360, 20.19.15.4352, 20.19.15.4331, 20.19.15.4326, 20.19.15.4300; igd10iumd32.dll: 20.19.15.4444, 20.19.15.4424, 20.19.15.4409, 20.19.15.4390, 20.19.15.4380, 20.19.15.4360, 10.18.10.4358, 20.19.15.4331, 20.19.15.4312, 20.19.15.4300, 10.18.15.4281, 10.18.15.4279, 10.18.10.4276, 10.18.15.4268, 10.18.15.4256, 10.18.10.4252, 10.18.15.4248, 10.18.14.4112, 10.18.10.3958, 10.18.10.3496, 10.18.10.3431, 10.18.10.3412, 10.18.10.3355, 9.18.10.3234, 9.18.10.3071, 9.18.10.3055, 9.18.10.3006; igd10umd32.dll: 9.17.10.4229, 9.17.10.3040, 9.17.10.2857, 8.15.10.2274, 8.15.10.2272, 8.15.10.2246, 8.15.10.1840, 8.15.10.1808; igd10umd64.dll: 9.17.10.4229, 9.17.10.2857, 10.18.10.3496; isonyvideoprocessor.dll: 4.1.2247.8090, 4.1.2153.6200; tosqep.dll: 1.2.15.526, 1.1.12.201, 1.0.11.318, 1.0.11.215, 1.0.10.1224; tosqep64.dll: 1.1.12.201, 1.0.11.215; nvwgf2um.dll: 10.18.13.6510, 10.18.13.5891, 10.18.13.5887, 10.18.13.5582, 10.18.13.5382, 9.18.13.4195, 9.18.13.3165; atidxx32.dll: 21.19.151.3, 21.19.137.1, 21.19.134.1, 20.19.0.32837, 20.19.0.32832, 8.17.10.682, 8.17.10.671, 8.17.10.661, 8.17.10.648, 8.17.10.644, 8.17.10.625, 8.17.10.605, 8.17.10.581, 8.17.10.569, 8.17.10.560, 8.17.10.545, 8.17.10.539, 8.17.10.531, 8.17.10.525, 8.17.10.520, 8.17.10.519, 8.17.10.514, 8.17.10.511, 8.17.10.494, 8.17.10.489, 8.17.10.483, 8.17.10.453, 8.17.10.451, 8.17.10.441, 8.17.10.436, 8.17.10.432, 8.17.10.425, 8.17.10.418, 8.17.10.414, 8.17.10.401, 8.17.10.395, 8.17.10.385, 8.17.10.378, 8.17.10.362, 8.17.10.355, 8.17.10.342, 8.17.10.331, 8.17.10.318, 8.17.10.310, 8.17.10.286, 8.17.10.269, 8.17.10.261, 8.17.10.247, 8.17.10.240, 8.15.10.212; atidxx64.dll: 21.19.151.3, 21.19.137.1, 21.19.134.1, 20.19.0.32832, 8.17.10.682, 8.17.10.661, 8.17.10.644, 8.17.10.625; nvumdshim.dll: 10.18.13.6822"); pref("media.wmf.disable-d3d9-for-dlls", "igdumd64.dll: 8.15.10.2189, 8.15.10.2119, 8.15.10.2104, 8.15.10.2102, 8.771.1.0; atiumd64.dll: 7.14.10.833, 7.14.10.867, 7.14.10.885, 7.14.10.903, 7.14.10.911, 8.14.10.768, 9.14.10.1001, 9.14.10.1017, 9.14.10.1080, 9.14.10.1128, 9.14.10.1162, 9.14.10.1171, 9.14.10.1183, 9.14.10.1197, 9.14.10.945, 9.14.10.972, 9.14.10.984, 9.14.10.996"); #endif #if defined(MOZ_FFMPEG) @@ -1856,14 +1856,6 @@ pref("network.dns.localDomains", ""); // Contols whether or not "localhost" should resolve when offline pref("network.dns.offline-localhost", true); -// This preference controls whether or not URLs with UTF-8 characters are -// escaped. Set this preference to TRUE for strict RFC2396 conformance. -pref("network.standard-url.escape-utf8", true); - -// This preference controls whether or not URLs are always encoded and sent as -// UTF-8. -pref("network.standard-url.encode-utf8", true); - // The maximum allowed length for a URL - 1MB default pref("network.standard-url.max-length", 1048576); @@ -4390,7 +4382,7 @@ pref("font.name.monospace.x-unicode", "dt-interface user-ucs2.cjk_japan-0"); pref("signon.rememberSignons", true); pref("signon.rememberSignons.visibilityToggle", true); pref("signon.autofillForms", true); -pref("signon.autofillForms.http", true); +pref("signon.autofillForms.http", false); pref("signon.autologin.proxy", false); pref("signon.formlessCapture.enabled", true); pref("signon.storeWhenAutocompleteOff", true); @@ -5571,4 +5563,4 @@ pref("prompts.authentication_dialog_abuse_limit", 3); // To enable the DOM implementation, turn on "dom.storageManager.enabled" pref("browser.storageManager.enabled", false); -pref("dom.IntersectionObserver.enabled", true); +pref("dom.IntersectionObserver.enabled", false); diff --git a/netwerk/base/RustURL.cpp b/netwerk/base/RustURL.cpp index 10c551bdb2fa..b7df783e793a 100644 --- a/netwerk/base/RustURL.cpp +++ b/netwerk/base/RustURL.cpp @@ -17,7 +17,6 @@ NS_IMPL_RELEASE(RustURL) NS_INTERFACE_MAP_BEGIN(RustURL) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStandardURL) NS_INTERFACE_MAP_ENTRY(nsIURI) - NS_INTERFACE_MAP_ENTRY(nsIURIWithQuery) NS_INTERFACE_MAP_ENTRY(nsIURL) // NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIFileURL, mSupportsFileURL) NS_INTERFACE_MAP_ENTRY(nsIStandardURL) diff --git a/netwerk/base/RustURL.h b/netwerk/base/RustURL.h index 06007da4d2f0..b86db6defec4 100644 --- a/netwerk/base/RustURL.h +++ b/netwerk/base/RustURL.h @@ -31,7 +31,6 @@ class RustURL { NS_DECL_ISUPPORTS NS_DECL_NSIURI - NS_DECL_NSIURIWITHQUERY NS_DECL_NSIURL NS_DECL_NSIFILEURL NS_DECL_NSISTANDARDURL diff --git a/netwerk/base/moz.build b/netwerk/base/moz.build index 577e3d2bac66..4b86a697d753 100644 --- a/netwerk/base/moz.build +++ b/netwerk/base/moz.build @@ -132,7 +132,6 @@ XPIDL_SOURCES += [ 'nsIURIClassifier.idl', 'nsIURIWithBlobImpl.idl', 'nsIURIWithPrincipal.idl', - 'nsIURIWithQuery.idl', 'nsIURL.idl', 'nsIURLParser.idl', 'nsPILoadGroupInternal.idl', diff --git a/netwerk/base/nsIURI.idl b/netwerk/base/nsIURI.idl index 2384c5fd9953..ef163813aa37 100644 --- a/netwerk/base/nsIURI.idl +++ b/netwerk/base/nsIURI.idl @@ -10,18 +10,18 @@ * provides accessors to set and query the most basic components of an URI. * Subclasses, including nsIURL, impose greater structure on the URI. * - * This interface follows Tim Berners-Lee's URI spec (RFC2396) [1], where the + * This interface follows Tim Berners-Lee's URI spec (RFC3986) [1], where the * basic URI components are defined as such: *
- *      ftp://username:password@hostname:portnumber/pathname#ref
- *      \ /   \               / \      / \        /\         \ /
- *       -     ---------------   ------   --------  |         -
- *       |            |             |        |      |         |
- *       |            |             |        |      |        Ref
- *       |            |             |       Port    \        /
- *       |            |            Host      /       --------
- *       |         UserPass                 /	         |
- *     Scheme                              /	        Path
+ *      ftp://username:password@hostname:portnumber/pathname?query#ref
+ *      \ /   \               / \      / \        /\       / \   / \ /
+ *       -     ---------------   ------   --------  -------   ---   -
+ *       |            |             |        |         |       |    |
+ *       |            |             |        |      FilePath Query Ref
+ *       |            |             |       Port       \            /
+ *       |            |            Host      /          ------------
+ *       |         UserPass                 /	              |
+ *     Scheme                              /	             Path
  *       \                                /
  *        --------------------------------
  *                       |
@@ -30,13 +30,9 @@
  * The definition of the URI components has been extended to allow for
  * internationalized domain names [2] and the more generic IRI structure [3].
  *
- * Note also that the RFC defines #-separated fragment identifiers as being
- * "not part of the URI".  Despite this, we bundle them as part of the URI, for
- * convenience.
- *
- * [1] http://www.ietf.org/rfc/rfc2396.txt
- * [2] http://www.ietf.org/internet-drafts/draft-ietf-idn-idna-06.txt
- * [3] http://www.ietf.org/internet-drafts/draft-masinter-url-i18n-08.txt
+ * [1] https://tools.ietf.org/html/rfc3986
+ * [2] https://tools.ietf.org/html/rfc5890
+ * [3] https://tools.ietf.org/html/rfc3987
  */
 
 %{C++
@@ -116,7 +112,7 @@ interface nsIURI : nsISupports
 
     /**
      * The Scheme is the protocol to which this URI refers.  The scheme is
-     * restricted to the US-ASCII charset per RFC2396.  Setting this is
+     * restricted to the US-ASCII charset per RFC3986.  Setting this is
      * highly discouraged outside of a protocol handler implementation, since
      * that will generally lead to incorrect results.
      */
@@ -174,6 +170,9 @@ interface nsIURI : nsISupports
      * empty, depending on the protocol).
      *
      * Some characters may be escaped.
+     *
+     * This attribute contains query and ref parts for historical reasons.
+     * Use the 'filePath' attribute if you do not want those parts included.
      */
     attribute AUTF8String path;
 
@@ -281,10 +280,31 @@ interface nsIURI : nsISupports
     /**
      * returns a string for the current URI with the ref element cleared.
      */
-   readonly attribute AUTF8String specIgnoringRef;
+    readonly attribute AUTF8String specIgnoringRef;
 
     /**
      * Returns if there is a reference portion (the part after the "#") of the URI.
      */
-   readonly attribute boolean hasRef;
+    readonly attribute boolean hasRef;
+
+    /************************************************************************
+     * Additional attributes added for .query support:
+     */
+
+    /**
+     * Returns a path including the directory and file portions of a
+     * URL.  For example, the filePath of "http://host/foo/bar.html#baz"
+     * is "/foo/bar.html".
+     *
+     * Some characters may be escaped.
+     */
+    attribute AUTF8String filePath;
+
+    /**
+     * Returns the query portion (the part after the "?") of the URL.
+     * If there isn't one, an empty string is returned.
+     *
+     * Some characters may be escaped.
+     */
+    attribute AUTF8String query;
 };
diff --git a/netwerk/base/nsIURIWithQuery.idl b/netwerk/base/nsIURIWithQuery.idl
deleted file mode 100644
index 749b2773d8e3..000000000000
--- a/netwerk/base/nsIURIWithQuery.idl
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * 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/. */
-
-#include "nsIURI.idl"
-
-/**
- * nsIURIWithQuery is implemented by URIs which have a query parameter.
- * This is useful for the URL API.
- */
-[scriptable, uuid(367510ee-8556-435a-8f99-b5fd357e08cc)]
-interface nsIURIWithQuery : nsIURI
-{
-    /**
-     * Returns a path including the directory and file portions of a
-     * URL.  For example, the filePath of "http://host/foo/bar.html#baz"
-     * is "/foo/bar.html".
-     *
-     * Some characters may be escaped.
-     */
-    attribute AUTF8String filePath;
-
-    /**
-     * Returns the query portion (the part after the "?") of the URL.
-     * If there isn't one, an empty string is returned.
-     *
-     * Some characters may be escaped.
-     */
-    attribute AUTF8String query;
-};
diff --git a/netwerk/base/nsIURL.idl b/netwerk/base/nsIURL.idl
index aeaa3f6949c7..9ff6c3dcda34 100644
--- a/netwerk/base/nsIURL.idl
+++ b/netwerk/base/nsIURL.idl
@@ -3,7 +3,7 @@
  * 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/. */
 
-#include "nsIURIWithQuery.idl"
+#include "nsIURI.idl"
 
 /**
  * The nsIURL interface provides convenience methods that further
@@ -20,7 +20,7 @@
  *                        filePath
  */
 [scriptable, uuid(86adcd89-0b70-47a2-b0fe-5bb2c5f37e31)]
-interface nsIURL : nsIURIWithQuery
+interface nsIURL : nsIURI
 {
     /*************************************************************************
      * The URL path is broken down into the following principal components:
@@ -28,7 +28,7 @@ interface nsIURL : nsIURIWithQuery
      * attribute AUTF8String filePath;
      * attribute AUTF8String query;
      *
-     * These are inherited from nsIURIWithQuery.
+     * These are inherited from nsIURI.
      */
 
     /*************************************************************************
diff --git a/netwerk/base/nsSimpleURI.cpp b/netwerk/base/nsSimpleURI.cpp
index 59845ba3ec38..bd78fb555e76 100644
--- a/netwerk/base/nsSimpleURI.cpp
+++ b/netwerk/base/nsSimpleURI.cpp
@@ -48,7 +48,7 @@ nsSimpleURI::~nsSimpleURI()
 NS_IMPL_ADDREF(nsSimpleURI)
 NS_IMPL_RELEASE(nsSimpleURI)
 NS_INTERFACE_TABLE_HEAD(nsSimpleURI)
-NS_INTERFACE_TABLE(nsSimpleURI, nsIURI, nsIURIWithQuery, nsISerializable,
+NS_INTERFACE_TABLE(nsSimpleURI, nsIURI, nsISerializable,
                    nsIClassInfo, nsIMutable, nsIIPCSerializableURI)
 NS_INTERFACE_TABLE_TO_MAP_SEGUE
   if (aIID.Equals(kThisSimpleURIImplementationCID))
@@ -782,10 +782,6 @@ nsSimpleURI::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
   return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
 }
 
-//----------------------------------------------------------------------------
-// nsSimpleURI::nsIURIWithQuery
-//----------------------------------------------------------------------------
-
 NS_IMETHODIMP
 nsSimpleURI::GetFilePath(nsACString& aFilePath)
 {
diff --git a/netwerk/base/nsSimpleURI.h b/netwerk/base/nsSimpleURI.h
index 29bc9b313962..842136ed635a 100644
--- a/netwerk/base/nsSimpleURI.h
+++ b/netwerk/base/nsSimpleURI.h
@@ -8,7 +8,6 @@
 
 #include "mozilla/MemoryReporting.h"
 #include "nsIURI.h"
-#include "nsIURIWithQuery.h"
 #include "nsISerializable.h"
 #include "nsString.h"
 #include "nsIClassInfo.h"
@@ -28,7 +27,7 @@ namespace net {
 }
 
 class nsSimpleURI
-    : public nsIURIWithQuery
+    : public nsIURI
     , public nsISerializable
     , public nsIClassInfo
     , public nsIMutable
@@ -41,7 +40,6 @@ protected:
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIURI
-    NS_DECL_NSIURIWITHQUERY
     NS_DECL_NSISERIALIZABLE
     NS_DECL_NSICLASSINFO
     NS_DECL_NSIMUTABLE
diff --git a/netwerk/base/nsStandardURL.cpp b/netwerk/base/nsStandardURL.cpp
index 4c5311a7b121..fccc2c7ef585 100644
--- a/netwerk/base/nsStandardURL.cpp
+++ b/netwerk/base/nsStandardURL.cpp
@@ -140,8 +140,6 @@ static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID);
 
 nsIIDNService *nsStandardURL::gIDN = nullptr;
 bool nsStandardURL::gInitialized = false;
-bool nsStandardURL::gEscapeUTF8 = true;
-bool nsStandardURL::gAlwaysEncodeInUTF8 = true;
 char nsStandardURL::gHostLimitDigits[] = { '/', '\\', '?', '#', 0 };
 
 //----------------------------------------------------------------------------
@@ -158,8 +156,6 @@ char nsStandardURL::gHostLimitDigits[] = { '/', '\\', '?', '#', 0 };
 // nsStandardURL::nsPrefObserver
 //----------------------------------------------------------------------------
 
-#define NS_NET_PREF_ESCAPEUTF8         "network.standard-url.escape-utf8"
-#define NS_NET_PREF_ALWAYSENCODEINUTF8 "network.standard-url.encode-utf8"
 #define NS_NET_PREF_ENABLE_RUST        "network.standard-url.enable-rust"
 
 NS_IMPL_ISUPPORTS(nsStandardURL::nsPrefObserver, nsIObserver)
@@ -225,13 +221,10 @@ nsSegmentEncoder::EncodeSegmentCount(const char *str,
             }
         }
 
-        // escape per RFC2396 unless UTF-8 and allowed by preferences
-        int16_t escapeFlags = (gEscapeUTF8 || mEncoder) ? 0 : esc_OnlyASCII;
-
         uint32_t initLen = result.Length();
 
         // now perform any required escaping
-        if (NS_EscapeURL(str + pos, len, mask | escapeFlags, result)) {
+        if (NS_EscapeURL(str + pos, len, mask, result)) {
             len = result.Length() - initLen;
             appended = true;
         }
@@ -280,7 +273,7 @@ nsSegmentEncoder::InitUnicodeEncoder()
     nsSegmentEncoder name(useUTF8 ? nullptr : mOriginCharset.get())
 
 #define GET_SEGMENT_ENCODER(name) \
-    GET_SEGMENT_ENCODER_INTERNAL(name, gAlwaysEncodeInUTF8)
+    GET_SEGMENT_ENCODER_INTERNAL(name, true)
 
 #define GET_QUERY_ENCODER(name) \
     GET_SEGMENT_ENCODER_INTERNAL(name, false)
@@ -372,8 +365,6 @@ nsStandardURL::InitGlobalObjects()
     nsCOMPtr prefBranch( do_GetService(NS_PREFSERVICE_CONTRACTID) );
     if (prefBranch) {
         nsCOMPtr obs( new nsPrefObserver() );
-        prefBranch->AddObserver(NS_NET_PREF_ESCAPEUTF8, obs.get(), false);
-        prefBranch->AddObserver(NS_NET_PREF_ALWAYSENCODEINUTF8, obs.get(), false);
 #ifdef MOZ_RUST_URLPARSE
         prefBranch->AddObserver(NS_NET_PREF_ENABLE_RUST, obs.get(), false);
 #endif
@@ -1178,26 +1169,13 @@ nsStandardURL::WriteSegment(nsIBinaryOutputStream *stream, const URLSegment &seg
 /* static */ void
 nsStandardURL::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
 {
-    bool val;
-
     LOG(("nsStandardURL::PrefsChanged [pref=%s]\n", pref));
 
 #define PREF_CHANGED(p) ((pref == nullptr) || !strcmp(pref, p))
 #define GOT_PREF(p, b) (NS_SUCCEEDED(prefs->GetBoolPref(p, &b)))
 
-    if (PREF_CHANGED(NS_NET_PREF_ESCAPEUTF8)) {
-        if (GOT_PREF(NS_NET_PREF_ESCAPEUTF8, val))
-            gEscapeUTF8 = val;
-        LOG(("escape UTF-8 %s\n", gEscapeUTF8 ? "enabled" : "disabled"));
-    }
-
-    if (PREF_CHANGED(NS_NET_PREF_ALWAYSENCODEINUTF8)) {
-        if (GOT_PREF(NS_NET_PREF_ALWAYSENCODEINUTF8, val))
-            gAlwaysEncodeInUTF8 = val;
-        LOG(("encode in UTF-8 %s\n", gAlwaysEncodeInUTF8 ? "enabled" : "disabled"));
-    }
-
 #ifdef MOZ_RUST_URLPARSE
+    bool val;
     if (PREF_CHANGED(NS_NET_PREF_ENABLE_RUST)) {
         if (GOT_PREF(NS_NET_PREF_ENABLE_RUST, val)) {
             gRustEnabled = val;
@@ -1253,7 +1231,6 @@ NS_IMPL_RELEASE(nsStandardURL)
 NS_INTERFACE_MAP_BEGIN(nsStandardURL)
     NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIStandardURL)
     NS_INTERFACE_MAP_ENTRY(nsIURI)
-    NS_INTERFACE_MAP_ENTRY(nsIURIWithQuery)
     NS_INTERFACE_MAP_ENTRY(nsIURL)
     NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIFileURL, mSupportsFileURL)
     NS_INTERFACE_MAP_ENTRY(nsIStandardURL)
diff --git a/netwerk/base/nsStandardURL.h b/netwerk/base/nsStandardURL.h
index c73697fc6104..3c06e0cc0137 100644
--- a/netwerk/base/nsStandardURL.h
+++ b/netwerk/base/nsStandardURL.h
@@ -55,7 +55,6 @@ protected:
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIURI
-    NS_DECL_NSIURIWITHQUERY
     NS_DECL_NSIURL
     NS_DECL_NSIFILEURL
     NS_DECL_NSISTANDARDURL
@@ -302,9 +301,6 @@ private:
     static nsIIDNService               *gIDN;
     static char                         gHostLimitDigits[];
     static bool                         gInitialized;
-    static bool                         gEscapeUTF8;
-    static bool                         gAlwaysEncodeInUTF8;
-    static bool                         gEncodeQueryInUTF8;
 
 public:
 #ifdef DEBUG_DUMP_URLS_AT_SHUTDOWN
diff --git a/old-configure.in b/old-configure.in
index 5cb97c61d346..f27f84dad994 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -46,7 +46,7 @@ _SUBDIR_CONFIG_ARGS="$ac_configure_args"
 dnl Set the version number of the libs included with mozilla
 dnl ========================================================
 MOZJPEG=62
-MOZPNG=10625
+MOZPNG=10627
 NSPR_VERSION=4
 NSPR_MINVER=4.13.1
 NSS_VERSION=3
diff --git a/python/mozboot/mozboot/debian.py b/python/mozboot/mozboot/debian.py
index 6e33e9e5bf3a..f5b91259e7bb 100644
--- a/python/mozboot/mozboot/debian.py
+++ b/python/mozboot/mozboot/debian.py
@@ -74,7 +74,7 @@ class DebianBootstrapper(BaseBootstrapper):
     # (mobile/android) for all Debian-derived distros (such as Ubuntu).
     MOBILE_ANDROID_COMMON_PACKAGES = [
         'zlib1g-dev',  # mobile/android requires system zlib.
-        'openjdk-7-jdk',
+        'default-jdk',
         'wget',  # For downloading the Android SDK and NDK.
         'libncurses5:i386',  # See comments about i386 below.
         'libstdc++6:i386',
diff --git a/security/manager/ssl/ScopedNSSTypes.h b/security/manager/ssl/ScopedNSSTypes.h
index 64145fbad4b3..6fe1cb7ee404 100644
--- a/security/manager/ssl/ScopedNSSTypes.h
+++ b/security/manager/ssl/ScopedNSSTypes.h
@@ -62,9 +62,6 @@ MapSECStatus(SECStatus rv)
 MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedCERTCertificate,
                                           CERTCertificate,
                                           CERT_DestroyCertificate)
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedCERTSubjectPublicKeyInfo,
-                                          CERTSubjectPublicKeyInfo,
-                                          SECKEY_DestroySubjectPublicKeyInfo)
 
 namespace internal {
 
@@ -186,9 +183,6 @@ MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPK11SlotInfo,
 MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPK11SymKey,
                                           PK11SymKey,
                                           PK11_FreeSymKey)
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPK11GenericObject,
-                                          PK11GenericObject,
-                                          PK11_DestroyGenericObject)
 namespace internal {
 
 inline void
@@ -201,11 +195,6 @@ PORT_FreeArena_false(PLArenaPool* arena)
 
 } // namespace internal
 
-// Deprecated: use the equivalent UniquePtr templates instead.
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPLArenaPool,
-                                          PLArenaPool,
-                                          internal::PORT_FreeArena_false)
-
 // Wrapper around NSS's SECItem_AllocItem that handles OOM the same way as
 // other allocators.
 inline void
@@ -340,6 +329,9 @@ MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(UniqueNSSCMSSignedData,
                                       NSSCMSSignedData,
                                       NSS_CMSSignedData_Destroy)
 
+MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(UniquePK11GenericObject,
+                                      PK11GenericObject,
+                                      PK11_DestroyGenericObject)
 MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(UniquePK11SlotInfo,
                                       PK11SlotInfo,
                                       PK11_FreeSlot)
diff --git a/security/manager/ssl/StaticHPKPins.h b/security/manager/ssl/StaticHPKPins.h
index 1049537e5bca..281f7d79f428 100644
--- a/security/manager/ssl/StaticHPKPins.h
+++ b/security/manager/ssl/StaticHPKPins.h
@@ -1149,4 +1149,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
 
 static const int32_t kUnknownId = -1;
 
-static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1491490784749000);
+static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1491836213137000);
diff --git a/security/manager/ssl/nsSTSPreloadList.errors b/security/manager/ssl/nsSTSPreloadList.errors
index f96d8d26cc15..14ed910bfe99 100644
--- a/security/manager/ssl/nsSTSPreloadList.errors
+++ b/security/manager/ssl/nsSTSPreloadList.errors
@@ -2,7 +2,7 @@
 0p.no: did not receive HSTS header
 0x.sk: could not connect to host
 0x1337.eu: could not connect to host
-0x44.net: did not receive HSTS header
+0x44.net: could not connect to host
 0xb612.org: could not connect to host
 1018hosting.nl: did not receive HSTS header
 1022996493.rsc.cdn77.org: could not connect to host
@@ -21,6 +21,7 @@
 2or3.tk: could not connect to host
 300651.ru: did not receive HSTS header
 302.nyc: could not connect to host
+33drugstore.com: did not receive HSTS header
 360ds.co.in: could not connect to host
 360gradus.com: did not receive HSTS header
 365.or.jp: did not receive HSTS header
@@ -51,9 +52,9 @@
 9point6.com: could not connect to host
 a-plus.space: could not connect to host
 a9c.co: could not connect to host
-aaeblog.com: did not receive HSTS header
-aaeblog.net: did not receive HSTS header
-aaeblog.org: did not receive HSTS header
+aaeblog.com: could not connect to host
+aaeblog.net: could not connect to host
+aaeblog.org: could not connect to host
 aapp.space: could not connect to host
 abearofsoap.com: did not receive HSTS header
 abecodes.net: could not connect to host
@@ -70,6 +71,7 @@ abury.me: did not receive HSTS header
 accelerole.com: did not receive HSTS header
 accountradar.com: could not connect to host
 accuenergy.com: max-age too low: 0
+acgmoon.org: did not receive HSTS header
 acisonline.net: did not receive HSTS header
 acorns.com: did not receive HSTS header
 acr.im: could not connect to host
@@ -130,7 +132,7 @@ airproto.com: did not receive HSTS header
 aishnair.com: could not connect to host
 aiticon.de: did not receive HSTS header
 aiw-thkoeln.online: could not connect to host
-ajmahal.com: did not receive HSTS header
+ajmahal.com: could not connect to host
 akclinics.org: did not receive HSTS header
 akostecki.de: did not receive HSTS header
 akoww.de: could not connect to host
@@ -151,6 +153,7 @@ alessandro.pw: did not receive HSTS header
 alethearose.com: did not receive HSTS header
 alexandre.sh: did not receive HSTS header
 alexberts.ch: did not receive HSTS header
+alexei.su: could not connect to host
 alexhaydock.co.uk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 alexisabarca.com: did not receive HSTS header
 alittlebitcheeky.com: did not receive HSTS header
@@ -158,6 +161,7 @@ alkami.com: did not receive HSTS header
 all-subtitles.com: did not receive HSTS header
 all.tf: could not connect to host
 alldaymonitoring.com: could not connect to host
+alldewall.de: could not connect to host
 allforyou.at: could not connect to host
 allinnote.com: could not connect to host
 allstarswithus.com: could not connect to host
@@ -194,7 +198,9 @@ andreigec.net: did not receive HSTS header
 andrewmichaud.beer: could not connect to host
 andreypopp.com: could not connect to host
 androoz.se: did not receive HSTS header
-andymartin.cc: did not receive HSTS header
+anduril.de: could not connect to host
+anduril.eu: could not connect to host
+andymartin.cc: could not connect to host
 anfsanchezo.co: could not connect to host
 anfsanchezo.me: could not connect to host
 anghami.com: did not receive HSTS header
@@ -251,8 +257,9 @@ aran.me.uk: did not receive HSTS header
 arboineuropa.nl: did not receive HSTS header
 arbu.eu: max-age too low: 2419200
 argh.io: could not connect to host
+aristocrates.co: could not connect to host
 arlen.se: could not connect to host
-armingrodon.de: could not connect to host
+armingrodon.de: did not receive HSTS header
 armory.consulting: could not connect to host
 armory.supplies: could not connect to host
 armytricka.cz: did not receive HSTS header
@@ -263,12 +270,12 @@ artistnetwork.nl: did not receive HSTS header
 arvamus.eu: could not connect to host
 as.se: could not connect to host
 as9178.net: could not connect to host
+asandu.eu: could not connect to host
 asasuou.pw: could not connect to host
 asc16.com: could not connect to host
 ascension.run: could not connect to host
 asdpress.cn: could not connect to host
 ashutoshmishra.org: did not receive HSTS header
-asianodor.com: could not connect to host
 askfit.cz: did not receive HSTS header
 asm-x.com: did not receive HSTS header
 asmui.ga: could not connect to host
@@ -281,9 +288,10 @@ asset-alive.net: did not receive HSTS header
 astrath.net: could not connect to host
 astrolpost.com: could not connect to host
 astromelody.com: did not receive HSTS header
+asuhe.cc: did not receive HSTS header
 atavio.at: could not connect to host
 atavio.ch: could not connect to host
-atavio.de: did not receive HSTS header
+atavio.de: could not connect to host
 atbeckett.com: did not receive HSTS header
 athaliasoft.com: did not receive HSTS header
 athenelive.com: could not connect to host
@@ -299,13 +307,13 @@ aufmerksamkeitsstudie.com: could not connect to host
 aujapan.ru: could not connect to host
 aurainfosec.com: did not receive HSTS header
 aurainfosec.com.au: could not connect to host
+auroratownshipfd.org: could not connect to host
 ausnah.me: could not connect to host
 ausoptic.com.au: max-age too low: 2592000
 auszeit.bio: did not receive HSTS header
 auth.mail.ru: did not receive HSTS header
 authentication.io: could not connect to host
 authoritynutrition.com: did not receive HSTS header
-autimatisering.nl: could not connect to host
 auto-serwis.zgorzelec.pl: did not receive HSTS header
 auto4trade.nl: could not connect to host
 autojuhos.sk: did not receive HSTS header
@@ -313,6 +321,7 @@ autokovrik-diskont.ru: did not receive HSTS header
 autotsum.com: could not connect to host
 autumnwindsagility.com: could not connect to host
 auverbox.ovh: did not receive HSTS header
+auxiliumincrementum.co.uk: could not connect to host
 av.de: did not receive HSTS header
 avec-ou-sans-ordonnance.fr: could not connect to host
 avinet.com: max-age too low: 0
@@ -332,6 +341,7 @@ badkamergigant.com: could not connect to host
 baff.lu: did not receive HSTS header
 baiduaccount.com: could not connect to host
 baka.network: could not connect to host
+bakingstone.com: could not connect to host
 bakkerdesignandbuild.com: did not receive HSTS header
 balcan-underground.net: could not connect to host
 baldwinkoo.com: could not connect to host
@@ -341,13 +351,17 @@ bannisbierblog.de: could not connect to host
 banqingdiao.com: could not connect to host
 barbaros.info: could not connect to host
 barely.sexy: did not receive HSTS header
+bashc.at: could not connect to host
 bashcode.ninja: could not connect to host
 basicsolutionsus.com: did not receive HSTS header
 basilisk.io: could not connect to host
 basnieuwenhuizen.nl: could not connect to host
-bassh.net: did not receive HSTS header
+bassh.net: could not connect to host
+baud.ninja: could not connect to host
 baumstark.ca: did not receive HSTS header
+baysse.eu: could not connect to host
 bazarstupava.sk: could not connect to host
+bbb1991.me: could not connect to host
 bcbsmagentprofile.com: could not connect to host
 bccx.com: could not connect to host
 bckp.de: could not connect to host
@@ -374,6 +388,7 @@ belliash.eu.org: could not connect to host
 belltower.io: could not connect to host
 bendemaree.com: could not connect to host
 beneffy.com: did not receive HSTS header
+benjaminjurke.net: did not receive HSTS header
 benk.press: could not connect to host
 benny003.de: did not receive HSTS header
 benzkosmetik.de: could not connect to host
@@ -424,7 +439,6 @@ bitgo.com: max-age too low: 0
 bitheus.com: could not connect to host
 bithosting.io: did not receive HSTS header
 bitnet.io: did not receive HSTS header
-bitok.com: did not receive HSTS header
 bitsafe.systems: could not connect to host
 bitvigor.com: could not connect to host
 bivsi.com: could not connect to host
@@ -448,6 +462,7 @@ blenheimchalcot.com: did not receive HSTS header
 blha303.com.au: could not connect to host
 blindsexdate.nl: could not connect to host
 blocksatz-medien.de: did not receive HSTS header
+blog-ritaline.com: could not connect to host
 blog.cyveillance.com: did not receive HSTS header
 blog.lookout.com: did not receive HSTS header
 blubbablasen.de: could not connect to host
@@ -459,7 +474,7 @@ blupig.net: did not receive HSTS header
 bm-trading.nl: did not receive HSTS header
 bngsecure.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 bobiji.com: did not receive HSTS header
-bockenauer.at: did not receive HSTS header
+bodo-wolff.de: could not connect to host
 bodyblog.nl: did not receive HSTS header
 bodybuilding-legends.com: could not connect to host
 bodyweightsolution.com: did not receive HSTS header
@@ -498,7 +513,7 @@ brandon.so: could not connect to host
 brandonwalker.me: could not connect to host
 brandred.net: did not receive HSTS header
 brandspray.com: did not receive HSTS header
-brettabel.com: did not receive HSTS header
+brettabel.com: could not connect to host
 brianmwaters.net: could not connect to host
 brickoo.com: could not connect to host
 brideandgroomdirect.ie: did not receive HSTS header
@@ -521,6 +536,7 @@ buildci.asia: could not connect to host
 buildsaver.co.za: did not receive HSTS header
 built.by: did not receive HSTS header
 bulletpoint.cz: did not receive HSTS header
+bulmafox.com: could not connect to host
 bumarkamoda.com: could not connect to host
 bunaken.asia: could not connect to host
 burian-server.cz: could not connect to host
@@ -536,19 +552,18 @@ buttercoin.com: could not connect to host
 buybaby.eu: did not receive HSTS header
 buyfox.de: did not receive HSTS header
 by4cqb.cn: could not connect to host
+bynet.cz: could not connect to host
 bypassed.press: could not connect to host
 bypro.xyz: could not connect to host
 bysymphony.com: max-age too low: 0
 byte.wtf: did not receive HSTS header
 bytepark.de: did not receive HSTS header
-bytesunlimited.com: could not connect to host
 c1yd3i.me: could not connect to host
 c3b.info: could not connect to host
 cabarave.com: could not connect to host
 cabusar.fr: could not connect to host
 caconnect.org: could not connect to host
 cadao.me: did not receive HSTS header
-caesreon.com: could not connect to host
 cafe-scientifique.org.ec: could not connect to host
 caim.cz: did not receive HSTS header
 cainhosting.com: did not receive HSTS header
@@ -581,6 +596,7 @@ cardoni.net: did not receive HSTS header
 cardstream.com: did not receive HSTS header
 cardurl.com: did not receive HSTS header
 cargobay.net: could not connect to host
+caringladies.org: could not connect to host
 carlandfaith.com: could not connect to host
 carlolly.co.uk: could not connect to host
 carlosalves.info: could not connect to host
@@ -609,6 +625,7 @@ cdreporting.co.uk: did not receive HSTS header
 cejhon.cz: could not connect to host
 cellsites.nz: could not connect to host
 ceml.ch: did not receive HSTS header
+centillien.com: could not connect to host
 centralvacsunlimited.net: did not receive HSTS header
 centrepoint-community.com: could not connect to host
 ceritamalam.net: could not connect to host
@@ -623,7 +640,7 @@ cfetengineering.com: could not connect to host
 cg.search.yahoo.com: did not receive HSTS header
 chainmonitor.com: could not connect to host
 championsofregnum.com: did not receive HSTS header
-chandlerredding.com: could not connect to host
+chandlerredding.com: did not receive HSTS header
 changelab.cc: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 chaos.fail: did not receive HSTS header
 chargejuice.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
@@ -635,6 +652,7 @@ chateauconstellation.ch: did not receive HSTS header
 chatup.cf: could not connect to host
 chaulootz.com: could not connect to host
 chcemvediet.sk: max-age too low: 1555200
+cheapestgamecards.nl: did not receive HSTS header
 chebedara.com: could not connect to host
 checkout.google.com: did not receive HSTS header (error ignored - included regardless)
 cheerflow.com: could not connect to host
@@ -644,7 +662,7 @@ chensir.net: could not connect to host
 cherysunzhang.com: max-age too low: 7776000
 chiaramail.com: could not connect to host
 chihiro.xyz: could not connect to host
-chijiokeindustries.co.uk: did not receive HSTS header
+chijiokeindustries.co.uk: could not connect to host
 childcaresolutionscny.org: did not receive HSTS header
 chinawhale.com: did not receive HSTS header
 chirgui.eu: could not connect to host
@@ -712,7 +730,7 @@ cmplainpalais.ch: did not receive HSTS header
 cmsbattle.com: could not connect to host
 cmscafe.ru: did not receive HSTS header
 cn.search.yahoo.com: did not receive HSTS header
-cni-certing.it: max-age too low: 0
+cni-certing.it: max-age too low: 1
 co50.com: did not receive HSTS header
 cocaine-import.agency: could not connect to host
 codabix.com: did not receive HSTS header
@@ -720,8 +738,9 @@ codabix.de: could not connect to host
 codabix.net: could not connect to host
 code.google.com: did not receive HSTS header (error ignored - included regardless)
 codeco.pw: could not connect to host
-codeforce.io: did not receive HSTS header
+codeforce.io: could not connect to host
 codepoet.de: could not connect to host
+codepult.com: could not connect to host
 codepx.com: did not receive HSTS header
 codiva.io: max-age too low: 2592000
 coffeeetc.co.uk: did not receive HSTS header
@@ -742,6 +761,7 @@ compalytics.com: could not connect to host
 comparejewelleryprices.co.uk: could not connect to host
 completeid.com: max-age too low: 86400
 completionist.audio: could not connect to host
+compucorner.com.mx: could not connect to host
 computeremergency.com.au: did not receive HSTS header
 concord-group.co.jp: did not receive HSTS header
 condesaelectronics.com: max-age too low: 0
@@ -757,6 +777,7 @@ continuumgaming.com: could not connect to host
 controlcenter.gigahost.dk: did not receive HSTS header
 coolchevy.org.ua: could not connect to host
 coralproject.net: did not receive HSTS header
+coralrosado.com.br: could not connect to host
 cordial-restaurant.com: did not receive HSTS header
 core.mx: could not connect to host
 core4system.de: could not connect to host
@@ -781,12 +802,10 @@ craftedge.xyz: could not connect to host
 craftmine.cz: did not receive HSTS header
 crate.io: did not receive HSTS header
 cravelyrics.com: could not connect to host
-crazifyngers.com: could not connect to host
 crazycen.com: did not receive HSTS header
 crazyhotseeds.com: did not receive HSTS header
 creativephysics.ml: could not connect to host
 creativeplayuk.com: did not receive HSTS header
-creditclear.com.au: did not receive HSTS header
 crendontech.com: could not connect to host
 crestoncottage.com: could not connect to host
 critical.today: could not connect to host
@@ -822,6 +841,7 @@ ct.search.yahoo.com: did not receive HSTS header
 cthulhuden.com: could not connect to host
 cubeserver.eu: could not connect to host
 cubewano.com: could not connect to host
+cubua.com: could not connect to host
 cujanovic.com: did not receive HSTS header
 cumshots-video.ru: could not connect to host
 cupidmentor.com: did not receive HSTS header
@@ -834,6 +854,7 @@ cybershambles.com: could not connect to host
 cycleluxembourg.lu: did not receive HSTS header
 cydia-search.io: could not connect to host
 cyphertite.com: could not connect to host
+d3xt3r01.tk: could not connect to host
 dad256.tk: could not connect to host
 dadtheimpaler.com: could not connect to host
 dah5.com: did not receive HSTS header
@@ -854,6 +875,7 @@ dario.im: could not connect to host
 dark-x.cf: could not connect to host
 darkengine.io: could not connect to host
 darkhole.cn: could not connect to host
+darkkeepers.dk: did not receive HSTS header
 darknebula.space: could not connect to host
 darkpony.ru: could not connect to host
 darksideof.it: could not connect to host
@@ -888,12 +910,13 @@ db.gy: could not connect to host
 dbx.ovh: could not connect to host
 dccode.gov: could not connect to host
 dcurt.is: did not receive HSTS header
-ddatsh.com: could not connect to host
 dden.ca: could not connect to host
 dden.website: could not connect to host
 dden.xyz: could not connect to host
+dealbanana.se: did not receive HSTS header
 debank.tv: did not receive HSTS header
 debatch.se: could not connect to host
+debian-vhost.de: could not connect to host
 debtkit.co.uk: did not receive HSTS header
 decafu.co: could not connect to host
 decibelios.li: could not connect to host
@@ -917,7 +940,7 @@ demuzere.net: could not connect to host
 demuzere.org: could not connect to host
 denh.am: did not receive HSTS header
 denisjean.fr: could not connect to host
-dentaldomain.org: max-age too low: 0
+dentaldomain.org: did not receive HSTS header
 dentaldomain.ph: could not connect to host
 depeche-mode.moscow: max-age too low: 7200
 depijl-mz.nl: did not receive HSTS header
@@ -927,13 +950,14 @@ derevtsov.com: did not receive HSTS header
 derwolfe.net: did not receive HSTS header
 desiccantpackets.com: did not receive HSTS header
 designthinking.or.jp: did not receive HSTS header
+despora.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 destinationbijoux.fr: could not connect to host
 detector.exposed: could not connect to host
 devcu.net: did not receive HSTS header
 devincrow.me: could not connect to host
 devinfo.net: did not receive HSTS header
 devmsg.com: did not receive HSTS header
-devtub.com: could not connect to host
+devtub.com: did not receive HSTS header
 devuan.org: did not receive HSTS header
 diablotine.rocks: could not connect to host
 diarbag.us: did not receive HSTS header
@@ -947,7 +971,6 @@ dinamoelektrik.com: max-age too low: 0
 dinkum.online: could not connect to host
 discoveringdocker.com: did not receive HSTS header
 discovery.lookout.com: did not receive HSTS header
-dise-online.de: could not connect to host
 dislocated.de: did not receive HSTS header
 disowned.net: max-age too low: 0
 dissimulo.me: could not connect to host
@@ -957,6 +980,7 @@ dizihocasi.com: did not receive HSTS header
 dizorg.net: could not connect to host
 dj4et.de: did not receive HSTS header
 dl.google.com: did not receive HSTS header (error ignored - included regardless)
+dlc.viasinc.com: could not connect to host
 dlemper.de: did not receive HSTS header
 dn42.eu: could not connect to host
 dns.google.com: did not receive HSTS header (error ignored - included regardless)
@@ -969,7 +993,6 @@ doeswindowssuckforeveryoneorjustme.com: could not connect to host
 dogbox.se: did not receive HSTS header
 dohosting.ru: could not connect to host
 dokan.online: could not connect to host
-doleta.gov: max-age too low: 3153600
 dollarstore24.com: could not connect to host
 dollywiki.co.uk: could not connect to host
 dolphin-cloud.com: could not connect to host
@@ -1003,7 +1026,6 @@ dreadbyte.com: could not connect to host
 dreaming.solutions: did not receive HSTS header
 drishti.guru: could not connect to host
 drive.google.com: did not receive HSTS header (error ignored - included regardless)
-driving-lessons.co.uk: did not receive HSTS header
 droidboss.com: could not connect to host
 dropcam.com: did not receive HSTS header
 drtroyhendrickson.com: could not connect to host
@@ -1024,13 +1046,14 @@ dylanscott.com.au: did not receive HSTS header
 dymersion.com: did not receive HSTS header
 dzimejl.sk: did not receive HSTS header
 dzlibs.io: could not connect to host
+dzyabchenko.com: could not connect to host
 e-aut.net: could not connect to host
 e-deca2.org: did not receive HSTS header
 e-sa.com: did not receive HSTS header
 earga.sm: could not connect to host
 earlybirdsnacks.com: could not connect to host
 earthrise16.com: could not connect to host
-easez.net: did not receive HSTS header
+easez.net: could not connect to host
 easychiller.org: could not connect to host
 easyhaul.com: did not receive HSTS header
 eatlowcarb.de: did not receive HSTS header
@@ -1070,6 +1093,7 @@ ekbanden.nl: could not connect to host
 ekostecki.de: did not receive HSTS header
 el-soul.com: did not receive HSTS header
 elaintehtaat.fi: did not receive HSTS header
+elan-organics.com: did not receive HSTS header
 elanguest.pl: could not connect to host
 elbetech.net: could not connect to host
 electricianforum.co.uk: could not connect to host
@@ -1084,7 +1108,6 @@ elisabeth-kostecki.de: did not receive HSTS header
 elisabethkostecki.de: did not receive HSTS header
 elitefishtank.com: could not connect to host
 elliotgluck.com: could not connect to host
-elmar-kraamzorg.nl: could not connect to host
 elmermx.ch: could not connect to host
 elnutricionista.es: did not receive HSTS header
 elpo.xyz: could not connect to host
@@ -1103,7 +1126,6 @@ enargia.jp: max-age too low: 0
 encode.space: did not receive HSTS header
 encoder.pw: could not connect to host
 encrypted.google.com: did not receive HSTS header (error ignored - included regardless)
-encryptio.com: could not connect to host
 end.pp.ua: could not connect to host
 endlessdark.net: max-age too low: 600
 endzeit-architekten.com: did not receive HSTS header
@@ -1132,6 +1154,7 @@ equatetechnologies.com.au: max-age too low: 3600
 equilibre-yoga-jennifer-will.com: could not connect to host
 erawanarifnugroho.com: could not connect to host
 eressea.xyz: could not connect to host
+ericbond.net: could not connect to host
 ernesto.at: could not connect to host
 eromixx.com: did not receive HSTS header
 erotalia.es: could not connect to host
@@ -1141,7 +1164,6 @@ errlytics.com: [Exception... "Component returned failure code: 0x80004005 (NS_ER
 errolz.com: could not connect to host
 errors.zenpayroll.com: could not connect to host
 ersindemirtas.com: did not receive HSTS header
-esclear.de: did not receive HSTS header
 escotour.com: did not receive HSTS header
 esec.rs: did not receive HSTS header
 espra.com: could not connect to host
@@ -1165,7 +1187,7 @@ euroshop24.net: could not connect to host
 evantage.org: could not connect to host
 evasion-energie.com: could not connect to host
 evdenevenakliyatankara.pw: did not receive HSTS header
-everybooks.com: max-age too low: 60
+everybooks.com: could not connect to host
 everylab.org: could not connect to host
 evin.ml: could not connect to host
 evites.me: could not connect to host
@@ -1181,12 +1203,12 @@ expressfinance.co.za: did not receive HSTS header
 extreemhost.nl: did not receive HSTS header
 extremenetworking.net: could not connect to host
 exy.pw: could not connect to host
-exyplis.com: did not receive HSTS header
 eyeglassuniverse.com: did not receive HSTS header
 ez.fi: could not connect to host
 ezimoeko.net: could not connect to host
 ezmod.org: could not connect to host
 eztv.ch: did not receive HSTS header
+f-be.com: could not connect to host
 f-s-u.co.uk: could not connect to host
 f00.ca: did not receive HSTS header
 fabhub.io: could not connect to host
@@ -1251,7 +1273,6 @@ firefall.rocks: could not connect to host
 firemail.io: could not connect to host
 fireorbit.de: did not receive HSTS header
 first-time-offender.com: could not connect to host
-firstchoicecandy.com: could not connect to host
 firstforex.co.uk: did not receive HSTS header
 fish2.me: did not receive HSTS header
 fit4medien.de: did not receive HSTS header
@@ -1266,9 +1287,7 @@ fj.search.yahoo.com: did not receive HSTS header
 fjruiz.es: could not connect to host
 flags.ninja: could not connect to host
 flamewall.net: could not connect to host
-flamingkeys.com.au: could not connect to host
 flawcheck.com: did not receive HSTS header
-flazznetworks.com: did not receive HSTS header
 fliexer.com: did not receive HSTS header
 floless.co.uk: did not receive HSTS header
 florian-lillpopp.de: max-age too low: 10
@@ -1305,12 +1324,14 @@ foxdev.io: could not connect to host
 foxelbox.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 foxtrot.pw: could not connect to host
 fr33d0m.link: could not connect to host
+fragnic.com: could not connect to host
 francescopalazzo.com: could not connect to host
 francevpn.xyz: could not connect to host
 frangor.info: did not receive HSTS header
 franta.biz: did not receive HSTS header
 franta.email: did not receive HSTS header
 franzt.de: could not connect to host
+franzt.ovh: could not connect to host
 frasys.io: max-age too low: 7776000
 freeflow.tv: could not connect to host
 freematthale.net: did not receive HSTS header
@@ -1355,6 +1376,7 @@ gabber.scot: could not connect to host
 gaelleetarnaud.com: did not receive HSTS header
 gaestehaus-monika.com: could not connect to host
 gafachi.com: could not connect to host
+gaiserik.com: could not connect to host
 gakkainavi4.com: could not connect to host
 galardi.org: did not receive HSTS header
 galenskap.eu: could not connect to host
@@ -1374,13 +1396,13 @@ gamerslair.org: did not receive HSTS header
 gamesdepartment.co.uk: did not receive HSTS header
 gamingmedia.eu: did not receive HSTS header
 gampenhof.de: did not receive HSTS header
+gancedo.com.es: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 gaptek.id: did not receive HSTS header
 garciamartin.me: could not connect to host
 gatilagata.com.br: did not receive HSTS header
 gchq.wtf: could not connect to host
 gdpventure.com: max-age too low: 0
 gedankenbude.info: did not receive HSTS header
-geekabit.nl: could not connect to host
 geekbundle.org: did not receive HSTS header
 geekcast.co.uk: did not receive HSTS header
 geeky.software: could not connect to host
@@ -1424,7 +1446,7 @@ gipsamsfashion.com: could not connect to host
 gipsic.com: did not receive HSTS header
 gistfy.com: could not connect to host
 github.party: could not connect to host
-givemyanswer.com: did not receive HSTS header
+givemyanswer.com: could not connect to host
 gizzo.sk: could not connect to host
 gkralik.eu: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 gl.search.yahoo.com: did not receive HSTS header
@@ -1442,7 +1464,8 @@ gm.search.yahoo.com: did not receive HSTS header
 gmail.com: did not receive HSTS header (error ignored - included regardless)
 gmantra.org: could not connect to host
 gmoes.at: max-age too low: 600000
-go.ax: did not receive HSTS header
+gnom.me: did not receive HSTS header
+go.ax: could not connect to host
 go2sh.de: did not receive HSTS header
 goabonga.com: could not connect to host
 goaltree.ch: did not receive HSTS header
@@ -1454,10 +1477,10 @@ goerner.me: did not receive HSTS header
 goge.site: could not connect to host
 gogenenglish.com: could not connect to host
 gogetssl.com: did not receive HSTS header
+goggs.eu: did not receive HSTS header
 gogold-g.com: could not connect to host
 gold24.in: did not receive HSTS header
 goldendata.io: could not connect to host
-golfburn.com: could not connect to host
 golocal-media.de: did not receive HSTS header
 gonzalosanchez.mx: did not receive HSTS header
 goodenough.nz: did not receive HSTS header
@@ -1474,7 +1497,6 @@ gotowned.org: did not receive HSTS header
 gottcode.org: did not receive HSTS header
 gov.ax: could not connect to host
 govillemo.ca: did not receive HSTS header
-gowe.wang: could not connect to host
 gparent.org: did not receive HSTS header
 gpsfix.cz: could not connect to host
 gpstuner.com: did not receive HSTS header
@@ -1482,13 +1504,14 @@ gracesofgrief.com: max-age too low: 86400
 grafmurr.de: could not connect to host
 grandmascookieblog.com: did not receive HSTS header
 graph.no: did not receive HSTS header
+grassenberg.de: could not connect to host
 gravity-net.de: could not connect to host
 grazetech.com: could not connect to host
+greboid.co.uk: could not connect to host
+greboid.com: could not connect to host
 greenhillantiques.co.uk: did not receive HSTS header
 greenvines.com.tw: did not receive HSTS header
 greg.red: could not connect to host
-gregmilton.com: could not connect to host
-gregmilton.org: could not connect to host
 gregorytlee.me: could not connect to host
 gremots.com: did not receive HSTS header
 greplin.com: could not connect to host
@@ -1512,6 +1535,7 @@ gurusupe.com: could not connect to host
 gussi.is: could not connect to host
 gvt2.com: could not connect to host (error ignored - included regardless)
 gvt3.com: could not connect to host (error ignored - included regardless)
+gw2reload.eu: could not connect to host
 gwijaya.com: could not connect to host
 gwtest.us: could not connect to host
 gxlrx.net: could not connect to host
@@ -1523,11 +1547,12 @@ gyz.io: could not connect to host
 h2check.org: could not connect to host
 haarkliniek.com: did not receive HSTS header
 habanaavenue.com: did not receive HSTS header
-habbo.life: could not connect to host
+habbo.life: max-age too low: 0
 hablemosdetecnologia.com.ve: could not connect to host
 hack.cz: could not connect to host
 hack.li: did not receive HSTS header
 hacker.one: could not connect to host
+hacker.parts: could not connect to host
 hackerforever.com: did not receive HSTS header
 hackerone-ext-adroll.com: could not connect to host
 hackerspace-ntnu.no: could not connect to host
@@ -1546,13 +1571,16 @@ halo.red: could not connect to host
 hancc.net: could not connect to host
 hanfu.la: could not connect to host
 hannover-banditen.de: did not receive HSTS header
+hansen.hn: could not connect to host
 hao2taiwan.com: max-age too low: 0
+happycoder.net: could not connect to host
 happyfabric.me: did not receive HSTS header
 happygadget.me: could not connect to host
 harabuhouse.com: did not receive HSTS header
 harbor-light.net: could not connect to host
 hardline.xyz: could not connect to host
 harmonycosmetic.com: max-age too low: 300
+harrisonswebsites.com: did not receive HSTS header
 harristony.com: could not connect to host
 hartmancpa.com: did not receive HSTS header
 harvestapp.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
@@ -1561,7 +1589,7 @@ harz.cloud: could not connect to host
 has.vision: could not connect to host
 hash-list.com: could not connect to host
 hasilocke.de: did not receive HSTS header
-hasinase.de: did not receive HSTS header
+hasinase.de: could not connect to host
 haste.ch: could not connect to host
 hastherebeenamassshooting.today: could not connect to host
 hatoko.net: could not connect to host
@@ -1589,7 +1617,7 @@ helpmebuild.com: did not receive HSTS header
 hemdal.se: could not connect to host
 hencagon.com: could not connect to host
 henriknoerr.com: could not connect to host
-hermes-net.de: did not receive HSTS header
+hermes-net.de: could not connect to host
 herpaderp.net: did not receive HSTS header
 herzbotschaft.de: did not receive HSTS header
 hex2013.com: did not receive HSTS header
@@ -1604,8 +1632,10 @@ hikariempire.com: could not connect to host
 hillcity.org.nz: did not receive HSTS header
 hilnu.tk: could not connect to host
 hiphopconvention.nl: could not connect to host
+hippies.com.br: could not connect to host
 hitoy.org: did not receive HSTS header
 hittipps.com: did not receive HSTS header
+hlavacek.us: could not connect to host
 hlyue.com: could not connect to host
 hmm.nyc: could not connect to host
 hn.search.yahoo.com: did not receive HSTS header
@@ -1655,7 +1685,6 @@ humpteedumptee.in: did not receive HSTS header
 huntshomeinspections.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 hurricanelabs.com: did not receive HSTS header
 huskybutt.dog: could not connect to host
-hycken.com: did not receive HSTS header
 hydra.ws: could not connect to host
 hyper69.com: did not receive HSTS header
 hzsh.xyz: did not receive HSTS header
@@ -1669,12 +1698,14 @@ icebat.dyndns.org: could not connect to host
 icewoman.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 icfl.com.br: could not connect to host
 ichnichtskaufmann.de: could not connect to host
+icpc2016.in.th: could not connect to host
 icreative.nl: did not receive HSTS header
 ictual.com: max-age too low: 0
 icusignature.com: did not receive HSTS header
 id-co.in: could not connect to host
 id-conf.com: could not connect to host
 idacmedia.com: max-age too low: 5184000
+idcrane.com: could not connect to host
 ideal-envelopes.co.uk: did not receive HSTS header
 ideasmeetingpoint.com: could not connect to host
 ideation-inc.co.jp: did not receive HSTS header
@@ -1688,6 +1719,7 @@ ies-italia.it: did not receive HSTS header
 ies.id.lv: could not connect to host
 ifad.org: did not receive HSTS header
 ifleurs.com: could not connect to host
+ifoss.me: could not connect to host
 ignatisd.gr: did not receive HSTS header
 ignitedmindz.in: could not connect to host
 igule.net: could not connect to host
@@ -1726,11 +1758,13 @@ inbox.li: did not receive HSTS header
 incendiary-arts.com: could not connect to host
 inchomatic.com: did not receive HSTS header
 indoorskiassen.nl: did not receive HSTS header
+indovinabank.com.vn: did not receive HSTS header
 indust.me: did not receive HSTS header
 infcof.com: max-age too low: 0
 infinitude.xyz: could not connect to host
 infinitusgaming.eu: could not connect to host
 inflation.ml: could not connect to host
+info-screw.com: could not connect to host
 infogrfx.com: did not receive HSTS header
 infotics.es: did not receive HSTS header
 injigo.com: did not receive HSTS header
@@ -1740,9 +1774,9 @@ inkstory.gr: did not receive HSTS header
 inksupply.com: did not receive HSTS header
 inleaked.com: could not connect to host
 inmyarea.com: max-age too low: 0
-innophate-security.com: could not connect to host
 innophate-security.nl: could not connect to host
 ins1gn1a.com: did not receive HSTS header
+insane-bullets.com: could not connect to host
 insane.zone: could not connect to host
 insite-feedback.com: did not receive HSTS header
 inspire-av.com: did not receive HSTS header
@@ -1755,6 +1789,7 @@ intel.li: could not connect to host
 intelldynamics.com: could not connect to host
 interference.io: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 interlun.com: could not connect to host
+internect.co.za: did not receive HSTS header
 internetcasinos.de: did not receive HSTS header
 internetcensus.org: could not connect to host
 interserved.com: did not receive HSTS header
@@ -1781,7 +1816,7 @@ iqcn.co: did not receive HSTS header
 iqualtech.com: did not receive HSTS header
 iranianlawschool.com: could not connect to host
 iraqidinar.org: did not receive HSTS header
-irazimina.ru: did not receive HSTS header
+irazimina.ru: could not connect to host
 irccloud.com: did not receive HSTS header
 irelandesign.com: did not receive HSTS header
 ischool.co.jp: did not receive HSTS header
@@ -1790,7 +1825,6 @@ isitamor.pm: could not connect to host
 iskaz.rs: did not receive HSTS header
 isogram.nl: could not connect to host
 israkurort.com: did not receive HSTS header
-istanbul.systems: could not connect to host
 istanbultravelguide.info: could not connect to host
 istaspirtslietas.lv: did not receive HSTS header
 it-go.net: did not receive HSTS header
@@ -1827,7 +1861,9 @@ jamesdoell.com: could not connect to host
 jamesdoylephoto.com: did not receive HSTS header
 jamesf.xyz: could not connect to host
 jamesmorrison.me: did not receive HSTS header
+jamessan.com: did not receive HSTS header
 jamourtney.com: could not connect to host
+jan-and-maaret.de: could not connect to host
 jan27.org: did not receive HSTS header
 janario.me: could not connect to host
 janbrodda.de: max-age too low: 2592000
@@ -1836,7 +1872,6 @@ jannyrijneveld.nl: did not receive HSTS header
 janus-engineering.de: did not receive HSTS header
 japlex.com: could not connect to host
 jaqen.ch: could not connect to host
-jardins-utopie.net: could not connect to host
 jaredeberle.org: did not receive HSTS header
 jaroslavtrsek.cz: did not receive HSTS header
 jartza.org: could not connect to host
@@ -1857,11 +1892,11 @@ jbn.mx: could not connect to host
 jbradaric.me: could not connect to host
 jcch.de: could not connect to host
 jcor.me: did not receive HSTS header
+jcoscia.com: could not connect to host
 jctf.io: could not connect to host
 jeff393.com: could not connect to host
 jenjoit.de: could not connect to host
 jensenbanden.no: could not connect to host
-jensrex.dk: did not receive HSTS header
 jeremye77.com: could not connect to host
 jesorsenville.com: did not receive HSTS header
 jessicabenedictus.nl: could not connect to host
@@ -1891,7 +1926,7 @@ jogi-server.de: did not receive HSTS header
 johnblackbourn.com: could not connect to host
 johners.me: could not connect to host
 johners.tech: did not receive HSTS header
-johnhgaunt.com: did not receive HSTS header
+johnhgaunt.com: could not connect to host
 johnrom.com: did not receive HSTS header
 jonas-keidel.de: did not receive HSTS header
 jonasgroth.se: max-age too low: 2592000
@@ -1902,7 +1937,6 @@ joostbovee.nl: did not receive HSTS header
 jordanhamilton.me: could not connect to host
 joretapo.fr: could not connect to host
 josahrens.me: could not connect to host
-joshgrancell.com: could not connect to host
 joshstroup.me: could not connect to host
 jottit.com: could not connect to host
 jpbike.cz: could not connect to host
@@ -1910,14 +1944,13 @@ jrc9.ca: did not receive HSTS header
 jrgold.me: could not connect to host
 jrmd.io: could not connect to host
 jrvar.com: did not receive HSTS header
-jsanders.us: did not receive HSTS header
+jsanders.us: could not connect to host
 jualautoclave.com: did not receive HSTS header
 jualssh.com: could not connect to host
 juchit.at: could not connect to host
 juliamweber.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 julian-kipka.de: could not connect to host
 jumbox.xyz: could not connect to host
-jump.wtf: could not connect to host
 junaos.xyz: did not receive HSTS header
 junethack.net: could not connect to host
 junge-selbsthilfe.info: could not connect to host
@@ -1932,6 +1965,7 @@ juwairen.cn: could not connect to host
 jvoice.net: could not connect to host
 jwilsson.me: could not connect to host
 jxm.in: could not connect to host
+jznet.org: max-age too low: 86400
 k-dev.de: could not connect to host
 ka-clan.com: could not connect to host
 kabuabc.com: did not receive HSTS header
@@ -1963,12 +1997,12 @@ keeley.ml: could not connect to host
 keeleysam.me: could not connect to host
 keepclean.me: could not connect to host
 ken.fm: did not receive HSTS header
-kenoschwalb.com: could not connect to host
 kerangalam.com: could not connect to host
 kerksanders.nl: did not receive HSTS header
 kermadec.net: could not connect to host
 kernl.us: did not receive HSTS header
 kevinapease.com: did not receive HSTS header
+kevinbusse.de: could not connect to host
 keymaster.lookout.com: did not receive HSTS header
 kgxtech.com: max-age too low: 2592000
 ki-on.net: did not receive HSTS header
@@ -1984,7 +2018,7 @@ kinderwagen-test24.de: could not connect to host
 kingmanhall.org: could not connect to host
 kinkdr.com: could not connect to host
 kinnon.enterprises: could not connect to host
-kinogb.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
+kinogb.net: max-age too low: 0
 kionetworks.com: did not receive HSTS header
 kipira.com: could not connect to host
 kirkforcongress.com: could not connect to host
@@ -2028,11 +2062,10 @@ korsanparti.org: could not connect to host
 kotonehoko.net: could not connect to host
 kotovstyle.ru: could not connect to host
 kr.search.yahoo.com: did not receive HSTS header
-krachtinverbinding.nl: did not receive HSTS header
+kraiwan.com: did not receive HSTS header
 krayx.com: could not connect to host
 kredite.sale: could not connect to host
 kriegt.es: could not connect to host
-kristikala.nl: could not connect to host
 krmela.com: could not connect to host
 kroetenfuchs.de: could not connect to host
 kropkait.pl: could not connect to host
@@ -2052,6 +2085,7 @@ kurehun.org: could not connect to host
 kurtmclester.com: did not receive HSTS header
 kusaka-abacus.jp: max-age too low: 0
 kweddingplanning.com: did not receive HSTS header
+kwondratsch.com: could not connect to host
 kyanite.co: could not connect to host
 kylinj.com: could not connect to host
 kyochon.fr: could not connect to host
@@ -2062,13 +2096,12 @@ labina.com.tr: did not receive HSTS header
 laboiteapc.fr: did not receive HSTS header
 labordata.io: could not connect to host
 labrador-retrievers.com.au: did not receive HSTS header
-labs.moscow: did not receive HSTS header
+labs.moscow: could not connect to host
 lachlankidson.net: did not receive HSTS header
 lacledeslan.ninja: could not connect to host
 ladbroke.net: did not receive HSTS header
 laf.in.net: did not receive HSTS header
 lagalerievirtuelle.fr: did not receive HSTS header
-laglab.org: could not connect to host
 lagoza.name: could not connect to host
 lambdafive.co.uk: could not connect to host
 lampl.info: did not receive HSTS header
@@ -2109,13 +2142,13 @@ leopoldina.net: could not connect to host
 leopotamgroup.com: could not connect to host
 leovanna.co.uk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 lepont.pl: could not connect to host
-lerner.moscow: did not receive HSTS header
+lerner.moscow: could not connect to host
 les-corsaires.net: could not connect to host
 lesdouceursdeliyana.com: could not connect to host
+lesperlesdunet.fr: could not connect to host
 letras.mus.br: did not receive HSTS header
 letsmultiplayerplay.com: did not receive HSTS header
 letustravel.tk: could not connect to host
-levinus.de: could not connect to host
 lfullerdesign.com: did not receive HSTS header
 lgiswa.com.au: did not receive HSTS header
 lgrs.com.au: did not receive HSTS header
@@ -2149,6 +2182,7 @@ limalama.eu: max-age too low: 1
 limeyeti.com: could not connect to host
 limiteddata.co.uk: could not connect to host
 limpido.it: could not connect to host
+lincolnwayflorist.com: could not connect to host
 lindberg.io: did not receive HSTS header
 lingotaxi.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 lingros-test.tk: could not connect to host
@@ -2161,21 +2195,19 @@ linuxfixed.it: could not connect to host
 linuxforyou.com: could not connect to host
 linuxgeek.ro: could not connect to host
 linuxwebservertips.in: could not connect to host
+liquidcomm.net: could not connect to host
 liquorsanthe.in: could not connect to host
-lisonfan.com: did not receive HSTS header
 listafirmelor.com: could not connect to host
 litespeed.io: could not connect to host
 livedemo.io: could not connect to host
 livej.am: could not connect to host
 livi.co: did not receive HSTS header
-lnoldan.com: could not connect to host
 loadingdeck.com: did not receive HSTS header
 loafbox.com: could not connect to host
 locktheirphone.com: could not connect to host
 locomotive.ca: did not receive HSTS header
 login.corp.google.com: max-age too low: 7776000 (error ignored - included regardless)
 loginseite.com: could not connect to host
-logistify.com.mx: could not connect to host
 loli.bz: could not connect to host
 lonal.com: could not connect to host
 londonlanguageexchange.com: could not connect to host
@@ -2194,9 +2226,7 @@ lordjevington.co.uk: could not connect to host
 lostinsecurity.com: could not connect to host
 lothai.re: could not connect to host
 lotsencafe.de: did not receive HSTS header
-louiewatch.com: could not connect to host
 lovelifelovelive.com: could not connect to host
-lovelive.us: could not connect to host
 lovelycorral.com: did not receive HSTS header
 loveto.at: could not connect to host
 lowhangingfruitgrabber.com: could not connect to host
@@ -2213,7 +2243,7 @@ lucaterzini.com: could not connect to host
 lucidlogs.com: could not connect to host
 luine.xyz: could not connect to host
 luis-checa.com: could not connect to host
-luke.ch: could not connect to host
+lukasztkacz.com: did not receive HSTS header
 lukeng.me: could not connect to host
 lukeng.net: could not connect to host
 lukonet.com: did not receive HSTS header
@@ -2232,15 +2262,16 @@ lzkill.com: could not connect to host
 m-ali.xyz: did not receive HSTS header
 m.gparent.org: could not connect to host
 m.nu: did not receive HSTS header
+m2tc.fr: could not connect to host
 m3-gmbh.de: did not receive HSTS header
 m82labs.com: did not receive HSTS header
 maarten.nyc: did not receive HSTS header
 maartenvandekamp.nl: did not receive HSTS header
-macbolo.com: could not connect to host
 macchaberrycream.com: could not connect to host
 macchedil.com: did not receive HSTS header
 macgeneral.de: did not receive HSTS header
 machon.biz: could not connect to host
+macker.io: could not connect to host
 madars.org: did not receive HSTS header
 maddin.ga: could not connect to host
 madebymagnitude.com: did not receive HSTS header
@@ -2252,9 +2283,11 @@ mahamed91.pw: could not connect to host
 mail-settings.google.com: did not receive HSTS header (error ignored - included regardless)
 mail.google.com: did not receive HSTS header (error ignored - included regardless)
 maildragon.com: could not connect to host
+mailhost.it: could not connect to host
 makeitdynamic.com: could not connect to host
 makerstuff.net: did not receive HSTS header
 malerversand.de: did not receive HSTS header
+maltes.website: could not connect to host
 malwre.io: could not connect to host
 mamaison.io: could not connect to host
 mamaxi.org: did not receive HSTS header
@@ -2304,7 +2337,7 @@ maultrom.ml: could not connect to host
 maur.cz: did not receive HSTS header
 mavisang.cf: could not connect to host
 maxfox.me: did not receive HSTS header
-maxtruxa.com: could not connect to host
+maximiliankrieg.de: could not connect to host
 maya.mg: could not connect to host
 mbinformatik.de: could not connect to host
 mca2017.org: did not receive HSTS header
@@ -2326,6 +2359,7 @@ medirich.co: could not connect to host
 meditek-dv.ru: could not connect to host
 medm-test.com: could not connect to host
 medwayindia.com: could not connect to host
+meedoenzaanstad.nl: could not connect to host
 meetings2.com: did not receive HSTS header
 meetscompany.jp: did not receive HSTS header
 megashur.se: did not receive HSTS header
@@ -2377,7 +2411,7 @@ mijn-email.org: could not connect to host
 mikaelemilsson.net: did not receive HSTS header
 mikeburns.com: did not receive HSTS header
 mikeg.de: did not receive HSTS header
-mikek.work: could not connect to host
+mikek.work: did not receive HSTS header
 mikeology.org: could not connect to host
 mikepair.net: did not receive HSTS header
 mikonmaa.fi: could not connect to host
@@ -2403,7 +2437,7 @@ misterl.net: did not receive HSTS header
 mitchellrenouf.ca: could not connect to host
 mittenhacks.com: could not connect to host
 miui-germany.de: did not receive HSTS header
-mivcon.net: could not connect to host
+mivcon.net: did not receive HSTS header
 miyoshi-kikaku.co.jp: did not receive HSTS header
 miyoshi-kikaku.com: did not receive HSTS header
 mizd.at: could not connect to host
@@ -2414,8 +2448,6 @@ mm13.at: could not connect to host
 mmgazhomeloans.com: did not receive HSTS header
 mnemotiv.com: could not connect to host
 mnetworkingsolutions.co.uk: did not receive HSTS header
-mnt-tech.fr: did not receive HSTS header
-mnwt.nl: could not connect to host
 mobifinans.ru: did not receive HSTS header
 mobilekey.co: could not connect to host
 mobilemedics.com: did not receive HSTS header
@@ -2433,7 +2465,7 @@ mona.lu: did not receive HSTS header
 monarca.systems: did not receive HSTS header
 monasterialis.eu: could not connect to host
 mondar.io: could not connect to host
-mondopoint.com: could not connect to host
+mondopoint.com: did not receive HSTS header
 monitman.com: could not connect to host
 montenero.pl: could not connect to host
 moon.lc: could not connect to host
@@ -2471,6 +2503,7 @@ mt.me.uk: could not connect to host
 mt.search.yahoo.com: did not receive HSTS header
 mtcgf.com: did not receive HSTS header
 mtg-esport.de: could not connect to host
+mtn.cc: could not connect to host
 mu.search.yahoo.com: did not receive HSTS header
 mudcrab.us: did not receive HSTS header
 munich-rage.de: could not connect to host
@@ -2509,7 +2542,9 @@ mypagella.com: could not connect to host
 mypagella.eu: could not connect to host
 mypagella.it: could not connect to host
 mysecretrewards.com: did not receive HSTS header
+mystery-science-theater-3000.de: did not receive HSTS header
 mystudy.me: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
+mythslegendscollection.com: did not receive HSTS header
 myvirtualserver.com: max-age too low: 2592000
 myzone.com: did not receive HSTS header
 mziulu.me: could not connect to host
@@ -2528,6 +2563,7 @@ nanto.eu: could not connect to host
 narada.com.ua: could not connect to host
 nargileh.nl: could not connect to host
 nascher.org: max-age too low: 7884000
+nasreddine.xyz: could not connect to host
 natalia.io: could not connect to host
 natalt.org: did not receive HSTS header
 nathanmfarrugia.com: did not receive HSTS header
@@ -2547,7 +2583,6 @@ nct.org.uk: max-age too low: 1
 nctx.co.uk: did not receive HSTS header
 near.st: did not receive HSTS header
 neftaly.com: did not receive HSTS header
-negai.moe: did not receive HSTS header
 negativecurvature.net: could not connect to host
 neko-life.com: did not receive HSTS header
 neko-system.com: did not receive HSTS header
@@ -2593,15 +2628,15 @@ nicky.io: did not receive HSTS header
 nicoborghuis.nl: could not connect to host
 nicolasbettag.me: could not connect to host
 niconiconi.xyz: could not connect to host
-niconode.com: could not connect to host
+niconode.com: did not receive HSTS header
 nien.chat: could not connect to host
 niho.jp: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 nikcub.com: could not connect to host
 nikksno.io: did not receive HSTS header
 nikomo.fi: could not connect to host
 ninchisho-online.com: did not receive HSTS header
+nine-hells.net: could not connect to host
 ninhs.org: could not connect to host
-ninux.ch: did not receive HSTS header
 nippler.org: did not receive HSTS header
 nippombashi.net: did not receive HSTS header
 nipponcareers.com: did not receive HSTS header
@@ -2626,12 +2661,14 @@ nootropicsource.com: did not receive HSTS header
 nope.website: could not connect to host
 nopex.no: could not connect to host
 nopol.de: did not receive HSTS header
+norandom.com: could not connect to host
 norb.at: could not connect to host
+nordseeblicke.de: could not connect to host
 nosecretshop.com: could not connect to host
 nossasenhoradaconceicao.com.br: could not connect to host
 notadd.com: did not receive HSTS header
 notnl.com: could not connect to host
-nottheonion.net: did not receive HSTS header
+nottheonion.net: could not connect to host
 nouvelle-vague-saint-cast.fr: did not receive HSTS header
 novacoast.com: did not receive HSTS header
 novatrucking.de: could not connect to host
@@ -2674,7 +2711,8 @@ nz.search.yahoo.com: max-age too low: 172800
 nzb.cat: max-age too low: 7776000
 o0o.one: did not receive HSTS header
 oasis.mobi: did not receive HSTS header
-oasisim.net: could not connect to host
+oasisim.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
+obdolbacca.ru: could not connect to host
 obsydian.org: could not connect to host
 occasion-impro.com: could not connect to host
 occentus.net: did not receive HSTS header
@@ -2684,12 +2722,15 @@ odin.xxx: did not receive HSTS header
 oe8.bet: could not connect to host
 ofcourselanguages.com: could not connect to host
 offshore-firma.org: could not connect to host
+ogogoshop.com: could not connect to host
 oishioffice.com: did not receive HSTS header
 okane.love: could not connect to host
 okok-rent.com: could not connect to host
 okok.rent: could not connect to host
 okutama.in.th: could not connect to host
 olafnorge.de: could not connect to host
+olanderflorist.com: could not connect to host
+oldoakflorist.com: could not connect to host
 oliverdunk.com: did not receive HSTS header
 ollehbizev.co.kr: could not connect to host
 ollie.io: did not receive HSTS header
@@ -2703,7 +2744,8 @@ oneminute.io: did not receive HSTS header
 onepluscamps.com: did not receive HSTS header
 onespiritinc.com: did not receive HSTS header
 onet.space: could not connect to host
-onewpst.com: did not receive HSTS header
+onewaymail.com: could not connect to host
+onewpst.com: could not connect to host
 oniichan.us: did not receive HSTS header
 online-casino.eu: did not receive HSTS header
 online-wetten.de: did not receive HSTS header
@@ -2714,7 +2756,6 @@ onlinepollsph.com: could not connect to host
 onlinespielothek.com: did not receive HSTS header
 onlinewetten.de: could not connect to host
 onlyshopstation.com: did not receive HSTS header
-onlyzero.net: did not receive HSTS header
 ononpay.com: did not receive HSTS header
 onovlena.dn.ua: could not connect to host
 ontras.com: could not connect to host
@@ -2737,7 +2778,7 @@ openshift.redhat.com: did not receive HSTS header
 opensrd.com: could not connect to host
 openxmpp.com: could not connect to host
 opim.ca: did not receive HSTS header
-oprbox.com: could not connect to host
+opperwall.net: did not receive HSTS header
 opsbears.com: did not receive HSTS header
 optenhoefel.de: could not connect to host
 optometriepunt.nl: did not receive HSTS header
@@ -2753,7 +2794,6 @@ orleika.ml: could not connect to host
 osaiyuwu.com: could not connect to host
 oscsdp.cz: could not connect to host
 oslfoundation.org: could not connect to host
-oslinux.net: did not receive HSTS header
 osp.cx: could not connect to host
 ossan-kobe-gourmet.com: did not receive HSTS header
 ossbinaries.com: could not connect to host
@@ -2763,6 +2803,7 @@ otakuworld.de: could not connect to host
 othercode.nl: could not connect to host
 othermedia.cc: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 otherstuff.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
+oticasvisao.net.br: could not connect to host
 otichi.com: did not receive HSTS header
 ottospora.nl: could not connect to host
 ourbank.com: did not receive HSTS header
@@ -2781,6 +2822,7 @@ owncloud.help: could not connect to host
 ownmovies.fr: could not connect to host
 oxygenabsorbers.com: did not receive HSTS header
 oxynux.fr: could not connect to host
+oxynux.xyz: could not connect to host
 p.linode.com: could not connect to host
 p8r.de: did not receive HSTS header
 pa.search.yahoo.com: did not receive HSTS header
@@ -2791,6 +2833,7 @@ paestbin.com: could not connect to host
 pagerate.io: did not receive HSTS header
 pagetoimage.com: could not connect to host
 pahae.de: did not receive HSTS header
+paintingat.com: could not connect to host
 paisaone.com: did not receive HSTS header
 paku.me: could not connect to host
 pamsoft.pl: max-age too low: 0
@@ -2835,7 +2878,7 @@ payroll.ch: did not receive HSTS header
 pbapp.net: did not receive HSTS header
 pbprint.ru: max-age too low: 0
 pc-nf.de: did not receive HSTS header
-pcfun.net: could not connect to host
+pcfun.net: did not receive HSTS header
 pchax.net: could not connect to host
 pdevio.com: could not connect to host
 pdf.yt: could not connect to host
@@ -2869,6 +2912,7 @@ pharmgkb.org: could not connect to host
 philpropertygroup.com: could not connect to host
 phonenumberinfo.co.uk: could not connect to host
 phongmay24h.com: could not connect to host
+php-bach.org: could not connect to host
 phpfashion.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 phurl.de: could not connect to host
 picallo.es: could not connect to host
@@ -2905,12 +2949,14 @@ platform.lookout.com: could not connect to host
 play.google.com: did not receive HSTS header (error ignored - included regardless)
 playkh.com: did not receive HSTS header
 playmaker.io: could not connect to host
+playmyplay.com: did not receive HSTS header
 playnation.io: did not receive HSTS header
 pleier-it.de: did not receive HSTS header
 pleier.it: did not receive HSTS header
 plhdb.org: did not receive HSTS header
-plixer.com: could not connect to host
+plixer.com: did not receive HSTS header
 plogable.co: could not connect to host
+plombirator.kz: could not connect to host
 plothost.com: did not receive HSTS header
 ploup.net: could not connect to host
 pmnts.io: could not connect to host
@@ -2924,21 +2970,21 @@ politologos.org: did not receive HSTS header
 polycoise.com: could not connect to host
 polypho.nyc: could not connect to host
 pompompoes.com: could not connect to host
-ponolau.com: could not connect to host
-pontokay.com.br: did not receive HSTS header
+pontokay.com.br: could not connect to host
 pontualcomp.com: max-age too low: 2592000
 poolsandstuff.com: did not receive HSTS header
 poon.tech: could not connect to host
+porno-gif.ru: did not receive HSTS header
 portalplatform.net: did not receive HSTS header
+portalzine.de: did not receive HSTS header
 postcodewise.co.uk: did not receive HSTS header
 posterspy.com: did not receive HSTS header
 postscheduler.org: could not connect to host
 posylka.de: did not receive HSTS header
-potatofrom.space: could not connect to host
 poussinooz.fr: could not connect to host
 povitria.net: could not connect to host
 power-of-interest.com: did not receive HSTS header
-power99press.com: did not receive HSTS header
+power99press.com: could not connect to host
 powerplannerapp.com: did not receive HSTS header
 powerxequality.com: could not connect to host
 ppr-truby.ru: could not connect to host
@@ -2953,7 +2999,7 @@ pressfreedomfoundation.org: did not receive HSTS header
 pretzlaff.info: did not receive HSTS header
 preworkout.me: could not connect to host
 prezola.com: did not receive HSTS header
-princesparktouch.com: could not connect to host
+prgslab.net: could not connect to host
 printexpress.cloud: did not receive HSTS header
 printfn.com: could not connect to host
 priolkar.com: did not receive HSTS header
@@ -2972,7 +3018,6 @@ progg.no: could not connect to host
 prohostonline.fi: could not connect to host
 projectdp.net: could not connect to host
 promecon-gmbh.de: did not receive HSTS header
-promoscuola.net: could not connect to host
 prontolight.com: did not receive HSTS header
 prontomovers.co.uk: could not connect to host
 prosocialmachines.com: could not connect to host
@@ -2983,7 +3028,8 @@ proximato.com: could not connect to host
 proxybay.al: could not connect to host
 proxybay.club: could not connect to host
 proxybay.info: did not receive HSTS header
-prxio.site: could not connect to host
+prxio.date: could not connect to host
+prxio.site: did not receive HSTS header
 prytkov.com: did not receive HSTS header
 psw.academy: did not receive HSTS header
 psw.consulting: did not receive HSTS header
@@ -3000,6 +3046,7 @@ pushapp.org: did not receive HSTS header
 pwd.ovh: could not connect to host
 pwdgen.net: could not connect to host
 pwnies.dk: could not connect to host
+pwntr.com: could not connect to host
 py.search.yahoo.com: did not receive HSTS header
 pypi-status.org: could not connect to host
 pyplo.org: did not receive HSTS header
@@ -3029,11 +3076,11 @@ qwilink.me: did not receive HSTS header
 r10n.com: did not receive HSTS header
 r15.me: could not connect to host
 r3bl.me: did not receive HSTS header
-r40.us: could not connect to host
 raajheshkannaa.com: could not connect to host
 radicaleducation.net: could not connect to host
 radiormi.com: did not receive HSTS header
 rafaelcz.de: could not connect to host
+railgun.com.cn: could not connect to host
 rainbowbarracuda.com: could not connect to host
 ramonj.nl: could not connect to host
 randomcage.com: did not receive HSTS header
@@ -3043,17 +3090,14 @@ rannseier.org: did not receive HSTS header
 rapidresearch.me: could not connect to host
 rapidthunder.io: could not connect to host
 rasing.me: did not receive HSTS header
-raspass.me: could not connect to host
 ratajczak.fr: could not connect to host
+rate-esport.de: could not connect to host
 raulfraile.net: could not connect to host
 rawet.se: did not receive HSTS header
 rawstorieslondon.com: could not connect to host
-ray-home.de: could not connect to host
-ray-works.de: could not connect to host
 raydan.space: could not connect to host
 raydobe.me: could not connect to host
-raymd.de: could not connect to host
-rayworks.de: could not connect to host
+rc-rp.com: could not connect to host
 rc4.io: did not receive HSTS header
 rcafox.com: could not connect to host
 rcpcbd.com: did not receive HSTS header
@@ -3065,6 +3109,7 @@ realmofespionage.com: could not connect to host
 reardenporn.com: could not connect to host
 recommended.reviews: could not connect to host
 redar.xyz: did not receive HSTS header
+redballoonsecurity.com: could not connect to host
 reddiseals.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 reddit.com: did not receive HSTS header
 rede.ca: did not receive HSTS header
@@ -3090,7 +3135,7 @@ renlong.org: could not connect to host
 renrenss.com: did not receive HSTS header
 rentcarassist.com: could not connect to host
 renteater.com: could not connect to host
-replacemychina.com: did not receive HSTS header
+replacemychina.com: could not connect to host
 reprolife.co.uk: max-age too low: 0
 res-rheingau.de: did not receive HSTS header
 res42.com: could not connect to host
@@ -3106,6 +3151,7 @@ reverie.pw: could not connect to host
 reviews.anime.my: max-age too low: 5184000
 revtut.net: did not receive HSTS header
 rewardstock.com: max-age too low: 0
+rezept-planer.de: could not connect to host
 rgavmf.ru: did not receive HSTS header
 rhapsodhy.hu: could not connect to host
 rhdigital.pro: could not connect to host
@@ -3128,6 +3174,7 @@ rk6.cz: could not connect to host
 rkmantpur.org: did not receive HSTS header
 rme.li: did not receive HSTS header
 rngmeme.com: could not connect to host
+roadfeast.com: could not connect to host
 roan24.pl: did not receive HSTS header
 robertglastra.com: could not connect to host
 robigalia.org: did not receive HSTS header
@@ -3171,7 +3218,7 @@ rubyshop.nl: max-age too low: 604800
 rudeotter.com: could not connect to host
 rudloff.pro: did not receive HSTS header
 rugirlfriend.com: could not connect to host
-ruiming.me: could not connect to host
+ruiming.me: did not receive HSTS header
 runawebinar.nl: could not connect to host
 runementors.com: could not connect to host
 runtondev.com: did not receive HSTS header
@@ -3200,7 +3247,6 @@ salserototal.com: did not receive HSTS header
 salud.top: did not receive HSTS header
 sametovymesic.cz: could not connect to host
 saml2.com: could not connect to host
-sampcup.com: did not receive HSTS header
 sampoznay.ru: did not receive HSTS header
 samraskauskas.com: could not connect to host
 samsen.club: did not receive HSTS header
@@ -3209,13 +3255,14 @@ sansemea.com: could not connect to host
 sansonehowell.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 sapk.fr: could not connect to host
 sarah-beckett-harpist.com: did not receive HSTS header
-sarisonproductions.com: did not receive HSTS header
+sarisonproductions.com: could not connect to host
 saruwebshop.co.za: did not receive HSTS header
 satmep.com: did not receive HSTS header
 satriyowibowo.my.id: did not receive HSTS header
 satsukii.moe: did not receive HSTS header
 saturngames.co.uk: did not receive HSTS header
 saucyfox.net: did not receive HSTS header
+sauerbrey.eu: could not connect to host
 saunasandstuff.ca: did not receive HSTS header
 saunasandstuff.com: did not receive HSTS header
 savannahtasteexperience.com: did not receive HSTS header
@@ -3225,7 +3272,7 @@ sawamura-rental.com: did not receive HSTS header
 sazima.ru: did not receive HSTS header
 sb-group.dk: did not receive HSTS header
 sbox-archives.com: could not connect to host
-sby.de: did not receive HSTS header
+sby.de: could not connect to host
 sc4le.com: could not connect to host
 schmitz.link: could not connect to host
 schnell-gold.com: could not connect to host
@@ -3233,6 +3280,7 @@ schoop.me: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_
 schreiber-netzwerk.eu: did not receive HSTS header
 schrodinger.io: could not connect to host
 schulterglatzen-altenwalde.de: could not connect to host
+schultzflorists.com: could not connect to host
 schwarzkopfforyou.de: did not receive HSTS header
 scienceathome.org: did not receive HSTS header
 scooshonline.co.uk: did not receive HSTS header
@@ -3277,6 +3325,7 @@ sehenderson.com: did not receive HSTS header
 seiko-dojo.com: could not connect to host
 selecadm.name: could not connect to host
 selectruckscalltrackingreports.com: could not connect to host
+selent.me: could not connect to host
 selfcarecentral.com: did not receive HSTS header
 selfie-france.fr: could not connect to host
 selldorado.com: did not receive HSTS header
@@ -3293,11 +3342,13 @@ seomobo.com: could not connect to host
 seowarp.net: did not receive HSTS header
 sep23.ru: did not receive HSTS header
 seq.tf: did not receive HSTS header
+serafin.tech: could not connect to host
 serfdom.io: did not receive HSTS header
 serized.pw: could not connect to host
 servercode.ca: did not receive HSTS header
 serverdensity.io: did not receive HSTS header
 servergno.me: did not receive HSTS header
+serverstuff.info: could not connect to host
 seryo.moe: could not connect to host
 seryo.net: could not connect to host
 sethcaplan.com: could not connect to host
@@ -3305,6 +3356,7 @@ setphaserstostun.org: could not connect to host
 setuid.de: could not connect to host
 setuid.io: did not receive HSTS header
 seyahatsagliksigortalari.com: could not connect to host
+sfsltd.com: did not receive HSTS header
 shadoom.com: did not receive HSTS header
 shadowmorph.info: did not receive HSTS header
 shadowsocks.net: could not connect to host
@@ -3343,6 +3395,7 @@ silicagelpackets.ca: did not receive HSTS header
 silver-drachenkrieger.de: did not receive HSTS header
 silverpvp.com: could not connect to host
 silverwind.io: did not receive HSTS header
+silvistefi.com: could not connect to host
 simbast.com: could not connect to host
 simbolo.co.uk: could not connect to host
 simod.org: could not connect to host
@@ -3363,6 +3416,7 @@ sitesten.com: did not receive HSTS header
 sitsy.ru: did not receive HSTS header
 skhosting.eu: did not receive HSTS header
 skile.ru: could not connect to host
+skills2services.com: did not receive HSTS header
 skk.io: could not connect to host
 skoda-clever-lead.de: could not connect to host
 skoda-im-dialog.de: could not connect to host
@@ -3378,7 +3432,6 @@ slightfuture.click: could not connect to host
 slix.io: could not connect to host
 slope.haus: could not connect to host
 slovakiana.sk: did not receive HSTS header
-slowfood.es: could not connect to host
 sluitkampzeist.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 slycurity.de: did not receive HSTS header
 smart-mirror.de: did not receive HSTS header
@@ -3395,6 +3448,7 @@ smkn1lengkong.sch.id: did not receive HSTS header
 smksi2.com: could not connect to host
 smm.im: could not connect to host
 smove.sg: did not receive HSTS header
+sms1.ro: could not connect to host
 smusg.com: did not receive HSTS header
 snailing.org: could not connect to host
 snapappointments.com: did not receive HSTS header
@@ -3465,6 +3519,7 @@ spideroak.com: did not receive HSTS header
 spiegels.nl: could not connect to host
 spikeykc.me: did not receive HSTS header
 spilsbury.io: could not connect to host
+spittersberger.recipes: did not receive HSTS header
 spom.net: could not connect to host
 sportwette.eu: did not receive HSTS header
 spot-events.com: could not connect to host
@@ -3489,7 +3544,9 @@ ssnc.org: max-age too low: 300
 sss3s.com: did not receive HSTS header
 stabletoken.com: could not connect to host
 stadjerspasonline.nl: could not connect to host
+stagingjobshq.com: did not receive HSTS header
 stahl.xyz: could not connect to host
+standingmist.com: could not connect to host
 starttraffic.com: did not receive HSTS header
 stat.ink: did not receive HSTS header
 stateofexception.io: could not connect to host
@@ -3523,7 +3580,6 @@ stormhub.org: could not connect to host
 stqry.com: did not receive HSTS header
 str0.at: did not receive HSTS header
 strasweb.fr: did not receive HSTS header
-straubis.org: could not connect to host
 streamingmagazin.de: could not connect to host
 streams.dyndns.org: could not connect to host
 stressfreehousehold.com: did not receive HSTS header
@@ -3543,6 +3599,7 @@ stw-group.at: could not connect to host
 subbing.work: could not connect to host
 subdimension.org: could not connect to host
 subrosa.io: could not connect to host
+subsys.no: did not receive HSTS header
 subtitle.rip: could not connect to host
 sudo.li: did not receive HSTS header
 suian.or.jp: max-age too low: 86400
@@ -3554,13 +3611,14 @@ suncountrymarine.com: did not receive HSTS header
 sunflyer.cn: did not receive HSTS header
 sunnyfruit.ru: did not receive HSTS header
 sunshinepress.org: could not connect to host
-sunyanzi.tk: could not connect to host
+suos.io: could not connect to host
 superbabysitting.ch: could not connect to host
 superbike.tw: could not connect to host
 supereight.net: did not receive HSTS header
 superiorfloridavacation.com: did not receive HSTS header
 supersalescontest.nl: did not receive HSTS header
 supersecurefancydomain.com: could not connect to host
+superuser.fi: could not connect to host
 superwally.org: could not connect to host
 suprlink.net: could not connect to host
 supweb.ovh: did not receive HSTS header
@@ -3577,6 +3635,7 @@ swimming.ca: did not receive HSTS header
 swimturk.com.tr: did not receive HSTS header
 swmd5c.org: did not receive HSTS header
 sxbk.pw: could not connect to host
+sy-anduril.de: could not connect to host
 syam.cc: could not connect to host
 sydgrabber.tk: could not connect to host
 sylvangarden.org: could not connect to host
@@ -3588,6 +3647,7 @@ syneic.com: did not receive HSTS header
 syno.gq: could not connect to host
 syntheticmotoroil.org: did not receive HSTS header
 syso.name: could not connect to host
+systemreboot.net: could not connect to host
 szaszm.tk: max-age too low: 0
 t-tz.com: could not connect to host
 t.facebook.com: did not receive HSTS header
@@ -3598,6 +3658,7 @@ tadigitalstore.com: could not connect to host
 tafoma.com: did not receive HSTS header
 tageau.com: could not connect to host
 taglondon.org: did not receive HSTS header
+tahf.net: did not receive HSTS header
 tails.com.ar: did not receive HSTS header
 taken.pl: could not connect to host
 talk.google.com: did not receive HSTS header (error ignored - included regardless)
@@ -3606,7 +3667,6 @@ tallr.se: could not connect to host
 tallshoe.com: could not connect to host
 tandarts-haarlem.nl: did not receive HSTS header
 tangibilizing.com: could not connect to host
-tanzhijun.com: did not receive HSTS header
 tapfinder.ca: could not connect to host
 tapka.cz: did not receive HSTS header
 tappublisher.com: did not receive HSTS header
@@ -3622,7 +3682,6 @@ tavopica.lt: did not receive HSTS header
 taxbench.com: could not connect to host
 taxsnaps.co.nz: did not receive HSTS header
 tazemama.biz: could not connect to host
-tazj.in: could not connect to host
 tazz.in: could not connect to host
 tcao.info: could not connect to host
 tcby45.xyz: could not connect to host
@@ -3631,9 +3690,11 @@ tcl.ath.cx: did not receive HSTS header
 tcomms.org: max-age too low: 0
 tcp.expert: did not receive HSTS header
 teachforcanada.ca: did not receive HSTS header
+team-one.racing: could not connect to host
 team-pancake.eu: could not connect to host
 teamsocial.co: did not receive HSTS header
 teamzeus.cz: could not connect to host
+tech55i.com: did not receive HSTS header
 techassist.io: did not receive HSTS header
 techhipster.net: could not connect to host
 techhub.ml: could not connect to host
@@ -3665,6 +3726,7 @@ textracer.dk: could not connect to host
 tezcam.tk: could not connect to host
 tf2stadium.com: did not receive HSTS header
 tfcoms-sp-tracker-client.azurewebsites.net: could not connect to host
+tffans.com: could not connect to host
 tfl.lu: did not receive HSTS header
 tgr.re: could not connect to host
 th-bl.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
@@ -3673,7 +3735,7 @@ thaianthro.com: did not receive HSTS header
 thaihostcool.com: max-age too low: 0
 the-construct.com: could not connect to host
 the-sky-of-valkyries.com: could not connect to host
-theamateurs.net: did not receive HSTS header
+theamateurs.net: could not connect to host
 theater.cf: could not connect to host
 theberkshirescompany.com: did not receive HSTS header
 thebrotherswarde.com: could not connect to host
@@ -3682,6 +3744,7 @@ theclementinebutchers.com: could not connect to host
 thecoffeehouse.xyz: could not connect to host
 thediaryofadam.com: did not receive HSTS header
 theendofzion.com: did not receive HSTS header
+theflowerbasketonline.com: could not connect to host
 thefootballanalyst.com: could not connect to host
 thehiddenbay.me: could not connect to host
 thehiddenbay.net: could not connect to host
@@ -3708,16 +3771,16 @@ thewebfellas.com: did not receive HSTS header
 thezonders.com: did not receive HSTS header
 thierfreund.de: could not connect to host
 thinkcoding.de: could not connect to host
-thinlyveiledcontempt.com: could not connect to host
 thirdpartytrade.com: did not receive HSTS header
-thirty5.net: did not receive HSTS header
+thirty5.net: could not connect to host
 thisisacompletetest.ga: could not connect to host
 thiswebhost.com: did not receive HSTS header
+thomaskliszowski.fr: could not connect to host
 thomaswoo.com: could not connect to host
 thorncreek.net: did not receive HSTS header
 thriveapproach.co.uk: did not receive HSTS header
+thues.eu: could not connect to host
 thumbtack.com: did not receive HSTS header
-tianshili.me: could not connect to host
 tickettoaster.de: max-age too low: 0
 tickopa.co.uk: could not connect to host
 tickreport.com: did not receive HSTS header
@@ -3743,7 +3806,6 @@ titouan.co: did not receive HSTS header
 tittelbach.at: did not receive HSTS header
 titties.ml: could not connect to host
 tkarstens.de: did not receive HSTS header
-tkat.ch: did not receive HSTS header
 tlo.hosting: could not connect to host
 tlo.network: could not connect to host
 tls.li: could not connect to host
@@ -3751,13 +3813,14 @@ tm-solutions.eu: did not receive HSTS header
 tmaward.net: could not connect to host
 tmitchell.io: could not connect to host
 tmprod.com: did not receive HSTS header
+tmpsantos.com.br: could not connect to host
 tncnanet.com.br: could not connect to host
 tnrsca.jp: did not receive HSTS header
 tobias-bielefeld.de: did not receive HSTS header
 tobiasmathes.com: could not connect to host
 tobiasmathes.name: could not connect to host
 tobiasofficial.at: could not connect to host
-todo.is: did not receive HSTS header
+todo.is: could not connect to host
 todobazar.es: could not connect to host
 tokyopopline.com: did not receive HSTS header
 tollmanz.com: did not receive HSTS header
@@ -3813,11 +3876,13 @@ tsecy.com: did not receive HSTS header
 tsgoc.com: did not receive HSTS header
 tsrstore.gq: could not connect to host
 tssouthernpower.com: max-age too low: 0
+tubepro.de: max-age too low: 600000
 tuingereedschappen.net: could not connect to host
 tunai.id: could not connect to host
 turnik-67.ru: could not connect to host
+turniker.ru: could not connect to host
 turtlementors.com: could not connect to host
-tuturulianda.com: could not connect to host
+tuturulianda.com: did not receive HSTS header
 tuvalie.com: could not connect to host
 tuxcall.de: could not connect to host
 tuxcloud.net: could not connect to host
@@ -3839,8 +3904,6 @@ tx041cap.org: did not receive HSTS header
 txclimbers.com: could not connect to host
 txf.pw: could not connect to host
 ty2u.com: did not receive HSTS header
-tyler.rs: could not connect to host
-tyleromeara.com: could not connect to host
 tylian.net: max-age too low: 0
 typingrevolution.com: did not receive HSTS header
 tyrelius.com: did not receive HSTS header
@@ -3877,6 +3940,7 @@ unicooo.com: could not connect to host
 unison.com: could not connect to host
 unitedcyberdevelopment.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 unitel2000.de: could not connect to host
+unitlabs.net: could not connect to host
 university4industry.com: did not receive HSTS header
 univz.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 unknownphenomena.net: could not connect to host
@@ -3888,7 +3952,6 @@ uonstaffhub.com: could not connect to host
 uow.ninja: could not connect to host
 up1.ca: could not connect to host
 upaknship.com: did not receive HSTS header
-upandclear.org: could not connect to host
 upani.net: did not receive HSTS header
 upldr.pw: could not connect to host
 upr.com.ua: could not connect to host
@@ -3900,10 +3963,11 @@ urphp.com: could not connect to host
 us-immigration.com: did not receive HSTS header
 usaa.com: did not receive HSTS header
 uscitizenship.info: did not receive HSTS header
+uscloud.nl: did not receive HSTS header
 uscntalk.com: could not connect to host
 used-in.jp: did not receive HSTS header
 usercare.com: did not receive HSTS header
-userify.com: did not receive HSTS header
+userify.com: max-age too low: 0
 ustr.gov: max-age too low: 86400
 utleieplassen.no: could not connect to host
 utopiagalaxy.space: did not receive HSTS header
@@ -3942,6 +4006,7 @@ verifikatorindonesia.com: could not connect to host
 vermontcareergateway.org: could not connect to host
 versia.ru: did not receive HSTS header
 veryhax.de: could not connect to host
+vestacp.top: could not connect to host
 vetmgmt.com: could not connect to host
 vfree.org: could not connect to host
 vglimg.com: could not connect to host
@@ -3959,6 +4024,7 @@ vio.no: did not receive HSTS header
 viperdns.com: could not connect to host
 vipi.es: could not connect to host
 vipmusic.ga: could not connect to host
+visionless.me: could not connect to host
 visiontree-beta.eu: could not connect to host
 visitbroadstairs.com: could not connect to host
 vissanum.com: did not receive HSTS header
@@ -3998,14 +4064,13 @@ wangzuan168.cc: did not receive HSTS header
 wapjt.cn: could not connect to host
 warandpeace.xyz: could not connect to host
 warehost.de: did not receive HSTS header
-warekon.com: could not connect to host
-warekon.dk: could not connect to host
 warhistoryonline.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 warmlyyours.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 warped.com: did not receive HSTS header
 warsentech.com: could not connect to host
 wassim.is: could not connect to host
 watchium.com: did not receive HSTS header
+watertrails.io: could not connect to host
 watsonhall.uk: could not connect to host
 wave.is: could not connect to host
 wavefrontsystemstech.com: could not connect to host
@@ -4019,7 +4084,7 @@ webandwords.com.au: could not connect to host
 webassadors.com: could not connect to host
 webdesign-kronberg.de: did not receive HSTS header
 webdev.mobi: could not connect to host
-webelement.sk: could not connect to host
+webelement.sk: did not receive HSTS header
 weberjulia.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 webhosting4.net: did not receive HSTS header
 webm.to: could not connect to host
@@ -4028,6 +4093,7 @@ webmaniabr.com: did not receive HSTS header
 webmarketingfestival.it: did not receive HSTS header
 webnosql.com: could not connect to host
 webperformance.ru: max-age too low: 3600
+webstory.xyz: could not connect to host
 webswitch.io: could not connect to host
 webtiles.co.uk: could not connect to host
 webwork.pw: could not connect to host
@@ -4068,9 +4134,9 @@ whyworldhot.com: could not connect to host
 wienholding.at: max-age too low: 0
 wieninternational.at: could not connect to host
 wiire.me: could not connect to host
-wikiclash.info: could not connect to host
 wilf1rst.com: could not connect to host
 william.si: did not receive HSTS header
+williamsonshore.com: could not connect to host
 willosagiede.com: did not receive HSTS header
 winaes.com: did not receive HSTS header
 winclient.cn: could not connect to host
@@ -4105,6 +4171,7 @@ woording.com: could not connect to host
 woresite.jp: did not receive HSTS header
 workfone.io: did not receive HSTS header
 workwithgo.com: could not connect to host
+wormdisk.net: could not connect to host
 wowapi.org: could not connect to host
 wphostingspot.com: did not receive HSTS header
 wpmetadatastandardsproject.org: could not connect to host
@@ -4113,7 +4180,6 @@ wsscompany.com.ve: could not connect to host
 wufu.org: did not receive HSTS header
 wuhengmin.com: did not receive HSTS header
 wurzelzwerg.net: could not connect to host
-www.amazon.cn: could not connect to host
 www.apollo-auto.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 www.braintreepayments.com: did not receive HSTS header
 www.calyxinstitute.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
@@ -4152,7 +4218,8 @@ xendo.net: did not receive HSTS header
 xenesisziarovky.sk: could not connect to host
 xett.com: did not receive HSTS header
 xf-liam.com: could not connect to host
-xfive.de: could not connect to host
+xfive.de: did not receive HSTS header
+xia100.xyz: could not connect to host
 xiaody.me: could not connect to host
 xiaolvmu.me: could not connect to host
 xiaoxiao.im: could not connect to host
@@ -4205,8 +4272,10 @@ yenniferallulli.de: could not connect to host
 yenniferallulli.es: did not receive HSTS header
 yenniferallulli.moda: could not connect to host
 yenniferallulli.nl: could not connect to host
+yesdevnull.net: could not connect to host
 yestees.com: did not receive HSTS header
 yetcore.io: could not connect to host
+yhori.xyz: could not connect to host
 yingyj.com: could not connect to host
 yippie.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
 yjsoft.me: did not receive HSTS header
@@ -4241,6 +4310,7 @@ zadieheimlich.com: did not receive HSTS header
 zamorano.edu: could not connect to host
 zap.yt: could not connect to host
 zarooba.com: did not receive HSTS header
+zberger.com: could not connect to host
 zbigniewgalucki.eu: did not receive HSTS header
 zbp.at: did not receive HSTS header
 zebrababy.cn: did not receive HSTS header
@@ -4259,10 +4329,7 @@ zeytin.pro: could not connect to host
 zh.search.yahoo.com: did not receive HSTS header
 zhaojin97.cn: did not receive HSTS header
 zhendingresources.com: max-age too low: 0
-zicklam.com: could not connect to host
-zimiao.moe: could not connect to host
 zirtue.io: could not connect to host
-ziyuanabc.xyz: could not connect to host
 zking.ga: could not connect to host
 zocken.com: could not connect to host
 zomerschoen.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121"  data: no]
diff --git a/security/manager/ssl/nsSTSPreloadList.inc b/security/manager/ssl/nsSTSPreloadList.inc
index 1074f459a49e..b324a94b3255 100644
--- a/security/manager/ssl/nsSTSPreloadList.inc
+++ b/security/manager/ssl/nsSTSPreloadList.inc
@@ -8,7 +8,7 @@
 /*****************************************************************************/
 
 #include 
-const PRTime gPreloadListExpirationTime = INT64_C(1493909973423000);
+const PRTime gPreloadListExpirationTime = INT64_C(1494255401043000);
 
 static const char kSTSHostTable[] = {
   /* "0.me.uk", true */ '0', '.', 'm', 'e', '.', 'u', 'k', '\0',
@@ -71,7 +71,7 @@ static const char kSTSHostTable[] = {
   /* "17hats.com", true */ '1', '7', 'h', 'a', 't', 's', '.', 'c', 'o', 'm', '\0',
   /* "188betwarriors.co.uk", true */ '1', '8', '8', 'b', 'e', 't', 'w', 'a', 'r', 'r', 'i', 'o', 'r', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "188trafalgar.ca", true */ '1', '8', '8', 't', 'r', 'a', 'f', 'a', 'l', 'g', 'a', 'r', '.', 'c', 'a', '\0',
-  /* "18f.gov", false */ '1', '8', 'f', '.', 'g', 'o', 'v', '\0',
+  /* "18f.gov", true */ '1', '8', 'f', '.', 'g', 'o', 'v', '\0',
   /* "1972969867.rsc.cdn77.org", true */ '1', '9', '7', '2', '9', '6', '9', '8', '6', '7', '.', 'r', 's', 'c', '.', 'c', 'd', 'n', '7', '7', '.', 'o', 'r', 'g', '\0',
   /* "1a-diamantscheiben.de", true */ '1', 'a', '-', 'd', 'i', 'a', 'm', 'a', 'n', 't', 's', 'c', 'h', 'e', 'i', 'b', 'e', 'n', '.', 'd', 'e', '\0',
   /* "1a-vermessung.at", true */ '1', 'a', '-', 'v', 'e', 'r', 'm', 'e', 's', 's', 'u', 'n', 'g', '.', 'a', 't', '\0',
@@ -135,7 +135,6 @@ static const char kSTSHostTable[] = {
   /* "32h.de", true */ '3', '2', 'h', '.', 'd', 'e', '\0',
   /* "32ph.com", true */ '3', '2', 'p', 'h', '.', 'c', 'o', 'm', '\0',
   /* "33-km.ru", true */ '3', '3', '-', 'k', 'm', '.', 'r', 'u', '\0',
-  /* "33drugstore.com", false */ '3', '3', 'd', 'r', 'u', 'g', 's', 't', 'o', 'r', 'e', '.', 'c', 'o', 'm', '\0',
   /* "3473-wiki.de", true */ '3', '4', '7', '3', '-', 'w', 'i', 'k', 'i', '.', 'd', 'e', '\0',
   /* "35792.de", true */ '3', '5', '7', '9', '2', '.', 'd', 'e', '\0',
   /* "365beautyworld.com", true */ '3', '6', '5', 'b', 'e', 'a', 'u', 't', 'y', 'w', 'o', 'r', 'l', 'd', '.', 'c', 'o', 'm', '\0',
@@ -273,7 +272,6 @@ static const char kSTSHostTable[] = {
   /* "acelpb.com", true */ 'a', 'c', 'e', 'l', 'p', 'b', '.', 'c', 'o', 'm', '\0',
   /* "acessoeducacao.com", true */ 'a', 'c', 'e', 's', 's', 'o', 'e', 'd', 'u', 'c', 'a', 'c', 'a', 'o', '.', 'c', 'o', 'm', '\0',
   /* "acg.sb", false */ 'a', 'c', 'g', '.', 's', 'b', '\0',
-  /* "acgmoon.org", true */ 'a', 'c', 'g', 'm', 'o', 'o', 'n', '.', 'o', 'r', 'g', '\0',
   /* "acheconcursos.com.br", true */ 'a', 'c', 'h', 'e', 'c', 'o', 'n', 'c', 'u', 'r', 's', 'o', 's', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "achenar.net", true */ 'a', 'c', 'h', 'e', 'n', 'a', 'r', '.', 'n', 'e', 't', '\0',
   /* "acheritage.co.uk", true */ 'a', 'c', 'h', 'e', 'r', 'i', 't', 'a', 'g', 'e', '.', 'c', 'o', '.', 'u', 'k', '\0',
@@ -495,7 +493,6 @@ static const char kSTSHostTable[] = {
   /* "alexanderschimpf.de", true */ 'a', 'l', 'e', 'x', 'a', 'n', 'd', 'e', 'r', 's', 'c', 'h', 'i', 'm', 'p', 'f', '.', 'd', 'e', '\0',
   /* "alexandra-schulze.de", true */ 'a', 'l', 'e', 'x', 'a', 'n', 'd', 'r', 'a', '-', 's', 'c', 'h', 'u', 'l', 'z', 'e', '.', 'd', 'e', '\0',
   /* "alexbaker.org", true */ 'a', 'l', 'e', 'x', 'b', 'a', 'k', 'e', 'r', '.', 'o', 'r', 'g', '\0',
-  /* "alexei.su", true */ 'a', 'l', 'e', 'x', 'e', 'i', '.', 's', 'u', '\0',
   /* "alexgaynor.net", true */ 'a', 'l', 'e', 'x', 'g', 'a', 'y', 'n', 'o', 'r', '.', 'n', 'e', 't', '\0',
   /* "alexhd.de", true */ 'a', 'l', 'e', 'x', 'h', 'd', '.', 'd', 'e', '\0',
   /* "alexismeza.com", true */ 'a', 'l', 'e', 'x', 'i', 's', 'm', 'e', 'z', 'a', '.', 'c', 'o', 'm', '\0',
@@ -531,7 +528,6 @@ static const char kSTSHostTable[] = {
   /* "allabout.me", true */ 'a', 'l', 'l', 'a', 'b', 'o', 'u', 't', '.', 'm', 'e', '\0',
   /* "allbenjoy.de", true */ 'a', 'l', 'l', 'b', 'e', 'n', 'j', 'o', 'y', '.', 'd', 'e', '\0',
   /* "allcarepharmacy.com", true */ 'a', 'l', 'l', 'c', 'a', 'r', 'e', 'p', 'h', 'a', 'r', 'm', 'a', 'c', 'y', '.', 'c', 'o', 'm', '\0',
-  /* "alldewall.de", true */ 'a', 'l', 'l', 'd', 'e', 'w', 'a', 'l', 'l', '.', 'd', 'e', '\0',
   /* "allfreelancers.su", true */ 'a', 'l', 'l', 'f', 'r', 'e', 'e', 'l', 'a', 'n', 'c', 'e', 'r', 's', '.', 's', 'u', '\0',
   /* "alliances-faq.de", true */ 'a', 'l', 'l', 'i', 'a', 'n', 'c', 'e', 's', '-', 'f', 'a', 'q', '.', 'd', 'e', '\0',
   /* "alliedfrozenstorage.com", true */ 'a', 'l', 'l', 'i', 'e', 'd', 'f', 'r', 'o', 'z', 'e', 'n', 's', 't', 'o', 'r', 'a', 'g', 'e', '.', 'c', 'o', 'm', '\0',
@@ -661,8 +657,6 @@ static const char kSTSHostTable[] = {
   /* "androide.com", true */ 'a', 'n', 'd', 'r', 'o', 'i', 'd', 'e', '.', 'c', 'o', 'm', '\0',
   /* "andromedacenter.com", true */ 'a', 'n', 'd', 'r', 'o', 'm', 'e', 'd', 'a', 'c', 'e', 'n', 't', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "andsat.org", true */ 'a', 'n', 'd', 's', 'a', 't', '.', 'o', 'r', 'g', '\0',
-  /* "anduril.de", true */ 'a', 'n', 'd', 'u', 'r', 'i', 'l', '.', 'd', 'e', '\0',
-  /* "anduril.eu", true */ 'a', 'n', 'd', 'u', 'r', 'i', 'l', '.', 'e', 'u', '\0',
   /* "andyuk.org", true */ 'a', 'n', 'd', 'y', 'u', 'k', '.', 'o', 'r', 'g', '\0',
   /* "anedot.com", true */ 'a', 'n', 'e', 'd', 'o', 't', '.', 'c', 'o', 'm', '\0',
   /* "anedot.xyz", true */ 'a', 'n', 'e', 'd', 'o', 't', '.', 'x', 'y', 'z', '\0',
@@ -809,7 +803,6 @@ static const char kSTSHostTable[] = {
   /* "arguggi.co.uk", true */ 'a', 'r', 'g', 'u', 'g', 'g', 'i', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "ariege-pyrenees.net", true */ 'a', 'r', 'i', 'e', 'g', 'e', '-', 'p', 'y', 'r', 'e', 'n', 'e', 'e', 's', '.', 'n', 'e', 't', '\0',
   /* "arima.co.ke", true */ 'a', 'r', 'i', 'm', 'a', '.', 'c', 'o', '.', 'k', 'e', '\0',
-  /* "aristocrates.co", true */ 'a', 'r', 'i', 's', 't', 'o', 'c', 'r', 'a', 't', 'e', 's', '.', 'c', 'o', '\0',
   /* "aritec-la.com", true */ 'a', 'r', 'i', 't', 'e', 'c', '-', 'l', 'a', '.', 'c', 'o', 'm', '\0',
   /* "arivo.com.br", false */ 'a', 'r', 'i', 'v', 'o', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "arjandejong.eu", true */ 'a', 'r', 'j', 'a', 'n', 'd', 'e', 'j', 'o', 'n', 'g', '.', 'e', 'u', '\0',
@@ -873,7 +866,6 @@ static const char kSTSHostTable[] = {
   /* "as200753.net", true */ 'a', 's', '2', '0', '0', '7', '5', '3', '.', 'n', 'e', 't', '\0',
   /* "asadatec.de", true */ 'a', 's', 'a', 'd', 'a', 't', 'e', 'c', '.', 'd', 'e', '\0',
   /* "asahikoji.net", true */ 'a', 's', 'a', 'h', 'i', 'k', 'o', 'j', 'i', '.', 'n', 'e', 't', '\0',
-  /* "asandu.eu", true */ 'a', 's', 'a', 'n', 'd', 'u', '.', 'e', 'u', '\0',
   /* "asato-jewelry.com", true */ 'a', 's', 'a', 't', 'o', '-', 'j', 'e', 'w', 'e', 'l', 'r', 'y', '.', 'c', 'o', 'm', '\0',
   /* "asbito.de", true */ 'a', 's', 'b', 'i', 't', 'o', '.', 'd', 'e', '\0',
   /* "ascamso.com", true */ 'a', 's', 'c', 'a', 'm', 's', 'o', '.', 'c', 'o', 'm', '\0',
@@ -881,6 +873,7 @@ static const char kSTSHostTable[] = {
   /* "asciitable.tips", true */ 'a', 's', 'c', 'i', 'i', 't', 'a', 'b', 'l', 'e', '.', 't', 'i', 'p', 's', '\0',
   /* "aserver.co", true */ 'a', 's', 'e', 'r', 'v', 'e', 'r', '.', 'c', 'o', '\0',
   /* "ashleymedway.com", true */ 'a', 's', 'h', 'l', 'e', 'y', 'm', 'e', 'd', 'w', 'a', 'y', '.', 'c', 'o', 'm', '\0',
+  /* "asianodor.com", true */ 'a', 's', 'i', 'a', 'n', 'o', 'd', 'o', 'r', '.', 'c', 'o', 'm', '\0',
   /* "ask.fedoraproject.org", true */ 'a', 's', 'k', '.', 'f', 'e', 'd', 'o', 'r', 'a', 'p', 'r', 'o', 'j', 'e', 'c', 't', '.', 'o', 'r', 'g', '\0',
   /* "ask.stg.fedoraproject.org", true */ 'a', 's', 'k', '.', 's', 't', 'g', '.', 'f', 'e', 'd', 'o', 'r', 'a', 'p', 'r', 'o', 'j', 'e', 'c', 't', '.', 'o', 'r', 'g', '\0',
   /* "askizzy.org.au", true */ 'a', 's', 'k', 'i', 'z', 'z', 'y', '.', 'o', 'r', 'g', '.', 'a', 'u', '\0',
@@ -899,7 +892,6 @@ static const char kSTSHostTable[] = {
   /* "assindia.nl", true */ 'a', 's', 's', 'i', 'n', 'd', 'i', 'a', '.', 'n', 'l', '\0',
   /* "asta-bar.de", true */ 'a', 's', 't', 'a', '-', 'b', 'a', 'r', '.', 'd', 'e', '\0',
   /* "astengox.com", true */ 'a', 's', 't', 'e', 'n', 'g', 'o', 'x', '.', 'c', 'o', 'm', '\0',
-  /* "asuhe.cc", true */ 'a', 's', 'u', 'h', 'e', '.', 'c', 'c', '\0',
   /* "asun.co", true */ 'a', 's', 'u', 'n', '.', 'c', 'o', '\0',
   /* "asurepay.cc", true */ 'a', 's', 'u', 'r', 'e', 'p', 'a', 'y', '.', 'c', 'c', '\0',
   /* "at.search.yahoo.com", false */ 'a', 't', '.', 's', 'e', 'a', 'r', 'c', 'h', '.', 'y', 'a', 'h', 'o', 'o', '.', 'c', 'o', 'm', '\0',
@@ -962,7 +954,6 @@ static const char kSTSHostTable[] = {
   /* "auraredeye.com", true */ 'a', 'u', 'r', 'a', 'r', 'e', 'd', 'e', 'y', 'e', '.', 'c', 'o', 'm', '\0',
   /* "auraredshield.com", true */ 'a', 'u', 'r', 'a', 'r', 'e', 'd', 's', 'h', 'i', 'e', 'l', 'd', '.', 'c', 'o', 'm', '\0',
   /* "aureus.pw", true */ 'a', 'u', 'r', 'e', 'u', 's', '.', 'p', 'w', '\0',
-  /* "auroratownshipfd.org", true */ 'a', 'u', 'r', 'o', 'r', 'a', 't', 'o', 'w', 'n', 's', 'h', 'i', 'p', 'f', 'd', '.', 'o', 'r', 'g', '\0',
   /* "ausschreibungen-suedtirol.it", true */ 'a', 'u', 's', 's', 'c', 'h', 'r', 'e', 'i', 'b', 'u', 'n', 'g', 'e', 'n', '-', 's', 'u', 'e', 'd', 't', 'i', 'r', 'o', 'l', '.', 'i', 't', '\0',
   /* "aussiecable.org", true */ 'a', 'u', 's', 's', 'i', 'e', 'c', 'a', 'b', 'l', 'e', '.', 'o', 'r', 'g', '\0',
   /* "aussiehq.com.au", true */ 'a', 'u', 's', 's', 'i', 'e', 'h', 'q', '.', 'c', 'o', 'm', '.', 'a', 'u', '\0',
@@ -970,6 +961,7 @@ static const char kSTSHostTable[] = {
   /* "auth.adult", true */ 'a', 'u', 't', 'h', '.', 'a', 'd', 'u', 'l', 't', '\0',
   /* "authint.com", true */ 'a', 'u', 't', 'h', 'i', 'n', 't', '.', 'c', 'o', 'm', '\0',
   /* "author24.ru", true */ 'a', 'u', 't', 'h', 'o', 'r', '2', '4', '.', 'r', 'u', '\0',
+  /* "autimatisering.nl", true */ 'a', 'u', 't', 'i', 'm', 'a', 't', 'i', 's', 'e', 'r', 'i', 'n', 'g', '.', 'n', 'l', '\0',
   /* "auto-anleitung.de", true */ 'a', 'u', 't', 'o', '-', 'a', 'n', 'l', 'e', 'i', 't', 'u', 'n', 'g', '.', 'd', 'e', '\0',
   /* "autoauctionsohio.com", true */ 'a', 'u', 't', 'o', 'a', 'u', 'c', 't', 'i', 'o', 'n', 's', 'o', 'h', 'i', 'o', '.', 'c', 'o', 'm', '\0',
   /* "autoauctionsvirginia.com", true */ 'a', 'u', 't', 'o', 'a', 'u', 'c', 't', 'i', 'o', 'n', 's', 'v', 'i', 'r', 'g', 'i', 'n', 'i', 'a', '.', 'c', 'o', 'm', '\0',
@@ -979,7 +971,6 @@ static const char kSTSHostTable[] = {
   /* "autoskola.hr", true */ 'a', 'u', 't', 'o', 's', 'k', 'o', 'l', 'a', '.', 'h', 'r', '\0',
   /* "autoskole.hr", true */ 'a', 'u', 't', 'o', 's', 'k', 'o', 'l', 'e', '.', 'h', 'r', '\0',
   /* "auxetek.se", true */ 'a', 'u', 'x', 'e', 't', 'e', 'k', '.', 's', 'e', '\0',
-  /* "auxiliumincrementum.co.uk", true */ 'a', 'u', 'x', 'i', 'l', 'i', 'u', 'm', 'i', 'n', 'c', 'r', 'e', 'm', 'e', 'n', 't', 'u', 'm', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "ava-creative.de", true */ 'a', 'v', 'a', '-', 'c', 'r', 'e', 'a', 't', 'i', 'v', 'e', '.', 'd', 'e', '\0',
   /* "avaaz.org", true */ 'a', 'v', 'a', 'a', 'z', '.', 'o', 'r', 'g', '\0',
   /* "avacariu.me", true */ 'a', 'v', 'a', 'c', 'a', 'r', 'i', 'u', '.', 'm', 'e', '\0',
@@ -1077,7 +1068,6 @@ static const char kSTSHostTable[] = {
   /* "bajic.ch", true */ 'b', 'a', 'j', 'i', 'c', '.', 'c', 'h', '\0',
   /* "bakabt.info", true */ 'b', 'a', 'k', 'a', 'b', 't', '.', 'i', 'n', 'f', 'o', '\0',
   /* "bakaweb.fr", true */ 'b', 'a', 'k', 'a', 'w', 'e', 'b', '.', 'f', 'r', '\0',
-  /* "bakingstone.com", true */ 'b', 'a', 'k', 'i', 'n', 'g', 's', 't', 'o', 'n', 'e', '.', 'c', 'o', 'm', '\0',
   /* "balboa.io", true */ 'b', 'a', 'l', 'b', 'o', 'a', '.', 'i', 'o', '\0',
   /* "baleares.party", true */ 'b', 'a', 'l', 'e', 'a', 'r', 'e', 's', '.', 'p', 'a', 'r', 't', 'y', '\0',
   /* "balicekzdravi.cz", true */ 'b', 'a', 'l', 'i', 'c', 'e', 'k', 'z', 'd', 'r', 'a', 'v', 'i', '.', 'c', 'z', '\0',
@@ -1135,7 +1125,6 @@ static const char kSTSHostTable[] = {
   /* "bartula.de", true */ 'b', 'a', 'r', 't', 'u', 'l', 'a', '.', 'd', 'e', '\0',
   /* "baruch.me", true */ 'b', 'a', 'r', 'u', 'c', 'h', '.', 'm', 'e', '\0',
   /* "barunisystems.com", true */ 'b', 'a', 'r', 'u', 'n', 'i', 's', 'y', 's', 't', 'e', 'm', 's', '.', 'c', 'o', 'm', '\0',
-  /* "bashc.at", true */ 'b', 'a', 's', 'h', 'c', '.', 'a', 't', '\0',
   /* "baskettemple.com", true */ 'b', 'a', 's', 'k', 'e', 't', 't', 'e', 'm', 'p', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "basnoslovno.com.ua", true */ 'b', 'a', 's', 'n', 'o', 's', 'l', 'o', 'v', 'n', 'o', '.', 'c', 'o', 'm', '.', 'u', 'a', '\0',
   /* "basnoslovno.ru", true */ 'b', 'a', 's', 'n', 'o', 's', 'l', 'o', 'v', 'n', 'o', '.', 'r', 'u', '\0',
@@ -1144,20 +1133,17 @@ static const char kSTSHostTable[] = {
   /* "batfoundry.com", true */ 'b', 'a', 't', 'f', 'o', 'u', 'n', 'd', 'r', 'y', '.', 'c', 'o', 'm', '\0',
   /* "batschu.de", true */ 'b', 'a', 't', 's', 'c', 'h', 'u', '.', 'd', 'e', '\0',
   /* "batten.eu.org", true */ 'b', 'a', 't', 't', 'e', 'n', '.', 'e', 'u', '.', 'o', 'r', 'g', '\0',
-  /* "baud.ninja", true */ 'b', 'a', 'u', 'd', '.', 'n', 'i', 'n', 'j', 'a', '\0',
   /* "baum.ga", true */ 'b', 'a', 'u', 'm', '.', 'g', 'a', '\0',
   /* "bausep.de", true */ 'b', 'a', 'u', 's', 'e', 'p', '.', 'd', 'e', '\0',
   /* "bautied.de", true */ 'b', 'a', 'u', 't', 'i', 'e', 'd', '.', 'd', 'e', '\0',
   /* "bayden.com", true */ 'b', 'a', 'y', 'd', 'e', 'n', '.', 'c', 'o', 'm', '\0',
   /* "bayrisch-fuer-anfaenger.de", true */ 'b', 'a', 'y', 'r', 'i', 's', 'c', 'h', '-', 'f', 'u', 'e', 'r', '-', 'a', 'n', 'f', 'a', 'e', 'n', 'g', 'e', 'r', '.', 'd', 'e', '\0',
-  /* "baysse.eu", true */ 'b', 'a', 'y', 's', 's', 'e', '.', 'e', 'u', '\0',
   /* "baywatch.io", true */ 'b', 'a', 'y', 'w', 'a', 't', 'c', 'h', '.', 'i', 'o', '\0',
   /* "bazdell.com", true */ 'b', 'a', 'z', 'd', 'e', 'l', 'l', '.', 'c', 'o', 'm', '\0',
   /* "bazos.at", true */ 'b', 'a', 'z', 'o', 's', '.', 'a', 't', '\0',
   /* "bazos.cz", true */ 'b', 'a', 'z', 'o', 's', '.', 'c', 'z', '\0',
   /* "bazos.sk", true */ 'b', 'a', 'z', 'o', 's', '.', 's', 'k', '\0',
   /* "bb-shiokaze.jp", true */ 'b', 'b', '-', 's', 'h', 'i', 'o', 'k', 'a', 'z', 'e', '.', 'j', 'p', '\0',
-  /* "bbb1991.me", true */ 'b', 'b', 'b', '1', '9', '9', '1', '.', 'm', 'e', '\0',
   /* "bbdos.ru", true */ 'b', 'b', 'd', 'o', 's', '.', 'r', 'u', '\0',
   /* "bblovess.cn", true */ 'b', 'b', 'l', 'o', 'v', 'e', 's', 's', '.', 'c', 'n', '\0',
   /* "bbnx.net", true */ 'b', 'b', 'n', 'x', '.', 'n', 'e', 't', '\0',
@@ -1237,7 +1223,6 @@ static const char kSTSHostTable[] = {
   /* "benhavenarchives.org", true */ 'b', 'e', 'n', 'h', 'a', 'v', 'e', 'n', 'a', 'r', 'c', 'h', 'i', 'v', 'e', 's', '.', 'o', 'r', 'g', '\0',
   /* "benjamin.pe", true */ 'b', 'e', 'n', 'j', 'a', 'm', 'i', 'n', '.', 'p', 'e', '\0',
   /* "benjaminblack.net", true */ 'b', 'e', 'n', 'j', 'a', 'm', 'i', 'n', 'b', 'l', 'a', 'c', 'k', '.', 'n', 'e', 't', '\0',
-  /* "benjaminjurke.net", true */ 'b', 'e', 'n', 'j', 'a', 'm', 'i', 'n', 'j', 'u', 'r', 'k', 'e', '.', 'n', 'e', 't', '\0',
   /* "benjamins.com", true */ 'b', 'e', 'n', 'j', 'a', 'm', 'i', 'n', 's', '.', 'c', 'o', 'm', '\0',
   /* "benmatthews.com.au", true */ 'b', 'e', 'n', 'm', 'a', 't', 't', 'h', 'e', 'w', 's', '.', 'c', 'o', 'm', '.', 'a', 'u', '\0',
   /* "benmillett.us", false */ 'b', 'e', 'n', 'm', 'i', 'l', 'l', 'e', 't', 't', '.', 'u', 's', '\0',
@@ -1427,6 +1412,7 @@ static const char kSTSHostTable[] = {
   /* "bitminter.com", true */ 'b', 'i', 't', 'm', 'i', 'n', 't', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "bitmoe.com", true */ 'b', 'i', 't', 'm', 'o', 'e', '.', 'c', 'o', 'm', '\0',
   /* "bitmon.net", true */ 'b', 'i', 't', 'm', 'o', 'n', '.', 'n', 'e', 't', '\0',
+  /* "bitok.com", true */ 'b', 'i', 't', 'o', 'k', '.', 'c', 'o', 'm', '\0',
   /* "bitpod.de", true */ 'b', 'i', 't', 'p', 'o', 'd', '.', 'd', 'e', '\0',
   /* "bitrage.de", true */ 'b', 'i', 't', 'r', 'a', 'g', 'e', '.', 'd', 'e', '\0',
   /* "bitraum.io", true */ 'b', 'i', 't', 'r', 'a', 'u', 'm', '.', 'i', 'o', '\0',
@@ -1518,7 +1504,6 @@ static const char kSTSHostTable[] = {
   /* "blockchain.info", true */ 'b', 'l', 'o', 'c', 'k', 'c', 'h', 'a', 'i', 'n', '.', 'i', 'n', 'f', 'o', '\0',
   /* "blockmetry.com", true */ 'b', 'l', 'o', 'c', 'k', 'm', 'e', 't', 'r', 'y', '.', 'c', 'o', 'm', '\0',
   /* "bloemendal.me", true */ 'b', 'l', 'o', 'e', 'm', 'e', 'n', 'd', 'a', 'l', '.', 'm', 'e', '\0',
-  /* "blog-ritaline.com", true */ 'b', 'l', 'o', 'g', '-', 'r', 'i', 't', 'a', 'l', 'i', 'n', 'e', '.', 'c', 'o', 'm', '\0',
   /* "blog.gov.uk", true */ 'b', 'l', 'o', 'g', '.', 'g', 'o', 'v', '.', 'u', 'k', '\0',
   /* "blog.gparent.org", true */ 'b', 'l', 'o', 'g', '.', 'g', 'p', 'a', 'r', 'e', 'n', 't', '.', 'o', 'r', 'g', '\0',
   /* "blog.linode.com", false */ 'b', 'l', 'o', 'g', '.', 'l', 'i', 'n', 'o', 'd', 'e', '.', 'c', 'o', 'm', '\0',
@@ -1566,8 +1551,8 @@ static const char kSTSHostTable[] = {
   /* "bobobox.net", true */ 'b', 'o', 'b', 'o', 'b', 'o', 'x', '.', 'n', 'e', 't', '\0',
   /* "boboolo.com", true */ 'b', 'o', 'b', 'o', 'o', 'l', 'o', '.', 'c', 'o', 'm', '\0',
   /* "bochs.info", true */ 'b', 'o', 'c', 'h', 's', '.', 'i', 'n', 'f', 'o', '\0',
+  /* "bockenauer.at", true */ 'b', 'o', 'c', 'k', 'e', 'n', 'a', 'u', 'e', 'r', '.', 'a', 't', '\0',
   /* "bodhi.fedoraproject.org", true */ 'b', 'o', 'd', 'h', 'i', '.', 'f', 'e', 'd', 'o', 'r', 'a', 'p', 'r', 'o', 'j', 'e', 'c', 't', '.', 'o', 'r', 'g', '\0',
-  /* "bodo-wolff.de", false */ 'b', 'o', 'd', 'o', '-', 'w', 'o', 'l', 'f', 'f', '.', 'd', 'e', '\0',
   /* "bodrumfarm.com", true */ 'b', 'o', 'd', 'r', 'u', 'm', 'f', 'a', 'r', 'm', '.', 'c', 'o', 'm', '\0',
   /* "boeddhashop.nl", true */ 'b', 'o', 'e', 'd', 'd', 'h', 'a', 's', 'h', 'o', 'p', '.', 'n', 'l', '\0',
   /* "boernecancerfonden.dk", true */ 'b', 'o', 'e', 'r', 'n', 'e', 'c', 'a', 'n', 'c', 'e', 'r', 'f', 'o', 'n', 'd', 'e', 'n', '.', 'd', 'k', '\0',
@@ -1764,7 +1749,6 @@ static const char kSTSHostTable[] = {
   /* "bulktrade.de", true */ 'b', 'u', 'l', 'k', 't', 'r', 'a', 'd', 'e', '.', 'd', 'e', '\0',
   /* "bullbits.com", true */ 'b', 'u', 'l', 'l', 'b', 'i', 't', 's', '.', 'c', 'o', 'm', '\0',
   /* "bulldog-hosting.de", true */ 'b', 'u', 'l', 'l', 'd', 'o', 'g', '-', 'h', 'o', 's', 't', 'i', 'n', 'g', '.', 'd', 'e', '\0',
-  /* "bulmafox.com", true */ 'b', 'u', 'l', 'm', 'a', 'f', 'o', 'x', '.', 'c', 'o', 'm', '\0',
   /* "bunbun.be", false */ 'b', 'u', 'n', 'b', 'u', 'n', '.', 'b', 'e', '\0',
   /* "bund-von-theramore.de", true */ 'b', 'u', 'n', 'd', '-', 'v', 'o', 'n', '-', 't', 'h', 'e', 'r', 'a', 'm', 'o', 'r', 'e', '.', 'd', 'e', '\0',
   /* "bundaberg.com", true */ 'b', 'u', 'n', 'd', 'a', 'b', 'e', 'r', 'g', '.', 'c', 'o', 'm', '\0',
@@ -1811,7 +1795,6 @@ static const char kSTSHostTable[] = {
   /* "bygningsregistrering.dk", true */ 'b', 'y', 'g', 'n', 'i', 'n', 'g', 's', 'r', 'e', 'g', 'i', 's', 't', 'r', 'e', 'r', 'i', 'n', 'g', '.', 'd', 'k', '\0',
   /* "bymark.co", true */ 'b', 'y', 'm', 'a', 'r', 'k', '.', 'c', 'o', '\0',
   /* "bymike.co", true */ 'b', 'y', 'm', 'i', 'k', 'e', '.', 'c', 'o', '\0',
-  /* "bynet.cz", true */ 'b', 'y', 'n', 'e', 't', '.', 'c', 'z', '\0',
   /* "bypassed.bid", true */ 'b', 'y', 'p', 'a', 's', 's', 'e', 'd', '.', 'b', 'i', 'd', '\0',
   /* "bypassed.cc", true */ 'b', 'y', 'p', 'a', 's', 's', 'e', 'd', '.', 'c', 'c', '\0',
   /* "bypassed.club", true */ 'b', 'y', 'p', 'a', 's', 's', 'e', 'd', '.', 'c', 'l', 'u', 'b', '\0',
@@ -1839,6 +1822,7 @@ static const char kSTSHostTable[] = {
   /* "byteshark.org", true */ 'b', 'y', 't', 'e', 's', 'h', 'a', 'r', 'k', '.', 'o', 'r', 'g', '\0',
   /* "bytesofcode.de", true */ 'b', 'y', 't', 'e', 's', 'o', 'f', 'c', 'o', 'd', 'e', '.', 'd', 'e', '\0',
   /* "bytesund.biz", true */ 'b', 'y', 't', 'e', 's', 'u', 'n', 'd', '.', 'b', 'i', 'z', '\0',
+  /* "bytesunlimited.com", true */ 'b', 'y', 't', 'e', 's', 'u', 'n', 'l', 'i', 'm', 'i', 't', 'e', 'd', '.', 'c', 'o', 'm', '\0',
   /* "bytesystems.com", true */ 'b', 'y', 't', 'e', 's', 'y', 's', 't', 'e', 'm', 's', '.', 'c', 'o', 'm', '\0',
   /* "byteturtle.eu", true */ 'b', 'y', 't', 'e', 't', 'u', 'r', 't', 'l', 'e', '.', 'e', 'u', '\0',
   /* "bythisverse.com", true */ 'b', 'y', 't', 'h', 'i', 's', 'v', 'e', 'r', 's', 'e', '.', 'c', 'o', 'm', '\0',
@@ -1867,6 +1851,7 @@ static const char kSTSHostTable[] = {
   /* "cadoth.net", true */ 'c', 'a', 'd', 'o', 't', 'h', '.', 'n', 'e', 't', '\0',
   /* "cadusilva.com", true */ 'c', 'a', 'd', 'u', 's', 'i', 'l', 'v', 'a', '.', 'c', 'o', 'm', '\0',
   /* "caesarkabalan.com", true */ 'c', 'a', 'e', 's', 'a', 'r', 'k', 'a', 'b', 'a', 'l', 'a', 'n', '.', 'c', 'o', 'm', '\0',
+  /* "caesreon.com", true */ 'c', 'a', 'e', 's', 'r', 'e', 'o', 'n', '.', 'c', 'o', 'm', '\0',
   /* "cafe-murr.de", true */ 'c', 'a', 'f', 'e', '-', 'm', 'u', 'r', 'r', '.', 'd', 'e', '\0',
   /* "cafe-service.ru", true */ 'c', 'a', 'f', 'e', '-', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'r', 'u', '\0',
   /* "caffeinatedcode.com", true */ 'c', 'a', 'f', 'f', 'e', 'i', 'n', 'a', 't', 'e', 'd', 'c', 'o', 'd', 'e', '.', 'c', 'o', 'm', '\0',
@@ -1969,7 +1954,6 @@ static const char kSTSHostTable[] = {
   /* "carif-idf.net", true */ 'c', 'a', 'r', 'i', 'f', '-', 'i', 'd', 'f', '.', 'n', 'e', 't', '\0',
   /* "carif-idf.org", true */ 'c', 'a', 'r', 'i', 'f', '-', 'i', 'd', 'f', '.', 'o', 'r', 'g', '\0',
   /* "carigami.fr", true */ 'c', 'a', 'r', 'i', 'g', 'a', 'm', 'i', '.', 'f', 'r', '\0',
-  /* "caringladies.org", true */ 'c', 'a', 'r', 'i', 'n', 'g', 'l', 'a', 'd', 'i', 'e', 's', '.', 'o', 'r', 'g', '\0',
   /* "cariocacooking.com", true */ 'c', 'a', 'r', 'i', 'o', 'c', 'a', 'c', 'o', 'o', 'k', 'i', 'n', 'g', '.', 'c', 'o', 'm', '\0',
   /* "carlgo11.com", true */ 'c', 'a', 'r', 'l', 'g', 'o', '1', '1', '.', 'c', 'o', 'm', '\0',
   /* "carlosjeurissen.com", true */ 'c', 'a', 'r', 'l', 'o', 's', 'j', 'e', 'u', 'r', 'i', 's', 's', 'e', 'n', '.', 'c', 'o', 'm', '\0',
@@ -2031,7 +2015,6 @@ static const char kSTSHostTable[] = {
   /* "cementscience.com", true */ 'c', 'e', 'm', 'e', 'n', 't', 's', 'c', 'i', 'e', 'n', 'c', 'e', '.', 'c', 'o', 'm', '\0',
   /* "centennialrewards.com", true */ 'c', 'e', 'n', 't', 'e', 'n', 'n', 'i', 'a', 'l', 'r', 'e', 'w', 'a', 'r', 'd', 's', '.', 'c', 'o', 'm', '\0',
   /* "centerpereezd.ru", false */ 'c', 'e', 'n', 't', 'e', 'r', 'p', 'e', 'r', 'e', 'e', 'z', 'd', '.', 'r', 'u', '\0',
-  /* "centillien.com", true */ 'c', 'e', 'n', 't', 'i', 'l', 'l', 'i', 'e', 'n', '.', 'c', 'o', 'm', '\0',
   /* "centralpoint.be", true */ 'c', 'e', 'n', 't', 'r', 'a', 'l', 'p', 'o', 'i', 'n', 't', '.', 'b', 'e', '\0',
   /* "centralpoint.nl", true */ 'c', 'e', 'n', 't', 'r', 'a', 'l', 'p', 'o', 'i', 'n', 't', '.', 'n', 'l', '\0',
   /* "centralstatecu.org", true */ 'c', 'e', 'n', 't', 'r', 'a', 'l', 's', 't', 'a', 't', 'e', 'c', 'u', '.', 'o', 'r', 'g', '\0',
@@ -2116,7 +2099,6 @@ static const char kSTSHostTable[] = {
   /* "chch.it", true */ 'c', 'h', 'c', 'h', '.', 'i', 't', '\0',
   /* "cheapdns.org", true */ 'c', 'h', 'e', 'a', 'p', 'd', 'n', 's', '.', 'o', 'r', 'g', '\0',
   /* "cheapestgamecards.de", true */ 'c', 'h', 'e', 'a', 'p', 'e', 's', 't', 'g', 'a', 'm', 'e', 'c', 'a', 'r', 'd', 's', '.', 'd', 'e', '\0',
-  /* "cheapestgamecards.nl", true */ 'c', 'h', 'e', 'a', 'p', 'e', 's', 't', 'g', 'a', 'm', 'e', 'c', 'a', 'r', 'd', 's', '.', 'n', 'l', '\0',
   /* "cheapestgamecards.se", true */ 'c', 'h', 'e', 'a', 'p', 'e', 's', 't', 'g', 'a', 'm', 'e', 'c', 'a', 'r', 'd', 's', '.', 's', 'e', '\0',
   /* "cheapgeekts.com", false */ 'c', 'h', 'e', 'a', 'p', 'g', 'e', 'e', 'k', 't', 's', '.', 'c', 'o', 'm', '\0',
   /* "cheapgoa.com", true */ 'c', 'h', 'e', 'a', 'p', 'g', 'o', 'a', '.', 'c', 'o', 'm', '\0',
@@ -2375,7 +2357,6 @@ static const char kSTSHostTable[] = {
   /* "codeplay.org", true */ 'c', 'o', 'd', 'e', 'p', 'l', 'a', 'y', '.', 'o', 'r', 'g', '\0',
   /* "codepoints.net", true */ 'c', 'o', 'd', 'e', 'p', 'o', 'i', 'n', 't', 's', '.', 'n', 'e', 't', '\0',
   /* "codepref.com", true */ 'c', 'o', 'd', 'e', 'p', 'r', 'e', 'f', '.', 'c', 'o', 'm', '\0',
-  /* "codepult.com", true */ 'c', 'o', 'd', 'e', 'p', 'u', 'l', 't', '.', 'c', 'o', 'm', '\0',
   /* "codera.co.uk", true */ 'c', 'o', 'd', 'e', 'r', 'a', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "codereview.appspot.com", false */ 'c', 'o', 'd', 'e', 'r', 'e', 'v', 'i', 'e', 'w', '.', 'a', 'p', 'p', 's', 'p', 'o', 't', '.', 'c', 'o', 'm', '\0',
   /* "codereview.chromium.org", false */ 'c', 'o', 'd', 'e', 'r', 'e', 'v', 'i', 'e', 'w', '.', 'c', 'h', 'r', 'o', 'm', 'i', 'u', 'm', '.', 'o', 'r', 'g', '\0',
@@ -2473,7 +2454,6 @@ static const char kSTSHostTable[] = {
   /* "compliancedictionary.com", true */ 'c', 'o', 'm', 'p', 'l', 'i', 'a', 'n', 'c', 'e', 'd', 'i', 'c', 't', 'i', 'o', 'n', 'a', 'r', 'y', '.', 'c', 'o', 'm', '\0',
   /* "complymd.com", true */ 'c', 'o', 'm', 'p', 'l', 'y', 'm', 'd', '.', 'c', 'o', 'm', '\0',
   /* "compraneta.com", true */ 'c', 'o', 'm', 'p', 'r', 'a', 'n', 'e', 't', 'a', '.', 'c', 'o', 'm', '\0',
-  /* "compucorner.com.mx", true */ 'c', 'o', 'm', 'p', 'u', 'c', 'o', 'r', 'n', 'e', 'r', '.', 'c', 'o', 'm', '.', 'm', 'x', '\0',
   /* "compucorner.mx", true */ 'c', 'o', 'm', 'p', 'u', 'c', 'o', 'r', 'n', 'e', 'r', '.', 'm', 'x', '\0',
   /* "computerhilfe-feucht.de", true */ 'c', 'o', 'm', 'p', 'u', 't', 'e', 'r', 'h', 'i', 'l', 'f', 'e', '-', 'f', 'e', 'u', 'c', 'h', 't', '.', 'd', 'e', '\0',
   /* "computersystems.guru", true */ 'c', 'o', 'm', 'p', 'u', 't', 'e', 'r', 's', 'y', 's', 't', 'e', 'm', 's', '.', 'g', 'u', 'r', 'u', '\0',
@@ -2542,7 +2522,6 @@ static const char kSTSHostTable[] = {
   /* "copypoison.com", true */ 'c', 'o', 'p', 'y', 'p', 'o', 'i', 's', 'o', 'n', '.', 'c', 'o', 'm', '\0',
   /* "copytrack.com", true */ 'c', 'o', 'p', 'y', 't', 'r', 'a', 'c', 'k', '.', 'c', 'o', 'm', '\0',
   /* "cor-ser.es", true */ 'c', 'o', 'r', '-', 's', 'e', 'r', '.', 'e', 's', '\0',
-  /* "coralrosado.com.br", true */ 'c', 'o', 'r', 'a', 'l', 'r', 'o', 's', 'a', 'd', 'o', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "corbinhesse.com", true */ 'c', 'o', 'r', 'b', 'i', 'n', 'h', 'e', 's', 's', 'e', '.', 'c', 'o', 'm', '\0',
   /* "cordlessdog.com", true */ 'c', 'o', 'r', 'd', 'l', 'e', 's', 's', 'd', 'o', 'g', '.', 'c', 'o', 'm', '\0',
   /* "core-networks.de", true */ 'c', 'o', 'r', 'e', '-', 'n', 'e', 't', 'w', 'o', 'r', 'k', 's', '.', 'd', 'e', '\0',
@@ -2605,6 +2584,7 @@ static const char kSTSHostTable[] = {
   /* "craigfrancis.co.uk", true */ 'c', 'r', 'a', 'i', 'g', 'f', 'r', 'a', 'n', 'c', 'i', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "craigrouse.com", true */ 'c', 'r', 'a', 'i', 'g', 'r', 'o', 'u', 's', 'e', '.', 'c', 'o', 'm', '\0',
   /* "cranesafe.com", true */ 'c', 'r', 'a', 'n', 'e', 's', 'a', 'f', 'e', '.', 'c', 'o', 'm', '\0',
+  /* "crazifyngers.com", true */ 'c', 'r', 'a', 'z', 'i', 'f', 'y', 'n', 'g', 'e', 'r', 's', '.', 'c', 'o', 'm', '\0',
   /* "crazy-crawler.de", true */ 'c', 'r', 'a', 'z', 'y', '-', 'c', 'r', 'a', 'w', 'l', 'e', 'r', '.', 'd', 'e', '\0',
   /* "crazydomains.ae", true */ 'c', 'r', 'a', 'z', 'y', 'd', 'o', 'm', 'a', 'i', 'n', 's', '.', 'a', 'e', '\0',
   /* "crazydomains.co.nz", true */ 'c', 'r', 'a', 'z', 'y', 'd', 'o', 'm', 'a', 'i', 'n', 's', '.', 'c', 'o', '.', 'n', 'z', '\0',
@@ -2620,6 +2600,7 @@ static const char kSTSHostTable[] = {
   /* "creativeartifice.com", true */ 'c', 'r', 'e', 'a', 't', 'i', 'v', 'e', 'a', 'r', 't', 'i', 'f', 'i', 'c', 'e', '.', 'c', 'o', 'm', '\0',
   /* "creativecaptiv.es", true */ 'c', 'r', 'e', 'a', 't', 'i', 'v', 'e', 'c', 'a', 'p', 't', 'i', 'v', '.', 'e', 's', '\0',
   /* "credential.eu", true */ 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', '.', 'e', 'u', '\0',
+  /* "creditclear.com.au", true */ 'c', 'r', 'e', 'd', 'i', 't', 'c', 'l', 'e', 'a', 'r', '.', 'c', 'o', 'm', '.', 'a', 'u', '\0',
   /* "crediteo.pl", true */ 'c', 'r', 'e', 'd', 'i', 't', 'e', 'o', '.', 'p', 'l', '\0',
   /* "creditkarma.com", true */ 'c', 'r', 'e', 'd', 'i', 't', 'k', 'a', 'r', 'm', 'a', '.', 'c', 'o', 'm', '\0',
   /* "creditproautos.com", false */ 'c', 'r', 'e', 'd', 'i', 't', 'p', 'r', 'o', 'a', 'u', 't', 'o', 's', '.', 'c', 'o', 'm', '\0',
@@ -2704,7 +2685,6 @@ static const char kSTSHostTable[] = {
   /* "cubos.io", true */ 'c', 'u', 'b', 'o', 's', '.', 'i', 'o', '\0',
   /* "cubostecnologia.com", true */ 'c', 'u', 'b', 'o', 's', 't', 'e', 'c', 'n', 'o', 'l', 'o', 'g', 'i', 'a', '.', 'c', 'o', 'm', '\0',
   /* "cubostecnologia.com.br", true */ 'c', 'u', 'b', 'o', 's', 't', 'e', 'c', 'n', 'o', 'l', 'o', 'g', 'i', 'a', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
-  /* "cubua.com", true */ 'c', 'u', 'b', 'u', 'a', '.', 'c', 'o', 'm', '\0',
   /* "cucc.date", true */ 'c', 'u', 'c', 'c', '.', 'd', 'a', 't', 'e', '\0',
   /* "cuddlecomfort.com", true */ 'c', 'u', 'd', 'd', 'l', 'e', 'c', 'o', 'm', 'f', 'o', 'r', 't', '.', 'c', 'o', 'm', '\0',
   /* "cuecasonline.com.br", true */ 'c', 'u', 'e', 'c', 'a', 's', 'o', 'n', 'l', 'i', 'n', 'e', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
@@ -2807,7 +2787,6 @@ static const char kSTSHostTable[] = {
   /* "d-quantum.com", true */ 'd', '-', 'q', 'u', 'a', 'n', 't', 'u', 'm', '.', 'c', 'o', 'm', '\0',
   /* "d-training.de", true */ 'd', '-', 't', 'r', 'a', 'i', 'n', 'i', 'n', 'g', '.', 'd', 'e', '\0',
   /* "d0xq.net", true */ 'd', '0', 'x', 'q', '.', 'n', 'e', 't', '\0',
-  /* "d3xt3r01.tk", true */ 'd', '3', 'x', 't', '3', 'r', '0', '1', '.', 't', 'k', '\0',
   /* "d42.no", true */ 'd', '4', '2', '.', 'n', 'o', '\0',
   /* "d66.nl", true */ 'd', '6', '6', '.', 'n', 'l', '\0',
   /* "da-ist-kunst.de", true */ 'd', 'a', '-', 'i', 's', 't', '-', 'k', 'u', 'n', 's', 't', '.', 'd', 'e', '\0',
@@ -2884,7 +2863,6 @@ static const char kSTSHostTable[] = {
   /* "darkcores.net", true */ 'd', 'a', 'r', 'k', 'c', 'o', 'r', 'e', 's', '.', 'n', 'e', 't', '\0',
   /* "darkdestiny.ch", true */ 'd', 'a', 'r', 'k', 'd', 'e', 's', 't', 'i', 'n', 'y', '.', 'c', 'h', '\0',
   /* "darkishgreen.com", true */ 'd', 'a', 'r', 'k', 'i', 's', 'h', 'g', 'r', 'e', 'e', 'n', '.', 'c', 'o', 'm', '\0',
-  /* "darkkeepers.dk", true */ 'd', 'a', 'r', 'k', 'k', 'e', 'e', 'p', 'e', 'r', 's', '.', 'd', 'k', '\0',
   /* "darknode.in", true */ 'd', 'a', 'r', 'k', 'n', 'o', 'd', 'e', '.', 'i', 'n', '\0',
   /* "darkserver.fedoraproject.org", true */ 'd', 'a', 'r', 'k', 's', 'e', 'r', 'v', 'e', 'r', '.', 'f', 'e', 'd', 'o', 'r', 'a', 'p', 'r', 'o', 'j', 'e', 'c', 't', '.', 'o', 'r', 'g', '\0',
   /* "darkserver.stg.fedoraproject.org", true */ 'd', 'a', 'r', 'k', 's', 'e', 'r', 'v', 'e', 'r', '.', 's', 't', 'g', '.', 'f', 'e', 'd', 'o', 'r', 'a', 'p', 'r', 'o', 'j', 'e', 'c', 't', '.', 'o', 'r', 'g', '\0',
@@ -2916,7 +2894,7 @@ static const char kSTSHostTable[] = {
   /* "datascience.cafe", true */ 'd', 'a', 't', 'a', 's', 'c', 'i', 'e', 'n', 'c', 'e', '.', 'c', 'a', 'f', 'e', '\0',
   /* "datascomemorativas.com.br", true */ 'd', 'a', 't', 'a', 's', 'c', 'o', 'm', 'e', 'm', 'o', 'r', 'a', 't', 'i', 'v', 'a', 's', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "datasharesystem.com", true */ 'd', 'a', 't', 'a', 's', 'h', 'a', 'r', 'e', 's', 'y', 's', 't', 'e', 'm', '.', 'c', 'o', 'm', '\0',
-  /* "dataskydd.net", false */ 'd', 'a', 't', 'a', 's', 'k', 'y', 'd', 'd', '.', 'n', 'e', 't', '\0',
+  /* "dataskydd.net", true */ 'd', 'a', 't', 'a', 's', 'k', 'y', 'd', 'd', '.', 'n', 'e', 't', '\0',
   /* "datastream.re", false */ 'd', 'a', 't', 'a', 's', 't', 'r', 'e', 'a', 'm', '.', 'r', 'e', '\0',
   /* "dataswamp.org", true */ 'd', 'a', 't', 'a', 's', 'w', 'a', 'm', 'p', '.', 'o', 'r', 'g', '\0',
   /* "datatekniikka.fi", false */ 'd', 'a', 't', 'a', 't', 'e', 'k', 'n', 'i', 'i', 'k', 'k', 'a', '.', 'f', 'i', '\0',
@@ -2962,6 +2940,7 @@ static const char kSTSHostTable[] = {
   /* "dcpower.eu", true */ 'd', 'c', 'p', 'o', 'w', 'e', 'r', '.', 'e', 'u', '\0',
   /* "dcuofriends.net", true */ 'd', 'c', 'u', 'o', 'f', 'r', 'i', 'e', 'n', 'd', 's', '.', 'n', 'e', 't', '\0',
   /* "dd.art.pl", true */ 'd', 'd', '.', 'a', 'r', 't', '.', 'p', 'l', '\0',
+  /* "ddatsh.com", true */ 'd', 'd', 'a', 't', 's', 'h', '.', 'c', 'o', 'm', '\0',
   /* "ddhosted.com", true */ 'd', 'd', 'h', 'o', 's', 't', 'e', 'd', '.', 'c', 'o', 'm', '\0',
   /* "ddmeportal.com", true */ 'd', 'd', 'm', 'e', 'p', 'o', 'r', 't', 'a', 'l', '.', 'c', 'o', 'm', '\0',
   /* "ddns-anbieter.de", true */ 'd', 'd', 'n', 's', '-', 'a', 'n', 'b', 'i', 'e', 't', 'e', 'r', '.', 'd', 'e', '\0',
@@ -2983,14 +2962,12 @@ static const char kSTSHostTable[] = {
   /* "dealbanana.fi", true */ 'd', 'e', 'a', 'l', 'b', 'a', 'n', 'a', 'n', 'a', '.', 'f', 'i', '\0',
   /* "dealbanana.fr", true */ 'd', 'e', 'a', 'l', 'b', 'a', 'n', 'a', 'n', 'a', '.', 'f', 'r', '\0',
   /* "dealbanana.it", true */ 'd', 'e', 'a', 'l', 'b', 'a', 'n', 'a', 'n', 'a', '.', 'i', 't', '\0',
-  /* "dealbanana.se", true */ 'd', 'e', 'a', 'l', 'b', 'a', 'n', 'a', 'n', 'a', '.', 's', 'e', '\0',
   /* "dealcruiser.nl", true */ 'd', 'e', 'a', 'l', 'c', 'r', 'u', 'i', 's', 'e', 'r', '.', 'n', 'l', '\0',
   /* "dealpass.no", true */ 'd', 'e', 'a', 'l', 'p', 'a', 's', 's', '.', 'n', 'o', '\0',
   /* "deamuseum.org", true */ 'd', 'e', 'a', 'm', 'u', 's', 'e', 'u', 'm', '.', 'o', 'r', 'g', '\0',
   /* "deanjerkovich.com", true */ 'd', 'e', 'a', 'n', 'j', 'e', 'r', 'k', 'o', 'v', 'i', 'c', 'h', '.', 'c', 'o', 'm', '\0',
   /* "deanmorgan.org", true */ 'd', 'e', 'a', 'n', 'm', 'o', 'r', 'g', 'a', 'n', '.', 'o', 'r', 'g', '\0',
   /* "deathy.ro", true */ 'd', 'e', 'a', 't', 'h', 'y', '.', 'r', 'o', '\0',
-  /* "debian-vhost.de", true */ 'd', 'e', 'b', 'i', 'a', 'n', '-', 'v', 'h', 'o', 's', 't', '.', 'd', 'e', '\0',
   /* "debiton.dk", true */ 'd', 'e', 'b', 'i', 't', 'o', 'n', '.', 'd', 'k', '\0',
   /* "debtrecycling.com.au", true */ 'd', 'e', 'b', 't', 'r', 'e', 'c', 'y', 'c', 'l', 'i', 'n', 'g', '.', 'c', 'o', 'm', '.', 'a', 'u', '\0',
   /* "decloverly.com", true */ 'd', 'e', 'c', 'l', 'o', 'v', 'e', 'r', 'l', 'y', '.', 'c', 'o', 'm', '\0',
@@ -3089,7 +3066,6 @@ static const char kSTSHostTable[] = {
   /* "designville.cz", true */ 'd', 'e', 's', 'i', 'g', 'n', 'v', 'i', 'l', 'l', 'e', '.', 'c', 'z', '\0',
   /* "designville.sk", true */ 'd', 'e', 's', 'i', 'g', 'n', 'v', 'i', 'l', 'l', 'e', '.', 's', 'k', '\0',
   /* "desmaakvanplanten.be", true */ 'd', 'e', 's', 'm', 'a', 'a', 'k', 'v', 'a', 'n', 'p', 'l', 'a', 'n', 't', 'e', 'n', '.', 'b', 'e', '\0',
-  /* "despora.de", true */ 'd', 'e', 's', 'p', 'o', 'r', 'a', '.', 'd', 'e', '\0',
   /* "desserteagleselvenar.tk", true */ 'd', 'e', 's', 's', 'e', 'r', 't', 'e', 'a', 'g', 'l', 'e', 's', 'e', 'l', 'v', 'e', 'n', 'a', 'r', '.', 't', 'k', '\0',
   /* "desterman.ru", true */ 'd', 'e', 's', 't', 'e', 'r', 'm', 'a', 'n', '.', 'r', 'u', '\0',
   /* "destom.be", true */ 'd', 'e', 's', 't', 'o', 'm', '.', 'b', 'e', '\0',
@@ -3245,6 +3221,7 @@ static const char kSTSHostTable[] = {
   /* "discofitta.com", true */ 'd', 'i', 's', 'c', 'o', 'f', 'i', 't', 't', 'a', '.', 'c', 'o', 'm', '\0',
   /* "disconformity.net", true */ 'd', 'i', 's', 'c', 'o', 'n', 'f', 'o', 'r', 'm', 'i', 't', 'y', '.', 'n', 'e', 't', '\0',
   /* "discordapp.com", true */ 'd', 'i', 's', 'c', 'o', 'r', 'd', 'a', 'p', 'p', '.', 'c', 'o', 'm', '\0',
+  /* "dise-online.de", true */ 'd', 'i', 's', 'e', '-', 'o', 'n', 'l', 'i', 'n', 'e', '.', 'd', 'e', '\0',
   /* "disinclined.org", true */ 'd', 'i', 's', 'i', 'n', 'c', 'l', 'i', 'n', 'e', 'd', '.', 'o', 'r', 'g', '\0',
   /* "disking.co.uk", true */ 'd', 'i', 's', 'k', 'i', 'n', 'g', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "disorderboutique.com", true */ 'd', 'i', 's', 'o', 'r', 'd', 'e', 'r', 'b', 'o', 'u', 't', 'i', 'q', 'u', 'e', '.', 'c', 'o', 'm', '\0',
@@ -3275,7 +3252,6 @@ static const char kSTSHostTable[] = {
   /* "dkds.us", true */ 'd', 'k', 'd', 's', '.', 'u', 's', '\0',
   /* "dl.google.com", true */ 'd', 'l', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "dlaspania.pl", true */ 'd', 'l', 'a', 's', 'p', 'a', 'n', 'i', 'a', '.', 'p', 'l', '\0',
-  /* "dlc.viasinc.com", true */ 'd', 'l', 'c', '.', 'v', 'i', 'a', 's', 'i', 'n', 'c', '.', 'c', 'o', 'm', '\0',
   /* "dlitz.net", true */ 'd', 'l', 'i', 't', 'z', '.', 'n', 'e', 't', '\0',
   /* "dlld.com", true */ 'd', 'l', 'l', 'd', '.', 'c', 'o', 'm', '\0',
   /* "dlouwrink.nl", true */ 'd', 'l', 'o', 'u', 'w', 'r', 'i', 'n', 'k', '.', 'n', 'l', '\0',
@@ -3337,6 +3313,7 @@ static const char kSTSHostTable[] = {
   /* "dokuboard.com", true */ 'd', 'o', 'k', 'u', 'b', 'o', 'a', 'r', 'd', '.', 'c', 'o', 'm', '\0',
   /* "dokuraum.de", true */ 'd', 'o', 'k', 'u', 'r', 'a', 'u', 'm', '.', 'd', 'e', '\0',
   /* "dolarcanadense.com.br", true */ 'd', 'o', 'l', 'a', 'r', 'c', 'a', 'n', 'a', 'd', 'e', 'n', 's', 'e', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
+  /* "doleta.gov", true */ 'd', 'o', 'l', 'e', 't', 'a', '.', 'g', 'o', 'v', '\0',
   /* "dolevik.com", true */ 'd', 'o', 'l', 'e', 'v', 'i', 'k', '.', 'c', 'o', 'm', '\0',
   /* "dolice.net", true */ 'd', 'o', 'l', 'i', 'c', 'e', '.', 'n', 'e', 't', '\0',
   /* "dollemore.com", true */ 'd', 'o', 'l', 'l', 'e', 'm', 'o', 'r', 'e', '.', 'c', 'o', 'm', '\0',
@@ -3441,6 +3418,7 @@ static const char kSTSHostTable[] = {
   /* "drivenes.net", true */ 'd', 'r', 'i', 'v', 'e', 'n', 'e', 's', '.', 'n', 'e', 't', '\0',
   /* "drivercopilot.com", true */ 'd', 'r', 'i', 'v', 'e', 'r', 'c', 'o', 'p', 'i', 'l', 'o', 't', '.', 'c', 'o', 'm', '\0',
   /* "driverscollection.com", true */ 'd', 'r', 'i', 'v', 'e', 'r', 's', 'c', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', '.', 'c', 'o', 'm', '\0',
+  /* "driving-lessons.co.uk", true */ 'd', 'r', 'i', 'v', 'i', 'n', 'g', '-', 'l', 'e', 's', 's', 'o', 'n', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "drivya.com", true */ 'd', 'r', 'i', 'v', 'y', 'a', '.', 'c', 'o', 'm', '\0',
   /* "drjoe.ca", true */ 'd', 'r', 'j', 'o', 'e', '.', 'c', 'a', '\0',
   /* "drjuanitacollier.com", true */ 'd', 'r', 'j', 'u', 'a', 'n', 'i', 't', 'a', 'c', 'o', 'l', 'l', 'i', 'e', 'r', '.', 'c', 'o', 'm', '\0',
@@ -3525,7 +3503,6 @@ static const char kSTSHostTable[] = {
   /* "dyrkar.com", true */ 'd', 'y', 'r', 'k', 'a', 'r', '.', 'c', 'o', 'm', '\0',
   /* "dziekonski.com", true */ 'd', 'z', 'i', 'e', 'k', 'o', 'n', 's', 'k', 'i', '.', 'c', 'o', 'm', '\0',
   /* "dzndk.com", true */ 'd', 'z', 'n', 'd', 'k', '.', 'c', 'o', 'm', '\0',
-  /* "dzyabchenko.com", true */ 'd', 'z', 'y', 'a', 'b', 'c', 'h', 'e', 'n', 'k', 'o', '.', 'c', 'o', 'm', '\0',
   /* "e-biografias.net", true */ 'e', '-', 'b', 'i', 'o', 'g', 'r', 'a', 'f', 'i', 'a', 's', '.', 'n', 'e', 't', '\0',
   /* "e-kontakti.fi", true */ 'e', '-', 'k', 'o', 'n', 't', 'a', 'k', 't', 'i', '.', 'f', 'i', '\0',
   /* "e-learningbs.com", true */ 'e', '-', 'l', 'e', 'a', 'r', 'n', 'i', 'n', 'g', 'b', 's', '.', 'c', 'o', 'm', '\0',
@@ -3678,7 +3655,6 @@ static const char kSTSHostTable[] = {
   /* "eksisozluk.com", true */ 'e', 'k', 's', 'i', 's', 'o', 'z', 'l', 'u', 'k', '.', 'c', 'o', 'm', '\0',
   /* "ekzarta.ru", true */ 'e', 'k', 'z', 'a', 'r', 't', 'a', '.', 'r', 'u', '\0',
   /* "el-cell.com", true */ 'e', 'l', '-', 'c', 'e', 'l', 'l', '.', 'c', 'o', 'm', '\0',
-  /* "elan-organics.com", true */ 'e', 'l', 'a', 'n', '-', 'o', 'r', 'g', 'a', 'n', 'i', 'c', 's', '.', 'c', 'o', 'm', '\0',
   /* "elanguest.ro", true */ 'e', 'l', 'a', 'n', 'g', 'u', 'e', 's', 't', '.', 'r', 'o', '\0',
   /* "elanguest.ru", true */ 'e', 'l', 'a', 'n', 'g', 'u', 'e', 's', 't', '.', 'r', 'u', '\0',
   /* "elaon.de", true */ 'e', 'l', 'a', 'o', 'n', '.', 'd', 'e', '\0',
@@ -3722,6 +3698,7 @@ static const char kSTSHostTable[] = {
   /* "elliquiy.com", true */ 'e', 'l', 'l', 'i', 'q', 'u', 'i', 'y', '.', 'c', 'o', 'm', '\0',
   /* "elliriehl.at", true */ 'e', 'l', 'l', 'i', 'r', 'i', 'e', 'h', 'l', '.', 'a', 't', '\0',
   /* "ellsinger.me", true */ 'e', 'l', 'l', 's', 'i', 'n', 'g', 'e', 'r', '.', 'm', 'e', '\0',
+  /* "elmar-kraamzorg.nl", true */ 'e', 'l', 'm', 'a', 'r', '-', 'k', 'r', 'a', 'a', 'm', 'z', 'o', 'r', 'g', '.', 'n', 'l', '\0',
   /* "elnan.do", true */ 'e', 'l', 'n', 'a', 'n', '.', 'd', 'o', '\0',
   /* "eloanpersonal.com", true */ 'e', 'l', 'o', 'a', 'n', 'p', 'e', 'r', 's', 'o', 'n', 'a', 'l', '.', 'c', 'o', 'm', '\0',
   /* "eloge.se", true */ 'e', 'l', 'o', 'g', 'e', '.', 's', 'e', '\0',
@@ -3775,6 +3752,7 @@ static const char kSTSHostTable[] = {
   /* "encryptallthethings.net", true */ 'e', 'n', 'c', 'r', 'y', 'p', 't', 'a', 'l', 'l', 't', 'h', 'e', 't', 'h', 'i', 'n', 'g', 's', '.', 'n', 'e', 't', '\0',
   /* "encrypted.google.com", true */ 'e', 'n', 'c', 'r', 'y', 'p', 't', 'e', 'd', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "encryptedaudience.com", true */ 'e', 'n', 'c', 'r', 'y', 'p', 't', 'e', 'd', 'a', 'u', 'd', 'i', 'e', 'n', 'c', 'e', '.', 'c', 'o', 'm', '\0',
+  /* "encryptio.com", true */ 'e', 'n', 'c', 'r', 'y', 'p', 't', 'i', 'o', '.', 'c', 'o', 'm', '\0',
   /* "endeal.nl", true */ 'e', 'n', 'd', 'e', 'a', 'l', '.', 'n', 'l', '\0',
   /* "ender.co.at", true */ 'e', 'n', 'd', 'e', 'r', '.', 'c', 'o', '.', 'a', 't', '\0',
   /* "endlessdiy.ca", true */ 'e', 'n', 'd', 'l', 'e', 's', 's', 'd', 'i', 'y', '.', 'c', 'a', '\0',
@@ -3841,7 +3819,7 @@ static const char kSTSHostTable[] = {
   /* "epicwalnutcreek.com", true */ 'e', 'p', 'i', 'c', 'w', 'a', 'l', 'n', 'u', 't', 'c', 'r', 'e', 'e', 'k', '.', 'c', 'o', 'm', '\0',
   /* "epizentrum.work", true */ 'e', 'p', 'i', 'z', 'e', 'n', 't', 'r', 'u', 'm', '.', 'w', 'o', 'r', 'k', '\0',
   /* "epizentrum.works", true */ 'e', 'p', 'i', 'z', 'e', 'n', 't', 'r', 'u', 'm', '.', 'w', 'o', 'r', 'k', 's', '\0',
-  /* "epoch.com", true */ 'e', 'p', 'o', 'c', 'h', '.', 'c', 'o', 'm', '\0',
+  /* "epoch.com", false */ 'e', 'p', 'o', 'c', 'h', '.', 'c', 'o', 'm', '\0',
   /* "epostplus.li", true */ 'e', 'p', 'o', 's', 't', 'p', 'l', 'u', 's', '.', 'l', 'i', '\0',
   /* "epublibre.org", true */ 'e', 'p', 'u', 'b', 'l', 'i', 'b', 'r', 'e', '.', 'o', 'r', 'g', '\0',
   /* "eq-serve.com", true */ 'e', 'q', '-', 's', 'e', 'r', 'v', 'e', '.', 'c', 'o', 'm', '\0',
@@ -3855,7 +3833,6 @@ static const char kSTSHostTable[] = {
   /* "ergorium.com", true */ 'e', 'r', 'g', 'o', 'r', 'i', 'u', 'm', '.', 'c', 'o', 'm', '\0',
   /* "ergorium.eu", true */ 'e', 'r', 'g', 'o', 'r', 'i', 'u', 'm', '.', 'e', 'u', '\0',
   /* "ericabrahamsen.net", true */ 'e', 'r', 'i', 'c', 'a', 'b', 'r', 'a', 'h', 'a', 'm', 's', 'e', 'n', '.', 'n', 'e', 't', '\0',
-  /* "ericbond.net", true */ 'e', 'r', 'i', 'c', 'b', 'o', 'n', 'd', '.', 'n', 'e', 't', '\0',
   /* "ericdiao.com", true */ 'e', 'r', 'i', 'c', 'd', 'i', 'a', 'o', '.', 'c', 'o', 'm', '\0',
   /* "erichalv.com", true */ 'e', 'r', 'i', 'c', 'h', 'a', 'l', 'v', '.', 'c', 'o', 'm', '\0',
   /* "erichorstmanshof.nl", true */ 'e', 'r', 'i', 'c', 'h', 'o', 'r', 's', 't', 'm', 'a', 'n', 's', 'h', 'o', 'f', '.', 'n', 'l', '\0',
@@ -3889,6 +3866,7 @@ static const char kSTSHostTable[] = {
   /* "escalate.eu", true */ 'e', 's', 'c', 'a', 'l', 'a', 't', 'e', '.', 'e', 'u', '\0',
   /* "escapees.com", true */ 'e', 's', 'c', 'a', 'p', 'e', 'e', 's', '.', 'c', 'o', 'm', '\0',
   /* "escargotbistro.com", true */ 'e', 's', 'c', 'a', 'r', 'g', 'o', 't', 'b', 'i', 's', 't', 'r', 'o', '.', 'c', 'o', 'm', '\0',
+  /* "esclear.de", true */ 'e', 's', 'c', 'l', 'e', 'a', 'r', '.', 'd', 'e', '\0',
   /* "escritoriodearte.com", false */ 'e', 's', 'c', 'r', 'i', 't', 'o', 'r', 'i', 'o', 'd', 'e', 'a', 'r', 't', 'e', '.', 'c', 'o', 'm', '\0',
   /* "escyr.top", true */ 'e', 's', 'c', 'y', 'r', '.', 't', 'o', 'p', '\0',
   /* "eseth.de", true */ 'e', 's', 'e', 't', 'h', '.', 'd', 'e', '\0',
@@ -4046,6 +4024,7 @@ static const char kSTSHostTable[] = {
   /* "extratorrents.tech", true */ 'e', 'x', 't', 'r', 'a', 't', 'o', 'r', 'r', 'e', 'n', 't', 's', '.', 't', 'e', 'c', 'h', '\0',
   /* "extreme-gaming.de", true */ 'e', 'x', 't', 'r', 'e', 'm', 'e', '-', 'g', 'a', 'm', 'i', 'n', 'g', '.', 'd', 'e', '\0',
   /* "extreme-gaming.us", true */ 'e', 'x', 't', 'r', 'e', 'm', 'e', '-', 'g', 'a', 'm', 'i', 'n', 'g', '.', 'u', 's', '\0',
+  /* "exyplis.com", true */ 'e', 'x', 'y', 'p', 'l', 'i', 's', '.', 'c', 'o', 'm', '\0',
   /* "eyasc.nl", true */ 'e', 'y', 'a', 's', 'c', '.', 'n', 'l', '\0',
   /* "eydesignguidelines.com", true */ 'e', 'y', 'd', 'e', 's', 'i', 'g', 'n', 'g', 'u', 'i', 'd', 'e', 'l', 'i', 'n', 'e', 's', '.', 'c', 'o', 'm', '\0',
   /* "eye-carat.com", true */ 'e', 'y', 'e', '-', 'c', 'a', 'r', 'a', 't', '.', 'c', 'o', 'm', '\0',
@@ -4057,7 +4036,6 @@ static const char kSTSHostTable[] = {
   /* "ezequiel-garzon.net", true */ 'e', 'z', 'e', 'q', 'u', 'i', 'e', 'l', '-', 'g', 'a', 'r', 'z', 'o', 'n', '.', 'n', 'e', 't', '\0',
   /* "ezhik-din.ru", true */ 'e', 'z', 'h', 'i', 'k', '-', 'd', 'i', 'n', '.', 'r', 'u', '\0',
   /* "ezrefurb.co.uk", true */ 'e', 'z', 'r', 'e', 'f', 'u', 'r', 'b', '.', 'c', 'o', '.', 'u', 'k', '\0',
-  /* "f-be.com", true */ 'f', '-', 'b', 'e', '.', 'c', 'o', 'm', '\0',
   /* "f-droid.org", true */ 'f', '-', 'd', 'r', 'o', 'i', 'd', '.', 'o', 'r', 'g', '\0',
   /* "f-thie.de", true */ 'f', '-', 't', 'h', 'i', 'e', '.', 'd', 'e', '\0',
   /* "f00.fr", true */ 'f', '0', '0', '.', 'f', 'r', '\0',
@@ -4275,6 +4253,7 @@ static const char kSTSHostTable[] = {
   /* "firma-offshore.com", true */ 'f', 'i', 'r', 'm', 'a', '-', 'o', 'f', 'f', 's', 'h', 'o', 'r', 'e', '.', 'c', 'o', 'm', '\0',
   /* "firmale.com", true */ 'f', 'i', 'r', 'm', 'a', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "firmapi.com", true */ 'f', 'i', 'r', 'm', 'a', 'p', 'i', '.', 'c', 'o', 'm', '\0',
+  /* "firstchoicecandy.com", true */ 'f', 'i', 'r', 's', 't', 'c', 'h', 'o', 'i', 'c', 'e', 'c', 'a', 'n', 'd', 'y', '.', 'c', 'o', 'm', '\0',
   /* "firstderm.com", true */ 'f', 'i', 'r', 's', 't', 'd', 'e', 'r', 'm', '.', 'c', 'o', 'm', '\0',
   /* "firstdogonthemoon.com.au", true */ 'f', 'i', 'r', 's', 't', 'd', 'o', 'g', 'o', 'n', 't', 'h', 'e', 'm', 'o', 'o', 'n', '.', 'c', 'o', 'm', '.', 'a', 'u', '\0',
   /* "firstlook.org", true */ 'f', 'i', 'r', 's', 't', 'l', 'o', 'o', 'k', '.', 'o', 'r', 'g', '\0',
@@ -4302,12 +4281,14 @@ static const char kSTSHostTable[] = {
   /* "flamer-scene.com", false */ 'f', 'l', 'a', 'm', 'e', 'r', '-', 's', 'c', 'e', 'n', 'e', '.', 'c', 'o', 'm', '\0',
   /* "flamingcow.tv", true */ 'f', 'l', 'a', 'm', 'i', 'n', 'g', 'c', 'o', 'w', '.', 't', 'v', '\0',
   /* "flamingkeys.com", true */ 'f', 'l', 'a', 'm', 'i', 'n', 'g', 'k', 'e', 'y', 's', '.', 'c', 'o', 'm', '\0',
+  /* "flamingkeys.com.au", true */ 'f', 'l', 'a', 'm', 'i', 'n', 'g', 'k', 'e', 'y', 's', '.', 'c', 'o', 'm', '.', 'a', 'u', '\0',
   /* "flamme-von-anor.de", true */ 'f', 'l', 'a', 'm', 'm', 'e', '-', 'v', 'o', 'n', '-', 'a', 'n', 'o', 'r', '.', 'd', 'e', '\0',
   /* "flana.com", true */ 'f', 'l', 'a', 'n', 'a', '.', 'c', 'o', 'm', '\0',
   /* "flareon.net", true */ 'f', 'l', 'a', 'r', 'e', 'o', 'n', '.', 'n', 'e', 't', '\0',
   /* "flashback.org", true */ 'f', 'l', 'a', 's', 'h', 'b', 'a', 'c', 'k', '.', 'o', 'r', 'g', '\0',
   /* "flat.io", true */ 'f', 'l', 'a', 't', '.', 'i', 'o', '\0',
   /* "flawlesscowboy.xyz", true */ 'f', 'l', 'a', 'w', 'l', 'e', 's', 's', 'c', 'o', 'w', 'b', 'o', 'y', '.', 'x', 'y', 'z', '\0',
+  /* "flazznetworks.com", false */ 'f', 'l', 'a', 'z', 'z', 'n', 'e', 't', 'w', 'o', 'r', 'k', 's', '.', 'c', 'o', 'm', '\0',
   /* "fleep.io", true */ 'f', 'l', 'e', 'e', 'p', '.', 'i', 'o', '\0',
   /* "fleisch.club", true */ 'f', 'l', 'e', 'i', 's', 'c', 'h', '.', 'c', 'l', 'u', 'b', '\0',
   /* "fletchto99.com", true */ 'f', 'l', 'e', 't', 'c', 'h', 't', 'o', '9', '9', '.', 'c', 'o', 'm', '\0',
@@ -4435,7 +4416,6 @@ static const char kSTSHostTable[] = {
   /* "frack.nl", true */ 'f', 'r', 'a', 'c', 'k', '.', 'n', 'l', '\0',
   /* "fraesentest.de", true */ 'f', 'r', 'a', 'e', 's', 'e', 'n', 't', 'e', 's', 't', '.', 'd', 'e', '\0',
   /* "fragmentspuren.de", true */ 'f', 'r', 'a', 'g', 'm', 'e', 'n', 't', 's', 'p', 'u', 'r', 'e', 'n', '.', 'd', 'e', '\0',
-  /* "fragnic.com", true */ 'f', 'r', 'a', 'g', 'n', 'i', 'c', '.', 'c', 'o', 'm', '\0',
   /* "fraho.eu", true */ 'f', 'r', 'a', 'h', 'o', '.', 'e', 'u', '\0',
   /* "fralef.me", false */ 'f', 'r', 'a', 'l', 'e', 'f', '.', 'm', 'e', '\0',
   /* "fran.cr", true */ 'f', 'r', 'a', 'n', '.', 'c', 'r', '\0',
@@ -4450,7 +4430,6 @@ static const char kSTSHostTable[] = {
   /* "frankwei.xyz", true */ 'f', 'r', 'a', 'n', 'k', 'w', 'e', 'i', '.', 'x', 'y', 'z', '\0',
   /* "fransallen.com", true */ 'f', 'r', 'a', 'n', 's', 'a', 'l', 'l', 'e', 'n', '.', 'c', 'o', 'm', '\0',
   /* "frantic1048.com", true */ 'f', 'r', 'a', 'n', 't', 'i', 'c', '1', '0', '4', '8', '.', 'c', 'o', 'm', '\0',
-  /* "franzt.ovh", true */ 'f', 'r', 'a', 'n', 'z', 't', '.', 'o', 'v', 'h', '\0',
   /* "frappant.cc", true */ 'f', 'r', 'a', 'p', 'p', 'a', 'n', 't', '.', 'c', 'c', '\0',
   /* "frasesparaface.com.br", true */ 'f', 'r', 'a', 's', 'e', 's', 'p', 'a', 'r', 'a', 'f', 'a', 'c', 'e', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "frasys.cloud", true */ 'f', 'r', 'a', 's', 'y', 's', '.', 'c', 'l', 'o', 'u', 'd', '\0',
@@ -4601,7 +4580,6 @@ static const char kSTSHostTable[] = {
   /* "gagniard.org", true */ 'g', 'a', 'g', 'n', 'i', 'a', 'r', 'd', '.', 'o', 'r', 'g', '\0',
   /* "gagor.pl", true */ 'g', 'a', 'g', 'o', 'r', '.', 'p', 'l', '\0',
   /* "gaichon.com", true */ 'g', 'a', 'i', 'c', 'h', 'o', 'n', '.', 'c', 'o', 'm', '\0',
-  /* "gaiserik.com", false */ 'g', 'a', 'i', 's', 'e', 'r', 'i', 'k', '.', 'c', 'o', 'm', '\0',
   /* "gakkainavi-epsilon.jp", true */ 'g', 'a', 'k', 'k', 'a', 'i', 'n', 'a', 'v', 'i', '-', 'e', 'p', 's', 'i', 'l', 'o', 'n', '.', 'j', 'p', '\0',
   /* "gakkainavi-epsilon.net", true */ 'g', 'a', 'k', 'k', 'a', 'i', 'n', 'a', 'v', 'i', '-', 'e', 'p', 's', 'i', 'l', 'o', 'n', '.', 'n', 'e', 't', '\0',
   /* "gakkainavi.jp", true */ 'g', 'a', 'k', 'k', 'a', 'i', 'n', 'a', 'v', 'i', '.', 'j', 'p', '\0',
@@ -4643,7 +4621,6 @@ static const char kSTSHostTable[] = {
   /* "gamingzoneservers.com", true */ 'g', 'a', 'm', 'i', 'n', 'g', 'z', 'o', 'n', 'e', 's', 'e', 'r', 'v', 'e', 'r', 's', '.', 'c', 'o', 'm', '\0',
   /* "gamishou.fr", true */ 'g', 'a', 'm', 'i', 's', 'h', 'o', 'u', '.', 'f', 'r', '\0',
   /* "gamoloco.com", true */ 'g', 'a', 'm', 'o', 'l', 'o', 'c', 'o', '.', 'c', 'o', 'm', '\0',
-  /* "gancedo.com.es", true */ 'g', 'a', 'n', 'c', 'e', 'd', 'o', '.', 'c', 'o', 'm', '.', 'e', 's', '\0',
   /* "ganhonet.com.br", true */ 'g', 'a', 'n', 'h', 'o', 'n', 'e', 't', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "gapdirect.com", true */ 'g', 'a', 'p', 'd', 'i', 'r', 'e', 'c', 't', '.', 'c', 'o', 'm', '\0',
   /* "gar-nich.net", true */ 'g', 'a', 'r', '-', 'n', 'i', 'c', 'h', '.', 'n', 'e', 't', '\0',
@@ -4688,6 +4665,7 @@ static const char kSTSHostTable[] = {
   /* "geek-hub.de", true */ 'g', 'e', 'e', 'k', '-', 'h', 'u', 'b', '.', 'd', 'e', '\0',
   /* "geek.com.tw", false */ 'g', 'e', 'e', 'k', '.', 'c', 'o', 'm', '.', 't', 'w', '\0',
   /* "geek.tw", false */ 'g', 'e', 'e', 'k', '.', 't', 'w', '\0',
+  /* "geekabit.nl", true */ 'g', 'e', 'e', 'k', 'a', 'b', 'i', 't', '.', 'n', 'l', '\0',
   /* "geekandi.com", true */ 'g', 'e', 'e', 'k', 'a', 'n', 'd', 'i', '.', 'c', 'o', 'm', '\0',
   /* "geekariom.com", true */ 'g', 'e', 'e', 'k', 'a', 'r', 'i', 'o', 'm', '.', 'c', 'o', 'm', '\0',
   /* "geeklair.net", true */ 'g', 'e', 'e', 'k', 'l', 'a', 'i', 'r', '.', 'n', 'e', 't', '\0',
@@ -4873,7 +4851,6 @@ static const char kSTSHostTable[] = {
   /* "gmw-ingenieurbuero.de", true */ 'g', 'm', 'w', '-', 'i', 'n', 'g', 'e', 'n', 'i', 'e', 'u', 'r', 'b', 'u', 'e', 'r', 'o', '.', 'd', 'e', '\0',
   /* "gnetion.com", true */ 'g', 'n', 'e', 't', 'i', 'o', 'n', '.', 'c', 'o', 'm', '\0',
   /* "gnetwork.eu", true */ 'g', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'e', 'u', '\0',
-  /* "gnom.me", true */ 'g', 'n', 'o', 'm', '.', 'm', 'e', '\0',
   /* "gnunet.org", true */ 'g', 'n', 'u', 'n', 'e', 't', '.', 'o', 'r', 'g', '\0',
   /* "go-zh.org", true */ 'g', 'o', '-', 'z', 'h', '.', 'o', 'r', 'g', '\0',
   /* "go.xero.com", false */ 'g', 'o', '.', 'x', 'e', 'r', 'o', '.', 'c', 'o', 'm', '\0',
@@ -4887,7 +4864,6 @@ static const char kSTSHostTable[] = {
   /* "goerres2014.de", true */ 'g', 'o', 'e', 'r', 'r', 'e', 's', '2', '0', '1', '4', '.', 'd', 'e', '\0',
   /* "goetemp.de", true */ 'g', 'o', 'e', 't', 'e', 'm', 'p', '.', 'd', 'e', '\0',
   /* "gofigure.fr", false */ 'g', 'o', 'f', 'i', 'g', 'u', 'r', 'e', '.', 'f', 'r', '\0',
-  /* "goggs.eu", true */ 'g', 'o', 'g', 'g', 's', '.', 'e', 'u', '\0',
   /* "gogoodyear.eu", true */ 'g', 'o', 'g', 'o', 'o', 'd', 'y', 'e', 'a', 'r', '.', 'e', 'u', '\0',
   /* "gogsat.com", true */ 'g', 'o', 'g', 's', 'a', 't', '.', 'c', 'o', 'm', '\0',
   /* "gohon.org", true */ 'g', 'o', 'h', 'o', 'n', '.', 'o', 'r', 'g', '\0',
@@ -4902,6 +4878,7 @@ static const char kSTSHostTable[] = {
   /* "goldpros.com", true */ 'g', 'o', 'l', 'd', 'p', 'r', 'o', 's', '.', 'c', 'o', 'm', '\0',
   /* "goldsecurity.com", true */ 'g', 'o', 'l', 'd', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '.', 'c', 'o', 'm', '\0',
   /* "golf18network.com", true */ 'g', 'o', 'l', 'f', '1', '8', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'c', 'o', 'm', '\0',
+  /* "golfburn.com", false */ 'g', 'o', 'l', 'f', 'b', 'u', 'r', 'n', '.', 'c', 'o', 'm', '\0',
   /* "golfscape.com", true */ 'g', 'o', 'l', 'f', 's', 'c', 'a', 'p', 'e', '.', 'c', 'o', 'm', '\0',
   /* "gong8.win", true */ 'g', 'o', 'n', 'g', '8', '.', 'w', 'i', 'n', '\0',
   /* "gonkar.com", true */ 'g', 'o', 'n', 'k', 'a', 'r', '.', 'c', 'o', 'm', '\0',
@@ -4938,6 +4915,7 @@ static const char kSTSHostTable[] = {
   /* "goudenharynck.be", true */ 'g', 'o', 'u', 'd', 'e', 'n', 'h', 'a', 'r', 'y', 'n', 'c', 'k', '.', 'b', 'e', '\0',
   /* "governorhub.com", true */ 'g', 'o', 'v', 'e', 'r', 'n', 'o', 'r', 'h', 'u', 'b', '.', 'c', 'o', 'm', '\0',
   /* "govtrack.us", true */ 'g', 'o', 'v', 't', 'r', 'a', 'c', 'k', '.', 'u', 's', '\0',
+  /* "gowe.wang", false */ 'g', 'o', 'w', 'e', '.', 'w', 'a', 'n', 'g', '\0',
   /* "gozel.com.tr", true */ 'g', 'o', 'z', 'e', 'l', '.', 'c', 'o', 'm', '.', 't', 'r', '\0',
   /* "gpcsolutions.fr", true */ 'g', 'p', 'c', 's', 'o', 'l', 'u', 't', 'i', 'o', 'n', 's', '.', 'f', 'r', '\0',
   /* "gpfclan.de", true */ 'g', 'p', 'f', 'c', 'l', 'a', 'n', '.', 'd', 'e', '\0',
@@ -4976,7 +4954,6 @@ static const char kSTSHostTable[] = {
   /* "granth.io", true */ 'g', 'r', 'a', 'n', 't', 'h', '.', 'i', 'o', '\0',
   /* "granular.ag", true */ 'g', 'r', 'a', 'n', 'u', 'l', 'a', 'r', '.', 'a', 'g', '\0',
   /* "graphire.io", true */ 'g', 'r', 'a', 'p', 'h', 'i', 'r', 'e', '.', 'i', 'o', '\0',
-  /* "grassenberg.de", true */ 'g', 'r', 'a', 's', 's', 'e', 'n', 'b', 'e', 'r', 'g', '.', 'd', 'e', '\0',
   /* "grasshoppervape.com", true */ 'g', 'r', 'a', 's', 's', 'h', 'o', 'p', 'p', 'e', 'r', 'v', 'a', 'p', 'e', '.', 'c', 'o', 'm', '\0',
   /* "gratisonlinesex.com", true */ 'g', 'r', 'a', 't', 'i', 's', 'o', 'n', 'l', 'i', 'n', 'e', 's', 'e', 'x', '.', 'c', 'o', 'm', '\0',
   /* "gravitascreative.net", true */ 'g', 'r', 'a', 'v', 'i', 't', 'a', 's', 'c', 'r', 'e', 'a', 't', 'i', 'v', 'e', '.', 'n', 'e', 't', '\0',
@@ -4990,8 +4967,6 @@ static const char kSTSHostTable[] = {
   /* "grcnode.co.uk", true */ 'g', 'r', 'c', 'n', 'o', 'd', 'e', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "greatfire.org", true */ 'g', 'r', 'e', 'a', 't', 'f', 'i', 'r', 'e', '.', 'o', 'r', 'g', '\0',
   /* "greatnet.de", true */ 'g', 'r', 'e', 'a', 't', 'n', 'e', 't', '.', 'd', 'e', '\0',
-  /* "greboid.co.uk", true */ 'g', 'r', 'e', 'b', 'o', 'i', 'd', '.', 'c', 'o', '.', 'u', 'k', '\0',
-  /* "greboid.com", true */ 'g', 'r', 'e', 'b', 'o', 'i', 'd', '.', 'c', 'o', 'm', '\0',
   /* "greedbutt.com", true */ 'g', 'r', 'e', 'e', 'd', 'b', 'u', 't', 't', '.', 'c', 'o', 'm', '\0',
   /* "greek.dating", true */ 'g', 'r', 'e', 'e', 'k', '.', 'd', 'a', 't', 'i', 'n', 'g', '\0',
   /* "green-attitude.be", true */ 'g', 'r', 'e', 'e', 'n', '-', 'a', 't', 't', 'i', 't', 'u', 'd', 'e', '.', 'b', 'e', '\0',
@@ -5006,6 +4981,8 @@ static const char kSTSHostTable[] = {
   /* "greensolid.biz", true */ 'g', 'r', 'e', 'e', 'n', 's', 'o', 'l', 'i', 'd', '.', 'b', 'i', 'z', '\0',
   /* "greenteamtwente.nl", true */ 'g', 'r', 'e', 'e', 'n', 't', 'e', 'a', 'm', 't', 'w', 'e', 'n', 't', 'e', '.', 'n', 'l', '\0',
   /* "greger.me", true */ 'g', 'r', 'e', 'g', 'e', 'r', '.', 'm', 'e', '\0',
+  /* "gregmilton.com", true */ 'g', 'r', 'e', 'g', 'm', 'i', 'l', 't', 'o', 'n', '.', 'c', 'o', 'm', '\0',
+  /* "gregmilton.org", true */ 'g', 'r', 'e', 'g', 'm', 'i', 'l', 't', 'o', 'n', '.', 'o', 'r', 'g', '\0',
   /* "gregorians.org", true */ 'g', 'r', 'e', 'g', 'o', 'r', 'i', 'a', 'n', 's', '.', 'o', 'r', 'g', '\0',
   /* "gregorywiest.com", true */ 'g', 'r', 'e', 'g', 'o', 'r', 'y', 'w', 'i', 'e', 's', 't', '.', 'c', 'o', 'm', '\0',
   /* "greiners.net", true */ 'g', 'r', 'e', 'i', 'n', 'e', 'r', 's', '.', 'n', 'e', 't', '\0',
@@ -5115,7 +5092,6 @@ static const char kSTSHostTable[] = {
   /* "gveh.de", true */ 'g', 'v', 'e', 'h', '.', 'd', 'e', '\0',
   /* "gvt2.com", true */ 'g', 'v', 't', '2', '.', 'c', 'o', 'm', '\0',
   /* "gvt3.com", true */ 'g', 'v', 't', '3', '.', 'c', 'o', 'm', '\0',
-  /* "gw2reload.eu", true */ 'g', 'w', '2', 'r', 'e', 'l', 'o', 'a', 'd', '.', 'e', 'u', '\0',
   /* "gw2treasures.com", true */ 'g', 'w', '2', 't', 'r', 'e', 'a', 's', 'u', 'r', 'e', 's', '.', 'c', 'o', 'm', '\0',
   /* "gwerder.net", true */ 'g', 'w', 'e', 'r', 'd', 'e', 'r', '.', 'n', 'e', 't', '\0',
   /* "gyas.nl", true */ 'g', 'y', 'a', 's', '.', 'n', 'l', '\0',
@@ -5139,7 +5115,6 @@ static const char kSTSHostTable[] = {
   /* "hackcraft.net", true */ 'h', 'a', 'c', 'k', 'c', 'r', 'a', 'f', 't', '.', 'n', 'e', 't', '\0',
   /* "hackenkunjeleren.nl", true */ 'h', 'a', 'c', 'k', 'e', 'n', 'k', 'u', 'n', 'j', 'e', 'l', 'e', 'r', 'e', 'n', '.', 'n', 'l', '\0',
   /* "hackenturet.dk", true */ 'h', 'a', 'c', 'k', 'e', 'n', 't', 'u', 'r', 'e', 't', '.', 'd', 'k', '\0',
-  /* "hacker.parts", true */ 'h', 'a', 'c', 'k', 'e', 'r', '.', 'p', 'a', 'r', 't', 's', '\0',
   /* "hacker1.com", true */ 'h', 'a', 'c', 'k', 'e', 'r', '1', '.', 'c', 'o', 'm', '\0',
   /* "hackerchai.com", true */ 'h', 'a', 'c', 'k', 'e', 'r', 'c', 'h', 'a', 'i', '.', 'c', 'o', 'm', '\0',
   /* "hackernet.se", true */ 'h', 'a', 'c', 'k', 'e', 'r', 'n', 'e', 't', '.', 's', 'e', '\0',
@@ -5181,7 +5156,6 @@ static const char kSTSHostTable[] = {
   /* "hangouts.google.com", true */ 'h', 'a', 'n', 'g', 'o', 'u', 't', 's', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "hanimalis.fr", true */ 'h', 'a', 'n', 'i', 'm', 'a', 'l', 'i', 's', '.', 'f', 'r', '\0',
   /* "hans-natur.de", true */ 'h', 'a', 'n', 's', '-', 'n', 'a', 't', 'u', 'r', '.', 'd', 'e', '\0',
-  /* "hansen.hn", true */ 'h', 'a', 'n', 's', 'e', 'n', '.', 'h', 'n', '\0',
   /* "hansvaneijsden.com", true */ 'h', 'a', 'n', 's', 'v', 'a', 'n', 'e', 'i', 'j', 's', 'd', 'e', 'n', '.', 'c', 'o', 'm', '\0',
   /* "hansvaneijsden.nl", true */ 'h', 'a', 'n', 's', 'v', 'a', 'n', 'e', 'i', 'j', 's', 'd', 'e', 'n', '.', 'n', 'l', '\0',
   /* "hantse.com", true */ 'h', 'a', 'n', 't', 's', 'e', '.', 'c', 'o', 'm', '\0',
@@ -5197,7 +5171,6 @@ static const char kSTSHostTable[] = {
   /* "happist.com", true */ 'h', 'a', 'p', 'p', 'i', 's', 't', '.', 'c', 'o', 'm', '\0',
   /* "happix.nl", true */ 'h', 'a', 'p', 'p', 'i', 'x', '.', 'n', 'l', '\0',
   /* "happyandrelaxeddogs.eu", true */ 'h', 'a', 'p', 'p', 'y', 'a', 'n', 'd', 'r', 'e', 'l', 'a', 'x', 'e', 'd', 'd', 'o', 'g', 's', '.', 'e', 'u', '\0',
-  /* "happycoder.net", false */ 'h', 'a', 'p', 'p', 'y', 'c', 'o', 'd', 'e', 'r', '.', 'n', 'e', 't', '\0',
   /* "happygastro.com", true */ 'h', 'a', 'p', 'p', 'y', 'g', 'a', 's', 't', 'r', 'o', '.', 'c', 'o', 'm', '\0',
   /* "happylifestyle.com", true */ 'h', 'a', 'p', 'p', 'y', 'l', 'i', 'f', 'e', 's', 't', 'y', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "happyteamlabs.com", true */ 'h', 'a', 'p', 'p', 'y', 't', 'e', 'a', 'm', 'l', 'a', 'b', 's', '.', 'c', 'o', 'm', '\0',
@@ -5217,7 +5190,6 @@ static const char kSTSHostTable[] = {
   /* "harringtonca.com", true */ 'h', 'a', 'r', 'r', 'i', 'n', 'g', 't', 'o', 'n', 'c', 'a', '.', 'c', 'o', 'm', '\0',
   /* "harrisonsand.com", false */ 'h', 'a', 'r', 'r', 'i', 's', 'o', 'n', 's', 'a', 'n', 'd', '.', 'c', 'o', 'm', '\0',
   /* "harrisonsdirect.co.uk", true */ 'h', 'a', 'r', 'r', 'i', 's', 'o', 'n', 's', 'd', 'i', 'r', 'e', 'c', 't', '.', 'c', 'o', '.', 'u', 'k', '\0',
-  /* "harrisonswebsites.com", true */ 'h', 'a', 'r', 'r', 'i', 's', 'o', 'n', 's', 'w', 'e', 'b', 's', 'i', 't', 'e', 's', '.', 'c', 'o', 'm', '\0',
   /* "harrysmallbones.co.uk", true */ 'h', 'a', 'r', 'r', 'y', 's', 'm', 'a', 'l', 'l', 'b', 'o', 'n', 'e', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "hartie95.de", true */ 'h', 'a', 'r', 't', 'i', 'e', '9', '5', '.', 'd', 'e', '\0',
   /* "hartlep.email", true */ 'h', 'a', 'r', 't', 'l', 'e', 'p', '.', 'e', 'm', 'a', 'i', 'l', '\0',
@@ -5398,7 +5370,6 @@ static const char kSTSHostTable[] = {
   /* "hilti.lv", false */ 'h', 'i', 'l', 't', 'i', '.', 'l', 'v', '\0',
   /* "hintergedanken.com", true */ 'h', 'i', 'n', 't', 'e', 'r', 'g', 'e', 'd', 'a', 'n', 'k', 'e', 'n', '.', 'c', 'o', 'm', '\0',
   /* "hintergrundbewegung.de", true */ 'h', 'i', 'n', 't', 'e', 'r', 'g', 'r', 'u', 'n', 'd', 'b', 'e', 'w', 'e', 'g', 'u', 'n', 'g', '.', 'd', 'e', '\0',
-  /* "hippies.com.br", true */ 'h', 'i', 'p', 'p', 'i', 'e', 's', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "hipstercat.fr", true */ 'h', 'i', 'p', 's', 't', 'e', 'r', 'c', 'a', 't', '.', 'f', 'r', '\0',
   /* "hiqfleet.co.uk", true */ 'h', 'i', 'q', 'f', 'l', 'e', 'e', 't', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "hiqfranchise.co.uk", true */ 'h', 'i', 'q', 'f', 'r', 'a', 'n', 'c', 'h', 'i', 's', 'e', '.', 'c', 'o', '.', 'u', 'k', '\0',
@@ -5418,7 +5389,6 @@ static const char kSTSHostTable[] = {
   /* "hjw-kunstwerk.de", true */ 'h', 'j', 'w', '-', 'k', 'u', 'n', 's', 't', 'w', 'e', 'r', 'k', '.', 'd', 'e', '\0',
   /* "hk.search.yahoo.com", false */ 'h', 'k', '.', 's', 'e', 'a', 'r', 'c', 'h', '.', 'y', 'a', 'h', 'o', 'o', '.', 'c', 'o', 'm', '\0',
   /* "hkdobrev.com", true */ 'h', 'k', 'd', 'o', 'b', 'r', 'e', 'v', '.', 'c', 'o', 'm', '\0',
-  /* "hlavacek.us", true */ 'h', 'l', 'a', 'v', 'a', 'c', 'e', 'k', '.', 'u', 's', '\0',
   /* "hledejlevne.cz", true */ 'h', 'l', 'e', 'd', 'e', 'j', 'l', 'e', 'v', 'n', 'e', '.', 'c', 'z', '\0',
   /* "hledejpravnika.cz", true */ 'h', 'l', 'e', 'd', 'e', 'j', 'p', 'r', 'a', 'v', 'n', 'i', 'k', 'a', '.', 'c', 'z', '\0',
   /* "hlfh.space", true */ 'h', 'l', 'f', 'h', '.', 's', 'p', 'a', 'c', 'e', '\0',
@@ -5594,6 +5564,7 @@ static const char kSTSHostTable[] = {
   /* "hwag-pb.de", true */ 'h', 'w', 'a', 'g', '-', 'p', 'b', '.', 'd', 'e', '\0',
   /* "hx53.de", true */ 'h', 'x', '5', '3', '.', 'd', 'e', '\0',
   /* "hxying.com", true */ 'h', 'x', 'y', 'i', 'n', 'g', '.', 'c', 'o', 'm', '\0',
+  /* "hycken.com", true */ 'h', 'y', 'c', 'k', 'e', 'n', '.', 'c', 'o', 'm', '\0',
   /* "hydrocloud.net", true */ 'h', 'y', 'd', 'r', 'o', 'c', 'l', 'o', 'u', 'd', '.', 'n', 'e', 't', '\0',
   /* "hydrozone.fr", true */ 'h', 'y', 'd', 'r', 'o', 'z', 'o', 'n', 'e', '.', 'f', 'r', '\0',
   /* "hyk.me", true */ 'h', 'y', 'k', '.', 'm', 'e', '\0',
@@ -5637,7 +5608,6 @@ static const char kSTSHostTable[] = {
   /* "icloud.net", true */ 'i', 'c', 'l', 'o', 'u', 'd', '.', 'n', 'e', 't', '\0',
   /* "icntorrent.download", true */ 'i', 'c', 'n', 't', 'o', 'r', 'r', 'e', 'n', 't', '.', 'd', 'o', 'w', 'n', 'l', 'o', 'a', 'd', '\0',
   /* "icodeconnect.com", true */ 'i', 'c', 'o', 'd', 'e', 'c', 'o', 'n', 'n', 'e', 'c', 't', '.', 'c', 'o', 'm', '\0',
-  /* "icpc2016.in.th", true */ 'i', 'c', 'p', 'c', '2', '0', '1', '6', '.', 'i', 'n', '.', 't', 'h', '\0',
   /* "icq-project.net", true */ 'i', 'c', 'q', '-', 'p', 'r', 'o', 'j', 'e', 'c', 't', '.', 'n', 'e', 't', '\0',
   /* "ict-concept.nl", false */ 'i', 'c', 't', '-', 'c', 'o', 'n', 'c', 'e', 'p', 't', '.', 'n', 'l', '\0',
   /* "ictinforensics.org", true */ 'i', 'c', 't', 'i', 'n', 'f', 'o', 'r', 'e', 'n', 's', 'i', 'c', 's', '.', 'o', 'r', 'g', '\0',
@@ -5650,7 +5620,6 @@ static const char kSTSHostTable[] = {
   /* "idahoansforliberty.net", true */ 'i', 'd', 'a', 'h', 'o', 'a', 'n', 's', 'f', 'o', 'r', 'l', 'i', 'b', 'e', 'r', 't', 'y', '.', 'n', 'e', 't', '\0',
   /* "idaspis.com", true */ 'i', 'd', 'a', 's', 'p', 'i', 's', '.', 'c', 'o', 'm', '\0',
   /* "idconsult.nl", true */ 'i', 'd', 'c', 'o', 'n', 's', 'u', 'l', 't', '.', 'n', 'l', '\0',
-  /* "idcrane.com", true */ 'i', 'd', 'c', 'r', 'a', 'n', 'e', '.', 'c', 'o', 'm', '\0',
   /* "ideadozz.hu", true */ 'i', 'd', 'e', 'a', 'd', 'o', 'z', 'z', '.', 'h', 'u', '\0',
   /* "ideaweb.de", true */ 'i', 'd', 'e', 'a', 'w', 'e', 'b', '.', 'd', 'e', '\0',
   /* "idecode.net", true */ 'i', 'd', 'e', 'c', 'o', 'd', 'e', '.', 'n', 'e', 't', '\0',
@@ -5678,7 +5647,6 @@ static const char kSTSHostTable[] = {
   /* "ifconfig.co", true */ 'i', 'f', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', '\0',
   /* "iflare.de", true */ 'i', 'f', 'l', 'a', 'r', 'e', '.', 'd', 'e', '\0',
   /* "iformbuilder.com", false */ 'i', 'f', 'o', 'r', 'm', 'b', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'c', 'o', 'm', '\0',
-  /* "ifoss.me", true */ 'i', 'f', 'o', 's', 's', '.', 'm', 'e', '\0',
   /* "ifsac.org", true */ 'i', 'f', 's', 'a', 'c', '.', 'o', 'r', 'g', '\0',
   /* "ifsr.de", true */ 'i', 'f', 's', 'r', '.', 'd', 'e', '\0',
   /* "iftrue.de", true */ 'i', 'f', 't', 'r', 'u', 'e', '.', 'd', 'e', '\0',
@@ -5788,7 +5756,6 @@ static const char kSTSHostTable[] = {
   /* "indievelopment.nl", true */ 'i', 'n', 'd', 'i', 'e', 'v', 'e', 'l', 'o', 'p', 'm', 'e', 'n', 't', '.', 'n', 'l', '\0',
   /* "indigosakura.com", true */ 'i', 'n', 'd', 'i', 'g', 'o', 's', 'a', 'k', 'u', 'r', 'a', '.', 'c', 'o', 'm', '\0',
   /* "inditip.com", true */ 'i', 'n', 'd', 'i', 't', 'i', 'p', '.', 'c', 'o', 'm', '\0',
-  /* "indovinabank.com.vn", true */ 'i', 'n', 'd', 'o', 'v', 'i', 'n', 'a', 'b', 'a', 'n', 'k', '.', 'c', 'o', 'm', '.', 'v', 'n', '\0',
   /* "indredouglas.me", true */ 'i', 'n', 'd', 'r', 'e', 'd', 'o', 'u', 'g', 'l', 'a', 's', '.', 'm', 'e', '\0',
   /* "indusfastremit-ca.com", true */ 'i', 'n', 'd', 'u', 's', 'f', 'a', 's', 't', 'r', 'e', 'm', 'i', 't', '-', 'c', 'a', '.', 'c', 'o', 'm', '\0',
   /* "indusfastremit-us.com", true */ 'i', 'n', 'd', 'u', 's', 'f', 'a', 's', 't', 'r', 'e', 'm', 'i', 't', '-', 'u', 's', '.', 'c', 'o', 'm', '\0',
@@ -5805,7 +5772,6 @@ static const char kSTSHostTable[] = {
   /* "influxus.com", false */ 'i', 'n', 'f', 'l', 'u', 'x', 'u', 's', '.', 'c', 'o', 'm', '\0',
   /* "infmed.com", true */ 'i', 'n', 'f', 'm', 'e', 'd', '.', 'c', 'o', 'm', '\0',
   /* "info-beamer.com", true */ 'i', 'n', 'f', 'o', '-', 'b', 'e', 'a', 'm', 'e', 'r', '.', 'c', 'o', 'm', '\0',
-  /* "info-screw.com", true */ 'i', 'n', 'f', 'o', '-', 's', 'c', 'r', 'e', 'w', '.', 'c', 'o', 'm', '\0',
   /* "infocommsociety.com", true */ 'i', 'n', 'f', 'o', 'c', 'o', 'm', 'm', 's', 'o', 'c', 'i', 'e', 't', 'y', '.', 'c', 'o', 'm', '\0',
   /* "informatiebeveiliging.nl", true */ 'i', 'n', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'e', 'b', 'e', 'v', 'e', 'i', 'l', 'i', 'g', 'i', 'n', 'g', '.', 'n', 'l', '\0',
   /* "informatik.zone", true */ 'i', 'n', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'k', '.', 'z', 'o', 'n', 'e', '\0',
@@ -5829,12 +5795,12 @@ static const char kSTSHostTable[] = {
   /* "inline-sport.cz", true */ 'i', 'n', 'l', 'i', 'n', 'e', '-', 's', 'p', 'o', 'r', 't', '.', 'c', 'z', '\0',
   /* "innermostparts.org", true */ 'i', 'n', 'n', 'e', 'r', 'm', 'o', 's', 't', 'p', 'a', 'r', 't', 's', '.', 'o', 'r', 'g', '\0',
   /* "innoloop.com", true */ 'i', 'n', 'n', 'o', 'l', 'o', 'o', 'p', '.', 'c', 'o', 'm', '\0',
+  /* "innophate-security.com", true */ 'i', 'n', 'n', 'o', 'p', 'h', 'a', 't', 'e', '-', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '.', 'c', 'o', 'm', '\0',
   /* "innovaptor.at", true */ 'i', 'n', 'n', 'o', 'v', 'a', 'p', 't', 'o', 'r', '.', 'a', 't', '\0',
   /* "innovaptor.com", true */ 'i', 'n', 'n', 'o', 'v', 'a', 'p', 't', 'o', 'r', '.', 'c', 'o', 'm', '\0',
   /* "inoa8.com", true */ 'i', 'n', 'o', 'a', '8', '.', 'c', 'o', 'm', '\0',
   /* "inovatec.com", true */ 'i', 'n', 'o', 'v', 'a', 't', 'e', 'c', '.', 'c', 'o', 'm', '\0',
   /* "inquisitive.io", true */ 'i', 'n', 'q', 'u', 'i', 's', 'i', 't', 'i', 'v', 'e', '.', 'i', 'o', '\0',
-  /* "insane-bullets.com", true */ 'i', 'n', 's', 'a', 'n', 'e', '-', 'b', 'u', 'l', 'l', 'e', 't', 's', '.', 'c', 'o', 'm', '\0',
   /* "insertcoins.net", true */ 'i', 'n', 's', 'e', 'r', 't', 'c', 'o', 'i', 'n', 's', '.', 'n', 'e', 't', '\0',
   /* "insideaudit.com", true */ 'i', 'n', 's', 'i', 'd', 'e', 'a', 'u', 'd', 'i', 't', '.', 'c', 'o', 'm', '\0',
   /* "insightera.co.th", true */ 'i', 'n', 's', 'i', 'g', 'h', 't', 'e', 'r', 'a', '.', 'c', 'o', '.', 't', 'h', '\0',
@@ -5875,7 +5841,6 @@ static const char kSTSHostTable[] = {
   /* "interisaudit.com", true */ 'i', 'n', 't', 'e', 'r', 'i', 's', 'a', 'u', 'd', 'i', 't', '.', 'c', 'o', 'm', '\0',
   /* "interleucina.org", true */ 'i', 'n', 't', 'e', 'r', 'l', 'e', 'u', 'c', 'i', 'n', 'a', '.', 'o', 'r', 'g', '\0',
   /* "intermedinet.nl", true */ 'i', 'n', 't', 'e', 'r', 'm', 'e', 'd', 'i', 'n', 'e', 't', '.', 'n', 'l', '\0',
-  /* "internect.co.za", true */ 'i', 'n', 't', 'e', 'r', 'n', 'e', 'c', 't', '.', 'c', 'o', '.', 'z', 'a', '\0',
   /* "internet-pornografie.de", true */ 'i', 'n', 't', 'e', 'r', 'n', 'e', 't', '-', 'p', 'o', 'r', 'n', 'o', 'g', 'r', 'a', 'f', 'i', 'e', '.', 'd', 'e', '\0',
   /* "internetbank.swedbank.se", true */ 'i', 'n', 't', 'e', 'r', 'n', 'e', 't', 'b', 'a', 'n', 'k', '.', 's', 'w', 'e', 'd', 'b', 'a', 'n', 'k', '.', 's', 'e', '\0',
   /* "internetbugbounty.org", true */ 'i', 'n', 't', 'e', 'r', 'n', 'e', 't', 'b', 'u', 'g', 'b', 'o', 'u', 'n', 't', 'y', '.', 'o', 'r', 'g', '\0',
@@ -6008,6 +5973,7 @@ static const char kSTSHostTable[] = {
   /* "issforum.org", true */ 'i', 's', 's', 'f', 'o', 'r', 'u', 'm', '.', 'o', 'r', 'g', '\0',
   /* "isslshop.com", true */ 'i', 's', 's', 'l', 's', 'h', 'o', 'p', '.', 'c', 'o', 'm', '\0',
   /* "issuesofconcern.in", true */ 'i', 's', 's', 'u', 'e', 's', 'o', 'f', 'c', 'o', 'n', 'c', 'e', 'r', 'n', '.', 'i', 'n', '\0',
+  /* "istanbul.systems", true */ 'i', 's', 't', 'a', 'n', 'b', 'u', 'l', '.', 's', 'y', 's', 't', 'e', 'm', 's', '\0',
   /* "istdieweltschonuntergegangen.de", true */ 'i', 's', 't', 'd', 'i', 'e', 'w', 'e', 'l', 't', 's', 'c', 'h', 'o', 'n', 'u', 'n', 't', 'e', 'r', 'g', 'e', 'g', 'a', 'n', 'g', 'e', 'n', '.', 'd', 'e', '\0',
   /* "isteinbaby.de", true */ 'i', 's', 't', 'e', 'i', 'n', 'b', 'a', 'b', 'y', '.', 'd', 'e', '\0',
   /* "istgame.com", true */ 'i', 's', 't', 'g', 'a', 'm', 'e', '.', 'c', 'o', 'm', '\0',
@@ -6141,7 +6107,6 @@ static const char kSTSHostTable[] = {
   /* "jamesmilazzo.com", true */ 'j', 'a', 'm', 'e', 's', 'm', 'i', 'l', 'a', 'z', 'z', 'o', '.', 'c', 'o', 'm', '\0',
   /* "jamesrains.com", true */ 'j', 'a', 'm', 'e', 's', 'r', 'a', 'i', 'n', 's', '.', 'c', 'o', 'm', '\0',
   /* "jamesrussellward.co.uk", true */ 'j', 'a', 'm', 'e', 's', 'r', 'u', 's', 's', 'e', 'l', 'l', 'w', 'a', 'r', 'd', '.', 'c', 'o', '.', 'u', 'k', '\0',
-  /* "jamessan.com", true */ 'j', 'a', 'm', 'e', 's', 's', 'a', 'n', '.', 'c', 'o', 'm', '\0',
   /* "jamessmith.me.uk", true */ 'j', 'a', 'm', 'e', 's', 's', 'm', 'i', 't', 'h', '.', 'm', 'e', '.', 'u', 'k', '\0',
   /* "jamielinux.com", true */ 'j', 'a', 'm', 'i', 'e', 'l', 'i', 'n', 'u', 'x', '.', 'c', 'o', 'm', '\0',
   /* "jamiemagee.co.uk", true */ 'j', 'a', 'm', 'i', 'e', 'm', 'a', 'g', 'e', 'e', '.', 'c', 'o', '.', 'u', 'k', '\0',
@@ -6149,7 +6114,6 @@ static const char kSTSHostTable[] = {
   /* "jamiepeters.nl", true */ 'j', 'a', 'm', 'i', 'e', 'p', 'e', 't', 'e', 'r', 's', '.', 'n', 'l', '\0',
   /* "jamon.ca", true */ 'j', 'a', 'm', 'o', 'n', '.', 'c', 'a', '\0',
   /* "jamonsilva.com", true */ 'j', 'a', 'm', 'o', 'n', 's', 'i', 'l', 'v', 'a', '.', 'c', 'o', 'm', '\0',
-  /* "jan-and-maaret.de", true */ 'j', 'a', 'n', '-', 'a', 'n', 'd', '-', 'm', 'a', 'a', 'r', 'e', 't', '.', 'd', 'e', '\0',
   /* "jan-cermak.cz", true */ 'j', 'a', 'n', '-', 'c', 'e', 'r', 'm', 'a', 'k', '.', 'c', 'z', '\0',
   /* "janik.xyz", true */ 'j', 'a', 'n', 'i', 'k', '.', 'x', 'y', 'z', '\0',
   /* "jankoepsel.com", true */ 'j', 'a', 'n', 'k', 'o', 'e', 'p', 's', 'e', 'l', '.', 'c', 'o', 'm', '\0',
@@ -6162,6 +6126,7 @@ static const char kSTSHostTable[] = {
   /* "japan-foods.co.uk", true */ 'j', 'a', 'p', 'a', 'n', '-', 'f', 'o', 'o', 'd', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "japan4you.org", true */ 'j', 'a', 'p', 'a', 'n', '4', 'y', 'o', 'u', '.', 'o', 'r', 'g', '\0',
   /* "japaniac.de", true */ 'j', 'a', 'p', 'a', 'n', 'i', 'a', 'c', '.', 'd', 'e', '\0',
+  /* "jardins-utopie.net", true */ 'j', 'a', 'r', 'd', 'i', 'n', 's', '-', 'u', 't', 'o', 'p', 'i', 'e', '.', 'n', 'e', 't', '\0',
   /* "jaredbates.net", false */ 'j', 'a', 'r', 'e', 'd', 'b', 'a', 't', 'e', 's', '.', 'n', 'e', 't', '\0',
   /* "jaredfernandez.com", true */ 'j', 'a', 'r', 'e', 'd', 'f', 'e', 'r', 'n', 'a', 'n', 'd', 'e', 'z', '.', 'c', 'o', 'm', '\0',
   /* "jarl.ninja", true */ 'j', 'a', 'r', 'l', '.', 'n', 'i', 'n', 'j', 'a', '\0',
@@ -6188,7 +6153,6 @@ static const char kSTSHostTable[] = {
   /* "jbfp.dk", true */ 'j', 'b', 'f', 'p', '.', 'd', 'k', '\0',
   /* "jcaicedo.tk", true */ 'j', 'c', 'a', 'i', 'c', 'e', 'd', 'o', '.', 't', 'k', '\0',
   /* "jccrew.org", true */ 'j', 'c', 'c', 'r', 'e', 'w', '.', 'o', 'r', 'g', '\0',
-  /* "jcoscia.com", true */ 'j', 'c', 'o', 's', 'c', 'i', 'a', '.', 'c', 'o', 'm', '\0',
   /* "jcraft.us", true */ 'j', 'c', 'r', 'a', 'f', 't', '.', 'u', 's', '\0',
   /* "jcyz.cf", true */ 'j', 'c', 'y', 'z', '.', 'c', 'f', '\0',
   /* "jdav-leipzig.de", true */ 'j', 'd', 'a', 'v', '-', 'l', 'e', 'i', 'p', 'z', 'i', 'g', '.', 'd', 'e', '\0',
@@ -6218,6 +6182,7 @@ static const char kSTSHostTable[] = {
   /* "jennifersauer.nl", true */ 'j', 'e', 'n', 'n', 'i', 'f', 'e', 'r', 's', 'a', 'u', 'e', 'r', '.', 'n', 'l', '\0',
   /* "jennybeaned.com", true */ 'j', 'e', 'n', 'n', 'y', 'b', 'e', 'a', 'n', 'e', 'd', '.', 'c', 'o', 'm', '\0',
   /* "jennythebaker.com", false */ 'j', 'e', 'n', 'n', 'y', 't', 'h', 'e', 'b', 'a', 'k', 'e', 'r', '.', 'c', 'o', 'm', '\0',
+  /* "jensrex.dk", true */ 'j', 'e', 'n', 's', 'r', 'e', 'x', '.', 'd', 'k', '\0',
   /* "jeproteste.info", true */ 'j', 'e', 'p', 'r', 'o', 't', 'e', 's', 't', 'e', '.', 'i', 'n', 'f', 'o', '\0',
   /* "jeremiahbenes.com", true */ 'j', 'e', 'r', 'e', 'm', 'i', 'a', 'h', 'b', 'e', 'n', 'e', 's', '.', 'c', 'o', 'm', '\0',
   /* "jeremyness.com", true */ 'j', 'e', 'r', 'e', 'm', 'y', 'n', 'e', 's', 's', '.', 'c', 'o', 'm', '\0',
@@ -6334,6 +6299,7 @@ static const char kSTSHostTable[] = {
   /* "jornane.no", true */ 'j', 'o', 'r', 'n', 'a', 'n', 'e', '.', 'n', 'o', '\0',
   /* "josefjanosec.com", true */ 'j', 'o', 's', 'e', 'f', 'j', 'a', 'n', 'o', 's', 'e', 'c', '.', 'c', 'o', 'm', '\0',
   /* "josephrees.uk", true */ 'j', 'o', 's', 'e', 'p', 'h', 'r', 'e', 'e', 's', '.', 'u', 'k', '\0',
+  /* "joshgrancell.com", false */ 'j', 'o', 's', 'h', 'g', 'r', 'a', 'n', 'c', 'e', 'l', 'l', '.', 'c', 'o', 'm', '\0',
   /* "joshharmon.me", true */ 'j', 'o', 's', 'h', 'h', 'a', 'r', 'm', 'o', 'n', '.', 'm', 'e', '\0',
   /* "joshi.su", true */ 'j', 'o', 's', 'h', 'i', '.', 's', 'u', '\0',
   /* "joshtriplett.org", true */ 'j', 'o', 's', 'h', 't', 'r', 'i', 'p', 'l', 'e', 't', 't', '.', 'o', 'r', 'g', '\0',
@@ -6378,6 +6344,7 @@ static const char kSTSHostTable[] = {
   /* "jultube.de", true */ 'j', 'u', 'l', 't', 'u', 'b', 'e', '.', 'd', 'e', '\0',
   /* "jumba.com.au", true */ 'j', 'u', 'm', 'b', 'a', '.', 'c', 'o', 'm', '.', 'a', 'u', '\0',
   /* "jump.bg", true */ 'j', 'u', 'm', 'p', '.', 'b', 'g', '\0',
+  /* "jump.wtf", true */ 'j', 'u', 'm', 'p', '.', 'w', 't', 'f', '\0',
   /* "junaos.com", true */ 'j', 'u', 'n', 'a', 'o', 's', '.', 'c', 'o', 'm', '\0',
   /* "jungesforumkonstanz.de", true */ 'j', 'u', 'n', 'g', 'e', 's', 'f', 'o', 'r', 'u', 'm', 'k', 'o', 'n', 's', 't', 'a', 'n', 'z', '.', 'd', 'e', '\0',
   /* "junglist.org", true */ 'j', 'u', 'n', 'g', 'l', 'i', 's', 't', '.', 'o', 'r', 'g', '\0',
@@ -6402,7 +6369,6 @@ static const char kSTSHostTable[] = {
   /* "jym.fit", true */ 'j', 'y', 'm', '.', 'f', 'i', 't', '\0',
   /* "jyoti-fairworks.org", true */ 'j', 'y', 'o', 't', 'i', '-', 'f', 'a', 'i', 'r', 'w', 'o', 'r', 'k', 's', '.', 'o', 'r', 'g', '\0',
   /* "jysperm.me", true */ 'j', 'y', 's', 'p', 'e', 'r', 'm', '.', 'm', 'e', '\0',
-  /* "jznet.org", true */ 'j', 'z', 'n', 'e', 't', '.', 'o', 'r', 'g', '\0',
   /* "k-netz.de", true */ 'k', '-', 'n', 'e', 't', 'z', '.', 'd', 'e', '\0',
   /* "k-tube.com", true */ 'k', '-', 't', 'u', 'b', 'e', '.', 'c', 'o', 'm', '\0',
   /* "k2mts.org", true */ 'k', '2', 'm', 't', 's', '.', 'o', 'r', 'g', '\0',
@@ -6552,6 +6518,7 @@ static const char kSTSHostTable[] = {
   /* "kennethaasan.no", true */ 'k', 'e', 'n', 'n', 'e', 't', 'h', 'a', 'a', 's', 'a', 'n', '.', 'n', 'o', '\0',
   /* "kennethlim.me", true */ 'k', 'e', 'n', 'n', 'e', 't', 'h', 'l', 'i', 'm', '.', 'm', 'e', '\0',
   /* "kenny-peck.com", true */ 'k', 'e', 'n', 'n', 'y', '-', 'p', 'e', 'c', 'k', '.', 'c', 'o', 'm', '\0',
+  /* "kenoschwalb.com", true */ 'k', 'e', 'n', 'o', 's', 'c', 'h', 'w', 'a', 'l', 'b', '.', 'c', 'o', 'm', '\0',
   /* "kentacademiestrust.org.uk", true */ 'k', 'e', 'n', 't', 'a', 'c', 'a', 'd', 'e', 'm', 'i', 'e', 's', 't', 'r', 'u', 's', 't', '.', 'o', 'r', 'g', '.', 'u', 'k', '\0',
   /* "kentec.net", true */ 'k', 'e', 'n', 't', 'e', 'c', '.', 'n', 'e', 't', '\0',
   /* "keops-spine.fr", true */ 'k', 'e', 'o', 'p', 's', '-', 's', 'p', 'i', 'n', 'e', '.', 'f', 'r', '\0',
@@ -6567,7 +6534,6 @@ static const char kSTSHostTable[] = {
   /* "kesteren.org", true */ 'k', 'e', 's', 't', 'e', 'r', 'e', 'n', '.', 'o', 'r', 'g', '\0',
   /* "ketosecology.co.uk", true */ 'k', 'e', 't', 'o', 's', 'e', 'c', 'o', 'l', 'o', 'g', 'y', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "kevinbowers.me", true */ 'k', 'e', 'v', 'i', 'n', 'b', 'o', 'w', 'e', 'r', 's', '.', 'm', 'e', '\0',
-  /* "kevinbusse.de", true */ 'k', 'e', 'v', 'i', 'n', 'b', 'u', 's', 's', 'e', '.', 'd', 'e', '\0',
   /* "kevincox.ca", true */ 'k', 'e', 'v', 'i', 'n', 'c', 'o', 'x', '.', 'c', 'a', '\0',
   /* "kevindekoninck.com", false */ 'k', 'e', 'v', 'i', 'n', 'd', 'e', 'k', 'o', 'n', 'i', 'n', 'c', 'k', '.', 'c', 'o', 'm', '\0',
   /* "kevinmeijer.nl", true */ 'k', 'e', 'v', 'i', 'n', 'm', 'e', 'i', 'j', 'e', 'r', '.', 'n', 'l', '\0',
@@ -6775,10 +6741,10 @@ static const char kSTSHostTable[] = {
   /* "kpumuk.info", true */ 'k', 'p', 'u', 'm', 'u', 'k', '.', 'i', 'n', 'f', 'o', '\0',
   /* "kpvpn.com", true */ 'k', 'p', 'v', 'p', 'n', '.', 'c', 'o', 'm', '\0',
   /* "kpx1.de", true */ 'k', 'p', 'x', '1', '.', 'd', 'e', '\0',
+  /* "krachtinverbinding.nl", true */ 'k', 'r', 'a', 'c', 'h', 't', 'i', 'n', 'v', 'e', 'r', 'b', 'i', 'n', 'd', 'i', 'n', 'g', '.', 'n', 'l', '\0',
   /* "kradalby.no", true */ 'k', 'r', 'a', 'd', 'a', 'l', 'b', 'y', '.', 'n', 'o', '\0',
   /* "kraft.im", true */ 'k', 'r', 'a', 'f', 't', '.', 'i', 'm', '\0',
   /* "kraga.sk", true */ 'k', 'r', 'a', 'g', 'a', '.', 's', 'k', '\0',
-  /* "kraiwan.com", true */ 'k', 'r', 'a', 'i', 'w', 'a', 'n', '.', 'c', 'o', 'm', '\0',
   /* "kraiwon.com", true */ 'k', 'r', 'a', 'i', 'w', 'o', 'n', '.', 'c', 'o', 'm', '\0',
   /* "kraken.io", true */ 'k', 'r', 'a', 'k', 'e', 'n', '.', 'i', 'o', '\0',
   /* "kralik.xyz", true */ 'k', 'r', 'a', 'l', 'i', 'k', '.', 'x', 'y', 'z', '\0',
@@ -6802,6 +6768,7 @@ static const char kSTSHostTable[] = {
   /* "kriptosec.com", true */ 'k', 'r', 'i', 'p', 't', 'o', 's', 'e', 'c', '.', 'c', 'o', 'm', '\0',
   /* "krislamoureux.com", true */ 'k', 'r', 'i', 's', 'l', 'a', 'm', 'o', 'u', 'r', 'e', 'u', 'x', '.', 'c', 'o', 'm', '\0',
   /* "krisstarkey.co.uk", true */ 'k', 'r', 'i', 's', 's', 't', 'a', 'r', 'k', 'e', 'y', '.', 'c', 'o', '.', 'u', 'k', '\0',
+  /* "kristikala.nl", true */ 'k', 'r', 'i', 's', 't', 'i', 'k', 'a', 'l', 'a', '.', 'n', 'l', '\0',
   /* "kristinbailey.com", true */ 'k', 'r', 'i', 's', 't', 'i', 'n', 'b', 'a', 'i', 'l', 'e', 'y', '.', 'c', 'o', 'm', '\0',
   /* "kristofferkoch.com", true */ 'k', 'r', 'i', 's', 't', 'o', 'f', 'f', 'e', 'r', 'k', 'o', 'c', 'h', '.', 'c', 'o', 'm', '\0',
   /* "krizek.cc", true */ 'k', 'r', 'i', 'z', 'e', 'k', '.', 'c', 'c', '\0',
@@ -6863,7 +6830,6 @@ static const char kSTSHostTable[] = {
   /* "kwmr.me", true */ 'k', 'w', 'm', 'r', '.', 'm', 'e', '\0',
   /* "kwok.cc", true */ 'k', 'w', 'o', 'k', '.', 'c', 'c', '\0',
   /* "kwok.tv", true */ 'k', 'w', 'o', 'k', '.', 't', 'v', '\0',
-  /* "kwondratsch.com", true */ 'k', 'w', 'o', 'n', 'd', 'r', 'a', 't', 's', 'c', 'h', '.', 'c', 'o', 'm', '\0',
   /* "kybi.sk", true */ 'k', 'y', 'b', 'i', '.', 's', 'k', '\0',
   /* "kydara.com", true */ 'k', 'y', 'd', 'a', 'r', 'a', '.', 'c', 'o', 'm', '\0',
   /* "kykoonn.net", true */ 'k', 'y', 'k', 'o', 'o', 'n', 'n', '.', 'n', 'e', 't', '\0',
@@ -6904,6 +6870,7 @@ static const char kSTSHostTable[] = {
   /* "lagarderob.ru", false */ 'l', 'a', 'g', 'a', 'r', 'd', 'e', 'r', 'o', 'b', '.', 'r', 'u', '\0',
   /* "lagerauftrag.info", true */ 'l', 'a', 'g', 'e', 'r', 'a', 'u', 'f', 't', 'r', 'a', 'g', '.', 'i', 'n', 'f', 'o', '\0',
   /* "lagier.xyz", true */ 'l', 'a', 'g', 'i', 'e', 'r', '.', 'x', 'y', 'z', '\0',
+  /* "laglab.org", true */ 'l', 'a', 'g', 'l', 'a', 'b', '.', 'o', 'r', 'g', '\0',
   /* "laguiadelvaron.com", true */ 'l', 'a', 'g', 'u', 'i', 'a', 'd', 'e', 'l', 'v', 'a', 'r', 'o', 'n', '.', 'c', 'o', 'm', '\0',
   /* "laguinguette.fr", true */ 'l', 'a', 'g', 'u', 'i', 'n', 'g', 'u', 'e', 't', 't', 'e', '.', 'f', 'r', '\0',
   /* "lainchan.org", true */ 'l', 'a', 'i', 'n', 'c', 'h', 'a', 'n', '.', 'o', 'r', 'g', '\0',
@@ -7080,7 +7047,6 @@ static const char kSTSHostTable[] = {
   /* "lesformations.net", true */ 'l', 'e', 's', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'o', 'n', 's', '.', 'n', 'e', 't', '\0',
   /* "lesharris.com", true */ 'l', 'e', 's', 'h', 'a', 'r', 'r', 'i', 's', '.', 'c', 'o', 'm', '\0',
   /* "lesnet.co.uk", true */ 'l', 'e', 's', 'n', 'e', 't', '.', 'c', 'o', '.', 'u', 'k', '\0',
-  /* "lesperlesdunet.fr", true */ 'l', 'e', 's', 'p', 'e', 'r', 'l', 'e', 's', 'd', 'u', 'n', 'e', 't', '.', 'f', 'r', '\0',
   /* "lesscloud.com", true */ 'l', 'e', 's', 's', 'c', 'l', 'o', 'u', 'd', '.', 'c', 'o', 'm', '\0',
   /* "lessing.consulting", true */ 'l', 'e', 's', 's', 'i', 'n', 'g', '.', 'c', 'o', 'n', 's', 'u', 'l', 't', 'i', 'n', 'g', '\0',
   /* "let-go.cc", true */ 'l', 'e', 't', '-', 'g', 'o', '.', 'c', 'c', '\0',
@@ -7093,6 +7059,7 @@ static const char kSTSHostTable[] = {
   /* "levelum.com", true */ 'l', 'e', 'v', 'e', 'l', 'u', 'm', '.', 'c', 'o', 'm', '\0',
   /* "levendwater.org", true */ 'l', 'e', 'v', 'e', 'n', 'd', 'w', 'a', 't', 'e', 'r', '.', 'o', 'r', 'g', '\0',
   /* "levert.ch", true */ 'l', 'e', 'v', 'e', 'r', 't', '.', 'c', 'h', '\0',
+  /* "levinus.de", true */ 'l', 'e', 'v', 'i', 'n', 'u', 's', '.', 'd', 'e', '\0',
   /* "lew.im", true */ 'l', 'e', 'w', '.', 'i', 'm', '\0',
   /* "lewis.li", true */ 'l', 'e', 'w', 'i', 's', '.', 'l', 'i', '\0',
   /* "lewisjuggins.co.uk", true */ 'l', 'e', 'w', 'i', 's', 'j', 'u', 'g', 'g', 'i', 'n', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
@@ -7147,7 +7114,6 @@ static const char kSTSHostTable[] = {
   /* "limitededitioncomputers.com", true */ 'l', 'i', 'm', 'i', 't', 'e', 'd', 'e', 'd', 'i', 't', 'i', 'o', 'n', 'c', 'o', 'm', 'p', 'u', 't', 'e', 'r', 's', '.', 'c', 'o', 'm', '\0',
   /* "limitededitionsolutions.com", true */ 'l', 'i', 'm', 'i', 't', 'e', 'd', 'e', 'd', 'i', 't', 'i', 'o', 'n', 's', 'o', 'l', 'u', 't', 'i', 'o', 'n', 's', '.', 'c', 'o', 'm', '\0',
   /* "limpid.nl", true */ 'l', 'i', 'm', 'p', 'i', 'd', '.', 'n', 'l', '\0',
-  /* "lincolnwayflorist.com", true */ 'l', 'i', 'n', 'c', 'o', 'l', 'n', 'w', 'a', 'y', 'f', 'l', 'o', 'r', 'i', 's', 't', '.', 'c', 'o', 'm', '\0',
   /* "lindeskar.se", true */ 'l', 'i', 'n', 'd', 'e', 's', 'k', 'a', 'r', '.', 's', 'e', '\0',
   /* "lingerie.com.br", true */ 'l', 'i', 'n', 'g', 'e', 'r', 'i', 'e', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "lingolia.com", true */ 'l', 'i', 'n', 'g', 'o', 'l', 'i', 'a', '.', 'c', 'o', 'm', '\0',
@@ -7185,11 +7151,11 @@ static const char kSTSHostTable[] = {
   /* "linzgau.de", true */ 'l', 'i', 'n', 'z', 'g', 'a', 'u', '.', 'd', 'e', '\0',
   /* "liornavok.com", true */ 'l', 'i', 'o', 'r', 'n', 'a', 'v', 'o', 'k', '.', 'c', 'o', 'm', '\0',
   /* "liquid.cz", true */ 'l', 'i', 'q', 'u', 'i', 'd', '.', 'c', 'z', '\0',
-  /* "liquidcomm.net", true */ 'l', 'i', 'q', 'u', 'i', 'd', 'c', 'o', 'm', 'm', '.', 'n', 'e', 't', '\0',
   /* "lirion.de", true */ 'l', 'i', 'r', 'i', 'o', 'n', '.', 'd', 'e', '\0',
   /* "liris-beautywelt.de", true */ 'l', 'i', 'r', 'i', 's', '-', 'b', 'e', 'a', 'u', 't', 'y', 'w', 'e', 'l', 't', '.', 'd', 'e', '\0',
   /* "lisaco.de", true */ 'l', 'i', 's', 'a', 'c', 'o', '.', 'd', 'e', '\0',
   /* "lislan.org.uk", true */ 'l', 'i', 's', 'l', 'a', 'n', '.', 'o', 'r', 'g', '.', 'u', 'k', '\0',
+  /* "lisonfan.com", true */ 'l', 'i', 's', 'o', 'n', 'f', 'a', 'n', '.', 'c', 'o', 'm', '\0',
   /* "listahu.org", true */ 'l', 'i', 's', 't', 'a', 'h', 'u', '.', 'o', 'r', 'g', '\0',
   /* "lister-kirchweg.de", true */ 'l', 'i', 's', 't', 'e', 'r', '-', 'k', 'i', 'r', 'c', 'h', 'w', 'e', 'g', '.', 'd', 'e', '\0',
   /* "listminut.be", true */ 'l', 'i', 's', 't', 'm', 'i', 'n', 'u', 't', '.', 'b', 'e', '\0',
@@ -7237,6 +7203,7 @@ static const char kSTSHostTable[] = {
   /* "lmkts.com", true */ 'l', 'm', 'k', 't', 's', '.', 'c', 'o', 'm', '\0',
   /* "lmmtfy.io", true */ 'l', 'm', 'm', 't', 'f', 'y', '.', 'i', 'o', '\0',
   /* "lmsptfy.com", true */ 'l', 'm', 's', 'p', 't', 'f', 'y', '.', 'c', 'o', 'm', '\0',
+  /* "lnoldan.com", true */ 'l', 'n', 'o', 'l', 'd', 'a', 'n', '.', 'c', 'o', 'm', '\0',
   /* "lntu.org", true */ 'l', 'n', 't', 'u', '.', 'o', 'r', 'g', '\0',
   /* "lnx.li", true */ 'l', 'n', 'x', '.', 'l', 'i', '\0',
   /* "loacg.com", true */ 'l', 'o', 'a', 'c', 'g', '.', 'c', 'o', 'm', '\0',
@@ -7279,13 +7246,14 @@ static const char kSTSHostTable[] = {
   /* "logicsale.fr", true */ 'l', 'o', 'g', 'i', 'c', 's', 'a', 'l', 'e', '.', 'f', 'r', '\0',
   /* "logicsale.it", true */ 'l', 'o', 'g', 'i', 'c', 's', 'a', 'l', 'e', '.', 'i', 't', '\0',
   /* "login.corp.google.com", true */ 'l', 'o', 'g', 'i', 'n', '.', 'c', 'o', 'r', 'p', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o', 'm', '\0',
-  /* "login.gov", false */ 'l', 'o', 'g', 'i', 'n', '.', 'g', 'o', 'v', '\0',
+  /* "login.gov", true */ 'l', 'o', 'g', 'i', 'n', '.', 'g', 'o', 'v', '\0',
   /* "login.launchpad.net", true */ 'l', 'o', 'g', 'i', 'n', '.', 'l', 'a', 'u', 'n', 'c', 'h', 'p', 'a', 'd', '.', 'n', 'e', 't', '\0',
   /* "login.persona.org", true */ 'l', 'o', 'g', 'i', 'n', '.', 'p', 'e', 'r', 's', 'o', 'n', 'a', '.', 'o', 'r', 'g', '\0',
   /* "login.sapo.pt", true */ 'l', 'o', 'g', 'i', 'n', '.', 's', 'a', 'p', 'o', '.', 'p', 't', '\0',
   /* "login.ubuntu.com", true */ 'l', 'o', 'g', 'i', 'n', '.', 'u', 'b', 'u', 'n', 't', 'u', '.', 'c', 'o', 'm', '\0',
   /* "login.xero.com", false */ 'l', 'o', 'g', 'i', 'n', '.', 'x', 'e', 'r', 'o', '.', 'c', 'o', 'm', '\0',
   /* "login.yahoo.com", false */ 'l', 'o', 'g', 'i', 'n', '.', 'y', 'a', 'h', 'o', 'o', '.', 'c', 'o', 'm', '\0',
+  /* "logistify.com.mx", true */ 'l', 'o', 'g', 'i', 's', 't', 'i', 'f', 'y', '.', 'c', 'o', 'm', '.', 'm', 'x', '\0',
   /* "lognot.net", true */ 'l', 'o', 'g', 'n', 'o', 't', '.', 'n', 'e', 't', '\0',
   /* "logopaediereinhard.de", true */ 'l', 'o', 'g', 'o', 'p', 'a', 'e', 'd', 'i', 'e', 'r', 'e', 'i', 'n', 'h', 'a', 'r', 'd', '.', 'd', 'e', '\0',
   /* "logopoeia.com", true */ 'l', 'o', 'g', 'o', 'p', 'o', 'e', 'i', 'a', '.', 'c', 'o', 'm', '\0',
@@ -7320,6 +7288,7 @@ static const char kSTSHostTable[] = {
   /* "loteks.de", true */ 'l', 'o', 't', 'e', 'k', 's', '.', 'd', 'e', '\0',
   /* "lottosonline.com", true */ 'l', 'o', 't', 't', 'o', 's', 'o', 'n', 'l', 'i', 'n', 'e', '.', 'c', 'o', 'm', '\0',
   /* "loucanfixit.com", true */ 'l', 'o', 'u', 'c', 'a', 'n', 'f', 'i', 'x', 'i', 't', '.', 'c', 'o', 'm', '\0',
+  /* "louiewatch.com", true */ 'l', 'o', 'u', 'i', 'e', 'w', 'a', 't', 'c', 'h', '.', 'c', 'o', 'm', '\0',
   /* "louisvillevmug.info", true */ 'l', 'o', 'u', 'i', 's', 'v', 'i', 'l', 'l', 'e', 'v', 'm', 'u', 'g', '.', 'i', 'n', 'f', 'o', '\0',
   /* "loune.net", true */ 'l', 'o', 'u', 'n', 'e', '.', 'n', 'e', 't', '\0',
   /* "love-schna.jp", true */ 'l', 'o', 'v', 'e', '-', 's', 'c', 'h', 'n', 'a', '.', 'j', 'p', '\0',
@@ -7335,6 +7304,7 @@ static const char kSTSHostTable[] = {
   /* "loveismore.ru", true */ 'l', 'o', 'v', 'e', 'i', 's', 'm', 'o', 'r', 'e', '.', 'r', 'u', '\0',
   /* "loveismore.sk", true */ 'l', 'o', 'v', 'e', 'i', 's', 'm', 'o', 'r', 'e', '.', 's', 'k', '\0',
   /* "loveisourweapon.com", true */ 'l', 'o', 'v', 'e', 'i', 's', 'o', 'u', 'r', 'w', 'e', 'a', 'p', 'o', 'n', '.', 'c', 'o', 'm', '\0',
+  /* "lovelive.us", true */ 'l', 'o', 'v', 'e', 'l', 'i', 'v', 'e', '.', 'u', 's', '\0',
   /* "lovelivewiki.com", true */ 'l', 'o', 'v', 'e', 'l', 'i', 'v', 'e', 'w', 'i', 'k', 'i', '.', 'c', 'o', 'm', '\0',
   /* "lovemomiji.com", true */ 'l', 'o', 'v', 'e', 'm', 'o', 'm', 'i', 'j', 'i', '.', 'c', 'o', 'm', '\0',
   /* "lover-bg.com", true */ 'l', 'o', 'v', 'e', 'r', '-', 'b', 'g', '.', 'c', 'o', 'm', '\0',
@@ -7374,7 +7344,7 @@ static const char kSTSHostTable[] = {
   /* "lukasunger.cz", true */ 'l', 'u', 'k', 'a', 's', 'u', 'n', 'g', 'e', 'r', '.', 'c', 'z', '\0',
   /* "lukasunger.net", true */ 'l', 'u', 'k', 'a', 's', 'u', 'n', 'g', 'e', 'r', '.', 'n', 'e', 't', '\0',
   /* "lukaszdolan.com", true */ 'l', 'u', 'k', 'a', 's', 'z', 'd', 'o', 'l', 'a', 'n', '.', 'c', 'o', 'm', '\0',
-  /* "lukasztkacz.com", true */ 'l', 'u', 'k', 'a', 's', 'z', 't', 'k', 'a', 'c', 'z', '.', 'c', 'o', 'm', '\0',
+  /* "luke.ch", true */ 'l', 'u', 'k', 'e', '.', 'c', 'h', '\0',
   /* "lumd.me", true */ 'l', 'u', 'm', 'd', '.', 'm', 'e', '\0',
   /* "lumiere.com", true */ 'l', 'u', 'm', 'i', 'e', 'r', 'e', '.', 'c', 'o', 'm', '\0',
   /* "lunakit.org", true */ 'l', 'u', 'n', 'a', 'k', 'i', 't', '.', 'o', 'r', 'g', '\0',
@@ -7431,19 +7401,18 @@ static const char kSTSHostTable[] = {
   /* "m0wef.uk", true */ 'm', '0', 'w', 'e', 'f', '.', 'u', 'k', '\0',
   /* "m2epro.com", true */ 'm', '2', 'e', 'p', 'r', 'o', '.', 'c', 'o', 'm', '\0',
   /* "m2os.com", true */ 'm', '2', 'o', 's', '.', 'c', 'o', 'm', '\0',
-  /* "m2tc.fr", true */ 'm', '2', 't', 'c', '.', 'f', 'r', '\0',
   /* "ma2t.com", true */ 'm', 'a', '2', 't', '.', 'c', 'o', 'm', '\0',
   /* "maartenterpstra.xyz", true */ 'm', 'a', 'a', 'r', 't', 'e', 'n', 't', 'e', 'r', 'p', 's', 't', 'r', 'a', '.', 'x', 'y', 'z', '\0',
   /* "mac-torrents.me", true */ 'm', 'a', 'c', '-', 't', 'o', 'r', 'r', 'e', 'n', 't', 's', '.', 'm', 'e', '\0',
   /* "mac1.net", true */ 'm', 'a', 'c', '1', '.', 'n', 'e', 't', '\0',
   /* "macaque.io", false */ 'm', 'a', 'c', 'a', 'q', 'u', 'e', '.', 'i', 'o', '\0',
+  /* "macbolo.com", true */ 'm', 'a', 'c', 'b', 'o', 'l', 'o', '.', 'c', 'o', 'm', '\0',
   /* "macdj.tk", true */ 'm', 'a', 'c', 'd', 'j', '.', 't', 'k', '\0',
   /* "mach-politik.ch", true */ 'm', 'a', 'c', 'h', '-', 'p', 'o', 'l', 'i', 't', 'i', 'k', '.', 'c', 'h', '\0',
   /* "machbach.com", true */ 'm', 'a', 'c', 'h', 'b', 'a', 'c', 'h', '.', 'c', 'o', 'm', '\0',
   /* "machbach.net", true */ 'm', 'a', 'c', 'h', 'b', 'a', 'c', 'h', '.', 'n', 'e', 't', '\0',
   /* "machtweb.de", true */ 'm', 'a', 'c', 'h', 't', 'w', 'e', 'b', '.', 'd', 'e', '\0',
   /* "macinyasha.net", true */ 'm', 'a', 'c', 'i', 'n', 'y', 'a', 's', 'h', 'a', '.', 'n', 'e', 't', '\0',
-  /* "macker.io", true */ 'm', 'a', 'c', 'k', 'e', 'r', '.', 'i', 'o', '\0',
   /* "maclemon.at", true */ 'm', 'a', 'c', 'l', 'e', 'm', 'o', 'n', '.', 'a', 't', '\0',
   /* "macleod.io", true */ 'm', 'a', 'c', 'l', 'e', 'o', 'd', '.', 'i', 'o', '\0',
   /* "macnemo.de", true */ 'm', 'a', 'c', 'n', 'e', 'm', 'o', '.', 'd', 'e', '\0',
@@ -7487,7 +7456,6 @@ static const char kSTSHostTable[] = {
   /* "mailer-dot.de", true */ 'm', 'a', 'i', 'l', 'e', 'r', '-', 'd', 'o', 't', '.', 'd', 'e', '\0',
   /* "mailfence.com", true */ 'm', 'a', 'i', 'l', 'f', 'e', 'n', 'c', 'e', '.', 'c', 'o', 'm', '\0',
   /* "mailgarant.nl", true */ 'm', 'a', 'i', 'l', 'g', 'a', 'r', 'a', 'n', 't', '.', 'n', 'l', '\0',
-  /* "mailhost.it", true */ 'm', 'a', 'i', 'l', 'h', 'o', 's', 't', '.', 'i', 't', '\0',
   /* "mailinabox.email", true */ 'm', 'a', 'i', 'l', 'i', 'n', 'a', 'b', 'o', 'x', '.', 'e', 'm', 'a', 'i', 'l', '\0',
   /* "mailing-jbgg.com", true */ 'm', 'a', 'i', 'l', 'i', 'n', 'g', '-', 'j', 'b', 'g', 'g', '.', 'c', 'o', 'm', '\0',
   /* "mailmag.net", true */ 'm', 'a', 'i', 'l', 'm', 'a', 'g', '.', 'n', 'e', 't', '\0',
@@ -7526,7 +7494,6 @@ static const char kSTSHostTable[] = {
   /* "mall.sk", true */ 'm', 'a', 'l', 'l', '.', 's', 'k', '\0',
   /* "mallner.me", true */ 'm', 'a', 'l', 'l', 'n', 'e', 'r', '.', 'm', 'e', '\0',
   /* "malnex.de", true */ 'm', 'a', 'l', 'n', 'e', 'x', '.', 'd', 'e', '\0',
-  /* "maltes.website", true */ 'm', 'a', 'l', 't', 'e', 's', '.', 'w', 'e', 'b', 's', 'i', 't', 'e', '\0',
   /* "malware.watch", true */ 'm', 'a', 'l', 'w', 'a', 'r', 'e', '.', 'w', 'a', 't', 'c', 'h', '\0',
   /* "malwaretips.com", true */ 'm', 'a', 'l', 'w', 'a', 'r', 'e', 't', 'i', 'p', 's', '.', 'c', 'o', 'm', '\0',
   /* "mammaw.com", true */ 'm', 'a', 'm', 'm', 'a', 'w', '.', 'c', 'o', 'm', '\0',
@@ -7692,10 +7659,10 @@ static const char kSTSHostTable[] = {
   /* "maximelouet.me", true */ 'm', 'a', 'x', 'i', 'm', 'e', 'l', 'o', 'u', 'e', 't', '.', 'm', 'e', '\0',
   /* "maximilian-graf.de", true */ 'm', 'a', 'x', 'i', 'm', 'i', 'l', 'i', 'a', 'n', '-', 'g', 'r', 'a', 'f', '.', 'd', 'e', '\0',
   /* "maximilian-greger.com", true */ 'm', 'a', 'x', 'i', 'm', 'i', 'l', 'i', 'a', 'n', '-', 'g', 'r', 'e', 'g', 'e', 'r', '.', 'c', 'o', 'm', '\0',
-  /* "maximiliankrieg.de", true */ 'm', 'a', 'x', 'i', 'm', 'i', 'l', 'i', 'a', 'n', 'k', 'r', 'i', 'e', 'g', '.', 'd', 'e', '\0',
   /* "maxmilton.com", true */ 'm', 'a', 'x', 'm', 'i', 'l', 't', 'o', 'n', '.', 'c', 'o', 'm', '\0',
   /* "maxr1998.de", true */ 'm', 'a', 'x', 'r', '1', '9', '9', '8', '.', 'd', 'e', '\0',
   /* "maxserver.com", true */ 'm', 'a', 'x', 's', 'e', 'r', 'v', 'e', 'r', '.', 'c', 'o', 'm', '\0',
+  /* "maxtruxa.com", true */ 'm', 'a', 'x', 't', 'r', 'u', 'x', 'a', '.', 'c', 'o', 'm', '\0',
   /* "maxwell-english.co.jp", false */ 'm', 'a', 'x', 'w', 'e', 'l', 'l', '-', 'e', 'n', 'g', 'l', 'i', 's', 'h', '.', 'c', 'o', '.', 'j', 'p', '\0',
   /* "mayerbrownllz.com", true */ 'm', 'a', 'y', 'e', 'r', 'b', 'r', 'o', 'w', 'n', 'l', 'l', 'z', '.', 'c', 'o', 'm', '\0',
   /* "mazda-mps.de", true */ 'm', 'a', 'z', 'd', 'a', '-', 'm', 'p', 's', '.', 'd', 'e', '\0',
@@ -7782,7 +7749,6 @@ static const char kSTSHostTable[] = {
   /* "medzinenews.com", true */ 'm', 'e', 'd', 'z', 'i', 'n', 'e', 'n', 'e', 'w', 's', '.', 'c', 'o', 'm', '\0',
   /* "meedoenhartvanwestbrabant.nl", true */ 'm', 'e', 'e', 'd', 'o', 'e', 'n', 'h', 'a', 'r', 't', 'v', 'a', 'n', 'w', 'e', 's', 't', 'b', 'r', 'a', 'b', 'a', 'n', 't', '.', 'n', 'l', '\0',
   /* "meedoennoordkop.nl", false */ 'm', 'e', 'e', 'd', 'o', 'e', 'n', 'n', 'o', 'o', 'r', 'd', 'k', 'o', 'p', '.', 'n', 'l', '\0',
-  /* "meedoenzaanstad.nl", true */ 'm', 'e', 'e', 'd', 'o', 'e', 'n', 'z', 'a', 'a', 'n', 's', 't', 'a', 'd', '.', 'n', 'l', '\0',
   /* "meet.google.com", true */ 'm', 'e', 'e', 't', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "meetbot.fedoraproject.org", true */ 'm', 'e', 'e', 't', 'b', 'o', 't', '.', 'f', 'e', 'd', 'o', 'r', 'a', 'p', 'r', 'o', 'j', 'e', 'c', 't', '.', 'o', 'r', 'g', '\0',
   /* "meetfinch.com", true */ 'm', 'e', 'e', 't', 'f', 'i', 'n', 'c', 'h', '.', 'c', 'o', 'm', '\0',
@@ -8068,6 +8034,8 @@ static const char kSTSHostTable[] = {
   /* "mnium.de", true */ 'm', 'n', 'i', 'u', 'm', '.', 'd', 'e', '\0',
   /* "mnmt.no", true */ 'm', 'n', 'm', 't', '.', 'n', 'o', '\0',
   /* "mnsure.org", true */ 'm', 'n', 's', 'u', 'r', 'e', '.', 'o', 'r', 'g', '\0',
+  /* "mnt-tech.fr", true */ 'm', 'n', 't', '-', 't', 'e', 'c', 'h', '.', 'f', 'r', '\0',
+  /* "mnwt.nl", true */ 'm', 'n', 'w', 't', '.', 'n', 'l', '\0',
   /* "moar.so", true */ 'm', 'o', 'a', 'r', '.', 's', 'o', '\0',
   /* "mobaircon.com", true */ 'm', 'o', 'b', 'a', 'i', 'r', 'c', 'o', 'n', '.', 'c', 'o', 'm', '\0',
   /* "mobal.com", true */ 'm', 'o', 'b', 'a', 'l', '.', 'c', 'o', 'm', '\0',
@@ -8226,7 +8194,6 @@ static const char kSTSHostTable[] = {
   /* "mtg-tutor.de", true */ 'm', 't', 'g', '-', 't', 'u', 't', 'o', 'r', '.', 'd', 'e', '\0',
   /* "mthode.org", true */ 'm', 't', 'h', 'o', 'd', 'e', '.', 'o', 'r', 'g', '\0',
   /* "mths.be", false */ 'm', 't', 'h', 's', '.', 'b', 'e', '\0',
-  /* "mtn.cc", true */ 'm', 't', 'n', '.', 'c', 'c', '\0',
   /* "mtnz.co.za", true */ 'm', 't', 'n', 'z', '.', 'c', 'o', '.', 'z', 'a', '\0',
   /* "mtouch.facebook.com", false */ 'm', 't', 'o', 'u', 'c', 'h', '.', 'f', 'a', 'c', 'e', 'b', 'o', 'o', 'k', '.', 'c', 'o', 'm', '\0',
   /* "mtr.md", true */ 'm', 't', 'r', '.', 'm', 'd', '\0',
@@ -8353,12 +8320,10 @@ static const char kSTSHostTable[] = {
   /* "mysignal.com", true */ 'm', 'y', 's', 'i', 'g', 'n', 'a', 'l', '.', 'c', 'o', 'm', '\0',
   /* "mysmelly.com", true */ 'm', 'y', 's', 'm', 'e', 'l', 'l', 'y', '.', 'c', 'o', 'm', '\0',
   /* "mysoundtalks.com", true */ 'm', 'y', 's', 'o', 'u', 'n', 'd', 't', 'a', 'l', 'k', 's', '.', 'c', 'o', 'm', '\0',
-  /* "mystery-science-theater-3000.de", true */ 'm', 'y', 's', 't', 'e', 'r', 'y', '-', 's', 'c', 'i', 'e', 'n', 'c', 'e', '-', 't', 'h', 'e', 'a', 't', 'e', 'r', '-', '3', '0', '0', '0', '.', 'd', 'e', '\0',
   /* "mysticplumes.com", true */ 'm', 'y', 's', 't', 'i', 'c', 'p', 'l', 'u', 'm', 'e', 's', '.', 'c', 'o', 'm', '\0',
   /* "mytc.fr", true */ 'm', 'y', 't', 'c', '.', 'f', 'r', '\0',
   /* "mythengay.ch", true */ 'm', 'y', 't', 'h', 'e', 'n', 'g', 'a', 'y', '.', 'c', 'h', '\0',
   /* "mythlogic.com", true */ 'm', 'y', 't', 'h', 'l', 'o', 'g', 'i', 'c', '.', 'c', 'o', 'm', '\0',
-  /* "mythslegendscollection.com", true */ 'm', 'y', 't', 'h', 's', 'l', 'e', 'g', 'e', 'n', 'd', 's', 'c', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', '.', 'c', 'o', 'm', '\0',
   /* "mytraiteurs.com", true */ 'm', 'y', 't', 'r', 'a', 'i', 't', 'e', 'u', 'r', 's', '.', 'c', 'o', 'm', '\0',
   /* "mytripcar.co.uk", true */ 'm', 'y', 't', 'r', 'i', 'p', 'c', 'a', 'r', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "mytripcar.com", true */ 'm', 'y', 't', 'r', 'i', 'p', 'c', 'a', 'r', '.', 'c', 'o', 'm', '\0',
@@ -8420,7 +8385,6 @@ static const char kSTSHostTable[] = {
   /* "narodniki.com", true */ 'n', 'a', 'r', 'o', 'd', 'n', 'i', 'k', 'i', '.', 'c', 'o', 'm', '\0',
   /* "narthollis.net", true */ 'n', 'a', 'r', 't', 'h', 'o', 'l', 'l', 'i', 's', '.', 'n', 'e', 't', '\0',
   /* "nartuk.com.ua", false */ 'n', 'a', 'r', 't', 'u', 'k', '.', 'c', 'o', 'm', '.', 'u', 'a', '\0',
-  /* "nasreddine.xyz", true */ 'n', 'a', 's', 'r', 'e', 'd', 'd', 'i', 'n', 'e', '.', 'x', 'y', 'z', '\0',
   /* "nasrsolar.com", true */ 'n', 'a', 's', 'r', 's', 'o', 'l', 'a', 'r', '.', 'c', 'o', 'm', '\0',
   /* "nassi.me", true */ 'n', 'a', 's', 's', 'i', '.', 'm', 'e', '\0',
   /* "natalia-fadeeva.ru", true */ 'n', 'a', 't', 'a', 'l', 'i', 'a', '-', 'f', 'a', 'd', 'e', 'e', 'v', 'a', '.', 'r', 'u', '\0',
@@ -8482,6 +8446,7 @@ static const char kSTSHostTable[] = {
   /* "nefertitis.cz", true */ 'n', 'e', 'f', 'e', 'r', 't', 'i', 't', 'i', 's', '.', 'c', 'z', '\0',
   /* "neftebitum-kngk.ru", true */ 'n', 'e', 'f', 't', 'e', 'b', 'i', 't', 'u', 'm', '-', 'k', 'n', 'g', 'k', '.', 'r', 'u', '\0',
   /* "neg9.org", false */ 'n', 'e', 'g', '9', '.', 'o', 'r', 'g', '\0',
+  /* "negai.moe", true */ 'n', 'e', 'g', 'a', 'i', '.', 'm', 'o', 'e', '\0',
   /* "neglecteddiseases.gov", true */ 'n', 'e', 'g', 'l', 'e', 'c', 't', 'e', 'd', 'd', 'i', 's', 'e', 'a', 's', 'e', 's', '.', 'g', 'o', 'v', '\0',
   /* "neilgreen.net", true */ 'n', 'e', 'i', 'l', 'g', 'r', 'e', 'e', 'n', '.', 'n', 'e', 't', '\0',
   /* "neillans.co.uk", true */ 'n', 'e', 'i', 'l', 'l', 'a', 'n', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
@@ -8532,7 +8497,7 @@ static const char kSTSHostTable[] = {
   /* "netlilo.com", true */ 'n', 'e', 't', 'l', 'i', 'l', 'o', '.', 'c', 'o', 'm', '\0',
   /* "netloanusa.com", true */ 'n', 'e', 't', 'l', 'o', 'a', 'n', 'u', 's', 'a', '.', 'c', 'o', 'm', '\0',
   /* "netlocal.ru", true */ 'n', 'e', 't', 'l', 'o', 'c', 'a', 'l', '.', 'r', 'u', '\0',
-  /* "netmazk.net", true */ 'n', 'e', 't', 'm', 'a', 'z', 'k', '.', 'n', 'e', 't', '\0',
+  /* "netmazk.net", false */ 'n', 'e', 't', 'm', 'a', 'z', 'k', '.', 'n', 'e', 't', '\0',
   /* "netnodes.net", true */ 'n', 'e', 't', 'n', 'o', 'd', 'e', 's', '.', 'n', 'e', 't', '\0',
   /* "netprofile.com.au", true */ 'n', 'e', 't', 'p', 'r', 'o', 'f', 'i', 'l', 'e', '.', 'c', 'o', 'm', '.', 'a', 'u', '\0',
   /* "netraising.com", true */ 'n', 'e', 't', 'r', 'a', 'i', 's', 'i', 'n', 'g', '.', 'c', 'o', 'm', '\0',
@@ -8674,11 +8639,11 @@ static const char kSTSHostTable[] = {
   /* "nilrem.org", true */ 'n', 'i', 'l', 'r', 'e', 'm', '.', 'o', 'r', 'g', '\0',
   /* "nimeshjm.com", true */ 'n', 'i', 'm', 'e', 's', 'h', 'j', 'm', '.', 'c', 'o', 'm', '\0',
   /* "ninchat.com", true */ 'n', 'i', 'n', 'c', 'h', 'a', 't', '.', 'c', 'o', 'm', '\0',
-  /* "nine-hells.net", false */ 'n', 'i', 'n', 'e', '-', 'h', 'e', 'l', 'l', 's', '.', 'n', 'e', 't', '\0',
   /* "ninebennink.com", true */ 'n', 'i', 'n', 'e', 'b', 'e', 'n', 'n', 'i', 'n', 'k', '.', 'c', 'o', 'm', '\0',
   /* "ninespec.com", true */ 'n', 'i', 'n', 'e', 's', 'p', 'e', 'c', '.', 'c', 'o', 'm', '\0',
   /* "ninjan.co", true */ 'n', 'i', 'n', 'j', 'a', 'n', '.', 'c', 'o', '\0',
   /* "ninthfloor.org", true */ 'n', 'i', 'n', 't', 'h', 'f', 'l', 'o', 'o', 'r', '.', 'o', 'r', 'g', '\0',
+  /* "ninux.ch", false */ 'n', 'i', 'n', 'u', 'x', '.', 'c', 'h', '\0',
   /* "niouininon.eu", true */ 'n', 'i', 'o', 'u', 'i', 'n', 'i', 'n', 'o', 'n', '.', 'e', 'u', '\0',
   /* "nippon-oku.com", true */ 'n', 'i', 'p', 'p', 'o', 'n', '-', 'o', 'k', 'u', '.', 'c', 'o', 'm', '\0',
   /* "nippon.fr", true */ 'n', 'i', 'p', 'p', 'o', 'n', '.', 'f', 'r', '\0',
@@ -8723,11 +8688,9 @@ static const char kSTSHostTable[] = {
   /* "noodlesandwich.com", true */ 'n', 'o', 'o', 'd', 'l', 'e', 's', 'a', 'n', 'd', 'w', 'i', 'c', 'h', '.', 'c', 'o', 'm', '\0',
   /* "noop.ch", true */ 'n', 'o', 'o', 'p', '.', 'c', 'h', '\0',
   /* "noordsee.de", true */ 'n', 'o', 'o', 'r', 'd', 's', 'e', 'e', '.', 'd', 'e', '\0',
-  /* "norandom.com", true */ 'n', 'o', 'r', 'a', 'n', 'd', 'o', 'm', '.', 'c', 'o', 'm', '\0',
   /* "nord-sud.be", true */ 'n', 'o', 'r', 'd', '-', 's', 'u', 'd', '.', 'b', 'e', '\0',
   /* "nordiccasinocommunity.com", true */ 'n', 'o', 'r', 'd', 'i', 'c', 'c', 'a', 's', 'i', 'n', 'o', 'c', 'o', 'm', 'm', 'u', 'n', 'i', 't', 'y', '.', 'c', 'o', 'm', '\0',
   /* "nordor.homeip.net", true */ 'n', 'o', 'r', 'd', 'o', 'r', '.', 'h', 'o', 'm', 'e', 'i', 'p', '.', 'n', 'e', 't', '\0',
-  /* "nordseeblicke.de", true */ 'n', 'o', 'r', 'd', 's', 'e', 'e', 'b', 'l', 'i', 'c', 'k', 'e', '.', 'd', 'e', '\0',
   /* "noreply.mx", true */ 'n', 'o', 'r', 'e', 'p', 'l', 'y', '.', 'm', 'x', '\0',
   /* "norrkemi.se", true */ 'n', 'o', 'r', 'r', 'k', 'e', 'm', 'i', '.', 's', 'e', '\0',
   /* "norrliden.de", true */ 'n', 'o', 'r', 'r', 'l', 'i', 'd', 'e', 'n', '.', 'd', 'e', '\0',
@@ -8838,7 +8801,6 @@ static const char kSTSHostTable[] = {
   /* "oaic.gov.au", true */ 'o', 'a', 'i', 'c', '.', 'g', 'o', 'v', '.', 'a', 'u', '\0',
   /* "oakslighting.co.uk", true */ 'o', 'a', 'k', 's', 'l', 'i', 'g', 'h', 't', 'i', 'n', 'g', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "oauth-dropins.appspot.com", true */ 'o', 'a', 'u', 't', 'h', '-', 'd', 'r', 'o', 'p', 'i', 'n', 's', '.', 'a', 'p', 'p', 's', 'p', 'o', 't', '.', 'c', 'o', 'm', '\0',
-  /* "obdolbacca.ru", true */ 'o', 'b', 'd', 'o', 'l', 'b', 'a', 'c', 'c', 'a', '.', 'r', 'u', '\0',
   /* "obermeiers.eu", true */ 'o', 'b', 'e', 'r', 'm', 'e', 'i', 'e', 'r', 's', '.', 'e', 'u', '\0',
   /* "obfuscate.xyz", true */ 'o', 'b', 'f', 'u', 's', 'c', 'a', 't', 'e', '.', 'x', 'y', 'z', '\0',
   /* "obg-global.com", true */ 'o', 'b', 'g', '-', 'g', 'l', 'o', 'b', 'a', 'l', '.', 'c', 'o', 'm', '\0',
@@ -8877,7 +8839,6 @@ static const char kSTSHostTable[] = {
   /* "offshoot.rentals", true */ 'o', 'f', 'f', 's', 'h', 'o', 'o', 't', '.', 'r', 'e', 'n', 't', 'a', 'l', 's', '\0',
   /* "oftn.org", true */ 'o', 'f', 't', 'n', '.', 'o', 'r', 'g', '\0',
   /* "ogocare.com", true */ 'o', 'g', 'o', 'c', 'a', 'r', 'e', '.', 'c', 'o', 'm', '\0',
-  /* "ogogoshop.com", true */ 'o', 'g', 'o', 'g', 'o', 's', 'h', 'o', 'p', '.', 'c', 'o', 'm', '\0',
   /* "oguya.ch", true */ 'o', 'g', 'u', 'y', 'a', '.', 'c', 'h', '\0',
   /* "oh14.de", true */ 'o', 'h', '1', '4', '.', 'd', 'e', '\0',
   /* "ohayosoro.me", true */ 'o', 'h', 'a', 'y', 'o', 's', 'o', 'r', 'o', '.', 'm', 'e', '\0',
@@ -8895,9 +8856,7 @@ static const char kSTSHostTable[] = {
   /* "okmx.de", true */ 'o', 'k', 'm', 'x', '.', 'd', 'e', '\0',
   /* "okonetwork.org.uk", true */ 'o', 'k', 'o', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'o', 'r', 'g', '.', 'u', 'k', '\0',
   /* "okusiassociates.com", true */ 'o', 'k', 'u', 's', 'i', 'a', 's', 's', 'o', 'c', 'i', 'a', 't', 'e', 's', '.', 'c', 'o', 'm', '\0',
-  /* "olanderflorist.com", true */ 'o', 'l', 'a', 'n', 'd', 'e', 'r', 'f', 'l', 'o', 'r', 'i', 's', 't', '.', 'c', 'o', 'm', '\0',
   /* "olcso-vps-szerver.hu", true */ 'o', 'l', 'c', 's', 'o', '-', 'v', 'p', 's', '-', 's', 'z', 'e', 'r', 'v', 'e', 'r', '.', 'h', 'u', '\0',
-  /* "oldoakflorist.com", true */ 'o', 'l', 'd', 'o', 'a', 'k', 'f', 'l', 'o', 'r', 'i', 's', 't', '.', 'c', 'o', 'm', '\0',
   /* "olegon.ru", true */ 'o', 'l', 'e', 'g', 'o', 'n', '.', 'r', 'u', '\0',
   /* "oleksii.name", true */ 'o', 'l', 'e', 'k', 's', 'i', 'i', '.', 'n', 'a', 'm', 'e', '\0',
   /* "oliver-pietsch.de", false */ 'o', 'l', 'i', 'v', 'e', 'r', '-', 'p', 'i', 'e', 't', 's', 'c', 'h', '.', 'd', 'e', '\0',
@@ -8938,7 +8897,6 @@ static const char kSTSHostTable[] = {
   /* "oneononeonone.de", true */ 'o', 'n', 'e', 'o', 'n', 'o', 'n', 'e', 'o', 'n', 'o', 'n', 'e', '.', 'd', 'e', '\0',
   /* "oneononeonone.tv", true */ 'o', 'n', 'e', 'o', 'n', 'o', 'n', 'e', 'o', 'n', 'o', 'n', 'e', '.', 't', 'v', '\0',
   /* "oneway.ga", true */ 'o', 'n', 'e', 'w', 'a', 'y', '.', 'g', 'a', '\0',
-  /* "onewaymail.com", true */ 'o', 'n', 'e', 'w', 'a', 'y', 'm', 'a', 'i', 'l', '.', 'c', 'o', 'm', '\0',
   /* "oneweb.hu", true */ 'o', 'n', 'e', 'w', 'e', 'b', '.', 'h', 'u', '\0',
   /* "onewebdev.info", true */ 'o', 'n', 'e', 'w', 'e', 'b', 'd', 'e', 'v', '.', 'i', 'n', 'f', 'o', '\0',
   /* "oneworldbank.com", true */ 'o', 'n', 'e', 'w', 'o', 'r', 'l', 'd', 'b', 'a', 'n', 'k', '.', 'c', 'o', 'm', '\0',
@@ -8957,6 +8915,7 @@ static const char kSTSHostTable[] = {
   /* "onlinemarketingtraining.co.uk", true */ 'o', 'n', 'l', 'i', 'n', 'e', 'm', 'a', 'r', 'k', 'e', 't', 'i', 'n', 'g', 't', 'r', 'a', 'i', 'n', 'i', 'n', 'g', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "onlinetravelmoney.co.uk", true */ 'o', 'n', 'l', 'i', 'n', 'e', 't', 'r', 'a', 'v', 'e', 'l', 'm', 'o', 'n', 'e', 'y', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "only-roses.com", true */ 'o', 'n', 'l', 'y', '-', 'r', 'o', 's', 'e', 's', '.', 'c', 'o', 'm', '\0',
+  /* "onlyzero.net", true */ 'o', 'n', 'l', 'y', 'z', 'e', 'r', 'o', '.', 'n', 'e', 't', '\0',
   /* "onmaps.de", true */ 'o', 'n', 'm', 'a', 'p', 's', '.', 'd', 'e', '\0',
   /* "onmarketbookbuilds.com", true */ 'o', 'n', 'm', 'a', 'r', 'k', 'e', 't', 'b', 'o', 'o', 'k', 'b', 'u', 'i', 'l', 'd', 's', '.', 'c', 'o', 'm', '\0',
   /* "onmuvo.com", true */ 'o', 'n', 'm', 'u', 'v', 'o', '.', 'c', 'o', 'm', '\0',
@@ -9005,8 +8964,8 @@ static const char kSTSHostTable[] = {
   /* "opium.io", true */ 'o', 'p', 'i', 'u', 'm', '.', 'i', 'o', '\0',
   /* "oplop.appspot.com", true */ 'o', 'p', 'l', 'o', 'p', '.', 'a', 'p', 'p', 's', 'p', 'o', 't', '.', 'c', 'o', 'm', '\0',
   /* "oppaiti.me", true */ 'o', 'p', 'p', 'a', 'i', 't', 'i', '.', 'm', 'e', '\0',
-  /* "opperwall.net", true */ 'o', 'p', 'p', 'e', 'r', 'w', 'a', 'l', 'l', '.', 'n', 'e', 't', '\0',
   /* "opq.pw", true */ 'o', 'p', 'q', '.', 'p', 'w', '\0',
+  /* "oprbox.com", true */ 'o', 'p', 'r', 'b', 'o', 'x', '.', 'c', 'o', 'm', '\0',
   /* "oprechtgezegd.nl", true */ 'o', 'p', 'r', 'e', 'c', 'h', 't', 'g', 'e', 'z', 'e', 'g', 'd', '.', 'n', 'l', '\0',
   /* "opreismetingvoorunicef.nl", false */ 'o', 'p', 'r', 'e', 'i', 's', 'm', 'e', 't', 'i', 'n', 'g', 'v', 'o', 'o', 'r', 'u', 'n', 'i', 'c', 'e', 'f', '.', 'n', 'l', '\0',
   /* "opsmate.com", false */ 'o', 'p', 's', 'm', 'a', 't', 'e', '.', 'c', 'o', 'm', '\0',
@@ -9048,6 +9007,7 @@ static const char kSTSHostTable[] = {
   /* "oses.mobi", true */ 'o', 's', 'e', 's', '.', 'm', 'o', 'b', 'i', '\0',
   /* "oshayr.com", true */ 'o', 's', 'h', 'a', 'y', 'r', '.', 'c', 'o', 'm', '\0',
   /* "oshell.me", true */ 'o', 's', 'h', 'e', 'l', 'l', '.', 'm', 'e', '\0',
+  /* "oslinux.net", true */ 'o', 's', 'l', 'i', 'n', 'u', 'x', '.', 'n', 'e', 't', '\0',
   /* "osm.is", true */ 'o', 's', 'm', '.', 'i', 's', '\0',
   /* "osmanlitorunu.com", true */ 'o', 's', 'm', 'a', 'n', 'l', 'i', 't', 'o', 'r', 'u', 'n', 'u', '.', 'c', 'o', 'm', '\0',
   /* "osmosis.org", true */ 'o', 's', 'm', 'o', 's', 'i', 's', '.', 'o', 'r', 'g', '\0',
@@ -9061,7 +9021,6 @@ static const char kSTSHostTable[] = {
   /* "otakubox.de", true */ 'o', 't', 'a', 'k', 'u', 'b', 'o', 'x', '.', 'd', 'e', '\0',
   /* "otakurepublic.com", true */ 'o', 't', 'a', 'k', 'u', 'r', 'e', 'p', 'u', 'b', 'l', 'i', 'c', '.', 'c', 'o', 'm', '\0',
   /* "otchecker.com", true */ 'o', 't', 'c', 'h', 'e', 'c', 'k', 'e', 'r', '.', 'c', 'o', 'm', '\0',
-  /* "oticasvisao.net.br", true */ 'o', 't', 'i', 'c', 'a', 's', 'v', 'i', 's', 'a', 'o', '.', 'n', 'e', 't', '.', 'b', 'r', '\0',
   /* "otoy.com", true */ 'o', 't', 'o', 'y', '.', 'c', 'o', 'm', '\0',
   /* "otpsmart.com.ua", true */ 'o', 't', 'p', 's', 'm', 'a', 'r', 't', '.', 'c', 'o', 'm', '.', 'u', 'a', '\0',
   /* "otrm.de", true */ 'o', 't', 'r', 'm', '.', 'd', 'e', '\0',
@@ -9089,7 +9048,6 @@ static const char kSTSHostTable[] = {
   /* "ownit.se", false */ 'o', 'w', 'n', 'i', 't', '.', 's', 'e', '\0',
   /* "oxygaming.com", true */ 'o', 'x', 'y', 'g', 'a', 'm', 'i', 'n', 'g', '.', 'c', 'o', 'm', '\0',
   /* "oxymc.com", true */ 'o', 'x', 'y', 'm', 'c', '.', 'c', 'o', 'm', '\0',
-  /* "oxynux.xyz", true */ 'o', 'x', 'y', 'n', 'u', 'x', '.', 'x', 'y', 'z', '\0',
   /* "oyste.in", true */ 'o', 'y', 's', 't', 'e', '.', 'i', 'n', '\0',
   /* "oznamovacipovinnost.cz", true */ 'o', 'z', 'n', 'a', 'm', 'o', 'v', 'a', 'c', 'i', 'p', 'o', 'v', 'i', 'n', 'n', 'o', 's', 't', '.', 'c', 'z', '\0',
   /* "ozvolvo.org", true */ 'o', 'z', 'v', 'o', 'l', 'v', 'o', '.', 'o', 'r', 'g', '\0',
@@ -9111,7 +9069,6 @@ static const char kSTSHostTable[] = {
   /* "pagure.org", true */ 'p', 'a', 'g', 'u', 'r', 'e', '.', 'o', 'r', 'g', '\0',
   /* "painosso.org", true */ 'p', 'a', 'i', 'n', 'o', 's', 's', 'o', '.', 'o', 'r', 'g', '\0',
   /* "paint-it.pink", true */ 'p', 'a', 'i', 'n', 't', '-', 'i', 't', '.', 'p', 'i', 'n', 'k', '\0',
-  /* "paintingat.com", true */ 'p', 'a', 'i', 'n', 't', 'i', 'n', 'g', 'a', 't', '.', 'c', 'o', 'm', '\0',
   /* "pajonzeck.de", true */ 'p', 'a', 'j', 'o', 'n', 'z', 'e', 'c', 'k', '.', 'd', 'e', '\0',
   /* "pajowu.de", true */ 'p', 'a', 'j', 'o', 'w', 'u', '.', 'd', 'e', '\0',
   /* "pajuvuo.fi", true */ 'p', 'a', 'j', 'u', 'v', 'u', 'o', '.', 'f', 'i', '\0',
@@ -9407,7 +9364,6 @@ static const char kSTSHostTable[] = {
   /* "photoartelle.com", true */ 'p', 'h', 'o', 't', 'o', 'a', 'r', 't', 'e', 'l', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "photoblogverona.com", true */ 'p', 'h', 'o', 't', 'o', 'b', 'l', 'o', 'g', 'v', 'e', 'r', 'o', 'n', 'a', '.', 'c', 'o', 'm', '\0',
   /* "photographyforchange.com", true */ 'p', 'h', 'o', 't', 'o', 'g', 'r', 'a', 'p', 'h', 'y', 'f', 'o', 'r', 'c', 'h', 'a', 'n', 'g', 'e', '.', 'c', 'o', 'm', '\0',
-  /* "php-bach.org", true */ 'p', 'h', 'p', '-', 'b', 'a', 'c', 'h', '.', 'o', 'r', 'g', '\0',
   /* "php-tuning.de", true */ 'p', 'h', 'p', '-', 't', 'u', 'n', 'i', 'n', 'g', '.', 'd', 'e', '\0',
   /* "phparcade.com", true */ 'p', 'h', 'p', 'a', 'r', 'c', 'a', 'd', 'e', '.', 'c', 'o', 'm', '\0',
   /* "phpbbchinese.com", true */ 'p', 'h', 'p', 'b', 'b', 'c', 'h', 'i', 'n', 'e', 's', 'e', '.', 'c', 'o', 'm', '\0',
@@ -9523,7 +9479,6 @@ static const char kSTSHostTable[] = {
   /* "play.google.com", true */ 'p', 'l', 'a', 'y', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "playanka.com", true */ 'p', 'l', 'a', 'y', 'a', 'n', 'k', 'a', '.', 'c', 'o', 'm', '\0',
   /* "playflick.com", false */ 'p', 'l', 'a', 'y', 'f', 'l', 'i', 'c', 'k', '.', 'c', 'o', 'm', '\0',
-  /* "playmyplay.com", true */ 'p', 'l', 'a', 'y', 'm', 'y', 'p', 'l', 'a', 'y', '.', 'c', 'o', 'm', '\0',
   /* "playsharp.com", true */ 'p', 'l', 'a', 'y', 's', 'h', 'a', 'r', 'p', '.', 'c', 'o', 'm', '\0',
   /* "playsoundevents.be", true */ 'p', 'l', 'a', 'y', 's', 'o', 'u', 'n', 'd', 'e', 'v', 'e', 'n', 't', 's', '.', 'b', 'e', '\0',
   /* "playsprout.industries", true */ 'p', 'l', 'a', 'y', 's', 'p', 'r', 'o', 'u', 't', '.', 'i', 'n', 'd', 'u', 's', 't', 'r', 'i', 'e', 's', '\0',
@@ -9536,7 +9491,6 @@ static const char kSTSHostTable[] = {
   /* "pliosoft.com", true */ 'p', 'l', 'i', 'o', 's', 'o', 'f', 't', '.', 'c', 'o', 'm', '\0',
   /* "plirt.ru", false */ 'p', 'l', 'i', 'r', 't', '.', 'r', 'u', '\0',
   /* "ploader.ru", false */ 'p', 'l', 'o', 'a', 'd', 'e', 'r', '.', 'r', 'u', '\0',
-  /* "plombirator.kz", true */ 'p', 'l', 'o', 'm', 'b', 'i', 'r', 'a', 't', 'o', 'r', '.', 'k', 'z', '\0',
   /* "ploxel.com", true */ 'p', 'l', 'o', 'x', 'e', 'l', '.', 'c', 'o', 'm', '\0',
   /* "pluff.nl", true */ 'p', 'l', 'u', 'f', 'f', '.', 'n', 'l', '\0',
   /* "pluga.co", true */ 'p', 'l', 'u', 'g', 'a', '.', 'c', 'o', '\0',
@@ -9597,19 +9551,18 @@ static const char kSTSHostTable[] = {
   /* "pomar.club", true */ 'p', 'o', 'm', 'a', 'r', '.', 'c', 'l', 'u', 'b', '\0',
   /* "pompefunebrilariviera.it", true */ 'p', 'o', 'm', 'p', 'e', 'f', 'u', 'n', 'e', 'b', 'r', 'i', 'l', 'a', 'r', 'i', 'v', 'i', 'e', 'r', 'a', '.', 'i', 't', '\0',
   /* "poneytelecom.org", true */ 'p', 'o', 'n', 'e', 'y', 't', 'e', 'l', 'e', 'c', 'o', 'm', '.', 'o', 'r', 'g', '\0',
+  /* "ponolau.com", true */ 'p', 'o', 'n', 'o', 'l', 'a', 'u', '.', 'c', 'o', 'm', '\0',
   /* "ponteencima.com", true */ 'p', 'o', 'n', 't', 'e', 'e', 'n', 'c', 'i', 'm', 'a', '.', 'c', 'o', 'm', '\0',
   /* "ponythread.com", false */ 'p', 'o', 'n', 'y', 't', 'h', 'r', 'e', 'a', 'd', '.', 'c', 'o', 'm', '\0',
   /* "poolvilla-margarita.net", false */ 'p', 'o', 'o', 'l', 'v', 'i', 'l', 'l', 'a', '-', 'm', 'a', 'r', 'g', 'a', 'r', 'i', 't', 'a', '.', 'n', 'e', 't', '\0',
   /* "poon.io", true */ 'p', 'o', 'o', 'n', '.', 'i', 'o', '\0',
   /* "poris.web.id", true */ 'p', 'o', 'r', 'i', 's', '.', 'w', 'e', 'b', '.', 'i', 'd', '\0',
   /* "pornbay.org", true */ 'p', 'o', 'r', 'n', 'b', 'a', 'y', '.', 'o', 'r', 'g', '\0',
-  /* "porno-gif.ru", true */ 'p', 'o', 'r', 'n', 'o', '-', 'g', 'i', 'f', '.', 'r', 'u', '\0',
   /* "pornstars.me", true */ 'p', 'o', 'r', 'n', 's', 't', 'a', 'r', 's', '.', 'm', 'e', '\0',
   /* "porschen.fr", true */ 'p', 'o', 'r', 's', 'c', 'h', 'e', 'n', '.', 'f', 'r', '\0',
   /* "port443.hamburg", true */ 'p', 'o', 'r', 't', '4', '4', '3', '.', 'h', 'a', 'm', 'b', 'u', 'r', 'g', '\0',
   /* "port80.hamburg", true */ 'p', 'o', 'r', 't', '8', '0', '.', 'h', 'a', 'm', 'b', 'u', 'r', 'g', '\0',
   /* "portal.tirol.gv.at", true */ 'p', 'o', 'r', 't', 'a', 'l', '.', 't', 'i', 'r', 'o', 'l', '.', 'g', 'v', '.', 'a', 't', '\0',
-  /* "portalzine.de", true */ 'p', 'o', 'r', 't', 'a', 'l', 'z', 'i', 'n', 'e', '.', 'd', 'e', '\0',
   /* "portercup.com", true */ 'p', 'o', 'r', 't', 'e', 'r', 'c', 'u', 'p', '.', 'c', 'o', 'm', '\0',
   /* "portofrotterdam.com", true */ 'p', 'o', 'r', 't', 'o', 'f', 'r', 'o', 't', 't', 'e', 'r', 'd', 'a', 'm', '.', 'c', 'o', 'm', '\0',
   /* "portosonline.pl", true */ 'p', 'o', 'r', 't', 'o', 's', 'o', 'n', 'l', 'i', 'n', 'e', '.', 'p', 'l', '\0',
@@ -9629,6 +9582,7 @@ static const char kSTSHostTable[] = {
   /* "postmatescode.com", true */ 'p', 'o', 's', 't', 'm', 'a', 't', 'e', 's', 'c', 'o', 'd', 'e', '.', 'c', 'o', 'm', '\0',
   /* "postn.eu", true */ 'p', 'o', 's', 't', 'n', '.', 'e', 'u', '\0',
   /* "posttigo.com", true */ 'p', 'o', 's', 't', 't', 'i', 'g', 'o', '.', 'c', 'o', 'm', '\0',
+  /* "potatofrom.space", false */ 'p', 'o', 't', 'a', 't', 'o', 'f', 'r', 'o', 'm', '.', 's', 'p', 'a', 'c', 'e', '\0',
   /* "potatoheads.net", true */ 'p', 'o', 't', 'a', 't', 'o', 'h', 'e', 'a', 'd', 's', '.', 'n', 'e', 't', '\0',
   /* "potbar.com", true */ 'p', 'o', 't', 'b', 'a', 'r', '.', 'c', 'o', 'm', '\0',
   /* "potbox.com", true */ 'p', 'o', 't', 'b', 'o', 'x', '.', 'c', 'o', 'm', '\0',
@@ -9691,11 +9645,11 @@ static const char kSTSHostTable[] = {
   /* "pretty.hu", true */ 'p', 'r', 'e', 't', 't', 'y', '.', 'h', 'u', '\0',
   /* "prettytunesapp.com", true */ 'p', 'r', 'e', 't', 't', 'y', 't', 'u', 'n', 'e', 's', 'a', 'p', 'p', '.', 'c', 'o', 'm', '\0',
   /* "pretzelx.com", true */ 'p', 'r', 'e', 't', 'z', 'e', 'l', 'x', '.', 'c', 'o', 'm', '\0',
-  /* "prgslab.net", false */ 'p', 'r', 'g', 's', 'l', 'a', 'b', '.', 'n', 'e', 't', '\0',
   /* "pridetechdesign.com", true */ 'p', 'r', 'i', 'd', 'e', 't', 'e', 'c', 'h', 'd', 'e', 's', 'i', 'g', 'n', '.', 'c', 'o', 'm', '\0',
   /* "pridoc.se", true */ 'p', 'r', 'i', 'd', 'o', 'c', '.', 's', 'e', '\0',
   /* "prielwurmjaeger.de", true */ 'p', 'r', 'i', 'e', 'l', 'w', 'u', 'r', 'm', 'j', 'a', 'e', 'g', 'e', 'r', '.', 'd', 'e', '\0',
   /* "prilock.com", true */ 'p', 'r', 'i', 'l', 'o', 'c', 'k', '.', 'c', 'o', 'm', '\0',
+  /* "princesparktouch.com", true */ 'p', 'r', 'i', 'n', 'c', 'e', 's', 'p', 'a', 'r', 'k', 't', 'o', 'u', 'c', 'h', '.', 'c', 'o', 'm', '\0',
   /* "princessmargaretlotto.com", true */ 'p', 'r', 'i', 'n', 'c', 'e', 's', 's', 'm', 'a', 'r', 'g', 'a', 'r', 'e', 't', 'l', 'o', 't', 't', 'o', '.', 'c', 'o', 'm', '\0',
   /* "principaltoolbox.com", true */ 'p', 'r', 'i', 'n', 'c', 'i', 'p', 'a', 'l', 't', 'o', 'o', 'l', 'b', 'o', 'x', '.', 'c', 'o', 'm', '\0',
   /* "principia-online.de", true */ 'p', 'r', 'i', 'n', 'c', 'i', 'p', 'i', 'a', '-', 'o', 'n', 'l', 'i', 'n', 'e', '.', 'd', 'e', '\0',
@@ -9751,6 +9705,7 @@ static const char kSTSHostTable[] = {
   /* "prometheanfire.org", true */ 'p', 'r', 'o', 'm', 'e', 't', 'h', 'e', 'a', 'n', 'f', 'i', 'r', 'e', '.', 'o', 'r', 'g', '\0',
   /* "promhadan.com", true */ 'p', 'r', 'o', 'm', 'h', 'a', 'd', 'a', 'n', '.', 'c', 'o', 'm', '\0',
   /* "promisesaplus.com", true */ 'p', 'r', 'o', 'm', 'i', 's', 'e', 's', 'a', 'p', 'l', 'u', 's', '.', 'c', 'o', 'm', '\0',
+  /* "promoscuola.net", true */ 'p', 'r', 'o', 'm', 'o', 's', 'c', 'u', 'o', 'l', 'a', '.', 'n', 'e', 't', '\0',
   /* "promotiongeeks.com", false */ 'p', 'r', 'o', 'm', 'o', 't', 'i', 'o', 'n', 'g', 'e', 'e', 'k', 's', '.', 'c', 'o', 'm', '\0',
   /* "prontocleaners.co.uk", true */ 'p', 'r', 'o', 'n', 't', 'o', 'c', 'l', 'e', 'a', 'n', 'e', 'r', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "proofwiki.org", true */ 'p', 'r', 'o', 'o', 'f', 'w', 'i', 'k', 'i', '.', 'o', 'r', 'g', '\0',
@@ -9788,7 +9743,6 @@ static const char kSTSHostTable[] = {
   /* "prt.in.th", true */ 'p', 'r', 't', '.', 'i', 'n', '.', 't', 'h', '\0',
   /* "prtpe.com", true */ 'p', 'r', 't', 'p', 'e', '.', 'c', 'o', 'm', '\0',
   /* "prvikvadrat.hr", true */ 'p', 'r', 'v', 'i', 'k', 'v', 'a', 'd', 'r', 'a', 't', '.', 'h', 'r', '\0',
-  /* "prxio.date", true */ 'p', 'r', 'x', 'i', 'o', '.', 'd', 'a', 't', 'e', '\0',
   /* "przemas.pl", true */ 'p', 'r', 'z', 'e', 'm', 'a', 's', '.', 'p', 'l', '\0',
   /* "ps-provider.co.jp", true */ 'p', 's', '-', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '.', 'c', 'o', '.', 'j', 'p', '\0',
   /* "ps-w.ru", true */ 'p', 's', '-', 'w', '.', 'r', 'u', '\0',
@@ -9851,7 +9805,6 @@ static const char kSTSHostTable[] = {
   /* "pvcvoordeel.nl", false */ 'p', 'v', 'c', 'v', 'o', 'o', 'r', 'd', 'e', 'e', 'l', '.', 'n', 'l', '\0',
   /* "pvpcraft.ca", true */ 'p', 'v', 'p', 'c', 'r', 'a', 'f', 't', '.', 'c', 'a', '\0',
   /* "pvtschlag.com", true */ 'p', 'v', 't', 's', 'c', 'h', 'l', 'a', 'g', '.', 'c', 'o', 'm', '\0',
-  /* "pwntr.com", true */ 'p', 'w', 'n', 't', 'r', '.', 'c', 'o', 'm', '\0',
   /* "pwolk.com", true */ 'p', 'w', 'o', 'l', 'k', '.', 'c', 'o', 'm', '\0',
   /* "pxx.io", true */ 'p', 'x', 'x', '.', 'i', 'o', '\0',
   /* "pycrypto.org", true */ 'p', 'y', 'c', 'r', 'y', 'p', 't', 'o', '.', 'o', 'r', 'g', '\0',
@@ -9962,6 +9915,7 @@ static const char kSTSHostTable[] = {
   /* "r0uzic.net", true */ 'r', '0', 'u', 'z', 'i', 'c', '.', 'n', 'e', 't', '\0',
   /* "r2d2pc.com", true */ 'r', '2', 'd', '2', 'p', 'c', '.', 'c', 'o', 'm', '\0',
   /* "r3s1stanc3.me", true */ 'r', '3', 's', '1', 's', 't', 'a', 'n', 'c', '3', '.', 'm', 'e', '\0',
+  /* "r40.us", true */ 'r', '4', '0', '.', 'u', 's', '\0',
   /* "r6-team.ru", true */ 'r', '6', '-', 't', 'e', 'a', 'm', '.', 'r', 'u', '\0',
   /* "r811.de", true */ 'r', '8', '1', '1', '.', 'd', 'e', '\0',
   /* "ra-micro-koeln.de", true */ 'r', 'a', '-', 'm', 'i', 'c', 'r', 'o', '-', 'k', 'o', 'e', 'l', 'n', '.', 'd', 'e', '\0',
@@ -9992,7 +9946,6 @@ static const char kSTSHostTable[] = {
   /* "raidstone.net", true */ 'r', 'a', 'i', 'd', 's', 't', 'o', 'n', 'e', '.', 'n', 'e', 't', '\0',
   /* "raidstone.rocks", true */ 'r', 'a', 'i', 'd', 's', 't', 'o', 'n', 'e', '.', 'r', 'o', 'c', 'k', 's', '\0',
   /* "railgun.ac", true */ 'r', 'a', 'i', 'l', 'g', 'u', 'n', '.', 'a', 'c', '\0',
-  /* "railgun.com.cn", true */ 'r', 'a', 'i', 'l', 'g', 'u', 'n', '.', 'c', 'o', 'm', '.', 'c', 'n', '\0',
   /* "railjob.cn", true */ 'r', 'a', 'i', 'l', 'j', 'o', 'b', '.', 'c', 'n', '\0',
   /* "railyardurgentcare.com", true */ 'r', 'a', 'i', 'l', 'y', 'a', 'r', 'd', 'u', 'r', 'g', 'e', 'n', 't', 'c', 'a', 'r', 'e', '.', 'c', 'o', 'm', '\0',
   /* "rainforest.engineering", true */ 'r', 'a', 'i', 'n', 'f', 'o', 'r', 'e', 's', 't', '.', 'e', 'n', 'g', 'i', 'n', 'e', 'e', 'r', 'i', 'n', 'g', '\0',
@@ -10019,10 +9972,10 @@ static const char kSTSHostTable[] = {
   /* "rapido.nu", true */ 'r', 'a', 'p', 'i', 'd', 'o', '.', 'n', 'u', '\0',
   /* "rapidshit.net", true */ 'r', 'a', 'p', 'i', 'd', 's', 'h', 'i', 't', '.', 'n', 'e', 't', '\0',
   /* "rasebo.ro", true */ 'r', 'a', 's', 'e', 'b', 'o', '.', 'r', 'o', '\0',
+  /* "raspass.me", true */ 'r', 'a', 's', 'p', 'a', 's', 's', '.', 'm', 'e', '\0',
   /* "raspberry.us", true */ 'r', 'a', 's', 'p', 'b', 'e', 'r', 'r', 'y', '.', 'u', 's', '\0',
   /* "rastreador.com.es", false */ 'r', 'a', 's', 't', 'r', 'e', 'a', 'd', 'o', 'r', '.', 'c', 'o', 'm', '.', 'e', 's', '\0',
   /* "ratd.net", true */ 'r', 'a', 't', 'd', '.', 'n', 'e', 't', '\0',
-  /* "rate-esport.de", true */ 'r', 'a', 't', 'e', '-', 'e', 's', 'p', 'o', 'r', 't', '.', 'd', 'e', '\0',
   /* "rationalism.com", true */ 'r', 'a', 't', 'i', 'o', 'n', 'a', 'l', 'i', 's', 'm', '.', 'c', 'o', 'm', '\0',
   /* "rationalops.com", true */ 'r', 'a', 't', 'i', 'o', 'n', 'a', 'l', 'o', 'p', 's', '.', 'c', 'o', 'm', '\0',
   /* "ratuseks.com", false */ 'r', 'a', 't', 'u', 's', 'e', 'k', 's', '.', 'c', 'o', 'm', '\0',
@@ -10038,9 +9991,13 @@ static const char kSTSHostTable[] = {
   /* "ravse.dk", true */ 'r', 'a', 'v', 's', 'e', '.', 'd', 'k', '\0',
   /* "rawoil.com", true */ 'r', 'a', 'w', 'o', 'i', 'l', '.', 'c', 'o', 'm', '\0',
   /* "rawsec.net", true */ 'r', 'a', 'w', 's', 'e', 'c', '.', 'n', 'e', 't', '\0',
+  /* "ray-home.de", true */ 'r', 'a', 'y', '-', 'h', 'o', 'm', 'e', '.', 'd', 'e', '\0',
+  /* "ray-works.de", true */ 'r', 'a', 'y', '-', 'w', 'o', 'r', 'k', 's', '.', 'd', 'e', '\0',
+  /* "raymd.de", true */ 'r', 'a', 'y', 'm', 'd', '.', 'd', 'e', '\0',
   /* "raymii.org", true */ 'r', 'a', 'y', 'm', 'i', 'i', '.', 'o', 'r', 'g', '\0',
   /* "raymondjcox.com", true */ 'r', 'a', 'y', 'm', 'o', 'n', 'd', 'j', 'c', 'o', 'x', '.', 'c', 'o', 'm', '\0',
   /* "raytron.org", true */ 'r', 'a', 'y', 't', 'r', 'o', 'n', '.', 'o', 'r', 'g', '\0',
+  /* "rayworks.de", true */ 'r', 'a', 'y', 'w', 'o', 'r', 'k', 's', '.', 'd', 'e', '\0',
   /* "razlaw.name", true */ 'r', 'a', 'z', 'l', 'a', 'w', '.', 'n', 'a', 'm', 'e', '\0',
   /* "razzolini.com.br", true */ 'r', 'a', 'z', 'z', 'o', 'l', 'i', 'n', 'i', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "rbensch.com", true */ 'r', 'b', 'e', 'n', 's', 'c', 'h', '.', 'c', 'o', 'm', '\0',
@@ -10050,7 +10007,6 @@ static const char kSTSHostTable[] = {
   /* "rbtvshitstorm.is", true */ 'r', 'b', 't', 'v', 's', 'h', 'i', 't', 's', 't', 'o', 'r', 'm', '.', 'i', 's', '\0',
   /* "rburchell.com", true */ 'r', 'b', 'u', 'r', 'c', 'h', 'e', 'l', 'l', '.', 'c', 'o', 'm', '\0',
   /* "rbxcatalog.com", true */ 'r', 'b', 'x', 'c', 'a', 't', 'a', 'l', 'o', 'g', '.', 'c', 'o', 'm', '\0',
-  /* "rc-rp.com", true */ 'r', 'c', '-', 'r', 'p', '.', 'c', 'o', 'm', '\0',
   /* "rcnitrotalk.com", true */ 'r', 'c', 'n', 'i', 't', 'r', 'o', 't', 'a', 'l', 'k', '.', 'c', 'o', 'm', '\0',
   /* "rcorporation.be", true */ 'r', 'c', 'o', 'r', 'p', 'o', 'r', 'a', 't', 'i', 'o', 'n', '.', 'b', 'e', '\0',
   /* "rdh.asia", true */ 'r', 'd', 'h', '.', 'a', 's', 'i', 'a', '\0',
@@ -10091,7 +10047,6 @@ static const char kSTSHostTable[] = {
   /* "redable.hosting", true */ 'r', 'e', 'd', 'a', 'b', 'l', 'e', '.', 'h', 'o', 's', 't', 'i', 'n', 'g', '\0',
   /* "redable.nl", true */ 'r', 'e', 'd', 'a', 'b', 'l', 'e', '.', 'n', 'l', '\0',
   /* "redb.cz", true */ 'r', 'e', 'd', 'b', '.', 'c', 'z', '\0',
-  /* "redballoonsecurity.com", true */ 'r', 'e', 'd', 'b', 'a', 'l', 'l', 'o', 'o', 'n', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '.', 'c', 'o', 'm', '\0',
   /* "redburn.com", true */ 'r', 'e', 'd', 'b', 'u', 'r', 'n', '.', 'c', 'o', 'm', '\0',
   /* "redd.it", true */ 'r', 'e', 'd', 'd', '.', 'i', 't', '\0',
   /* "reddingsbrigade-zwolle.nl", true */ 'r', 'e', 'd', 'd', 'i', 'n', 'g', 's', 'b', 'r', 'i', 'g', 'a', 'd', 'e', '-', 'z', 'w', 'o', 'l', 'l', 'e', '.', 'n', 'l', '\0',
@@ -10223,7 +10178,6 @@ static const char kSTSHostTable[] = {
   /* "rewrite3.com", true */ 'r', 'e', 'w', 'r', 'i', 't', 'e', '3', '.', 'c', 'o', 'm', '\0',
   /* "rex.st", true */ 'r', 'e', 'x', '.', 's', 't', '\0',
   /* "rex.tc", true */ 'r', 'e', 'x', '.', 't', 'c', '\0',
-  /* "rezept-planer.de", true */ 'r', 'e', 'z', 'e', 'p', 't', '-', 'p', 'l', 'a', 'n', 'e', 'r', '.', 'd', 'e', '\0',
   /* "rezexpert.com", true */ 'r', 'e', 'z', 'e', 'x', 'p', 'e', 'r', 't', '.', 'c', 'o', 'm', '\0',
   /* "rezosup.net", true */ 'r', 'e', 'z', 'o', 's', 'u', 'p', '.', 'n', 'e', 't', '\0',
   /* "rezosup.org", true */ 'r', 'e', 'z', 'o', 's', 'u', 'p', '.', 'o', 'r', 'g', '\0',
@@ -10303,7 +10257,6 @@ static const char kSTSHostTable[] = {
   /* "rms.sexy", true */ 'r', 'm', 's', '.', 's', 'e', 'x', 'y', '\0',
   /* "rmstudio.tw", true */ 'r', 'm', 's', 't', 'u', 'd', 'i', 'o', '.', 't', 'w', '\0',
   /* "ro.search.yahoo.com", false */ 'r', 'o', '.', 's', 'e', 'a', 'r', 'c', 'h', '.', 'y', 'a', 'h', 'o', 'o', '.', 'c', 'o', 'm', '\0',
-  /* "roadfeast.com", true */ 'r', 'o', 'a', 'd', 'f', 'e', 'a', 's', 't', '.', 'c', 'o', 'm', '\0',
   /* "roave.com", true */ 'r', 'o', 'a', 'v', 'e', '.', 'c', 'o', 'm', '\0',
   /* "robandjanine.com", true */ 'r', 'o', 'b', 'a', 'n', 'd', 'j', 'a', 'n', 'i', 'n', 'e', '.', 'c', 'o', 'm', '\0',
   /* "roberthurlbut.com", true */ 'r', 'o', 'b', 'e', 'r', 't', 'h', 'u', 'r', 'l', 'b', 'u', 't', '.', 'c', 'o', 'm', '\0',
@@ -10541,6 +10494,7 @@ static const char kSTSHostTable[] = {
   /* "samizdat.cz", true */ 's', 'a', 'm', 'i', 'z', 'd', 'a', 't', '.', 'c', 'z', '\0',
   /* "samkelleher.com", true */ 's', 'a', 'm', 'k', 'e', 'l', 'l', 'e', 'h', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "saml-gateway.org", true */ 's', 'a', 'm', 'l', '-', 'g', 'a', 't', 'e', 'w', 'a', 'y', '.', 'o', 'r', 'g', '\0',
+  /* "sampcup.com", false */ 's', 'a', 'm', 'p', 'c', 'u', 'p', '.', 'c', 'o', 'm', '\0',
   /* "samuelkeeley.com", true */ 's', 'a', 'm', 'u', 'e', 'l', 'k', 'e', 'e', 'l', 'e', 'y', '.', 'c', 'o', 'm', '\0',
   /* "samwilberforce.com", true */ 's', 'a', 'm', 'w', 'i', 'l', 'b', 'e', 'r', 'f', 'o', 'r', 'c', 'e', '.', 'c', 'o', 'm', '\0',
   /* "samwu.tw", false */ 's', 'a', 'm', 'w', 'u', '.', 't', 'w', '\0',
@@ -10599,7 +10553,6 @@ static const char kSTSHostTable[] = {
   /* "satrent.se", true */ 's', 'a', 't', 'r', 'e', 'n', 't', '.', 's', 'e', '\0',
   /* "saturn.pl", true */ 's', 'a', 't', 'u', 'r', 'n', '.', 'p', 'l', '\0',
   /* "saturne.tk", true */ 's', 'a', 't', 'u', 'r', 'n', 'e', '.', 't', 'k', '\0',
-  /* "sauerbrey.eu", true */ 's', 'a', 'u', 'e', 'r', 'b', 'r', 'e', 'y', '.', 'e', 'u', '\0',
   /* "saulchristie.com", true */ 's', 'a', 'u', 'l', 'c', 'h', 'r', 'i', 's', 't', 'i', 'e', '.', 'c', 'o', 'm', '\0',
   /* "saumon.xyz", true */ 's', 'a', 'u', 'm', 'o', 'n', '.', 'x', 'y', 'z', '\0',
   /* "saunas.fr", true */ 's', 'a', 'u', 'n', 'a', 's', '.', 'f', 'r', '\0',
@@ -10677,7 +10630,6 @@ static const char kSTSHostTable[] = {
   /* "schubergphilis.com", true */ 's', 'c', 'h', 'u', 'b', 'e', 'r', 'g', 'p', 'h', 'i', 'l', 'i', 's', '.', 'c', 'o', 'm', '\0',
   /* "schul-bar.de", true */ 's', 'c', 'h', 'u', 'l', '-', 'b', 'a', 'r', '.', 'd', 'e', '\0',
   /* "schuler.st", true */ 's', 'c', 'h', 'u', 'l', 'e', 'r', '.', 's', 't', '\0',
-  /* "schultzflorists.com", true */ 's', 'c', 'h', 'u', 'l', 't', 'z', 'f', 'l', 'o', 'r', 'i', 's', 't', 's', '.', 'c', 'o', 'm', '\0',
   /* "schumanandmonnet.eu", true */ 's', 'c', 'h', 'u', 'm', 'a', 'n', 'a', 'n', 'd', 'm', 'o', 'n', 'n', 'e', 't', '.', 'e', 'u', '\0',
   /* "schunako.ch", true */ 's', 'c', 'h', 'u', 'n', 'a', 'k', 'o', '.', 'c', 'h', '\0',
   /* "schurkenstaat.net", true */ 's', 'c', 'h', 'u', 'r', 'k', 'e', 'n', 's', 't', 'a', 'a', 't', '.', 'n', 'e', 't', '\0',
@@ -10807,7 +10759,6 @@ static const char kSTSHostTable[] = {
   /* "selectary.com", true */ 's', 'e', 'l', 'e', 'c', 't', 'a', 'r', 'y', '.', 'c', 'o', 'm', '\0',
   /* "selectel.ru", true */ 's', 'e', 'l', 'e', 'c', 't', 'e', 'l', '.', 'r', 'u', '\0',
   /* "selectorders.com", true */ 's', 'e', 'l', 'e', 'c', 't', 'o', 'r', 'd', 'e', 'r', 's', '.', 'c', 'o', 'm', '\0',
-  /* "selent.me", true */ 's', 'e', 'l', 'e', 'n', 't', '.', 'm', 'e', '\0',
   /* "self-signed.com", true */ 's', 'e', 'l', 'f', '-', 's', 'i', 'g', 'n', 'e', 'd', '.', 'c', 'o', 'm', '\0',
   /* "selfici.com", true */ 's', 'e', 'l', 'f', 'i', 'c', 'i', '.', 'c', 'o', 'm', '\0',
   /* "selfici.cz", true */ 's', 'e', 'l', 'f', 'i', 'c', 'i', '.', 'c', 'z', '\0',
@@ -10848,7 +10799,6 @@ static const char kSTSHostTable[] = {
   /* "septs.pw", true */ 's', 'e', 'p', 't', 's', '.', 'p', 'w', '\0',
   /* "sequencing.com", true */ 's', 'e', 'q', 'u', 'e', 'n', 'c', 'i', 'n', 'g', '.', 'c', 'o', 'm', '\0',
   /* "sequiturs.com", true */ 's', 'e', 'q', 'u', 'i', 't', 'u', 'r', 's', '.', 'c', 'o', 'm', '\0',
-  /* "serafin.tech", true */ 's', 'e', 'r', 'a', 'f', 'i', 'n', '.', 't', 'e', 'c', 'h', '\0',
   /* "serathius.ovh", true */ 's', 'e', 'r', 'a', 't', 'h', 'i', 'u', 's', '.', 'o', 'v', 'h', '\0',
   /* "serbanpaun.ro", true */ 's', 'e', 'r', 'b', 'a', 'n', 'p', 'a', 'u', 'n', '.', 'r', 'o', '\0',
   /* "serenitycreams.com", true */ 's', 'e', 'r', 'e', 'n', 'i', 't', 'y', 'c', 'r', 'e', 'a', 'm', 's', '.', 'c', 'o', 'm', '\0',
@@ -10866,7 +10816,6 @@ static const char kSTSHostTable[] = {
   /* "serverfrog.de", true */ 's', 'e', 'r', 'v', 'e', 'r', 'f', 'r', 'o', 'g', '.', 'd', 'e', '\0',
   /* "serveroffline.net", false */ 's', 'e', 'r', 'v', 'e', 'r', 'o', 'f', 'f', 'l', 'i', 'n', 'e', '.', 'n', 'e', 't', '\0',
   /* "serverpedia.de", true */ 's', 'e', 'r', 'v', 'e', 'r', 'p', 'e', 'd', 'i', 'a', '.', 'd', 'e', '\0',
-  /* "serverstuff.info", true */ 's', 'e', 'r', 'v', 'e', 'r', 's', 't', 'u', 'f', 'f', '.', 'i', 'n', 'f', 'o', '\0',
   /* "servertastic.com", true */ 's', 'e', 'r', 'v', 'e', 'r', 't', 'a', 's', 't', 'i', 'c', '.', 'c', 'o', 'm', '\0',
   /* "servethecity-karlsruhe.de", false */ 's', 'e', 'r', 'v', 'e', 't', 'h', 'e', 'c', 'i', 't', 'y', '-', 'k', 'a', 'r', 'l', 's', 'r', 'u', 'h', 'e', '.', 'd', 'e', '\0',
   /* "service.gov.uk", true */ 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'g', 'o', 'v', '.', 'u', 'k', '\0',
@@ -10890,7 +10839,6 @@ static const char kSTSHostTable[] = {
   /* "seyfarth.de", true */ 's', 'e', 'y', 'f', 'a', 'r', 't', 'h', '.', 'd', 'e', '\0',
   /* "seyr.it", true */ 's', 'e', 'y', 'r', '.', 'i', 't', '\0',
   /* "seyr.me", true */ 's', 'e', 'y', 'r', '.', 'm', 'e', '\0',
-  /* "sfsltd.com", true */ 's', 'f', 's', 'l', 't', 'd', '.', 'c', 'o', 'm', '\0',
   /* "sftool.gov", true */ 's', 'f', 't', 'o', 'o', 'l', '.', 'g', 'o', 'v', '\0',
   /* "sg.search.yahoo.com", false */ 's', 'g', '.', 's', 'e', 'a', 'r', 'c', 'h', '.', 'y', 'a', 'h', 'o', 'o', '.', 'c', 'o', 'm', '\0',
   /* "sgcaccounts.co.uk", true */ 's', 'g', 'c', 'a', 'c', 'c', 'o', 'u', 'n', 't', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
@@ -11035,7 +10983,6 @@ static const char kSTSHostTable[] = {
   /* "silvergoldbull.de", true */ 's', 'i', 'l', 'v', 'e', 'r', 'g', 'o', 'l', 'd', 'b', 'u', 'l', 'l', '.', 'd', 'e', '\0',
   /* "silvergoldbull.kr", true */ 's', 'i', 'l', 'v', 'e', 'r', 'g', 'o', 'l', 'd', 'b', 'u', 'l', 'l', '.', 'k', 'r', '\0',
   /* "silverhome.ninja", false */ 's', 'i', 'l', 'v', 'e', 'r', 'h', 'o', 'm', 'e', '.', 'n', 'i', 'n', 'j', 'a', '\0',
-  /* "silvistefi.com", true */ 's', 'i', 'l', 'v', 'i', 's', 't', 'e', 'f', 'i', '.', 'c', 'o', 'm', '\0',
   /* "simbihaiti.com", false */ 's', 'i', 'm', 'b', 'i', 'h', 'a', 'i', 't', 'i', '.', 'c', 'o', 'm', '\0',
   /* "simfed.org", true */ 's', 'i', 'm', 'f', 'e', 'd', '.', 'o', 'r', 'g', '\0',
   /* "simlau.net", true */ 's', 'i', 'm', 'l', 'a', 'u', '.', 'n', 'e', 't', '\0',
@@ -11119,7 +11066,6 @@ static const char kSTSHostTable[] = {
   /* "skillproxy.com", true */ 's', 'k', 'i', 'l', 'l', 'p', 'r', 'o', 'x', 'y', '.', 'c', 'o', 'm', '\0',
   /* "skillproxy.net", true */ 's', 'k', 'i', 'l', 'l', 'p', 'r', 'o', 'x', 'y', '.', 'n', 'e', 't', '\0',
   /* "skillproxy.org", true */ 's', 'k', 'i', 'l', 'l', 'p', 'r', 'o', 'x', 'y', '.', 'o', 'r', 'g', '\0',
-  /* "skills2services.com", true */ 's', 'k', 'i', 'l', 'l', 's', '2', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', '.', 'c', 'o', 'm', '\0',
   /* "skillseo.com", true */ 's', 'k', 'i', 'l', 'l', 's', 'e', 'o', '.', 'c', 'o', 'm', '\0',
   /* "skimming.net", true */ 's', 'k', 'i', 'm', 'm', 'i', 'n', 'g', '.', 'n', 'e', 't', '\0',
   /* "sking.io", true */ 's', 'k', 'i', 'n', 'g', '.', 'i', 'o', '\0',
@@ -11178,6 +11124,7 @@ static const char kSTSHostTable[] = {
   /* "slotcar.com", false */ 's', 'l', 'o', 't', 'c', 'a', 'r', '.', 'c', 'o', 'm', '\0',
   /* "slow.zone", true */ 's', 'l', 'o', 'w', '.', 'z', 'o', 'n', 'e', '\0',
   /* "slowb.ro", true */ 's', 'l', 'o', 'w', 'b', '.', 'r', 'o', '\0',
+  /* "slowfood.es", true */ 's', 'l', 'o', 'w', 'f', 'o', 'o', 'd', '.', 'e', 's', '\0',
   /* "slse.ca", true */ 's', 'l', 's', 'e', '.', 'c', 'a', '\0',
   /* "slxh.eu", true */ 's', 'l', 'x', 'h', '.', 'e', 'u', '\0',
   /* "slxh.nl", true */ 's', 'l', 'x', 'h', '.', 'n', 'l', '\0',
@@ -11234,7 +11181,6 @@ static const char kSTSHostTable[] = {
   /* "smow.com", true */ 's', 'm', 'o', 'w', '.', 'c', 'o', 'm', '\0',
   /* "smow.de", true */ 's', 'm', 'o', 'w', '.', 'd', 'e', '\0',
   /* "smpetrey.com", true */ 's', 'm', 'p', 'e', 't', 'r', 'e', 'y', '.', 'c', 'o', 'm', '\0',
-  /* "sms1.ro", true */ 's', 'm', 's', '1', '.', 'r', 'o', '\0',
   /* "smskeywords.co.uk", true */ 's', 'm', 's', 'k', 'e', 'y', 'w', 'o', 'r', 'd', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "smvfd.info", true */ 's', 'm', 'v', 'f', 'd', '.', 'i', 'n', 'f', 'o', '\0',
   /* "snakehosting.dk", false */ 's', 'n', 'a', 'k', 'e', 'h', 'o', 's', 't', 'i', 'n', 'g', '.', 'd', 'k', '\0',
@@ -11423,7 +11369,6 @@ static const char kSTSHostTable[] = {
   /* "spisbilligt.dk", true */ 's', 'p', 'i', 's', 'b', 'i', 'l', 'l', 'i', 'g', 't', '.', 'd', 'k', '\0',
   /* "spitefultowel.com", true */ 's', 'p', 'i', 't', 'e', 'f', 'u', 'l', 't', 'o', 'w', 'e', 'l', '.', 'c', 'o', 'm', '\0',
   /* "spititout.it", true */ 's', 'p', 'i', 't', 'i', 't', 'o', 'u', 't', '.', 'i', 't', '\0',
-  /* "spittersberger.recipes", true */ 's', 'p', 'i', 't', 't', 'e', 'r', 's', 'b', 'e', 'r', 'g', 'e', 'r', '.', 'r', 'e', 'c', 'i', 'p', 'e', 's', '\0',
   /* "splikity.com", true */ 's', 'p', 'l', 'i', 'k', 'i', 't', 'y', '.', 'c', 'o', 'm', '\0',
   /* "split.is", true */ 's', 'p', 'l', 'i', 't', '.', 'i', 's', '\0',
   /* "splitdna.com", true */ 's', 'p', 'l', 'i', 't', 'd', 'n', 'a', '.', 'c', 'o', 'm', '\0',
@@ -11518,7 +11463,6 @@ static const char kSTSHostTable[] = {
   /* "stageirites.com", true */ 's', 't', 'a', 'g', 'e', 'i', 'r', 'i', 't', 'e', 's', '.', 'c', 'o', 'm', '\0',
   /* "stageirites.fr", true */ 's', 't', 'a', 'g', 'e', 'i', 'r', 'i', 't', 'e', 's', '.', 'f', 'r', '\0',
   /* "stageirites.org", true */ 's', 't', 'a', 'g', 'e', 'i', 'r', 'i', 't', 'e', 's', '.', 'o', 'r', 'g', '\0',
-  /* "stagingjobshq.com", true */ 's', 't', 'a', 'g', 'i', 'n', 'g', 'j', 'o', 'b', 's', 'h', 'q', '.', 'c', 'o', 'm', '\0',
   /* "stagstickets.co.uk", true */ 's', 't', 'a', 'g', 's', 't', 'i', 'c', 'k', 'e', 't', 's', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "stair.ch", true */ 's', 't', 'a', 'i', 'r', '.', 'c', 'h', '\0',
   /* "stalder.work", true */ 's', 't', 'a', 'l', 'd', 'e', 'r', '.', 'w', 'o', 'r', 'k', '\0',
@@ -11531,7 +11475,6 @@ static const char kSTSHostTable[] = {
   /* "stanandjerre.org", true */ 's', 't', 'a', 'n', 'a', 'n', 'd', 'j', 'e', 'r', 'r', 'e', '.', 'o', 'r', 'g', '\0',
   /* "standards.gov", true */ 's', 't', 'a', 'n', 'd', 'a', 'r', 'd', 's', '.', 'g', 'o', 'v', '\0',
   /* "standardssuck.org", true */ 's', 't', 'a', 'n', 'd', 'a', 'r', 'd', 's', 's', 'u', 'c', 'k', '.', 'o', 'r', 'g', '\0',
-  /* "standingmist.com", true */ 's', 't', 'a', 'n', 'd', 'i', 'n', 'g', 'm', 'i', 's', 't', '.', 'c', 'o', 'm', '\0',
   /* "standoutbooks.com", true */ 's', 't', 'a', 'n', 'd', 'o', 'u', 't', 'b', 'o', 'o', 'k', 's', '.', 'c', 'o', 'm', '\0',
   /* "star-citizen.wiki", true */ 's', 't', 'a', 'r', '-', 'c', 'i', 't', 'i', 'z', 'e', 'n', '.', 'w', 'i', 'k', 'i', '\0',
   /* "starandshield.com", true */ 's', 't', 'a', 'r', 'a', 'n', 'd', 's', 'h', 'i', 'e', 'l', 'd', '.', 'c', 'o', 'm', '\0',
@@ -11648,6 +11591,7 @@ static const char kSTSHostTable[] = {
   /* "strahlende-augen.info", true */ 's', 't', 'r', 'a', 'h', 'l', 'e', 'n', 'd', 'e', '-', 'a', 'u', 'g', 'e', 'n', '.', 'i', 'n', 'f', 'o', '\0',
   /* "strangemusicinc.net", true */ 's', 't', 'r', 'a', 'n', 'g', 'e', 'm', 'u', 's', 'i', 'c', 'i', 'n', 'c', '.', 'n', 'e', 't', '\0',
   /* "strategie-zone.de", true */ 's', 't', 'r', 'a', 't', 'e', 'g', 'i', 'e', '-', 'z', 'o', 'n', 'e', '.', 'd', 'e', '\0',
+  /* "straubis.org", true */ 's', 't', 'r', 'a', 'u', 'b', 'i', 's', '.', 'o', 'r', 'g', '\0',
   /* "strbt.de", true */ 's', 't', 'r', 'b', 't', '.', 'd', 'e', '\0',
   /* "strchr.com", true */ 's', 't', 'r', 'c', 'h', 'r', '.', 'c', 'o', 'm', '\0',
   /* "streamchan.org", true */ 's', 't', 'r', 'e', 'a', 'm', 'c', 'h', 'a', 'n', '.', 'o', 'r', 'g', '\0',
@@ -11707,7 +11651,6 @@ static const char kSTSHostTable[] = {
   /* "subohm.com", true */ 's', 'u', 'b', 'o', 'h', 'm', '.', 'c', 'o', 'm', '\0',
   /* "suborbital.io", true */ 's', 'u', 'b', 'o', 'r', 'b', 'i', 't', 'a', 'l', '.', 'i', 'o', '\0',
   /* "subseq.net", false */ 's', 'u', 'b', 's', 'e', 'q', '.', 'n', 'e', 't', '\0',
-  /* "subsys.no", true */ 's', 'u', 'b', 's', 'y', 's', '.', 'n', 'o', '\0',
   /* "suburban-landscape.net", true */ 's', 'u', 'b', 'u', 'r', 'b', 'a', 'n', '-', 'l', 'a', 'n', 'd', 's', 'c', 'a', 'p', 'e', '.', 'n', 'e', 't', '\0',
   /* "succ.in", true */ 's', 'u', 'c', 'c', '.', 'i', 'n', '\0',
   /* "suche.org", true */ 's', 'u', 'c', 'h', 'e', '.', 'o', 'r', 'g', '\0',
@@ -11729,7 +11672,7 @@ static const char kSTSHostTable[] = {
   /* "sunjaydhama.com", true */ 's', 'u', 'n', 'j', 'a', 'y', 'd', 'h', 'a', 'm', 'a', '.', 'c', 'o', 'm', '\0',
   /* "sunsetwx.com", true */ 's', 'u', 'n', 's', 'e', 't', 'w', 'x', '.', 'c', 'o', 'm', '\0',
   /* "sunstar.bg", true */ 's', 'u', 'n', 's', 't', 'a', 'r', '.', 'b', 'g', '\0',
-  /* "suos.io", true */ 's', 'u', 'o', 's', '.', 'i', 'o', '\0',
+  /* "sunyanzi.tk", true */ 's', 'u', 'n', 'y', 'a', 'n', 'z', 'i', '.', 't', 'k', '\0',
   /* "supastuds.com", true */ 's', 'u', 'p', 'a', 's', 't', 'u', 'd', 's', '.', 'c', 'o', 'm', '\0',
   /* "supcro.com", true */ 's', 'u', 'p', 'c', 'r', 'o', '.', 'c', 'o', 'm', '\0',
   /* "super-o-blog.com", true */ 's', 'u', 'p', 'e', 'r', '-', 'o', '-', 'b', 'l', 'o', 'g', '.', 'c', 'o', 'm', '\0',
@@ -11744,7 +11687,6 @@ static const char kSTSHostTable[] = {
   /* "supersonnig-festival.de", true */ 's', 'u', 'p', 'e', 'r', 's', 'o', 'n', 'n', 'i', 'g', '-', 'f', 'e', 's', 't', 'i', 'v', 'a', 'l', '.', 'd', 'e', '\0',
   /* "supersonnigfestival.de", true */ 's', 'u', 'p', 'e', 'r', 's', 'o', 'n', 'n', 'i', 'g', 'f', 'e', 's', 't', 'i', 'v', 'a', 'l', '.', 'd', 'e', '\0',
   /* "superswingtrainer.com", true */ 's', 'u', 'p', 'e', 'r', 's', 'w', 'i', 'n', 'g', 't', 'r', 'a', 'i', 'n', 'e', 'r', '.', 'c', 'o', 'm', '\0',
-  /* "superuser.fi", true */ 's', 'u', 'p', 'e', 'r', 'u', 's', 'e', 'r', '.', 'f', 'i', '\0',
   /* "supinbot.ovh", false */ 's', 'u', 'p', 'i', 'n', 'b', 'o', 't', '.', 'o', 'v', 'h', '\0',
   /* "supplies24.at", true */ 's', 'u', 'p', 'p', 'l', 'i', 'e', 's', '2', '4', '.', 'a', 't', '\0',
   /* "supplies24.es", true */ 's', 'u', 'p', 'p', 'l', 'i', 'e', 's', '2', '4', '.', 'e', 's', '\0',
@@ -11791,7 +11733,6 @@ static const char kSTSHostTable[] = {
   /* "swordfeng.xyz", true */ 's', 'w', 'o', 'r', 'd', 'f', 'e', 'n', 'g', '.', 'x', 'y', 'z', '\0',
   /* "swyn.net", true */ 's', 'w', 'y', 'n', '.', 'n', 'e', 't', '\0',
   /* "sx3.no", true */ 's', 'x', '3', '.', 'n', 'o', '\0',
-  /* "sy-anduril.de", true */ 's', 'y', '-', 'a', 'n', 'd', 'u', 'r', 'i', 'l', '.', 'd', 'e', '\0',
   /* "sycamorememphis.org", false */ 's', 'y', 'c', 'a', 'm', 'o', 'r', 'e', 'm', 'e', 'm', 'p', 'h', 'i', 's', '.', 'o', 'r', 'g', '\0',
   /* "sychov.pro", true */ 's', 'y', 'c', 'h', 'o', 'v', '.', 'p', 'r', 'o', '\0',
   /* "sydney.dating", true */ 's', 'y', 'd', 'n', 'e', 'y', '.', 'd', 'a', 't', 'i', 'n', 'g', '\0',
@@ -11831,7 +11772,6 @@ static const char kSTSHostTable[] = {
   /* "syss.de", true */ 's', 'y', 's', 's', '.', 'd', 'e', '\0',
   /* "system.is", true */ 's', 'y', 's', 't', 'e', 'm', '.', 'i', 's', '\0',
   /* "systemintegra.ru", true */ 's', 'y', 's', 't', 'e', 'm', 'i', 'n', 't', 'e', 'g', 'r', 'a', '.', 'r', 'u', '\0',
-  /* "systemreboot.net", true */ 's', 'y', 's', 't', 'e', 'm', 'r', 'e', 'b', 'o', 'o', 't', '.', 'n', 'e', 't', '\0',
   /* "syt3.net", true */ 's', 'y', 't', '3', '.', 'n', 'e', 't', '\0',
   /* "syzygy-tables.info", true */ 's', 'y', 'z', 'y', 'g', 'y', '-', 't', 'a', 'b', 'l', 'e', 's', '.', 'i', 'n', 'f', 'o', '\0',
   /* "szagun.net", true */ 's', 'z', 'a', 'g', 'u', 'n', '.', 'n', 'e', 't', '\0',
@@ -11862,7 +11802,6 @@ static const char kSTSHostTable[] = {
   /* "taglioepiega.com", true */ 't', 'a', 'g', 'l', 'i', 'o', 'e', 'p', 'i', 'e', 'g', 'a', '.', 'c', 'o', 'm', '\0',
   /* "taglioepiega.eu", true */ 't', 'a', 'g', 'l', 'i', 'o', 'e', 'p', 'i', 'e', 'g', 'a', '.', 'e', 'u', '\0',
   /* "taglioepiega.it", true */ 't', 'a', 'g', 'l', 'i', 'o', 'e', 'p', 'i', 'e', 'g', 'a', '.', 'i', 't', '\0',
-  /* "tahf.net", true */ 't', 'a', 'h', 'f', '.', 'n', 'e', 't', '\0',
   /* "tailify.com", true */ 't', 'a', 'i', 'l', 'i', 'f', 'y', '.', 'c', 'o', 'm', '\0',
   /* "tailpuff.net", true */ 't', 'a', 'i', 'l', 'p', 'u', 'f', 'f', '.', 'n', 'e', 't', '\0',
   /* "taiwan.dating", true */ 't', 'a', 'i', 'w', 'a', 'n', '.', 'd', 'a', 't', 'i', 'n', 'g', '\0',
@@ -11897,6 +11836,7 @@ static const char kSTSHostTable[] = {
   /* "tante-bugil.net", false */ 't', 'a', 'n', 't', 'e', '-', 'b', 'u', 'g', 'i', 'l', '.', 'n', 'e', 't', '\0',
   /* "tantotiempo.de", true */ 't', 'a', 'n', 't', 'o', 't', 'i', 'e', 'm', 'p', 'o', '.', 'd', 'e', '\0',
   /* "tanze-jetzt.de", true */ 't', 'a', 'n', 'z', 'e', '-', 'j', 'e', 't', 'z', 't', '.', 'd', 'e', '\0',
+  /* "tanzhijun.com", true */ 't', 'a', 'n', 'z', 'h', 'i', 'j', 'u', 'n', '.', 'c', 'o', 'm', '\0',
   /* "taquilla.com", true */ 't', 'a', 'q', 'u', 'i', 'l', 'l', 'a', '.', 'c', 'o', 'm', '\0',
   /* "taranis.re", true */ 't', 'a', 'r', 'a', 'n', 'i', 's', '.', 'r', 'e', '\0',
   /* "tarsan.cz", true */ 't', 'a', 'r', 's', 'a', 'n', '.', 'c', 'z', '\0',
@@ -11918,6 +11858,7 @@ static const char kSTSHostTable[] = {
   /* "taxisafmatosinhos.pt", true */ 't', 'a', 'x', 'i', 's', 'a', 'f', 'm', 'a', 't', 'o', 's', 'i', 'n', 'h', 'o', 's', '.', 'p', 't', '\0',
   /* "taxspeaker.com", true */ 't', 'a', 'x', 's', 'p', 'e', 'a', 'k', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "taxsquirrel.com", true */ 't', 'a', 'x', 's', 'q', 'u', 'i', 'r', 'r', 'e', 'l', '.', 'c', 'o', 'm', '\0',
+  /* "tazj.in", false */ 't', 'a', 'z', 'j', '.', 'i', 'n', '\0',
   /* "tbarter.com", false */ 't', 'b', 'a', 'r', 't', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "tbitc.ch", true */ 't', 'b', 'i', 't', 'c', '.', 'c', 'h', '\0',
   /* "tbrss.com", true */ 't', 'b', 'r', 's', 's', '.', 'c', 'o', 'm', '\0',
@@ -11937,7 +11878,6 @@ static const char kSTSHostTable[] = {
   /* "teahut.net", true */ 't', 'e', 'a', 'h', 'u', 't', '.', 'n', 'e', 't', '\0',
   /* "tealdrones.com", true */ 't', 'e', 'a', 'l', 'd', 'r', 'o', 'n', 'e', 's', '.', 'c', 'o', 'm', '\0',
   /* "team-bbd.com", true */ 't', 'e', 'a', 'm', '-', 'b', 'b', 'd', '.', 'c', 'o', 'm', '\0',
-  /* "team-one.racing", false */ 't', 'e', 'a', 'm', '-', 'o', 'n', 'e', '.', 'r', 'a', 'c', 'i', 'n', 'g', '\0',
   /* "team-teasers.com", true */ 't', 'e', 'a', 'm', '-', 't', 'e', 'a', 's', 'e', 'r', 's', '.', 'c', 'o', 'm', '\0',
   /* "team3482.com", true */ 't', 'e', 'a', 'm', '3', '4', '8', '2', '.', 'c', 'o', 'm', '\0',
   /* "teambeoplay.co.uk", true */ 't', 'e', 'a', 'm', 'b', 'e', 'o', 'p', 'l', 'a', 'y', '.', 'c', 'o', '.', 'u', 'k', '\0',
@@ -11961,7 +11901,6 @@ static const char kSTSHostTable[] = {
   /* "tech-essential.com", true */ 't', 'e', 'c', 'h', '-', 'e', 's', 's', 'e', 'n', 't', 'i', 'a', 'l', '.', 'c', 'o', 'm', '\0',
   /* "tech-rat.com", true */ 't', 'e', 'c', 'h', '-', 'r', 'a', 't', '.', 'c', 'o', 'm', '\0',
   /* "tech-seminar.jp", true */ 't', 'e', 'c', 'h', '-', 's', 'e', 'm', 'i', 'n', 'a', 'r', '.', 'j', 'p', '\0',
-  /* "tech55i.com", true */ 't', 'e', 'c', 'h', '5', '5', 'i', '.', 'c', 'o', 'm', '\0',
   /* "techace.jp", true */ 't', 'e', 'c', 'h', 'a', 'c', 'e', '.', 'j', 'p', '\0',
   /* "techademy.nl", true */ 't', 'e', 'c', 'h', 'a', 'd', 'e', 'm', 'y', '.', 'n', 'l', '\0',
   /* "techandtux.de", true */ 't', 'e', 'c', 'h', 'a', 'n', 'd', 't', 'u', 'x', '.', 'd', 'e', '\0',
@@ -12060,7 +11999,6 @@ static const char kSTSHostTable[] = {
   /* "texy.info", true */ 't', 'e', 'x', 'y', '.', 'i', 'n', 'f', 'o', '\0',
   /* "tf-network.de", true */ 't', 'f', '-', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'd', 'e', '\0',
   /* "tf2b.com", true */ 't', 'f', '2', 'b', '.', 'c', 'o', 'm', '\0',
-  /* "tffans.com", false */ 't', 'f', 'f', 'a', 'n', 's', '.', 'c', 'o', 'm', '\0',
   /* "tflite.com", true */ 't', 'f', 'l', 'i', 't', 'e', '.', 'c', 'o', 'm', '\0',
   /* "tfnapps.de", true */ 't', 'f', 'n', 'a', 'p', 'p', 's', '.', 'd', 'e', '\0',
   /* "tgbyte.com", true */ 't', 'g', 'b', 'y', 't', 'e', '.', 'c', 'o', 'm', '\0',
@@ -12108,7 +12046,6 @@ static const char kSTSHostTable[] = {
   /* "theescapistswiki.com", true */ 't', 'h', 'e', 'e', 's', 'c', 'a', 'p', 'i', 's', 't', 's', 'w', 'i', 'k', 'i', '.', 'c', 'o', 'm', '\0',
   /* "theeyeopener.com", false */ 't', 'h', 'e', 'e', 'y', 'e', 'o', 'p', 'e', 'n', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "thefarbeyond.com", true */ 't', 'h', 'e', 'f', 'a', 'r', 'b', 'e', 'y', 'o', 'n', 'd', '.', 'c', 'o', 'm', '\0',
-  /* "theflowerbasketonline.com", true */ 't', 'h', 'e', 'f', 'l', 'o', 'w', 'e', 'r', 'b', 'a', 's', 'k', 'e', 't', 'o', 'n', 'l', 'i', 'n', 'e', '.', 'c', 'o', 'm', '\0',
   /* "theflyingbear.net", true */ 't', 'h', 'e', 'f', 'l', 'y', 'i', 'n', 'g', 'b', 'e', 'a', 'r', '.', 'n', 'e', 't', '\0',
   /* "thefox.co", true */ 't', 'h', 'e', 'f', 'o', 'x', '.', 'c', 'o', '\0',
   /* "thefreebirds.in", true */ 't', 'h', 'e', 'f', 'r', 'e', 'e', 'b', 'i', 'r', 'd', 's', '.', 'i', 'n', '\0',
@@ -12207,6 +12144,7 @@ static const char kSTSHostTable[] = {
   /* "thinklikeanentrepreneur.com", true */ 't', 'h', 'i', 'n', 'k', 'l', 'i', 'k', 'e', 'a', 'n', 'e', 'n', 't', 'r', 'e', 'p', 'r', 'e', 'n', 'e', 'u', 'r', '.', 'c', 'o', 'm', '\0',
   /* "thinkrealty.com", true */ 't', 'h', 'i', 'n', 'k', 'r', 'e', 'a', 'l', 't', 'y', '.', 'c', 'o', 'm', '\0',
   /* "thinktux.net", true */ 't', 'h', 'i', 'n', 'k', 't', 'u', 'x', '.', 'n', 'e', 't', '\0',
+  /* "thinlyveiledcontempt.com", true */ 't', 'h', 'i', 'n', 'l', 'y', 'v', 'e', 'i', 'l', 'e', 'd', 'c', 'o', 'n', 't', 'e', 'm', 'p', 't', '.', 'c', 'o', 'm', '\0',
   /* "thisbrownman.com", true */ 't', 'h', 'i', 's', 'b', 'r', 'o', 'w', 'n', 'm', 'a', 'n', '.', 'c', 'o', 'm', '\0',
   /* "thisisforager.com", true */ 't', 'h', 'i', 's', 'i', 's', 'f', 'o', 'r', 'a', 'g', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "thisishugo.com", false */ 't', 'h', 'i', 's', 'i', 's', 'h', 'u', 'g', 'o', '.', 'c', 'o', 'm', '\0',
@@ -12219,7 +12157,6 @@ static const char kSTSHostTable[] = {
   /* "thomasgriffin.io", true */ 't', 'h', 'o', 'm', 'a', 's', 'g', 'r', 'i', 'f', 'f', 'i', 'n', '.', 'i', 'o', '\0',
   /* "thomasharvey.me", true */ 't', 'h', 'o', 'm', 'a', 's', 'h', 'a', 'r', 'v', 'e', 'y', '.', 'm', 'e', '\0',
   /* "thomashunter.name", false */ 't', 'h', 'o', 'm', 'a', 's', 'h', 'u', 'n', 't', 'e', 'r', '.', 'n', 'a', 'm', 'e', '\0',
-  /* "thomaskliszowski.fr", false */ 't', 'h', 'o', 'm', 'a', 's', 'k', 'l', 'i', 's', 'z', 'o', 'w', 's', 'k', 'i', '.', 'f', 'r', '\0',
   /* "thomasmeester.nl", true */ 't', 'h', 'o', 'm', 'a', 's', 'm', 'e', 'e', 's', 't', 'e', 'r', '.', 'n', 'l', '\0',
   /* "thomasnet.fr", true */ 't', 'h', 'o', 'm', 'a', 's', 'n', 'e', 't', '.', 'f', 'r', '\0',
   /* "thomasschweizer.net", true */ 't', 'h', 'o', 'm', 'a', 's', 's', 'c', 'h', 'w', 'e', 'i', 'z', 'e', 'r', '.', 'n', 'e', 't', '\0',
@@ -12240,7 +12177,6 @@ static const char kSTSHostTable[] = {
   /* "throwaway.link", true */ 't', 'h', 'r', 'o', 'w', 'a', 'w', 'a', 'y', '.', 'l', 'i', 'n', 'k', '\0',
   /* "throwpass.com", true */ 't', 'h', 'r', 'o', 'w', 'p', 'a', 's', 's', '.', 'c', 'o', 'm', '\0',
   /* "thrx.net", true */ 't', 'h', 'r', 'x', '.', 'n', 'e', 't', '\0',
-  /* "thues.eu", true */ 't', 'h', 'u', 'e', 's', '.', 'e', 'u', '\0',
   /* "thunderfox.nl", true */ 't', 'h', 'u', 'n', 'd', 'e', 'r', 'f', 'o', 'x', '.', 'n', 'l', '\0',
   /* "thundr.eu", true */ 't', 'h', 'u', 'n', 'd', 'r', '.', 'e', 'u', '\0',
   /* "thusoy.com", true */ 't', 'h', 'u', 's', 'o', 'y', '.', 'c', 'o', 'm', '\0',
@@ -12250,6 +12186,7 @@ static const char kSTSHostTable[] = {
   /* "ti.blog.br", true */ 't', 'i', '.', 'b', 'l', 'o', 'g', '.', 'b', 'r', '\0',
   /* "tiacollection.com", true */ 't', 'i', 'a', 'c', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', '.', 'c', 'o', 'm', '\0',
   /* "tianeptine.com", true */ 't', 'i', 'a', 'n', 'e', 'p', 't', 'i', 'n', 'e', '.', 'c', 'o', 'm', '\0',
+  /* "tianshili.me", true */ 't', 'i', 'a', 'n', 's', 'h', 'i', 'l', 'i', '.', 'm', 'e', '\0',
   /* "tianya.tv", true */ 't', 'i', 'a', 'n', 'y', 'a', '.', 't', 'v', '\0',
   /* "tibbitshall.ca", true */ 't', 'i', 'b', 'b', 'i', 't', 's', 'h', 'a', 'l', 'l', '.', 'c', 'a', '\0',
   /* "ticfleet.com", true */ 't', 'i', 'c', 'f', 'l', 'e', 'e', 't', '.', 'c', 'o', 'm', '\0',
@@ -12310,6 +12247,7 @@ static const char kSTSHostTable[] = {
   /* "titiansgirlphotography.com", true */ 't', 'i', 't', 'i', 'a', 'n', 's', 'g', 'i', 'r', 'l', 'p', 'h', 'o', 't', 'o', 'g', 'r', 'a', 'p', 'h', 'y', '.', 'c', 'o', 'm', '\0',
   /* "tjenestetorvet.dk", true */ 't', 'j', 'e', 'n', 'e', 's', 't', 'e', 't', 'o', 'r', 'v', 'e', 't', '.', 'd', 'k', '\0',
   /* "tjs.me", true */ 't', 'j', 's', '.', 'm', 'e', '\0',
+  /* "tkat.ch", true */ 't', 'k', 'a', 't', '.', 'c', 'h', '\0',
   /* "tkn.tokyo", true */ 't', 'k', 'n', '.', 't', 'o', 'k', 'y', 'o', '\0',
   /* "tlach.cz", true */ 't', 'l', 'a', 'c', 'h', '.', 'c', 'z', '\0',
   /* "tlo.link", true */ 't', 'l', 'o', '.', 'l', 'i', 'n', 'k', '\0',
@@ -12322,7 +12260,6 @@ static const char kSTSHostTable[] = {
   /* "tmi-produkter.se", true */ 't', 'm', 'i', '-', 'p', 'r', 'o', 'd', 'u', 'k', 't', 'e', 'r', '.', 's', 'e', '\0',
   /* "tmm.cx", true */ 't', 'm', 'm', '.', 'c', 'x', '\0',
   /* "tmpraider.net", true */ 't', 'm', 'p', 'r', 'a', 'i', 'd', 'e', 'r', '.', 'n', 'e', 't', '\0',
-  /* "tmpsantos.com.br", true */ 't', 'm', 'p', 's', 'a', 'n', 't', 'o', 's', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "tmtopup.com", true */ 't', 'm', 't', 'o', 'p', 'u', 'p', '.', 'c', 'o', 'm', '\0',
   /* "tnes.dk", true */ 't', 'n', 'e', 's', '.', 'd', 'k', '\0',
   /* "tno.io", true */ 't', 'n', 'o', '.', 'i', 'o', '\0',
@@ -12608,7 +12545,6 @@ static const char kSTSHostTable[] = {
   /* "ttz.im", true */ 't', 't', 'z', '.', 'i', 'm', '\0',
   /* "tuamoronline.com", true */ 't', 'u', 'a', 'm', 'o', 'r', 'o', 'n', 'l', 'i', 'n', 'e', '.', 'c', 'o', 'm', '\0',
   /* "tubbutec.de", true */ 't', 'u', 'b', 'b', 'u', 't', 'e', 'c', '.', 'd', 'e', '\0',
-  /* "tubepro.de", true */ 't', 'u', 'b', 'e', 'p', 'r', 'o', '.', 'd', 'e', '\0',
   /* "tubul.net", true */ 't', 'u', 'b', 'u', 'l', '.', 'n', 'e', 't', '\0',
   /* "tucker.wales", true */ 't', 'u', 'c', 'k', 'e', 'r', '.', 'w', 'a', 'l', 'e', 's', '\0',
   /* "tucny.com", true */ 't', 'u', 'c', 'n', 'y', '.', 'c', 'o', 'm', '\0',
@@ -12625,7 +12561,6 @@ static const char kSTSHostTable[] = {
   /* "tunnelwatch.com", true */ 't', 'u', 'n', 'n', 'e', 'l', 'w', 'a', 't', 'c', 'h', '.', 'c', 'o', 'm', '\0',
   /* "tuntitili.fi", true */ 't', 'u', 'n', 't', 'i', 't', 'i', 'l', 'i', '.', 'f', 'i', '\0',
   /* "turbobit.ch", true */ 't', 'u', 'r', 'b', 'o', 'b', 'i', 't', '.', 'c', 'h', '\0',
-  /* "turniker.ru", true */ 't', 'u', 'r', 'n', 'i', 'k', 'e', 'r', '.', 'r', 'u', '\0',
   /* "turnoffthelights.com", true */ 't', 'u', 'r', 'n', 'o', 'f', 'f', 't', 'h', 'e', 'l', 'i', 'g', 'h', 't', 's', '.', 'c', 'o', 'm', '\0',
   /* "tursiae.org", true */ 't', 'u', 'r', 's', 'i', 'a', 'e', '.', 'o', 'r', 'g', '\0',
   /* "turtle.ai", true */ 't', 'u', 'r', 't', 'l', 'e', '.', 'a', 'i', '\0',
@@ -12663,7 +12598,9 @@ static const char kSTSHostTable[] = {
   /* "txi.su", true */ 't', 'x', 'i', '.', 's', 'u', '\0',
   /* "tyche.io", true */ 't', 'y', 'c', 'h', 'e', '.', 'i', 'o', '\0',
   /* "tyl.io", true */ 't', 'y', 'l', '.', 'i', 'o', '\0',
+  /* "tyler.rs", true */ 't', 'y', 'l', 'e', 'r', '.', 'r', 's', '\0',
   /* "tylerfreedman.com", true */ 't', 'y', 'l', 'e', 'r', 'f', 'r', 'e', 'e', 'd', 'm', 'a', 'n', '.', 'c', 'o', 'm', '\0',
+  /* "tyleromeara.com", true */ 't', 'y', 'l', 'e', 'r', 'o', 'm', 'e', 'a', 'r', 'a', '.', 'c', 'o', 'm', '\0',
   /* "tylerschmidtke.com", true */ 't', 'y', 'l', 'e', 'r', 's', 'c', 'h', 'm', 'i', 'd', 't', 'k', 'e', '.', 'c', 'o', 'm', '\0',
   /* "typeblog.net", true */ 't', 'y', 'p', 'e', 'b', 'l', 'o', 'g', '.', 'n', 'e', 't', '\0',
   /* "typecodes.com", true */ 't', 'y', 'p', 'e', 'c', 'o', 'd', 'e', 's', '.', 'c', 'o', 'm', '\0',
@@ -12780,7 +12717,6 @@ static const char kSTSHostTable[] = {
   /* "unit7jazz.org", true */ 'u', 'n', 'i', 't', '7', 'j', 'a', 'z', 'z', '.', 'o', 'r', 'g', '\0',
   /* "united.com", false */ 'u', 'n', 'i', 't', 'e', 'd', '.', 'c', 'o', 'm', '\0',
   /* "unitedadmins.com", true */ 'u', 'n', 'i', 't', 'e', 'd', 'a', 'd', 'm', 'i', 'n', 's', '.', 'c', 'o', 'm', '\0',
-  /* "unitlabs.net", true */ 'u', 'n', 'i', 't', 'l', 'a', 'b', 's', '.', 'n', 'e', 't', '\0',
   /* "universalcarremote.com", true */ 'u', 'n', 'i', 'v', 'e', 'r', 's', 'a', 'l', 'c', 'a', 'r', 'r', 'e', 'm', 'o', 't', 'e', '.', 'c', 'o', 'm', '\0',
   /* "universalpaymentgateway.com", true */ 'u', 'n', 'i', 'v', 'e', 'r', 's', 'a', 'l', 'p', 'a', 'y', 'm', 'e', 'n', 't', 'g', 'a', 't', 'e', 'w', 'a', 'y', '.', 'c', 'o', 'm', '\0',
   /* "universogay.com", true */ 'u', 'n', 'i', 'v', 'e', 'r', 's', 'o', 'g', 'a', 'y', '.', 'c', 'o', 'm', '\0',
@@ -12809,6 +12745,7 @@ static const char kSTSHostTable[] = {
   /* "unveiledgnosis.com", true */ 'u', 'n', 'v', 'e', 'i', 'l', 'e', 'd', 'g', 'n', 'o', 's', 'i', 's', '.', 'c', 'o', 'm', '\0',
   /* "unxicdellum.cat", true */ 'u', 'n', 'x', 'i', 'c', 'd', 'e', 'l', 'l', 'u', 'm', '.', 'c', 'a', 't', '\0',
   /* "unyq.me", false */ 'u', 'n', 'y', 'q', '.', 'm', 'e', '\0',
+  /* "upandclear.org", true */ 'u', 'p', 'a', 'n', 'd', 'c', 'l', 'e', 'a', 'r', '.', 'o', 'r', 'g', '\0',
   /* "upay.ru", true */ 'u', 'p', 'a', 'y', '.', 'r', 'u', '\0',
   /* "upboard.jp", true */ 'u', 'p', 'b', 'o', 'a', 'r', 'd', '.', 'j', 'p', '\0',
   /* "upgauged.com", true */ 'u', 'p', 'g', 'a', 'u', 'g', 'e', 'd', '.', 'c', 'o', 'm', '\0',
@@ -12841,7 +12778,6 @@ static const char kSTSHostTable[] = {
   /* "usbcraft.com", true */ 'u', 's', 'b', 'c', 'r', 'a', 'f', 't', '.', 'c', 'o', 'm', '\0',
   /* "usbirthcertificate.com", false */ 'u', 's', 'b', 'i', 'r', 't', 'h', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '.', 'c', 'o', 'm', '\0',
   /* "usbtypeccompliant.com", true */ 'u', 's', 'b', 't', 'y', 'p', 'e', 'c', 'c', 'o', 'm', 'p', 'l', 'i', 'a', 'n', 't', '.', 'c', 'o', 'm', '\0',
-  /* "uscloud.nl", true */ 'u', 's', 'c', 'l', 'o', 'u', 'd', '.', 'n', 'l', '\0',
   /* "uscurrency.gov", true */ 'u', 's', 'c', 'u', 'r', 'r', 'e', 'n', 'c', 'y', '.', 'g', 'o', 'v', '\0',
   /* "usd.de", true */ 'u', 's', 'd', '.', 'd', 'e', '\0',
   /* "use.be", true */ 'u', 's', 'e', '.', 'b', 'e', '\0',
@@ -12977,7 +12913,6 @@ static const char kSTSHostTable[] = {
   /* "veryapt.com", true */ 'v', 'e', 'r', 'y', 'a', 'p', 't', '.', 'c', 'o', 'm', '\0',
   /* "ves.vn.ua", true */ 'v', 'e', 's', '.', 'v', 'n', '.', 'u', 'a', '\0',
   /* "vespacascadia.com", true */ 'v', 'e', 's', 'p', 'a', 'c', 'a', 's', 'c', 'a', 'd', 'i', 'a', '.', 'c', 'o', 'm', '\0',
-  /* "vestacp.top", true */ 'v', 'e', 's', 't', 'a', 'c', 'p', '.', 't', 'o', 'p', '\0',
   /* "vetdnacenter.com", false */ 'v', 'e', 't', 'd', 'n', 'a', 'c', 'e', 'n', 't', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "veterinaire-cazeres-foucault.fr", true */ 'v', 'e', 't', 'e', 'r', 'i', 'n', 'a', 'i', 'r', 'e', '-', 'c', 'a', 'z', 'e', 'r', 'e', 's', '-', 'f', 'o', 'u', 'c', 'a', 'u', 'l', 't', '.', 'f', 'r', '\0',
   /* "vetinte.eu", true */ 'v', 'e', 't', 'i', 'n', 't', 'e', '.', 'e', 'u', '\0',
@@ -13051,7 +12986,6 @@ static const char kSTSHostTable[] = {
   /* "visibox.nl", true */ 'v', 'i', 's', 'i', 'b', 'o', 'x', '.', 'n', 'l', '\0',
   /* "visioflux-premium.com", true */ 'v', 'i', 's', 'i', 'o', 'f', 'l', 'u', 'x', '-', 'p', 'r', 'e', 'm', 'i', 'u', 'm', '.', 'c', 'o', 'm', '\0',
   /* "visionarymedia.nl", true */ 'v', 'i', 's', 'i', 'o', 'n', 'a', 'r', 'y', 'm', 'e', 'd', 'i', 'a', '.', 'n', 'l', '\0',
-  /* "visionless.me", false */ 'v', 'i', 's', 'i', 'o', 'n', 'l', 'e', 's', 's', '.', 'm', 'e', '\0',
   /* "visiontree.eu", true */ 'v', 'i', 's', 'i', 'o', 'n', 't', 'r', 'e', 'e', '.', 'e', 'u', '\0',
   /* "vispaleistexel.nl", true */ 'v', 'i', 's', 'p', 'a', 'l', 'e', 'i', 's', 't', 'e', 'x', 'e', 'l', '.', 'n', 'l', '\0',
   /* "vissersgrootboek.nl", true */ 'v', 'i', 's', 's', 'e', 'r', 's', 'g', 'r', 'o', 'o', 't', 'b', 'o', 'e', 'k', '.', 'n', 'l', '\0',
@@ -13183,6 +13117,8 @@ static const char kSTSHostTable[] = {
   /* "wantshow.com.br", true */ 'w', 'a', 'n', 't', 's', 'h', 'o', 'w', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "wanybug.cn", true */ 'w', 'a', 'n', 'y', 'b', 'u', 'g', '.', 'c', 'n', '\0',
   /* "wardow.com", true */ 'w', 'a', 'r', 'd', 'o', 'w', '.', 'c', 'o', 'm', '\0',
+  /* "warekon.com", true */ 'w', 'a', 'r', 'e', 'k', 'o', 'n', '.', 'c', 'o', 'm', '\0',
+  /* "warekon.dk", true */ 'w', 'a', 'r', 'e', 'k', 'o', 'n', '.', 'd', 'k', '\0',
   /* "warhaggis.com", true */ 'w', 'a', 'r', 'h', 'a', 'g', 'g', 'i', 's', '.', 'c', 'o', 'm', '\0',
   /* "warlions.info", true */ 'w', 'a', 'r', 'l', 'i', 'o', 'n', 's', '.', 'i', 'n', 'f', 'o', '\0',
   /* "warmestwishes.ca", true */ 'w', 'a', 'r', 'm', 'e', 's', 't', 'w', 'i', 's', 'h', 'e', 's', '.', 'c', 'a', '\0',
@@ -13202,7 +13138,6 @@ static const char kSTSHostTable[] = {
   /* "waterfedpole.com", true */ 'w', 'a', 't', 'e', 'r', 'f', 'e', 'd', 'p', 'o', 'l', 'e', '.', 'c', 'o', 'm', '\0',
   /* "waterforlife.net.au", true */ 'w', 'a', 't', 'e', 'r', 'f', 'o', 'r', 'l', 'i', 'f', 'e', '.', 'n', 'e', 't', '.', 'a', 'u', '\0',
   /* "watersb.org", true */ 'w', 'a', 't', 'e', 'r', 's', 'b', '.', 'o', 'r', 'g', '\0',
-  /* "watertrails.io", true */ 'w', 'a', 't', 'e', 'r', 't', 'r', 'a', 'i', 'l', 's', '.', 'i', 'o', '\0',
   /* "wavesboardshop.com", true */ 'w', 'a', 'v', 'e', 's', 'b', 'o', 'a', 'r', 'd', 's', 'h', 'o', 'p', '.', 'c', 'o', 'm', '\0',
   /* "wawak.pl", true */ 'w', 'a', 'w', 'a', 'k', '.', 'p', 'l', '\0',
   /* "waylaydesign.com", true */ 'w', 'a', 'y', 'l', 'a', 'y', 'd', 'e', 's', 'i', 'g', 'n', '.', 'c', 'o', 'm', '\0',
@@ -13276,7 +13211,6 @@ static const char kSTSHostTable[] = {
   /* "websenat.de", true */ 'w', 'e', 'b', 's', 'e', 'n', 'a', 't', '.', 'd', 'e', '\0',
   /* "webstellung.com", true */ 'w', 'e', 'b', 's', 't', 'e', 'l', 'l', 'u', 'n', 'g', '.', 'c', 'o', 'm', '\0',
   /* "webstore.be", false */ 'w', 'e', 'b', 's', 't', 'o', 'r', 'e', '.', 'b', 'e', '\0',
-  /* "webstory.xyz", true */ 'w', 'e', 'b', 's', 't', 'o', 'r', 'y', '.', 'x', 'y', 'z', '\0',
   /* "webstudio-n.com", true */ 'w', 'e', 'b', 's', 't', 'u', 'd', 'i', 'o', '-', 'n', '.', 'c', 'o', 'm', '\0',
   /* "webstylemedia.com", true */ 'w', 'e', 'b', 's', 't', 'y', 'l', 'e', 'm', 'e', 'd', 'i', 'a', '.', 'c', 'o', 'm', '\0',
   /* "webtalis.nl", true */ 'w', 'e', 'b', 't', 'a', 'l', 'i', 's', '.', 'n', 'l', '\0',
@@ -13414,6 +13348,7 @@ static const char kSTSHostTable[] = {
   /* "wijnservices.nl", false */ 'w', 'i', 'j', 'n', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', '.', 'n', 'l', '\0',
   /* "wiki.python.org", true */ 'w', 'i', 'k', 'i', '.', 'p', 'y', 't', 'h', 'o', 'n', '.', 'o', 'r', 'g', '\0',
   /* "wikibooks.org", true */ 'w', 'i', 'k', 'i', 'b', 'o', 'o', 'k', 's', '.', 'o', 'r', 'g', '\0',
+  /* "wikiclash.info", false */ 'w', 'i', 'k', 'i', 'c', 'l', 'a', 's', 'h', '.', 'i', 'n', 'f', 'o', '\0',
   /* "wikidata.org", true */ 'w', 'i', 'k', 'i', 'd', 'a', 't', 'a', '.', 'o', 'r', 'g', '\0',
   /* "wikidsystems.com", false */ 'w', 'i', 'k', 'i', 'd', 's', 'y', 's', 't', 'e', 'm', 's', '.', 'c', 'o', 'm', '\0',
   /* "wikileaks.com", true */ 'w', 'i', 'k', 'i', 'l', 'e', 'a', 'k', 's', '.', 'c', 'o', 'm', '\0',
@@ -13438,7 +13373,6 @@ static const char kSTSHostTable[] = {
   /* "willi-graf-os.de", true */ 'w', 'i', 'l', 'l', 'i', '-', 'g', 'r', 'a', 'f', '-', 'o', 's', '.', 'd', 'e', '\0',
   /* "williamfeely.info", true */ 'w', 'i', 'l', 'l', 'i', 'a', 'm', 'f', 'e', 'e', 'l', 'y', '.', 'i', 'n', 'f', 'o', '\0',
   /* "williamsapiens.com", true */ 'w', 'i', 'l', 'l', 'i', 'a', 'm', 's', 'a', 'p', 'i', 'e', 'n', 's', '.', 'c', 'o', 'm', '\0',
-  /* "williamsonshore.com", true */ 'w', 'i', 'l', 'l', 'i', 'a', 'm', 's', 'o', 'n', 's', 'h', 'o', 'r', 'e', '.', 'c', 'o', 'm', '\0',
   /* "willnorris.com", true */ 'w', 'i', 'l', 'l', 'n', 'o', 'r', 'r', 'i', 's', '.', 'c', 'o', 'm', '\0',
   /* "wills.co.tt", true */ 'w', 'i', 'l', 'l', 's', '.', 'c', 'o', '.', 't', 't', '\0',
   /* "wilsonovi.com", true */ 'w', 'i', 'l', 's', 'o', 'n', 'o', 'v', 'i', '.', 'c', 'o', 'm', '\0',
@@ -13538,7 +13472,6 @@ static const char kSTSHostTable[] = {
   /* "worldofbelia.de", true */ 'w', 'o', 'r', 'l', 'd', 'o', 'f', 'b', 'e', 'l', 'i', 'a', '.', 'd', 'e', '\0',
   /* "worldpovertysolutions.org", true */ 'w', 'o', 'r', 'l', 'd', 'p', 'o', 'v', 'e', 'r', 't', 'y', 's', 'o', 'l', 'u', 't', 'i', 'o', 'n', 's', '.', 'o', 'r', 'g', '\0',
   /* "worldsbeststory.com", true */ 'w', 'o', 'r', 'l', 'd', 's', 'b', 'e', 's', 't', 's', 't', 'o', 'r', 'y', '.', 'c', 'o', 'm', '\0',
-  /* "wormdisk.net", true */ 'w', 'o', 'r', 'm', 'd', 'i', 's', 'k', '.', 'n', 'e', 't', '\0',
   /* "wormholevpn.net", true */ 'w', 'o', 'r', 'm', 'h', 'o', 'l', 'e', 'v', 'p', 'n', '.', 'n', 'e', 't', '\0',
   /* "worshapp.com", true */ 'w', 'o', 'r', 's', 'h', 'a', 'p', 'p', '.', 'c', 'o', 'm', '\0',
   /* "woufbox.com", true */ 'w', 'o', 'u', 'f', 'b', 'o', 'x', '.', 'c', 'o', 'm', '\0',
@@ -13599,6 +13532,7 @@ static const char kSTSHostTable[] = {
   /* "www.aclu.org", false */ 'w', 'w', 'w', '.', 'a', 'c', 'l', 'u', '.', 'o', 'r', 'g', '\0',
   /* "www.airbnb.com", true */ 'w', 'w', 'w', '.', 'a', 'i', 'r', 'b', 'n', 'b', '.', 'c', 'o', 'm', '\0',
   /* "www.amazon.ca", true */ 'w', 'w', 'w', '.', 'a', 'm', 'a', 'z', 'o', 'n', '.', 'c', 'a', '\0',
+  /* "www.amazon.cn", true */ 'w', 'w', 'w', '.', 'a', 'm', 'a', 'z', 'o', 'n', '.', 'c', 'n', '\0',
   /* "www.amazon.co.jp", true */ 'w', 'w', 'w', '.', 'a', 'm', 'a', 'z', 'o', 'n', '.', 'c', 'o', '.', 'j', 'p', '\0',
   /* "www.amazon.co.uk", true */ 'w', 'w', 'w', '.', 'a', 'm', 'a', 'z', 'o', 'n', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "www.amazon.com", true */ 'w', 'w', 'w', '.', 'a', 'm', 'a', 'z', 'o', 'n', '.', 'c', 'o', 'm', '\0',
@@ -13698,7 +13632,6 @@ static const char kSTSHostTable[] = {
   /* "xg3n1us.de", true */ 'x', 'g', '3', 'n', '1', 'u', 's', '.', 'd', 'e', '\0',
   /* "xgclan.com", true */ 'x', 'g', 'c', 'l', 'a', 'n', '.', 'c', 'o', 'm', '\0',
   /* "xho.me", true */ 'x', 'h', 'o', '.', 'm', 'e', '\0',
-  /* "xia100.xyz", true */ 'x', 'i', 'a', '1', '0', '0', '.', 'x', 'y', 'z', '\0',
   /* "xiamuzi.com", true */ 'x', 'i', 'a', 'm', 'u', 'z', 'i', '.', 'c', 'o', 'm', '\0',
   /* "xiangweiqing.co.uk", true */ 'x', 'i', 'a', 'n', 'g', 'w', 'e', 'i', 'q', 'i', 'n', 'g', '.', 'c', 'o', '.', 'u', 'k', '\0',
   /* "xiaofengsky.com", true */ 'x', 'i', 'a', 'o', 'f', 'e', 'n', 'g', 's', 'k', 'y', '.', 'c', 'o', 'm', '\0',
@@ -13822,7 +13755,6 @@ static const char kSTSHostTable[] = {
   /* "yclan.net", true */ 'y', 'c', 'l', 'a', 'n', '.', 'n', 'e', 't', '\0',
   /* "yecl.net", true */ 'y', 'e', 'c', 'l', '.', 'n', 'e', 't', '\0',
   /* "yenniferallulli.com", true */ 'y', 'e', 'n', 'n', 'i', 'f', 'e', 'r', 'a', 'l', 'l', 'u', 'l', 'l', 'i', '.', 'c', 'o', 'm', '\0',
-  /* "yesdevnull.net", true */ 'y', 'e', 's', 'd', 'e', 'v', 'n', 'u', 'l', 'l', '.', 'n', 'e', 't', '\0',
   /* "yesiammaisey.me", true */ 'y', 'e', 's', 'i', 'a', 'm', 'm', 'a', 'i', 's', 'e', 'y', '.', 'm', 'e', '\0',
   /* "yesonline.asia", false */ 'y', 'e', 's', 'o', 'n', 'l', 'i', 'n', 'e', '.', 'a', 's', 'i', 'a', '\0',
   /* "yesonline.me", false */ 'y', 'e', 's', 'o', 'n', 'l', 'i', 'n', 'e', '.', 'm', 'e', '\0',
@@ -13831,7 +13763,6 @@ static const char kSTSHostTable[] = {
   /* "yetzt.me", false */ 'y', 'e', 't', 'z', 't', '.', 'm', 'e', '\0',
   /* "yhaupenthal.org", true */ 'y', 'h', 'a', 'u', 'p', 'e', 'n', 't', 'h', 'a', 'l', '.', 'o', 'r', 'g', '\0',
   /* "yhb.io", true */ 'y', 'h', 'b', '.', 'i', 'o', '\0',
-  /* "yhori.xyz", true */ 'y', 'h', 'o', 'r', 'i', '.', 'x', 'y', 'z', '\0',
   /* "yhrd.org", true */ 'y', 'h', 'r', 'd', '.', 'o', 'r', 'g', '\0',
   /* "yikzu.cn", true */ 'y', 'i', 'k', 'z', 'u', '.', 'c', 'n', '\0',
   /* "yinfor.com", true */ 'y', 'i', 'n', 'f', 'o', 'r', '.', 'c', 'o', 'm', '\0',
@@ -13936,7 +13867,6 @@ static const char kSTSHostTable[] = {
   /* "zavca.com", true */ 'z', 'a', 'v', 'c', 'a', '.', 'c', 'o', 'm', '\0',
   /* "zbasenem.pl", true */ 'z', 'b', 'a', 's', 'e', 'n', 'e', 'm', '.', 'p', 'l', '\0',
   /* "zbchen.com", true */ 'z', 'b', 'c', 'h', 'e', 'n', '.', 'c', 'o', 'm', '\0',
-  /* "zberger.com", true */ 'z', 'b', 'e', 'r', 'g', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "zbrane-doplnky.cz", true */ 'z', 'b', 'r', 'a', 'n', 'e', '-', 'd', 'o', 'p', 'l', 'n', 'k', 'y', '.', 'c', 'z', '\0',
   /* "zbyga.cz", true */ 'z', 'b', 'y', 'g', 'a', '.', 'c', 'z', '\0',
   /* "zcarot.com", true */ 'z', 'c', 'a', 'r', 'o', 't', '.', 'c', 'o', 'm', '\0',
@@ -13990,12 +13920,14 @@ static const char kSTSHostTable[] = {
   /* "zhihua-lai.com", true */ 'z', 'h', 'i', 'h', 'u', 'a', '-', 'l', 'a', 'i', '.', 'c', 'o', 'm', '\0',
   /* "zhovner.com", true */ 'z', 'h', 'o', 'v', 'n', 'e', 'r', '.', 'c', 'o', 'm', '\0',
   /* "zi0r.com", true */ 'z', 'i', '0', 'r', '.', 'c', 'o', 'm', '\0',
+  /* "zicklam.com", true */ 'z', 'i', 'c', 'k', 'l', 'a', 'm', '.', 'c', 'o', 'm', '\0',
   /* "zifb.in", true */ 'z', 'i', 'f', 'b', '.', 'i', 'n', '\0',
   /* "zigcore.com.br", true */ 'z', 'i', 'g', 'c', 'o', 'r', 'e', '.', 'c', 'o', 'm', '.', 'b', 'r', '\0',
   /* "zihao.me", true */ 'z', 'i', 'h', 'a', 'o', '.', 'm', 'e', '\0',
   /* "ziin.de", false */ 'z', 'i', 'i', 'n', '.', 'd', 'e', '\0',
   /* "zilore.com", true */ 'z', 'i', 'l', 'o', 'r', 'e', '.', 'c', 'o', 'm', '\0',
   /* "zima.io", true */ 'z', 'i', 'm', 'a', '.', 'i', 'o', '\0',
+  /* "zimiao.moe", true */ 'z', 'i', 'm', 'i', 'a', 'o', '.', 'm', 'o', 'e', '\0',
   /* "zinc-x.com", true */ 'z', 'i', 'n', 'c', '-', 'x', '.', 'c', 'o', 'm', '\0',
   /* "zinenapse.info", true */ 'z', 'i', 'n', 'e', 'n', 'a', 'p', 's', 'e', '.', 'i', 'n', 'f', 'o', '\0',
   /* "zingarastore.com", true */ 'z', 'i', 'n', 'g', 'a', 'r', 'a', 's', 't', 'o', 'r', 'e', '.', 'c', 'o', 'm', '\0',
@@ -14004,6 +13936,7 @@ static const char kSTSHostTable[] = {
   /* "zippy-download.de", true */ 'z', 'i', 'p', 'p', 'y', '-', 'd', 'o', 'w', 'n', 'l', 'o', 'a', 'd', '.', 'd', 'e', '\0',
   /* "zittingskalender.be", true */ 'z', 'i', 't', 't', 'i', 'n', 'g', 's', 'k', 'a', 'l', 'e', 'n', 'd', 'e', 'r', '.', 'b', 'e', '\0',
   /* "zixiao.wang", true */ 'z', 'i', 'x', 'i', 'a', 'o', '.', 'w', 'a', 'n', 'g', '\0',
+  /* "ziyuanabc.xyz", true */ 'z', 'i', 'y', 'u', 'a', 'n', 'a', 'b', 'c', '.', 'x', 'y', 'z', '\0',
   /* "zizoo.com", true */ 'z', 'i', 'z', 'o', 'o', '.', 'c', 'o', 'm', '\0',
   /* "zju.tv", true */ 'z', 'j', 'u', '.', 't', 'v', '\0',
   /* "zjubtv.com", true */ 'z', 'j', 'u', 'b', 't', 'v', '.', 'c', 'o', 'm', '\0',
@@ -14130,7 +14063,7 @@ static const nsSTSPreload kSTSPreloadList[] = {
   { 651, true },
   { 662, true },
   { 683, true },
-  { 699, false },
+  { 699, true },
   { 707, true },
   { 732, true },
   { 754, true },
@@ -14194,13930 +14127,13863 @@ static const nsSTSPreload kSTSPreloadList[] = {
   { 1434, true },
   { 1441, true },
   { 1450, true },
-  { 1459, false },
-  { 1475, true },
-  { 1488, true },
-  { 1497, true },
-  { 1516, true },
-  { 1535, true },
-  { 1547, true },
-  { 1561, true },
-  { 1573, true },
-  { 1586, true },
+  { 1459, true },
+  { 1472, true },
+  { 1481, true },
+  { 1500, true },
+  { 1519, true },
+  { 1531, true },
+  { 1545, true },
+  { 1557, true },
+  { 1570, true },
+  { 1578, true },
   { 1594, true },
-  { 1610, true },
-  { 1625, true },
-  { 1637, true },
-  { 1650, true },
-  { 1660, true },
+  { 1609, true },
+  { 1621, true },
+  { 1634, true },
+  { 1644, true },
+  { 1658, true },
   { 1674, true },
-  { 1690, true },
-  { 1704, true },
-  { 1719, true },
-  { 1733, true },
-  { 1741, true },
-  { 1748, true },
-  { 1760, true },
-  { 1771, true },
-  { 1784, true },
-  { 1793, true },
-  { 1805, true },
-  { 1816, true },
-  { 1829, true },
-  { 1837, false },
-  { 1846, false },
-  { 1859, true },
-  { 1867, true },
-  { 1879, true },
-  { 1891, true },
-  { 1906, true },
-  { 1925, true },
-  { 1932, false },
+  { 1688, true },
+  { 1703, true },
+  { 1717, true },
+  { 1725, true },
+  { 1732, true },
+  { 1744, true },
+  { 1755, true },
+  { 1768, true },
+  { 1777, true },
+  { 1789, true },
+  { 1800, true },
+  { 1813, true },
+  { 1821, false },
+  { 1830, false },
+  { 1843, true },
+  { 1851, true },
+  { 1863, true },
+  { 1875, true },
+  { 1890, true },
+  { 1909, true },
+  { 1916, false },
+  { 1935, true },
+  { 1945, true },
   { 1951, true },
-  { 1961, true },
-  { 1967, true },
-  { 1976, true },
-  { 1989, true },
-  { 2001, true },
-  { 2010, true },
-  { 2023, true },
-  { 2033, true },
-  { 2041, false },
-  { 2048, true },
-  { 2059, true },
-  { 2071, true },
-  { 2079, true },
+  { 1960, true },
+  { 1973, true },
+  { 1985, true },
+  { 1994, true },
+  { 2007, true },
+  { 2017, true },
+  { 2025, false },
+  { 2032, true },
+  { 2043, true },
+  { 2055, true },
+  { 2063, true },
+  { 2076, true },
+  { 2083, true },
   { 2092, true },
-  { 2099, true },
-  { 2108, true },
-  { 2120, true },
-  { 2129, true },
-  { 2150, true },
-  { 2174, true },
-  { 2189, true },
-  { 2200, true },
-  { 2213, true },
-  { 2225, true },
-  { 2237, true },
-  { 2247, true },
+  { 2104, true },
+  { 2113, true },
+  { 2134, true },
+  { 2158, true },
+  { 2173, true },
+  { 2184, true },
+  { 2197, true },
+  { 2209, true },
+  { 2221, true },
+  { 2231, true },
+  { 2248, true },
+  { 2255, true },
   { 2264, true },
-  { 2271, true },
-  { 2280, true },
-  { 2301, true },
-  { 2314, false },
-  { 2327, true },
-  { 2337, true },
-  { 2390, true },
-  { 2402, true },
-  { 2411, true },
-  { 2420, true },
-  { 2430, true },
-  { 2440, true },
-  { 2451, true },
-  { 2459, true },
-  { 2471, true },
-  { 2481, true },
-  { 2500, true },
-  { 2511, true },
-  { 2522, true },
-  { 2531, true },
-  { 2544, true },
-  { 2564, true },
-  { 2579, true },
-  { 2594, true },
-  { 2602, true },
-  { 2612, true },
-  { 2629, true },
-  { 2644, true },
-  { 2654, true },
-  { 2661, true },
-  { 2672, true },
-  { 2687, true },
-  { 2706, true },
-  { 2716, true },
-  { 2727, true },
-  { 2745, true },
-  { 2756, true },
-  { 2770, true },
-  { 2782, true },
+  { 2285, true },
+  { 2298, false },
+  { 2311, true },
+  { 2321, true },
+  { 2374, true },
+  { 2386, true },
+  { 2395, true },
+  { 2404, true },
+  { 2414, true },
+  { 2424, true },
+  { 2435, true },
+  { 2443, true },
+  { 2455, true },
+  { 2465, true },
+  { 2484, true },
+  { 2495, true },
+  { 2506, true },
+  { 2515, true },
+  { 2528, true },
+  { 2548, true },
+  { 2563, true },
+  { 2578, true },
+  { 2586, true },
+  { 2596, true },
+  { 2613, true },
+  { 2628, true },
+  { 2638, true },
+  { 2645, true },
+  { 2656, true },
+  { 2671, true },
+  { 2690, true },
+  { 2700, true },
+  { 2711, true },
+  { 2729, true },
+  { 2740, true },
+  { 2754, true },
+  { 2766, true },
+  { 2788, true },
   { 2804, true },
-  { 2820, true },
+  { 2815, false },
   { 2831, false },
-  { 2847, false },
-  { 2859, true },
-  { 2872, true },
-  { 2885, true },
-  { 2902, true },
-  { 2927, false },
-  { 2935, true },
-  { 2959, true },
-  { 2972, true },
-  { 2984, true },
-  { 2995, true },
-  { 3019, true },
-  { 3032, true },
-  { 3041, true },
-  { 3058, true },
-  { 3070, true },
-  { 3089, true },
-  { 3112, true },
+  { 2843, true },
+  { 2856, true },
+  { 2869, true },
+  { 2886, true },
+  { 2911, false },
+  { 2919, true },
+  { 2943, true },
+  { 2956, true },
+  { 2968, true },
+  { 2979, true },
+  { 3003, true },
+  { 3016, true },
+  { 3025, true },
+  { 3042, true },
+  { 3054, true },
+  { 3073, true },
+  { 3096, true },
+  { 3110, true },
   { 3126, true },
-  { 3142, true },
-  { 3155, true },
-  { 3172, true },
-  { 3192, true },
-  { 3207, true },
-  { 3228, true },
-  { 3248, true },
-  { 3260, true },
-  { 3271, true },
-  { 3290, false },
-  { 3297, true },
-  { 3309, true },
-  { 3330, true },
-  { 3342, true },
-  { 3359, true },
+  { 3139, true },
+  { 3156, true },
+  { 3176, true },
+  { 3191, true },
+  { 3212, true },
+  { 3232, true },
+  { 3244, true },
+  { 3255, true },
+  { 3274, false },
+  { 3281, true },
+  { 3302, true },
+  { 3314, true },
+  { 3331, true },
+  { 3344, true },
+  { 3360, true },
   { 3372, true },
-  { 3388, true },
-  { 3400, true },
-  { 3413, false },
-  { 3422, false },
-  { 3432, true },
-  { 3447, true },
-  { 3464, true },
-  { 3480, true },
-  { 3491, true },
-  { 3503, true },
-  { 3524, false },
-  { 3534, true },
-  { 3549, true },
-  { 3563, false },
-  { 3576, true },
-  { 3585, true },
-  { 3599, true },
+  { 3385, false },
+  { 3394, false },
+  { 3404, true },
+  { 3419, true },
+  { 3436, true },
+  { 3452, true },
+  { 3463, true },
+  { 3475, true },
+  { 3496, false },
+  { 3506, true },
+  { 3521, true },
+  { 3535, false },
+  { 3548, true },
+  { 3557, true },
+  { 3571, true },
+  { 3583, true },
+  { 3598, true },
   { 3611, true },
-  { 3626, true },
-  { 3639, true },
-  { 3651, true },
-  { 3663, true },
-  { 3675, true },
-  { 3687, true },
-  { 3699, true },
-  { 3707, true },
-  { 3718, true },
-  { 3732, true },
-  { 3748, true },
-  { 3761, true },
-  { 3778, true },
-  { 3793, true },
-  { 3808, true },
-  { 3826, true },
-  { 3835, true },
-  { 3848, true },
-  { 3869, true },
-  { 3878, true },
-  { 3888, true },
-  { 3913, true },
-  { 3924, true },
-  { 3943, true },
-  { 3955, true },
-  { 3974, true },
-  { 3993, true },
-  { 4012, true },
-  { 4024, true },
-  { 4039, true },
-  { 4050, true },
-  { 4063, true },
-  { 4075, true },
-  { 4088, true },
-  { 4102, true },
-  { 4113, true },
-  { 4122, true },
-  { 4136, true },
-  { 4148, true },
-  { 4175, true },
-  { 4201, true },
-  { 4214, true },
-  { 4225, true },
-  { 4249, true },
+  { 3623, true },
+  { 3635, true },
+  { 3647, true },
+  { 3659, true },
+  { 3671, true },
+  { 3679, true },
+  { 3690, true },
+  { 3704, true },
+  { 3720, true },
+  { 3733, true },
+  { 3750, true },
+  { 3765, true },
+  { 3780, true },
+  { 3798, true },
+  { 3807, true },
+  { 3820, true },
+  { 3841, true },
+  { 3850, true },
+  { 3860, true },
+  { 3885, true },
+  { 3896, true },
+  { 3915, true },
+  { 3927, true },
+  { 3946, true },
+  { 3965, true },
+  { 3984, true },
+  { 3996, true },
+  { 4011, true },
+  { 4022, true },
+  { 4035, true },
+  { 4047, true },
+  { 4060, true },
+  { 4074, true },
+  { 4085, true },
+  { 4094, true },
+  { 4108, true },
+  { 4120, true },
+  { 4147, true },
+  { 4173, true },
+  { 4186, true },
+  { 4197, true },
+  { 4221, true },
+  { 4238, true },
   { 4266, true },
-  { 4294, true },
-  { 4310, true },
-  { 4319, true },
-  { 4329, true },
-  { 4343, true },
-  { 4362, true },
-  { 4372, true },
-  { 4386, true },
-  { 4394, false },
-  { 4415, true },
+  { 4282, true },
+  { 4291, true },
+  { 4301, true },
+  { 4315, true },
+  { 4334, true },
+  { 4344, true },
+  { 4358, true },
+  { 4366, false },
+  { 4387, true },
+  { 4405, true },
+  { 4414, true },
   { 4433, true },
-  { 4442, true },
-  { 4461, true },
-  { 4475, true },
-  { 4494, true },
-  { 4507, true },
-  { 4518, true },
-  { 4538, true },
-  { 4556, true },
-  { 4574, false },
-  { 4593, true },
-  { 4607, true },
-  { 4628, true },
-  { 4644, true },
-  { 4654, true },
-  { 4667, true },
+  { 4447, true },
+  { 4466, true },
+  { 4479, true },
+  { 4490, true },
+  { 4510, true },
+  { 4528, true },
+  { 4546, false },
+  { 4565, true },
+  { 4579, true },
+  { 4600, true },
+  { 4616, true },
+  { 4626, true },
+  { 4639, true },
+  { 4652, true },
+  { 4666, true },
   { 4680, true },
-  { 4694, true },
-  { 4708, true },
-  { 4718, true },
-  { 4728, true },
-  { 4738, true },
-  { 4748, true },
-  { 4758, true },
-  { 4768, true },
-  { 4785, true },
-  { 4795, false },
-  { 4803, true },
-  { 4814, true },
-  { 4825, true },
-  { 4836, true },
-  { 4845, true },
+  { 4690, true },
+  { 4700, true },
+  { 4710, true },
+  { 4720, true },
+  { 4730, true },
+  { 4740, true },
+  { 4757, true },
+  { 4767, false },
+  { 4775, true },
+  { 4786, true },
+  { 4797, true },
+  { 4808, true },
+  { 4817, true },
+  { 4837, true },
+  { 4848, true },
   { 4865, true },
-  { 4876, true },
-  { 4893, true },
-  { 4917, true },
-  { 4931, true },
+  { 4889, true },
+  { 4903, true },
+  { 4922, true },
+  { 4934, true },
   { 4950, true },
-  { 4962, true },
-  { 4978, true },
-  { 4989, true },
-  { 5003, true },
-  { 5019, true },
-  { 5034, true },
-  { 5042, true },
-  { 5059, true },
-  { 5071, true },
-  { 5088, true },
-  { 5096, false },
-  { 5112, true },
-  { 5120, true },
-  { 5134, true },
-  { 5146, true },
-  { 5159, true },
-  { 5171, true },
-  { 5183, true },
-  { 5197, true },
+  { 4961, true },
+  { 4975, true },
+  { 4991, true },
+  { 5006, true },
+  { 5014, true },
+  { 5031, true },
+  { 5043, true },
+  { 5060, true },
+  { 5068, false },
+  { 5084, true },
+  { 5092, true },
+  { 5106, true },
+  { 5118, true },
+  { 5131, true },
+  { 5143, true },
+  { 5155, true },
+  { 5169, true },
+  { 5181, true },
+  { 5191, true },
+  { 5199, true },
   { 5209, true },
-  { 5219, true },
-  { 5227, true },
-  { 5237, true },
-  { 5251, true },
-  { 5264, true },
-  { 5276, true },
-  { 5295, true },
-  { 5314, true },
-  { 5347, true },
-  { 5357, true },
-  { 5371, true },
-  { 5378, true },
-  { 5395, true },
-  { 5404, true },
-  { 5411, true },
-  { 5425, true },
-  { 5433, true },
-  { 5444, true },
-  { 5459, true },
-  { 5474, true },
-  { 5491, true },
-  { 5501, true },
-  { 5512, true },
-  { 5527, true },
-  { 5538, true },
-  { 5550, true },
-  { 5561, true },
-  { 5581, true },
-  { 5592, true },
-  { 5603, true },
-  { 5614, true },
-  { 5627, true },
-  { 5645, true },
-  { 5657, true },
-  { 5666, true },
+  { 5223, true },
+  { 5236, true },
+  { 5248, true },
+  { 5267, true },
+  { 5286, true },
+  { 5319, true },
+  { 5329, true },
+  { 5343, true },
+  { 5350, true },
+  { 5367, true },
+  { 5376, true },
+  { 5383, true },
+  { 5397, true },
+  { 5405, true },
+  { 5416, true },
+  { 5431, true },
+  { 5446, true },
+  { 5463, true },
+  { 5473, true },
+  { 5484, true },
+  { 5499, true },
+  { 5510, true },
+  { 5522, true },
+  { 5533, true },
+  { 5553, true },
+  { 5564, true },
+  { 5575, true },
+  { 5586, true },
+  { 5599, true },
+  { 5617, true },
+  { 5629, true },
+  { 5638, true },
+  { 5652, true },
+  { 5663, true },
   { 5680, true },
   { 5691, true },
-  { 5708, true },
-  { 5719, true },
-  { 5727, true },
-  { 5736, false },
-  { 5762, true },
-  { 5773, true },
-  { 5783, false },
-  { 5800, true },
-  { 5810, true },
-  { 5824, true },
-  { 5836, true },
-  { 5853, true },
-  { 5860, true },
-  { 5884, true },
-  { 5900, true },
-  { 5920, true },
-  { 5945, true },
-  { 5970, true },
-  { 5995, true },
-  { 6007, true },
-  { 6019, true },
-  { 6028, true },
-  { 6055, true },
-  { 6068, false },
-  { 6077, true },
+  { 5699, true },
+  { 5708, false },
+  { 5734, true },
+  { 5745, true },
+  { 5755, false },
+  { 5772, true },
+  { 5782, true },
+  { 5796, true },
+  { 5808, true },
+  { 5825, true },
+  { 5832, true },
+  { 5856, true },
+  { 5872, true },
+  { 5892, true },
+  { 5917, true },
+  { 5942, true },
+  { 5967, true },
+  { 5979, true },
+  { 5991, true },
+  { 6000, true },
+  { 6027, true },
+  { 6040, false },
+  { 6049, true },
+  { 6065, true },
+  { 6081, true },
   { 6093, true },
-  { 6109, true },
-  { 6121, true },
-  { 6135, true },
-  { 6155, true },
-  { 6170, true },
-  { 6191, true },
-  { 6203, true },
-  { 6213, true },
-  { 6225, true },
-  { 6237, true },
-  { 6246, true },
-  { 6258, true },
-  { 6277, true },
-  { 6290, true },
-  { 6301, true },
+  { 6107, true },
+  { 6127, true },
+  { 6142, true },
+  { 6163, true },
+  { 6175, true },
+  { 6185, true },
+  { 6197, true },
+  { 6209, true },
+  { 6218, true },
+  { 6230, true },
+  { 6249, true },
+  { 6262, true },
+  { 6273, true },
+  { 6282, true },
+  { 6296, true },
   { 6310, true },
-  { 6324, true },
-  { 6338, true },
-  { 6354, true },
-  { 6370, true },
-  { 6390, true },
-  { 6411, true },
-  { 6425, true },
-  { 6435, true },
-  { 6450, true },
-  { 6460, true },
-  { 6475, true },
-  { 6493, true },
-  { 6507, true },
-  { 6519, true },
-  { 6534, true },
-  { 6548, true },
-  { 6563, true },
-  { 6573, true },
-  { 6587, true },
-  { 6604, true },
-  { 6619, true },
-  { 6633, true },
-  { 6647, true },
-  { 6663, true },
-  { 6675, false },
-  { 6690, true },
-  { 6702, true },
-  { 6717, true },
-  { 6731, true },
-  { 6753, true },
-  { 6765, true },
-  { 6786, true },
+  { 6326, true },
+  { 6342, true },
+  { 6362, true },
+  { 6383, true },
+  { 6397, true },
+  { 6412, true },
+  { 6422, true },
+  { 6437, true },
+  { 6455, true },
+  { 6469, true },
+  { 6481, true },
+  { 6496, true },
+  { 6510, true },
+  { 6525, true },
+  { 6535, true },
+  { 6549, true },
+  { 6566, true },
+  { 6581, true },
+  { 6595, true },
+  { 6609, true },
+  { 6625, true },
+  { 6637, false },
+  { 6652, true },
+  { 6664, true },
+  { 6679, true },
+  { 6693, true },
+  { 6715, true },
+  { 6727, true },
+  { 6748, true },
+  { 6760, true },
+  { 6773, true },
+  { 6785, true },
   { 6798, true },
-  { 6811, true },
-  { 6823, true },
-  { 6836, true },
+  { 6813, true },
+  { 6824, true },
+  { 6840, true },
   { 6851, true },
-  { 6862, true },
-  { 6878, true },
-  { 6889, true },
-  { 6901, true },
+  { 6863, true },
+  { 6876, true },
+  { 6896, true },
   { 6914, true },
-  { 6934, true },
-  { 6947, true },
-  { 6965, true },
-  { 6982, true },
-  { 7006, true },
-  { 7025, true },
-  { 7036, true },
-  { 7050, true },
-  { 7066, true },
-  { 7085, true },
-  { 7098, true },
-  { 7119, true },
-  { 7139, true },
-  { 7159, true },
-  { 7172, false },
-  { 7185, true },
-  { 7197, true },
-  { 7207, true },
-  { 7220, true },
-  { 7234, true },
-  { 7250, true },
-  { 7264, true },
-  { 7280, true },
-  { 7292, true },
-  { 7306, true },
-  { 7319, true },
-  { 7333, true },
-  { 7341, true },
-  { 7354, true },
-  { 7369, true },
-  { 7388, true },
-  { 7400, true },
-  { 7414, true },
-  { 7428, true },
-  { 7440, true },
-  { 7455, true },
-  { 7466, true },
-  { 7477, true },
+  { 6931, true },
+  { 6955, true },
+  { 6974, true },
+  { 6985, true },
+  { 6999, true },
+  { 7015, true },
+  { 7034, true },
+  { 7047, true },
+  { 7068, true },
+  { 7088, true },
+  { 7108, true },
+  { 7121, false },
+  { 7134, true },
+  { 7146, true },
+  { 7156, true },
+  { 7169, true },
+  { 7183, true },
+  { 7199, true },
+  { 7213, true },
+  { 7229, true },
+  { 7241, true },
+  { 7255, true },
+  { 7268, true },
+  { 7282, true },
+  { 7290, true },
+  { 7303, true },
+  { 7318, true },
+  { 7337, true },
+  { 7349, true },
+  { 7363, true },
+  { 7377, true },
+  { 7389, true },
+  { 7404, true },
+  { 7415, true },
+  { 7426, true },
+  { 7438, true },
+  { 7446, true },
+  { 7457, true },
+  { 7465, true },
+  { 7473, true },
+  { 7481, true },
   { 7489, true },
-  { 7497, true },
-  { 7508, true },
-  { 7516, true },
-  { 7524, true },
+  { 7502, true },
+  { 7509, true },
+  { 7519, true },
   { 7532, true },
-  { 7540, true },
-  { 7553, true },
-  { 7560, true },
-  { 7570, true },
-  { 7583, true },
-  { 7595, true },
-  { 7608, true },
-  { 7628, true },
+  { 7544, true },
+  { 7557, true },
+  { 7577, true },
+  { 7589, true },
+  { 7600, true },
+  { 7618, true },
+  { 7631, true },
   { 7640, true },
-  { 7651, true },
-  { 7669, true },
-  { 7682, true },
-  { 7691, true },
-  { 7703, true },
-  { 7717, true },
-  { 7730, true },
+  { 7652, true },
+  { 7666, true },
+  { 7679, true },
+  { 7690, true },
+  { 7700, true },
+  { 7711, true },
+  { 7721, true },
+  { 7732, true },
   { 7741, true },
-  { 7751, true },
-  { 7762, true },
-  { 7772, true },
-  { 7783, true },
-  { 7792, true },
-  { 7801, true },
-  { 7817, true },
-  { 7833, true },
-  { 7861, true },
-  { 7880, true },
-  { 7895, true },
-  { 7915, true },
-  { 7927, true },
-  { 7939, true },
-  { 7950, true },
-  { 7965, true },
-  { 7985, true },
-  { 8003, true },
-  { 8013, false },
-  { 8024, true },
-  { 8034, true },
-  { 8051, true },
-  { 8062, true },
-  { 8071, true },
-  { 8082, true },
-  { 8101, true },
-  { 8112, true },
-  { 8130, true },
+  { 7750, true },
+  { 7766, true },
+  { 7782, true },
+  { 7810, true },
+  { 7829, true },
+  { 7844, true },
+  { 7864, true },
+  { 7876, true },
+  { 7888, true },
+  { 7899, true },
+  { 7914, true },
+  { 7934, true },
+  { 7952, true },
+  { 7962, false },
+  { 7973, true },
+  { 7983, true },
+  { 8000, true },
+  { 8011, true },
+  { 8020, true },
+  { 8031, true },
+  { 8050, true },
+  { 8061, true },
+  { 8079, true },
+  { 8105, true },
+  { 8127, true },
+  { 8141, true },
   { 8156, true },
-  { 8178, true },
-  { 8192, true },
-  { 8207, true },
-  { 8221, true },
-  { 8235, true },
-  { 8250, true },
-  { 8271, true },
-  { 8281, true },
-  { 8292, true },
-  { 8313, true },
-  { 8331, true },
-  { 8344, true },
-  { 8352, true },
-  { 8365, true },
-  { 8379, true },
-  { 8397, true },
-  { 8419, true },
-  { 8434, true },
-  { 8451, true },
-  { 8473, true },
-  { 8488, true },
-  { 8505, true },
-  { 8521, true },
+  { 8170, true },
+  { 8184, true },
+  { 8199, true },
+  { 8220, true },
+  { 8230, true },
+  { 8241, true },
+  { 8262, true },
+  { 8280, true },
+  { 8293, true },
+  { 8301, true },
+  { 8314, true },
+  { 8328, true },
+  { 8346, true },
+  { 8368, true },
+  { 8383, true },
+  { 8400, true },
+  { 8422, true },
+  { 8437, true },
+  { 8454, true },
+  { 8470, true },
+  { 8486, true },
+  { 8503, true },
+  { 8518, true },
   { 8537, true },
   { 8554, true },
-  { 8569, true },
-  { 8588, true },
-  { 8605, true },
-  { 8622, true },
-  { 8634, true },
-  { 8652, true },
-  { 8669, true },
-  { 8684, true },
-  { 8698, true },
-  { 8715, true },
-  { 8733, true },
-  { 8748, true },
-  { 8760, true },
-  { 8773, true },
-  { 8793, true },
-  { 8804, true },
-  { 8815, true },
-  { 8826, true },
-  { 8837, true },
-  { 8848, true },
-  { 8859, true },
-  { 8871, true },
-  { 8884, true },
-  { 8903, true },
-  { 8914, true },
+  { 8571, true },
+  { 8583, true },
+  { 8601, true },
+  { 8618, true },
+  { 8633, true },
+  { 8647, true },
+  { 8664, true },
+  { 8682, true },
+  { 8697, true },
+  { 8709, true },
+  { 8722, true },
+  { 8742, true },
+  { 8753, true },
+  { 8764, true },
+  { 8775, true },
+  { 8786, true },
+  { 8798, true },
+  { 8811, true },
+  { 8830, true },
+  { 8841, true },
+  { 8854, true },
+  { 8868, false },
+  { 8881, false },
+  { 8890, true },
+  { 8907, true },
   { 8927, true },
-  { 8941, false },
-  { 8954, false },
-  { 8963, true },
-  { 8980, true },
-  { 9000, true },
-  { 9011, true },
-  { 9029, true },
-  { 9061, true },
-  { 9088, true },
-  { 9098, true },
-  { 9116, true },
-  { 9131, true },
-  { 9143, true },
-  { 9155, true },
-  { 9175, true },
-  { 9194, true },
-  { 9214, true },
-  { 9237, true },
-  { 9261, true },
-  { 9273, true },
-  { 9284, true },
-  { 9296, true },
-  { 9308, true },
-  { 9324, true },
-  { 9341, true },
-  { 9360, true },
-  { 9374, true },
-  { 9385, true },
-  { 9396, true },
-  { 9409, true },
-  { 9421, false },
-  { 9445, true },
-  { 9461, true },
-  { 9477, true },
-  { 9489, true },
-  { 9505, true },
+  { 8938, true },
+  { 8956, true },
+  { 8988, true },
+  { 9015, true },
+  { 9025, true },
+  { 9043, true },
+  { 9058, true },
+  { 9070, true },
+  { 9082, true },
+  { 9102, true },
+  { 9121, true },
+  { 9141, true },
+  { 9164, true },
+  { 9188, true },
+  { 9200, true },
+  { 9211, true },
+  { 9223, true },
+  { 9235, true },
+  { 9251, true },
+  { 9268, true },
+  { 9287, true },
+  { 9301, true },
+  { 9312, true },
+  { 9323, true },
+  { 9336, true },
+  { 9348, false },
+  { 9372, true },
+  { 9388, true },
+  { 9404, true },
+  { 9416, true },
+  { 9432, true },
+  { 9449, true },
+  { 9463, true },
+  { 9474, true },
+  { 9492, true },
+  { 9508, true },
   { 9522, true },
-  { 9536, true },
+  { 9537, true },
   { 9547, true },
-  { 9565, true },
-  { 9581, true },
-  { 9595, true },
-  { 9610, true },
-  { 9620, true },
-  { 9637, true },
-  { 9650, true },
-  { 9663, true },
-  { 9679, true },
-  { 9690, true },
-  { 9702, true },
-  { 9713, true },
-  { 9720, true },
-  { 9728, true },
-  { 9741, false },
-  { 9749, true },
-  { 9759, true },
-  { 9773, false },
-  { 9787, true },
-  { 9803, true },
-  { 9833, true },
-  { 9856, true },
-  { 9869, true },
-  { 9888, true },
-  { 9901, false },
-  { 9920, true },
-  { 9936, false },
-  { 9952, true },
-  { 9968, false },
-  { 9983, false },
-  { 9996, true },
-  { 10012, true },
-  { 10024, true },
-  { 10043, true },
-  { 10058, true },
-  { 10079, true },
-  { 10092, true },
-  { 10105, true },
-  { 10115, true },
-  { 10126, true },
-  { 10137, true },
-  { 10151, true },
+  { 9564, true },
+  { 9577, true },
+  { 9590, true },
+  { 9606, true },
+  { 9617, true },
+  { 9629, true },
+  { 9640, true },
+  { 9647, true },
+  { 9655, true },
+  { 9668, false },
+  { 9676, true },
+  { 9686, true },
+  { 9700, false },
+  { 9714, true },
+  { 9730, true },
+  { 9760, true },
+  { 9783, true },
+  { 9796, true },
+  { 9815, true },
+  { 9828, false },
+  { 9847, true },
+  { 9863, false },
+  { 9879, true },
+  { 9895, false },
+  { 9910, false },
+  { 9923, true },
+  { 9939, true },
+  { 9951, true },
+  { 9970, true },
+  { 9985, true },
+  { 10006, true },
+  { 10019, true },
+  { 10032, true },
+  { 10042, true },
+  { 10053, true },
+  { 10064, true },
+  { 10078, true },
+  { 10094, true },
+  { 10111, false },
+  { 10128, true },
+  { 10141, true },
   { 10167, true },
-  { 10184, false },
-  { 10201, true },
-  { 10214, true },
-  { 10240, true },
-  { 10253, true },
-  { 10267, true },
-  { 10286, true },
-  { 10307, true },
-  { 10319, true },
-  { 10333, true },
+  { 10180, true },
+  { 10194, true },
+  { 10213, true },
+  { 10234, true },
+  { 10246, true },
+  { 10260, true },
+  { 10284, true },
+  { 10297, true },
+  { 10310, true },
+  { 10324, true },
+  { 10335, true },
+  { 10344, true },
   { 10357, true },
   { 10370, true },
-  { 10383, true },
-  { 10397, true },
-  { 10408, true },
-  { 10417, true },
-  { 10430, true },
-  { 10443, true },
-  { 10455, false },
-  { 10473, true },
-  { 10496, true },
-  { 10523, true },
-  { 10542, true },
-  { 10562, true },
-  { 10573, true },
-  { 10585, true },
-  { 10599, true },
-  { 10607, true },
-  { 10624, true },
-  { 10637, true },
-  { 10649, true },
-  { 10667, true },
-  { 10690, false },
-  { 10706, true },
-  { 10712, true },
-  { 10724, true },
-  { 10735, true },
-  { 10752, true },
-  { 10771, true },
-  { 10783, true },
-  { 10812, true },
-  { 10828, true },
-  { 10841, true },
-  { 10855, true },
-  { 10871, true },
-  { 10884, true },
-  { 10895, true },
-  { 10904, true },
-  { 10916, true },
-  { 10932, true },
-  { 10946, true },
-  { 10962, true },
+  { 10382, false },
+  { 10400, true },
+  { 10423, true },
+  { 10450, true },
+  { 10469, true },
+  { 10489, true },
+  { 10500, true },
+  { 10512, true },
+  { 10526, true },
+  { 10534, true },
+  { 10551, true },
+  { 10564, true },
+  { 10576, true },
+  { 10594, true },
+  { 10617, false },
+  { 10633, true },
+  { 10639, true },
+  { 10651, true },
+  { 10662, true },
+  { 10679, true },
+  { 10698, true },
+  { 10710, true },
+  { 10739, true },
+  { 10755, true },
+  { 10768, true },
+  { 10782, true },
+  { 10798, true },
+  { 10811, true },
+  { 10822, true },
+  { 10831, true },
+  { 10843, true },
+  { 10859, true },
+  { 10873, true },
+  { 10889, true },
+  { 10903, true },
+  { 10917, true },
+  { 10937, true },
+  { 10949, true },
+  { 10963, false },
   { 10976, true },
-  { 10990, true },
-  { 11010, true },
-  { 11022, true },
-  { 11038, true },
-  { 11052, false },
-  { 11065, true },
-  { 11080, true },
-  { 11094, true },
-  { 11103, true },
-  { 11115, true },
-  { 11133, true },
-  { 11146, true },
-  { 11156, true },
-  { 11170, true },
-  { 11196, true },
-  { 11206, true },
-  { 11220, true },
+  { 10991, true },
+  { 11005, true },
+  { 11014, true },
+  { 11026, true },
+  { 11044, true },
+  { 11057, true },
+  { 11067, true },
+  { 11081, true },
+  { 11107, true },
+  { 11117, true },
+  { 11131, true },
+  { 11145, true },
+  { 11163, true },
+  { 11181, false },
+  { 11197, true },
+  { 11207, true },
+  { 11218, true },
   { 11234, true },
-  { 11252, true },
-  { 11270, false },
+  { 11242, true },
+  { 11250, true },
+  { 11261, true },
+  { 11271, true },
   { 11286, true },
-  { 11296, true },
-  { 11307, true },
-  { 11323, true },
-  { 11331, true },
-  { 11339, true },
-  { 11350, true },
-  { 11360, true },
-  { 11375, true },
-  { 11394, true },
-  { 11407, true },
+  { 11305, true },
+  { 11318, true },
+  { 11333, true },
+  { 11351, false },
+  { 11366, true },
+  { 11386, true },
+  { 11397, true },
+  { 11409, true },
   { 11422, true },
-  { 11440, false },
-  { 11455, true },
-  { 11475, true },
-  { 11486, true },
-  { 11498, true },
-  { 11511, true },
-  { 11531, false },
-  { 11545, true },
-  { 11558, true },
-  { 11576, true },
-  { 11590, true },
-  { 11603, true },
-  { 11615, true },
-  { 11629, true },
-  { 11643, true },
-  { 11655, true },
-  { 11666, true },
-  { 11677, true },
-  { 11690, true },
-  { 11705, true },
-  { 11716, true },
-  { 11727, true },
-  { 11742, true },
-  { 11753, true },
-  { 11763, true },
-  { 11784, true },
-  { 11793, true },
+  { 11442, false },
+  { 11456, true },
+  { 11469, true },
+  { 11487, true },
+  { 11501, true },
+  { 11514, true },
+  { 11526, true },
+  { 11540, true },
+  { 11554, true },
+  { 11566, true },
+  { 11577, true },
+  { 11588, true },
+  { 11601, true },
+  { 11616, true },
+  { 11627, true },
+  { 11638, true },
+  { 11653, true },
+  { 11664, true },
+  { 11674, true },
+  { 11695, true },
+  { 11704, true },
+  { 11711, true },
+  { 11725, false },
+  { 11738, true },
+  { 11748, true },
+  { 11761, true },
+  { 11774, true },
+  { 11786, true },
   { 11800, true },
-  { 11814, false },
-  { 11827, true },
-  { 11837, true },
+  { 11818, true },
+  { 11828, true },
+  { 11840, true },
   { 11850, true },
-  { 11863, true },
-  { 11875, true },
-  { 11889, true },
-  { 11899, true },
-  { 11917, true },
-  { 11927, true },
-  { 11939, true },
-  { 11949, true },
-  { 11965, true },
-  { 11976, true },
-  { 11993, true },
-  { 12015, true },
-  { 12041, true },
-  { 12056, true },
-  { 12074, true },
+  { 11866, true },
+  { 11877, true },
+  { 11894, true },
+  { 11908, true },
+  { 11930, true },
+  { 11956, true },
+  { 11971, true },
+  { 11989, true },
+  { 12000, true },
+  { 12010, true },
+  { 12020, true },
+  { 12039, true },
+  { 12059, true },
+  { 12071, true },
   { 12085, true },
-  { 12095, true },
-  { 12105, true },
-  { 12124, true },
-  { 12144, true },
-  { 12156, true },
-  { 12170, true },
-  { 12177, true },
+  { 12092, true },
+  { 12102, true },
+  { 12120, true },
+  { 12142, true },
+  { 12154, true },
+  { 12166, true },
+  { 12179, true },
   { 12187, true },
-  { 12205, true },
-  { 12227, true },
-  { 12239, true },
-  { 12251, true },
-  { 12264, true },
+  { 12199, false },
+  { 12219, true },
+  { 12226, true },
+  { 12242, true },
+  { 12258, true },
   { 12273, true },
-  { 12281, true },
-  { 12293, false },
-  { 12313, true },
-  { 12320, true },
-  { 12336, true },
-  { 12352, true },
-  { 12367, true },
-  { 12377, true },
-  { 12395, true },
-  { 12422, true },
-  { 12439, true },
-  { 12457, true },
-  { 12465, true },
-  { 12479, true },
-  { 12490, true },
-  { 12499, true },
-  { 12526, true },
-  { 12536, true },
-  { 12552, true },
-  { 12564, true },
-  { 12579, true },
+  { 12283, true },
+  { 12301, true },
+  { 12328, true },
+  { 12345, true },
+  { 12363, true },
+  { 12371, true },
+  { 12385, true },
+  { 12396, true },
+  { 12405, true },
+  { 12432, true },
+  { 12442, true },
+  { 12458, true },
+  { 12470, true },
+  { 12485, true },
+  { 12497, true },
+  { 12512, true },
+  { 12527, true },
+  { 12539, true },
+  { 12560, true },
+  { 12577, true },
   { 12591, true },
-  { 12606, true },
-  { 12621, true },
-  { 12633, true },
-  { 12654, true },
-  { 12671, true },
-  { 12685, true },
-  { 12697, true },
-  { 12707, true },
+  { 12603, true },
+  { 12613, true },
+  { 12623, true },
+  { 12638, true },
+  { 12653, true },
+  { 12666, true },
+  { 12678, true },
+  { 12686, true },
+  { 12699, true },
   { 12717, true },
-  { 12732, true },
-  { 12747, true },
-  { 12760, true },
-  { 12772, true },
-  { 12780, true },
-  { 12793, true },
-  { 12811, true },
-  { 12832, true },
-  { 12846, true },
-  { 12862, true },
-  { 12872, true },
-  { 12885, true },
-  { 12904, true },
+  { 12738, true },
+  { 12752, true },
+  { 12768, true },
+  { 12778, true },
+  { 12791, true },
+  { 12810, true },
+  { 12836, true },
+  { 12848, true },
+  { 12864, true },
+  { 12876, true },
+  { 12895, true },
+  { 12908, true },
+  { 12919, true },
   { 12930, true },
-  { 12942, true },
-  { 12958, true },
-  { 12970, true },
-  { 12989, true },
-  { 13002, true },
-  { 13013, true },
-  { 13024, true },
-  { 13042, true },
-  { 13072, true },
-  { 13095, true },
-  { 13108, false },
+  { 12948, true },
+  { 12978, true },
+  { 13001, true },
+  { 13014, false },
+  { 13022, true },
+  { 13034, true },
+  { 13044, true },
+  { 13059, true },
+  { 13077, true },
+  { 13087, true },
   { 13116, true },
-  { 13128, true },
-  { 13138, true },
-  { 13153, true },
-  { 13171, true },
-  { 13181, true },
-  { 13202, true },
-  { 13231, true },
-  { 13247, true },
-  { 13263, true },
-  { 13284, true },
-  { 13295, true },
-  { 13307, true },
-  { 13319, true },
-  { 13337, true },
-  { 13358, true },
-  { 13383, true },
-  { 13397, true },
-  { 13410, true },
-  { 13425, true },
-  { 13438, true },
-  { 13451, true },
-  { 13462, true },
-  { 13488, true },
-  { 13504, true },
-  { 13514, true },
+  { 13132, true },
+  { 13148, true },
+  { 13169, true },
+  { 13180, true },
+  { 13192, true },
+  { 13204, true },
+  { 13222, true },
+  { 13240, true },
+  { 13261, true },
+  { 13286, true },
+  { 13300, true },
+  { 13313, true },
+  { 13328, true },
+  { 13341, true },
+  { 13354, true },
+  { 13365, true },
+  { 13381, true },
+  { 13391, true },
+  { 13403, true },
+  { 13420, true },
+  { 13432, true },
+  { 13445, true },
+  { 13453, true },
+  { 13464, true },
+  { 13475, true },
+  { 13493, true },
+  { 13508, true },
   { 13526, true },
-  { 13543, true },
-  { 13555, true },
-  { 13568, true },
-  { 13576, true },
-  { 13587, true },
-  { 13598, true },
-  { 13616, true },
-  { 13631, true },
-  { 13649, true },
-  { 13658, true },
-  { 13669, true },
-  { 13683, true },
-  { 13694, true },
+  { 13535, true },
+  { 13546, true },
+  { 13560, true },
+  { 13571, true },
+  { 13579, true },
+  { 13589, true },
+  { 13600, true },
+  { 13608, true },
+  { 13618, true },
+  { 13633, true },
+  { 13653, true },
+  { 13661, true },
+  { 13686, true },
   { 13702, true },
-  { 13712, true },
-  { 13723, true },
-  { 13731, true },
-  { 13741, true },
-  { 13756, true },
-  { 13776, true },
-  { 13784, true },
-  { 13809, true },
-  { 13825, true },
-  { 13832, true },
-  { 13840, true },
-  { 13849, false },
-  { 13858, true },
-  { 13874, true },
-  { 13887, true },
-  { 13896, true },
-  { 13905, true },
+  { 13709, true },
+  { 13717, true },
+  { 13726, false },
+  { 13735, true },
+  { 13751, true },
+  { 13764, true },
+  { 13773, true },
+  { 13782, true },
+  { 13797, true },
+  { 13807, true },
+  { 13819, true },
+  { 13837, false },
+  { 13853, true },
+  { 13865, true },
+  { 13875, true },
+  { 13885, true },
+  { 13895, true },
+  { 13907, true },
   { 13920, true },
-  { 13930, true },
-  { 13942, true },
-  { 13960, false },
-  { 13976, true },
-  { 13988, true },
-  { 13998, true },
-  { 14008, true },
-  { 14018, true },
-  { 14030, true },
-  { 14043, true },
-  { 14056, true },
-  { 14066, true },
-  { 14076, true },
-  { 14086, true },
-  { 14098, true },
-  { 14110, true },
-  { 14126, true },
-  { 14137, false },
-  { 14147, true },
+  { 13933, true },
+  { 13943, true },
+  { 13953, true },
+  { 13963, true },
+  { 13975, true },
+  { 13987, true },
+  { 14003, true },
+  { 14014, false },
+  { 14024, true },
+  { 14032, true },
+  { 14041, true },
+  { 14055, true },
+  { 14070, false },
+  { 14079, true },
+  { 14093, true },
+  { 14107, true },
+  { 14118, true },
+  { 14131, true },
   { 14155, true },
-  { 14164, true },
-  { 14178, true },
-  { 14193, false },
-  { 14202, true },
-  { 14216, true },
-  { 14230, true },
-  { 14241, true },
-  { 14254, true },
-  { 14278, true },
-  { 14291, true },
-  { 14303, true },
-  { 14320, true },
-  { 14331, true },
-  { 14351, true },
-  { 14369, true },
-  { 14387, true },
-  { 14402, true },
-  { 14423, true },
-  { 14447, true },
-  { 14457, true },
-  { 14467, true },
-  { 14477, true },
-  { 14488, true },
-  { 14513, true },
-  { 14542, true },
-  { 14555, true },
-  { 14567, true },
-  { 14577, true },
-  { 14585, true },
-  { 14594, true },
-  { 14608, false },
-  { 14625, true },
-  { 14637, true },
-  { 14652, true },
-  { 14659, true },
-  { 14672, true },
-  { 14684, true },
-  { 14692, true },
-  { 14707, true },
-  { 14716, true },
-  { 14728, true },
-  { 14739, true },
-  { 14755, true },
+  { 14168, true },
+  { 14180, true },
+  { 14197, true },
+  { 14208, true },
+  { 14228, true },
+  { 14246, true },
+  { 14264, true },
+  { 14279, true },
+  { 14300, true },
+  { 14324, true },
+  { 14334, true },
+  { 14344, true },
+  { 14354, true },
+  { 14365, true },
+  { 14390, true },
+  { 14419, true },
+  { 14432, true },
+  { 14444, true },
+  { 14454, true },
+  { 14462, true },
+  { 14471, true },
+  { 14485, false },
+  { 14502, true },
+  { 14514, true },
+  { 14529, true },
+  { 14536, true },
+  { 14549, true },
+  { 14561, true },
+  { 14569, true },
+  { 14584, true },
+  { 14593, true },
+  { 14605, true },
+  { 14616, true },
+  { 14626, true },
+  { 14641, true },
+  { 14658, true },
+  { 14671, true },
+  { 14681, true },
+  { 14694, true },
+  { 14708, true },
+  { 14722, true },
+  { 14734, true },
+  { 14749, true },
   { 14765, true },
   { 14780, true },
-  { 14797, true },
-  { 14810, true },
-  { 14820, true },
-  { 14833, true },
-  { 14847, true },
+  { 14794, true },
+  { 14807, true },
+  { 14823, true },
+  { 14835, true },
+  { 14849, true },
   { 14861, true },
   { 14873, true },
-  { 14888, true },
-  { 14904, true },
-  { 14919, true },
-  { 14933, true },
-  { 14946, true },
-  { 14962, true },
-  { 14974, true },
-  { 14988, true },
-  { 15000, true },
-  { 15012, true },
-  { 15023, true },
-  { 15034, true },
-  { 15049, true },
-  { 15064, false },
-  { 15080, true },
-  { 15098, true },
-  { 15115, true },
-  { 15133, true },
-  { 15144, true },
-  { 15157, true },
-  { 15174, true },
-  { 15190, true },
-  { 15210, true },
-  { 15225, true },
-  { 15236, true },
-  { 15248, true },
-  { 15261, true },
-  { 15275, true },
+  { 14884, true },
+  { 14895, true },
+  { 14910, true },
+  { 14925, false },
+  { 14941, true },
+  { 14959, true },
+  { 14976, true },
+  { 14994, true },
+  { 15005, true },
+  { 15018, true },
+  { 15035, true },
+  { 15051, true },
+  { 15071, true },
+  { 15086, true },
+  { 15097, true },
+  { 15109, true },
+  { 15122, true },
+  { 15136, true },
+  { 15149, true },
+  { 15167, true },
+  { 15185, true },
+  { 15203, true },
+  { 15220, true },
+  { 15230, true },
+  { 15243, true },
+  { 15252, true },
+  { 15267, true },
+  { 15278, false },
   { 15288, true },
-  { 15306, true },
-  { 15324, true },
-  { 15342, true },
-  { 15359, true },
-  { 15369, true },
-  { 15382, true },
-  { 15391, true },
-  { 15406, true },
-  { 15417, false },
-  { 15427, true },
+  { 15299, true },
+  { 15313, true },
+  { 15326, true },
+  { 15336, true },
+  { 15349, true },
+  { 15363, true },
+  { 15374, true },
+  { 15384, true },
+  { 15402, true },
+  { 15419, true },
   { 15438, true },
-  { 15452, true },
-  { 15465, true },
-  { 15475, true },
-  { 15488, true },
-  { 15502, true },
-  { 15513, true },
-  { 15523, true },
-  { 15541, true },
-  { 15550, true },
-  { 15567, true },
-  { 15586, true },
-  { 15601, true },
-  { 15619, true },
-  { 15632, true },
-  { 15647, true },
-  { 15658, true },
-  { 15672, true },
-  { 15683, true },
-  { 15691, true },
-  { 15701, true },
-  { 15712, true },
-  { 15723, true },
-  { 15750, true },
-  { 15760, true },
-  { 15772, true },
-  { 15784, true },
-  { 15793, true },
-  { 15802, true },
-  { 15811, true },
-  { 15826, true },
-  { 15837, true },
-  { 15846, true },
-  { 15858, true },
-  { 15867, true },
-  { 15877, true },
-  { 15888, true },
-  { 15898, true },
-  { 15910, true },
-  { 15924, true },
-  { 15934, true },
-  { 15944, true },
-  { 15954, false },
-  { 15965, true },
-  { 15983, true },
-  { 15993, true },
-  { 16012, true },
-  { 16024, true },
-  { 16039, true },
-  { 16060, true },
-  { 16073, true },
-  { 16086, true },
-  { 16100, true },
-  { 16113, false },
-  { 16127, true },
-  { 16139, true },
-  { 16153, true },
-  { 16171, true },
-  { 16184, false },
-  { 16193, true },
-  { 16211, true },
-  { 16222, true },
-  { 16236, true },
-  { 16249, true },
-  { 16263, true },
-  { 16276, true },
-  { 16290, true },
-  { 16302, true },
-  { 16318, false },
-  { 16329, true },
-  { 16344, true },
-  { 16357, true },
-  { 16370, true },
-  { 16386, true },
-  { 16398, true },
-  { 16411, true },
-  { 16423, true },
-  { 16439, true },
-  { 16452, true },
-  { 16462, true },
-  { 16490, true },
-  { 16505, true },
+  { 15453, true },
+  { 15471, true },
+  { 15484, true },
+  { 15499, true },
+  { 15510, true },
+  { 15524, true },
+  { 15532, true },
+  { 15542, true },
+  { 15553, true },
+  { 15564, true },
+  { 15591, true },
+  { 15603, true },
+  { 15615, true },
+  { 15624, true },
+  { 15633, true },
+  { 15642, true },
+  { 15657, true },
+  { 15666, true },
+  { 15678, true },
+  { 15687, true },
+  { 15697, true },
+  { 15708, true },
+  { 15718, true },
+  { 15730, true },
+  { 15744, true },
+  { 15754, true },
+  { 15764, true },
+  { 15774, false },
+  { 15785, true },
+  { 15803, true },
+  { 15813, true },
+  { 15832, true },
+  { 15844, true },
+  { 15859, true },
+  { 15880, true },
+  { 15893, true },
+  { 15906, true },
+  { 15920, true },
+  { 15933, false },
+  { 15947, true },
+  { 15959, true },
+  { 15973, true },
+  { 15991, true },
+  { 16004, false },
+  { 16013, true },
+  { 16031, true },
+  { 16042, true },
+  { 16056, true },
+  { 16069, true },
+  { 16083, true },
+  { 16096, true },
+  { 16110, true },
+  { 16122, true },
+  { 16138, false },
+  { 16149, true },
+  { 16164, true },
+  { 16177, true },
+  { 16190, true },
+  { 16206, true },
+  { 16218, true },
+  { 16231, true },
+  { 16243, true },
+  { 16259, true },
+  { 16272, true },
+  { 16282, true },
+  { 16310, true },
+  { 16325, true },
+  { 16341, true },
+  { 16352, true },
+  { 16363, true },
+  { 16373, true },
+  { 16383, false },
+  { 16397, true },
+  { 16409, false },
+  { 16428, true },
+  { 16455, true },
+  { 16476, true },
+  { 16492, true },
+  { 16503, true },
   { 16521, true },
-  { 16532, true },
-  { 16543, true },
-  { 16553, true },
-  { 16563, false },
+  { 16536, true },
+  { 16547, true },
+  { 16562, false },
   { 16577, true },
-  { 16589, false },
-  { 16608, true },
-  { 16635, true },
-  { 16656, true },
-  { 16672, true },
+  { 16587, true },
+  { 16601, true },
+  { 16623, true },
+  { 16638, true },
+  { 16659, true },
+  { 16669, true },
   { 16683, true },
-  { 16701, true },
-  { 16716, true },
-  { 16727, true },
-  { 16742, false },
-  { 16757, true },
-  { 16767, true },
-  { 16781, true },
-  { 16803, true },
-  { 16818, true },
-  { 16839, true },
-  { 16849, true },
-  { 16863, true },
-  { 16876, true },
-  { 16891, true },
-  { 16912, true },
-  { 16924, true },
-  { 16942, true },
-  { 16960, true },
-  { 16974, true },
-  { 16993, false },
-  { 17007, true },
-  { 17017, true },
+  { 16696, true },
+  { 16711, true },
+  { 16732, true },
+  { 16744, true },
+  { 16762, true },
+  { 16776, true },
+  { 16795, false },
+  { 16809, true },
+  { 16819, true },
+  { 16830, true },
+  { 16840, true },
+  { 16853, true },
+  { 16868, true },
+  { 16882, true },
+  { 16895, true },
+  { 16908, true },
+  { 16925, true },
+  { 16941, true },
+  { 16954, true },
+  { 16971, true },
+  { 16985, true },
+  { 16997, true },
+  { 17015, true },
   { 17028, true },
-  { 17038, true },
-  { 17051, true },
-  { 17066, true },
+  { 17048, true },
+  { 17064, true },
   { 17080, true },
-  { 17093, true },
+  { 17089, true },
+  { 17097, true },
   { 17106, true },
-  { 17123, true },
-  { 17139, true },
-  { 17152, true },
-  { 17169, true },
-  { 17183, true },
-  { 17195, true },
-  { 17213, true },
-  { 17226, true },
-  { 17246, true },
-  { 17262, true },
-  { 17278, true },
-  { 17287, true },
-  { 17295, true },
-  { 17304, true },
-  { 17313, true },
-  { 17330, true },
-  { 17343, true },
-  { 17353, true },
-  { 17363, true },
-  { 17373, true },
-  { 17391, true },
-  { 17410, true },
-  { 17434, true },
-  { 17448, true },
-  { 17463, true },
-  { 17481, true },
-  { 17497, true },
-  { 17509, true },
-  { 17532, true },
-  { 17554, true },
-  { 17580, true },
-  { 17598, true },
-  { 17620, true },
-  { 17634, true },
-  { 17647, true },
-  { 17659, true },
-  { 17671, false },
-  { 17687, true },
-  { 17701, true },
-  { 17716, true },
-  { 17728, true },
-  { 17750, true },
-  { 17767, true },
-  { 17782, true },
-  { 17803, true },
-  { 17817, true },
-  { 17836, true },
-  { 17853, true },
-  { 17867, true },
-  { 17880, true },
-  { 17896, true },
-  { 17909, true },
+  { 17115, true },
+  { 17132, true },
+  { 17145, true },
+  { 17155, true },
+  { 17165, true },
+  { 17175, true },
+  { 17193, true },
+  { 17212, true },
+  { 17236, true },
+  { 17250, true },
+  { 17265, true },
+  { 17283, true },
+  { 17299, true },
+  { 17311, true },
+  { 17334, true },
+  { 17356, true },
+  { 17382, true },
+  { 17400, true },
+  { 17422, true },
+  { 17436, true },
+  { 17449, true },
+  { 17461, true },
+  { 17473, false },
+  { 17489, true },
+  { 17503, true },
+  { 17518, true },
+  { 17530, true },
+  { 17552, true },
+  { 17569, true },
+  { 17584, true },
+  { 17605, true },
+  { 17619, true },
+  { 17638, true },
+  { 17655, true },
+  { 17669, true },
+  { 17682, true },
+  { 17698, true },
+  { 17711, true },
+  { 17730, true },
+  { 17747, true },
+  { 17765, true },
+  { 17783, true },
+  { 17792, true },
+  { 17808, true },
+  { 17824, true },
+  { 17843, true },
+  { 17861, true },
+  { 17877, true },
+  { 17891, true },
+  { 17903, true },
+  { 17914, true },
   { 17928, true },
-  { 17945, true },
-  { 17963, true },
+  { 17938, true },
+  { 17949, true },
+  { 17958, false },
+  { 17967, true },
   { 17981, true },
-  { 17990, true },
-  { 18006, true },
+  { 17995, true },
+  { 18007, true },
   { 18022, true },
-  { 18041, true },
-  { 18059, true },
-  { 18075, true },
-  { 18089, true },
-  { 18101, true },
-  { 18112, true },
-  { 18126, true },
-  { 18136, true },
-  { 18147, true },
-  { 18156, false },
-  { 18165, true },
-  { 18179, true },
-  { 18193, true },
-  { 18205, true },
-  { 18220, true },
-  { 18230, true },
-  { 18243, true },
+  { 18032, true },
+  { 18045, true },
+  { 18056, true },
+  { 18079, true },
+  { 18091, true },
+  { 18106, true },
+  { 18122, true },
+  { 18131, true },
+  { 18146, true },
+  { 18162, true },
+  { 18177, true },
+  { 18190, true },
+  { 18203, true },
+  { 18222, true },
+  { 18232, true },
+  { 18242, true },
   { 18254, true },
-  { 18277, true },
-  { 18289, true },
-  { 18304, true },
-  { 18320, true },
-  { 18329, true },
+  { 18269, true },
+  { 18284, true },
+  { 18294, true },
+  { 18309, true },
+  { 18325, true },
   { 18344, true },
-  { 18360, true },
-  { 18375, true },
-  { 18388, true },
-  { 18401, true },
-  { 18420, true },
-  { 18430, true },
-  { 18440, true },
-  { 18452, true },
-  { 18467, true },
-  { 18482, true },
-  { 18492, true },
-  { 18507, true },
-  { 18523, true },
-  { 18542, true },
-  { 18551, true },
-  { 18564, true },
+  { 18353, true },
+  { 18366, true },
+  { 18386, true },
+  { 18401, false },
+  { 18416, true },
+  { 18431, true },
+  { 18446, true },
+  { 18456, true },
+  { 18466, true },
+  { 18481, true },
+  { 18503, true },
+  { 18518, true },
+  { 18531, true },
+  { 18558, true },
+  { 18572, true },
   { 18584, true },
-  { 18599, false },
-  { 18614, true },
-  { 18629, true },
+  { 18599, true },
+  { 18613, true },
+  { 18623, true },
   { 18644, true },
-  { 18654, true },
-  { 18664, true },
-  { 18679, true },
-  { 18701, true },
-  { 18716, true },
-  { 18729, true },
-  { 18756, true },
-  { 18770, true },
-  { 18782, true },
-  { 18797, true },
-  { 18811, true },
-  { 18821, true },
-  { 18842, true },
-  { 18859, true },
-  { 18881, true },
-  { 18899, false },
-  { 18918, true },
-  { 18932, true },
-  { 18944, true },
-  { 18961, true },
-  { 18976, true },
-  { 18987, true },
-  { 19003, true },
-  { 19021, true },
-  { 19033, true },
-  { 19045, true },
-  { 19059, false },
-  { 19072, true },
-  { 19085, true },
-  { 19097, true },
-  { 19120, true },
-  { 19133, true },
-  { 19141, false },
-  { 19152, true },
+  { 18661, true },
+  { 18683, true },
+  { 18701, false },
+  { 18720, true },
+  { 18734, true },
+  { 18746, true },
+  { 18763, true },
+  { 18778, true },
+  { 18789, true },
+  { 18805, true },
+  { 18823, true },
+  { 18835, true },
+  { 18847, true },
+  { 18861, false },
+  { 18874, true },
+  { 18887, true },
+  { 18899, true },
+  { 18922, true },
+  { 18935, true },
+  { 18943, false },
+  { 18954, true },
+  { 18972, true },
+  { 18984, true },
+  { 19005, true },
+  { 19016, true },
+  { 19030, true },
+  { 19047, true },
+  { 19058, true },
+  { 19067, true },
+  { 19079, true },
+  { 19090, true },
+  { 19100, false },
+  { 19114, true },
+  { 19132, true },
+  { 19145, true },
+  { 19156, true },
   { 19170, true },
   { 19182, true },
-  { 19203, true },
-  { 19214, true },
-  { 19228, true },
-  { 19245, true },
-  { 19256, true },
-  { 19265, true },
-  { 19277, true },
-  { 19288, true },
-  { 19298, false },
-  { 19312, true },
-  { 19330, true },
-  { 19343, true },
-  { 19354, true },
-  { 19368, true },
-  { 19380, true },
+  { 19193, true },
+  { 19204, true },
+  { 19217, true },
+  { 19229, true },
+  { 19240, true },
+  { 19259, true },
+  { 19275, true },
+  { 19289, true },
+  { 19308, true },
+  { 19320, true },
+  { 19338, true },
+  { 19353, true },
+  { 19362, true },
+  { 19377, true },
   { 19391, true },
-  { 19402, true },
-  { 19415, true },
-  { 19427, true },
-  { 19438, true },
-  { 19457, true },
-  { 19473, true },
-  { 19487, true },
-  { 19506, true },
-  { 19518, true },
-  { 19536, true },
-  { 19551, true },
-  { 19560, true },
-  { 19575, true },
-  { 19589, true },
-  { 19602, true },
-  { 19614, true },
-  { 19626, true },
-  { 19640, true },
-  { 19651, true },
-  { 19665, true },
-  { 19676, true },
-  { 19687, true },
-  { 19697, true },
-  { 19708, true },
-  { 19719, true },
-  { 19730, true },
-  { 19743, true },
-  { 19757, true },
-  { 19769, true },
-  { 19783, true },
-  { 19795, true },
-  { 19808, true },
-  { 19833, true },
-  { 19845, true },
-  { 19862, true },
-  { 19873, true },
-  { 19884, true },
-  { 19895, true },
-  { 19914, true },
-  { 19930, true },
-  { 19940, true },
-  { 19951, true },
+  { 19404, true },
+  { 19416, true },
+  { 19428, true },
+  { 19442, true },
+  { 19453, true },
+  { 19467, true },
+  { 19478, true },
+  { 19489, true },
+  { 19499, true },
+  { 19509, true },
+  { 19520, true },
+  { 19531, true },
+  { 19542, true },
+  { 19555, true },
+  { 19569, true },
+  { 19581, true },
+  { 19595, true },
+  { 19607, true },
+  { 19620, true },
+  { 19645, true },
+  { 19657, true },
+  { 19674, true },
+  { 19685, true },
+  { 19696, true },
+  { 19707, true },
+  { 19726, true },
+  { 19742, true },
+  { 19752, true },
+  { 19763, true },
+  { 19775, true },
+  { 19790, true },
+  { 19809, true },
+  { 19826, true },
+  { 19834, true },
+  { 19850, true },
+  { 19864, true },
+  { 19881, true },
+  { 19898, true },
+  { 19911, true },
+  { 19924, true },
+  { 19937, true },
+  { 19950, true },
   { 19963, true },
-  { 19978, true },
-  { 19997, true },
-  { 20014, true },
-  { 20022, true },
-  { 20038, true },
-  { 20052, true },
-  { 20069, true },
-  { 20086, true },
-  { 20099, true },
+  { 19976, true },
+  { 19989, true },
+  { 20002, true },
+  { 20015, true },
+  { 20028, true },
+  { 20041, true },
+  { 20054, true },
+  { 20067, true },
+  { 20080, true },
+  { 20097, true },
   { 20112, true },
-  { 20125, true },
-  { 20138, true },
-  { 20151, true },
-  { 20164, true },
-  { 20177, true },
-  { 20190, true },
-  { 20203, true },
-  { 20216, true },
-  { 20229, true },
-  { 20242, true },
-  { 20255, true },
-  { 20268, true },
-  { 20285, true },
-  { 20300, true },
-  { 20312, true },
-  { 20334, true },
-  { 20346, true },
-  { 20369, true },
-  { 20393, true },
+  { 20124, true },
+  { 20146, true },
+  { 20158, true },
+  { 20181, true },
+  { 20205, true },
+  { 20223, true },
+  { 20242, false },
+  { 20263, true },
+  { 20276, true },
+  { 20291, true },
+  { 20307, true },
+  { 20333, true },
+  { 20343, true },
+  { 20360, true },
+  { 20375, true },
+  { 20394, true },
   { 20411, true },
-  { 20430, false },
-  { 20451, true },
-  { 20464, true },
-  { 20479, true },
-  { 20495, true },
-  { 20521, true },
-  { 20531, true },
-  { 20548, true },
-  { 20563, true },
-  { 20582, true },
-  { 20599, true },
-  { 20610, true },
-  { 20626, true },
-  { 20638, true },
-  { 20648, true },
-  { 20658, true },
-  { 20679, true },
-  { 20701, true },
-  { 20713, true },
-  { 20724, true },
-  { 20739, true },
-  { 20750, true },
-  { 20765, true },
-  { 20780, true },
-  { 20792, true },
-  { 20811, true },
-  { 20824, true },
-  { 20838, true },
-  { 20860, true },
-  { 20879, true },
-  { 20899, true },
+  { 20422, true },
+  { 20438, true },
+  { 20450, true },
+  { 20460, true },
+  { 20470, true },
+  { 20491, true },
+  { 20513, true },
+  { 20525, true },
+  { 20536, true },
+  { 20551, true },
+  { 20562, true },
+  { 20577, true },
+  { 20592, true },
+  { 20604, true },
+  { 20623, true },
+  { 20636, true },
+  { 20650, true },
+  { 20672, true },
+  { 20691, true },
+  { 20711, true },
+  { 20719, true },
+  { 20732, true },
+  { 20746, true },
+  { 20760, true },
+  { 20771, true },
+  { 20784, true },
+  { 20800, true },
+  { 20815, true },
+  { 20829, true },
+  { 20841, true },
+  { 20858, false },
+  { 20874, false },
+  { 20894, true },
   { 20907, true },
-  { 20920, true },
-  { 20934, true },
+  { 20923, true },
   { 20948, true },
-  { 20959, true },
-  { 20972, true },
-  { 20988, true },
-  { 21003, true },
+  { 20964, true },
+  { 20977, true },
+  { 20990, true },
+  { 21001, true },
   { 21017, true },
-  { 21035, true },
+  { 21031, true },
   { 21047, true },
-  { 21064, false },
-  { 21080, false },
+  { 21058, true },
+  { 21071, true },
+  { 21086, true },
   { 21100, true },
-  { 21113, true },
-  { 21129, true },
-  { 21154, true },
+  { 21112, true },
+  { 21132, true },
+  { 21144, true },
+  { 21157, true },
   { 21170, true },
-  { 21183, true },
-  { 21196, true },
-  { 21207, true },
-  { 21223, true },
-  { 21237, true },
-  { 21253, true },
-  { 21264, true },
-  { 21277, true },
-  { 21292, true },
-  { 21306, true },
-  { 21318, true },
-  { 21338, true },
-  { 21350, true },
-  { 21363, true },
-  { 21376, true },
-  { 21397, true },
-  { 21417, true },
-  { 21431, true },
-  { 21446, true },
-  { 21455, true },
-  { 21466, true },
-  { 21476, true },
-  { 21486, true },
-  { 21504, true },
-  { 21529, true },
-  { 21551, true },
-  { 21563, true },
-  { 21576, true },
-  { 21589, true },
-  { 21597, true },
-  { 21616, true },
-  { 21626, true },
-  { 21639, true },
-  { 21654, true },
-  { 21671, true },
-  { 21687, true },
-  { 21699, true },
-  { 21711, true },
-  { 21722, true },
-  { 21746, false },
-  { 21760, true },
-  { 21775, true },
-  { 21790, true },
-  { 21812, true },
-  { 21823, true },
-  { 21836, true },
-  { 21856, true },
-  { 21867, true },
-  { 21875, false },
+  { 21191, true },
+  { 21211, true },
+  { 21225, true },
+  { 21240, true },
+  { 21249, true },
+  { 21260, true },
+  { 21270, true },
+  { 21280, true },
+  { 21298, true },
+  { 21323, true },
+  { 21345, true },
+  { 21357, true },
+  { 21370, true },
+  { 21383, true },
+  { 21391, true },
+  { 21410, true },
+  { 21420, true },
+  { 21433, true },
+  { 21448, true },
+  { 21465, true },
+  { 21481, true },
+  { 21493, true },
+  { 21505, true },
+  { 21516, true },
+  { 21530, true },
+  { 21554, true },
+  { 21569, true },
+  { 21584, true },
+  { 21606, true },
+  { 21617, true },
+  { 21630, true },
+  { 21650, true },
+  { 21661, true },
+  { 21669, false },
+  { 21681, true },
+  { 21698, true },
+  { 21717, true },
+  { 21731, true },
+  { 21746, true },
+  { 21761, true },
+  { 21771, false },
+  { 21780, true },
+  { 21794, true },
+  { 21806, true },
+  { 21821, true },
+  { 21833, true },
+  { 21851, true },
+  { 21871, true },
   { 21887, true },
-  { 21904, true },
-  { 21923, true },
-  { 21937, true },
-  { 21952, true },
-  { 21967, true },
-  { 21977, false },
-  { 21986, true },
+  { 21899, true },
+  { 21916, true },
+  { 21928, true },
+  { 21942, true },
+  { 21962, true },
+  { 21974, true },
+  { 21991, true },
   { 22000, true },
   { 22012, true },
-  { 22027, true },
-  { 22039, true },
-  { 22057, true },
-  { 22077, true },
+  { 22034, false },
+  { 22048, true },
+  { 22064, true },
+  { 22081, true },
   { 22093, true },
-  { 22105, true },
-  { 22122, true },
-  { 22134, true },
-  { 22148, true },
-  { 22168, true },
-  { 22180, true },
-  { 22197, true },
-  { 22206, true },
-  { 22218, true },
-  { 22240, false },
-  { 22254, true },
-  { 22270, true },
+  { 22111, false },
+  { 22133, false },
+  { 22158, false },
+  { 22182, true },
+  { 22194, true },
+  { 22204, true },
+  { 22217, true },
+  { 22227, true },
+  { 22237, true },
+  { 22247, true },
+  { 22257, true },
+  { 22267, true },
+  { 22277, true },
   { 22287, true },
-  { 22299, true },
-  { 22317, false },
-  { 22339, false },
-  { 22364, false },
-  { 22388, true },
-  { 22400, true },
-  { 22410, true },
-  { 22423, true },
+  { 22301, true },
+  { 22319, true },
+  { 22334, true },
+  { 22348, true },
+  { 22360, true },
+  { 22372, true },
+  { 22383, true },
+  { 22397, true },
+  { 22412, true },
+  { 22426, true },
   { 22433, true },
-  { 22443, true },
-  { 22453, true },
-  { 22463, true },
-  { 22473, true },
-  { 22483, true },
-  { 22493, true },
-  { 22507, true },
-  { 22525, true },
-  { 22540, true },
-  { 22554, true },
-  { 22566, true },
-  { 22578, true },
+  { 22447, false },
+  { 22467, true },
+  { 22486, true },
+  { 22501, true },
+  { 22513, true },
+  { 22524, true },
+  { 22535, true },
+  { 22547, true },
+  { 22560, false },
+  { 22573, true },
   { 22589, true },
-  { 22603, true },
-  { 22618, true },
-  { 22632, true },
+  { 22602, true },
+  { 22614, true },
+  { 22629, true },
   { 22639, true },
-  { 22653, false },
-  { 22673, true },
-  { 22692, true },
-  { 22707, true },
-  { 22719, true },
-  { 22730, true },
-  { 22741, true },
-  { 22753, true },
-  { 22766, false },
-  { 22779, true },
-  { 22795, true },
-  { 22808, true },
-  { 22820, true },
-  { 22835, true },
-  { 22845, true },
-  { 22870, true },
-  { 22890, true },
-  { 22902, true },
-  { 22918, true },
-  { 22946, false },
+  { 22664, true },
+  { 22684, true },
+  { 22696, true },
+  { 22712, true },
+  { 22740, false },
+  { 22752, true },
+  { 22765, true },
+  { 22774, true },
+  { 22784, true },
+  { 22793, true },
+  { 22802, true },
+  { 22809, true },
+  { 22824, true },
+  { 22835, false },
+  { 22851, true },
+  { 22868, true },
+  { 22882, true },
+  { 22892, true },
+  { 22912, true },
+  { 22932, true },
+  { 22943, true },
   { 22958, true },
   { 22971, true },
-  { 22980, true },
-  { 22990, true },
-  { 22999, true },
-  { 23008, true },
-  { 23015, true },
-  { 23030, true },
-  { 23041, false },
-  { 23057, true },
-  { 23074, true },
-  { 23088, true },
-  { 23098, true },
-  { 23118, true },
-  { 23138, true },
-  { 23149, true },
-  { 23164, true },
-  { 23177, true },
-  { 23192, true },
-  { 23209, true },
-  { 23217, true },
-  { 23231, true },
-  { 23243, true },
-  { 23260, false },
-  { 23281, false },
-  { 23303, false },
-  { 23322, false },
-  { 23340, true },
-  { 23356, true },
-  { 23380, true },
-  { 23408, true },
-  { 23419, true },
-  { 23434, true },
-  { 23453, true },
-  { 23476, true },
-  { 23500, true },
-  { 23517, true },
-  { 23531, true },
-  { 23542, true },
-  { 23560, true },
-  { 23575, true },
-  { 23588, true },
-  { 23601, true },
-  { 23616, true },
-  { 23631, true },
-  { 23646, true },
-  { 23658, true },
-  { 23673, true },
-  { 23692, true },
-  { 23710, true },
-  { 23718, true },
-  { 23726, true },
-  { 23738, true },
-  { 23750, true },
-  { 23768, true },
-  { 23783, true },
-  { 23798, true },
-  { 23813, true },
-  { 23829, true },
-  { 23846, true },
-  { 23855, true },
-  { 23868, true },
-  { 23878, true },
-  { 23891, false },
-  { 23905, true },
-  { 23921, false },
-  { 23928, true },
-  { 23938, true },
-  { 23952, true },
-  { 23967, true },
-  { 23975, true },
-  { 23983, true },
-  { 23993, true },
-  { 24011, true },
-  { 24024, true },
-  { 24037, true },
-  { 24051, true },
-  { 24060, true },
-  { 24075, true },
-  { 24104, true },
-  { 24121, true },
-  { 24139, true },
-  { 24149, true },
-  { 24163, true },
-  { 24174, true },
-  { 24191, true },
-  { 24205, true },
-  { 24227, true },
-  { 24252, true },
-  { 24265, true },
-  { 24278, true },
-  { 24295, true },
-  { 24313, true },
-  { 24328, true },
-  { 24338, true },
+  { 22986, true },
+  { 23003, true },
+  { 23011, true },
+  { 23025, true },
+  { 23037, true },
+  { 23054, false },
+  { 23075, false },
+  { 23097, false },
+  { 23116, false },
+  { 23134, true },
+  { 23150, true },
+  { 23174, true },
+  { 23202, true },
+  { 23213, true },
+  { 23228, true },
+  { 23247, true },
+  { 23270, true },
+  { 23294, true },
+  { 23311, true },
+  { 23325, true },
+  { 23336, true },
+  { 23354, true },
+  { 23369, true },
+  { 23382, true },
+  { 23395, true },
+  { 23410, true },
+  { 23425, true },
+  { 23440, true },
+  { 23452, true },
+  { 23467, true },
+  { 23486, true },
+  { 23504, true },
+  { 23512, true },
+  { 23520, true },
+  { 23532, true },
+  { 23544, true },
+  { 23562, true },
+  { 23577, true },
+  { 23592, true },
+  { 23607, true },
+  { 23623, true },
+  { 23640, true },
+  { 23649, true },
+  { 23662, true },
+  { 23672, true },
+  { 23685, false },
+  { 23699, true },
+  { 23715, false },
+  { 23722, true },
+  { 23732, true },
+  { 23746, true },
+  { 23761, true },
+  { 23769, true },
+  { 23777, true },
+  { 23787, true },
+  { 23805, true },
+  { 23818, true },
+  { 23831, true },
+  { 23845, true },
+  { 23854, true },
+  { 23869, true },
+  { 23898, true },
+  { 23915, true },
+  { 23933, true },
+  { 23943, true },
+  { 23957, true },
+  { 23968, true },
+  { 23985, true },
+  { 23999, true },
+  { 24021, true },
+  { 24046, true },
+  { 24059, true },
+  { 24072, true },
+  { 24089, true },
+  { 24107, true },
+  { 24122, true },
+  { 24132, true },
+  { 24153, true },
+  { 24163, false },
+  { 24182, true },
+  { 24194, true },
+  { 24223, true },
+  { 24244, true },
+  { 24258, true },
+  { 24284, true },
+  { 24298, true },
+  { 24306, true },
+  { 24319, true },
+  { 24331, true },
+  { 24343, true },
   { 24359, true },
-  { 24369, false },
-  { 24388, true },
-  { 24400, true },
-  { 24429, true },
-  { 24450, true },
-  { 24464, true },
-  { 24490, true },
-  { 24504, true },
-  { 24512, true },
-  { 24525, true },
-  { 24537, true },
-  { 24549, true },
-  { 24565, true },
-  { 24579, true },
-  { 24598, true },
-  { 24611, true },
-  { 24624, true },
-  { 24643, true },
-  { 24656, false },
-  { 24666, true },
-  { 24688, true },
-  { 24702, true },
-  { 24718, true },
-  { 24733, true },
-  { 24749, true },
-  { 24766, true },
-  { 24777, false },
-  { 24785, true },
-  { 24801, true },
-  { 24821, true },
-  { 24835, true },
-  { 24850, true },
-  { 24863, true },
-  { 24875, true },
-  { 24888, true },
-  { 24901, false },
-  { 24923, true },
-  { 24947, true },
-  { 24970, true },
-  { 24988, true },
-  { 25014, true },
-  { 25041, true },
-  { 25064, true },
+  { 24373, true },
+  { 24392, true },
+  { 24405, true },
+  { 24418, true },
+  { 24437, false },
+  { 24447, true },
+  { 24469, true },
+  { 24483, true },
+  { 24499, true },
+  { 24514, true },
+  { 24530, true },
+  { 24547, true },
+  { 24558, false },
+  { 24566, true },
+  { 24582, true },
+  { 24602, true },
+  { 24616, true },
+  { 24631, true },
+  { 24644, true },
+  { 24656, true },
+  { 24669, true },
+  { 24682, false },
+  { 24704, true },
+  { 24728, true },
+  { 24751, true },
+  { 24769, true },
+  { 24795, true },
+  { 24822, true },
+  { 24845, true },
+  { 24861, true },
+  { 24886, true },
+  { 24915, true },
+  { 24931, true },
+  { 24943, true },
+  { 24956, true },
+  { 24967, true },
+  { 24980, true },
+  { 24989, true },
+  { 24998, true },
+  { 25015, true },
+  { 25028, true },
+  { 25037, true },
+  { 25054, true },
+  { 25063, true },
+  { 25071, true },
   { 25080, true },
-  { 25105, true },
+  { 25089, false },
+  { 25100, true },
+  { 25124, true },
   { 25134, true },
-  { 25150, true },
-  { 25162, true },
-  { 25175, true },
-  { 25186, true },
-  { 25199, true },
-  { 25208, true },
-  { 25217, true },
-  { 25234, true },
-  { 25247, true },
+  { 25144, true },
+  { 25157, true },
+  { 25169, true },
+  { 25183, true },
+  { 25197, true },
+  { 25215, true },
+  { 25230, true },
+  { 25244, true },
   { 25256, true },
-  { 25273, true },
-  { 25282, true },
-  { 25290, true },
-  { 25299, true },
-  { 25308, false },
-  { 25319, true },
-  { 25343, true },
-  { 25353, true },
-  { 25363, true },
-  { 25372, true },
-  { 25385, true },
-  { 25397, true },
-  { 25411, true },
-  { 25425, true },
-  { 25443, true },
-  { 25458, true },
-  { 25472, true },
-  { 25484, true },
-  { 25500, true },
-  { 25513, true },
-  { 25528, true },
-  { 25540, true },
-  { 25555, true },
-  { 25569, true },
-  { 25578, true },
-  { 25587, true },
+  { 25272, true },
+  { 25285, true },
+  { 25300, true },
+  { 25312, true },
+  { 25327, true },
+  { 25341, true },
+  { 25350, true },
+  { 25359, true },
+  { 25373, true },
+  { 25382, true },
+  { 25396, true },
+  { 25409, true },
+  { 25419, true },
+  { 25429, true },
+  { 25444, true },
+  { 25459, true },
+  { 25473, true },
+  { 25488, true },
+  { 25501, true },
+  { 25520, true },
+  { 25536, true },
+  { 25550, true },
+  { 25566, true },
+  { 25577, true },
+  { 25591, true },
   { 25601, true },
-  { 25610, true },
-  { 25624, true },
-  { 25637, true },
-  { 25647, true },
-  { 25657, true },
-  { 25672, true },
-  { 25687, true },
-  { 25701, true },
-  { 25716, true },
-  { 25729, true },
-  { 25745, true },
+  { 25613, true },
+  { 25629, true },
+  { 25643, true },
+  { 25648, true },
+  { 25659, true },
+  { 25667, true },
+  { 25674, true },
+  { 25683, true },
+  { 25698, false },
+  { 25718, true },
+  { 25728, true },
+  { 25741, true },
   { 25759, true },
-  { 25775, true },
-  { 25786, true },
+  { 25772, true },
+  { 25788, true },
   { 25800, true },
-  { 25810, true },
-  { 25822, true },
-  { 25838, true },
-  { 25852, true },
-  { 25857, true },
-  { 25868, true },
-  { 25876, true },
-  { 25883, true },
+  { 25812, true },
+  { 25825, true },
+  { 25836, true },
+  { 25847, true },
+  { 25861, true },
+  { 25879, true },
   { 25892, true },
-  { 25907, false },
-  { 25927, true },
-  { 25937, true },
-  { 25950, true },
-  { 25968, true },
-  { 25981, true },
-  { 25997, true },
-  { 26009, true },
-  { 26021, true },
-  { 26034, true },
-  { 26045, true },
-  { 26056, true },
-  { 26070, true },
-  { 26088, true },
-  { 26101, true },
-  { 26117, true },
+  { 25905, true },
+  { 25921, true },
+  { 25941, true },
+  { 25949, true },
+  { 25960, false },
+  { 25970, true },
+  { 25982, true },
+  { 25996, true },
+  { 26015, true },
+  { 26023, true },
+  { 26047, true },
+  { 26066, true },
+  { 26080, false },
+  { 26096, true },
+  { 26110, true },
+  { 26122, false },
   { 26137, true },
-  { 26145, true },
-  { 26156, false },
-  { 26166, true },
-  { 26178, true },
-  { 26192, true },
-  { 26211, true },
-  { 26219, true },
-  { 26243, true },
-  { 26262, true },
-  { 26276, false },
-  { 26292, true },
-  { 26306, true },
-  { 26318, false },
+  { 26149, true },
+  { 26161, true },
+  { 26175, false },
+  { 26187, true },
+  { 26199, true },
+  { 26210, true },
+  { 26224, true },
+  { 26236, true },
+  { 26249, true },
+  { 26269, true },
+  { 26279, true },
+  { 26298, true },
+  { 26310, true },
+  { 26321, true },
   { 26333, true },
-  { 26345, true },
-  { 26357, true },
-  { 26371, false },
-  { 26383, true },
-  { 26395, true },
-  { 26406, true },
-  { 26420, true },
-  { 26432, true },
-  { 26445, true },
-  { 26465, true },
+  { 26356, true },
+  { 26379, true },
+  { 26390, true },
+  { 26405, true },
+  { 26421, true },
+  { 26437, true },
+  { 26455, true },
   { 26475, true },
-  { 26494, true },
-  { 26506, true },
-  { 26517, true },
-  { 26529, true },
-  { 26552, true },
-  { 26575, true },
-  { 26586, true },
-  { 26601, true },
-  { 26617, true },
-  { 26633, true },
-  { 26651, true },
-  { 26671, true },
-  { 26685, true },
-  { 26708, true },
-  { 26727, true },
-  { 26745, true },
-  { 26762, true },
-  { 26788, true },
-  { 26807, true },
-  { 26823, true },
-  { 26837, true },
+  { 26489, true },
+  { 26512, true },
+  { 26531, true },
+  { 26549, true },
+  { 26566, true },
+  { 26592, true },
+  { 26611, true },
+  { 26627, true },
+  { 26641, true },
+  { 26662, true },
+  { 26678, true },
+  { 26703, true },
+  { 26717, true },
+  { 26735, true },
+  { 26744, true },
+  { 26756, true },
+  { 26769, true },
+  { 26781, true },
+  { 26794, true },
+  { 26808, true },
+  { 26818, true },
+  { 26831, true },
+  { 26839, true },
+  { 26846, true },
   { 26858, true },
-  { 26874, true },
-  { 26899, true },
-  { 26913, true },
+  { 26878, true },
+  { 26890, true },
+  { 26905, true },
   { 26931, true },
-  { 26940, true },
-  { 26952, true },
-  { 26965, true },
-  { 26977, true },
-  { 26990, true },
-  { 27004, true },
-  { 27014, true },
-  { 27027, true },
-  { 27035, true },
-  { 27042, true },
-  { 27054, true },
-  { 27074, true },
+  { 26953, true },
+  { 26967, true },
+  { 26979, true },
+  { 26989, true },
+  { 27002, true },
+  { 27010, true },
+  { 27024, true },
+  { 27048, true },
+  { 27062, true },
   { 27086, true },
-  { 27101, true },
-  { 27127, true },
-  { 27149, true },
-  { 27163, true },
+  { 27097, true },
+  { 27106, true },
+  { 27128, true },
+  { 27151, true },
   { 27175, true },
-  { 27185, true },
-  { 27198, true },
-  { 27206, true },
-  { 27220, true },
+  { 27198, false },
+  { 27229, false },
   { 27244, true },
-  { 27258, true },
-  { 27282, true },
-  { 27293, true },
-  { 27302, true },
-  { 27324, true },
-  { 27347, true },
-  { 27371, true },
-  { 27394, false },
-  { 27425, false },
-  { 27440, true },
-  { 27452, true },
-  { 27472, true },
-  { 27487, true },
-  { 27503, true },
-  { 27514, true },
-  { 27530, true },
-  { 27541, true },
-  { 27555, true },
-  { 27565, true },
-  { 27574, false },
+  { 27256, true },
+  { 27276, true },
+  { 27291, true },
+  { 27307, true },
+  { 27318, true },
+  { 27334, true },
+  { 27345, true },
+  { 27359, true },
+  { 27369, true },
+  { 27378, false },
+  { 27391, true },
+  { 27408, true },
+  { 27422, true },
+  { 27436, true },
+  { 27448, true },
+  { 27467, true },
+  { 27480, true },
+  { 27500, true },
+  { 27522, true },
+  { 27535, true },
+  { 27546, true },
+  { 27560, true },
+  { 27571, true },
   { 27587, true },
-  { 27604, true },
-  { 27618, true },
-  { 27632, true },
-  { 27644, true },
-  { 27661, true },
-  { 27680, true },
-  { 27693, true },
-  { 27713, true },
+  { 27596, true },
+  { 27611, true },
+  { 27625, true },
+  { 27641, true },
+  { 27654, true },
+  { 27667, true },
+  { 27679, true },
+  { 27691, true },
+  { 27704, true },
+  { 27716, true },
   { 27735, true },
-  { 27748, true },
-  { 27759, true },
-  { 27773, true },
+  { 27750, true },
+  { 27766, true },
   { 27784, true },
-  { 27800, true },
-  { 27809, true },
-  { 27824, true },
-  { 27838, true },
-  { 27854, true },
-  { 27867, true },
-  { 27880, true },
-  { 27892, true },
-  { 27904, true },
-  { 27917, true },
-  { 27929, true },
-  { 27948, true },
-  { 27963, true },
-  { 27979, true },
-  { 27997, true },
-  { 28008, true },
-  { 28016, false },
-  { 28039, true },
-  { 28052, true },
-  { 28063, true },
-  { 28075, false },
+  { 27795, true },
+  { 27803, false },
+  { 27826, true },
+  { 27839, true },
+  { 27850, true },
+  { 27862, false },
+  { 27872, true },
+  { 27888, false },
+  { 27899, true },
+  { 27908, true },
+  { 27921, true },
+  { 27939, true },
+  { 27950, true },
+  { 27960, true },
+  { 27971, true },
+  { 27983, true },
+  { 28000, true },
+  { 28016, true },
+  { 28026, true },
+  { 28034, false },
+  { 28042, true },
+  { 28057, true },
+  { 28071, true },
   { 28085, true },
-  { 28101, false },
-  { 28112, true },
-  { 28121, true },
-  { 28134, true },
-  { 28152, true },
-  { 28163, true },
-  { 28173, true },
-  { 28184, true },
-  { 28196, true },
-  { 28213, true },
-  { 28229, true },
-  { 28239, true },
-  { 28247, false },
-  { 28255, true },
-  { 28270, true },
-  { 28284, true },
-  { 28298, true },
-  { 28308, true },
-  { 28316, true },
-  { 28330, true },
-  { 28344, true },
-  { 28360, true },
-  { 28375, true },
-  { 28386, false },
-  { 28399, true },
-  { 28417, true },
-  { 28433, true },
-  { 28444, true },
-  { 28462, true },
-  { 28484, false },
-  { 28501, true },
-  { 28516, true },
-  { 28532, true },
-  { 28548, true },
-  { 28567, true },
-  { 28584, true },
-  { 28599, true },
-  { 28614, true },
-  { 28629, true },
+  { 28095, true },
+  { 28103, true },
+  { 28117, true },
+  { 28131, true },
+  { 28147, true },
+  { 28162, true },
+  { 28173, false },
+  { 28186, true },
+  { 28204, true },
+  { 28220, true },
+  { 28231, true },
+  { 28249, true },
+  { 28271, false },
+  { 28288, true },
+  { 28304, true },
+  { 28320, true },
+  { 28339, true },
+  { 28356, true },
+  { 28371, true },
+  { 28386, true },
+  { 28401, true },
+  { 28422, true },
+  { 28440, true },
+  { 28452, true },
+  { 28465, true },
+  { 28478, true },
+  { 28492, true },
+  { 28507, true },
+  { 28521, true },
+  { 28534, true },
+  { 28545, true },
+  { 28555, true },
+  { 28572, true },
+  { 28588, true },
+  { 28604, true },
+  { 28619, true },
+  { 28631, true },
+  { 28642, false },
   { 28650, true },
-  { 28668, true },
-  { 28680, true },
-  { 28693, true },
-  { 28706, true },
-  { 28720, true },
-  { 28735, true },
-  { 28749, true },
+  { 28671, true },
+  { 28679, true },
+  { 28692, true },
+  { 28700, true },
+  { 28708, true },
+  { 28726, true },
+  { 28740, true },
+  { 28754, true },
   { 28762, true },
-  { 28773, true },
-  { 28783, true },
-  { 28800, true },
-  { 28816, true },
-  { 28832, true },
-  { 28847, true },
-  { 28859, true },
-  { 28870, false },
-  { 28878, true },
-  { 28899, true },
-  { 28907, true },
-  { 28920, true },
-  { 28928, true },
+  { 28772, true },
+  { 28780, true },
+  { 28794, true },
+  { 28814, true },
+  { 28822, true },
+  { 28831, false },
+  { 28851, true },
+  { 28869, true },
+  { 28880, true },
+  { 28898, true },
+  { 28916, true },
   { 28936, true },
-  { 28954, true },
-  { 28968, true },
-  { 28982, true },
+  { 28948, true },
+  { 28960, true },
+  { 28976, true },
   { 28990, true },
-  { 29000, true },
-  { 29008, true },
-  { 29022, true },
-  { 29042, true },
+  { 29007, true },
+  { 29020, true },
+  { 29037, true },
   { 29050, true },
-  { 29059, false },
-  { 29079, true },
-  { 29097, true },
-  { 29108, true },
-  { 29126, true },
-  { 29144, true },
-  { 29164, true },
-  { 29176, true },
-  { 29188, true },
+  { 29064, true },
+  { 29077, true },
+  { 29091, true },
+  { 29101, true },
+  { 29118, true },
+  { 29138, true },
+  { 29147, true },
+  { 29167, true },
+  { 29184, true },
   { 29204, true },
   { 29218, true },
-  { 29235, true },
-  { 29248, true },
-  { 29265, true },
-  { 29278, true },
-  { 29292, true },
-  { 29305, true },
-  { 29319, true },
-  { 29329, true },
-  { 29346, true },
-  { 29366, true },
-  { 29375, true },
-  { 29395, true },
-  { 29412, true },
-  { 29432, true },
-  { 29446, true },
+  { 29238, true },
+  { 29256, true },
+  { 29270, true },
+  { 29288, true },
+  { 29298, true },
+  { 29328, true },
+  { 29343, true },
+  { 29356, true },
+  { 29369, true },
+  { 29383, true },
+  { 29398, true },
+  { 29418, false },
+  { 29428, true },
+  { 29445, true },
+  { 29455, false },
   { 29466, true },
-  { 29484, true },
-  { 29498, true },
-  { 29516, true },
-  { 29526, true },
-  { 29556, true },
-  { 29571, true },
-  { 29584, true },
-  { 29597, true },
-  { 29611, true },
+  { 29474, true },
+  { 29487, true },
+  { 29508, true },
+  { 29529, false },
+  { 29545, true },
+  { 29558, true },
+  { 29573, true },
+  { 29585, false },
+  { 29606, true },
   { 29626, true },
-  { 29646, false },
-  { 29656, true },
-  { 29673, true },
-  { 29683, false },
-  { 29694, true },
-  { 29702, true },
-  { 29715, true },
-  { 29736, true },
-  { 29757, true },
-  { 29778, false },
-  { 29794, true },
-  { 29807, true },
-  { 29822, true },
-  { 29834, false },
-  { 29855, true },
+  { 29648, true },
+  { 29662, true },
+  { 29680, true },
+  { 29700, true },
+  { 29713, true },
+  { 29727, true },
+  { 29743, true },
+  { 29761, true },
+  { 29772, true },
+  { 29785, true },
+  { 29799, true },
+  { 29814, true },
+  { 29833, true },
+  { 29845, false },
+  { 29867, true },
   { 29875, true },
-  { 29897, true },
-  { 29911, true },
-  { 29929, true },
-  { 29949, true },
-  { 29962, true },
+  { 29892, true },
+  { 29906, true },
+  { 29923, true },
+  { 29941, true },
+  { 29952, true },
   { 29976, true },
   { 29992, true },
-  { 30010, true },
-  { 30021, true },
-  { 30034, true },
-  { 30048, true },
-  { 30063, true },
-  { 30082, true },
+  { 30008, true },
+  { 30023, true },
+  { 30036, true },
+  { 30057, true },
+  { 30066, true },
+  { 30081, true },
   { 30094, false },
-  { 30116, true },
-  { 30124, true },
-  { 30141, true },
-  { 30155, true },
-  { 30172, true },
-  { 30190, true },
-  { 30201, true },
-  { 30225, true },
-  { 30241, true },
-  { 30257, true },
-  { 30272, true },
-  { 30285, true },
-  { 30306, true },
-  { 30315, true },
-  { 30330, true },
-  { 30343, false },
-  { 30353, true },
-  { 30372, true },
-  { 30386, true },
-  { 30406, true },
-  { 30415, true },
-  { 30433, false },
-  { 30455, true },
-  { 30464, true },
-  { 30483, false },
-  { 30499, false },
-  { 30513, true },
-  { 30529, true },
-  { 30544, true },
-  { 30562, true },
-  { 30580, true },
-  { 30600, true },
-  { 30622, true },
-  { 30640, true },
-  { 30657, true },
-  { 30672, true },
-  { 30687, true },
-  { 30704, false },
-  { 30720, true },
-  { 30734, true },
-  { 30748, true },
-  { 30767, true },
-  { 30784, true },
-  { 30799, true },
-  { 30826, true },
-  { 30846, true },
-  { 30868, true },
-  { 30891, true },
-  { 30911, true },
-  { 30929, true },
-  { 30951, true },
-  { 30970, true },
-  { 30993, true },
-  { 31010, true },
-  { 31024, true },
-  { 31037, true },
-  { 31074, false },
+  { 30104, true },
+  { 30123, true },
+  { 30137, true },
+  { 30157, true },
+  { 30166, true },
+  { 30184, false },
+  { 30206, true },
+  { 30215, true },
+  { 30234, false },
+  { 30250, false },
+  { 30264, true },
+  { 30280, true },
+  { 30295, true },
+  { 30313, true },
+  { 30331, true },
+  { 30351, true },
+  { 30373, true },
+  { 30391, true },
+  { 30408, true },
+  { 30423, true },
+  { 30438, true },
+  { 30455, false },
+  { 30471, true },
+  { 30485, true },
+  { 30499, true },
+  { 30518, true },
+  { 30535, true },
+  { 30550, true },
+  { 30577, true },
+  { 30597, true },
+  { 30619, true },
+  { 30642, true },
+  { 30662, true },
+  { 30680, true },
+  { 30702, true },
+  { 30721, true },
+  { 30744, true },
+  { 30761, true },
+  { 30775, true },
+  { 30788, true },
+  { 30825, false },
+  { 30836, true },
+  { 30854, true },
+  { 30874, true },
+  { 30897, true },
+  { 30922, false },
+  { 30953, true },
+  { 30967, true },
+  { 30976, true },
+  { 30987, true },
+  { 30999, true },
+  { 31011, true },
+  { 31020, true },
+  { 31032, true },
+  { 31049, true },
+  { 31059, true },
+  { 31077, false },
   { 31085, true },
-  { 31103, true },
-  { 31123, true },
-  { 31146, true },
-  { 31171, false },
-  { 31202, true },
-  { 31216, true },
-  { 31225, true },
-  { 31236, true },
-  { 31248, true },
-  { 31260, true },
+  { 31096, true },
+  { 31115, true },
+  { 31127, false },
+  { 31145, true },
+  { 31158, false },
+  { 31171, true },
+  { 31184, true },
+  { 31201, true },
+  { 31217, true },
+  { 31228, true },
+  { 31242, true },
+  { 31254, true },
   { 31269, true },
-  { 31281, true },
-  { 31298, true },
-  { 31308, true },
-  { 31326, false },
-  { 31334, true },
-  { 31345, true },
-  { 31364, true },
-  { 31376, false },
-  { 31394, true },
-  { 31407, false },
-  { 31420, true },
-  { 31433, true },
-  { 31450, true },
-  { 31466, true },
+  { 31277, true },
+  { 31291, true },
+  { 31303, true },
+  { 31315, true },
+  { 31325, true },
+  { 31336, true },
+  { 31347, true },
+  { 31361, true },
+  { 31384, true },
+  { 31400, true },
+  { 31408, true },
+  { 31423, true },
+  { 31442, true },
+  { 31461, true },
   { 31477, true },
-  { 31491, true },
-  { 31503, true },
-  { 31518, true },
-  { 31526, true },
-  { 31540, true },
-  { 31552, true },
-  { 31564, true },
-  { 31574, true },
-  { 31585, true },
-  { 31596, true },
-  { 31610, true },
-  { 31633, true },
-  { 31649, true },
-  { 31657, true },
-  { 31672, true },
-  { 31691, true },
-  { 31710, true },
-  { 31726, true },
-  { 31736, true },
-  { 31755, true },
-  { 31768, true },
-  { 31776, true },
-  { 31791, true },
-  { 31803, true },
-  { 31811, true },
-  { 31817, true },
-  { 31830, true },
-  { 31839, true },
-  { 31853, true },
+  { 31487, true },
+  { 31506, true },
+  { 31519, true },
+  { 31527, true },
+  { 31542, true },
+  { 31554, true },
+  { 31562, true },
+  { 31568, true },
+  { 31581, true },
+  { 31590, true },
+  { 31604, true },
+  { 31618, true },
+  { 31631, false },
+  { 31651, true },
+  { 31667, true },
+  { 31679, true },
+  { 31695, true },
+  { 31708, true },
+  { 31728, true },
+  { 31742, true },
+  { 31758, true },
+  { 31772, true },
+  { 31792, true },
+  { 31806, true },
+  { 31821, true },
+  { 31835, true },
+  { 31848, true },
+  { 31857, true },
   { 31867, true },
   { 31880, false },
-  { 31900, true },
-  { 31916, true },
+  { 31890, true },
+  { 31906, true },
   { 31928, true },
-  { 31944, true },
-  { 31957, true },
-  { 31977, true },
-  { 31991, true },
-  { 32007, true },
-  { 32021, true },
-  { 32041, true },
-  { 32055, true },
-  { 32070, true },
-  { 32084, true },
-  { 32097, true },
-  { 32106, true },
-  { 32116, true },
-  { 32129, false },
-  { 32139, true },
-  { 32155, true },
-  { 32177, true },
+  { 31960, true },
+  { 31979, true },
+  { 31995, true },
+  { 32016, true },
+  { 32036, true },
+  { 32049, true },
+  { 32066, true },
+  { 32086, true },
+  { 32100, true },
+  { 32119, true },
+  { 32138, true },
+  { 32153, true },
+  { 32166, true },
+  { 32181, true },
+  { 32197, true },
   { 32209, true },
-  { 32228, true },
-  { 32244, true },
-  { 32265, true },
-  { 32285, true },
-  { 32298, true },
-  { 32315, true },
-  { 32335, true },
-  { 32349, true },
-  { 32368, true },
-  { 32387, true },
+  { 32224, true },
+  { 32247, true },
+  { 32263, true },
+  { 32275, false },
+  { 32296, true },
+  { 32304, true },
+  { 32313, true },
+  { 32327, true },
+  { 32336, true },
+  { 32348, true },
+  { 32364, true },
+  { 32381, false },
+  { 32391, true },
   { 32402, true },
-  { 32415, true },
-  { 32430, true },
-  { 32446, true },
-  { 32458, true },
-  { 32473, true },
-  { 32496, true },
-  { 32512, true },
-  { 32524, false },
-  { 32545, true },
-  { 32553, true },
-  { 32562, true },
-  { 32576, true },
-  { 32585, true },
-  { 32597, true },
-  { 32613, true },
-  { 32630, false },
+  { 32414, true },
+  { 32427, true },
+  { 32445, true },
+  { 32462, true },
+  { 32479, false },
+  { 32489, true },
+  { 32507, true },
+  { 32521, true },
+  { 32538, true },
+  { 32560, true },
+  { 32573, true },
+  { 32595, true },
+  { 32611, true },
+  { 32626, true },
   { 32640, true },
-  { 32651, true },
-  { 32663, true },
-  { 32676, true },
-  { 32694, true },
+  { 32666, true },
+  { 32691, true },
   { 32711, true },
-  { 32728, false },
-  { 32738, true },
-  { 32756, true },
-  { 32770, true },
-  { 32787, true },
+  { 32725, true },
+  { 32740, true },
+  { 32753, true },
+  { 32765, true },
+  { 32775, true },
+  { 32790, true },
+  { 32800, true },
   { 32809, true },
-  { 32822, true },
-  { 32844, true },
+  { 32823, true },
+  { 32834, true },
+  { 32845, true },
   { 32860, true },
   { 32875, true },
-  { 32889, true },
-  { 32915, true },
+  { 32887, true },
+  { 32901, true },
+  { 32914, true },
+  { 32930, true },
   { 32940, true },
-  { 32960, true },
-  { 32974, true },
-  { 32989, true },
-  { 33002, true },
-  { 33014, true },
-  { 33024, true },
-  { 33039, true },
+  { 32949, true },
+  { 32961, true },
+  { 32972, true },
+  { 32981, true },
+  { 32997, true },
+  { 33007, true },
+  { 33018, true },
+  { 33029, false },
   { 33049, true },
-  { 33058, true },
-  { 33072, true },
-  { 33083, true },
+  { 33073, true },
   { 33094, true },
-  { 33109, true },
-  { 33124, true },
-  { 33136, true },
-  { 33150, true },
-  { 33163, true },
-  { 33179, true },
-  { 33189, true },
-  { 33198, true },
-  { 33210, true },
-  { 33221, true },
-  { 33230, true },
-  { 33246, true },
+  { 33102, true },
+  { 33112, true },
+  { 33126, true },
+  { 33146, false },
+  { 33156, true },
+  { 33174, false },
+  { 33188, true },
+  { 33207, true },
+  { 33224, true },
+  { 33238, false },
   { 33256, true },
-  { 33267, true },
-  { 33278, false },
-  { 33298, true },
-  { 33322, true },
-  { 33343, true },
-  { 33351, true },
-  { 33361, true },
-  { 33375, true },
-  { 33395, false },
-  { 33405, true },
-  { 33423, false },
-  { 33437, true },
-  { 33456, true },
-  { 33473, true },
-  { 33487, false },
-  { 33505, true },
-  { 33513, true },
+  { 33264, true },
+  { 33280, true },
+  { 33291, true },
+  { 33304, true },
+  { 33319, true },
+  { 33339, false },
+  { 33354, true },
+  { 33366, true },
+  { 33379, true },
+  { 33391, true },
+  { 33411, true },
+  { 33424, true },
+  { 33439, true },
+  { 33452, true },
+  { 33465, false },
+  { 33488, false },
+  { 33512, true },
   { 33529, true },
-  { 33540, true },
+  { 33542, true },
   { 33553, true },
-  { 33568, true },
-  { 33588, false },
-  { 33603, true },
-  { 33615, true },
-  { 33628, true },
-  { 33640, true },
-  { 33660, true },
-  { 33673, true },
-  { 33688, true },
+  { 33565, true },
+  { 33585, true },
+  { 33599, true },
+  { 33610, true },
+  { 33629, true },
+  { 33646, true },
+  { 33668, true },
+  { 33682, true },
   { 33701, true },
-  { 33714, true },
-  { 33727, false },
-  { 33750, false },
-  { 33774, true },
-  { 33791, true },
-  { 33804, true },
-  { 33815, true },
-  { 33827, true },
-  { 33847, true },
-  { 33861, true },
-  { 33872, true },
-  { 33891, true },
-  { 33908, true },
-  { 33930, true },
+  { 33711, true },
+  { 33725, true },
+  { 33746, true },
+  { 33758, true },
+  { 33773, true },
+  { 33787, true },
+  { 33798, true },
+  { 33812, true },
+  { 33825, true },
+  { 33841, true },
+  { 33854, true },
+  { 33874, true },
+  { 33882, true },
+  { 33894, true },
+  { 33905, true },
+  { 33922, true },
   { 33944, true },
-  { 33963, true },
-  { 33973, true },
-  { 33987, true },
-  { 34008, true },
+  { 33964, true },
+  { 33976, true },
+  { 33988, true },
+  { 34006, true },
   { 34020, true },
   { 34035, true },
-  { 34049, true },
-  { 34060, true },
-  { 34074, true },
-  { 34087, true },
-  { 34103, true },
-  { 34116, true },
-  { 34136, true },
-  { 34144, true },
-  { 34156, true },
-  { 34167, true },
-  { 34184, true },
-  { 34206, true },
-  { 34226, true },
-  { 34238, true },
-  { 34250, true },
+  { 34054, true },
+  { 34069, true },
+  { 34083, true },
+  { 34095, true },
+  { 34111, true },
+  { 34132, true },
+  { 34151, true },
+  { 34168, true },
+  { 34195, false },
+  { 34214, true },
+  { 34228, true },
+  { 34248, true },
   { 34268, true },
-  { 34282, true },
-  { 34297, true },
+  { 34281, true },
+  { 34295, true },
   { 34316, true },
-  { 34331, true },
-  { 34345, true },
+  { 34337, true },
+  { 34350, true },
   { 34357, true },
-  { 34373, true },
-  { 34394, true },
-  { 34413, true },
-  { 34430, true },
-  { 34457, false },
-  { 34476, true },
-  { 34490, true },
-  { 34510, true },
+  { 34369, true },
+  { 34391, true },
+  { 34407, true },
+  { 34422, true },
+  { 34435, true },
+  { 34455, true },
+  { 34469, true },
+  { 34484, true },
+  { 34494, true },
+  { 34508, true },
+  { 34518, true },
   { 34530, true },
-  { 34543, true },
-  { 34557, true },
-  { 34578, true },
-  { 34599, true },
-  { 34612, true },
-  { 34619, true },
-  { 34631, true },
-  { 34653, true },
-  { 34669, true },
-  { 34684, true },
-  { 34697, true },
-  { 34717, true },
+  { 34542, true },
+  { 34560, true },
+  { 34579, true },
+  { 34594, true },
+  { 34615, false },
+  { 34636, true },
+  { 34656, true },
+  { 34676, true },
+  { 34708, true },
+  { 34718, true },
   { 34731, true },
-  { 34746, true },
-  { 34756, true },
-  { 34770, true },
-  { 34780, true },
-  { 34792, true },
-  { 34804, true },
-  { 34822, true },
-  { 34841, true },
-  { 34856, true },
-  { 34877, false },
-  { 34898, true },
-  { 34918, true },
-  { 34938, true },
-  { 34970, true },
-  { 34980, true },
-  { 34993, true },
-  { 35012, true },
-  { 35029, false },
-  { 35053, false },
-  { 35075, true },
-  { 35099, true },
-  { 35129, true },
-  { 35153, true },
-  { 35169, true },
-  { 35186, true },
+  { 34750, true },
+  { 34767, false },
+  { 34791, false },
+  { 34813, true },
+  { 34837, true },
+  { 34867, true },
+  { 34891, true },
+  { 34907, true },
+  { 34924, true },
+  { 34942, true },
+  { 34957, true },
+  { 34974, true },
+  { 34988, true },
+  { 35010, true },
+  { 35035, true },
+  { 35048, true },
+  { 35063, true },
+  { 35078, true },
+  { 35102, true },
+  { 35123, true },
+  { 35137, true },
+  { 35152, true },
+  { 35168, true },
+  { 35187, true },
   { 35204, true },
-  { 35219, true },
-  { 35236, true },
-  { 35250, true },
-  { 35272, true },
-  { 35297, true },
-  { 35310, true },
-  { 35325, true },
-  { 35344, true },
-  { 35359, true },
-  { 35383, true },
-  { 35404, true },
-  { 35418, true },
+  { 35222, true },
+  { 35246, false },
+  { 35268, true },
+  { 35281, true },
+  { 35292, true },
+  { 35304, true },
+  { 35322, true },
+  { 35341, true },
+  { 35356, false },
+  { 35367, true },
+  { 35395, true },
+  { 35410, true },
   { 35433, true },
-  { 35449, true },
-  { 35468, true },
-  { 35485, true },
-  { 35503, true },
-  { 35527, false },
-  { 35549, true },
-  { 35562, true },
-  { 35573, true },
+  { 35446, true },
+  { 35457, true },
+  { 35470, true },
+  { 35488, true },
+  { 35510, true },
+  { 35535, true },
+  { 35558, true },
+  { 35572, true },
   { 35585, true },
-  { 35603, true },
-  { 35622, true },
-  { 35637, false },
-  { 35648, true },
-  { 35676, true },
-  { 35691, true },
-  { 35714, true },
-  { 35727, true },
-  { 35738, true },
-  { 35751, true },
-  { 35769, true },
-  { 35791, true },
-  { 35816, true },
-  { 35839, true },
-  { 35853, true },
-  { 35866, true },
+  { 35601, true },
+  { 35614, true },
+  { 35632, true },
+  { 35642, true },
+  { 35655, true },
+  { 35673, true },
+  { 35694, true },
+  { 35709, true },
+  { 35724, true },
+  { 35748, true },
+  { 35773, true },
+  { 35788, false },
+  { 35811, true },
+  { 35820, true },
+  { 35841, true },
+  { 35858, true },
+  { 35869, true },
   { 35882, true },
-  { 35895, true },
-  { 35913, true },
-  { 35923, true },
-  { 35936, true },
-  { 35954, true },
-  { 35975, true },
-  { 35990, true },
-  { 36005, true },
-  { 36029, true },
-  { 36054, true },
-  { 36069, false },
-  { 36092, true },
-  { 36101, true },
-  { 36122, true },
-  { 36139, true },
-  { 36150, true },
-  { 36163, true },
-  { 36176, false },
-  { 36215, true },
-  { 36228, true },
-  { 36244, true },
-  { 36258, false },
-  { 36273, true },
-  { 36293, false },
-  { 36309, true },
-  { 36328, true },
-  { 36339, true },
-  { 36352, true },
+  { 35895, false },
+  { 35934, true },
+  { 35947, true },
+  { 35963, true },
+  { 35977, false },
+  { 35992, true },
+  { 36012, false },
+  { 36028, true },
+  { 36047, true },
+  { 36058, true },
+  { 36071, true },
+  { 36083, true },
+  { 36106, true },
+  { 36118, true },
+  { 36127, true },
+  { 36137, true },
+  { 36151, true },
+  { 36166, true },
+  { 36180, true },
+  { 36191, true },
+  { 36207, true },
+  { 36223, true },
+  { 36240, true },
+  { 36252, true },
+  { 36275, true },
+  { 36300, true },
+  { 36320, true },
+  { 36332, true },
+  { 36347, true },
   { 36364, true },
-  { 36387, true },
-  { 36399, true },
+  { 36383, true },
+  { 36396, true },
   { 36408, true },
-  { 36418, true },
-  { 36432, true },
-  { 36447, true },
-  { 36461, true },
-  { 36472, true },
-  { 36491, true },
-  { 36507, true },
-  { 36523, true },
-  { 36540, true },
-  { 36552, true },
-  { 36575, true },
-  { 36600, true },
-  { 36620, true },
-  { 36632, true },
-  { 36647, true },
-  { 36664, true },
+  { 36438, true },
+  { 36452, true },
+  { 36476, true },
+  { 36499, true },
+  { 36513, true },
+  { 36526, true },
+  { 36538, true },
+  { 36558, true },
+  { 36570, true },
+  { 36593, true },
+  { 36612, true },
+  { 36623, true },
+  { 36637, true },
+  { 36649, true },
+  { 36667, true },
   { 36683, true },
-  { 36696, true },
-  { 36708, true },
-  { 36738, true },
-  { 36752, true },
+  { 36701, true },
+  { 36717, true },
+  { 36734, true },
+  { 36747, true },
+  { 36758, true },
   { 36776, true },
-  { 36799, true },
-  { 36813, true },
-  { 36826, true },
-  { 36838, true },
-  { 36858, true },
-  { 36870, true },
-  { 36893, true },
-  { 36912, true },
-  { 36923, true },
-  { 36937, true },
-  { 36949, true },
-  { 36967, true },
-  { 36983, true },
-  { 37001, true },
-  { 37017, true },
-  { 37034, true },
-  { 37047, true },
-  { 37058, true },
-  { 37076, true },
-  { 37094, true },
-  { 37117, true },
-  { 37134, false },
-  { 37149, true },
-  { 37161, true },
-  { 37173, true },
-  { 37186, true },
+  { 36794, true },
+  { 36817, true },
+  { 36834, false },
+  { 36849, true },
+  { 36861, true },
+  { 36873, true },
+  { 36886, true },
+  { 36895, true },
+  { 36910, true },
+  { 36929, true },
+  { 36943, true },
+  { 36958, true },
+  { 36970, true },
+  { 36982, true },
+  { 36996, false },
+  { 37013, true },
+  { 37024, true },
+  { 37037, true },
+  { 37054, true },
+  { 37073, true },
+  { 37086, true },
+  { 37104, true },
+  { 37130, true },
+  { 37147, true },
+  { 37166, true },
+  { 37181, true },
   { 37195, true },
-  { 37210, true },
+  { 37212, true },
   { 37229, true },
-  { 37243, true },
-  { 37258, true },
-  { 37270, true },
-  { 37282, true },
-  { 37296, false },
-  { 37313, true },
-  { 37324, true },
-  { 37337, true },
-  { 37354, true },
-  { 37373, true },
-  { 37386, true },
-  { 37404, true },
-  { 37430, true },
-  { 37447, true },
-  { 37466, true },
-  { 37481, true },
-  { 37495, true },
-  { 37512, true },
-  { 37528, true },
-  { 37547, true },
-  { 37566, true },
-  { 37586, true },
-  { 37602, true },
-  { 37618, true },
-  { 37632, true },
-  { 37642, true },
-  { 37650, true },
-  { 37676, true },
-  { 37693, true },
-  { 37714, true },
-  { 37732, true },
-  { 37746, true },
-  { 37758, true },
-  { 37774, false },
-  { 37793, true },
-  { 37802, true },
-  { 37816, true },
-  { 37831, true },
-  { 37848, true },
-  { 37859, true },
-  { 37870, true },
-  { 37889, true },
-  { 37902, true },
-  { 37924, true },
-  { 37938, false },
-  { 37952, true },
-  { 37968, true },
-  { 37983, true },
-  { 37995, true },
-  { 38018, true },
-  { 38030, true },
-  { 38053, true },
-  { 38072, true },
-  { 38088, true },
-  { 38103, true },
-  { 38113, true },
-  { 38120, true },
-  { 38131, true },
-  { 38148, true },
-  { 38162, true },
-  { 38171, true },
-  { 38179, true },
-  { 38193, true },
-  { 38212, false },
-  { 38223, true },
-  { 38239, false },
-  { 38249, false },
-  { 38265, true },
-  { 38278, true },
-  { 38292, true },
-  { 38307, true },
-  { 38323, true },
-  { 38345, true },
-  { 38359, true },
-  { 38372, true },
-  { 38386, true },
-  { 38400, true },
-  { 38415, true },
-  { 38430, true },
-  { 38455, true },
-  { 38475, true },
-  { 38491, true },
+  { 37245, true },
+  { 37264, true },
+  { 37283, true },
+  { 37303, true },
+  { 37319, true },
+  { 37335, true },
+  { 37349, true },
+  { 37359, true },
+  { 37367, true },
+  { 37393, true },
+  { 37410, true },
+  { 37431, true },
+  { 37449, true },
+  { 37463, true },
+  { 37482, true },
+  { 37494, true },
+  { 37510, false },
+  { 37529, true },
+  { 37538, true },
+  { 37552, true },
+  { 37567, true },
+  { 37584, true },
+  { 37595, true },
+  { 37606, true },
+  { 37625, true },
+  { 37638, true },
+  { 37660, true },
+  { 37674, false },
+  { 37688, true },
+  { 37704, true },
+  { 37719, true },
+  { 37731, true },
+  { 37754, true },
+  { 37766, true },
+  { 37789, true },
+  { 37808, true },
+  { 37824, true },
+  { 37839, true },
+  { 37849, true },
+  { 37856, true },
+  { 37867, true },
+  { 37884, true },
+  { 37898, true },
+  { 37907, true },
+  { 37915, true },
+  { 37929, true },
+  { 37948, false },
+  { 37959, true },
+  { 37975, false },
+  { 37985, false },
+  { 38001, true },
+  { 38014, true },
+  { 38028, true },
+  { 38043, true },
+  { 38059, true },
+  { 38081, true },
+  { 38095, true },
+  { 38108, true },
+  { 38122, true },
+  { 38136, true },
+  { 38151, true },
+  { 38166, true },
+  { 38191, true },
+  { 38211, true },
+  { 38227, true },
+  { 38240, true },
+  { 38253, true },
+  { 38283, true },
+  { 38295, true },
+  { 38310, true },
+  { 38320, true },
+  { 38336, true },
+  { 38344, false },
+  { 38356, true },
+  { 38367, true },
+  { 38376, true },
+  { 38391, true },
+  { 38408, true },
+  { 38424, true },
+  { 38437, true },
+  { 38450, true },
+  { 38467, true },
+  { 38476, true },
+  { 38484, true },
+  { 38495, true },
   { 38504, true },
-  { 38517, true },
-  { 38547, true },
-  { 38559, true },
-  { 38574, true },
-  { 38584, true },
-  { 38600, true },
-  { 38608, false },
-  { 38620, true },
-  { 38631, true },
-  { 38640, true },
-  { 38655, true },
-  { 38672, true },
-  { 38688, true },
-  { 38701, true },
-  { 38714, true },
-  { 38731, true },
-  { 38740, true },
-  { 38748, true },
-  { 38759, true },
-  { 38768, true },
+  { 38518, true },
+  { 38531, true },
+  { 38539, true },
+  { 38557, true },
+  { 38566, true },
+  { 38575, true },
+  { 38583, true },
+  { 38591, true },
+  { 38610, true },
+  { 38629, true },
+  { 38638, true },
+  { 38658, true },
+  { 38681, true },
+  { 38691, true },
+  { 38709, true },
+  { 38729, true },
+  { 38742, true },
+  { 38756, true },
+  { 38772, true },
   { 38782, true },
-  { 38795, true },
+  { 38793, true },
   { 38803, true },
-  { 38821, true },
-  { 38830, true },
-  { 38839, true },
-  { 38847, true },
-  { 38855, true },
-  { 38874, true },
-  { 38893, true },
-  { 38902, true },
-  { 38922, true },
-  { 38945, true },
-  { 38955, true },
-  { 38965, true },
-  { 38983, true },
-  { 39003, true },
-  { 39016, true },
+  { 38820, true },
+  { 38836, true },
+  { 38851, true },
+  { 38862, true },
+  { 38869, true },
+  { 38880, true },
+  { 38891, true },
+  { 38899, true },
+  { 38919, true },
+  { 38940, true },
+  { 38959, true },
+  { 38974, true },
+  { 38996, true },
+  { 39008, false },
   { 39030, true },
-  { 39046, true },
-  { 39056, true },
-  { 39067, true },
-  { 39077, true },
-  { 39094, true },
-  { 39110, true },
-  { 39125, true },
-  { 39136, true },
-  { 39143, true },
-  { 39154, true },
-  { 39165, true },
-  { 39173, true },
-  { 39193, true },
-  { 39214, true },
+  { 39049, true },
+  { 39065, true },
+  { 39083, true },
+  { 39098, true },
+  { 39115, true },
+  { 39130, true },
+  { 39149, true },
+  { 39161, true },
+  { 39181, true },
+  { 39198, true },
+  { 39212, true },
+  { 39221, true },
   { 39233, true },
-  { 39248, true },
+  { 39243, true },
+  { 39252, true },
+  { 39261, true },
   { 39270, true },
-  { 39282, false },
-  { 39304, true },
-  { 39323, true },
-  { 39339, true },
-  { 39357, true },
-  { 39372, true },
-  { 39389, true },
-  { 39404, true },
-  { 39423, true },
-  { 39435, true },
+  { 39279, true },
+  { 39289, true },
+  { 39299, true },
+  { 39308, true },
+  { 39317, true },
+  { 39335, true },
+  { 39351, true },
+  { 39359, true },
+  { 39366, true },
+  { 39379, true },
+  { 39396, true },
+  { 39410, true },
+  { 39417, true },
+  { 39427, true },
+  { 39438, true },
   { 39455, true },
-  { 39472, true },
-  { 39486, true },
-  { 39495, true },
-  { 39507, true },
-  { 39517, true },
+  { 39475, true },
+  { 39494, false },
+  { 39508, true },
   { 39526, true },
-  { 39535, true },
-  { 39544, true },
-  { 39553, true },
-  { 39563, true },
-  { 39573, true },
-  { 39582, true },
-  { 39591, true },
-  { 39609, true },
-  { 39625, true },
-  { 39633, true },
-  { 39640, true },
-  { 39653, true },
-  { 39670, true },
-  { 39684, true },
-  { 39691, true },
-  { 39701, true },
-  { 39712, true },
-  { 39729, true },
-  { 39749, true },
-  { 39768, false },
-  { 39782, true },
-  { 39800, true },
-  { 39813, true },
+  { 39539, true },
+  { 39556, true },
+  { 39570, true },
+  { 39584, true },
+  { 39601, true },
+  { 39627, true },
+  { 39641, true },
+  { 39658, true },
+  { 39673, true },
+  { 39687, true },
+  { 39698, true },
+  { 39711, true },
+  { 39721, true },
+  { 39732, true },
+  { 39751, true },
+  { 39766, true },
+  { 39781, true },
+  { 39808, true },
+  { 39818, true },
   { 39830, true },
-  { 39844, true },
-  { 39858, true },
-  { 39875, true },
-  { 39901, true },
-  { 39915, true },
-  { 39932, true },
-  { 39947, true },
-  { 39961, true },
+  { 39842, true },
+  { 39850, true },
+  { 39861, true },
+  { 39870, true },
+  { 39878, true },
+  { 39889, true },
+  { 39916, true },
+  { 39926, true },
+  { 39937, true },
+  { 39948, true },
+  { 39958, true },
   { 39972, true },
-  { 39985, true },
-  { 39995, true },
-  { 40006, true },
-  { 40025, true },
-  { 40040, true },
-  { 40055, true },
-  { 40082, true },
-  { 40092, true },
-  { 40104, true },
-  { 40116, true },
-  { 40124, true },
-  { 40135, true },
-  { 40144, true },
-  { 40152, true },
-  { 40163, true },
-  { 40190, true },
-  { 40200, true },
+  { 39986, true },
+  { 39997, true },
+  { 40004, true },
+  { 40012, true },
+  { 40020, true },
+  { 40036, true },
+  { 40050, true },
+  { 40064, true },
+  { 40073, true },
+  { 40080, true },
+  { 40087, true },
+  { 40103, true },
+  { 40115, true },
+  { 40129, true },
+  { 40151, true },
+  { 40162, true },
+  { 40173, true },
+  { 40184, true },
+  { 40195, true },
   { 40211, true },
-  { 40222, true },
-  { 40232, true },
-  { 40246, true },
-  { 40260, true },
-  { 40271, true },
-  { 40278, true },
-  { 40286, true },
-  { 40294, true },
-  { 40310, true },
-  { 40324, true },
-  { 40338, true },
-  { 40347, true },
-  { 40359, true },
-  { 40366, true },
-  { 40373, true },
-  { 40389, true },
-  { 40401, true },
-  { 40415, true },
+  { 40228, true },
+  { 40241, true },
+  { 40267, false },
+  { 40290, true },
+  { 40302, true },
+  { 40318, true },
+  { 40328, true },
+  { 40341, true },
+  { 40352, true },
+  { 40367, true },
+  { 40385, true },
+  { 40397, false },
+  { 40409, true },
+  { 40423, true },
   { 40437, true },
-  { 40448, true },
-  { 40459, true },
-  { 40470, true },
-  { 40481, true },
-  { 40497, true },
+  { 40454, true },
+  { 40472, true },
+  { 40485, true },
+  { 40504, true },
   { 40514, true },
-  { 40527, true },
-  { 40553, false },
-  { 40576, true },
-  { 40588, true },
-  { 40604, true },
-  { 40614, true },
-  { 40627, true },
-  { 40638, true },
-  { 40653, true },
-  { 40671, true },
-  { 40683, false },
-  { 40695, true },
-  { 40709, true },
-  { 40723, true },
-  { 40740, true },
-  { 40758, true },
-  { 40771, true },
-  { 40790, true },
-  { 40800, true },
-  { 40811, true },
-  { 40824, true },
+  { 40525, true },
+  { 40538, true },
+  { 40555, true },
+  { 40573, true },
+  { 40589, true },
+  { 40602, true },
+  { 40620, true },
+  { 40634, true },
+  { 40652, true },
+  { 40667, true },
+  { 40688, true },
+  { 40704, true },
+  { 40725, true },
+  { 40741, true },
+  { 40760, false },
+  { 40781, false },
+  { 40801, true },
+  { 40821, true },
   { 40841, true },
-  { 40859, true },
-  { 40875, true },
-  { 40888, true },
-  { 40906, true },
-  { 40920, true },
-  { 40938, true },
-  { 40953, true },
-  { 40974, true },
-  { 40990, true },
-  { 41011, true },
-  { 41027, true },
-  { 41046, false },
-  { 41067, false },
-  { 41087, true },
-  { 41107, true },
-  { 41127, true },
-  { 41143, true },
-  { 41160, true },
-  { 41179, true },
-  { 41197, true },
-  { 41217, true },
-  { 41233, false },
-  { 41243, true },
-  { 41252, true },
-  { 41270, true },
-  { 41284, true },
-  { 41302, false },
-  { 41314, true },
-  { 41327, true },
-  { 41342, true },
-  { 41357, true },
-  { 41365, true },
-  { 41399, true },
-  { 41410, false },
-  { 41424, true },
-  { 41442, true },
-  { 41460, true },
-  { 41475, true },
-  { 41486, true },
-  { 41500, true },
-  { 41515, true },
-  { 41532, true },
-  { 41547, true },
-  { 41559, true },
-  { 41588, true },
-  { 41621, true },
-  { 41633, true },
-  { 41645, true },
-  { 41662, true },
-  { 41674, true },
-  { 41686, true },
-  { 41701, false },
-  { 41713, true },
-  { 41722, true },
-  { 41738, true },
-  { 41750, true },
-  { 41767, true },
-  { 41782, false },
+  { 40857, true },
+  { 40874, true },
+  { 40893, true },
+  { 40911, true },
+  { 40931, true },
+  { 40947, false },
+  { 40957, true },
+  { 40966, true },
+  { 40984, true },
+  { 40998, true },
+  { 41016, false },
+  { 41028, true },
+  { 41041, true },
+  { 41056, true },
+  { 41071, true },
+  { 41079, true },
+  { 41113, true },
+  { 41124, false },
+  { 41138, true },
+  { 41156, true },
+  { 41174, true },
+  { 41189, true },
+  { 41200, true },
+  { 41214, true },
+  { 41229, true },
+  { 41246, true },
+  { 41258, true },
+  { 41287, true },
+  { 41320, true },
+  { 41332, true },
+  { 41344, true },
+  { 41361, true },
+  { 41373, true },
+  { 41385, true },
+  { 41400, false },
+  { 41412, true },
+  { 41421, true },
+  { 41437, true },
+  { 41449, true },
+  { 41466, true },
+  { 41481, false },
+  { 41495, true },
+  { 41515, false },
+  { 41529, true },
+  { 41540, true },
+  { 41553, true },
+  { 41563, false },
+  { 41579, true },
+  { 41593, true },
+  { 41607, true },
+  { 41618, true },
+  { 41631, true },
+  { 41647, true },
+  { 41658, true },
+  { 41675, true },
+  { 41701, true },
+  { 41721, true },
+  { 41735, false },
+  { 41749, true },
+  { 41763, false },
+  { 41780, true },
   { 41796, true },
-  { 41816, false },
-  { 41830, true },
-  { 41841, true },
-  { 41854, true },
-  { 41864, false },
-  { 41880, true },
-  { 41894, true },
-  { 41908, true },
-  { 41919, true },
+  { 41823, true },
+  { 41834, true },
+  { 41849, true },
+  { 41861, true },
+  { 41876, true },
+  { 41898, true },
+  { 41916, true },
   { 41932, true },
-  { 41948, true },
-  { 41959, true },
-  { 41976, true },
-  { 42002, true },
-  { 42022, false },
-  { 42036, false },
-  { 42050, true },
-  { 42064, false },
-  { 42081, true },
-  { 42097, true },
-  { 42124, true },
-  { 42135, true },
-  { 42150, true },
-  { 42162, true },
+  { 41952, true },
+  { 41966, true },
+  { 41982, true },
+  { 42000, true },
+  { 42013, true },
+  { 42030, true },
+  { 42043, true },
+  { 42058, true },
+  { 42074, true },
+  { 42093, true },
+  { 42110, true },
+  { 42126, true },
+  { 42138, true },
+  { 42151, true },
   { 42177, true },
-  { 42199, true },
-  { 42217, true },
-  { 42233, true },
-  { 42253, true },
-  { 42267, true },
-  { 42283, true },
-  { 42301, true },
-  { 42314, true },
+  { 42197, true },
+  { 42208, true },
+  { 42226, true },
+  { 42240, true },
+  { 42249, true },
+  { 42266, true },
+  { 42277, true },
+  { 42289, true },
+  { 42299, true },
+  { 42310, true },
   { 42331, true },
-  { 42344, true },
-  { 42359, true },
-  { 42375, true },
-  { 42394, true },
-  { 42411, true },
-  { 42427, true },
-  { 42439, true },
-  { 42452, true },
-  { 42478, true },
-  { 42498, true },
-  { 42509, true },
+  { 42343, true },
+  { 42354, true },
+  { 42362, true },
+  { 42370, true },
+  { 42381, true },
+  { 42397, true },
+  { 42407, true },
+  { 42418, true },
+  { 42431, true },
+  { 42446, true },
+  { 42463, true },
+  { 42485, true },
+  { 42506, true },
+  { 42514, true },
   { 42527, true },
-  { 42541, true },
-  { 42550, true },
-  { 42567, true },
-  { 42578, true },
-  { 42590, true },
-  { 42600, true },
-  { 42611, true },
-  { 42632, true },
-  { 42644, true },
-  { 42655, true },
-  { 42663, true },
-  { 42671, true },
-  { 42682, true },
-  { 42698, true },
-  { 42708, true },
+  { 42538, false },
+  { 42558, true },
+  { 42573, true },
+  { 42586, true },
+  { 42598, true },
+  { 42619, true },
+  { 42633, true },
+  { 42647, true },
+  { 42664, true },
+  { 42679, true },
+  { 42693, true },
+  { 42707, true },
   { 42721, true },
-  { 42736, true },
-  { 42753, true },
-  { 42775, true },
-  { 42796, true },
-  { 42804, true },
-  { 42817, true },
-  { 42828, false },
-  { 42848, true },
-  { 42863, true },
-  { 42876, true },
-  { 42888, true },
-  { 42909, true },
-  { 42923, true },
-  { 42937, true },
-  { 42954, true },
-  { 42969, true },
-  { 42983, true },
-  { 42997, true },
-  { 43011, true },
-  { 43025, true },
-  { 43039, true },
-  { 43054, true },
-  { 43066, true },
-  { 43080, true },
-  { 43098, true },
-  { 43113, true },
-  { 43123, true },
-  { 43139, true },
-  { 43150, true },
-  { 43171, true },
-  { 43186, true },
-  { 43199, true },
-  { 43214, true },
-  { 43226, true },
-  { 43241, true },
-  { 43258, true },
-  { 43275, true },
-  { 43287, true },
+  { 42735, true },
+  { 42750, true },
+  { 42762, true },
+  { 42776, true },
+  { 42794, true },
+  { 42809, true },
+  { 42819, true },
+  { 42830, true },
+  { 42851, true },
+  { 42866, true },
+  { 42879, true },
+  { 42894, true },
+  { 42906, true },
+  { 42921, true },
+  { 42938, true },
+  { 42955, true },
+  { 42967, true },
+  { 42976, true },
+  { 42996, true },
+  { 43007, true },
+  { 43022, true },
+  { 43038, true },
+  { 43045, true },
+  { 43068, true },
+  { 43082, true },
+  { 43097, true },
+  { 43112, true },
+  { 43127, true },
+  { 43138, true },
+  { 43148, true },
+  { 43157, true },
+  { 43168, true },
+  { 43180, true },
+  { 43191, true },
+  { 43202, true },
+  { 43215, true },
+  { 43231, true },
+  { 43246, true },
+  { 43262, true },
+  { 43279, true },
   { 43296, true },
-  { 43316, true },
-  { 43327, true },
-  { 43342, true },
-  { 43358, true },
-  { 43365, true },
-  { 43388, true },
-  { 43402, true },
-  { 43417, true },
-  { 43432, true },
-  { 43447, true },
-  { 43458, true },
-  { 43468, true },
-  { 43477, true },
-  { 43488, true },
-  { 43500, true },
-  { 43511, true },
-  { 43522, true },
-  { 43535, true },
-  { 43551, true },
-  { 43566, true },
-  { 43582, true },
-  { 43599, true },
-  { 43616, true },
-  { 43630, true },
-  { 43645, true },
-  { 43661, true },
-  { 43676, true },
+  { 43310, true },
+  { 43325, true },
+  { 43341, true },
+  { 43356, true },
+  { 43366, true },
+  { 43379, true },
+  { 43391, true },
+  { 43419, true },
+  { 43431, true },
+  { 43445, true },
+  { 43461, true },
+  { 43474, true },
+  { 43485, true },
+  { 43507, true },
+  { 43527, true },
+  { 43548, true },
+  { 43563, true },
+  { 43577, true },
+  { 43587, true },
+  { 43598, true },
+  { 43617, true },
+  { 43634, true },
+  { 43647, true },
+  { 43661, false },
+  { 43674, true },
   { 43686, true },
-  { 43699, true },
-  { 43711, true },
-  { 43739, true },
-  { 43751, true },
-  { 43765, true },
-  { 43781, true },
-  { 43794, true },
-  { 43805, true },
-  { 43827, true },
-  { 43847, true },
-  { 43868, true },
-  { 43883, true },
-  { 43897, true },
-  { 43907, true },
-  { 43918, true },
-  { 43937, true },
-  { 43954, true },
-  { 43967, true },
-  { 43981, false },
-  { 43994, true },
-  { 44006, true },
-  { 44017, true },
-  { 44035, true },
-  { 44053, true },
-  { 44065, true },
-  { 44080, true },
-  { 44094, true },
-  { 44108, true },
-  { 44116, true },
-  { 44145, true },
-  { 44164, true },
-  { 44177, true },
-  { 44202, true },
-  { 44219, true },
-  { 44240, true },
-  { 44252, true },
+  { 43697, true },
+  { 43715, true },
+  { 43733, true },
+  { 43745, true },
+  { 43760, true },
+  { 43774, true },
+  { 43788, true },
+  { 43796, true },
+  { 43825, true },
+  { 43844, true },
+  { 43857, true },
+  { 43882, true },
+  { 43899, true },
+  { 43920, true },
+  { 43932, true },
+  { 43956, true },
+  { 43989, true },
+  { 44001, true },
+  { 44023, true },
+  { 44040, true },
+  { 44055, true },
+  { 44069, true },
+  { 44095, true },
+  { 44105, true },
+  { 44124, true },
+  { 44137, true },
+  { 44147, true },
+  { 44157, true },
+  { 44175, true },
+  { 44193, true },
+  { 44220, true },
+  { 44236, true },
+  { 44261, true },
   { 44276, true },
-  { 44309, true },
-  { 44321, true },
-  { 44343, true },
-  { 44360, true },
-  { 44375, true },
-  { 44389, true },
-  { 44415, true },
-  { 44425, true },
-  { 44444, true },
-  { 44457, true },
+  { 44296, true },
+  { 44311, true },
+  { 44326, true },
+  { 44347, true },
+  { 44371, true },
+  { 44384, true },
+  { 44394, false },
+  { 44408, true },
+  { 44419, true },
+  { 44433, true },
+  { 44452, true },
   { 44467, true },
-  { 44477, true },
-  { 44495, true },
-  { 44513, true },
-  { 44540, true },
-  { 44556, true },
-  { 44581, true },
-  { 44596, true },
-  { 44616, true },
-  { 44631, true },
-  { 44646, true },
-  { 44667, true },
-  { 44678, true },
-  { 44702, true },
-  { 44715, true },
-  { 44725, false },
-  { 44739, true },
-  { 44750, true },
-  { 44764, true },
-  { 44783, true },
-  { 44798, true },
-  { 44813, true },
-  { 44822, true },
-  { 44832, true },
-  { 44847, true },
-  { 44859, true },
-  { 44877, true },
-  { 44888, true },
-  { 44905, true },
-  { 44913, true },
-  { 44922, true },
-  { 44932, true },
-  { 44945, true },
-  { 44955, true },
-  { 44969, false },
-  { 44994, true },
-  { 45012, false },
+  { 44482, true },
+  { 44491, true },
+  { 44501, true },
+  { 44516, true },
+  { 44528, true },
+  { 44546, true },
+  { 44557, true },
+  { 44574, true },
+  { 44582, true },
+  { 44591, true },
+  { 44601, true },
+  { 44614, true },
+  { 44624, true },
+  { 44638, false },
+  { 44663, true },
+  { 44681, false },
+  { 44705, true },
+  { 44719, true },
+  { 44738, true },
+  { 44765, true },
+  { 44777, true },
+  { 44785, true },
+  { 44794, true },
+  { 44808, true },
+  { 44825, true },
+  { 44841, true },
+  { 44856, true },
+  { 44868, true },
+  { 44885, true },
+  { 44897, true },
+  { 44909, true },
+  { 44919, true },
+  { 44931, true },
+  { 44944, true },
+  { 44958, true },
+  { 44975, true },
+  { 44986, true },
+  { 45004, false },
+  { 45024, true },
   { 45036, true },
-  { 45050, true },
-  { 45069, true },
-  { 45096, true },
-  { 45108, true },
+  { 45048, true },
+  { 45058, true },
+  { 45071, true },
+  { 45093, true },
+  { 45107, true },
   { 45116, true },
-  { 45125, true },
-  { 45139, true },
+  { 45128, true },
+  { 45135, true },
+  { 45147, true },
   { 45156, true },
-  { 45172, true },
-  { 45187, true },
-  { 45199, true },
-  { 45216, true },
-  { 45228, true },
+  { 45166, true },
+  { 45180, true },
+  { 45197, true },
+  { 45208, true },
+  { 45222, true },
+  { 45231, true },
   { 45240, true },
-  { 45250, true },
-  { 45262, true },
-  { 45275, true },
-  { 45289, true },
-  { 45306, true },
-  { 45317, true },
-  { 45335, false },
-  { 45355, true },
-  { 45367, true },
-  { 45379, true },
-  { 45389, true },
-  { 45402, true },
-  { 45424, true },
-  { 45438, true },
-  { 45447, true },
-  { 45459, true },
+  { 45255, true },
+  { 45267, true },
+  { 45283, true },
+  { 45299, true },
+  { 45316, true },
+  { 45326, true },
+  { 45348, true },
+  { 45357, true },
+  { 45369, true },
+  { 45383, true },
+  { 45416, true },
+  { 45441, true },
+  { 45450, true },
   { 45466, true },
   { 45478, true },
-  { 45487, true },
-  { 45497, true },
-  { 45511, true },
-  { 45528, true },
-  { 45539, true },
-  { 45553, true },
-  { 45562, true },
-  { 45571, true },
-  { 45586, true },
-  { 45598, true },
-  { 45614, true },
-  { 45630, true },
-  { 45647, true },
-  { 45657, true },
-  { 45679, true },
-  { 45688, true },
-  { 45700, true },
-  { 45714, true },
-  { 45747, true },
-  { 45772, true },
-  { 45781, true },
-  { 45797, true },
-  { 45809, true },
-  { 45820, true },
-  { 45845, true },
-  { 45860, true },
+  { 45489, true },
+  { 45514, true },
+  { 45529, true },
+  { 45551, true },
+  { 45576, true },
+  { 45607, true },
+  { 45618, true },
+  { 45634, true },
+  { 45648, true },
+  { 45666, true },
+  { 45680, true },
+  { 45695, false },
+  { 45712, true },
+  { 45730, true },
+  { 45743, true },
+  { 45753, true },
+  { 45765, true },
+  { 45780, true },
+  { 45791, true },
+  { 45805, true },
+  { 45818, true },
+  { 45830, true },
+  { 45842, true },
+  { 45853, true },
+  { 45869, true },
   { 45882, true },
-  { 45907, true },
-  { 45938, true },
-  { 45949, true },
-  { 45965, true },
+  { 45894, false },
+  { 45911, true },
+  { 45931, true },
+  { 45948, true },
+  { 45963, true },
   { 45979, true },
-  { 45997, true },
-  { 46011, true },
-  { 46026, false },
-  { 46043, true },
-  { 46061, true },
-  { 46074, true },
-  { 46084, true },
-  { 46096, true },
+  { 45994, true },
+  { 46009, true },
+  { 46032, true },
+  { 46058, false },
+  { 46078, true },
+  { 46093, false },
   { 46111, true },
-  { 46122, true },
-  { 46136, true },
-  { 46149, true },
-  { 46161, true },
-  { 46173, true },
-  { 46184, true },
-  { 46200, true },
-  { 46213, true },
-  { 46225, false },
-  { 46242, true },
-  { 46262, true },
-  { 46279, true },
-  { 46294, true },
-  { 46310, true },
+  { 46130, true },
+  { 46147, true },
+  { 46160, true },
+  { 46177, true },
+  { 46187, false },
+  { 46204, true },
+  { 46223, true },
+  { 46240, true },
+  { 46253, true },
+  { 46267, true },
+  { 46284, true },
+  { 46292, true },
+  { 46304, true },
+  { 46314, true },
   { 46325, true },
-  { 46340, true },
-  { 46363, true },
-  { 46389, false },
-  { 46409, true },
-  { 46424, false },
-  { 46442, true },
-  { 46461, true },
-  { 46478, true },
-  { 46491, true },
-  { 46508, true },
-  { 46518, false },
-  { 46535, true },
-  { 46554, true },
-  { 46571, true },
-  { 46584, true },
+  { 46335, true },
+  { 46348, true },
+  { 46362, true },
+  { 46373, true },
+  { 46386, true },
+  { 46405, false },
+  { 46413, true },
+  { 46424, true },
+  { 46437, true },
+  { 46450, true },
+  { 46469, true },
+  { 46485, true },
+  { 46497, true },
+  { 46511, true },
+  { 46525, true },
+  { 46537, true },
+  { 46553, true },
+  { 46565, true },
+  { 46580, true },
   { 46598, true },
-  { 46615, true },
-  { 46623, true },
-  { 46635, true },
-  { 46645, true },
-  { 46656, true },
-  { 46666, true },
+  { 46613, true },
+  { 46628, true },
+  { 46644, true },
+  { 46658, true },
   { 46679, true },
-  { 46693, true },
-  { 46704, true },
-  { 46717, true },
-  { 46736, false },
-  { 46744, true },
-  { 46755, true },
-  { 46768, true },
-  { 46781, true },
+  { 46695, true },
+  { 46714, true },
+  { 46733, true },
+  { 46750, false },
+  { 46770, true },
   { 46800, true },
-  { 46816, true },
-  { 46828, true },
-  { 46842, true },
-  { 46856, true },
-  { 46868, true },
-  { 46884, true },
-  { 46896, true },
-  { 46911, true },
-  { 46929, true },
-  { 46944, true },
-  { 46960, true },
-  { 46974, true },
-  { 46995, true },
-  { 47011, true },
-  { 47030, true },
-  { 47049, true },
-  { 47066, false },
-  { 47086, true },
+  { 46826, true },
+  { 46843, true },
+  { 46855, true },
+  { 46875, true },
+  { 46889, true },
+  { 46908, true },
+  { 46926, true },
+  { 46941, true },
+  { 46952, true },
+  { 46962, true },
+  { 46980, true },
+  { 46999, true },
+  { 47009, true },
+  { 47027, true },
+  { 47036, false },
+  { 47047, false },
+  { 47061, false },
+  { 47081, true },
+  { 47089, true },
+  { 47103, true },
   { 47116, true },
-  { 47142, true },
-  { 47159, true },
-  { 47171, true },
-  { 47191, true },
-  { 47205, true },
-  { 47224, true },
-  { 47242, true },
-  { 47257, true },
-  { 47268, true },
-  { 47278, true },
-  { 47296, true },
-  { 47315, true },
-  { 47325, true },
-  { 47343, true },
-  { 47352, false },
-  { 47363, false },
-  { 47377, false },
-  { 47397, true },
-  { 47405, true },
-  { 47419, true },
-  { 47432, true },
-  { 47448, true },
-  { 47458, true },
-  { 47467, true },
-  { 47480, true },
-  { 47500, false },
-  { 47515, true },
-  { 47524, false },
-  { 47533, true },
-  { 47549, true },
-  { 47566, true },
-  { 47575, true },
-  { 47582, true },
-  { 47590, true },
-  { 47602, true },
-  { 47611, true },
-  { 47621, true },
-  { 47638, true },
+  { 47126, true },
+  { 47135, true },
+  { 47148, true },
+  { 47168, false },
+  { 47183, true },
+  { 47192, false },
+  { 47201, true },
+  { 47217, true },
+  { 47234, true },
+  { 47243, true },
+  { 47250, true },
+  { 47258, true },
+  { 47270, true },
+  { 47279, true },
+  { 47289, true },
+  { 47306, true },
+  { 47316, true },
+  { 47324, true },
+  { 47332, true },
+  { 47339, true },
+  { 47350, true },
+  { 47363, true },
+  { 47370, true },
+  { 47380, true },
+  { 47395, true },
+  { 47410, true },
+  { 47423, true },
+  { 47435, true },
+  { 47450, true },
+  { 47461, true },
+  { 47471, true },
+  { 47479, true },
+  { 47488, true },
+  { 47496, true },
+  { 47510, true },
+  { 47522, true },
+  { 47537, true },
+  { 47547, true },
+  { 47564, true },
+  { 47573, true },
+  { 47583, true },
+  { 47599, true },
+  { 47615, true },
+  { 47634, true },
   { 47648, true },
-  { 47656, true },
   { 47664, true },
-  { 47671, true },
-  { 47682, true },
-  { 47695, true },
-  { 47702, true },
-  { 47712, true },
-  { 47727, true },
-  { 47742, true },
-  { 47755, true },
-  { 47767, true },
-  { 47782, true },
-  { 47793, true },
-  { 47803, true },
-  { 47811, true },
-  { 47820, true },
-  { 47828, true },
-  { 47842, true },
-  { 47854, true },
-  { 47869, true },
-  { 47879, true },
-  { 47896, true },
-  { 47905, true },
-  { 47915, true },
+  { 47677, true },
+  { 47692, true },
+  { 47705, true },
+  { 47716, true },
+  { 47728, true },
+  { 47753, false },
+  { 47762, true },
+  { 47775, true },
+  { 47784, true },
+  { 47800, true },
+  { 47821, true },
+  { 47835, true },
+  { 47849, true },
+  { 47861, true },
+  { 47883, true },
+  { 47894, true },
+  { 47906, true },
+  { 47917, true },
   { 47931, true },
-  { 47947, true },
-  { 47966, true },
-  { 47980, true },
-  { 47996, true },
-  { 48009, true },
-  { 48024, true },
-  { 48037, true },
+  { 47951, true },
+  { 47965, true },
+  { 47988, true },
+  { 48002, true },
+  { 48017, true },
+  { 48034, true },
   { 48048, true },
-  { 48060, true },
-  { 48085, false },
+  { 48067, true },
+  { 48083, true },
   { 48094, true },
-  { 48107, true },
-  { 48116, true },
-  { 48132, true },
-  { 48153, true },
-  { 48167, true },
-  { 48181, true },
-  { 48193, true },
-  { 48215, true },
-  { 48227, true },
-  { 48238, true },
+  { 48105, true },
+  { 48117, true },
+  { 48138, false },
+  { 48154, true },
+  { 48171, true },
+  { 48189, true },
+  { 48204, true },
+  { 48232, false },
+  { 48242, false },
   { 48252, true },
-  { 48272, true },
-  { 48286, true },
-  { 48309, true },
-  { 48323, true },
-  { 48338, true },
-  { 48355, true },
-  { 48369, true },
-  { 48388, true },
-  { 48404, true },
-  { 48415, true },
-  { 48426, true },
-  { 48438, true },
-  { 48459, false },
-  { 48475, true },
-  { 48492, true },
-  { 48510, true },
-  { 48525, true },
-  { 48553, false },
-  { 48563, false },
-  { 48573, true },
-  { 48592, false },
-  { 48604, true },
-  { 48618, true },
-  { 48631, true },
-  { 48650, true },
-  { 48666, true },
-  { 48681, true },
-  { 48704, true },
-  { 48717, true },
-  { 48734, true },
+  { 48271, false },
+  { 48283, true },
+  { 48297, true },
+  { 48310, true },
+  { 48329, true },
+  { 48345, true },
+  { 48360, true },
+  { 48383, true },
+  { 48396, true },
+  { 48413, true },
+  { 48422, true },
+  { 48443, true },
+  { 48458, true },
+  { 48474, true },
+  { 48487, true },
+  { 48500, true },
+  { 48512, true },
+  { 48526, true },
+  { 48543, true },
+  { 48560, true },
+  { 48571, true },
+  { 48585, true },
+  { 48592, true },
+  { 48601, true },
+  { 48616, true },
+  { 48627, true },
+  { 48651, true },
+  { 48662, true },
+  { 48672, true },
+  { 48685, true },
+  { 48696, true },
+  { 48708, true },
+  { 48729, true },
   { 48743, true },
-  { 48764, true },
-  { 48779, true },
-  { 48795, true },
-  { 48808, true },
-  { 48821, true },
-  { 48833, true },
-  { 48847, true },
-  { 48864, true },
-  { 48881, true },
-  { 48892, true },
-  { 48906, true },
-  { 48913, true },
-  { 48922, true },
-  { 48937, true },
-  { 48948, true },
-  { 48972, true },
-  { 48983, true },
-  { 48993, true },
-  { 49006, true },
-  { 49017, true },
-  { 49029, true },
-  { 49050, true },
-  { 49064, true },
-  { 49079, true },
-  { 49096, true },
-  { 49111, true },
-  { 49123, true },
-  { 49140, true },
-  { 49156, true },
-  { 49177, true },
-  { 49194, true },
-  { 49223, true },
+  { 48758, true },
+  { 48775, true },
+  { 48790, true },
+  { 48802, true },
+  { 48819, true },
+  { 48835, true },
+  { 48856, true },
+  { 48873, true },
+  { 48902, true },
+  { 48916, true },
+  { 48927, true },
+  { 48950, false },
+  { 48964, true },
+  { 48982, true },
+  { 48997, true },
+  { 49014, true },
+  { 49031, true },
+  { 49042, true },
+  { 49060, true },
+  { 49083, true },
+  { 49097, true },
+  { 49116, true },
+  { 49135, true },
+  { 49149, true },
+  { 49160, true },
+  { 49170, true },
+  { 49183, true },
+  { 49199, true },
+  { 49219, true },
   { 49237, true },
-  { 49248, true },
-  { 49271, false },
-  { 49285, true },
-  { 49303, true },
-  { 49318, true },
-  { 49335, true },
-  { 49352, true },
-  { 49363, true },
-  { 49381, true },
-  { 49404, true },
-  { 49418, true },
-  { 49437, true },
-  { 49456, true },
-  { 49470, true },
-  { 49481, true },
-  { 49491, true },
-  { 49504, true },
+  { 49266, true },
+  { 49282, true },
+  { 49298, true },
+  { 49308, true },
+  { 49324, true },
+  { 49333, true },
+  { 49348, true },
+  { 49360, true },
+  { 49374, true },
+  { 49389, true },
+  { 49402, true },
+  { 49418, false },
+  { 49428, true },
+  { 49445, true },
+  { 49458, true },
+  { 49476, true },
+  { 49498, true },
   { 49520, true },
+  { 49531, true },
   { 49540, true },
-  { 49558, true },
-  { 49587, true },
-  { 49603, true },
-  { 49619, true },
-  { 49629, true },
-  { 49645, true },
-  { 49654, true },
-  { 49669, true },
-  { 49681, true },
-  { 49695, true },
-  { 49710, true },
-  { 49723, true },
-  { 49739, false },
-  { 49749, true },
-  { 49766, true },
-  { 49779, true },
-  { 49797, true },
-  { 49819, true },
-  { 49830, true },
-  { 49839, true },
-  { 49860, true },
-  { 49872, false },
-  { 49885, true },
-  { 49897, true },
-  { 49910, true },
+  { 49561, true },
+  { 49573, false },
+  { 49586, true },
+  { 49598, true },
+  { 49611, true },
+  { 49626, true },
+  { 49638, true },
+  { 49655, true },
+  { 49670, true },
+  { 49701, true },
+  { 49733, true },
+  { 49761, true },
+  { 49791, true },
+  { 49803, true },
+  { 49817, true },
+  { 49833, true },
+  { 49843, true },
+  { 49853, true },
+  { 49868, true },
+  { 49890, true },
+  { 49904, true },
+  { 49914, true },
   { 49925, true },
-  { 49937, true },
-  { 49954, true },
-  { 49969, true },
-  { 50000, true },
-  { 50032, true },
-  { 50060, true },
-  { 50090, true },
-  { 50102, true },
-  { 50116, true },
-  { 50132, true },
-  { 50142, true },
-  { 50152, true },
-  { 50167, true },
-  { 50189, true },
-  { 50203, true },
-  { 50213, true },
-  { 50224, true },
-  { 50240, true },
+  { 49941, true },
+  { 49959, true },
+  { 49967, true },
+  { 49981, true },
+  { 49996, true },
+  { 50004, true },
+  { 50013, true },
+  { 50036, true },
+  { 50047, true },
+  { 50062, true },
+  { 50080, true },
+  { 50092, true },
+  { 50108, true },
+  { 50123, true },
+  { 50136, true },
+  { 50147, true },
+  { 50162, true },
+  { 50179, true },
+  { 50190, true },
+  { 50199, true },
+  { 50215, true },
+  { 50225, false },
+  { 50244, true },
   { 50258, true },
   { 50266, true },
-  { 50280, true },
-  { 50295, true },
-  { 50303, true },
-  { 50312, true },
-  { 50335, true },
-  { 50346, true },
-  { 50361, true },
-  { 50379, true },
-  { 50391, true },
-  { 50407, true },
+  { 50275, true },
+  { 50285, true },
+  { 50306, true },
+  { 50315, true },
+  { 50326, true },
+  { 50342, true },
+  { 50352, true },
+  { 50371, true },
+  { 50384, true },
+  { 50402, true },
   { 50422, true },
-  { 50435, true },
-  { 50446, true },
-  { 50461, true },
-  { 50478, true },
-  { 50489, true },
-  { 50498, true },
-  { 50514, true },
-  { 50524, false },
-  { 50543, true },
-  { 50557, true },
-  { 50565, true },
-  { 50574, true },
-  { 50584, true },
-  { 50605, true },
-  { 50614, true },
-  { 50625, true },
-  { 50641, true },
-  { 50651, true },
-  { 50670, true },
-  { 50683, true },
-  { 50701, true },
-  { 50721, true },
-  { 50741, true },
-  { 50749, true },
-  { 50762, true },
-  { 50773, true },
-  { 50791, true },
-  { 50801, true },
-  { 50810, true },
-  { 50819, true },
+  { 50442, true },
+  { 50450, true },
+  { 50463, true },
+  { 50474, true },
+  { 50492, true },
+  { 50502, true },
+  { 50511, true },
+  { 50520, true },
+  { 50531, true },
+  { 50541, true },
+  { 50553, true },
+  { 50563, true },
+  { 50578, true },
+  { 50585, true },
+  { 50598, true },
+  { 50622, false },
+  { 50637, true },
+  { 50657, true },
+  { 50676, true },
+  { 50693, true },
+  { 50704, true },
+  { 50719, true },
+  { 50729, true },
+  { 50746, true },
+  { 50760, true },
+  { 50777, true },
+  { 50798, true },
+  { 50807, true },
+  { 50820, true },
   { 50830, true },
-  { 50840, true },
-  { 50852, true },
-  { 50862, true },
-  { 50877, true },
+  { 50842, true },
+  { 50851, true },
+  { 50861, true },
+  { 50873, true },
   { 50884, true },
-  { 50897, true },
-  { 50921, false },
-  { 50936, true },
-  { 50956, true },
-  { 50975, true },
-  { 50992, true },
-  { 51003, true },
-  { 51018, true },
-  { 51028, true },
-  { 51044, true },
-  { 51061, true },
-  { 51075, true },
-  { 51092, true },
-  { 51113, true },
-  { 51122, true },
-  { 51135, true },
-  { 51145, true },
-  { 51157, true },
-  { 51166, true },
-  { 51176, true },
-  { 51188, true },
-  { 51199, true },
-  { 51207, true },
-  { 51214, true },
-  { 51239, true },
-  { 51257, true },
-  { 51275, true },
-  { 51289, true },
-  { 51298, true },
-  { 51311, true },
-  { 51328, true },
-  { 51341, true },
-  { 51356, true },
-  { 51374, false },
-  { 51387, true },
-  { 51403, true },
-  { 51419, true },
-  { 51432, true },
-  { 51445, true },
-  { 51458, true },
-  { 51468, false },
-  { 51486, true },
-  { 51499, true },
+  { 50892, true },
+  { 50899, true },
+  { 50924, true },
+  { 50942, true },
+  { 50960, true },
+  { 50974, true },
+  { 50983, true },
+  { 50996, true },
+  { 51013, true },
+  { 51026, true },
+  { 51041, true },
+  { 51059, false },
+  { 51072, true },
+  { 51088, true },
+  { 51104, true },
+  { 51117, true },
+  { 51130, true },
+  { 51143, true },
+  { 51153, false },
+  { 51171, true },
+  { 51184, true },
+  { 51197, true },
+  { 51213, true },
+  { 51232, true },
+  { 51247, true },
+  { 51254, true },
+  { 51283, true },
+  { 51305, true },
+  { 51326, true },
+  { 51353, true },
+  { 51373, true },
+  { 51381, true },
+  { 51392, true },
+  { 51412, true },
+  { 51431, true },
+  { 51446, true },
+  { 51465, true },
+  { 51481, true },
+  { 51497, false },
   { 51512, true },
-  { 51528, true },
-  { 51547, true },
-  { 51562, true },
-  { 51569, true },
-  { 51598, true },
-  { 51620, true },
-  { 51641, true },
-  { 51668, true },
-  { 51688, true },
-  { 51696, true },
-  { 51707, true },
-  { 51727, true },
-  { 51746, true },
-  { 51761, true },
-  { 51780, true },
-  { 51796, true },
-  { 51812, false },
-  { 51827, true },
-  { 51842, true },
+  { 51527, true },
+  { 51542, true },
+  { 51561, true },
+  { 51575, true },
+  { 51593, true },
+  { 51602, true },
+  { 51612, true },
+  { 51623, true },
+  { 51639, true },
+  { 51653, true },
+  { 51667, true },
+  { 51700, true },
+  { 51714, true },
+  { 51728, true },
+  { 51737, true },
+  { 51748, true },
+  { 51772, true },
+  { 51784, true },
+  { 51795, false },
+  { 51808, true },
+  { 51814, true },
+  { 51824, true },
+  { 51833, true },
+  { 51847, true },
   { 51857, true },
-  { 51876, true },
-  { 51890, true },
-  { 51908, true },
-  { 51917, true },
+  { 51873, true },
+  { 51886, true },
+  { 51899, true },
+  { 51911, true },
   { 51927, true },
   { 51938, true },
-  { 51954, true },
-  { 51968, true },
+  { 51950, true },
+  { 51965, true },
   { 51982, true },
-  { 52015, true },
-  { 52029, true },
-  { 52043, true },
-  { 52052, true },
-  { 52063, true },
-  { 52087, true },
-  { 52099, true },
-  { 52110, false },
-  { 52123, true },
-  { 52129, true },
-  { 52139, true },
-  { 52148, true },
-  { 52162, true },
-  { 52172, true },
-  { 52188, true },
-  { 52201, true },
-  { 52214, true },
-  { 52226, true },
-  { 52242, true },
-  { 52253, true },
-  { 52265, true },
-  { 52280, true },
-  { 52297, true },
-  { 52308, true },
-  { 52320, true },
-  { 52336, false },
-  { 52351, true },
-  { 52361, true },
-  { 52377, true },
-  { 52389, true },
-  { 52400, true },
-  { 52417, true },
-  { 52436, true },
-  { 52459, true },
-  { 52476, true },
-  { 52485, false },
+  { 51993, true },
+  { 52005, true },
+  { 52021, false },
+  { 52036, true },
+  { 52046, true },
+  { 52062, true },
+  { 52074, true },
+  { 52085, true },
+  { 52102, true },
+  { 52121, true },
+  { 52144, true },
+  { 52161, true },
+  { 52170, false },
+  { 52179, true },
+  { 52190, true },
+  { 52207, true },
+  { 52223, true },
+  { 52237, true },
+  { 52251, true },
+  { 52269, false },
+  { 52277, true },
+  { 52286, true },
+  { 52299, true },
+  { 52316, true },
+  { 52328, true },
+  { 52338, true },
+  { 52347, true },
+  { 52355, true },
+  { 52365, true },
+  { 52371, true },
+  { 52379, true },
+  { 52397, true },
+  { 52406, true },
+  { 52418, true },
+  { 52427, true },
+  { 52442, true },
+  { 52452, true },
+  { 52461, true },
+  { 52473, true },
   { 52494, true },
   { 52505, true },
-  { 52522, true },
-  { 52538, true },
-  { 52552, true },
-  { 52566, true },
-  { 52584, false },
-  { 52592, true },
-  { 52601, true },
-  { 52614, true },
-  { 52631, true },
-  { 52643, true },
-  { 52653, true },
-  { 52662, true },
-  { 52670, true },
-  { 52680, true },
-  { 52686, true },
-  { 52694, true },
-  { 52712, true },
-  { 52721, true },
-  { 52733, true },
-  { 52742, true },
-  { 52757, true },
-  { 52767, true },
-  { 52776, true },
-  { 52788, true },
-  { 52809, true },
-  { 52820, true },
-  { 52834, true },
+  { 52519, true },
+  { 52529, true },
+  { 52546, true },
+  { 52558, true },
+  { 52581, true },
+  { 52595, true },
+  { 52610, true },
+  { 52621, true },
+  { 52637, true },
+  { 52648, true },
+  { 52664, true },
+  { 52692, true },
+  { 52708, true },
+  { 52720, false },
+  { 52738, true },
+  { 52749, true },
+  { 52759, true },
+  { 52780, true },
+  { 52790, true },
+  { 52805, true },
+  { 52819, true },
+  { 52829, true },
   { 52844, true },
-  { 52861, true },
-  { 52873, true },
-  { 52896, true },
-  { 52910, true },
-  { 52925, true },
-  { 52936, true },
-  { 52952, true },
-  { 52963, true },
-  { 52979, true },
-  { 53007, true },
-  { 53023, true },
-  { 53035, false },
-  { 53053, true },
-  { 53064, true },
-  { 53074, true },
-  { 53095, true },
-  { 53105, true },
-  { 53120, true },
-  { 53134, true },
-  { 53144, true },
-  { 53159, true },
-  { 53170, true },
-  { 53182, true },
-  { 53200, true },
-  { 53213, true },
-  { 53226, true },
-  { 53235, true },
-  { 53244, true },
-  { 53256, true },
-  { 53272, true },
-  { 53283, true },
-  { 53299, true },
-  { 53318, true },
+  { 52855, true },
+  { 52867, true },
+  { 52880, true },
+  { 52893, true },
+  { 52902, true },
+  { 52911, true },
+  { 52923, true },
+  { 52939, true },
+  { 52950, true },
+  { 52966, true },
+  { 52985, true },
+  { 53001, true },
+  { 53016, true },
+  { 53047, true },
+  { 53071, true },
+  { 53090, true },
+  { 53110, true },
+  { 53127, true },
+  { 53143, true },
+  { 53158, true },
+  { 53177, true },
+  { 53199, true },
+  { 53216, true },
+  { 53231, true },
+  { 53250, true },
+  { 53263, true },
+  { 53278, true },
+  { 53293, true },
+  { 53306, true },
+  { 53322, true },
   { 53334, true },
-  { 53349, true },
-  { 53380, true },
-  { 53404, true },
-  { 53423, true },
-  { 53443, true },
-  { 53460, true },
-  { 53476, true },
-  { 53491, true },
-  { 53510, true },
-  { 53532, true },
-  { 53549, true },
-  { 53564, true },
-  { 53583, true },
-  { 53596, true },
-  { 53611, true },
-  { 53626, true },
+  { 53347, true },
+  { 53357, false },
+  { 53366, true },
+  { 53386, true },
+  { 53401, true },
+  { 53412, true },
+  { 53433, true },
+  { 53449, true },
+  { 53473, false },
+  { 53490, true },
+  { 53503, true },
+  { 53516, true },
+  { 53529, true },
+  { 53542, true },
+  { 53561, true },
+  { 53570, true },
+  { 53588, true },
+  { 53597, true },
+  { 53607, true },
+  { 53620, true },
+  { 53630, true },
   { 53639, true },
   { 53655, true },
-  { 53667, true },
-  { 53680, true },
-  { 53690, false },
-  { 53699, true },
-  { 53719, true },
-  { 53734, true },
-  { 53745, true },
-  { 53766, true },
-  { 53782, true },
-  { 53806, false },
-  { 53823, true },
-  { 53836, true },
-  { 53849, true },
-  { 53862, true },
+  { 53682, true },
+  { 53693, true },
+  { 53710, true },
+  { 53723, true },
+  { 53737, true },
+  { 53754, true },
+  { 53769, true },
+  { 53792, true },
+  { 53802, true },
+  { 53817, true },
+  { 53842, true },
+  { 53866, true },
   { 53875, true },
-  { 53884, true },
-  { 53902, true },
-  { 53911, true },
-  { 53921, true },
-  { 53934, true },
-  { 53944, true },
-  { 53953, true },
-  { 53969, true },
-  { 53996, true },
-  { 54007, true },
-  { 54024, true },
-  { 54037, true },
-  { 54051, true },
-  { 54068, true },
-  { 54083, true },
-  { 54106, true },
-  { 54116, true },
-  { 54131, true },
-  { 54156, true },
-  { 54180, true },
-  { 54189, true },
-  { 54210, true },
-  { 54230, true },
-  { 54242, true },
-  { 54255, true },
-  { 54269, true },
-  { 54286, true },
-  { 54303, false },
-  { 54315, false },
-  { 54328, true },
-  { 54342, true },
-  { 54359, true },
-  { 54368, true },
-  { 54379, true },
-  { 54393, true },
-  { 54404, true },
-  { 54418, true },
-  { 54435, true },
-  { 54444, true },
-  { 54458, false },
-  { 54486, true },
-  { 54495, true },
-  { 54504, true },
-  { 54514, true },
-  { 54530, true },
-  { 54540, true },
-  { 54554, true },
-  { 54576, false },
-  { 54590, false },
-  { 54605, true },
-  { 54629, true },
-  { 54650, true },
-  { 54672, true },
-  { 54682, true },
-  { 54694, true },
-  { 54708, true },
-  { 54727, true },
-  { 54743, true },
-  { 54756, true },
-  { 54768, true },
-  { 54781, true },
-  { 54793, true },
-  { 54805, true },
-  { 54818, true },
-  { 54828, true },
-  { 54847, true },
-  { 54871, true },
-  { 54887, true },
-  { 54897, true },
-  { 54913, true },
-  { 54932, true },
-  { 54946, true },
-  { 54964, true },
-  { 54981, true },
-  { 54998, true },
-  { 55006, false },
-  { 55032, true },
-  { 55044, true },
+  { 53896, true },
+  { 53916, true },
+  { 53928, true },
+  { 53941, true },
+  { 53955, true },
+  { 53972, true },
+  { 53989, false },
+  { 54001, false },
+  { 54014, true },
+  { 54028, true },
+  { 54045, true },
+  { 54054, true },
+  { 54065, true },
+  { 54079, true },
+  { 54090, true },
+  { 54104, true },
+  { 54121, true },
+  { 54130, true },
+  { 54144, false },
+  { 54172, true },
+  { 54181, true },
+  { 54190, true },
+  { 54200, true },
+  { 54216, true },
+  { 54226, true },
+  { 54240, true },
+  { 54262, false },
+  { 54276, false },
+  { 54291, true },
+  { 54315, true },
+  { 54336, true },
+  { 54358, true },
+  { 54372, true },
+  { 54382, true },
+  { 54394, true },
+  { 54408, true },
+  { 54427, true },
+  { 54443, true },
+  { 54456, true },
+  { 54468, true },
+  { 54481, true },
+  { 54493, true },
+  { 54505, true },
+  { 54518, true },
+  { 54528, true },
+  { 54547, true },
+  { 54571, true },
+  { 54587, true },
+  { 54597, true },
+  { 54613, true },
+  { 54632, true },
+  { 54646, true },
+  { 54664, true },
+  { 54681, true },
+  { 54698, true },
+  { 54706, false },
+  { 54732, true },
+  { 54744, true },
+  { 54764, true },
+  { 54780, true },
+  { 54798, true },
+  { 54808, true },
+  { 54823, true },
+  { 54835, true },
+  { 54850, true },
+  { 54868, true },
+  { 54886, true },
+  { 54905, true },
+  { 54919, true },
+  { 54929, true },
+  { 54940, true },
+  { 54956, true },
+  { 54975, true },
+  { 54985, true },
+  { 55004, true },
+  { 55016, true },
+  { 55027, true },
+  { 55040, true },
   { 55064, true },
-  { 55080, true },
-  { 55098, true },
+  { 55088, true },
   { 55108, true },
-  { 55123, true },
-  { 55135, true },
-  { 55150, true },
+  { 55121, false },
+  { 55133, true },
+  { 55148, true },
   { 55168, true },
-  { 55186, true },
+  { 55178, true },
+  { 55188, false },
   { 55205, true },
-  { 55219, true },
+  { 55213, true },
   { 55229, true },
-  { 55240, true },
-  { 55256, true },
-  { 55275, true },
-  { 55285, true },
+  { 55244, true },
+  { 55260, true },
+  { 55276, true },
+  { 55290, true },
   { 55304, true },
   { 55316, true },
-  { 55327, true },
-  { 55340, true },
-  { 55364, true },
-  { 55388, true },
-  { 55408, true },
-  { 55421, false },
-  { 55433, true },
-  { 55448, true },
-  { 55468, true },
-  { 55478, true },
-  { 55488, false },
-  { 55505, true },
-  { 55513, true },
-  { 55529, true },
-  { 55544, true },
-  { 55560, true },
-  { 55576, true },
+  { 55336, true },
+  { 55352, true },
+  { 55369, false },
+  { 55379, true },
+  { 55392, true },
+  { 55406, true },
+  { 55419, true },
+  { 55429, true },
+  { 55443, true },
+  { 55455, true },
+  { 55471, true },
+  { 55495, true },
+  { 55520, true },
+  { 55533, true },
+  { 55546, true },
+  { 55558, true },
+  { 55577, true },
   { 55590, true },
-  { 55604, true },
-  { 55616, true },
-  { 55636, true },
-  { 55652, true },
-  { 55669, true },
-  { 55679, true },
-  { 55692, true },
-  { 55706, true },
-  { 55719, true },
-  { 55729, true },
-  { 55743, true },
-  { 55755, true },
-  { 55771, true },
-  { 55795, true },
-  { 55820, true },
-  { 55833, true },
-  { 55846, true },
-  { 55858, true },
-  { 55877, true },
-  { 55890, true },
-  { 55903, true },
-  { 55916, true },
-  { 55936, true },
-  { 55951, true },
-  { 55969, true },
-  { 55978, true },
-  { 55989, true },
-  { 56000, true },
-  { 56011, true },
+  { 55603, true },
+  { 55623, true },
+  { 55638, true },
+  { 55656, true },
+  { 55665, true },
+  { 55676, true },
+  { 55687, true },
+  { 55698, true },
+  { 55710, true },
+  { 55721, true },
+  { 55731, true },
+  { 55745, true },
+  { 55757, true },
+  { 55767, true },
+  { 55781, true },
+  { 55815, true },
+  { 55845, true },
+  { 55855, true },
+  { 55867, true },
+  { 55876, true },
+  { 55887, false },
+  { 55900, true },
+  { 55907, true },
+  { 55919, true },
+  { 55935, true },
+  { 55952, true },
+  { 55965, false },
+  { 55985, true },
+  { 55998, true },
+  { 56010, true },
   { 56023, true },
-  { 56034, true },
-  { 56044, true },
-  { 56058, true },
-  { 56070, true },
-  { 56080, true },
-  { 56094, true },
-  { 56128, true },
-  { 56158, true },
-  { 56168, true },
-  { 56180, true },
-  { 56189, true },
-  { 56200, false },
-  { 56213, true },
-  { 56220, true },
-  { 56232, true },
+  { 56042, true },
+  { 56053, false },
+  { 56074, true },
+  { 56084, true },
+  { 56093, true },
+  { 56108, true },
+  { 56121, true },
+  { 56132, true },
+  { 56141, true },
+  { 56154, true },
+  { 56163, true },
+  { 56176, true },
+  { 56185, true },
+  { 56197, true },
+  { 56206, true },
+  { 56215, true },
+  { 56234, true },
   { 56248, true },
-  { 56265, true },
-  { 56278, false },
-  { 56298, true },
-  { 56311, true },
-  { 56323, true },
-  { 56336, true },
-  { 56355, false },
-  { 56376, true },
-  { 56386, true },
-  { 56395, true },
-  { 56410, true },
-  { 56423, true },
-  { 56434, true },
-  { 56443, true },
-  { 56456, true },
-  { 56465, true },
-  { 56478, true },
-  { 56487, true },
-  { 56499, true },
-  { 56508, true },
-  { 56517, true },
-  { 56536, true },
-  { 56550, true },
+  { 56266, true },
+  { 56288, false },
+  { 56313, true },
+  { 56326, true },
+  { 56335, true },
+  { 56356, true },
+  { 56366, true },
+  { 56378, true },
+  { 56403, true },
+  { 56419, true },
+  { 56432, true },
+  { 56447, true },
+  { 56461, true },
+  { 56470, true },
+  { 56488, true },
+  { 56498, true },
+  { 56516, true },
+  { 56527, true },
+  { 56553, false },
   { 56568, true },
-  { 56590, false },
-  { 56615, true },
-  { 56628, true },
-  { 56637, true },
-  { 56658, true },
-  { 56668, true },
-  { 56680, true },
-  { 56705, true },
-  { 56721, true },
-  { 56734, true },
-  { 56749, true },
-  { 56763, true },
-  { 56772, true },
-  { 56790, true },
-  { 56800, true },
-  { 56818, true },
-  { 56829, true },
-  { 56855, false },
-  { 56870, true },
-  { 56885, true },
-  { 56894, true },
-  { 56903, true },
-  { 56917, false },
-  { 56928, true },
+  { 56583, true },
+  { 56592, true },
+  { 56601, true },
+  { 56615, false },
+  { 56626, true },
+  { 56634, true },
+  { 56643, true },
+  { 56651, true },
+  { 56660, true },
+  { 56672, true },
+  { 56686, true },
+  { 56700, true },
+  { 56720, true },
+  { 56732, true },
+  { 56750, true },
+  { 56766, true },
+  { 56780, true },
+  { 56797, true },
+  { 56810, true },
+  { 56820, true },
+  { 56834, true },
+  { 56846, true },
+  { 56860, true },
+  { 56873, true },
+  { 56886, true },
+  { 56899, true },
+  { 56910, true },
+  { 56920, true },
+  { 56927, true },
   { 56936, true },
-  { 56945, true },
-  { 56953, true },
-  { 56962, true },
-  { 56974, true },
-  { 56988, true },
-  { 57002, true },
-  { 57022, true },
-  { 57034, true },
-  { 57052, true },
-  { 57068, true },
-  { 57082, true },
-  { 57099, true },
-  { 57112, true },
+  { 56955, true },
+  { 56969, true },
+  { 56983, true },
+  { 56994, true },
+  { 57007, true },
+  { 57023, true },
+  { 57046, true },
+  { 57061, true },
+  { 57075, true },
+  { 57095, true },
+  { 57107, true },
   { 57122, true },
-  { 57136, true },
-  { 57148, true },
-  { 57162, true },
-  { 57175, true },
-  { 57188, true },
-  { 57201, true },
-  { 57212, true },
-  { 57222, true },
-  { 57229, true },
-  { 57238, true },
-  { 57257, true },
-  { 57271, true },
-  { 57285, true },
-  { 57296, true },
-  { 57309, true },
-  { 57325, true },
-  { 57348, true },
-  { 57363, true },
-  { 57377, true },
-  { 57397, true },
-  { 57409, true },
-  { 57424, true },
-  { 57443, true },
-  { 57457, true },
-  { 57475, true },
-  { 57493, true },
-  { 57500, true },
-  { 57512, true },
-  { 57529, true },
-  { 57548, true },
-  { 57558, true },
-  { 57571, true },
-  { 57581, true },
-  { 57595, true },
-  { 57612, true },
-  { 57625, true },
-  { 57635, true },
-  { 57647, true },
-  { 57659, true },
-  { 57672, false },
-  { 57687, true },
-  { 57700, true },
-  { 57714, true },
-  { 57731, true },
-  { 57743, true },
-  { 57762, true },
-  { 57769, true },
-  { 57781, true },
-  { 57793, true },
-  { 57804, true },
-  { 57818, true },
-  { 57843, true },
-  { 57866, false },
-  { 57876, true },
-  { 57887, true },
-  { 57900, true },
-  { 57911, true },
-  { 57920, true },
-  { 57930, true },
-  { 57943, true },
-  { 57954, true },
-  { 57974, true },
-  { 57994, true },
-  { 58012, true },
-  { 58024, true },
-  { 58043, true },
-  { 58066, true },
-  { 58084, true },
-  { 58101, true },
-  { 58115, true },
-  { 58138, true },
-  { 58148, true },
-  { 58163, true },
-  { 58179, true },
-  { 58192, true },
-  { 58200, true },
+  { 57141, true },
+  { 57155, true },
+  { 57173, true },
+  { 57191, true },
+  { 57198, true },
+  { 57210, true },
+  { 57227, true },
+  { 57246, true },
+  { 57256, true },
+  { 57269, true },
+  { 57279, true },
+  { 57293, true },
+  { 57310, true },
+  { 57323, true },
+  { 57333, true },
+  { 57345, true },
+  { 57357, true },
+  { 57370, false },
+  { 57385, true },
+  { 57398, true },
+  { 57412, true },
+  { 57429, true },
+  { 57441, true },
+  { 57460, true },
+  { 57467, true },
+  { 57479, true },
+  { 57491, true },
+  { 57502, true },
+  { 57516, true },
+  { 57541, true },
+  { 57564, false },
+  { 57574, true },
+  { 57585, true },
+  { 57598, true },
+  { 57609, true },
+  { 57618, true },
+  { 57628, true },
+  { 57641, true },
+  { 57652, true },
+  { 57672, true },
+  { 57692, true },
+  { 57710, true },
+  { 57722, true },
+  { 57741, true },
+  { 57764, true },
+  { 57782, true },
+  { 57799, true },
+  { 57813, true },
+  { 57836, true },
+  { 57846, true },
+  { 57861, true },
+  { 57877, true },
+  { 57890, true },
+  { 57898, true },
+  { 57910, true },
+  { 57924, true },
+  { 57946, true },
+  { 57953, true },
+  { 57966, true },
+  { 57986, true },
+  { 58004, true },
+  { 58026, true },
+  { 58039, true },
+  { 58050, true },
+  { 58064, true },
+  { 58077, true },
+  { 58096, true },
+  { 58112, true },
+  { 58131, true },
+  { 58150, true },
+  { 58165, true },
+  { 58177, true },
+  { 58193, true },
   { 58212, true },
-  { 58226, true },
-  { 58248, true },
-  { 58255, true },
-  { 58268, true },
-  { 58288, true },
-  { 58306, true },
-  { 58328, true },
-  { 58341, true },
-  { 58352, true },
-  { 58366, true },
-  { 58379, true },
+  { 58229, true },
+  { 58250, true },
+  { 58269, true },
+  { 58287, true },
+  { 58305, true },
+  { 58317, true },
+  { 58326, true },
+  { 58349, true },
+  { 58363, true },
+  { 58376, true },
+  { 58388, true },
   { 58398, true },
-  { 58414, true },
-  { 58433, true },
+  { 58409, false },
+  { 58419, true },
+  { 58439, true },
   { 58452, true },
   { 58467, true },
   { 58479, true },
-  { 58495, true },
-  { 58514, true },
-  { 58531, true },
-  { 58552, true },
-  { 58571, true },
-  { 58589, true },
-  { 58607, true },
-  { 58616, true },
-  { 58639, true },
-  { 58653, true },
-  { 58666, true },
-  { 58678, true },
-  { 58688, true },
-  { 58699, false },
-  { 58709, true },
-  { 58729, true },
-  { 58742, true },
-  { 58757, true },
-  { 58766, true },
-  { 58778, true },
-  { 58788, true },
-  { 58795, true },
-  { 58812, true },
-  { 58825, true },
-  { 58834, true },
-  { 58847, true },
-  { 58860, true },
-  { 58878, true },
-  { 58898, true },
-  { 58914, true },
-  { 58930, true },
-  { 58944, true },
-  { 58961, true },
-  { 58971, true },
-  { 58998, true },
-  { 59033, true },
-  { 59059, false },
-  { 59072, true },
-  { 59085, true },
-  { 59104, true },
-  { 59129, true },
-  { 59144, true },
-  { 59164, false },
-  { 59174, true },
-  { 59191, true },
-  { 59208, true },
-  { 59218, true },
-  { 59228, true },
-  { 59241, true },
-  { 59256, true },
-  { 59269, true },
-  { 59284, true },
-  { 59300, true },
-  { 59313, true },
-  { 59326, true },
-  { 59340, true },
-  { 59355, true },
-  { 59367, true },
-  { 59380, true },
-  { 59399, true },
-  { 59423, true },
-  { 59445, true },
+  { 58489, true },
+  { 58496, true },
+  { 58513, true },
+  { 58526, true },
+  { 58535, true },
+  { 58548, true },
+  { 58561, true },
+  { 58579, true },
+  { 58599, true },
+  { 58615, true },
+  { 58631, true },
+  { 58645, true },
+  { 58662, true },
+  { 58672, true },
+  { 58699, true },
+  { 58734, true },
+  { 58760, false },
+  { 58773, true },
+  { 58786, true },
+  { 58805, true },
+  { 58830, true },
+  { 58845, true },
+  { 58865, false },
+  { 58875, true },
+  { 58892, true },
+  { 58909, true },
+  { 58919, true },
+  { 58929, true },
+  { 58942, true },
+  { 58957, true },
+  { 58970, true },
+  { 58985, true },
+  { 59001, true },
+  { 59014, true },
+  { 59027, true },
+  { 59041, true },
+  { 59056, true },
+  { 59068, true },
+  { 59081, true },
+  { 59100, true },
+  { 59124, true },
+  { 59146, true },
+  { 59167, true },
+  { 59192, true },
+  { 59215, true },
+  { 59235, true },
+  { 59246, true },
+  { 59258, true },
+  { 59278, true },
+  { 59295, true },
+  { 59316, true },
+  { 59334, true },
+  { 59357, true },
+  { 59373, true },
+  { 59393, true },
+  { 59406, true },
+  { 59416, true },
+  { 59427, true },
+  { 59446, true },
+  { 59456, true },
   { 59466, true },
-  { 59491, true },
-  { 59514, true },
-  { 59534, true },
-  { 59545, true },
-  { 59557, true },
-  { 59577, true },
-  { 59594, true },
-  { 59615, true },
+  { 59474, true },
+  { 59487, true },
+  { 59500, true },
+  { 59509, true },
+  { 59516, true },
+  { 59523, false },
+  { 59539, true },
+  { 59548, true },
+  { 59565, true },
+  { 59579, true },
+  { 59598, true },
+  { 59610, true },
   { 59633, true },
-  { 59656, true },
-  { 59672, true },
-  { 59692, true },
-  { 59705, true },
-  { 59715, true },
+  { 59647, true },
+  { 59663, true },
+  { 59675, true },
+  { 59691, true },
+  { 59708, true },
   { 59726, true },
-  { 59745, true },
-  { 59755, true },
-  { 59765, true },
-  { 59773, true },
-  { 59786, true },
-  { 59799, true },
-  { 59808, true },
+  { 59747, true },
+  { 59764, true },
+  { 59781, true },
+  { 59798, true },
   { 59815, true },
-  { 59822, false },
-  { 59838, true },
-  { 59847, true },
-  { 59864, true },
-  { 59878, true },
-  { 59897, true },
-  { 59909, true },
-  { 59932, true },
-  { 59946, true },
-  { 59962, true },
-  { 59974, true },
-  { 59990, true },
-  { 60007, true },
-  { 60025, true },
-  { 60046, true },
-  { 60063, true },
-  { 60080, true },
+  { 59832, true },
+  { 59849, true },
+  { 59865, true },
+  { 59879, true },
+  { 59904, true },
+  { 59915, true },
+  { 59931, true },
+  { 59947, true },
+  { 59963, false },
+  { 59976, true },
+  { 59986, false },
+  { 60002, true },
+  { 60016, true },
+  { 60029, true },
+  { 60040, true },
+  { 60054, true },
+  { 60068, true },
+  { 60078, false },
+  { 60088, true },
   { 60097, true },
-  { 60114, true },
-  { 60131, true },
-  { 60148, true },
-  { 60164, true },
-  { 60178, true },
-  { 60203, true },
-  { 60214, true },
-  { 60230, true },
-  { 60246, true },
-  { 60262, false },
-  { 60275, true },
-  { 60285, false },
-  { 60301, true },
-  { 60315, true },
-  { 60328, true },
-  { 60339, true },
-  { 60353, true },
-  { 60367, true },
-  { 60377, false },
+  { 60116, true },
+  { 60125, false },
+  { 60145, true },
+  { 60168, true },
+  { 60185, true },
+  { 60204, true },
+  { 60221, true },
+  { 60233, true },
+  { 60244, false },
+  { 60256, true },
+  { 60267, true },
+  { 60282, true },
+  { 60300, true },
+  { 60310, true },
+  { 60318, true },
+  { 60332, true },
+  { 60345, false },
+  { 60358, true },
+  { 60373, true },
   { 60387, true },
-  { 60396, true },
-  { 60415, true },
-  { 60424, false },
-  { 60444, true },
-  { 60467, true },
-  { 60484, true },
-  { 60503, true },
-  { 60520, true },
-  { 60532, true },
-  { 60543, false },
-  { 60555, true },
-  { 60566, true },
-  { 60581, true },
-  { 60599, true },
-  { 60609, true },
-  { 60617, true },
-  { 60631, true },
-  { 60644, false },
-  { 60657, true },
-  { 60672, true },
-  { 60686, true },
-  { 60698, true },
-  { 60712, true },
-  { 60726, true },
-  { 60736, true },
-  { 60752, true },
-  { 60768, true },
-  { 60787, true },
-  { 60806, false },
-  { 60835, true },
-  { 60849, true },
-  { 60863, true },
-  { 60884, true },
-  { 60902, true },
-  { 60917, true },
-  { 60933, true },
-  { 60946, true },
-  { 60964, true },
-  { 60984, true },
+  { 60399, true },
+  { 60413, true },
+  { 60427, true },
+  { 60437, true },
+  { 60453, true },
+  { 60469, true },
+  { 60488, true },
+  { 60507, false },
+  { 60536, true },
+  { 60550, true },
+  { 60564, true },
+  { 60585, true },
+  { 60603, true },
+  { 60618, true },
+  { 60634, true },
+  { 60647, true },
+  { 60665, true },
+  { 60685, true },
+  { 60697, true },
+  { 60709, true },
+  { 60724, true },
+  { 60747, true },
+  { 60771, true },
+  { 60795, true },
+  { 60805, true },
+  { 60827, true },
+  { 60859, true },
+  { 60870, true },
+  { 60880, true },
+  { 60895, true },
+  { 60909, false },
+  { 60929, true },
+  { 60947, true },
+  { 60956, true },
+  { 60963, true },
+  { 60974, true },
+  { 60983, true },
   { 60996, true },
-  { 61008, true },
-  { 61023, true },
-  { 61046, true },
-  { 61070, true },
-  { 61094, true },
-  { 61104, true },
+  { 61019, true },
+  { 61034, false },
+  { 61045, false },
+  { 61057, false },
+  { 61068, true },
+  { 61084, true },
+  { 61110, false },
   { 61126, true },
-  { 61158, true },
-  { 61169, true },
-  { 61179, true },
-  { 61194, true },
-  { 61208, false },
-  { 61228, true },
-  { 61246, true },
-  { 61255, true },
-  { 61262, true },
-  { 61273, true },
-  { 61282, true },
+  { 61136, true },
+  { 61144, true },
+  { 61153, true },
+  { 61165, true },
+  { 61177, false },
+  { 61189, true },
+  { 61202, true },
+  { 61219, true },
+  { 61239, true },
+  { 61250, true },
+  { 61266, true },
+  { 61278, true },
   { 61295, true },
-  { 61318, true },
-  { 61333, false },
-  { 61344, false },
-  { 61356, false },
-  { 61367, true },
-  { 61383, true },
-  { 61409, false },
-  { 61425, true },
-  { 61435, true },
-  { 61443, true },
-  { 61452, true },
-  { 61464, true },
-  { 61476, false },
-  { 61488, true },
-  { 61501, true },
-  { 61518, true },
-  { 61538, true },
-  { 61549, true },
-  { 61565, true },
-  { 61577, true },
-  { 61594, true },
-  { 61603, true },
-  { 61616, true },
-  { 61629, true },
-  { 61647, true },
-  { 61660, true },
-  { 61684, true },
-  { 61698, true },
-  { 61715, true },
-  { 61730, true },
-  { 61740, true },
-  { 61752, true },
-  { 61764, false },
-  { 61779, true },
-  { 61794, true },
-  { 61811, true },
-  { 61819, true },
-  { 61838, true },
-  { 61855, true },
-  { 61872, true },
-  { 61887, true },
-  { 61899, true },
-  { 61924, false },
-  { 61937, false },
-  { 61949, true },
-  { 61969, true },
-  { 61982, true },
-  { 61994, true },
-  { 62018, true },
-  { 62031, true },
-  { 62050, true },
-  { 62062, true },
-  { 62074, true },
+  { 61304, true },
+  { 61317, true },
+  { 61330, true },
+  { 61348, true },
+  { 61361, true },
+  { 61385, true },
+  { 61399, true },
+  { 61416, true },
+  { 61431, true },
+  { 61441, true },
+  { 61453, true },
+  { 61465, false },
+  { 61480, true },
+  { 61495, true },
+  { 61512, true },
+  { 61520, true },
+  { 61539, true },
+  { 61556, true },
+  { 61573, true },
+  { 61588, true },
+  { 61600, true },
+  { 61625, false },
+  { 61638, false },
+  { 61650, true },
+  { 61670, true },
+  { 61683, true },
+  { 61695, true },
+  { 61719, true },
+  { 61732, true },
+  { 61751, true },
+  { 61763, true },
+  { 61775, true },
+  { 61796, true },
+  { 61810, true },
+  { 61835, true },
+  { 61849, true },
+  { 61862, false },
+  { 61878, true },
+  { 61890, true },
+  { 61903, true },
+  { 61913, true },
+  { 61924, true },
+  { 61935, true },
+  { 61947, true },
+  { 61956, true },
+  { 61966, true },
+  { 61980, true },
+  { 61992, true },
+  { 62008, true },
+  { 62030, true },
+  { 62040, false },
+  { 62054, true },
+  { 62067, true },
   { 62088, true },
-  { 62113, true },
-  { 62127, true },
-  { 62140, false },
-  { 62156, true },
-  { 62168, true },
-  { 62181, true },
-  { 62191, true },
-  { 62202, true },
-  { 62213, true },
-  { 62225, true },
-  { 62234, true },
-  { 62244, true },
-  { 62258, true },
-  { 62270, true },
-  { 62286, true },
-  { 62308, true },
-  { 62318, false },
-  { 62332, true },
-  { 62345, true },
-  { 62366, true },
-  { 62379, true },
-  { 62392, true },
-  { 62400, false },
-  { 62417, true },
-  { 62431, true },
-  { 62447, true },
-  { 62466, true },
-  { 62476, true },
-  { 62488, true },
-  { 62502, true },
-  { 62510, true },
-  { 62529, true },
-  { 62538, true },
-  { 62551, true },
-  { 62566, true },
-  { 62586, false },
-  { 62599, true },
-  { 62616, true },
-  { 62629, true },
+  { 62101, true },
+  { 62114, true },
+  { 62122, false },
+  { 62139, true },
+  { 62153, true },
+  { 62169, true },
+  { 62188, true },
+  { 62207, true },
+  { 62217, true },
+  { 62229, true },
+  { 62243, true },
+  { 62251, true },
+  { 62270, false },
+  { 62288, true },
+  { 62297, true },
+  { 62310, true },
+  { 62325, true },
+  { 62345, false },
+  { 62358, true },
+  { 62375, true },
+  { 62388, true },
+  { 62401, true },
+  { 62425, true },
+  { 62452, true },
+  { 62465, false },
+  { 62479, true },
+  { 62491, true },
+  { 62504, false },
+  { 62516, true },
+  { 62528, true },
+  { 62543, true },
+  { 62561, true },
+  { 62574, true },
+  { 62597, false },
+  { 62608, true },
+  { 62624, true },
   { 62642, true },
-  { 62666, true },
-  { 62693, true },
-  { 62706, false },
-  { 62720, true },
-  { 62732, true },
-  { 62745, false },
-  { 62757, true },
-  { 62769, true },
-  { 62784, true },
-  { 62802, true },
-  { 62815, true },
-  { 62838, false },
-  { 62849, true },
-  { 62865, true },
-  { 62883, true },
+  { 62662, true },
+  { 62684, true },
+  { 62700, true },
+  { 62717, true },
+  { 62734, true },
+  { 62752, true },
+  { 62765, true },
+  { 62782, true },
+  { 62797, true },
+  { 62811, true },
+  { 62827, true },
+  { 62846, true },
+  { 62856, true },
+  { 62864, true },
+  { 62873, true },
+  { 62888, true },
   { 62903, true },
-  { 62925, true },
-  { 62941, true },
-  { 62958, true },
-  { 62975, true },
-  { 62993, true },
+  { 62920, false },
+  { 62931, true },
+  { 62947, true },
+  { 62961, true },
+  { 62973, true },
+  { 62981, true },
+  { 62990, true },
   { 63006, true },
-  { 63023, true },
-  { 63038, true },
-  { 63052, true },
-  { 63068, true },
-  { 63087, true },
-  { 63097, true },
-  { 63105, true },
-  { 63114, true },
-  { 63129, true },
-  { 63144, true },
-  { 63161, false },
-  { 63172, true },
-  { 63188, true },
-  { 63202, true },
-  { 63214, true },
-  { 63222, true },
-  { 63231, true },
-  { 63247, true },
+  { 63016, true },
+  { 63022, true },
+  { 63034, true },
+  { 63056, true },
+  { 63070, true },
+  { 63085, true },
+  { 63096, true },
+  { 63109, true },
+  { 63125, true },
+  { 63143, false },
+  { 63156, true },
+  { 63165, true },
+  { 63176, true },
+  { 63195, true },
+  { 63203, true },
+  { 63220, true },
+  { 63229, true },
+  { 63238, true },
   { 63257, true },
-  { 63263, true },
-  { 63275, true },
-  { 63297, true },
-  { 63311, true },
-  { 63326, true },
-  { 63337, true },
-  { 63350, true },
-  { 63366, true },
-  { 63384, false },
-  { 63397, true },
-  { 63406, true },
-  { 63417, true },
+  { 63268, true },
+  { 63284, true },
+  { 63305, true },
+  { 63322, true },
+  { 63335, true },
+  { 63346, true },
+  { 63363, true },
+  { 63388, true },
+  { 63407, false },
+  { 63421, true },
   { 63436, true },
-  { 63444, true },
-  { 63461, true },
-  { 63470, true },
-  { 63479, true },
-  { 63498, true },
-  { 63509, true },
-  { 63525, true },
-  { 63546, true },
-  { 63563, true },
-  { 63576, true },
-  { 63587, true },
-  { 63604, true },
-  { 63629, true },
-  { 63648, false },
-  { 63662, true },
-  { 63677, true },
-  { 63689, true },
-  { 63700, true },
-  { 63714, true },
-  { 63728, true },
-  { 63745, true },
-  { 63765, true },
-  { 63774, true },
-  { 63788, true },
-  { 63799, true },
-  { 63819, false },
+  { 63448, true },
+  { 63459, true },
+  { 63473, true },
+  { 63487, true },
+  { 63504, true },
+  { 63524, true },
+  { 63533, true },
+  { 63547, true },
+  { 63558, true },
+  { 63578, false },
+  { 63602, true },
+  { 63620, false },
+  { 63628, true },
+  { 63646, true },
+  { 63664, true },
+  { 63686, true },
+  { 63708, true },
+  { 63724, true },
+  { 63736, true },
+  { 63748, true },
+  { 63762, true },
+  { 63775, false },
+  { 63792, true },
+  { 63801, true },
+  { 63823, true },
   { 63843, true },
-  { 63861, false },
-  { 63869, true },
-  { 63887, true },
-  { 63905, true },
-  { 63927, true },
-  { 63949, true },
-  { 63965, true },
-  { 63977, true },
-  { 63989, true },
-  { 64003, true },
-  { 64016, false },
+  { 63870, true },
+  { 63889, true },
+  { 63909, true },
+  { 63918, true },
+  { 63935, true },
+  { 63950, true },
+  { 63979, true },
+  { 64001, true },
+  { 64019, true },
   { 64033, true },
-  { 64042, true },
-  { 64064, true },
-  { 64084, true },
-  { 64111, true },
-  { 64130, true },
-  { 64150, true },
-  { 64159, true },
-  { 64176, true },
-  { 64191, true },
-  { 64220, true },
-  { 64242, true },
-  { 64260, true },
-  { 64274, true },
-  { 64289, true },
-  { 64302, true },
-  { 64312, true },
-  { 64330, true },
-  { 64349, true },
+  { 64048, true },
+  { 64061, true },
+  { 64071, true },
+  { 64089, true },
+  { 64108, true },
+  { 64126, true },
+  { 64144, true },
+  { 64152, true },
+  { 64159, false },
+  { 64179, true },
+  { 64188, true },
+  { 64203, true },
+  { 64221, true },
+  { 64230, false },
+  { 64240, true },
+  { 64248, true },
+  { 64265, true },
+  { 64276, true },
+  { 64286, true },
+  { 64303, true },
+  { 64325, true },
+  { 64340, true },
+  { 64357, true },
   { 64367, true },
-  { 64385, true },
-  { 64393, true },
-  { 64400, false },
-  { 64420, true },
-  { 64429, true },
-  { 64444, true },
-  { 64462, true },
-  { 64474, true },
-  { 64483, false },
-  { 64493, true },
+  { 64380, true },
+  { 64395, true },
+  { 64411, true },
+  { 64423, true },
+  { 64445, true },
+  { 64458, true },
+  { 64469, true },
+  { 64485, true },
   { 64501, true },
-  { 64518, true },
-  { 64529, true },
-  { 64539, true },
-  { 64556, true },
-  { 64578, true },
-  { 64593, true },
-  { 64610, true },
-  { 64620, true },
-  { 64633, true },
-  { 64648, true },
-  { 64664, true },
-  { 64675, true },
-  { 64687, true },
-  { 64709, true },
-  { 64722, true },
-  { 64733, true },
+  { 64511, true },
+  { 64523, true },
+  { 64531, true },
+  { 64550, true },
+  { 64569, true },
+  { 64582, true },
+  { 64596, true },
+  { 64613, true },
+  { 64625, true },
+  { 64639, true },
+  { 64651, true },
+  { 64665, true },
+  { 64679, true },
+  { 64701, true },
+  { 64717, true },
+  { 64736, true },
   { 64749, true },
-  { 64765, true },
-  { 64775, true },
-  { 64787, true },
-  { 64795, true },
-  { 64814, true },
-  { 64833, true },
-  { 64846, true },
-  { 64860, true },
-  { 64877, true },
-  { 64889, true },
-  { 64903, true },
-  { 64915, true },
-  { 64929, true },
-  { 64943, true },
-  { 64965, true },
-  { 64981, true },
-  { 65000, true },
-  { 65013, true },
-  { 65031, true },
-  { 65046, true },
-  { 65061, true },
-  { 65080, true },
-  { 65093, true },
-  { 65118, true },
-  { 65131, true },
-  { 65142, true },
-  { 65156, true },
-  { 65169, true },
-  { 65187, true },
-  { 65206, true },
-  { 65220, true },
-  { 65231, true },
-  { 65244, true },
+  { 64767, true },
+  { 64782, true },
+  { 64797, true },
+  { 64816, true },
+  { 64829, true },
+  { 64854, true },
+  { 64867, true },
+  { 64878, true },
+  { 64892, true },
+  { 64905, true },
+  { 64923, true },
+  { 64942, true },
+  { 64956, true },
+  { 64967, true },
+  { 64980, true },
+  { 64996, true },
+  { 65008, true },
+  { 65024, true },
+  { 65037, true },
+  { 65053, true },
+  { 65068, true },
+  { 65083, true },
+  { 65097, true },
+  { 65116, true },
+  { 65129, true },
+  { 65139, true },
+  { 65151, true },
+  { 65161, true },
+  { 65177, true },
+  { 65185, true },
+  { 65193, true },
+  { 65206, false },
+  { 65217, true },
+  { 65233, true },
+  { 65243, true },
   { 65260, true },
-  { 65272, true },
-  { 65288, true },
-  { 65301, true },
-  { 65317, true },
-  { 65332, true },
-  { 65347, true },
-  { 65361, true },
-  { 65380, true },
-  { 65393, true },
-  { 65403, true },
-  { 65415, true },
-  { 65425, true },
-  { 65441, true },
-  { 65449, true },
-  { 65457, true },
-  { 65470, false },
-  { 65481, true },
-  { 65497, true },
-  { 65507, true },
-  { 65524, true },
-  { 65542, false },
-  { 65555, true },
-  { 65568, true },
-  { 65577, true },
-  { 65592, true },
-  { 65606, true },
-  { 65624, true },
-  { 65640, true },
-  { 65649, true },
-  { 65658, true },
-  { 65673, true },
-  { 65683, true },
-  { 65693, true },
-  { 65707, true },
-  { 65719, true },
-  { 65736, true },
-  { 65750, true },
-  { 65758, true },
-  { 65766, true },
-  { 65775, true },
-  { 65787, true },
-  { 65800, false },
-  { 65808, true },
-  { 65834, true },
-  { 65847, true },
+  { 65278, false },
+  { 65291, true },
+  { 65304, true },
+  { 65313, true },
+  { 65328, true },
+  { 65342, true },
+  { 65360, true },
+  { 65376, true },
+  { 65385, true },
+  { 65394, true },
+  { 65409, true },
+  { 65419, true },
+  { 65429, true },
+  { 65443, true },
+  { 65455, true },
+  { 65472, true },
+  { 65486, true },
+  { 65494, true },
+  { 65502, true },
+  { 65511, true },
+  { 65523, true },
+  { 65536, false },
+  { 65544, true },
+  { 65570, true },
+  { 65583, true },
+  { 65597, true },
+  { 65607, true },
+  { 65622, true },
+  { 65633, true },
+  { 65644, true },
+  { 65655, true },
+  { 65667, true },
+  { 65680, true },
+  { 65688, false },
+  { 65702, true },
+  { 65723, true },
+  { 65748, true },
+  { 65759, true },
+  { 65773, true },
+  { 65791, true },
+  { 65802, true },
+  { 65816, true },
+  { 65832, true },
+  { 65845, false },
   { 65861, true },
-  { 65871, true },
-  { 65886, true },
-  { 65897, true },
-  { 65908, true },
-  { 65919, true },
-  { 65931, true },
-  { 65944, true },
-  { 65952, false },
+  { 65872, true },
+  { 65891, true },
+  { 65905, true },
+  { 65914, true },
+  { 65928, true },
+  { 65939, true },
+  { 65948, true },
   { 65966, true },
-  { 65987, true },
-  { 66012, true },
-  { 66023, true },
-  { 66037, true },
-  { 66055, true },
-  { 66066, true },
+  { 65980, true },
+  { 65998, true },
+  { 66017, true },
+  { 66027, true },
+  { 66040, true },
+  { 66051, true },
+  { 66060, true },
   { 66080, true },
-  { 66096, true },
-  { 66109, false },
-  { 66125, true },
-  { 66136, true },
-  { 66155, true },
-  { 66169, true },
-  { 66178, true },
-  { 66192, true },
-  { 66203, true },
-  { 66212, true },
-  { 66230, true },
+  { 66094, true },
+  { 66102, true },
+  { 66112, true },
+  { 66119, true },
+  { 66132, true },
+  { 66143, true },
+  { 66157, true },
+  { 66171, true },
+  { 66185, true },
+  { 66195, true },
+  { 66205, true },
+  { 66215, true },
+  { 66227, true },
+  { 66234, true },
   { 66244, true },
-  { 66262, true },
-  { 66281, true },
-  { 66291, true },
-  { 66304, true },
-  { 66315, true },
-  { 66324, true },
-  { 66344, true },
-  { 66358, true },
-  { 66366, true },
-  { 66376, true },
-  { 66383, true },
-  { 66396, true },
-  { 66407, true },
-  { 66421, true },
-  { 66435, true },
-  { 66449, true },
-  { 66459, true },
-  { 66469, true },
-  { 66479, true },
-  { 66491, true },
-  { 66498, true },
+  { 66253, true },
+  { 66268, true },
+  { 66275, true },
+  { 66285, true },
+  { 66297, true },
+  { 66307, true },
+  { 66318, true },
+  { 66325, true },
+  { 66334, true },
+  { 66346, true },
+  { 66355, true },
+  { 66369, true },
+  { 66382, true },
+  { 66391, true },
+  { 66403, true },
+  { 66425, true },
+  { 66448, true },
+  { 66462, true },
+  { 66477, true },
+  { 66492, true },
   { 66508, true },
-  { 66517, true },
-  { 66532, true },
-  { 66539, true },
-  { 66549, true },
-  { 66561, true },
-  { 66571, true },
-  { 66582, true },
-  { 66589, true },
-  { 66598, true },
-  { 66610, true },
-  { 66619, true },
-  { 66633, true },
-  { 66646, true },
-  { 66655, true },
-  { 66667, false },
-  { 66680, true },
-  { 66702, true },
-  { 66725, true },
-  { 66739, true },
-  { 66754, true },
-  { 66769, true },
-  { 66785, true },
-  { 66803, true },
-  { 66813, true },
-  { 66833, true },
-  { 66844, true },
+  { 66526, true },
+  { 66536, true },
+  { 66556, true },
+  { 66567, true },
+  { 66585, true },
+  { 66597, true },
+  { 66608, true },
+  { 66624, true },
+  { 66641, true },
+  { 66656, true },
+  { 66672, true },
+  { 66687, true },
+  { 66703, true },
+  { 66712, true },
+  { 66729, true },
+  { 66746, true },
+  { 66764, true },
+  { 66776, true },
+  { 66793, true },
+  { 66807, true },
+  { 66821, true },
+  { 66836, true },
+  { 66851, true },
   { 66862, true },
-  { 66874, true },
-  { 66885, true },
-  { 66901, true },
-  { 66918, true },
-  { 66933, true },
-  { 66949, true },
-  { 66964, true },
-  { 66980, true },
-  { 66989, true },
+  { 66876, true },
+  { 66891, true },
+  { 66906, true },
+  { 66921, true },
+  { 66943, true },
+  { 66961, true },
+  { 66982, true },
   { 67006, true },
-  { 67023, true },
-  { 67041, true },
+  { 67028, true },
+  { 67040, true },
   { 67053, true },
-  { 67070, true },
-  { 67084, true },
-  { 67098, true },
-  { 67113, true },
-  { 67128, true },
-  { 67139, true },
-  { 67153, true },
-  { 67168, true },
-  { 67183, true },
-  { 67198, true },
-  { 67220, true },
-  { 67238, true },
-  { 67259, true },
-  { 67283, true },
+  { 67069, true },
+  { 67083, true },
+  { 67096, true },
+  { 67114, true },
+  { 67127, false },
+  { 67148, true },
+  { 67166, true },
+  { 67182, true },
+  { 67195, true },
+  { 67210, true },
+  { 67224, true },
+  { 67235, true },
+  { 67260, true },
+  { 67276, true },
+  { 67293, true },
   { 67305, true },
-  { 67317, true },
-  { 67330, true },
-  { 67345, true },
-  { 67361, true },
-  { 67375, true },
-  { 67388, true },
-  { 67406, true },
-  { 67419, false },
-  { 67440, true },
-  { 67458, true },
+  { 67322, true },
+  { 67334, true },
+  { 67347, true },
+  { 67358, true },
+  { 67373, true },
+  { 67385, false },
+  { 67396, true },
+  { 67410, true },
+  { 67420, true },
+  { 67429, true },
+  { 67436, true },
+  { 67453, true },
+  { 67465, true },
   { 67474, true },
-  { 67487, true },
-  { 67502, true },
-  { 67516, true },
-  { 67527, true },
-  { 67552, true },
-  { 67568, true },
-  { 67585, true },
-  { 67597, true },
-  { 67614, true },
-  { 67626, true },
-  { 67639, true },
+  { 67485, true },
+  { 67497, true },
+  { 67504, false },
+  { 67511, false },
+  { 67520, true },
+  { 67532, true },
+  { 67544, true },
+  { 67554, true },
+  { 67563, true },
+  { 67572, true },
+  { 67579, true },
+  { 67591, false },
+  { 67603, false },
+  { 67611, true },
+  { 67623, true },
+  { 67636, true },
   { 67650, true },
-  { 67665, true },
-  { 67677, false },
-  { 67688, true },
-  { 67702, true },
-  { 67712, true },
-  { 67721, true },
-  { 67728, true },
-  { 67745, true },
-  { 67757, true },
-  { 67766, true },
-  { 67777, true },
-  { 67789, true },
-  { 67796, false },
-  { 67803, false },
-  { 67812, true },
-  { 67824, true },
-  { 67836, true },
-  { 67846, true },
-  { 67855, true },
-  { 67864, true },
-  { 67871, true },
-  { 67883, false },
-  { 67895, false },
-  { 67903, true },
-  { 67916, true },
+  { 67663, true },
+  { 67675, true },
+  { 67686, true },
+  { 67696, true },
+  { 67704, true },
+  { 67717, true },
+  { 67729, true },
+  { 67740, true },
+  { 67752, true },
+  { 67762, false },
+  { 67780, true },
+  { 67798, true },
+  { 67820, true },
+  { 67842, true },
+  { 67853, true },
+  { 67865, true },
+  { 67880, true },
+  { 67891, true },
+  { 67907, true },
   { 67930, true },
-  { 67943, true },
-  { 67955, true },
-  { 67966, true },
-  { 67976, true },
-  { 67984, true },
-  { 67997, true },
-  { 68009, true },
-  { 68020, true },
-  { 68032, true },
-  { 68042, false },
-  { 68060, true },
-  { 68078, true },
+  { 67948, true },
+  { 67959, true },
+  { 67977, true },
+  { 68004, true },
+  { 68024, true },
+  { 68036, true },
+  { 68054, true },
+  { 68068, true },
+  { 68084, true },
   { 68100, true },
-  { 68122, true },
-  { 68133, true },
-  { 68145, true },
-  { 68160, true },
-  { 68171, true },
-  { 68187, true },
-  { 68210, true },
-  { 68228, true },
-  { 68239, true },
-  { 68257, true },
-  { 68284, true },
-  { 68304, true },
-  { 68316, true },
-  { 68334, true },
-  { 68348, true },
-  { 68364, true },
-  { 68380, true },
-  { 68393, true },
-  { 68407, true },
-  { 68421, true },
-  { 68435, true },
-  { 68446, true },
-  { 68470, true },
-  { 68498, false },
-  { 68509, true },
-  { 68527, true },
-  { 68545, true },
-  { 68569, true },
-  { 68590, true },
-  { 68611, true },
-  { 68632, true },
-  { 68646, true },
-  { 68659, true },
-  { 68678, true },
-  { 68696, true },
-  { 68706, true },
-  { 68724, true },
-  { 68742, true },
-  { 68763, true },
-  { 68783, true },
-  { 68793, true },
-  { 68809, true },
+  { 68113, true },
+  { 68127, true },
+  { 68141, true },
+  { 68155, true },
+  { 68166, true },
+  { 68190, true },
+  { 68218, false },
+  { 68229, true },
+  { 68247, true },
+  { 68265, true },
+  { 68289, true },
+  { 68310, true },
+  { 68331, true },
+  { 68352, true },
+  { 68366, true },
+  { 68379, true },
+  { 68398, true },
+  { 68416, true },
+  { 68426, true },
+  { 68444, true },
+  { 68462, true },
+  { 68483, true },
+  { 68503, true },
+  { 68513, true },
+  { 68529, true },
+  { 68543, true },
+  { 68559, true },
+  { 68570, true },
+  { 68581, true },
+  { 68591, true },
+  { 68601, true },
+  { 68618, true },
+  { 68632, false },
+  { 68645, true },
+  { 68657, true },
+  { 68668, true },
+  { 68685, true },
+  { 68695, true },
+  { 68709, true },
+  { 68728, true },
+  { 68746, true },
+  { 68757, true },
+  { 68768, true },
+  { 68779, true },
+  { 68790, true },
+  { 68801, true },
+  { 68812, true },
   { 68823, true },
-  { 68839, true },
-  { 68850, true },
-  { 68861, true },
-  { 68871, true },
-  { 68881, true },
-  { 68898, true },
-  { 68912, false },
-  { 68925, true },
-  { 68937, true },
-  { 68948, true },
-  { 68965, true },
-  { 68975, true },
-  { 68989, true },
-  { 69008, true },
-  { 69026, true },
-  { 69037, true },
-  { 69048, true },
-  { 69059, true },
-  { 69070, true },
+  { 68843, true },
+  { 68856, true },
+  { 68874, true },
+  { 68887, true },
+  { 68897, true },
+  { 68912, true },
+  { 68926, true },
+  { 68941, true },
+  { 68954, true },
+  { 68971, true },
+  { 68988, true },
+  { 69001, true },
+  { 69015, true },
+  { 69024, true },
+  { 69043, true },
+  { 69054, true },
+  { 69064, true },
   { 69081, true },
-  { 69092, true },
-  { 69103, true },
-  { 69123, true },
-  { 69136, true },
-  { 69154, true },
-  { 69167, true },
+  { 69090, true },
+  { 69104, true },
+  { 69112, true },
+  { 69120, true },
+  { 69127, true },
+  { 69134, true },
+  { 69143, true },
+  { 69162, true },
   { 69177, true },
-  { 69192, true },
-  { 69206, true },
-  { 69221, true },
-  { 69234, true },
+  { 69198, true },
+  { 69218, true },
+  { 69235, true },
   { 69251, true },
-  { 69268, true },
-  { 69281, true },
-  { 69295, true },
-  { 69304, true },
-  { 69323, true },
-  { 69334, true },
-  { 69344, true },
-  { 69361, true },
-  { 69370, true },
-  { 69384, true },
-  { 69392, true },
-  { 69400, true },
-  { 69407, true },
-  { 69414, true },
-  { 69423, true },
-  { 69442, true },
-  { 69457, true },
-  { 69478, true },
-  { 69498, true },
-  { 69515, true },
-  { 69531, true },
-  { 69551, true },
-  { 69570, true },
-  { 69591, true },
-  { 69604, true },
-  { 69619, true },
+  { 69271, true },
+  { 69290, true },
+  { 69311, true },
+  { 69324, true },
+  { 69339, true },
+  { 69351, true },
+  { 69367, false },
+  { 69381, false },
+  { 69394, false },
+  { 69401, true },
+  { 69409, true },
+  { 69421, true },
+  { 69431, true },
+  { 69446, true },
+  { 69459, true },
+  { 69470, true },
+  { 69485, true },
+  { 69507, true },
+  { 69526, true },
+  { 69538, true },
+  { 69549, true },
+  { 69565, true },
+  { 69581, true },
+  { 69599, true },
+  { 69617, true },
   { 69631, true },
-  { 69647, false },
-  { 69661, false },
-  { 69674, false },
-  { 69681, true },
-  { 69689, true },
-  { 69701, true },
-  { 69711, true },
-  { 69726, true },
-  { 69739, true },
-  { 69750, true },
-  { 69765, true },
-  { 69787, true },
-  { 69806, true },
-  { 69818, true },
-  { 69829, true },
-  { 69845, true },
-  { 69861, true },
-  { 69879, true },
-  { 69897, true },
-  { 69911, true },
-  { 69921, true },
-  { 69928, true },
-  { 69939, true },
-  { 69951, false },
-  { 69971, false },
-  { 69987, true },
-  { 69998, true },
-  { 70013, true },
-  { 70026, true },
-  { 70039, true },
-  { 70051, true },
-  { 70068, true },
-  { 70079, false },
-  { 70089, true },
-  { 70104, true },
-  { 70120, true },
-  { 70149, true },
-  { 70168, true },
-  { 70182, true },
-  { 70199, true },
-  { 70225, true },
+  { 69641, true },
+  { 69648, true },
+  { 69659, true },
+  { 69671, false },
+  { 69691, false },
+  { 69707, true },
+  { 69718, true },
+  { 69733, true },
+  { 69746, true },
+  { 69759, true },
+  { 69771, true },
+  { 69788, true },
+  { 69799, false },
+  { 69809, true },
+  { 69824, true },
+  { 69840, true },
+  { 69869, true },
+  { 69888, true },
+  { 69902, true },
+  { 69919, true },
+  { 69945, true },
+  { 69960, true },
+  { 69975, true },
+  { 69990, true },
+  { 70004, true },
+  { 70023, true },
+  { 70048, true },
+  { 70064, true },
+  { 70085, true },
+  { 70119, true },
+  { 70143, true },
+  { 70172, false },
+  { 70187, true },
+  { 70203, true },
+  { 70228, true },
   { 70240, true },
-  { 70255, true },
-  { 70270, true },
-  { 70284, true },
-  { 70303, true },
-  { 70328, true },
-  { 70344, true },
-  { 70365, true },
-  { 70399, true },
-  { 70423, true },
-  { 70452, false },
-  { 70467, true },
-  { 70483, true },
-  { 70508, true },
-  { 70520, true },
-  { 70534, true },
-  { 70543, true },
-  { 70563, false },
-  { 70573, true },
-  { 70588, true },
-  { 70596, true },
-  { 70605, true },
-  { 70613, true },
-  { 70629, true },
-  { 70651, true },
-  { 70663, true },
-  { 70675, true },
-  { 70683, true },
-  { 70694, true },
-  { 70704, false },
-  { 70716, true },
+  { 70254, true },
+  { 70263, true },
+  { 70283, false },
+  { 70293, true },
+  { 70308, true },
+  { 70316, true },
+  { 70325, true },
+  { 70333, true },
+  { 70349, true },
+  { 70371, true },
+  { 70383, true },
+  { 70395, true },
+  { 70406, true },
+  { 70416, false },
+  { 70428, true },
+  { 70444, true },
+  { 70460, true },
+  { 70474, true },
+  { 70489, true },
+  { 70503, true },
+  { 70514, true },
+  { 70529, true },
+  { 70544, true },
+  { 70555, false },
+  { 70567, true },
+  { 70581, true },
+  { 70592, true },
+  { 70602, true },
+  { 70619, true },
+  { 70637, true },
+  { 70647, true },
+  { 70670, true },
+  { 70684, true },
+  { 70700, true },
+  { 70713, true },
   { 70732, true },
-  { 70748, true },
+  { 70745, true },
   { 70762, true },
-  { 70777, true },
-  { 70791, true },
-  { 70802, true },
+  { 70780, false },
+  { 70793, true },
+  { 70807, true },
   { 70817, true },
-  { 70832, true },
-  { 70843, false },
-  { 70855, true },
-  { 70864, true },
-  { 70878, true },
-  { 70889, true },
-  { 70899, true },
-  { 70916, true },
-  { 70934, true },
-  { 70944, true },
-  { 70967, true },
-  { 70981, true },
-  { 70997, true },
+  { 70828, false },
+  { 70837, true },
+  { 70853, true },
+  { 70860, true },
+  { 70881, false },
+  { 70896, true },
+  { 70911, true },
+  { 70928, true },
+  { 70937, true },
+  { 70946, true },
+  { 70958, true },
+  { 70976, true },
+  { 70986, true },
+  { 70999, true },
   { 71010, true },
-  { 71029, true },
-  { 71042, true },
-  { 71059, true },
-  { 71077, true },
+  { 71025, true },
+  { 71036, true },
+  { 71052, true },
+  { 71065, true },
+  { 71075, true },
   { 71091, true },
-  { 71101, true },
-  { 71112, false },
-  { 71121, true },
-  { 71137, true },
-  { 71144, true },
-  { 71165, false },
+  { 71113, true },
+  { 71125, true },
+  { 71138, true },
+  { 71151, true },
+  { 71166, true },
   { 71180, true },
-  { 71195, true },
-  { 71212, true },
+  { 71196, false },
+  { 71209, true },
   { 71221, true },
-  { 71230, true },
-  { 71242, true },
-  { 71260, true },
-  { 71270, true },
-  { 71283, true },
-  { 71294, true },
-  { 71309, true },
-  { 71320, true },
-  { 71336, true },
-  { 71349, true },
-  { 71359, true },
-  { 71375, true },
-  { 71397, true },
-  { 71409, true },
-  { 71422, true },
-  { 71435, true },
-  { 71450, true },
-  { 71464, true },
-  { 71480, false },
-  { 71493, true },
-  { 71505, true },
+  { 71233, true },
+  { 71250, true },
+  { 71266, true },
+  { 71278, false },
+  { 71288, true },
+  { 71301, true },
+  { 71317, true },
+  { 71328, true },
+  { 71348, false },
+  { 71356, true },
+  { 71368, true },
+  { 71379, true },
+  { 71398, false },
+  { 71418, true },
+  { 71427, true },
+  { 71438, true },
+  { 71469, true },
+  { 71483, true },
+  { 71497, true },
   { 71517, true },
-  { 71534, true },
-  { 71550, true },
-  { 71562, true },
-  { 71575, true },
-  { 71591, true },
-  { 71602, true },
-  { 71622, false },
-  { 71630, true },
-  { 71642, true },
-  { 71653, true },
-  { 71672, false },
-  { 71692, true },
-  { 71701, true },
-  { 71712, true },
-  { 71743, true },
-  { 71757, true },
-  { 71771, true },
-  { 71791, true },
-  { 71810, true },
-  { 71826, true },
-  { 71841, true },
-  { 71855, true },
-  { 71877, true },
-  { 71885, true },
-  { 71898, true },
+  { 71536, true },
+  { 71552, true },
+  { 71567, true },
+  { 71581, true },
+  { 71603, true },
+  { 71611, true },
+  { 71624, true },
+  { 71635, true },
+  { 71647, true },
+  { 71663, true },
+  { 71674, true },
+  { 71699, true },
+  { 71715, true },
+  { 71731, true },
+  { 71747, true },
+  { 71766, true },
+  { 71790, true },
+  { 71806, true },
+  { 71822, false },
+  { 71835, true },
+  { 71845, true },
+  { 71857, true },
+  { 71869, true },
+  { 71889, true },
   { 71909, true },
-  { 71921, true },
-  { 71937, true },
-  { 71948, true },
-  { 71973, true },
-  { 71989, true },
-  { 72005, true },
-  { 72021, true },
-  { 72040, true },
-  { 72064, true },
-  { 72080, true },
-  { 72096, false },
-  { 72109, true },
-  { 72119, true },
-  { 72131, true },
-  { 72143, true },
-  { 72158, true },
-  { 72178, true },
-  { 72198, true },
-  { 72219, false },
-  { 72235, true },
-  { 72253, true },
-  { 72264, true },
-  { 72279, true },
-  { 72292, true },
-  { 72304, false },
-  { 72312, true },
+  { 71930, false },
+  { 71946, true },
+  { 71964, true },
+  { 71975, true },
+  { 71990, true },
+  { 72003, true },
+  { 72015, false },
+  { 72023, true },
+  { 72037, true },
+  { 72051, true },
+  { 72063, true },
+  { 72077, true },
+  { 72090, true },
+  { 72108, true },
+  { 72124, true },
+  { 72144, true },
+  { 72175, true },
+  { 72206, true },
+  { 72228, true },
+  { 72246, true },
+  { 72260, true },
+  { 72282, true },
+  { 72297, true },
+  { 72316, true },
   { 72326, true },
-  { 72340, true },
-  { 72352, true },
-  { 72366, true },
-  { 72378, true },
-  { 72392, true },
-  { 72405, true },
-  { 72423, true },
-  { 72439, true },
-  { 72459, true },
-  { 72490, true },
-  { 72521, true },
-  { 72543, true },
-  { 72561, true },
-  { 72575, true },
-  { 72597, true },
-  { 72612, true },
-  { 72631, true },
-  { 72641, true },
-  { 72656, true },
-  { 72673, true },
-  { 72686, true },
-  { 72699, true },
-  { 72709, true },
-  { 72719, true },
-  { 72742, true },
-  { 72753, true },
-  { 72765, true },
-  { 72782, true },
-  { 72799, true },
-  { 72814, true },
-  { 72821, true },
-  { 72834, true },
-  { 72851, true },
-  { 72861, true },
-  { 72870, true },
-  { 72889, true },
-  { 72907, true },
-  { 72928, true },
-  { 72948, true },
-  { 72961, true },
-  { 72978, true },
-  { 72991, true },
-  { 73013, true },
-  { 73025, true },
-  { 73041, true },
-  { 73051, true },
-  { 73064, true },
-  { 73086, true },
-  { 73100, true },
-  { 73122, true },
-  { 73139, true },
-  { 73153, true },
+  { 72341, true },
+  { 72356, true },
+  { 72371, true },
+  { 72388, true },
+  { 72401, true },
+  { 72414, true },
+  { 72424, true },
+  { 72434, true },
+  { 72457, true },
+  { 72468, true },
+  { 72480, true },
+  { 72497, true },
+  { 72514, true },
+  { 72529, true },
+  { 72536, true },
+  { 72549, true },
+  { 72566, true },
+  { 72576, true },
+  { 72585, true },
+  { 72604, true },
+  { 72622, true },
+  { 72643, true },
+  { 72663, true },
+  { 72676, true },
+  { 72693, true },
+  { 72706, true },
+  { 72728, true },
+  { 72740, true },
+  { 72756, true },
+  { 72766, true },
+  { 72779, true },
+  { 72801, true },
+  { 72815, true },
+  { 72837, true },
+  { 72854, true },
+  { 72868, true },
+  { 72876, true },
+  { 72888, true },
+  { 72903, true },
+  { 72913, true },
+  { 72924, true },
+  { 72936, true },
+  { 72947, true },
+  { 72956, true },
+  { 72966, true },
+  { 72988, true },
+  { 73000, true },
+  { 73018, true },
+  { 73029, true },
+  { 73044, true },
+  { 73057, true },
+  { 73071, true },
+  { 73087, true },
+  { 73102, true },
+  { 73114, true },
+  { 73124, true },
+  { 73142, true },
+  { 73150, true },
   { 73161, true },
-  { 73173, true },
+  { 73175, true },
   { 73188, true },
-  { 73198, true },
-  { 73209, true },
-  { 73221, true },
-  { 73232, true },
-  { 73241, true },
-  { 73251, true },
-  { 73273, true },
-  { 73285, true },
-  { 73303, true },
-  { 73314, true },
-  { 73329, true },
-  { 73342, true },
-  { 73356, true },
-  { 73372, true },
-  { 73387, true },
-  { 73399, true },
-  { 73409, true },
-  { 73427, true },
-  { 73435, true },
-  { 73446, true },
-  { 73460, true },
-  { 73473, true },
-  { 73484, true },
-  { 73495, false },
-  { 73511, true },
-  { 73524, true },
-  { 73545, true },
-  { 73560, true },
-  { 73571, true },
-  { 73587, true },
-  { 73605, true },
+  { 73199, true },
+  { 73210, false },
+  { 73226, true },
+  { 73239, true },
+  { 73260, true },
+  { 73275, true },
+  { 73286, true },
+  { 73302, true },
+  { 73320, true },
+  { 73341, true },
+  { 73353, true },
+  { 73362, true },
+  { 73375, true },
+  { 73393, true },
+  { 73402, true },
+  { 73413, true },
+  { 73425, false },
+  { 73443, true },
+  { 73461, true },
+  { 73480, true },
+  { 73499, true },
+  { 73513, true },
+  { 73533, false },
+  { 73553, true },
+  { 73565, true },
+  { 73578, true },
+  { 73590, true },
+  { 73609, true },
   { 73626, true },
   { 73638, true },
-  { 73647, true },
-  { 73660, true },
-  { 73678, true },
-  { 73687, true },
-  { 73698, true },
-  { 73710, false },
-  { 73728, true },
+  { 73651, true },
+  { 73666, true },
+  { 73680, true },
+  { 73690, true },
+  { 73700, true },
+  { 73710, true },
+  { 73722, true },
+  { 73731, true },
   { 73746, true },
-  { 73765, true },
-  { 73784, true },
-  { 73798, true },
-  { 73818, false },
-  { 73838, true },
-  { 73850, true },
+  { 73761, true },
+  { 73770, true },
+  { 73783, true },
+  { 73810, true },
+  { 73818, true },
+  { 73839, true },
+  { 73853, true },
   { 73863, true },
-  { 73875, true },
-  { 73894, true },
-  { 73911, true },
-  { 73923, true },
-  { 73936, true },
-  { 73951, true },
-  { 73965, true },
-  { 73975, true },
-  { 73985, true },
-  { 73995, true },
-  { 74007, true },
-  { 74016, true },
+  { 73871, true },
+  { 73880, true },
+  { 73889, true },
+  { 73906, true },
+  { 73918, true },
+  { 73926, true },
+  { 73947, true },
+  { 73966, true },
+  { 73978, true },
+  { 73996, true },
+  { 74008, true },
+  { 74019, true },
   { 74031, true },
-  { 74046, true },
-  { 74055, true },
-  { 74068, true },
-  { 74095, true },
-  { 74103, true },
-  { 74124, true },
+  { 74040, true },
+  { 74049, true },
+  { 74056, true },
+  { 74064, true },
+  { 74078, true },
+  { 74089, true },
+  { 74100, true },
+  { 74115, true },
+  { 74128, false },
   { 74138, true },
-  { 74148, true },
-  { 74156, true },
-  { 74165, true },
-  { 74174, true },
+  { 74152, true },
+  { 74172, true },
   { 74187, true },
-  { 74204, true },
-  { 74216, true },
-  { 74224, true },
-  { 74245, true },
-  { 74264, true },
-  { 74276, true },
-  { 74294, true },
-  { 74306, true },
-  { 74317, true },
-  { 74329, true },
-  { 74338, true },
-  { 74347, true },
-  { 74354, true },
-  { 74362, true },
-  { 74376, true },
-  { 74387, true },
-  { 74398, true },
-  { 74413, true },
-  { 74426, false },
-  { 74436, true },
-  { 74450, true },
-  { 74470, true },
-  { 74485, true },
-  { 74498, true },
+  { 74199, true },
+  { 74214, true },
+  { 74227, true },
+  { 74254, true },
+  { 74268, true },
+  { 74285, true },
+  { 74300, true },
+  { 74310, true },
+  { 74323, true },
+  { 74340, true },
+  { 74353, true },
+  { 74363, true },
+  { 74390, true },
+  { 74400, true },
+  { 74409, true },
+  { 74416, true },
+  { 74432, true },
+  { 74443, true },
+  { 74454, true },
+  { 74468, true },
+  { 74479, true },
+  { 74489, true },
   { 74510, true },
-  { 74525, true },
-  { 74538, true },
-  { 74565, true },
-  { 74579, true },
+  { 74518, true },
+  { 74528, true },
+  { 74540, true },
+  { 74563, true },
+  { 74577, true },
   { 74596, true },
-  { 74611, true },
-  { 74621, true },
-  { 74634, true },
-  { 74651, true },
-  { 74664, true },
-  { 74674, true },
-  { 74701, true },
-  { 74711, true },
-  { 74720, true },
+  { 74604, true },
+  { 74614, true },
+  { 74623, true },
+  { 74641, true },
+  { 74673, true },
+  { 74689, true },
+  { 74710, true },
   { 74727, true },
-  { 74743, true },
-  { 74754, true },
-  { 74765, true },
-  { 74779, true },
-  { 74790, true },
-  { 74800, true },
-  { 74821, true },
-  { 74829, true },
-  { 74839, true },
-  { 74851, true },
-  { 74874, true },
-  { 74888, true },
-  { 74907, true },
-  { 74915, true },
-  { 74925, true },
-  { 74934, true },
-  { 74952, true },
-  { 74984, true },
-  { 75000, true },
-  { 75021, true },
-  { 75038, true },
-  { 75049, true },
-  { 75069, true },
-  { 75082, true },
+  { 74738, true },
+  { 74758, true },
+  { 74771, true },
+  { 74785, true },
+  { 74804, true },
+  { 74822, true },
+  { 74833, true },
+  { 74841, true },
+  { 74855, true },
+  { 74867, true },
+  { 74880, true },
+  { 74893, true },
+  { 74902, true },
+  { 74912, true },
+  { 74924, true },
+  { 74935, true },
+  { 74947, true },
+  { 74957, true },
+  { 74980, true },
+  { 74996, true },
+  { 75015, true },
+  { 75033, true },
+  { 75047, true },
+  { 75061, true },
+  { 75071, true },
+  { 75084, true },
   { 75096, true },
-  { 75106, true },
-  { 75125, true },
-  { 75143, true },
-  { 75154, true },
-  { 75162, true },
-  { 75176, true },
-  { 75188, true },
-  { 75201, true },
-  { 75214, true },
-  { 75223, true },
-  { 75233, true },
-  { 75245, true },
-  { 75256, true },
-  { 75268, true },
-  { 75278, true },
-  { 75301, false },
-  { 75316, true },
-  { 75332, true },
-  { 75351, true },
-  { 75369, true },
-  { 75383, true },
-  { 75397, true },
-  { 75407, true },
-  { 75420, true },
-  { 75432, true },
-  { 75446, true },
-  { 75462, true },
-  { 75477, true },
-  { 75486, true },
-  { 75505, true },
-  { 75520, true },
-  { 75533, true },
-  { 75549, true },
-  { 75566, false },
-  { 75583, true },
-  { 75605, true },
-  { 75627, true },
-  { 75649, true },
-  { 75661, true },
-  { 75675, true },
-  { 75688, true },
-  { 75697, true },
-  { 75713, true },
-  { 75730, true },
-  { 75744, true },
-  { 75757, true },
-  { 75771, true },
-  { 75783, true },
-  { 75796, true },
-  { 75809, true },
-  { 75819, true },
-  { 75833, true },
-  { 75846, true },
-  { 75868, true },
-  { 75890, true },
-  { 75901, true },
-  { 75916, true },
-  { 75927, true },
-  { 75947, true },
-  { 75964, true },
-  { 75983, true },
+  { 75110, true },
+  { 75126, true },
+  { 75141, true },
+  { 75150, true },
+  { 75169, true },
+  { 75184, true },
+  { 75197, true },
+  { 75213, true },
+  { 75230, false },
+  { 75247, true },
+  { 75269, true },
+  { 75291, true },
+  { 75303, true },
+  { 75317, true },
+  { 75330, true },
+  { 75339, true },
+  { 75355, true },
+  { 75372, true },
+  { 75386, true },
+  { 75399, true },
+  { 75413, true },
+  { 75425, true },
+  { 75438, true },
+  { 75451, true },
+  { 75461, true },
+  { 75475, true },
+  { 75488, true },
+  { 75510, true },
+  { 75532, true },
+  { 75543, true },
+  { 75558, true },
+  { 75569, true },
+  { 75589, true },
+  { 75606, true },
+  { 75625, true },
+  { 75652, true },
+  { 75671, true },
+  { 75683, true },
+  { 75704, true },
+  { 75729, true },
+  { 75748, true },
+  { 75763, true },
+  { 75783, false },
+  { 75791, true },
+  { 75803, true },
+  { 75815, true },
+  { 75829, true },
+  { 75839, true },
+  { 75852, true },
+  { 75870, true },
+  { 75885, true },
+  { 75899, true },
+  { 75915, true },
+  { 75922, true },
+  { 75929, true },
+  { 75941, true },
+  { 75952, true },
+  { 75965, true },
+  { 75979, true },
+  { 75996, true },
   { 76010, true },
-  { 76029, true },
-  { 76041, true },
-  { 76062, true },
-  { 76087, true },
-  { 76106, true },
-  { 76121, true },
-  { 76141, false },
-  { 76149, true },
-  { 76161, true },
-  { 76173, true },
-  { 76187, true },
+  { 76026, true },
+  { 76037, true },
+  { 76044, true },
+  { 76053, true },
+  { 76067, false },
+  { 76082, true },
+  { 76110, true },
+  { 76125, true },
+  { 76146, true },
+  { 76160, true },
+  { 76181, true },
   { 76197, true },
-  { 76210, true },
+  { 76207, true },
+  { 76218, true },
   { 76228, true },
-  { 76243, true },
-  { 76257, true },
-  { 76273, true },
-  { 76280, true },
-  { 76287, true },
-  { 76299, true },
-  { 76310, true },
-  { 76323, true },
-  { 76337, true },
-  { 76354, true },
-  { 76368, true },
-  { 76384, true },
-  { 76395, true },
-  { 76402, true },
+  { 76241, true },
+  { 76254, true },
+  { 76271, true },
+  { 76290, true },
+  { 76309, true },
+  { 76327, true },
+  { 76338, true },
+  { 76350, true },
+  { 76362, true },
+  { 76373, true },
+  { 76385, true },
+  { 76400, true },
   { 76411, true },
-  { 76425, false },
-  { 76440, true },
-  { 76468, true },
-  { 76483, true },
-  { 76504, true },
-  { 76518, true },
-  { 76539, true },
-  { 76555, true },
-  { 76565, true },
-  { 76576, true },
-  { 76586, true },
-  { 76599, true },
-  { 76612, true },
-  { 76629, true },
-  { 76648, true },
-  { 76667, true },
-  { 76685, true },
-  { 76696, true },
-  { 76708, true },
-  { 76720, true },
-  { 76731, true },
-  { 76743, true },
-  { 76758, true },
-  { 76769, true },
-  { 76780, true },
-  { 76791, true },
-  { 76803, true },
-  { 76814, true },
-  { 76827, true },
-  { 76836, true },
-  { 76845, true },
-  { 76858, true },
-  { 76865, false },
-  { 76873, true },
-  { 76881, true },
-  { 76896, true },
-  { 76909, true },
-  { 76920, false },
-  { 76932, true },
-  { 76956, true },
-  { 76971, true },
-  { 76984, true },
-  { 76998, true },
-  { 77016, true },
-  { 77024, true },
-  { 77049, true },
-  { 77069, true },
-  { 77093, true },
-  { 77105, true },
-  { 77121, true },
-  { 77130, true },
-  { 77146, true },
-  { 77164, true },
-  { 77179, true },
-  { 77199, true },
-  { 77212, true },
-  { 77228, true },
-  { 77242, true },
+  { 76422, true },
+  { 76433, true },
+  { 76445, true },
+  { 76456, true },
+  { 76469, true },
+  { 76478, true },
+  { 76487, true },
+  { 76500, true },
+  { 76507, false },
+  { 76515, true },
+  { 76523, true },
+  { 76538, true },
+  { 76551, true },
+  { 76562, false },
+  { 76574, true },
+  { 76598, true },
+  { 76613, true },
+  { 76626, true },
+  { 76640, true },
+  { 76658, true },
+  { 76666, true },
+  { 76691, true },
+  { 76711, true },
+  { 76735, true },
+  { 76747, true },
+  { 76763, true },
+  { 76772, true },
+  { 76788, true },
+  { 76806, true },
+  { 76821, true },
+  { 76841, true },
+  { 76854, true },
+  { 76870, true },
+  { 76884, true },
+  { 76900, true },
+  { 76920, true },
+  { 76938, true },
+  { 76957, true },
+  { 76974, true },
+  { 76990, true },
+  { 77019, true },
+  { 77039, true },
+  { 77056, true },
+  { 77072, true },
+  { 77081, true },
+  { 77094, true },
+  { 77106, false },
+  { 77120, true },
+  { 77137, true },
+  { 77170, true },
+  { 77190, true },
+  { 77202, true },
+  { 77215, true },
+  { 77230, true },
+  { 77241, true },
   { 77258, true },
-  { 77278, true },
-  { 77296, true },
-  { 77315, true },
-  { 77332, true },
-  { 77348, true },
-  { 77377, true },
-  { 77397, true },
-  { 77414, true },
-  { 77430, true },
-  { 77439, true },
-  { 77452, true },
-  { 77464, false },
-  { 77478, true },
-  { 77495, true },
-  { 77528, true },
-  { 77548, true },
-  { 77560, true },
-  { 77573, true },
+  { 77270, true },
+  { 77282, true },
+  { 77291, true },
+  { 77308, true },
+  { 77329, true },
+  { 77344, true },
+  { 77362, true },
+  { 77378, true },
+  { 77399, true },
+  { 77413, true },
+  { 77427, true },
+  { 77438, true },
+  { 77449, true },
+  { 77465, true },
+  { 77477, true },
+  { 77488, true },
+  { 77502, true },
+  { 77511, true },
+  { 77520, true },
+  { 77535, true },
+  { 77544, true },
+  { 77552, true },
+  { 77563, true },
+  { 77574, true },
   { 77588, true },
-  { 77599, true },
-  { 77616, true },
-  { 77628, true },
-  { 77640, true },
-  { 77649, true },
-  { 77666, true },
-  { 77687, true },
-  { 77702, true },
-  { 77720, true },
-  { 77736, true },
+  { 77603, true },
+  { 77621, true },
+  { 77635, true },
+  { 77645, true },
+  { 77655, true },
+  { 77664, true },
+  { 77676, true },
+  { 77696, true },
+  { 77719, true },
+  { 77734, true },
   { 77757, true },
-  { 77771, true },
-  { 77785, true },
-  { 77796, true },
-  { 77807, true },
-  { 77823, true },
-  { 77835, true },
-  { 77846, true },
-  { 77860, true },
-  { 77869, true },
-  { 77878, true },
-  { 77893, true },
-  { 77902, true },
+  { 77765, true },
+  { 77778, true },
+  { 77790, true },
+  { 77802, true },
+  { 77812, false },
+  { 77821, false },
+  { 77830, false },
+  { 77839, true },
+  { 77858, true },
+  { 77881, true },
+  { 77895, true },
   { 77910, true },
-  { 77921, true },
-  { 77932, true },
-  { 77946, true },
-  { 77961, true },
-  { 77979, true },
-  { 77993, true },
+  { 77929, true },
+  { 77942, true },
+  { 77958, true },
+  { 77971, true },
+  { 77988, true },
   { 78003, true },
   { 78013, true },
-  { 78022, true },
-  { 78034, true },
-  { 78054, true },
-  { 78077, true },
-  { 78092, true },
-  { 78115, true },
-  { 78123, true },
-  { 78136, true },
-  { 78148, true },
-  { 78160, true },
-  { 78170, false },
-  { 78179, false },
-  { 78188, false },
-  { 78197, true },
-  { 78216, true },
-  { 78239, true },
-  { 78254, true },
-  { 78268, true },
-  { 78283, true },
-  { 78302, true },
-  { 78315, true },
-  { 78331, true },
-  { 78344, true },
-  { 78361, true },
-  { 78376, true },
-  { 78386, true },
-  { 78402, true },
-  { 78421, true },
-  { 78436, true },
-  { 78455, true },
-  { 78463, true },
-  { 78477, true },
-  { 78491, true },
-  { 78508, false },
-  { 78528, true },
-  { 78541, true },
-  { 78553, true },
-  { 78568, true },
-  { 78586, true },
-  { 78597, true },
-  { 78607, true },
-  { 78621, true },
-  { 78634, true },
-  { 78649, true },
-  { 78675, true },
-  { 78690, true },
-  { 78702, true },
-  { 78727, false },
-  { 78736, true },
-  { 78743, true },
-  { 78751, true },
-  { 78759, true },
-  { 78770, true },
-  { 78786, true },
-  { 78800, true },
-  { 78814, true },
-  { 78830, true },
-  { 78857, true },
-  { 78871, true },
-  { 78880, true },
-  { 78893, true },
-  { 78905, true },
-  { 78928, true },
-  { 78948, true },
-  { 78967, true },
-  { 78989, true },
-  { 79003, true },
-  { 79023, true },
-  { 79048, true },
-  { 79064, true },
-  { 79076, true },
-  { 79088, true },
-  { 79110, true },
+  { 78029, true },
+  { 78048, true },
+  { 78063, true },
+  { 78082, true },
+  { 78090, true },
+  { 78104, true },
+  { 78118, true },
+  { 78135, false },
+  { 78155, true },
+  { 78168, true },
+  { 78183, true },
+  { 78201, true },
+  { 78212, true },
+  { 78222, true },
+  { 78236, true },
+  { 78249, true },
+  { 78264, true },
+  { 78290, true },
+  { 78305, true },
+  { 78317, true },
+  { 78342, false },
+  { 78351, true },
+  { 78358, true },
+  { 78366, true },
+  { 78374, true },
+  { 78385, true },
+  { 78401, true },
+  { 78415, true },
+  { 78429, true },
+  { 78445, true },
+  { 78472, true },
+  { 78486, true },
+  { 78495, true },
+  { 78508, true },
+  { 78520, true },
+  { 78543, true },
+  { 78563, true },
+  { 78582, true },
+  { 78604, true },
+  { 78618, true },
+  { 78638, true },
+  { 78663, true },
+  { 78679, true },
+  { 78691, true },
+  { 78703, true },
+  { 78725, true },
+  { 78740, true },
+  { 78755, true },
+  { 78772, true },
+  { 78787, true },
+  { 78804, true },
+  { 78819, true },
+  { 78834, true },
+  { 78846, true },
+  { 78860, false },
+  { 78870, true },
+  { 78887, true },
+  { 78898, false },
+  { 78913, true },
+  { 78930, true },
+  { 78944, true },
+  { 78957, true },
+  { 78969, true },
+  { 78979, true },
+  { 78991, true },
+  { 79006, true },
+  { 79017, true },
+  { 79037, true },
+  { 79049, true },
+  { 79060, true },
+  { 79085, true },
+  { 79094, true },
+  { 79102, true },
   { 79125, true },
-  { 79140, true },
-  { 79157, true },
-  { 79172, true },
-  { 79189, true },
+  { 79142, true },
+  { 79153, true },
+  { 79169, false },
+  { 79181, true },
+  { 79196, true },
   { 79204, true },
-  { 79219, true },
-  { 79231, true },
-  { 79245, false },
-  { 79255, true },
-  { 79272, true },
-  { 79283, false },
-  { 79298, true },
-  { 79315, true },
-  { 79329, true },
-  { 79342, true },
-  { 79354, true },
-  { 79364, true },
-  { 79376, true },
-  { 79391, true },
-  { 79402, true },
-  { 79422, true },
-  { 79434, true },
-  { 79445, true },
-  { 79470, true },
-  { 79479, true },
-  { 79487, true },
-  { 79510, true },
-  { 79527, true },
-  { 79538, true },
-  { 79554, false },
-  { 79566, true },
-  { 79581, true },
-  { 79589, true },
-  { 79599, true },
-  { 79614, true },
-  { 79628, true },
-  { 79638, false },
-  { 79656, true },
-  { 79680, true },
-  { 79692, true },
-  { 79720, true },
-  { 79736, true },
-  { 79748, true },
-  { 79762, true },
-  { 79790, true },
-  { 79804, true },
-  { 79820, true },
-  { 79837, true },
-  { 79851, true },
-  { 79868, true },
-  { 79890, true },
+  { 79214, true },
+  { 79229, true },
+  { 79243, true },
+  { 79253, false },
+  { 79271, true },
+  { 79295, true },
+  { 79307, true },
+  { 79335, true },
+  { 79351, true },
+  { 79363, true },
+  { 79377, true },
+  { 79405, true },
+  { 79419, true },
+  { 79435, true },
+  { 79452, true },
+  { 79466, true },
+  { 79483, true },
+  { 79505, true },
+  { 79515, true },
+  { 79533, true },
+  { 79552, true },
+  { 79571, true },
+  { 79596, true },
+  { 79615, true },
+  { 79629, true },
+  { 79642, true },
+  { 79671, true },
+  { 79701, true },
+  { 79713, true },
+  { 79722, true },
+  { 79735, true },
+  { 79746, true },
+  { 79756, true },
+  { 79773, true },
+  { 79796, true },
+  { 79822, true },
+  { 79836, true },
+  { 79850, true },
+  { 79874, false },
+  { 79884, true },
   { 79900, true },
-  { 79918, true },
-  { 79937, true },
-  { 79956, true },
-  { 79981, true },
-  { 80000, true },
-  { 80014, true },
-  { 80027, true },
-  { 80056, true },
-  { 80086, true },
-  { 80098, true },
-  { 80107, true },
-  { 80120, true },
-  { 80131, true },
+  { 79908, true },
+  { 79927, true },
+  { 79939, true },
+  { 79950, true },
+  { 79966, true },
+  { 79980, true },
+  { 79992, true },
+  { 80005, true },
+  { 80024, true },
+  { 80035, true },
+  { 80047, true },
+  { 80060, true },
+  { 80074, true },
+  { 80084, true },
+  { 80097, true },
+  { 80109, true },
+  { 80125, true },
+  { 80133, false },
   { 80141, true },
-  { 80158, true },
-  { 80181, true },
-  { 80207, true },
-  { 80221, true },
-  { 80235, true },
-  { 80259, false },
-  { 80269, true },
-  { 80285, true },
-  { 80293, true },
+  { 80163, true },
+  { 80175, true },
+  { 80183, true },
+  { 80204, true },
+  { 80228, true },
+  { 80244, true },
+  { 80258, true },
+  { 80275, true },
+  { 80287, true },
+  { 80297, true },
   { 80312, true },
-  { 80324, true },
-  { 80335, true },
-  { 80351, true },
-  { 80365, true },
-  { 80377, true },
-  { 80390, true },
-  { 80409, true },
-  { 80420, true },
-  { 80432, true },
-  { 80445, true },
-  { 80459, true },
-  { 80469, true },
-  { 80482, true },
-  { 80494, true },
+  { 80322, true },
+  { 80345, true },
+  { 80359, true },
+  { 80374, true },
+  { 80386, true },
+  { 80395, true },
+  { 80408, true },
+  { 80423, true },
+  { 80437, true },
+  { 80449, true },
+  { 80464, true },
+  { 80475, true },
+  { 80486, true },
+  { 80496, true },
   { 80510, true },
-  { 80518, false },
-  { 80526, true },
-  { 80548, true },
-  { 80560, true },
-  { 80568, true },
-  { 80589, true },
-  { 80613, true },
-  { 80629, true },
-  { 80643, true },
-  { 80660, true },
-  { 80672, true },
-  { 80682, true },
-  { 80697, true },
-  { 80707, true },
-  { 80730, true },
-  { 80744, true },
-  { 80759, true },
-  { 80771, true },
-  { 80780, true },
-  { 80793, true },
-  { 80808, true },
-  { 80822, true },
-  { 80834, true },
-  { 80849, true },
-  { 80860, true },
-  { 80871, true },
-  { 80881, true },
-  { 80895, true },
-  { 80904, true },
-  { 80912, true },
-  { 80922, true },
-  { 80931, true },
-  { 80939, true },
+  { 80519, true },
+  { 80527, true },
+  { 80537, true },
+  { 80546, true },
+  { 80554, true },
+  { 80562, true },
+  { 80571, true },
+  { 80583, true },
+  { 80595, true },
+  { 80605, true },
+  { 80615, true },
+  { 80627, true },
+  { 80641, true },
+  { 80656, true },
+  { 80667, true },
+  { 80681, true },
+  { 80692, true },
+  { 80700, true },
+  { 80711, true },
+  { 80722, true },
+  { 80737, true },
+  { 80750, true },
+  { 80757, true },
+  { 80777, true },
+  { 80786, true },
+  { 80799, true },
+  { 80816, true },
+  { 80831, true },
+  { 80846, true },
+  { 80866, true },
+  { 80875, true },
+  { 80887, false },
+  { 80896, true },
+  { 80906, true },
+  { 80916, false },
+  { 80923, true },
+  { 80934, true },
   { 80947, true },
-  { 80956, true },
-  { 80968, true },
-  { 80980, true },
+  { 80962, true },
+  { 80983, true },
   { 80990, true },
-  { 81000, true },
-  { 81012, true },
-  { 81026, true },
-  { 81041, true },
-  { 81052, true },
-  { 81066, true },
-  { 81077, true },
-  { 81085, true },
-  { 81096, true },
-  { 81111, true },
-  { 81124, true },
-  { 81131, true },
-  { 81151, true },
-  { 81160, true },
-  { 81173, true },
-  { 81190, true },
-  { 81205, true },
-  { 81220, true },
-  { 81240, true },
-  { 81249, true },
-  { 81261, false },
-  { 81270, true },
-  { 81280, true },
-  { 81290, false },
-  { 81297, true },
-  { 81308, true },
-  { 81321, true },
-  { 81336, true },
-  { 81357, true },
-  { 81364, true },
-  { 81384, true },
-  { 81394, true },
-  { 81405, true },
-  { 81418, true },
-  { 81432, true },
-  { 81441, true },
-  { 81457, true },
-  { 81466, false },
-  { 81475, true },
-  { 81483, true },
-  { 81495, true },
-  { 81502, true },
-  { 81514, true },
-  { 81533, true },
-  { 81546, true },
+  { 81010, true },
+  { 81020, true },
+  { 81031, true },
+  { 81044, true },
+  { 81058, true },
+  { 81067, true },
+  { 81083, true },
+  { 81092, false },
+  { 81101, true },
+  { 81109, true },
+  { 81121, true },
+  { 81128, true },
+  { 81140, true },
+  { 81159, true },
+  { 81172, true },
+  { 81188, true },
+  { 81201, false },
+  { 81210, true },
+  { 81219, true },
+  { 81230, true },
+  { 81250, true },
+  { 81267, true },
+  { 81283, false },
+  { 81298, true },
+  { 81317, true },
+  { 81328, true },
+  { 81345, false },
+  { 81366, false },
+  { 81382, false },
+  { 81402, true },
+  { 81414, true },
+  { 81437, true },
+  { 81449, true },
+  { 81462, true },
+  { 81474, true },
+  { 81485, true },
+  { 81497, true },
+  { 81506, true },
+  { 81517, true },
+  { 81535, true },
   { 81562, true },
-  { 81575, false },
-  { 81584, true },
-  { 81593, true },
-  { 81604, true },
-  { 81624, true },
-  { 81641, true },
-  { 81656, true },
-  { 81672, false },
-  { 81687, true },
-  { 81706, true },
-  { 81717, true },
-  { 81734, false },
-  { 81755, false },
-  { 81771, false },
-  { 81791, true },
-  { 81803, true },
-  { 81826, true },
-  { 81838, true },
-  { 81851, true },
-  { 81863, true },
-  { 81875, true },
-  { 81886, true },
-  { 81898, true },
-  { 81907, true },
-  { 81918, true },
-  { 81936, true },
-  { 81963, true },
+  { 81572, true },
+  { 81580, true },
+  { 81594, true },
+  { 81609, true },
+  { 81619, true },
+  { 81630, true },
+  { 81639, true },
+  { 81658, true },
+  { 81671, true },
+  { 81681, true },
+  { 81689, true },
+  { 81696, true },
+  { 81709, true },
+  { 81719, true },
+  { 81728, false },
+  { 81738, true },
+  { 81747, true },
+  { 81759, true },
+  { 81769, false },
+  { 81786, true },
+  { 81796, true },
+  { 81804, true },
+  { 81814, true },
+  { 81824, true },
+  { 81837, true },
+  { 81849, true },
+  { 81864, true },
+  { 81876, true },
+  { 81892, true },
+  { 81906, true },
+  { 81920, true },
+  { 81927, true },
+  { 81939, true },
+  { 81953, true },
+  { 81964, true },
   { 81973, true },
-  { 81981, true },
-  { 81995, true },
-  { 82010, true },
-  { 82020, true },
+  { 81987, true },
+  { 81999, true },
+  { 82009, true },
+  { 82019, true },
   { 82031, true },
-  { 82040, true },
+  { 82041, true },
   { 82059, true },
-  { 82072, true },
-  { 82082, true },
-  { 82090, true },
-  { 82097, true },
-  { 82110, true },
-  { 82120, true },
-  { 82129, false },
-  { 82139, true },
-  { 82148, true },
-  { 82160, true },
-  { 82170, false },
-  { 82187, true },
-  { 82196, true },
-  { 82206, true },
-  { 82214, true },
-  { 82224, true },
-  { 82234, true },
-  { 82247, true },
-  { 82259, true },
-  { 82274, true },
-  { 82286, true },
-  { 82302, true },
-  { 82316, true },
-  { 82330, true },
-  { 82337, true },
-  { 82349, true },
-  { 82363, true },
-  { 82374, true },
-  { 82383, true },
-  { 82397, true },
-  { 82409, true },
-  { 82419, true },
-  { 82429, true },
-  { 82441, true },
-  { 82451, true },
-  { 82469, true },
-  { 82484, true },
-  { 82497, true },
-  { 82504, true },
+  { 82074, true },
+  { 82087, true },
+  { 82094, true },
+  { 82111, true },
+  { 82122, true },
+  { 82132, true },
+  { 82142, true },
+  { 82151, true },
+  { 82173, true },
+  { 82192, true },
+  { 82199, true },
+  { 82213, true },
+  { 82228, true },
+  { 82250, true },
+  { 82264, true },
+  { 82277, true },
+  { 82291, true },
+  { 82314, true },
+  { 82325, true },
+  { 82334, true },
+  { 82345, true },
+  { 82359, true },
+  { 82370, true },
+  { 82382, true },
+  { 82401, true },
+  { 82414, true },
+  { 82423, true },
+  { 82438, true },
+  { 82454, true },
+  { 82467, true },
+  { 82479, true },
+  { 82492, true },
+  { 82500, true },
+  { 82512, true },
   { 82521, true },
-  { 82532, true },
-  { 82542, true },
-  { 82552, true },
-  { 82561, true },
-  { 82583, true },
-  { 82602, true },
-  { 82609, true },
-  { 82623, true },
-  { 82638, true },
-  { 82660, true },
-  { 82674, true },
-  { 82687, true },
-  { 82701, true },
-  { 82724, true },
-  { 82735, true },
-  { 82744, true },
-  { 82755, true },
-  { 82769, true },
-  { 82780, true },
+  { 82536, true },
+  { 82545, true },
+  { 82557, true },
+  { 82567, true },
+  { 82582, true },
+  { 82590, true },
+  { 82605, true },
+  { 82616, true },
+  { 82627, true },
+  { 82636, true },
+  { 82651, true },
+  { 82665, true },
+  { 82688, true },
+  { 82713, true },
+  { 82732, true },
+  { 82746, true },
+  { 82762, true },
+  { 82776, true },
   { 82792, true },
-  { 82811, true },
-  { 82824, true },
-  { 82833, true },
-  { 82848, true },
-  { 82864, true },
-  { 82877, true },
-  { 82889, true },
-  { 82902, true },
-  { 82910, true },
-  { 82922, true },
-  { 82931, true },
-  { 82946, true },
-  { 82955, true },
-  { 82967, true },
-  { 82977, true },
-  { 82992, true },
-  { 83000, true },
-  { 83015, true },
-  { 83026, true },
-  { 83037, true },
-  { 83046, true },
-  { 83061, true },
-  { 83075, true },
-  { 83098, true },
-  { 83123, true },
-  { 83142, true },
-  { 83156, true },
-  { 83172, true },
-  { 83186, true },
+  { 82810, true },
+  { 82827, true },
+  { 82842, true },
+  { 82857, true },
+  { 82866, true },
+  { 82883, true },
+  { 82896, true },
+  { 82906, true },
+  { 82917, true },
+  { 82928, true },
+  { 82938, true },
+  { 82950, true },
+  { 82971, true },
+  { 82985, false },
+  { 83005, false },
+  { 83017, true },
+  { 83030, true },
+  { 83040, true },
+  { 83053, true },
+  { 83066, true },
+  { 83082, true },
+  { 83099, true },
+  { 83111, true },
+  { 83125, true },
+  { 83139, true },
+  { 83155, true },
+  { 83167, true },
+  { 83188, false },
   { 83202, true },
   { 83220, true },
   { 83237, true },
-  { 83252, true },
-  { 83267, true },
-  { 83276, true },
-  { 83293, true },
-  { 83306, true },
-  { 83316, true },
-  { 83327, true },
-  { 83338, true },
-  { 83348, true },
-  { 83360, true },
-  { 83381, true },
-  { 83395, false },
-  { 83415, false },
-  { 83427, true },
-  { 83440, true },
-  { 83450, true },
-  { 83463, true },
-  { 83476, true },
-  { 83492, true },
-  { 83509, true },
-  { 83521, true },
-  { 83535, true },
-  { 83549, true },
+  { 83249, true },
+  { 83265, true },
+  { 83287, true },
+  { 83309, true },
+  { 83328, true },
+  { 83345, true },
+  { 83357, true },
+  { 83370, true },
+  { 83390, true },
+  { 83415, true },
+  { 83428, true },
+  { 83443, true },
+  { 83460, true },
+  { 83480, false },
+  { 83493, true },
+  { 83504, true },
+  { 83520, true },
+  { 83540, true },
   { 83565, true },
-  { 83577, true },
-  { 83598, false },
-  { 83612, true },
-  { 83630, true },
-  { 83647, true },
-  { 83659, true },
-  { 83679, true },
-  { 83695, true },
-  { 83717, true },
-  { 83739, true },
-  { 83758, true },
-  { 83775, true },
-  { 83787, true },
-  { 83800, true },
-  { 83820, true },
-  { 83845, true },
-  { 83858, true },
-  { 83873, true },
-  { 83890, true },
-  { 83910, false },
-  { 83923, true },
-  { 83934, true },
-  { 83950, true },
-  { 83965, true },
-  { 83985, true },
-  { 84010, true },
-  { 84026, true },
-  { 84043, true },
-  { 84054, true },
-  { 84066, true },
-  { 84080, true },
-  { 84096, false },
-  { 84109, true },
-  { 84122, true },
-  { 84134, true },
-  { 84151, true },
-  { 84163, false },
-  { 84172, false },
-  { 84182, true },
-  { 84193, true },
-  { 84206, false },
-  { 84219, true },
-  { 84230, true },
-  { 84244, true },
-  { 84260, true },
-  { 84279, true },
-  { 84292, true },
-  { 84306, true },
-  { 84321, true },
-  { 84331, true },
-  { 84344, true },
-  { 84359, true },
-  { 84378, true },
-  { 84394, true },
-  { 84410, true },
-  { 84427, true },
-  { 84440, true },
-  { 84452, true },
-  { 84465, true },
-  { 84477, true },
-  { 84492, true },
+  { 83581, true },
+  { 83598, true },
+  { 83609, true },
+  { 83621, true },
+  { 83635, true },
+  { 83651, false },
+  { 83664, true },
+  { 83677, true },
+  { 83689, true },
+  { 83706, true },
+  { 83718, false },
+  { 83727, false },
+  { 83737, true },
+  { 83748, true },
+  { 83761, false },
+  { 83774, true },
+  { 83785, true },
+  { 83799, true },
+  { 83815, true },
+  { 83834, true },
+  { 83847, true },
+  { 83870, true },
+  { 83884, true },
+  { 83899, true },
+  { 83909, true },
+  { 83922, true },
+  { 83937, true },
+  { 83953, true },
+  { 83969, true },
+  { 83986, true },
+  { 83999, true },
+  { 84011, true },
+  { 84024, true },
+  { 84036, true },
+  { 84051, true },
+  { 84068, true },
+  { 84077, true },
+  { 84104, true },
+  { 84125, true },
+  { 84142, true },
+  { 84153, false },
+  { 84171, true },
+  { 84186, true },
+  { 84198, true },
+  { 84210, true },
+  { 84222, true },
+  { 84241, true },
+  { 84276, true },
+  { 84299, true },
+  { 84316, true },
+  { 84329, true },
+  { 84346, false },
+  { 84365, true },
+  { 84383, true },
+  { 84414, true },
+  { 84429, true },
+  { 84451, true },
+  { 84463, true },
+  { 84480, true },
+  { 84497, true },
   { 84509, true },
-  { 84518, true },
-  { 84545, true },
-  { 84566, true },
-  { 84583, true },
-  { 84594, false },
-  { 84612, true },
-  { 84627, true },
-  { 84639, true },
-  { 84651, true },
-  { 84663, true },
-  { 84682, true },
-  { 84717, true },
-  { 84740, true },
-  { 84757, true },
-  { 84770, true },
-  { 84787, false },
-  { 84806, true },
-  { 84824, true },
-  { 84855, true },
-  { 84870, true },
-  { 84892, true },
-  { 84904, true },
-  { 84921, true },
-  { 84938, true },
-  { 84950, true },
-  { 84969, true },
-  { 84981, true },
-  { 84996, true },
-  { 85013, true },
-  { 85030, true },
-  { 85046, true },
-  { 85062, true },
+  { 84528, true },
+  { 84540, true },
+  { 84555, true },
+  { 84572, true },
+  { 84589, true },
+  { 84605, true },
+  { 84629, true },
+  { 84654, true },
+  { 84676, true },
+  { 84703, true },
+  { 84721, true },
+  { 84738, true },
+  { 84753, true },
+  { 84771, true },
+  { 84792, true },
+  { 84820, true },
+  { 84844, true },
+  { 84868, true },
+  { 84881, true },
+  { 84894, true },
+  { 84911, true },
+  { 84926, true },
+  { 84951, false },
+  { 84965, true },
+  { 84975, true },
+  { 84994, true },
+  { 85010, true },
+  { 85034, true },
+  { 85049, true },
+  { 85066, true },
+  { 85076, true },
   { 85086, true },
+  { 85098, true },
   { 85111, true },
-  { 85133, true },
-  { 85160, true },
-  { 85178, true },
+  { 85124, true },
+  { 85142, true },
+  { 85155, true },
+  { 85169, true },
+  { 85179, true },
   { 85195, true },
-  { 85210, true },
-  { 85228, true },
-  { 85249, true },
+  { 85208, true },
+  { 85227, true },
+  { 85245, true },
+  { 85259, true },
+  { 85269, true },
   { 85277, true },
-  { 85301, true },
-  { 85325, true },
-  { 85338, true },
-  { 85351, true },
-  { 85368, true },
-  { 85383, true },
-  { 85408, false },
-  { 85422, true },
-  { 85432, true },
-  { 85451, true },
-  { 85467, true },
-  { 85491, true },
-  { 85506, true },
-  { 85523, true },
-  { 85533, true },
-  { 85543, true },
-  { 85555, true },
+  { 85287, true },
+  { 85297, true },
+  { 85309, true },
+  { 85323, false },
+  { 85336, true },
+  { 85344, true },
+  { 85355, true },
+  { 85366, true },
+  { 85374, true },
+  { 85390, true },
+  { 85406, true },
+  { 85413, true },
+  { 85421, true },
+  { 85431, true },
+  { 85443, true },
+  { 85457, true },
+  { 85466, true },
+  { 85482, true },
+  { 85492, false },
+  { 85510, true },
+  { 85522, true },
+  { 85534, false },
+  { 85545, true },
+  { 85558, true },
   { 85568, true },
-  { 85581, true },
-  { 85599, true },
-  { 85612, true },
-  { 85626, true },
+  { 85578, true },
+  { 85588, true },
+  { 85598, true },
+  { 85608, true },
+  { 85627, true },
   { 85636, true },
-  { 85652, true },
-  { 85665, true },
-  { 85684, true },
-  { 85702, true },
+  { 85647, true },
+  { 85656, true },
+  { 85676, true },
+  { 85692, true },
+  { 85700, true },
   { 85716, true },
-  { 85726, true },
-  { 85734, true },
+  { 85733, true },
   { 85744, true },
-  { 85754, true },
-  { 85766, true },
-  { 85780, false },
+  { 85756, true },
+  { 85767, true },
+  { 85782, true },
   { 85793, true },
-  { 85801, true },
+  { 85803, true },
   { 85812, true },
-  { 85823, true },
-  { 85831, true },
-  { 85847, true },
-  { 85863, true },
-  { 85870, true },
-  { 85878, true },
-  { 85888, true },
-  { 85900, true },
-  { 85914, true },
-  { 85923, true },
-  { 85939, true },
-  { 85949, false },
-  { 85967, true },
-  { 85979, true },
-  { 85991, false },
-  { 86002, true },
-  { 86015, true },
-  { 86025, true },
-  { 86035, true },
-  { 86045, true },
-  { 86055, true },
-  { 86065, true },
-  { 86084, true },
-  { 86093, true },
-  { 86104, true },
-  { 86113, true },
-  { 86133, true },
-  { 86149, true },
-  { 86157, true },
-  { 86173, true },
-  { 86190, true },
-  { 86201, true },
-  { 86213, true },
-  { 86224, true },
-  { 86239, true },
-  { 86250, true },
-  { 86260, true },
-  { 86269, true },
-  { 86278, true },
-  { 86296, true },
-  { 86312, true },
-  { 86326, true },
+  { 85821, true },
+  { 85839, true },
+  { 85855, true },
+  { 85869, true },
+  { 85897, true },
+  { 85906, true },
+  { 85921, true },
+  { 85938, true },
+  { 85961, true },
+  { 85980, true },
+  { 85989, true },
+  { 86007, true },
+  { 86022, true },
+  { 86036, true },
+  { 86059, true },
+  { 86081, true },
+  { 86091, true },
+  { 86107, true },
+  { 86123, true },
+  { 86131, true },
+  { 86141, true },
+  { 86153, true },
+  { 86165, true },
+  { 86182, true },
+  { 86199, true },
+  { 86231, true },
+  { 86249, true },
+  { 86263, true },
+  { 86277, true },
+  { 86295, true },
+  { 86314, true },
+  { 86325, true },
+  { 86336, true },
   { 86354, true },
-  { 86363, true },
+  { 86367, true },
   { 86378, true },
-  { 86395, true },
-  { 86418, true },
-  { 86437, true },
-  { 86446, true },
-  { 86464, true },
-  { 86479, true },
-  { 86493, true },
-  { 86516, true },
-  { 86538, true },
-  { 86548, true },
-  { 86564, true },
-  { 86580, true },
-  { 86588, true },
-  { 86598, true },
-  { 86610, true },
-  { 86622, true },
-  { 86639, true },
-  { 86656, true },
-  { 86688, true },
-  { 86706, true },
-  { 86720, true },
-  { 86734, true },
-  { 86752, true },
-  { 86771, true },
-  { 86782, true },
+  { 86388, true },
+  { 86400, true },
+  { 86411, true },
+  { 86422, true },
+  { 86432, true },
+  { 86441, true },
+  { 86458, true },
+  { 86477, true },
+  { 86490, true },
+  { 86503, true },
+  { 86522, true },
+  { 86539, true },
+  { 86571, true },
+  { 86585, true },
+  { 86597, true },
+  { 86621, true },
+  { 86644, true },
+  { 86669, true },
+  { 86682, true },
+  { 86701, true },
+  { 86715, true },
+  { 86728, true },
+  { 86743, false },
+  { 86763, true },
+  { 86776, true },
   { 86793, true },
-  { 86811, true },
-  { 86824, true },
-  { 86835, true },
-  { 86845, true },
-  { 86857, true },
-  { 86868, true },
+  { 86808, true },
+  { 86825, true },
+  { 86834, true },
+  { 86843, true },
+  { 86859, true },
   { 86879, true },
-  { 86889, true },
   { 86898, true },
-  { 86915, true },
-  { 86934, true },
-  { 86947, true },
+  { 86907, true },
+  { 86918, true },
+  { 86927, true },
+  { 86938, true },
+  { 86951, true },
   { 86960, true },
-  { 86979, true },
-  { 87011, true },
-  { 87025, true },
-  { 87037, true },
-  { 87061, true },
-  { 87084, true },
-  { 87109, true },
-  { 87122, true },
-  { 87141, true },
-  { 87155, true },
-  { 87168, true },
-  { 87183, false },
-  { 87203, true },
-  { 87216, true },
-  { 87233, true },
-  { 87248, true },
-  { 87265, true },
-  { 87274, true },
-  { 87283, true },
-  { 87299, true },
-  { 87319, true },
-  { 87338, true },
-  { 87347, true },
-  { 87358, true },
-  { 87367, true },
-  { 87378, true },
+  { 86973, true },
+  { 86983, true },
+  { 86996, true },
+  { 87009, true },
+  { 87020, true },
+  { 87031, true },
+  { 87040, true },
+  { 87054, true },
+  { 87071, true },
+  { 87088, true },
+  { 87097, true },
+  { 87112, true },
+  { 87127, true },
+  { 87146, true },
+  { 87158, true },
+  { 87171, true },
+  { 87184, true },
+  { 87193, true },
+  { 87207, true },
+  { 87230, true },
+  { 87242, true },
+  { 87253, true },
+  { 87270, true },
+  { 87284, true },
+  { 87301, true },
+  { 87322, true },
+  { 87333, true },
+  { 87344, true },
+  { 87351, true },
+  { 87362, true },
+  { 87369, true },
+  { 87379, true },
   { 87391, true },
-  { 87400, true },
-  { 87413, true },
+  { 87401, true },
+  { 87410, true },
   { 87423, true },
-  { 87436, true },
-  { 87449, true },
-  { 87460, true },
-  { 87471, true },
+  { 87435, true },
+  { 87452, true },
+  { 87466, true },
   { 87480, true },
+  { 87487, true },
   { 87494, true },
-  { 87511, true },
+  { 87501, true },
+  { 87510, true },
+  { 87518, true },
   { 87528, true },
-  { 87537, true },
-  { 87552, true },
-  { 87567, true },
-  { 87586, true },
-  { 87598, true },
-  { 87611, true },
-  { 87624, true },
-  { 87633, true },
-  { 87647, true },
-  { 87670, true },
-  { 87682, true },
-  { 87693, true },
-  { 87710, true },
-  { 87724, true },
-  { 87741, true },
-  { 87762, true },
-  { 87773, true },
+  { 87546, true },
+  { 87560, true },
+  { 87572, true },
+  { 87583, true },
+  { 87594, true },
+  { 87605, true },
+  { 87618, true },
+  { 87629, true },
+  { 87638, true },
+  { 87655, true },
+  { 87666, true },
+  { 87673, true },
+  { 87680, true },
+  { 87694, true },
+  { 87702, true },
+  { 87709, true },
+  { 87720, true },
+  { 87733, true },
+  { 87746, true },
+  { 87756, true },
+  { 87769, true },
   { 87784, true },
-  { 87791, true },
-  { 87802, true },
-  { 87809, true },
-  { 87819, true },
-  { 87831, true },
-  { 87841, true },
-  { 87850, true },
-  { 87863, true },
-  { 87875, true },
-  { 87892, true },
-  { 87906, true },
-  { 87920, true },
-  { 87927, true },
-  { 87934, true },
-  { 87941, true },
-  { 87950, true },
-  { 87958, true },
-  { 87968, true },
-  { 87986, true },
-  { 88000, true },
+  { 87797, true },
+  { 87806, true },
+  { 87825, false },
+  { 87837, true },
+  { 87851, true },
+  { 87864, true },
+  { 87879, true },
+  { 87898, true },
+  { 87911, true },
+  { 87926, true },
+  { 87939, true },
+  { 87949, true },
+  { 87962, true },
+  { 87979, true },
+  { 87993, false },
   { 88012, true },
-  { 88023, true },
-  { 88034, true },
-  { 88045, true },
-  { 88058, true },
-  { 88069, true },
-  { 88078, true },
-  { 88095, true },
-  { 88106, true },
-  { 88113, true },
-  { 88120, true },
-  { 88134, true },
-  { 88142, true },
+  { 88027, true },
+  { 88041, true },
+  { 88057, true },
+  { 88073, true },
+  { 88093, true },
+  { 88102, true },
+  { 88118, true },
+  { 88133, true },
   { 88149, true },
-  { 88160, true },
-  { 88173, true },
-  { 88186, true },
-  { 88196, true },
-  { 88209, true },
-  { 88224, true },
-  { 88237, true },
-  { 88246, true },
-  { 88265, false },
-  { 88277, true },
+  { 88169, true },
+  { 88188, true },
+  { 88205, true },
+  { 88221, true },
+  { 88241, true },
+  { 88254, true },
+  { 88268, false },
+  { 88281, true },
   { 88291, true },
-  { 88304, true },
-  { 88319, true },
-  { 88338, true },
-  { 88351, true },
-  { 88366, true },
+  { 88307, true },
+  { 88324, true },
+  { 88339, true },
+  { 88362, true },
   { 88379, true },
-  { 88389, true },
-  { 88402, true },
-  { 88419, true },
-  { 88433, false },
-  { 88452, true },
-  { 88467, true },
-  { 88481, true },
-  { 88497, true },
-  { 88513, true },
-  { 88533, true },
-  { 88542, true },
-  { 88558, true },
-  { 88573, true },
-  { 88589, true },
+  { 88394, true },
+  { 88411, true },
+  { 88425, true },
+  { 88440, true },
+  { 88449, true },
+  { 88464, true },
+  { 88478, true },
+  { 88488, true },
+  { 88503, true },
+  { 88517, true },
+  { 88530, true },
+  { 88541, true },
+  { 88555, true },
+  { 88565, true },
+  { 88577, true },
+  { 88595, true },
   { 88609, true },
-  { 88628, true },
-  { 88645, true },
-  { 88661, true },
-  { 88681, true },
-  { 88694, true },
-  { 88708, false },
-  { 88721, true },
-  { 88731, true },
-  { 88747, true },
+  { 88621, true },
+  { 88640, false },
+  { 88655, true },
+  { 88674, true },
+  { 88685, true },
+  { 88697, true },
+  { 88715, true },
+  { 88728, true },
+  { 88745, true },
   { 88764, true },
-  { 88779, true },
-  { 88802, true },
-  { 88815, true },
-  { 88832, true },
-  { 88847, true },
-  { 88864, true },
-  { 88878, true },
-  { 88893, true },
-  { 88902, true },
-  { 88917, true },
-  { 88935, true },
-  { 88949, true },
+  { 88781, true },
+  { 88799, true },
+  { 88821, true },
+  { 88840, true },
+  { 88853, true },
+  { 88869, true },
+  { 88884, true },
+  { 88892, true },
+  { 88906, true },
+  { 88920, true },
+  { 88931, true },
+  { 88941, true },
   { 88959, true },
-  { 88974, true },
-  { 88988, true },
-  { 89001, true },
-  { 89012, true },
-  { 89026, true },
-  { 89036, true },
-  { 89048, true },
-  { 89066, true },
+  { 88977, true },
+  { 88990, true },
+  { 88998, true },
+  { 89010, true },
+  { 89021, true },
+  { 89031, true },
+  { 89039, true },
+  { 89055, true },
+  { 89071, true },
   { 89080, true },
-  { 89092, false },
-  { 89107, true },
-  { 89126, true },
-  { 89137, true },
-  { 89149, true },
-  { 89167, true },
-  { 89180, true },
-  { 89197, true },
-  { 89216, true },
-  { 89233, true },
-  { 89251, true },
-  { 89273, true },
+  { 89092, true },
+  { 89105, true },
+  { 89119, true },
+  { 89138, true },
+  { 89152, true },
+  { 89165, true },
+  { 89181, false },
+  { 89198, true },
+  { 89219, true },
+  { 89238, true },
+  { 89257, true },
+  { 89276, false },
   { 89292, true },
-  { 89305, true },
-  { 89321, true },
+  { 89307, true },
+  { 89317, true },
+  { 89327, true },
   { 89336, true },
-  { 89344, true },
-  { 89358, true },
-  { 89372, true },
-  { 89383, true },
-  { 89393, true },
-  { 89411, true },
-  { 89429, true },
-  { 89442, true },
+  { 89349, true },
+  { 89359, false },
+  { 89377, true },
+  { 89399, true },
+  { 89416, true },
+  { 89432, false },
   { 89450, true },
-  { 89462, true },
-  { 89473, true },
-  { 89485, true },
+  { 89461, true },
+  { 89477, true },
   { 89495, true },
-  { 89503, true },
-  { 89519, true },
-  { 89535, true },
-  { 89544, true },
-  { 89556, true },
-  { 89569, true },
-  { 89583, true },
-  { 89602, true },
-  { 89616, true },
-  { 89629, true },
-  { 89645, false },
-  { 89662, true },
-  { 89683, true },
-  { 89702, true },
-  { 89721, true },
-  { 89740, false },
-  { 89756, true },
-  { 89771, true },
+  { 89510, false },
+  { 89524, true },
+  { 89541, true },
+  { 89559, true },
+  { 89578, true },
+  { 89589, true },
+  { 89605, true },
+  { 89622, true },
+  { 89638, true },
+  { 89656, true },
+  { 89673, true },
+  { 89695, false },
+  { 89712, true },
+  { 89728, true },
+  { 89742, true },
+  { 89754, true },
+  { 89769, true },
   { 89781, true },
-  { 89791, true },
-  { 89800, true },
-  { 89813, true },
-  { 89823, false },
-  { 89841, true },
-  { 89863, true },
-  { 89880, true },
-  { 89896, false },
-  { 89914, true },
-  { 89930, true },
-  { 89948, true },
+  { 89789, true },
+  { 89802, true },
+  { 89817, true },
+  { 89832, true },
+  { 89842, true },
+  { 89851, true },
+  { 89861, true },
+  { 89871, true },
+  { 89885, false },
+  { 89898, true },
+  { 89906, true },
+  { 89915, true },
+  { 89924, true },
+  { 89934, true },
+  { 89943, true },
   { 89963, false },
-  { 89977, true },
-  { 89994, true },
-  { 90012, true },
-  { 90031, true },
-  { 90042, true },
-  { 90058, true },
-  { 90075, true },
-  { 90091, true },
-  { 90109, true },
-  { 90126, true },
-  { 90148, false },
-  { 90165, true },
-  { 90181, true },
-  { 90195, true },
-  { 90207, true },
-  { 90222, true },
-  { 90234, true },
-  { 90242, true },
-  { 90255, true },
-  { 90270, true },
-  { 90285, true },
-  { 90295, true },
-  { 90304, true },
-  { 90314, true },
-  { 90324, true },
-  { 90338, false },
-  { 90351, true },
-  { 90359, true },
-  { 90368, true },
-  { 90377, true },
-  { 90387, true },
-  { 90396, true },
-  { 90416, false },
-  { 90426, true },
-  { 90442, true },
-  { 90455, true },
-  { 90468, true },
-  { 90475, true },
-  { 90491, true },
-  { 90504, true },
-  { 90517, true },
-  { 90530, true },
-  { 90545, true },
-  { 90557, true },
-  { 90564, true },
-  { 90571, true },
+  { 89973, true },
+  { 89989, true },
+  { 90002, true },
+  { 90015, true },
+  { 90022, true },
+  { 90038, true },
+  { 90051, true },
+  { 90064, true },
+  { 90077, true },
+  { 90092, true },
+  { 90104, true },
+  { 90111, true },
+  { 90118, true },
+  { 90127, true },
+  { 90136, true },
+  { 90145, true },
+  { 90156, true },
+  { 90170, true },
+  { 90183, true },
+  { 90191, true },
+  { 90203, true },
+  { 90217, true },
+  { 90228, true },
+  { 90244, true },
+  { 90258, true },
+  { 90273, true },
+  { 90283, false },
+  { 90297, true },
+  { 90307, true },
+  { 90322, false },
+  { 90338, true },
+  { 90357, true },
+  { 90369, true },
+  { 90382, true },
+  { 90406, false },
+  { 90419, true },
+  { 90435, true },
+  { 90449, true },
+  { 90466, true },
+  { 90483, true },
+  { 90493, true },
+  { 90508, true },
+  { 90522, true },
+  { 90535, true },
+  { 90550, true },
+  { 90566, true },
   { 90580, true },
-  { 90589, true },
-  { 90598, true },
+  { 90595, true },
   { 90609, true },
-  { 90623, true },
-  { 90636, true },
-  { 90644, true },
-  { 90656, true },
-  { 90670, true },
-  { 90681, true },
-  { 90697, true },
-  { 90711, true },
-  { 90726, true },
-  { 90736, false },
-  { 90750, true },
-  { 90760, true },
-  { 90775, false },
-  { 90791, true },
-  { 90810, true },
-  { 90822, true },
-  { 90835, true },
-  { 90859, false },
-  { 90872, true },
-  { 90888, true },
-  { 90902, true },
-  { 90919, true },
-  { 90936, true },
-  { 90946, true },
-  { 90961, true },
-  { 90975, true },
-  { 90988, true },
-  { 91003, true },
-  { 91019, true },
-  { 91033, true },
-  { 91048, true },
-  { 91062, true },
-  { 91077, true },
-  { 91096, true },
-  { 91111, true },
+  { 90624, true },
+  { 90643, true },
+  { 90658, true },
+  { 90673, true },
+  { 90691, true },
+  { 90710, true },
+  { 90723, true },
+  { 90736, true },
+  { 90759, true },
+  { 90775, true },
+  { 90786, true },
+  { 90799, true },
+  { 90814, true },
+  { 90829, true },
+  { 90845, true },
+  { 90860, true },
+  { 90876, true },
+  { 90893, true },
+  { 90905, true },
+  { 90915, true },
+  { 90933, true },
+  { 90943, true },
+  { 90954, true },
+  { 90964, true },
+  { 90977, true },
+  { 91005, true },
+  { 91016, true },
+  { 91027, true },
+  { 91038, true },
+  { 91055, true },
+  { 91069, false },
+  { 91086, true },
+  { 91100, true },
+  { 91109, true },
   { 91126, true },
-  { 91144, true },
-  { 91163, true },
-  { 91176, true },
-  { 91189, true },
-  { 91212, true },
-  { 91228, true },
-  { 91239, true },
-  { 91252, true },
-  { 91267, true },
-  { 91282, true },
-  { 91298, true },
-  { 91313, true },
-  { 91329, true },
-  { 91346, true },
-  { 91358, true },
+  { 91143, true },
+  { 91155, true },
+  { 91169, true },
+  { 91181, true },
+  { 91197, true },
+  { 91223, true },
+  { 91233, true },
+  { 91246, true },
+  { 91256, true },
+  { 91269, true },
+  { 91277, true },
+  { 91288, true },
+  { 91303, true },
+  { 91321, true },
+  { 91337, true },
+  { 91351, true },
   { 91368, true },
-  { 91386, true },
-  { 91396, true },
-  { 91407, true },
-  { 91417, true },
-  { 91430, true },
-  { 91458, true },
-  { 91469, true },
-  { 91480, true },
-  { 91491, true },
-  { 91508, true },
-  { 91522, true },
+  { 91388, true },
+  { 91398, true },
+  { 91414, true },
+  { 91427, true },
+  { 91437, false },
+  { 91451, true },
+  { 91462, true },
+  { 91478, true },
+  { 91486, true },
+  { 91501, true },
+  { 91517, true },
   { 91536, true },
-  { 91545, true },
-  { 91562, true },
-  { 91579, true },
-  { 91591, true },
-  { 91605, true },
-  { 91617, true },
-  { 91633, true },
-  { 91659, true },
-  { 91669, true },
-  { 91682, true },
+  { 91549, true },
+  { 91569, true },
+  { 91584, true },
+  { 91602, true },
+  { 91615, true },
+  { 91625, true },
+  { 91642, true },
+  { 91657, true },
+  { 91668, true },
+  { 91679, true },
   { 91692, true },
-  { 91705, true },
-  { 91713, true },
-  { 91724, true },
-  { 91739, true },
-  { 91757, true },
-  { 91773, true },
-  { 91787, true },
-  { 91804, true },
+  { 91700, true },
+  { 91709, true },
+  { 91720, true },
+  { 91743, true },
+  { 91756, true },
+  { 91767, true },
+  { 91781, true },
+  { 91809, true },
   { 91824, true },
-  { 91834, true },
-  { 91850, true },
+  { 91848, true },
   { 91863, true },
-  { 91873, false },
-  { 91887, true },
-  { 91898, true },
-  { 91914, true },
-  { 91922, true },
-  { 91937, true },
-  { 91953, true },
-  { 91972, true },
-  { 91985, true },
-  { 92005, true },
-  { 92020, true },
-  { 92038, true },
-  { 92051, true },
-  { 92061, true },
-  { 92078, true },
-  { 92093, true },
-  { 92104, true },
-  { 92115, true },
+  { 91883, true },
+  { 91896, true },
+  { 91911, true },
+  { 91924, true },
+  { 91938, true },
+  { 91949, true },
+  { 91960, true },
+  { 91974, true },
+  { 91986, true },
+  { 92003, true },
+  { 92016, true },
+  { 92031, true },
+  { 92039, true },
+  { 92059, true },
+  { 92070, true },
+  { 92080, true },
+  { 92091, true },
+  { 92101, true },
+  { 92113, true },
   { 92128, true },
-  { 92136, true },
-  { 92147, true },
-  { 92170, true },
-  { 92183, true },
-  { 92194, true },
-  { 92208, true },
-  { 92236, true },
-  { 92251, true },
-  { 92275, true },
-  { 92290, true },
-  { 92310, true },
-  { 92323, true },
-  { 92338, true },
-  { 92351, true },
-  { 92365, true },
-  { 92376, true },
-  { 92387, true },
-  { 92401, true },
+  { 92137, true },
+  { 92151, true },
+  { 92164, true },
+  { 92174, true },
+  { 92189, true },
+  { 92203, true },
+  { 92214, true },
+  { 92229, false },
+  { 92239, true },
+  { 92258, true },
+  { 92271, true },
+  { 92280, true },
+  { 92291, true },
+  { 92305, true },
+  { 92325, true },
+  { 92341, true },
+  { 92352, true },
+  { 92368, true },
+  { 92385, true },
+  { 92400, true },
   { 92413, true },
   { 92430, true },
-  { 92443, true },
+  { 92440, true },
+  { 92450, true },
   { 92458, true },
-  { 92466, true },
-  { 92486, true },
-  { 92497, true },
-  { 92507, true },
-  { 92517, true },
+  { 92469, true },
+  { 92479, true },
+  { 92492, true },
+  { 92506, true },
+  { 92518, true },
   { 92528, true },
-  { 92538, true },
-  { 92550, true },
-  { 92565, true },
-  { 92574, true },
-  { 92588, true },
-  { 92601, true },
-  { 92611, true },
+  { 92536, true },
+  { 92555, true },
+  { 92575, true },
+  { 92584, true },
+  { 92598, true },
+  { 92612, true },
   { 92626, true },
-  { 92640, true },
-  { 92651, true },
-  { 92666, false },
-  { 92676, true },
-  { 92695, true },
-  { 92708, true },
+  { 92668, true },
+  { 92684, true },
+  { 92693, true },
+  { 92705, true },
   { 92717, true },
-  { 92728, true },
-  { 92742, true },
-  { 92762, true },
-  { 92778, true },
-  { 92789, true },
-  { 92805, true },
-  { 92822, true },
-  { 92837, true },
-  { 92850, true },
-  { 92867, true },
-  { 92877, true },
-  { 92887, true },
-  { 92895, true },
-  { 92906, true },
-  { 92916, true },
-  { 92929, true },
-  { 92943, true },
-  { 92955, true },
-  { 92965, true },
-  { 92973, true },
-  { 92992, true },
-  { 93012, true },
-  { 93021, true },
-  { 93035, true },
-  { 93049, true },
-  { 93063, true },
+  { 92730, true },
+  { 92743, true },
+  { 92761, true },
+  { 92769, true },
+  { 92782, true },
+  { 92792, true },
+  { 92804, true },
+  { 92815, true },
+  { 92832, true },
+  { 92847, true },
+  { 92859, true },
+  { 92872, true },
+  { 92884, true },
+  { 92899, true },
+  { 92912, true },
+  { 92924, true },
+  { 92934, true },
+  { 92952, true },
+  { 92967, true },
+  { 92981, true },
+  { 92999, true },
+  { 93017, true },
+  { 93029, true },
+  { 93047, true },
+  { 93058, true },
+  { 93072, true },
+  { 93092, true },
   { 93105, true },
-  { 93121, true },
-  { 93130, true },
-  { 93142, true },
-  { 93154, true },
-  { 93167, true },
-  { 93180, true },
-  { 93198, true },
-  { 93206, true },
-  { 93219, true },
-  { 93229, true },
-  { 93241, true },
-  { 93252, true },
-  { 93269, true },
-  { 93284, true },
-  { 93296, true },
-  { 93309, true },
-  { 93321, true },
-  { 93336, true },
-  { 93349, true },
-  { 93361, true },
-  { 93371, true },
-  { 93389, true },
-  { 93404, true },
-  { 93418, true },
-  { 93436, true },
-  { 93454, true },
-  { 93466, true },
-  { 93484, true },
-  { 93495, true },
-  { 93509, true },
-  { 93529, true },
+  { 93117, true },
+  { 93137, true },
+  { 93148, true },
+  { 93157, true },
+  { 93166, true },
+  { 93173, true },
+  { 93188, true },
+  { 93203, true },
+  { 93217, true },
+  { 93236, true },
+  { 93247, true },
+  { 93261, true },
+  { 93273, true },
+  { 93286, true },
+  { 93299, true },
+  { 93310, true },
+  { 93323, true },
+  { 93335, true },
+  { 93358, true },
+  { 93367, true },
+  { 93384, true },
+  { 93397, true },
+  { 93409, true },
+  { 93420, true },
+  { 93435, true },
+  { 93449, true },
+  { 93457, true },
+  { 93471, true },
+  { 93485, true },
+  { 93493, true },
+  { 93506, true },
+  { 93517, true },
+  { 93529, false },
   { 93542, true },
-  { 93554, true },
-  { 93574, true },
+  { 93553, true },
+  { 93577, true },
   { 93585, true },
-  { 93594, true },
-  { 93603, true },
-  { 93610, true },
-  { 93625, true },
+  { 93595, true },
+  { 93605, true },
+  { 93622, true },
   { 93640, true },
-  { 93654, true },
-  { 93673, true },
-  { 93684, true },
-  { 93698, true },
-  { 93710, true },
-  { 93723, true },
-  { 93736, true },
-  { 93747, true },
-  { 93760, true },
-  { 93772, true },
-  { 93795, true },
-  { 93804, true },
-  { 93821, true },
-  { 93834, true },
-  { 93846, true },
-  { 93857, true },
-  { 93872, true },
+  { 93658, true },
+  { 93672, true },
+  { 93682, true },
+  { 93706, true },
+  { 93720, true },
+  { 93739, true },
+  { 93751, true },
+  { 93770, true },
+  { 93787, true },
+  { 93797, true },
+  { 93812, true },
+  { 93824, true },
+  { 93836, true },
+  { 93849, true },
+  { 93858, true },
+  { 93867, true },
   { 93886, true },
-  { 93894, true },
-  { 93908, true },
-  { 93922, true },
-  { 93930, true },
-  { 93943, true },
-  { 93954, true },
-  { 93966, false },
+  { 93898, true },
+  { 93926, true },
+  { 93953, true },
   { 93979, true },
-  { 93990, true },
+  { 94004, true },
   { 94014, true },
-  { 94022, true },
-  { 94032, true },
-  { 94042, true },
-  { 94059, true },
-  { 94077, true },
-  { 94095, true },
-  { 94109, true },
-  { 94119, true },
-  { 94143, true },
-  { 94157, true },
-  { 94176, true },
-  { 94188, true },
+  { 94023, true },
+  { 94038, true },
+  { 94053, true },
+  { 94071, true },
+  { 94082, true },
+  { 94094, true },
+  { 94110, true },
+  { 94124, true },
+  { 94139, true },
+  { 94155, true },
+  { 94181, true },
+  { 94192, true },
   { 94207, true },
-  { 94224, true },
-  { 94234, true },
-  { 94249, true },
-  { 94261, true },
-  { 94273, true },
-  { 94286, true },
-  { 94295, true },
-  { 94304, true },
-  { 94323, true },
+  { 94222, true },
+  { 94237, true },
+  { 94255, true },
+  { 94270, true },
+  { 94283, true },
+  { 94299, true },
+  { 94322, true },
   { 94335, true },
-  { 94363, true },
-  { 94390, true },
-  { 94416, true },
+  { 94348, true },
+  { 94361, true },
+  { 94380, true },
+  { 94395, true },
+  { 94407, false },
+  { 94426, true },
   { 94441, true },
-  { 94451, true },
-  { 94460, true },
-  { 94475, true },
-  { 94490, true },
-  { 94508, true },
-  { 94519, true },
-  { 94531, true },
-  { 94547, true },
-  { 94561, true },
-  { 94576, true },
-  { 94602, true },
-  { 94613, true },
-  { 94628, true },
-  { 94643, true },
+  { 94459, true },
+  { 94470, true },
+  { 94482, true },
+  { 94493, true },
+  { 94506, true },
+  { 94529, true },
+  { 94544, true },
+  { 94558, true },
+  { 94575, false },
+  { 94589, true },
+  { 94600, true },
+  { 94616, true },
+  { 94629, true },
+  { 94639, true },
+  { 94650, true },
   { 94658, true },
-  { 94676, true },
-  { 94691, true },
-  { 94704, true },
-  { 94720, true },
-  { 94743, true },
-  { 94756, true },
-  { 94769, true },
-  { 94782, true },
-  { 94801, true },
-  { 94816, true },
-  { 94830, true },
-  { 94842, false },
-  { 94861, true },
-  { 94876, true },
-  { 94894, true },
-  { 94905, true },
-  { 94917, true },
-  { 94928, true },
-  { 94941, true },
-  { 94964, true },
-  { 94979, true },
-  { 94993, true },
-  { 95010, false },
-  { 95024, true },
-  { 95035, true },
-  { 95051, true },
-  { 95064, true },
-  { 95074, true },
-  { 95085, true },
-  { 95093, true },
-  { 95110, true },
+  { 94675, true },
+  { 94690, true },
+  { 94700, true },
+  { 94710, true },
+  { 94721, true },
+  { 94732, true },
+  { 94752, true },
+  { 94767, true },
+  { 94784, true },
+  { 94798, true },
+  { 94808, true },
+  { 94827, true },
+  { 94838, true },
+  { 94860, true },
+  { 94874, true },
+  { 94885, false },
+  { 94898, true },
+  { 94908, true },
+  { 94926, true },
+  { 94943, true },
+  { 94957, true },
+  { 94969, true },
+  { 94985, true },
+  { 94996, true },
+  { 95006, true },
+  { 95026, true },
+  { 95053, true },
+  { 95069, true },
+  { 95084, true },
+  { 95097, true },
+  { 95109, true },
   { 95125, true },
-  { 95135, true },
-  { 95145, true },
-  { 95156, true },
-  { 95167, true },
-  { 95187, true },
-  { 95202, true },
-  { 95219, true },
-  { 95233, true },
-  { 95243, true },
-  { 95262, true },
-  { 95273, true },
-  { 95295, true },
+  { 95137, true },
+  { 95154, true },
+  { 95164, true },
+  { 95181, true },
+  { 95198, true },
+  { 95210, true },
+  { 95223, false },
+  { 95237, true },
+  { 95260, false },
+  { 95274, true },
+  { 95286, true },
+  { 95297, true },
   { 95309, true },
-  { 95320, false },
-  { 95333, true },
-  { 95343, true },
-  { 95361, true },
-  { 95378, true },
-  { 95392, true },
-  { 95404, true },
-  { 95420, true },
-  { 95431, true },
-  { 95441, true },
+  { 95327, true },
+  { 95340, true },
+  { 95355, true },
+  { 95373, true },
+  { 95383, true },
+  { 95395, true },
+  { 95405, true },
+  { 95414, true },
+  { 95426, true },
+  { 95440, true },
   { 95461, true },
-  { 95488, true },
-  { 95504, true },
-  { 95519, true },
-  { 95532, true },
-  { 95544, true },
-  { 95560, true },
-  { 95572, true },
-  { 95589, true },
-  { 95599, true },
-  { 95616, true },
-  { 95633, true },
-  { 95645, true },
-  { 95658, false },
-  { 95672, true },
-  { 95695, false },
-  { 95709, true },
-  { 95721, true },
+  { 95475, true },
+  { 95489, true },
+  { 95507, true },
+  { 95525, true },
+  { 95537, true },
+  { 95549, true },
+  { 95557, true },
+  { 95571, true },
+  { 95586, true },
+  { 95601, true },
+  { 95615, true },
+  { 95624, true },
+  { 95634, true },
+  { 95646, true },
+  { 95661, true },
+  { 95673, true },
+  { 95696, true },
+  { 95704, true },
+  { 95715, true },
+  { 95724, true },
   { 95732, true },
-  { 95744, true },
-  { 95762, true },
-  { 95775, true },
-  { 95790, true },
-  { 95808, true },
-  { 95818, true },
+  { 95745, true },
+  { 95768, true },
+  { 95780, true },
+  { 95796, true },
+  { 95819, true },
   { 95830, true },
-  { 95840, true },
-  { 95849, true },
-  { 95861, true },
-  { 95875, true },
-  { 95896, true },
-  { 95910, true },
-  { 95924, true },
-  { 95942, true },
+  { 95846, true },
+  { 95862, true },
+  { 95877, true },
+  { 95890, true },
+  { 95900, true },
+  { 95907, true },
+  { 95920, true },
+  { 95943, true },
   { 95960, true },
-  { 95972, true },
-  { 95984, true },
-  { 95992, true },
-  { 96006, true },
-  { 96021, true },
-  { 96036, true },
-  { 96050, true },
-  { 96059, true },
+  { 95978, true },
+  { 96007, true },
+  { 96024, true },
+  { 96034, true },
+  { 96048, true },
+  { 96060, true },
   { 96069, true },
-  { 96081, true },
-  { 96096, true },
-  { 96108, true },
+  { 96085, true },
+  { 96100, true },
+  { 96113, true },
   { 96131, true },
-  { 96139, true },
-  { 96150, true },
+  { 96149, true },
   { 96159, true },
   { 96167, true },
-  { 96180, true },
-  { 96203, true },
-  { 96215, true },
-  { 96231, true },
-  { 96254, true },
-  { 96265, true },
-  { 96281, true },
+  { 96177, true },
+  { 96187, true },
+  { 96195, true },
+  { 96207, true },
+  { 96221, true },
+  { 96239, true },
+  { 96248, true },
+  { 96259, true },
+  { 96274, true },
   { 96297, true },
-  { 96312, true },
-  { 96325, true },
-  { 96335, true },
-  { 96342, true },
-  { 96355, true },
-  { 96378, true },
-  { 96395, true },
-  { 96413, true },
-  { 96442, true },
-  { 96459, true },
-  { 96469, true },
+  { 96305, true },
+  { 96320, true },
+  { 96338, true },
+  { 96350, true },
+  { 96360, true },
+  { 96371, true },
+  { 96383, true },
+  { 96394, false },
+  { 96410, false },
+  { 96431, true },
+  { 96448, true },
+  { 96466, true },
   { 96483, true },
-  { 96495, true },
-  { 96504, true },
-  { 96520, true },
+  { 96500, true },
+  { 96514, true },
+  { 96522, true },
   { 96535, true },
-  { 96548, true },
-  { 96566, true },
-  { 96584, true },
-  { 96594, true },
-  { 96602, true },
-  { 96612, true },
-  { 96622, true },
-  { 96630, true },
-  { 96642, true },
-  { 96656, true },
-  { 96674, true },
-  { 96683, true },
-  { 96694, true },
-  { 96709, true },
-  { 96732, true },
-  { 96740, true },
-  { 96755, true },
-  { 96773, true },
-  { 96785, true },
-  { 96795, true },
-  { 96806, true },
-  { 96818, true },
-  { 96829, false },
-  { 96845, false },
-  { 96866, true },
-  { 96883, true },
-  { 96901, true },
-  { 96918, true },
-  { 96935, true },
-  { 96949, true },
+  { 96553, true },
+  { 96580, true },
+  { 96604, true },
+  { 96621, true },
+  { 96636, true },
+  { 96652, true },
+  { 96666, true },
+  { 96678, true },
+  { 96689, true },
+  { 96700, true },
+  { 96710, true },
+  { 96721, false },
+  { 96742, true },
+  { 96753, true },
+  { 96767, true },
+  { 96779, true },
+  { 96793, true },
+  { 96811, true },
+  { 96825, true },
+  { 96836, true },
+  { 96853, true },
+  { 96864, true },
+  { 96874, true },
+  { 96894, true },
+  { 96905, true },
+  { 96919, true },
+  { 96933, true },
+  { 96946, true },
   { 96957, true },
-  { 96970, true },
-  { 96988, true },
-  { 97015, true },
-  { 97039, true },
-  { 97056, true },
-  { 97071, true },
+  { 96976, true },
+  { 96989, true },
+  { 97003, true },
+  { 97011, true },
+  { 97025, true },
+  { 97038, true },
+  { 97050, true },
+  { 97063, true },
+  { 97075, true },
   { 97087, true },
-  { 97101, true },
-  { 97113, true },
-  { 97124, true },
-  { 97135, true },
-  { 97145, true },
-  { 97156, false },
-  { 97177, true },
-  { 97188, true },
-  { 97202, true },
-  { 97214, true },
-  { 97228, true },
-  { 97246, true },
-  { 97260, true },
-  { 97271, true },
-  { 97288, true },
-  { 97299, true },
-  { 97309, true },
-  { 97329, true },
-  { 97340, true },
-  { 97354, true },
+  { 97102, true },
+  { 97112, true },
+  { 97127, true },
+  { 97141, true },
+  { 97154, true },
+  { 97164, false },
+  { 97175, true },
+  { 97185, true },
+  { 97196, true },
+  { 97207, true },
+  { 97218, true },
+  { 97231, true },
+  { 97243, true },
+  { 97255, true },
+  { 97265, true },
+  { 97273, true },
+  { 97295, true },
+  { 97307, true },
+  { 97316, true },
+  { 97325, true },
+  { 97337, true },
+  { 97347, true },
+  { 97358, true },
   { 97368, true },
-  { 97381, true },
+  { 97381, false },
   { 97392, true },
-  { 97411, true },
-  { 97424, true },
-  { 97438, true },
-  { 97446, true },
-  { 97460, true },
-  { 97473, true },
-  { 97485, true },
+  { 97405, true },
+  { 97430, true },
+  { 97442, true },
+  { 97451, true },
+  { 97468, true },
+  { 97486, true },
   { 97498, true },
-  { 97510, true },
-  { 97522, true },
-  { 97537, true },
-  { 97547, true },
+  { 97506, true },
+  { 97525, true },
+  { 97538, true },
+  { 97552, true },
   { 97562, true },
-  { 97576, true },
-  { 97589, true },
-  { 97599, false },
-  { 97610, true },
-  { 97620, true },
-  { 97631, true },
-  { 97642, true },
-  { 97653, true },
-  { 97666, true },
-  { 97678, true },
-  { 97690, true },
-  { 97700, true },
-  { 97708, true },
-  { 97720, true },
-  { 97729, true },
-  { 97738, true },
-  { 97750, true },
-  { 97762, true },
-  { 97772, true },
-  { 97783, true },
-  { 97793, true },
-  { 97806, false },
-  { 97817, true },
-  { 97830, true },
-  { 97855, true },
-  { 97867, true },
-  { 97876, true },
-  { 97893, true },
+  { 97574, true },
+  { 97598, true },
+  { 97612, true },
+  { 97630, true },
+  { 97648, true },
+  { 97662, true },
+  { 97680, true },
+  { 97699, true },
+  { 97709, true },
+  { 97723, true },
+  { 97736, true },
+  { 97746, true },
+  { 97759, true },
+  { 97768, true },
+  { 97779, true },
+  { 97791, true },
+  { 97804, true },
+  { 97814, true },
+  { 97822, true },
+  { 97834, true },
+  { 97846, true },
+  { 97861, true },
+  { 97869, true },
+  { 97881, true },
+  { 97896, true },
+  { 97905, true },
   { 97911, true },
   { 97923, true },
-  { 97931, true },
-  { 97950, true },
-  { 97963, true },
-  { 97977, true },
-  { 97987, true },
-  { 97999, true },
-  { 98023, true },
-  { 98037, true },
-  { 98055, true },
-  { 98073, true },
-  { 98091, true },
-  { 98110, true },
-  { 98120, true },
-  { 98134, true },
-  { 98147, true },
-  { 98157, true },
-  { 98170, true },
-  { 98179, true },
-  { 98190, true },
-  { 98202, true },
-  { 98215, true },
-  { 98225, true },
-  { 98233, true },
-  { 98245, true },
+  { 97933, true },
+  { 97942, false },
+  { 97957, true },
+  { 97975, true },
+  { 97988, true },
+  { 98002, true },
+  { 98014, true },
+  { 98028, true },
+  { 98041, true },
+  { 98052, true },
+  { 98061, true },
+  { 98071, true },
+  { 98084, true },
+  { 98092, true },
+  { 98105, true },
+  { 98117, true },
+  { 98130, true },
+  { 98150, true },
+  { 98169, true },
+  { 98186, true },
+  { 98198, true },
+  { 98213, true },
+  { 98226, true },
+  { 98238, true },
   { 98257, true },
-  { 98272, true },
-  { 98280, true },
-  { 98292, true },
-  { 98307, true },
-  { 98316, true },
-  { 98322, true },
-  { 98334, true },
-  { 98344, true },
-  { 98353, false },
-  { 98368, true },
-  { 98386, true },
-  { 98399, true },
-  { 98413, true },
-  { 98425, true },
-  { 98439, true },
-  { 98452, true },
-  { 98463, true },
-  { 98472, true },
-  { 98482, true },
+  { 98265, true },
+  { 98284, true },
+  { 98300, true },
+  { 98311, true },
+  { 98326, true },
+  { 98336, true },
+  { 98350, true },
+  { 98361, true },
+  { 98380, true },
+  { 98389, false },
+  { 98400, true },
+  { 98408, true },
+  { 98416, true },
+  { 98424, true },
+  { 98432, true },
+  { 98443, true },
+  { 98455, true },
+  { 98467, false },
+  { 98481, true },
   { 98495, true },
-  { 98503, true },
-  { 98516, true },
-  { 98528, true },
-  { 98541, true },
-  { 98561, true },
-  { 98580, true },
-  { 98597, true },
-  { 98609, true },
-  { 98624, true },
-  { 98637, true },
-  { 98649, true },
-  { 98668, true },
-  { 98676, true },
-  { 98695, true },
-  { 98711, true },
+  { 98506, true },
+  { 98515, true },
+  { 98531, true },
+  { 98553, true },
+  { 98565, true },
+  { 98572, true },
+  { 98584, true },
+  { 98594, true },
+  { 98604, true },
+  { 98616, true },
+  { 98634, true },
+  { 98644, true },
+  { 98667, true },
   { 98722, true },
   { 98737, true },
   { 98747, true },
-  { 98761, true },
-  { 98772, true },
-  { 98791, true },
-  { 98800, false },
-  { 98811, true },
-  { 98819, true },
-  { 98827, true },
-  { 98835, true },
-  { 98851, true },
-  { 98859, true },
-  { 98870, true },
-  { 98882, true },
-  { 98894, false },
-  { 98908, true },
-  { 98922, true },
-  { 98933, true },
-  { 98942, true },
-  { 98958, true },
-  { 98980, true },
-  { 98992, true },
-  { 98999, true },
+  { 98765, true },
+  { 98780, true },
+  { 98793, false },
+  { 98807, true },
+  { 98821, false },
+  { 98837, true },
+  { 98862, true },
+  { 98881, true },
+  { 98891, true },
+  { 98902, true },
+  { 98914, true },
+  { 98936, true },
+  { 98959, true },
+  { 98969, true },
+  { 98979, false },
+  { 98993, true },
   { 99011, true },
-  { 99021, true },
-  { 99031, true },
-  { 99043, true },
-  { 99061, true },
-  { 99071, true },
-  { 99094, true },
-  { 99149, true },
-  { 99164, true },
-  { 99174, true },
-  { 99192, true },
-  { 99207, true },
-  { 99220, false },
-  { 99234, true },
-  { 99248, false },
-  { 99264, true },
-  { 99289, true },
-  { 99308, true },
-  { 99318, true },
-  { 99329, true },
-  { 99341, true },
-  { 99363, true },
+  { 99022, true },
+  { 99033, true },
+  { 99052, true },
+  { 99068, true },
+  { 99081, true },
+  { 99095, true },
+  { 99108, true },
+  { 99137, true },
+  { 99150, true },
+  { 99160, true },
+  { 99172, true },
+  { 99184, true },
+  { 99203, true },
+  { 99213, true },
+  { 99227, true },
+  { 99237, true },
+  { 99254, true },
+  { 99265, true },
+  { 99281, true },
+  { 99300, true },
+  { 99315, true },
+  { 99327, true },
+  { 99336, true },
+  { 99356, true },
+  { 99372, true },
   { 99386, true },
-  { 99396, true },
-  { 99406, false },
-  { 99420, true },
-  { 99438, true },
-  { 99449, true },
-  { 99468, true },
-  { 99484, true },
-  { 99497, true },
-  { 99511, true },
-  { 99524, true },
-  { 99553, true },
-  { 99566, true },
+  { 99399, true },
+  { 99414, true },
+  { 99426, true },
+  { 99436, true },
+  { 99450, true },
+  { 99465, true },
+  { 99477, true },
+  { 99495, true },
+  { 99505, true },
+  { 99517, true },
+  { 99531, true },
+  { 99543, true },
+  { 99555, true },
   { 99576, true },
-  { 99588, true },
-  { 99600, true },
-  { 99619, true },
-  { 99629, true },
-  { 99643, true },
-  { 99653, true },
-  { 99670, true },
-  { 99681, true },
-  { 99697, true },
-  { 99716, true },
-  { 99731, true },
-  { 99743, true },
-  { 99752, true },
-  { 99772, true },
-  { 99788, true },
-  { 99802, true },
-  { 99815, true },
-  { 99830, true },
-  { 99842, true },
-  { 99852, true },
-  { 99866, true },
-  { 99881, true },
-  { 99893, true },
-  { 99911, true },
-  { 99921, true },
-  { 99933, true },
-  { 99947, true },
-  { 99959, true },
-  { 99971, true },
-  { 99992, true },
-  { 100008, true },
-  { 100021, true },
+  { 99592, true },
+  { 99605, true },
+  { 99622, true },
+  { 99637, true },
+  { 99650, true },
+  { 99663, true },
+  { 99677, true },
+  { 99692, true },
+  { 99705, true },
+  { 99724, true },
+  { 99747, false },
+  { 99760, false },
+  { 99778, true },
+  { 99798, true },
+  { 99811, true },
+  { 99826, true },
+  { 99841, true },
+  { 99856, true },
+  { 99870, true },
+  { 99885, true },
+  { 99898, true },
+  { 99923, true },
+  { 99945, true },
+  { 99956, true },
+  { 99972, true },
+  { 99986, true },
+  { 100013, true },
   { 100038, true },
-  { 100053, true },
+  { 100052, true },
   { 100066, true },
-  { 100079, true },
-  { 100093, true },
-  { 100108, true },
-  { 100121, true },
-  { 100140, true },
-  { 100163, false },
-  { 100176, false },
-  { 100194, true },
-  { 100214, true },
-  { 100227, true },
-  { 100242, true },
-  { 100257, true },
-  { 100272, true },
-  { 100286, true },
-  { 100301, true },
-  { 100314, true },
+  { 100080, true },
+  { 100091, true },
+  { 100115, true },
+  { 100126, true },
+  { 100137, true },
+  { 100149, true },
+  { 100177, true },
+  { 100187, true },
+  { 100197, true },
+  { 100207, true },
+  { 100224, true },
+  { 100241, true },
+  { 100251, true },
+  { 100274, true },
+  { 100284, true },
+  { 100293, true },
+  { 100315, true },
+  { 100327, true },
   { 100339, true },
-  { 100361, true },
-  { 100372, true },
-  { 100388, true },
-  { 100402, true },
-  { 100429, true },
+  { 100351, true },
+  { 100362, true },
+  { 100380, true },
+  { 100395, true },
+  { 100405, true },
+  { 100414, true },
+  { 100432, false },
+  { 100443, true },
   { 100454, true },
-  { 100468, true },
-  { 100482, true },
-  { 100496, true },
-  { 100507, true },
-  { 100531, true },
-  { 100542, true },
-  { 100553, true },
-  { 100565, true },
-  { 100593, true },
-  { 100603, true },
-  { 100613, true },
-  { 100623, true },
-  { 100640, true },
-  { 100657, true },
-  { 100667, true },
-  { 100690, true },
-  { 100700, true },
-  { 100709, true },
-  { 100731, true },
-  { 100743, true },
+  { 100464, true },
+  { 100472, true },
+  { 100486, true },
+  { 100498, true },
+  { 100510, true },
+  { 100528, true },
+  { 100548, true },
+  { 100563, true },
+  { 100580, true },
+  { 100596, true },
+  { 100609, true },
+  { 100620, true },
+  { 100635, true },
+  { 100650, true },
+  { 100666, true },
+  { 100679, true },
+  { 100704, true },
+  { 100720, true },
+  { 100740, true },
   { 100755, true },
-  { 100767, true },
-  { 100778, true },
-  { 100796, true },
-  { 100811, true },
-  { 100821, true },
-  { 100830, true },
-  { 100848, false },
-  { 100859, true },
-  { 100870, true },
-  { 100880, true },
-  { 100888, true },
-  { 100902, true },
-  { 100914, true },
-  { 100926, true },
-  { 100944, true },
-  { 100964, true },
-  { 100979, true },
-  { 100996, true },
-  { 101012, true },
-  { 101025, true },
-  { 101036, true },
-  { 101051, true },
-  { 101066, true },
-  { 101082, true },
-  { 101095, true },
-  { 101120, true },
-  { 101136, true },
-  { 101156, true },
-  { 101171, true },
-  { 101182, true },
-  { 101193, true },
-  { 101209, true },
-  { 101221, true },
-  { 101238, true },
-  { 101249, true },
+  { 100766, true },
+  { 100777, true },
+  { 100793, true },
+  { 100805, true },
+  { 100822, true },
+  { 100833, true },
+  { 100841, true },
+  { 100853, true },
+  { 100865, true },
+  { 100879, true },
+  { 100896, true },
+  { 100912, true },
+  { 100928, true },
+  { 100947, true },
+  { 100962, true },
+  { 100974, true },
+  { 100991, false },
+  { 101011, true },
+  { 101031, true },
+  { 101052, true },
+  { 101073, false },
+  { 101090, true },
+  { 101109, true },
+  { 101124, true },
+  { 101135, true },
+  { 101152, true },
+  { 101179, true },
+  { 101190, true },
+  { 101200, true },
+  { 101215, true },
+  { 101227, true },
+  { 101248, true },
   { 101257, true },
-  { 101269, true },
-  { 101281, true },
-  { 101295, true },
-  { 101312, true },
-  { 101328, true },
-  { 101344, true },
-  { 101363, true },
-  { 101378, true },
-  { 101390, true },
-  { 101407, false },
-  { 101427, true },
-  { 101447, true },
-  { 101468, true },
-  { 101489, false },
-  { 101506, true },
-  { 101525, true },
-  { 101540, true },
-  { 101551, true },
-  { 101568, true },
-  { 101595, true },
-  { 101606, true },
-  { 101616, true },
-  { 101631, true },
-  { 101643, true },
-  { 101664, true },
-  { 101673, true },
-  { 101686, true },
-  { 101699, true },
-  { 101717, true },
-  { 101726, true },
-  { 101735, true },
-  { 101744, false },
-  { 101761, false },
+  { 101270, true },
+  { 101283, true },
+  { 101301, true },
+  { 101310, true },
+  { 101319, true },
+  { 101328, false },
+  { 101345, false },
+  { 101356, true },
+  { 101374, true },
+  { 101385, true },
+  { 101400, true },
+  { 101416, true },
+  { 101438, true },
+  { 101446, true },
+  { 101459, true },
+  { 101471, true },
+  { 101488, true },
+  { 101502, true },
+  { 101512, true },
+  { 101530, true },
+  { 101547, true },
+  { 101564, true },
+  { 101572, true },
+  { 101596, true },
+  { 101614, true },
+  { 101628, true },
+  { 101641, true },
+  { 101655, true },
+  { 101674, true },
+  { 101684, true },
+  { 101696, true },
+  { 101708, true },
+  { 101720, true },
+  { 101733, true },
+  { 101740, true },
+  { 101760, true },
   { 101772, true },
-  { 101790, true },
-  { 101801, true },
+  { 101788, true },
+  { 101798, true },
+  { 101809, true },
   { 101816, true },
-  { 101832, true },
-  { 101854, true },
-  { 101862, true },
-  { 101875, true },
-  { 101887, true },
-  { 101904, true },
-  { 101918, true },
-  { 101928, true },
-  { 101946, true },
-  { 101963, true },
-  { 101980, true },
-  { 101988, true },
-  { 102012, true },
-  { 102030, true },
-  { 102044, true },
-  { 102057, true },
-  { 102075, true },
-  { 102089, true },
-  { 102108, true },
-  { 102118, true },
-  { 102130, true },
-  { 102142, true },
-  { 102154, true },
-  { 102167, true },
-  { 102174, true },
-  { 102194, true },
-  { 102206, true },
-  { 102222, true },
-  { 102232, true },
-  { 102239, true },
-  { 102248, true },
-  { 102267, true },
-  { 102280, true },
-  { 102290, true },
-  { 102300, true },
-  { 102308, true },
-  { 102321, true },
+  { 101825, true },
+  { 101844, true },
+  { 101857, true },
+  { 101867, true },
+  { 101877, true },
+  { 101885, true },
+  { 101898, true },
+  { 101910, true },
+  { 101922, false },
+  { 101937, true },
+  { 101949, true },
+  { 101964, true },
+  { 101982, true },
+  { 101993, true },
+  { 102005, true },
+  { 102026, false },
+  { 102052, true },
+  { 102066, true },
+  { 102080, true },
+  { 102094, true },
+  { 102107, true },
+  { 102120, true },
+  { 102131, true },
+  { 102145, true },
+  { 102158, true },
+  { 102170, true },
+  { 102183, false },
+  { 102197, true },
+  { 102215, true },
+  { 102228, true },
+  { 102238, true },
+  { 102249, true },
+  { 102260, true },
+  { 102271, true },
+  { 102284, true },
+  { 102296, true },
+  { 102304, true },
+  { 102318, true },
   { 102333, true },
-  { 102345, false },
-  { 102360, true },
-  { 102372, true },
-  { 102387, true },
-  { 102405, true },
-  { 102416, true },
-  { 102428, true },
-  { 102449, false },
-  { 102475, true },
-  { 102489, true },
-  { 102503, true },
-  { 102517, true },
-  { 102530, true },
-  { 102543, true },
-  { 102554, true },
-  { 102568, true },
-  { 102581, true },
-  { 102593, true },
-  { 102606, false },
-  { 102620, true },
-  { 102638, true },
-  { 102651, true },
-  { 102661, true },
-  { 102672, true },
-  { 102683, true },
-  { 102694, true },
-  { 102707, true },
-  { 102719, true },
-  { 102727, true },
-  { 102741, true },
-  { 102756, true },
-  { 102779, true },
-  { 102790, true },
-  { 102804, false },
-  { 102819, true },
-  { 102835, true },
-  { 102847, true },
-  { 102861, true },
+  { 102356, true },
+  { 102367, true },
+  { 102381, false },
+  { 102396, true },
+  { 102412, true },
+  { 102424, true },
+  { 102438, true },
+  { 102452, true },
+  { 102465, true },
+  { 102478, true },
+  { 102492, true },
+  { 102520, true },
+  { 102548, true },
+  { 102558, true },
+  { 102571, true },
+  { 102587, true },
+  { 102600, false },
+  { 102615, true },
+  { 102633, true },
+  { 102652, true },
+  { 102660, false },
+  { 102675, true },
+  { 102688, true },
+  { 102703, true },
+  { 102717, true },
+  { 102733, true },
+  { 102747, true },
+  { 102765, true },
+  { 102775, true },
+  { 102784, false },
+  { 102795, true },
+  { 102806, true },
+  { 102816, true },
+  { 102828, true },
+  { 102855, true },
+  { 102866, true },
   { 102875, true },
-  { 102888, true },
-  { 102901, true },
+  { 102884, true },
+  { 102901, false },
   { 102915, true },
-  { 102943, true },
-  { 102971, true },
-  { 102981, true },
-  { 103003, true },
-  { 103016, true },
-  { 103032, true },
-  { 103045, false },
-  { 103060, true },
-  { 103078, true },
-  { 103097, true },
-  { 103105, false },
-  { 103120, true },
-  { 103133, true },
-  { 103148, true },
-  { 103162, true },
-  { 103178, true },
-  { 103192, true },
-  { 103210, true },
-  { 103220, true },
-  { 103229, false },
-  { 103240, true },
-  { 103251, true },
-  { 103261, true },
-  { 103273, true },
-  { 103300, true },
-  { 103311, true },
-  { 103320, true },
-  { 103329, true },
-  { 103346, false },
+  { 102938, true },
+  { 102954, true },
+  { 102975, true },
+  { 102991, true },
+  { 103011, true },
+  { 103021, true },
+  { 103029, true },
+  { 103038, true },
+  { 103049, true },
+  { 103063, true },
+  { 103073, true },
+  { 103083, true },
+  { 103103, true },
+  { 103113, true },
+  { 103127, true },
+  { 103140, true },
+  { 103152, true },
+  { 103171, true },
+  { 103184, true },
+  { 103208, false },
+  { 103227, true },
+  { 103255, true },
+  { 103269, true },
+  { 103283, true },
+  { 103295, true },
+  { 103309, true },
+  { 103319, true },
+  { 103341, true },
   { 103360, true },
-  { 103383, true },
-  { 103399, true },
-  { 103420, true },
+  { 103378, true },
+  { 103386, true },
+  { 103402, true },
+  { 103417, true },
+  { 103425, true },
   { 103436, true },
-  { 103456, true },
+  { 103452, true },
   { 103466, true },
-  { 103474, true },
-  { 103483, true },
-  { 103494, true },
-  { 103508, true },
-  { 103518, true },
-  { 103533, true },
-  { 103543, true },
-  { 103563, true },
-  { 103573, true },
-  { 103587, true },
-  { 103599, true },
-  { 103618, true },
-  { 103631, true },
-  { 103655, false },
-  { 103674, true },
-  { 103702, true },
+  { 103482, true },
+  { 103497, true },
+  { 103512, true },
+  { 103524, true },
+  { 103536, true },
+  { 103555, true },
+  { 103571, false },
+  { 103596, true },
+  { 103615, true },
+  { 103632, true },
+  { 103642, true },
+  { 103653, true },
+  { 103665, true },
+  { 103680, true },
+  { 103698, true },
+  { 103705, true },
   { 103716, true },
   { 103730, true },
-  { 103742, true },
+  { 103743, true },
   { 103756, true },
-  { 103766, true },
-  { 103788, true },
-  { 103807, true },
+  { 103769, true },
+  { 103780, true },
+  { 103793, true },
+  { 103803, true },
+  { 103813, true },
   { 103825, true },
-  { 103833, true },
-  { 103849, true },
-  { 103864, true },
-  { 103872, true },
-  { 103883, true },
-  { 103899, true },
-  { 103913, true },
-  { 103929, true },
-  { 103944, true },
-  { 103959, true },
+  { 103837, true },
+  { 103846, true },
+  { 103853, true },
+  { 103863, true },
+  { 103874, true },
+  { 103884, true },
+  { 103902, true },
+  { 103920, true },
+  { 103934, true },
+  { 103948, true },
   { 103971, true },
-  { 103983, true },
-  { 104002, true },
-  { 104018, false },
-  { 104043, true },
-  { 104062, true },
-  { 104079, true },
-  { 104089, true },
-  { 104100, true },
-  { 104112, true },
-  { 104127, true },
+  { 103981, true },
+  { 103996, true },
+  { 104014, true },
+  { 104031, true },
+  { 104045, true },
+  { 104059, true },
+  { 104072, true },
+  { 104084, true },
+  { 104096, true },
+  { 104108, true },
+  { 104121, true },
+  { 104134, false },
   { 104145, true },
-  { 104152, true },
-  { 104163, true },
-  { 104177, true },
-  { 104190, true },
-  { 104203, true },
-  { 104216, true },
-  { 104227, true },
-  { 104240, true },
-  { 104250, true },
-  { 104260, true },
-  { 104272, true },
-  { 104281, true },
-  { 104288, true },
-  { 104298, true },
-  { 104309, true },
-  { 104319, true },
-  { 104337, true },
-  { 104355, true },
-  { 104369, true },
-  { 104383, true },
-  { 104406, true },
-  { 104416, true },
-  { 104431, true },
-  { 104449, true },
-  { 104466, true },
-  { 104480, true },
-  { 104494, true },
-  { 104507, true },
-  { 104519, true },
-  { 104531, true },
-  { 104543, true },
+  { 104159, true },
+  { 104172, true },
+  { 104187, true },
+  { 104194, true },
+  { 104213, true },
+  { 104232, true },
+  { 104247, true },
+  { 104271, false },
+  { 104286, true },
+  { 104297, true },
+  { 104320, true },
+  { 104331, true },
+  { 104342, true },
+  { 104354, true },
+  { 104368, true },
+  { 104381, true },
+  { 104394, true },
+  { 104407, true },
+  { 104429, true },
+  { 104439, true },
+  { 104459, true },
+  { 104477, true },
+  { 104491, true },
+  { 104508, false },
+  { 104523, false },
+  { 104539, true },
   { 104556, true },
-  { 104569, false },
-  { 104580, true },
-  { 104594, true },
-  { 104607, true },
-  { 104622, true },
-  { 104629, true },
-  { 104648, true },
-  { 104667, true },
-  { 104682, true },
-  { 104706, false },
-  { 104721, true },
-  { 104732, true },
-  { 104755, true },
-  { 104766, true },
-  { 104777, true },
-  { 104789, true },
-  { 104803, true },
-  { 104816, true },
-  { 104829, true },
-  { 104842, true },
-  { 104864, false },
-  { 104874, true },
-  { 104894, true },
-  { 104912, true },
-  { 104926, true },
-  { 104943, false },
-  { 104958, false },
-  { 104974, true },
-  { 104985, true },
-  { 105007, true },
-  { 105021, true },
-  { 105041, true },
-  { 105051, true },
-  { 105062, true },
-  { 105071, true },
-  { 105082, true },
-  { 105094, true },
-  { 105104, true },
-  { 105117, true },
-  { 105125, true },
-  { 105142, true },
-  { 105163, true },
-  { 105177, true },
-  { 105192, true },
-  { 105206, true },
-  { 105226, true },
-  { 105241, true },
-  { 105252, true },
-  { 105264, true },
-  { 105277, true },
-  { 105288, true },
-  { 105301, true },
-  { 105315, true },
-  { 105328, true },
-  { 105338, true },
-  { 105361, true },
-  { 105371, true },
-  { 105381, true },
-  { 105394, true },
-  { 105404, true },
-  { 105421, true },
-  { 105437, true },
-  { 105457, true },
-  { 105467, true },
-  { 105481, true },
-  { 105493, true },
-  { 105518, true },
-  { 105532, true },
-  { 105546, true },
-  { 105560, true },
-  { 105574, true },
+  { 104567, true },
+  { 104589, true },
+  { 104603, true },
+  { 104623, true },
+  { 104633, true },
+  { 104644, true },
+  { 104653, true },
+  { 104664, true },
+  { 104676, true },
+  { 104686, true },
+  { 104699, true },
+  { 104707, true },
+  { 104724, true },
+  { 104745, true },
+  { 104759, true },
+  { 104774, true },
+  { 104788, true },
+  { 104808, true },
+  { 104823, true },
+  { 104834, true },
+  { 104846, true },
+  { 104859, true },
+  { 104870, true },
+  { 104883, true },
+  { 104897, true },
+  { 104910, true },
+  { 104920, true },
+  { 104943, true },
+  { 104953, true },
+  { 104963, true },
+  { 104976, true },
+  { 104986, true },
+  { 105003, true },
+  { 105019, true },
+  { 105034, true },
+  { 105054, true },
+  { 105064, true },
+  { 105078, true },
+  { 105090, true },
+  { 105115, true },
+  { 105129, true },
+  { 105143, true },
+  { 105157, true },
+  { 105171, true },
+  { 105185, true },
+  { 105200, true },
+  { 105214, true },
+  { 105228, true },
+  { 105242, true },
+  { 105262, true },
+  { 105274, true },
+  { 105291, true },
+  { 105306, true },
+  { 105319, true },
+  { 105337, true },
+  { 105352, true },
+  { 105368, true },
+  { 105380, true },
+  { 105397, true },
+  { 105410, true },
+  { 105425, true },
+  { 105434, false },
+  { 105449, true },
+  { 105460, true },
+  { 105475, true },
+  { 105487, true },
+  { 105496, true },
+  { 105513, false },
+  { 105523, true },
+  { 105542, true },
+  { 105552, true },
+  { 105568, true },
   { 105588, true },
-  { 105603, true },
-  { 105617, true },
-  { 105631, true },
-  { 105645, true },
-  { 105665, true },
+  { 105602, true },
+  { 105621, true },
+  { 105641, true },
+  { 105657, true },
+  { 105667, true },
   { 105682, true },
-  { 105697, true },
-  { 105710, true },
-  { 105728, true },
-  { 105743, true },
-  { 105759, true },
-  { 105771, true },
-  { 105788, true },
-  { 105801, true },
-  { 105816, true },
-  { 105825, false },
-  { 105840, true },
-  { 105851, true },
-  { 105866, true },
-  { 105878, true },
-  { 105887, true },
-  { 105904, false },
-  { 105914, true },
-  { 105933, true },
-  { 105943, true },
-  { 105959, true },
-  { 105979, true },
-  { 105993, true },
+  { 105692, true },
+  { 105706, true },
+  { 105727, true },
+  { 105737, true },
+  { 105746, true },
+  { 105755, true },
+  { 105770, true },
+  { 105784, true },
+  { 105798, true },
+  { 105813, true },
+  { 105829, true },
+  { 105837, true },
+  { 105845, true },
+  { 105857, true },
+  { 105869, true },
+  { 105881, true },
+  { 105894, true },
+  { 105907, true },
+  { 105921, true },
+  { 105936, true },
+  { 105950, false },
+  { 105976, true },
+  { 105987, true },
+  { 105996, true },
+  { 106004, true },
   { 106012, true },
-  { 106032, true },
-  { 106048, true },
-  { 106058, true },
-  { 106073, true },
-  { 106083, true },
-  { 106097, true },
-  { 106118, true },
-  { 106128, true },
-  { 106137, true },
-  { 106146, true },
-  { 106161, true },
-  { 106175, true },
-  { 106189, true },
-  { 106204, true },
+  { 106020, true },
+  { 106028, true },
+  { 106038, true },
+  { 106047, true },
+  { 106059, true },
+  { 106078, true },
+  { 106088, true },
+  { 106099, true },
+  { 106109, true },
+  { 106126, true },
+  { 106139, true },
+  { 106149, true },
+  { 106160, true },
+  { 106178, true },
+  { 106196, true },
+  { 106210, true },
   { 106220, true },
-  { 106236, true },
-  { 106244, true },
-  { 106256, true },
-  { 106268, true },
-  { 106280, true },
-  { 106293, true },
-  { 106306, true },
-  { 106320, true },
-  { 106335, true },
-  { 106349, false },
+  { 106227, true },
+  { 106242, true },
+  { 106264, true },
+  { 106272, true },
+  { 106282, true },
+  { 106301, true },
+  { 106313, true },
+  { 106323, true },
+  { 106333, true },
+  { 106343, true },
+  { 106354, true },
+  { 106367, true },
   { 106375, true },
-  { 106386, true },
-  { 106395, true },
-  { 106403, true },
-  { 106411, true },
-  { 106419, true },
-  { 106427, true },
-  { 106437, true },
-  { 106446, true },
-  { 106458, true },
-  { 106477, true },
-  { 106487, true },
-  { 106498, true },
+  { 106389, true },
+  { 106399, true },
+  { 106410, true },
+  { 106417, true },
+  { 106425, true },
+  { 106443, true },
+  { 106454, false },
+  { 106469, true },
+  { 106479, true },
+  { 106488, true },
+  { 106499, true },
   { 106508, true },
-  { 106525, true },
-  { 106538, true },
-  { 106548, true },
-  { 106559, true },
-  { 106577, true },
-  { 106595, true },
-  { 106609, true },
-  { 106619, true },
-  { 106626, true },
-  { 106641, true },
+  { 106517, true },
+  { 106537, true },
+  { 106553, true },
+  { 106562, false },
+  { 106573, true },
+  { 106585, true },
+  { 106594, true },
+  { 106610, true },
+  { 106623, true },
+  { 106636, true },
+  { 106648, true },
   { 106663, true },
-  { 106671, true },
-  { 106681, true },
-  { 106700, true },
-  { 106712, true },
-  { 106722, true },
+  { 106675, true },
+  { 106686, true },
+  { 106697, true },
+  { 106709, true },
   { 106732, true },
   { 106742, true },
-  { 106753, true },
-  { 106766, true },
-  { 106774, true },
-  { 106788, true },
-  { 106798, true },
-  { 106809, true },
-  { 106816, true },
-  { 106824, true },
-  { 106842, true },
-  { 106853, false },
-  { 106868, true },
+  { 106758, true },
+  { 106773, true },
+  { 106786, true },
+  { 106795, true },
+  { 106810, true },
+  { 106823, true },
+  { 106836, true },
+  { 106851, true },
+  { 106861, true },
   { 106878, true },
-  { 106887, true },
-  { 106898, true },
-  { 106907, true },
-  { 106915, true },
-  { 106924, true },
-  { 106944, true },
-  { 106960, true },
-  { 106969, false },
-  { 106980, true },
-  { 106989, true },
-  { 107005, true },
-  { 107018, true },
-  { 107031, true },
+  { 106901, true },
+  { 106917, false },
+  { 106927, true },
+  { 106941, true },
+  { 106952, true },
+  { 106962, true },
+  { 106976, true },
+  { 106987, true },
+  { 107000, true },
+  { 107013, true },
+  { 107025, true },
   { 107043, true },
-  { 107058, true },
-  { 107068, true },
-  { 107080, true },
-  { 107091, true },
+  { 107054, true },
+  { 107067, true },
+  { 107078, true },
   { 107102, true },
-  { 107114, true },
-  { 107137, true },
-  { 107147, true },
-  { 107163, true },
-  { 107178, true },
-  { 107191, true },
-  { 107200, true },
-  { 107215, true },
-  { 107228, true },
-  { 107241, true },
-  { 107256, true },
-  { 107266, true },
-  { 107283, true },
-  { 107306, true },
-  { 107322, false },
-  { 107332, true },
-  { 107346, true },
+  { 107117, true },
+  { 107142, true },
+  { 107150, true },
+  { 107166, false },
+  { 107181, true },
+  { 107193, true },
+  { 107205, true },
+  { 107219, true },
+  { 107233, true },
+  { 107247, true },
+  { 107261, true },
+  { 107278, true },
+  { 107295, true },
+  { 107307, true },
+  { 107321, true },
+  { 107343, true },
   { 107357, true },
-  { 107367, true },
-  { 107381, true },
-  { 107392, true },
-  { 107405, true },
-  { 107418, true },
-  { 107430, true },
-  { 107448, true },
-  { 107459, true },
-  { 107472, true },
-  { 107483, true },
-  { 107507, true },
-  { 107522, true },
-  { 107547, true },
-  { 107555, true },
-  { 107571, false },
-  { 107586, true },
-  { 107598, true },
-  { 107610, true },
-  { 107624, true },
-  { 107638, true },
-  { 107652, true },
-  { 107666, true },
-  { 107678, true },
-  { 107695, true },
-  { 107712, true },
-  { 107724, true },
-  { 107738, true },
-  { 107760, true },
-  { 107774, true },
-  { 107792, true },
-  { 107813, true },
-  { 107830, true },
-  { 107841, true },
-  { 107854, true },
-  { 107870, true },
-  { 107882, true },
-  { 107896, true },
-  { 107912, true },
-  { 107929, true },
-  { 107943, true },
-  { 107955, false },
-  { 107980, true },
-  { 107990, false },
-  { 108016, true },
-  { 108033, true },
-  { 108047, true },
-  { 108058, true },
-  { 108088, false },
-  { 108102, true },
-  { 108119, true },
-  { 108133, true },
-  { 108156, true },
-  { 108174, true },
-  { 108189, true },
-  { 108197, true },
-  { 108205, true },
-  { 108213, true },
-  { 108221, true },
-  { 108229, true },
+  { 107375, true },
+  { 107396, true },
+  { 107413, true },
+  { 107424, true },
+  { 107437, true },
+  { 107453, true },
+  { 107465, true },
+  { 107479, true },
+  { 107495, true },
+  { 107512, true },
+  { 107526, true },
+  { 107538, false },
+  { 107563, true },
+  { 107573, false },
+  { 107599, true },
+  { 107616, true },
+  { 107630, true },
+  { 107641, true },
+  { 107671, false },
+  { 107685, true },
+  { 107702, true },
+  { 107716, true },
+  { 107739, true },
+  { 107757, true },
+  { 107772, true },
+  { 107780, true },
+  { 107788, true },
+  { 107796, true },
+  { 107804, true },
+  { 107812, true },
+  { 107823, true },
+  { 107833, true },
+  { 107847, true },
+  { 107863, true },
+  { 107874, true },
+  { 107899, true },
+  { 107908, false },
+  { 107924, true },
+  { 107934, false },
+  { 107956, true },
+  { 107971, true },
+  { 107985, true },
+  { 107998, true },
+  { 108015, true },
+  { 108031, true },
+  { 108054, true },
+  { 108076, true },
+  { 108094, true },
+  { 108113, false },
+  { 108132, true },
+  { 108145, true },
+  { 108158, true },
+  { 108182, true },
+  { 108193, true },
+  { 108212, true },
   { 108240, true },
-  { 108250, true },
-  { 108265, true },
-  { 108279, true },
-  { 108295, true },
-  { 108306, true },
-  { 108331, true },
-  { 108340, false },
-  { 108356, true },
-  { 108366, false },
-  { 108388, true },
-  { 108403, true },
-  { 108417, true },
-  { 108430, true },
-  { 108447, true },
-  { 108463, true },
-  { 108486, true },
-  { 108508, true },
-  { 108526, true },
-  { 108545, false },
-  { 108564, true },
-  { 108577, true },
-  { 108590, true },
+  { 108261, true },
+  { 108274, true },
+  { 108290, true },
+  { 108310, true },
+  { 108330, true },
+  { 108350, true },
+  { 108364, true },
+  { 108385, false },
+  { 108396, true },
+  { 108415, true },
+  { 108426, true },
+  { 108438, true },
+  { 108449, true },
+  { 108464, true },
+  { 108494, true },
+  { 108505, true },
+  { 108519, true },
+  { 108533, true },
+  { 108545, true },
+  { 108556, true },
+  { 108580, true },
+  { 108601, true },
   { 108614, true },
-  { 108625, true },
-  { 108644, true },
-  { 108672, true },
-  { 108693, true },
-  { 108706, true },
-  { 108722, true },
-  { 108742, true },
-  { 108762, true },
-  { 108782, true },
-  { 108796, true },
-  { 108817, false },
-  { 108828, true },
-  { 108847, true },
-  { 108858, true },
-  { 108870, true },
-  { 108881, true },
-  { 108896, true },
-  { 108926, true },
-  { 108937, true },
-  { 108951, true },
-  { 108965, true },
+  { 108631, true },
+  { 108647, true },
+  { 108665, true },
+  { 108682, true },
+  { 108696, true },
+  { 108710, true },
+  { 108726, true },
+  { 108746, true },
+  { 108757, true },
+  { 108772, true },
+  { 108799, true },
+  { 108818, true },
+  { 108833, true },
+  { 108844, true },
+  { 108861, true },
+  { 108877, true },
+  { 108894, true },
+  { 108909, true },
+  { 108925, true },
+  { 108942, true },
+  { 108962, true },
   { 108977, true },
-  { 108988, true },
+  { 108996, true },
   { 109012, true },
-  { 109033, true },
-  { 109046, true },
-  { 109063, true },
-  { 109079, true },
-  { 109097, true },
-  { 109114, true },
-  { 109128, true },
-  { 109142, true },
-  { 109158, true },
-  { 109178, true },
-  { 109189, true },
-  { 109204, true },
-  { 109231, true },
-  { 109250, true },
-  { 109265, true },
-  { 109276, true },
-  { 109293, true },
-  { 109309, true },
-  { 109326, true },
-  { 109341, true },
-  { 109357, true },
-  { 109374, true },
-  { 109394, true },
+  { 109022, true },
+  { 109035, true },
+  { 109054, true },
+  { 109070, true },
+  { 109090, true },
+  { 109102, true },
+  { 109119, false },
+  { 109134, true },
+  { 109146, true },
+  { 109159, true },
+  { 109169, true },
+  { 109186, true },
+  { 109198, true },
+  { 109208, true },
+  { 109225, true },
+  { 109248, true },
+  { 109262, true },
+  { 109279, true },
+  { 109294, true },
+  { 109313, true },
+  { 109346, true },
+  { 109356, true },
+  { 109370, true },
+  { 109386, false },
   { 109409, true },
-  { 109428, true },
-  { 109444, true },
-  { 109454, true },
-  { 109467, true },
-  { 109486, true },
-  { 109502, true },
-  { 109522, true },
-  { 109534, true },
-  { 109551, false },
-  { 109566, true },
-  { 109578, true },
-  { 109591, true },
-  { 109601, true },
-  { 109618, true },
-  { 109630, true },
-  { 109640, true },
-  { 109657, true },
-  { 109680, true },
-  { 109694, true },
-  { 109711, true },
-  { 109726, true },
-  { 109745, true },
-  { 109778, true },
-  { 109788, true },
-  { 109802, true },
-  { 109818, false },
-  { 109841, true },
-  { 109855, true },
-  { 109867, true },
-  { 109882, true },
-  { 109902, true },
-  { 109914, true },
-  { 109932, true },
-  { 109945, true },
-  { 109958, true },
-  { 109971, true },
-  { 109982, true },
-  { 109997, true },
-  { 110008, true },
-  { 110022, true },
-  { 110034, true },
-  { 110048, true },
-  { 110056, true },
-  { 110075, true },
-  { 110097, true },
-  { 110110, true },
-  { 110120, false },
-  { 110132, true },
-  { 110155, true },
+  { 109423, true },
+  { 109435, true },
+  { 109450, true },
+  { 109470, true },
+  { 109482, true },
+  { 109500, true },
+  { 109513, true },
+  { 109526, true },
+  { 109539, true },
+  { 109550, true },
+  { 109565, true },
+  { 109576, true },
+  { 109590, true },
+  { 109602, true },
+  { 109616, true },
+  { 109624, true },
+  { 109643, true },
+  { 109665, true },
+  { 109678, true },
+  { 109688, false },
+  { 109700, true },
+  { 109723, true },
+  { 109737, true },
+  { 109752, true },
+  { 109771, true },
+  { 109785, true },
+  { 109799, true },
+  { 109818, true },
+  { 109835, true },
+  { 109848, true },
+  { 109865, true },
+  { 109881, true },
+  { 109900, true },
+  { 109917, true },
+  { 109925, true },
+  { 109941, true },
+  { 109957, true },
+  { 109977, true },
+  { 109995, true },
+  { 110009, true },
+  { 110026, true },
+  { 110045, true },
+  { 110062, true },
+  { 110081, true },
+  { 110099, true },
+  { 110112, true },
+  { 110122, true },
+  { 110140, true },
+  { 110160, true },
   { 110169, true },
-  { 110184, true },
-  { 110203, true },
-  { 110217, true },
-  { 110231, true },
-  { 110250, true },
-  { 110267, true },
-  { 110280, true },
-  { 110297, true },
+  { 110183, true },
+  { 110200, true },
+  { 110223, true },
+  { 110232, true },
+  { 110248, true },
+  { 110266, true },
+  { 110278, true },
+  { 110287, true },
+  { 110300, true },
   { 110313, true },
-  { 110332, true },
+  { 110329, true },
+  { 110337, false },
   { 110349, true },
-  { 110357, true },
-  { 110373, true },
-  { 110389, true },
-  { 110409, true },
+  { 110359, true },
+  { 110378, true },
+  { 110393, true },
+  { 110408, true },
   { 110427, true },
-  { 110441, true },
-  { 110458, true },
-  { 110477, true },
-  { 110494, true },
-  { 110513, true },
-  { 110531, true },
-  { 110544, true },
-  { 110554, true },
-  { 110572, true },
-  { 110592, true },
-  { 110601, true },
-  { 110615, true },
-  { 110632, true },
-  { 110655, true },
-  { 110664, true },
-  { 110680, true },
-  { 110698, true },
-  { 110710, true },
-  { 110719, true },
-  { 110732, true },
-  { 110745, true },
-  { 110761, true },
-  { 110769, false },
-  { 110781, true },
-  { 110791, true },
-  { 110810, true },
-  { 110825, true },
-  { 110840, true },
-  { 110859, true },
-  { 110881, true },
-  { 110900, true },
-  { 110914, true },
-  { 110926, true },
-  { 110940, false },
-  { 110962, true },
-  { 110980, true },
-  { 110993, true },
-  { 111007, true },
+  { 110449, true },
+  { 110463, true },
+  { 110475, true },
+  { 110489, true },
+  { 110502, false },
+  { 110524, true },
+  { 110542, true },
+  { 110555, true },
+  { 110569, true },
+  { 110580, true },
+  { 110594, false },
+  { 110614, true },
+  { 110625, false },
+  { 110634, true },
+  { 110649, false },
+  { 110667, true },
+  { 110677, true },
+  { 110688, false },
+  { 110703, true },
+  { 110712, true },
+  { 110724, true },
+  { 110733, true },
+  { 110746, true },
+  { 110759, true },
+  { 110770, true },
+  { 110784, true },
+  { 110797, true },
+  { 110814, false },
+  { 110831, true },
+  { 110838, true },
+  { 110846, true },
+  { 110855, true },
+  { 110867, true },
+  { 110890, true },
+  { 110904, true },
+  { 110918, true },
+  { 110935, true },
+  { 110951, true },
+  { 110965, true },
+  { 110972, true },
+  { 110983, true },
+  { 110998, true },
+  { 111010, true },
   { 111018, true },
-  { 111032, false },
-  { 111052, true },
-  { 111063, false },
-  { 111072, true },
-  { 111087, false },
-  { 111105, true },
-  { 111115, true },
-  { 111126, false },
+  { 111033, false },
+  { 111043, true },
+  { 111055, true },
+  { 111067, true },
+  { 111082, true },
+  { 111111, true },
+  { 111125, true },
+  { 111133, true },
   { 111141, true },
   { 111150, true },
-  { 111162, true },
+  { 111163, true },
   { 111171, true },
-  { 111184, true },
-  { 111197, true },
-  { 111208, true },
-  { 111222, true },
-  { 111235, true },
-  { 111252, false },
-  { 111269, true },
-  { 111276, true },
-  { 111284, true },
-  { 111293, true },
-  { 111305, true },
-  { 111328, true },
-  { 111342, true },
-  { 111356, true },
-  { 111373, true },
-  { 111389, true },
-  { 111403, true },
-  { 111410, true },
-  { 111421, true },
-  { 111436, true },
-  { 111448, true },
-  { 111456, true },
-  { 111471, false },
-  { 111481, true },
+  { 111182, true },
+  { 111193, true },
+  { 111200, true },
+  { 111209, true },
+  { 111219, true },
+  { 111239, true },
+  { 111251, true },
+  { 111262, false },
+  { 111271, false },
+  { 111292, true },
+  { 111303, true },
+  { 111312, true },
+  { 111326, true },
+  { 111343, true },
+  { 111359, true },
+  { 111376, true },
+  { 111388, true },
+  { 111401, true },
+  { 111413, true },
+  { 111427, true },
+  { 111445, true },
+  { 111459, true },
+  { 111475, false },
   { 111493, true },
-  { 111505, true },
-  { 111520, true },
-  { 111549, true },
-  { 111563, true },
-  { 111571, true },
-  { 111579, true },
-  { 111588, true },
+  { 111510, true },
+  { 111532, true },
+  { 111543, true },
+  { 111554, true },
+  { 111565, true },
+  { 111576, true },
+  { 111590, true },
   { 111601, true },
-  { 111609, true },
-  { 111620, true },
-  { 111631, true },
-  { 111638, true },
-  { 111647, true },
-  { 111657, true },
-  { 111677, true },
-  { 111689, true },
-  { 111700, false },
-  { 111709, false },
-  { 111730, true },
-  { 111741, true },
-  { 111750, true },
-  { 111764, true },
-  { 111781, true },
-  { 111797, true },
-  { 111814, true },
-  { 111826, true },
-  { 111839, true },
-  { 111851, true },
-  { 111865, true },
-  { 111883, true },
+  { 111617, true },
+  { 111646, false },
+  { 111665, true },
+  { 111681, true },
+  { 111707, true },
+  { 111721, true },
+  { 111738, true },
+  { 111757, true },
+  { 111774, true },
+  { 111785, true },
+  { 111793, true },
+  { 111805, true },
+  { 111818, true },
+  { 111833, true },
+  { 111846, true },
+  { 111859, true },
+  { 111873, true },
+  { 111885, true },
   { 111897, true },
-  { 111913, false },
-  { 111931, true },
-  { 111948, true },
-  { 111970, true },
+  { 111914, true },
+  { 111927, true },
+  { 111942, true },
+  { 111955, true },
+  { 111967, true },
   { 111981, true },
   { 111992, true },
-  { 112003, true },
-  { 112014, true },
-  { 112028, true },
-  { 112039, true },
-  { 112055, true },
-  { 112084, false },
-  { 112103, true },
-  { 112122, true },
-  { 112138, true },
-  { 112164, true },
-  { 112178, true },
+  { 112015, true },
+  { 112033, true },
+  { 112054, true },
+  { 112073, true },
+  { 112086, true },
+  { 112104, true },
+  { 112121, true },
+  { 112132, true },
+  { 112154, true },
+  { 112166, true },
+  { 112174, true },
   { 112195, true },
-  { 112214, true },
-  { 112231, true },
-  { 112242, true },
+  { 112216, true },
+  { 112234, true },
   { 112250, true },
   { 112262, true },
-  { 112275, true },
-  { 112290, true },
-  { 112303, true },
+  { 112274, true },
+  { 112292, true },
+  { 112302, true },
   { 112316, true },
-  { 112330, true },
-  { 112342, true },
-  { 112354, true },
-  { 112371, true },
-  { 112384, true },
-  { 112399, true },
-  { 112412, true },
-  { 112424, true },
-  { 112438, true },
-  { 112449, true },
-  { 112472, true },
-  { 112490, true },
-  { 112511, true },
-  { 112530, true },
-  { 112543, true },
-  { 112561, true },
-  { 112578, true },
-  { 112589, true },
-  { 112611, true },
-  { 112623, true },
-  { 112631, true },
-  { 112652, true },
-  { 112673, true },
-  { 112691, true },
-  { 112707, true },
-  { 112719, true },
-  { 112731, true },
-  { 112749, true },
-  { 112759, true },
-  { 112773, true },
-  { 112789, true },
-  { 112815, false },
-  { 112844, true },
-  { 112855, true },
-  { 112870, true },
-  { 112886, true },
-  { 112901, true },
-  { 112915, true },
-  { 112942, true },
-  { 112960, false },
-  { 112971, true },
-  { 112981, true },
-  { 112996, true },
-  { 113007, true },
-  { 113025, true },
-  { 113048, true },
-  { 113066, true },
-  { 113079, true },
-  { 113090, false },
-  { 113104, true },
-  { 113126, true },
-  { 113145, true },
-  { 113159, true },
-  { 113171, false },
-  { 113191, true },
-  { 113207, true },
-  { 113217, true },
-  { 113231, true },
-  { 113249, true },
-  { 113261, true },
-  { 113271, true },
-  { 113283, true },
-  { 113291, true },
-  { 113305, true },
-  { 113317, true },
-  { 113335, true },
-  { 113347, true },
-  { 113359, true },
-  { 113371, true },
-  { 113383, true },
-  { 113395, true },
-  { 113407, true },
-  { 113419, true },
-  { 113431, true },
-  { 113447, false },
-  { 113467, true },
-  { 113476, true },
-  { 113490, true },
-  { 113506, true },
-  { 113519, true },
-  { 113542, true },
-  { 113555, true },
-  { 113563, true },
-  { 113581, true },
-  { 113595, true },
-  { 113608, true },
+  { 112332, true },
+  { 112358, false },
+  { 112387, true },
+  { 112398, true },
+  { 112413, true },
+  { 112429, true },
+  { 112444, true },
+  { 112458, true },
+  { 112485, true },
+  { 112503, false },
+  { 112514, true },
+  { 112524, true },
+  { 112539, true },
+  { 112550, true },
+  { 112568, true },
+  { 112591, true },
+  { 112609, true },
+  { 112622, true },
+  { 112633, false },
+  { 112647, true },
+  { 112669, true },
+  { 112688, true },
+  { 112702, true },
+  { 112714, false },
+  { 112734, true },
+  { 112750, true },
+  { 112760, true },
+  { 112774, true },
+  { 112792, true },
+  { 112804, true },
+  { 112814, true },
+  { 112826, true },
+  { 112834, true },
+  { 112848, true },
+  { 112860, true },
+  { 112878, true },
+  { 112890, true },
+  { 112902, true },
+  { 112914, true },
+  { 112926, true },
+  { 112938, true },
+  { 112950, true },
+  { 112962, true },
+  { 112974, true },
+  { 112990, false },
+  { 113010, true },
+  { 113019, true },
+  { 113033, true },
+  { 113049, true },
+  { 113062, true },
+  { 113085, true },
+  { 113098, true },
+  { 113106, true },
+  { 113124, true },
+  { 113138, true },
+  { 113151, true },
+  { 113167, true },
+  { 113184, false },
+  { 113198, true },
+  { 113214, true },
+  { 113221, true },
+  { 113228, true },
+  { 113243, true },
+  { 113258, true },
+  { 113270, true },
+  { 113288, true },
+  { 113307, true },
+  { 113329, true },
+  { 113349, true },
+  { 113366, true },
+  { 113384, true },
+  { 113402, true },
+  { 113424, true },
+  { 113438, true },
+  { 113454, true },
+  { 113471, true },
+  { 113492, true },
+  { 113507, true },
+  { 113531, true },
+  { 113548, true },
+  { 113561, true },
+  { 113572, true },
+  { 113585, true },
+  { 113598, true },
+  { 113612, true },
   { 113624, true },
-  { 113641, false },
-  { 113655, true },
+  { 113634, true },
+  { 113645, true },
+  { 113660, true },
   { 113671, true },
-  { 113678, true },
-  { 113685, true },
-  { 113700, true },
-  { 113715, true },
-  { 113727, true },
-  { 113745, true },
-  { 113764, true },
-  { 113786, true },
-  { 113806, true },
-  { 113823, true },
-  { 113841, true },
-  { 113859, true },
-  { 113881, true },
-  { 113895, true },
-  { 113911, true },
-  { 113928, true },
-  { 113949, true },
-  { 113964, true },
-  { 113988, true },
-  { 114005, true },
-  { 114018, true },
-  { 114029, true },
-  { 114042, true },
+  { 113683, true },
+  { 113692, true },
+  { 113702, true },
+  { 113711, true },
+  { 113722, true },
+  { 113747, true },
+  { 113759, true },
+  { 113777, true },
+  { 113793, true },
+  { 113804, true },
+  { 113827, true },
+  { 113848, true },
+  { 113866, true },
+  { 113885, false },
+  { 113899, true },
+  { 113910, true },
+  { 113923, true },
+  { 113937, true },
+  { 113952, true },
+  { 113963, true },
+  { 113977, true },
+  { 113990, true },
+  { 114004, true },
+  { 114017, true },
+  { 114028, true },
+  { 114041, true },
   { 114055, true },
-  { 114069, true },
-  { 114081, true },
-  { 114091, true },
-  { 114102, true },
-  { 114117, true },
-  { 114128, true },
-  { 114140, true },
-  { 114149, true },
-  { 114159, true },
-  { 114168, true },
-  { 114179, true },
-  { 114204, true },
-  { 114216, true },
-  { 114234, true },
-  { 114250, true },
-  { 114261, true },
+  { 114064, true },
+  { 114079, true },
+  { 114092, true },
+  { 114105, true },
+  { 114124, true },
+  { 114142, true },
+  { 114158, true },
+  { 114171, true },
+  { 114183, true },
+  { 114198, true },
+  { 114208, true },
+  { 114218, true },
+  { 114232, true },
+  { 114243, true },
+  { 114270, true },
   { 114284, true },
-  { 114305, true },
-  { 114323, true },
-  { 114342, false },
-  { 114356, true },
-  { 114367, true },
+  { 114292, true },
+  { 114314, true },
+  { 114328, true },
+  { 114342, true },
+  { 114361, true },
   { 114380, true },
-  { 114394, true },
-  { 114409, true },
-  { 114420, true },
-  { 114434, true },
-  { 114447, true },
-  { 114461, true },
-  { 114474, true },
-  { 114485, true },
-  { 114498, true },
-  { 114512, true },
-  { 114521, true },
-  { 114536, true },
-  { 114549, true },
-  { 114562, true },
-  { 114581, true },
-  { 114599, true },
-  { 114615, true },
-  { 114628, true },
-  { 114640, true },
-  { 114655, true },
-  { 114665, true },
-  { 114675, true },
-  { 114689, true },
-  { 114700, true },
-  { 114727, true },
-  { 114741, true },
-  { 114749, true },
-  { 114771, true },
-  { 114785, true },
-  { 114799, true },
-  { 114818, true },
-  { 114837, true },
-  { 114856, true },
-  { 114875, true },
-  { 114895, true },
-  { 114915, true },
-  { 114935, true },
-  { 114953, true },
-  { 114972, true },
-  { 114991, true },
-  { 115010, true },
-  { 115029, true },
-  { 115043, true },
-  { 115055, true },
-  { 115067, true },
-  { 115080, false },
-  { 115102, true },
-  { 115117, true },
-  { 115129, true },
-  { 115137, true },
-  { 115162, true },
+  { 114399, true },
+  { 114418, true },
+  { 114438, true },
+  { 114458, true },
+  { 114478, true },
+  { 114496, true },
+  { 114515, true },
+  { 114534, true },
+  { 114553, true },
+  { 114572, true },
+  { 114586, true },
+  { 114598, true },
+  { 114610, true },
+  { 114623, false },
+  { 114645, true },
+  { 114660, true },
+  { 114672, true },
+  { 114680, true },
+  { 114705, true },
+  { 114721, true },
+  { 114730, true },
+  { 114742, true },
+  { 114759, true },
+  { 114772, true },
+  { 114787, true },
+  { 114803, true },
+  { 114816, true },
+  { 114828, true },
+  { 114838, true },
+  { 114849, true },
+  { 114863, true },
+  { 114878, true },
+  { 114891, true },
+  { 114902, true },
+  { 114916, true },
+  { 114931, true },
+  { 114940, true },
+  { 114956, true },
+  { 114975, true },
+  { 114989, true },
+  { 115004, true },
+  { 115015, true },
+  { 115025, true },
+  { 115037, true },
+  { 115052, true },
+  { 115069, true },
+  { 115100, true },
+  { 115115, true },
+  { 115136, true },
+  { 115150, true },
+  { 115168, true },
   { 115178, true },
-  { 115187, true },
-  { 115199, true },
-  { 115216, true },
-  { 115229, true },
-  { 115244, true },
-  { 115260, true },
-  { 115273, true },
-  { 115285, true },
-  { 115295, true },
-  { 115306, true },
-  { 115320, true },
-  { 115335, true },
-  { 115348, true },
-  { 115359, true },
-  { 115373, true },
-  { 115388, true },
+  { 115190, true },
+  { 115200, true },
+  { 115213, true },
+  { 115228, true },
+  { 115241, true },
+  { 115253, true },
+  { 115261, true },
+  { 115279, false },
+  { 115289, true },
+  { 115304, true },
+  { 115321, true },
+  { 115336, true },
+  { 115349, true },
+  { 115361, true },
+  { 115377, true },
   { 115397, true },
-  { 115413, true },
-  { 115432, true },
-  { 115446, true },
+  { 115412, true },
+  { 115426, true },
+  { 115438, true },
+  { 115451, true },
   { 115461, true },
-  { 115472, true },
-  { 115482, true },
-  { 115494, true },
-  { 115509, true },
-  { 115526, true },
+  { 115475, true },
+  { 115485, true },
+  { 115505, true },
+  { 115514, true },
+  { 115524, true },
+  { 115535, false },
+  { 115544, true },
   { 115557, true },
-  { 115572, true },
-  { 115593, true },
-  { 115607, true },
-  { 115625, true },
-  { 115635, true },
-  { 115647, true },
-  { 115657, true },
+  { 115576, true },
+  { 115586, true },
+  { 115597, true },
+  { 115610, true },
+  { 115617, true },
+  { 115633, true },
+  { 115644, true },
+  { 115651, true },
+  { 115660, true },
   { 115670, true },
-  { 115685, true },
-  { 115698, true },
-  { 115710, true },
-  { 115718, true },
-  { 115736, false },
-  { 115746, true },
+  { 115691, true },
+  { 115703, true },
+  { 115712, true },
+  { 115720, true },
+  { 115729, true },
+  { 115740, true },
+  { 115750, true },
   { 115761, true },
-  { 115778, true },
-  { 115793, true },
-  { 115806, true },
-  { 115818, true },
-  { 115834, true },
-  { 115854, true },
-  { 115869, true },
-  { 115883, true },
-  { 115895, true },
-  { 115908, true },
-  { 115918, true },
-  { 115932, true },
-  { 115942, true },
-  { 115962, true },
-  { 115971, true },
-  { 115981, true },
-  { 115992, false },
-  { 116001, true },
-  { 116014, true },
-  { 116033, true },
+  { 115768, true },
+  { 115777, true },
+  { 115785, true },
+  { 115796, true },
+  { 115808, true },
+  { 115816, true },
+  { 115824, true },
+  { 115838, true },
+  { 115848, true },
+  { 115864, true },
+  { 115876, true },
+  { 115906, true },
+  { 115926, true },
+  { 115940, false },
+  { 115958, false },
+  { 115974, true },
+  { 115989, true },
+  { 116010, true },
+  { 116024, true },
   { 116043, true },
   { 116054, true },
-  { 116067, true },
-  { 116074, true },
-  { 116090, true },
-  { 116101, true },
-  { 116108, true },
-  { 116117, true },
-  { 116127, true },
-  { 116148, true },
-  { 116160, true },
-  { 116169, true },
-  { 116177, true },
-  { 116186, true },
-  { 116197, true },
-  { 116207, true },
-  { 116218, true },
-  { 116225, true },
-  { 116234, true },
+  { 116064, true },
+  { 116075, true },
+  { 116089, true },
+  { 116102, true },
+  { 116112, false },
+  { 116128, true },
+  { 116147, true },
+  { 116173, true },
+  { 116196, true },
+  { 116213, true },
+  { 116226, true },
   { 116242, true },
-  { 116253, true },
-  { 116261, true },
-  { 116275, true },
-  { 116285, true },
-  { 116301, true },
-  { 116313, true },
-  { 116343, true },
-  { 116363, true },
-  { 116377, false },
-  { 116395, false },
-  { 116411, true },
+  { 116250, true },
+  { 116263, true },
+  { 116270, true },
+  { 116282, true },
+  { 116292, true },
+  { 116304, true },
+  { 116324, false },
+  { 116342, true },
+  { 116355, true },
+  { 116366, true },
+  { 116376, true },
+  { 116390, false },
+  { 116406, true },
+  { 116417, true },
   { 116426, true },
-  { 116447, true },
+  { 116434, true },
+  { 116444, true },
   { 116461, true },
-  { 116480, true },
-  { 116491, true },
-  { 116501, true },
-  { 116512, true },
-  { 116526, true },
-  { 116539, true },
-  { 116549, false },
-  { 116565, true },
-  { 116584, true },
-  { 116610, true },
-  { 116633, true },
-  { 116650, true },
-  { 116663, true },
-  { 116679, true },
-  { 116687, true },
-  { 116700, true },
-  { 116707, true },
-  { 116719, true },
-  { 116729, true },
-  { 116741, true },
-  { 116761, false },
-  { 116779, true },
-  { 116792, true },
-  { 116803, true },
-  { 116813, true },
-  { 116827, false },
-  { 116843, true },
-  { 116854, true },
-  { 116863, true },
-  { 116871, true },
-  { 116881, true },
-  { 116898, true },
-  { 116909, true },
-  { 116925, true },
-  { 116936, true },
-  { 116948, true },
-  { 116958, false },
-  { 116973, true },
-  { 116988, true },
-  { 117003, true },
-  { 117022, true },
-  { 117042, true },
-  { 117053, true },
-  { 117067, true },
-  { 117082, true },
-  { 117098, true },
+  { 116472, true },
+  { 116488, true },
+  { 116499, true },
+  { 116511, true },
+  { 116521, false },
+  { 116536, true },
+  { 116551, true },
+  { 116566, true },
+  { 116585, true },
+  { 116605, true },
+  { 116616, true },
+  { 116630, true },
+  { 116645, true },
+  { 116661, true },
+  { 116683, true },
+  { 116696, true },
+  { 116715, true },
+  { 116728, true },
+  { 116737, true },
+  { 116752, true },
+  { 116765, true },
+  { 116777, true },
+  { 116794, true },
+  { 116818, true },
+  { 116831, true },
+  { 116848, true },
+  { 116860, true },
+  { 116873, true },
+  { 116888, true },
+  { 116895, true },
+  { 116908, true },
+  { 116921, true },
+  { 116935, true },
+  { 116952, true },
+  { 116967, true },
+  { 116981, true },
+  { 116993, true },
+  { 117008, true },
+  { 117023, true },
+  { 117038, true },
+  { 117057, true },
+  { 117076, true },
+  { 117095, true },
+  { 117110, true },
   { 117120, true },
-  { 117133, true },
-  { 117152, true },
-  { 117165, true },
-  { 117174, true },
-  { 117189, true },
+  { 117133, false },
+  { 117146, true },
+  { 117160, true },
+  { 117171, true },
+  { 117186, true },
   { 117202, true },
-  { 117214, true },
-  { 117231, true },
-  { 117255, true },
-  { 117268, true },
-  { 117285, true },
-  { 117297, true },
-  { 117310, true },
-  { 117325, true },
+  { 117215, true },
+  { 117228, true },
+  { 117248, true },
+  { 117257, true },
+  { 117273, true },
+  { 117286, true },
+  { 117301, true },
+  { 117314, true },
   { 117332, true },
-  { 117345, true },
-  { 117358, true },
-  { 117372, true },
+  { 117340, false },
+  { 117353, true },
+  { 117371, true },
   { 117389, true },
-  { 117404, true },
-  { 117418, true },
-  { 117430, true },
-  { 117445, true },
-  { 117460, true },
-  { 117475, true },
-  { 117494, true },
-  { 117513, true },
-  { 117532, true },
-  { 117547, true },
-  { 117557, true },
-  { 117570, false },
-  { 117583, true },
-  { 117597, true },
-  { 117608, true },
-  { 117623, true },
-  { 117639, true },
-  { 117652, true },
-  { 117665, true },
-  { 117685, true },
-  { 117694, true },
-  { 117710, true },
-  { 117723, true },
-  { 117738, true },
-  { 117751, true },
-  { 117769, true },
-  { 117777, false },
-  { 117790, true },
-  { 117808, true },
-  { 117826, true },
-  { 117857, true },
-  { 117887, true },
-  { 117909, true },
-  { 117925, true },
-  { 117936, false },
-  { 117949, true },
-  { 117961, true },
-  { 117976, true },
-  { 117993, false },
-  { 118012, true },
-  { 118023, true },
-  { 118039, true },
-  { 118049, true },
-  { 118061, true },
-  { 118077, true },
-  { 118088, true },
-  { 118105, true },
-  { 118118, true },
-  { 118138, true },
+  { 117420, true },
+  { 117450, true },
+  { 117472, true },
+  { 117488, true },
+  { 117499, false },
+  { 117512, true },
+  { 117524, true },
+  { 117539, true },
+  { 117556, false },
+  { 117575, true },
+  { 117586, true },
+  { 117602, true },
+  { 117612, true },
+  { 117624, true },
+  { 117640, true },
+  { 117651, true },
+  { 117668, true },
+  { 117681, true },
+  { 117701, true },
+  { 117711, true },
+  { 117722, true },
+  { 117732, false },
+  { 117747, true },
+  { 117762, true },
+  { 117779, true },
+  { 117794, true },
+  { 117805, true },
+  { 117818, true },
+  { 117831, true },
+  { 117844, true },
+  { 117861, true },
+  { 117873, true },
+  { 117890, true },
+  { 117903, true },
+  { 117912, true },
+  { 117923, true },
+  { 117933, true },
+  { 117947, true },
+  { 117958, true },
+  { 117966, true },
+  { 117975, true },
+  { 117989, true },
+  { 117999, true },
+  { 118011, true },
+  { 118021, true },
+  { 118030, true },
+  { 118043, true },
+  { 118054, false },
+  { 118062, true },
+  { 118073, false },
+  { 118093, true },
+  { 118100, false },
+  { 118116, true },
+  { 118128, true },
   { 118148, true },
-  { 118159, true },
-  { 118169, false },
-  { 118184, true },
+  { 118162, false },
+  { 118173, true },
+  { 118189, true },
   { 118199, true },
-  { 118216, true },
-  { 118231, true },
-  { 118242, true },
-  { 118255, true },
-  { 118268, true },
-  { 118281, true },
-  { 118298, true },
-  { 118310, true },
-  { 118327, true },
-  { 118340, true },
-  { 118349, true },
-  { 118360, true },
-  { 118370, true },
-  { 118384, true },
-  { 118395, true },
-  { 118403, true },
-  { 118412, true },
-  { 118426, true },
-  { 118436, true },
-  { 118448, true },
-  { 118458, true },
-  { 118467, true },
-  { 118480, true },
-  { 118491, false },
-  { 118499, true },
-  { 118506, true },
+  { 118212, true },
+  { 118230, true },
+  { 118244, true },
+  { 118261, true },
+  { 118280, true },
+  { 118303, true },
+  { 118315, true },
+  { 118337, true },
+  { 118347, true },
+  { 118361, true },
+  { 118371, true },
+  { 118382, true },
+  { 118391, true },
+  { 118400, true },
+  { 118413, true },
+  { 118430, true },
+  { 118446, true },
+  { 118460, true },
+  { 118468, true },
+  { 118482, true },
+  { 118501, true },
   { 118517, false },
-  { 118537, true },
-  { 118544, false },
-  { 118560, true },
-  { 118572, true },
-  { 118592, true },
-  { 118606, false },
-  { 118617, true },
-  { 118633, true },
-  { 118643, true },
-  { 118656, true },
-  { 118674, true },
-  { 118688, true },
-  { 118705, true },
-  { 118724, true },
-  { 118747, true },
-  { 118759, true },
-  { 118781, true },
-  { 118791, true },
-  { 118805, true },
-  { 118815, true },
-  { 118826, true },
-  { 118835, true },
-  { 118844, true },
-  { 118857, true },
-  { 118874, true },
-  { 118890, true },
-  { 118904, true },
-  { 118912, true },
-  { 118926, true },
-  { 118945, true },
-  { 118961, false },
+  { 118531, true },
+  { 118544, true },
+  { 118561, true },
+  { 118576, true },
+  { 118587, true },
+  { 118598, true },
+  { 118612, true },
+  { 118626, true },
+  { 118641, true },
+  { 118662, true },
+  { 118678, true },
+  { 118696, true },
+  { 118714, true },
+  { 118727, true },
+  { 118739, true },
+  { 118755, true },
+  { 118772, true },
+  { 118783, true },
+  { 118802, true },
+  { 118810, true },
+  { 118824, true },
+  { 118833, true },
+  { 118840, false },
+  { 118860, true },
+  { 118870, false },
+  { 118889, false },
+  { 118902, false },
+  { 118914, true },
+  { 118935, true },
+  { 118948, true },
+  { 118966, true },
   { 118975, true },
-  { 118988, true },
-  { 119005, true },
-  { 119020, true },
+  { 118991, true },
+  { 119015, false },
   { 119031, true },
-  { 119042, true },
-  { 119056, true },
-  { 119070, true },
-  { 119085, true },
-  { 119106, true },
-  { 119122, true },
+  { 119049, true },
+  { 119061, true },
+  { 119078, true },
+  { 119092, true },
+  { 119107, true },
+  { 119126, true },
   { 119140, true },
   { 119158, true },
-  { 119171, true },
-  { 119183, true },
-  { 119199, true },
-  { 119216, true },
-  { 119227, true },
-  { 119246, true },
-  { 119254, true },
+  { 119168, false },
+  { 119197, true },
+  { 119221, true },
+  { 119240, true },
+  { 119253, true },
   { 119268, true },
-  { 119277, true },
-  { 119284, false },
-  { 119304, true },
-  { 119314, false },
-  { 119333, false },
-  { 119346, false },
-  { 119358, true },
-  { 119379, true },
-  { 119392, true },
-  { 119410, true },
-  { 119419, true },
-  { 119435, true },
-  { 119459, false },
-  { 119475, true },
-  { 119493, true },
-  { 119505, true },
-  { 119522, true },
-  { 119536, true },
-  { 119551, true },
-  { 119570, true },
-  { 119584, true },
-  { 119602, true },
-  { 119612, false },
-  { 119641, true },
-  { 119665, true },
-  { 119684, true },
-  { 119697, true },
-  { 119712, true },
-  { 119726, true },
-  { 119741, true },
-  { 119759, true },
-  { 119769, false },
-  { 119784, true },
-  { 119792, true },
-  { 119805, false },
-  { 119819, true },
-  { 119830, true },
-  { 119838, true },
-  { 119846, true },
-  { 119860, true },
+  { 119282, true },
+  { 119297, true },
+  { 119315, true },
+  { 119325, false },
+  { 119340, true },
+  { 119348, true },
+  { 119361, false },
+  { 119375, true },
+  { 119386, true },
+  { 119394, true },
+  { 119402, true },
+  { 119416, true },
+  { 119438, true },
+  { 119450, true },
+  { 119462, true },
+  { 119477, true },
+  { 119497, true },
+  { 119520, true },
+  { 119539, true },
+  { 119558, true },
+  { 119577, true },
+  { 119596, true },
+  { 119615, true },
+  { 119634, true },
+  { 119653, true },
+  { 119670, true },
+  { 119688, true },
+  { 119705, true },
+  { 119718, true },
+  { 119732, true },
+  { 119747, true },
+  { 119765, true },
+  { 119780, true },
+  { 119793, false },
+  { 119807, true },
+  { 119831, true },
+  { 119848, true },
+  { 119866, true },
   { 119882, true },
-  { 119894, true },
-  { 119906, true },
-  { 119921, true },
-  { 119941, true },
-  { 119964, true },
-  { 119983, true },
-  { 120002, true },
-  { 120021, true },
-  { 120040, true },
-  { 120059, true },
-  { 120078, true },
-  { 120097, true },
-  { 120114, true },
-  { 120132, true },
-  { 120149, true },
-  { 120162, true },
-  { 120176, true },
-  { 120191, true },
-  { 120209, true },
-  { 120224, true },
-  { 120237, false },
-  { 120251, true },
-  { 120275, true },
-  { 120292, true },
-  { 120310, true },
-  { 120326, true },
-  { 120344, true },
-  { 120361, true },
-  { 120377, true },
-  { 120390, true },
-  { 120403, true },
-  { 120420, true },
-  { 120452, true },
-  { 120469, true },
-  { 120477, true },
+  { 119900, true },
+  { 119917, true },
+  { 119933, true },
+  { 119946, true },
+  { 119959, true },
+  { 119976, true },
+  { 119993, true },
+  { 120001, true },
+  { 120014, true },
+  { 120028, true },
+  { 120044, true },
+  { 120060, true },
+  { 120074, true },
+  { 120087, true },
+  { 120100, true },
+  { 120110, true },
+  { 120123, true },
+  { 120133, true },
+  { 120148, true },
+  { 120163, false },
+  { 120173, false },
+  { 120183, true },
+  { 120195, false },
+  { 120206, true },
+  { 120213, true },
+  { 120226, true },
+  { 120238, true },
+  { 120258, true },
+  { 120269, true },
+  { 120290, true },
+  { 120306, true },
+  { 120323, true },
+  { 120342, true },
+  { 120352, true },
+  { 120363, true },
+  { 120372, true },
+  { 120381, true },
+  { 120394, true },
+  { 120423, true },
+  { 120442, true },
+  { 120459, true },
+  { 120482, true },
   { 120490, true },
-  { 120504, true },
-  { 120531, true },
-  { 120547, true },
-  { 120563, true },
-  { 120577, true },
-  { 120590, true },
-  { 120603, true },
-  { 120613, true },
-  { 120626, true },
-  { 120636, true },
-  { 120651, true },
-  { 120666, false },
-  { 120676, false },
+  { 120508, false },
+  { 120522, true },
+  { 120535, true },
+  { 120546, true },
+  { 120559, true },
+  { 120576, true },
+  { 120589, true },
+  { 120600, false },
+  { 120612, true },
+  { 120621, true },
+  { 120631, true },
+  { 120640, true },
+  { 120650, true },
+  { 120663, true },
+  { 120673, true },
   { 120686, true },
-  { 120698, false },
+  { 120696, true },
   { 120709, true },
-  { 120716, true },
-  { 120729, true },
-  { 120741, true },
-  { 120761, true },
-  { 120772, true },
-  { 120793, true },
-  { 120809, true },
-  { 120826, true },
-  { 120845, true },
-  { 120855, true },
-  { 120866, true },
-  { 120875, true },
+  { 120728, true },
+  { 120739, true },
+  { 120754, true },
+  { 120768, true },
+  { 120779, true },
+  { 120791, true },
+  { 120799, true },
+  { 120813, true },
+  { 120828, false },
+  { 120842, true },
+  { 120856, true },
+  { 120865, true },
   { 120884, true },
-  { 120897, true },
-  { 120926, true },
-  { 120945, true },
-  { 120962, true },
-  { 120985, true },
-  { 120993, true },
-  { 121011, false },
-  { 121025, true },
-  { 121038, true },
-  { 121049, true },
-  { 121062, true },
-  { 121079, true },
-  { 121092, true },
-  { 121103, false },
-  { 121115, true },
-  { 121124, true },
-  { 121134, true },
-  { 121143, true },
-  { 121153, true },
-  { 121166, true },
-  { 121176, true },
-  { 121189, true },
-  { 121199, true },
-  { 121212, true },
-  { 121231, true },
-  { 121242, true },
-  { 121257, true },
-  { 121271, true },
-  { 121282, true },
-  { 121294, true },
-  { 121302, true },
-  { 121316, true },
-  { 121331, false },
-  { 121345, true },
+  { 120905, true },
+  { 120920, true },
+  { 120932, true },
+  { 120943, true },
+  { 120956, true },
+  { 120966, true },
+  { 120987, true },
+  { 121005, true },
+  { 121026, true },
+  { 121052, true },
+  { 121075, true },
+  { 121108, true },
+  { 121127, true },
+  { 121151, true },
+  { 121162, true },
+  { 121173, true },
+  { 121186, true },
+  { 121197, true },
+  { 121211, true },
+  { 121222, true },
+  { 121232, true },
+  { 121240, true },
+  { 121247, true },
+  { 121258, true },
+  { 121269, true },
+  { 121279, true },
+  { 121288, true },
+  { 121303, true },
+  { 121318, true },
+  { 121329, true },
+  { 121338, true },
+  { 121349, true },
   { 121360, true },
   { 121374, true },
   { 121383, true },
-  { 121402, true },
-  { 121423, true },
-  { 121438, true },
-  { 121450, true },
-  { 121461, true },
-  { 121474, true },
+  { 121399, true },
+  { 121407, true },
+  { 121419, true },
+  { 121431, true },
+  { 121447, true },
+  { 121457, true },
+  { 121476, true },
   { 121484, true },
-  { 121505, true },
-  { 121523, true },
-  { 121544, true },
-  { 121570, true },
-  { 121593, true },
-  { 121626, true },
-  { 121645, true },
-  { 121669, true },
-  { 121680, true },
-  { 121691, true },
-  { 121704, true },
-  { 121715, true },
-  { 121729, true },
-  { 121740, true },
-  { 121750, true },
-  { 121758, true },
-  { 121765, true },
-  { 121776, true },
-  { 121787, true },
-  { 121797, true },
-  { 121806, true },
+  { 121497, true },
+  { 121506, true },
+  { 121527, true },
+  { 121546, true },
+  { 121562, true },
+  { 121577, true },
+  { 121590, true },
+  { 121607, true },
+  { 121623, true },
+  { 121631, true },
+  { 121640, true },
+  { 121648, true },
+  { 121662, true },
+  { 121681, false },
+  { 121690, true },
+  { 121700, true },
+  { 121722, true },
+  { 121736, true },
+  { 121751, true },
+  { 121764, false },
+  { 121778, true },
+  { 121786, true },
+  { 121798, true },
+  { 121809, true },
   { 121821, true },
-  { 121836, true },
-  { 121847, true },
-  { 121856, true },
+  { 121830, true },
+  { 121841, false },
+  { 121851, false },
   { 121867, true },
-  { 121878, true },
-  { 121892, true },
+  { 121877, true },
+  { 121887, true },
   { 121901, true },
-  { 121917, true },
-  { 121925, true },
+  { 121916, true },
+  { 121928, true },
   { 121937, true },
-  { 121949, true },
-  { 121965, true },
-  { 121975, true },
-  { 121994, true },
-  { 122002, true },
-  { 122015, true },
-  { 122024, true },
-  { 122045, true },
-  { 122064, true },
-  { 122080, true },
-  { 122095, true },
-  { 122108, true },
-  { 122125, true },
-  { 122141, true },
-  { 122149, true },
-  { 122158, true },
-  { 122166, true },
+  { 121950, true },
+  { 121960, true },
+  { 121973, true },
+  { 121984, true },
+  { 122007, false },
+  { 122021, true },
+  { 122033, true },
+  { 122046, true },
+  { 122059, true },
+  { 122075, true },
+  { 122086, true },
+  { 122100, true },
+  { 122114, true },
+  { 122124, true },
+  { 122133, true },
+  { 122143, true },
+  { 122153, true },
+  { 122168, true },
   { 122180, true },
-  { 122199, false },
-  { 122208, true },
-  { 122230, true },
-  { 122244, true },
-  { 122259, true },
-  { 122272, false },
-  { 122286, true },
-  { 122294, true },
-  { 122306, true },
-  { 122317, true },
+  { 122192, true },
+  { 122206, true },
+  { 122223, true },
+  { 122233, false },
+  { 122242, false },
+  { 122261, true },
+  { 122277, true },
+  { 122292, true },
+  { 122302, true },
+  { 122314, true },
   { 122329, true },
-  { 122338, true },
-  { 122349, false },
-  { 122359, false },
-  { 122375, true },
-  { 122385, true },
-  { 122395, true },
-  { 122409, true },
-  { 122424, true },
-  { 122436, true },
-  { 122445, true },
-  { 122458, true },
-  { 122468, true },
-  { 122481, true },
-  { 122492, true },
-  { 122515, false },
-  { 122529, true },
-  { 122541, true },
-  { 122554, true },
-  { 122567, true },
-  { 122583, true },
-  { 122594, true },
-  { 122608, true },
-  { 122622, true },
-  { 122632, true },
-  { 122641, true },
-  { 122651, true },
-  { 122661, true },
-  { 122676, true },
-  { 122688, true },
-  { 122700, true },
-  { 122714, true },
-  { 122731, true },
-  { 122741, false },
-  { 122750, false },
+  { 122341, false },
+  { 122353, true },
+  { 122366, true },
+  { 122384, true },
+  { 122399, true },
+  { 122414, false },
+  { 122430, true },
+  { 122442, true },
+  { 122454, true },
+  { 122465, true },
+  { 122478, false },
+  { 122493, true },
+  { 122508, true },
+  { 122518, true },
+  { 122538, true },
+  { 122548, true },
+  { 122562, true },
+  { 122576, true },
+  { 122588, true },
+  { 122599, true },
+  { 122615, true },
+  { 122626, true },
+  { 122644, true },
+  { 122662, true },
+  { 122675, true },
+  { 122696, false },
+  { 122715, true },
+  { 122735, true },
+  { 122757, true },
   { 122769, true },
-  { 122785, true },
-  { 122800, true },
-  { 122810, true },
-  { 122822, true },
-  { 122837, true },
-  { 122849, true },
+  { 122787, true },
+  { 122802, true },
+  { 122814, true },
+  { 122830, true },
+  { 122845, true },
   { 122861, true },
-  { 122874, true },
-  { 122892, true },
-  { 122907, true },
-  { 122922, false },
-  { 122938, true },
-  { 122950, true },
-  { 122962, true },
-  { 122973, true },
-  { 122986, false },
-  { 123001, true },
-  { 123016, true },
-  { 123026, true },
-  { 123046, true },
-  { 123056, true },
-  { 123070, true },
-  { 123084, true },
-  { 123096, true },
-  { 123107, true },
-  { 123123, true },
-  { 123134, true },
-  { 123152, true },
-  { 123170, true },
-  { 123183, true },
-  { 123204, false },
-  { 123223, true },
-  { 123243, true },
-  { 123265, true },
-  { 123277, true },
-  { 123295, true },
-  { 123310, true },
-  { 123322, true },
-  { 123338, true },
-  { 123353, true },
+  { 122877, true },
+  { 122893, true },
+  { 122910, true },
+  { 122932, true },
+  { 122943, true },
+  { 122959, true },
+  { 122979, true },
+  { 122990, true },
+  { 123005, true },
+  { 123021, true },
+  { 123036, true },
+  { 123051, true },
+  { 123074, true },
+  { 123089, true },
+  { 123114, true },
+  { 123132, true },
+  { 123147, true },
+  { 123163, true },
+  { 123178, true },
+  { 123207, true },
+  { 123232, true },
+  { 123254, true },
+  { 123272, true },
+  { 123286, true },
+  { 123299, true },
+  { 123314, true },
+  { 123321, true },
+  { 123337, true },
+  { 123348, true },
+  { 123359, true },
   { 123369, true },
-  { 123385, true },
-  { 123401, true },
-  { 123418, true },
-  { 123440, true },
-  { 123451, true },
-  { 123467, true },
-  { 123487, true },
+  { 123383, true },
+  { 123397, true },
+  { 123409, true },
+  { 123421, true },
+  { 123432, true },
+  { 123447, true },
+  { 123462, true },
+  { 123469, true },
+  { 123479, true },
+  { 123489, true },
   { 123498, true },
-  { 123513, true },
-  { 123529, true },
-  { 123544, true },
-  { 123559, true },
-  { 123582, true },
-  { 123597, true },
-  { 123622, true },
-  { 123640, true },
-  { 123655, true },
-  { 123671, true },
-  { 123686, true },
-  { 123715, true },
-  { 123740, true },
-  { 123762, true },
-  { 123780, true },
-  { 123794, true },
-  { 123807, true },
-  { 123822, true },
-  { 123829, true },
-  { 123845, true },
-  { 123856, true },
-  { 123867, true },
-  { 123877, true },
-  { 123891, true },
-  { 123905, true },
-  { 123917, true },
-  { 123929, true },
-  { 123940, true },
-  { 123955, true },
-  { 123970, true },
-  { 123977, true },
-  { 123987, true },
-  { 123997, true },
-  { 124006, true },
-  { 124022, true },
-  { 124031, true },
-  { 124040, true },
-  { 124049, true },
-  { 124061, true },
-  { 124077, true },
-  { 124096, true },
-  { 124108, false },
-  { 124125, true },
-  { 124145, true },
-  { 124160, true },
-  { 124173, true },
-  { 124191, true },
-  { 124206, true },
-  { 124215, true },
-  { 124230, true },
-  { 124244, true },
-  { 124260, true },
-  { 124275, true },
-  { 124297, true },
-  { 124316, true },
-  { 124335, true },
-  { 124351, true },
-  { 124362, true },
-  { 124371, true },
-  { 124381, true },
-  { 124400, true },
-  { 124415, true },
-  { 124429, true },
-  { 124442, true },
-  { 124450, true },
-  { 124458, true },
-  { 124467, true },
-  { 124479, true },
-  { 124491, true },
-  { 124500, true },
-  { 124512, true },
-  { 124520, true },
-  { 124532, true },
-  { 124558, true },
-  { 124581, false },
-  { 124597, true },
-  { 124617, true },
-  { 124638, true },
+  { 123514, true },
+  { 123523, true },
+  { 123532, true },
+  { 123541, true },
+  { 123553, true },
+  { 123569, true },
+  { 123588, true },
+  { 123600, false },
+  { 123617, true },
+  { 123637, true },
+  { 123652, true },
+  { 123665, true },
+  { 123683, true },
+  { 123698, true },
+  { 123707, true },
+  { 123722, true },
+  { 123736, true },
+  { 123752, true },
+  { 123767, true },
+  { 123789, true },
+  { 123808, true },
+  { 123827, true },
+  { 123843, true },
+  { 123854, true },
+  { 123863, true },
+  { 123873, true },
+  { 123892, true },
+  { 123907, true },
+  { 123921, true },
+  { 123934, true },
+  { 123942, true },
+  { 123950, true },
+  { 123959, true },
+  { 123971, true },
+  { 123983, true },
+  { 123992, true },
+  { 124004, true },
+  { 124012, true },
+  { 124024, true },
+  { 124050, true },
+  { 124073, false },
+  { 124089, true },
+  { 124109, true },
+  { 124130, true },
+  { 124149, true },
+  { 124163, true },
+  { 124177, true },
+  { 124194, true },
+  { 124208, true },
+  { 124222, true },
+  { 124232, false },
+  { 124247, true },
+  { 124255, true },
+  { 124270, true },
+  { 124285, true },
+  { 124299, true },
+  { 124317, true },
+  { 124334, true },
+  { 124354, true },
+  { 124378, true },
+  { 124385, true },
+  { 124396, true },
+  { 124407, true },
+  { 124420, true },
+  { 124432, true },
+  { 124448, true },
+  { 124461, true },
+  { 124471, true },
+  { 124486, false },
+  { 124495, true },
+  { 124509, true },
+  { 124524, true },
+  { 124534, true },
+  { 124544, true },
+  { 124557, true },
+  { 124569, true },
+  { 124577, true },
+  { 124588, true },
+  { 124609, true },
+  { 124619, false },
+  { 124639, true },
+  { 124650, true },
   { 124657, true },
-  { 124671, true },
-  { 124685, true },
-  { 124702, true },
-  { 124716, true },
-  { 124730, true },
-  { 124740, false },
-  { 124755, true },
-  { 124763, true },
-  { 124778, true },
-  { 124793, true },
+  { 124667, true },
+  { 124677, true },
+  { 124685, false },
+  { 124705, true },
+  { 124714, true },
+  { 124723, true },
+  { 124741, true },
+  { 124753, true },
+  { 124767, true },
+  { 124782, true },
+  { 124794, true },
   { 124807, true },
-  { 124825, true },
-  { 124842, true },
+  { 124815, true },
+  { 124833, true },
+  { 124844, true },
+  { 124852, true },
   { 124862, true },
-  { 124886, true },
-  { 124893, true },
-  { 124904, true },
-  { 124915, true },
-  { 124928, true },
-  { 124940, false },
-  { 124955, true },
-  { 124971, true },
-  { 124984, true },
-  { 124994, true },
-  { 125009, true },
-  { 125023, true },
-  { 125038, true },
-  { 125048, true },
-  { 125058, true },
-  { 125071, true },
-  { 125083, true },
-  { 125091, true },
-  { 125102, true },
+  { 124871, true },
+  { 124884, true },
+  { 124894, true },
+  { 124906, true },
+  { 124918, true },
+  { 124932, true },
+  { 124948, true },
+  { 124966, true },
+  { 124979, true },
+  { 124992, false },
+  { 125005, true },
+  { 125024, true },
+  { 125032, true },
+  { 125044, true },
+  { 125056, true },
+  { 125082, true },
+  { 125100, true },
+  { 125111, true },
   { 125123, true },
-  { 125133, false },
-  { 125153, true },
-  { 125164, true },
-  { 125171, true },
-  { 125181, true },
-  { 125191, true },
-  { 125199, false },
-  { 125219, true },
-  { 125228, true },
-  { 125237, true },
-  { 125255, true },
-  { 125267, true },
-  { 125281, true },
-  { 125296, true },
-  { 125308, true },
-  { 125321, true },
-  { 125329, true },
-  { 125347, true },
-  { 125358, true },
-  { 125366, true },
+  { 125136, true },
+  { 125152, true },
+  { 125166, true },
+  { 125184, true },
+  { 125200, true },
+  { 125223, true },
+  { 125242, true },
+  { 125256, true },
+  { 125272, true },
+  { 125288, true },
+  { 125305, true },
+  { 125335, false },
+  { 125351, true },
+  { 125363, true },
   { 125376, true },
-  { 125385, true },
-  { 125398, true },
-  { 125408, true },
-  { 125420, true },
-  { 125432, true },
-  { 125446, true },
-  { 125462, true },
-  { 125480, true },
-  { 125493, true },
-  { 125506, false },
-  { 125519, true },
-  { 125538, true },
-  { 125546, true },
-  { 125558, true },
-  { 125571, true },
-  { 125583, true },
-  { 125609, true },
-  { 125627, true },
-  { 125644, true },
-  { 125655, true },
-  { 125667, true },
-  { 125680, true },
-  { 125696, true },
-  { 125710, true },
-  { 125728, true },
-  { 125744, true },
-  { 125767, true },
-  { 125786, true },
-  { 125800, true },
-  { 125816, true },
-  { 125832, true },
-  { 125849, true },
-  { 125879, false },
-  { 125895, true },
-  { 125907, true },
-  { 125920, true },
-  { 125937, true },
-  { 125951, true },
-  { 125968, true },
-  { 125983, true },
-  { 125998, true },
-  { 126009, true },
-  { 126027, true },
-  { 126043, true },
-  { 126055, true },
-  { 126072, true },
-  { 126084, false },
-  { 126098, true },
-  { 126105, false },
-  { 126137, true },
-  { 126151, true },
-  { 126161, true },
+  { 125393, true },
+  { 125407, true },
+  { 125424, true },
+  { 125439, true },
+  { 125454, true },
+  { 125465, true },
+  { 125483, true },
+  { 125499, true },
+  { 125511, true },
+  { 125528, true },
+  { 125540, false },
+  { 125554, true },
+  { 125561, false },
+  { 125593, true },
+  { 125607, true },
+  { 125617, true },
+  { 125631, true },
+  { 125648, true },
+  { 125660, true },
+  { 125674, true },
+  { 125690, true },
+  { 125705, true },
+  { 125716, true },
+  { 125727, true },
+  { 125739, true },
+  { 125748, true },
+  { 125755, true },
+  { 125766, true },
+  { 125774, true },
+  { 125781, true },
+  { 125791, true },
+  { 125802, true },
+  { 125810, true },
+  { 125818, true },
+  { 125826, true },
+  { 125839, true },
+  { 125854, true },
+  { 125864, true },
+  { 125874, true },
+  { 125881, true },
+  { 125893, true },
+  { 125909, true },
+  { 125921, true },
+  { 125933, true },
+  { 125945, true },
+  { 125954, true },
+  { 125965, true },
+  { 125980, true },
+  { 125988, true },
+  { 125999, true },
+  { 126010, true },
+  { 126024, true },
+  { 126040, true },
+  { 126052, true },
+  { 126066, true },
+  { 126080, false },
+  { 126090, true },
+  { 126111, true },
+  { 126132, true },
+  { 126146, true },
+  { 126158, true },
   { 126175, true },
-  { 126192, true },
-  { 126204, true },
-  { 126218, true },
-  { 126234, true },
-  { 126249, true },
-  { 126260, true },
-  { 126271, true },
-  { 126283, true },
-  { 126292, true },
-  { 126299, true },
-  { 126310, true },
-  { 126318, true },
-  { 126325, true },
-  { 126335, true },
-  { 126346, true },
-  { 126354, true },
-  { 126362, true },
-  { 126370, true },
-  { 126383, true },
-  { 126398, true },
-  { 126408, true },
-  { 126418, true },
-  { 126425, true },
-  { 126437, true },
-  { 126453, true },
-  { 126465, true },
-  { 126477, true },
-  { 126489, true },
-  { 126498, true },
-  { 126509, true },
-  { 126524, true },
-  { 126532, true },
-  { 126543, true },
-  { 126554, true },
-  { 126568, true },
-  { 126584, true },
-  { 126596, true },
-  { 126610, true },
-  { 126624, false },
+  { 126188, true },
+  { 126202, true },
+  { 126213, true },
+  { 126222, true },
+  { 126232, true },
+  { 126239, true },
+  { 126247, true },
+  { 126259, true },
+  { 126268, true },
+  { 126277, true },
+  { 126285, true },
+  { 126300, true },
+  { 126308, true },
+  { 126320, false },
+  { 126330, true },
+  { 126340, true },
+  { 126351, true },
+  { 126360, true },
+  { 126378, true },
+  { 126388, false },
+  { 126399, true },
+  { 126421, true },
+  { 126429, true },
+  { 126437, false },
+  { 126445, true },
+  { 126461, true },
+  { 126474, true },
+  { 126485, true },
+  { 126497, true },
+  { 126516, true },
+  { 126542, true },
+  { 126556, true },
+  { 126570, true },
+  { 126585, false },
+  { 126603, true },
+  { 126619, true },
   { 126634, true },
-  { 126655, true },
-  { 126676, true },
-  { 126690, true },
-  { 126702, true },
-  { 126719, true },
-  { 126732, true },
-  { 126746, true },
-  { 126757, true },
-  { 126766, true },
-  { 126776, true },
-  { 126783, true },
-  { 126791, true },
-  { 126803, true },
+  { 126645, true },
+  { 126661, true },
+  { 126673, true },
+  { 126685, true },
+  { 126698, true },
+  { 126710, true },
+  { 126717, true },
+  { 126730, true },
+  { 126747, true },
+  { 126769, true },
+  { 126779, true },
+  { 126789, true },
+  { 126801, false },
   { 126812, true },
-  { 126821, true },
-  { 126829, true },
-  { 126844, true },
-  { 126852, true },
-  { 126864, false },
-  { 126874, true },
-  { 126884, true },
-  { 126895, true },
-  { 126904, true },
-  { 126922, true },
-  { 126932, false },
-  { 126943, true },
-  { 126965, true },
-  { 126973, true },
-  { 126981, false },
-  { 126989, true },
-  { 127005, true },
-  { 127018, true },
-  { 127029, true },
-  { 127041, true },
-  { 127060, true },
-  { 127086, true },
-  { 127100, true },
-  { 127114, true },
+  { 126826, true },
+  { 126835, true },
+  { 126846, true },
+  { 126862, true },
+  { 126875, true },
+  { 126891, true },
+  { 126918, true },
+  { 126930, true },
+  { 126944, true },
+  { 126952, true },
+  { 126962, true },
+  { 126985, true },
+  { 126994, false },
+  { 127017, true },
+  { 127035, true },
+  { 127052, true },
+  { 127061, true },
+  { 127073, true },
+  { 127082, true },
+  { 127090, true },
+  { 127103, true },
   { 127128, true },
-  { 127143, false },
-  { 127161, true },
-  { 127177, true },
-  { 127192, true },
-  { 127203, true },
-  { 127219, true },
-  { 127231, true },
-  { 127243, true },
+  { 127139, true },
+  { 127152, true },
+  { 127166, true },
+  { 127179, false },
+  { 127190, true },
+  { 127198, true },
+  { 127210, false },
+  { 127221, true },
+  { 127236, true },
   { 127256, true },
-  { 127268, true },
-  { 127275, true },
-  { 127288, true },
-  { 127305, true },
-  { 127327, true },
-  { 127337, true },
-  { 127347, true },
-  { 127359, false },
-  { 127370, true },
-  { 127384, true },
-  { 127393, true },
-  { 127404, true },
-  { 127420, true },
-  { 127433, true },
-  { 127449, true },
-  { 127476, true },
-  { 127488, true },
-  { 127502, true },
-  { 127510, true },
-  { 127520, true },
-  { 127543, true },
-  { 127552, false },
+  { 127264, true },
+  { 127282, true },
+  { 127302, true },
+  { 127323, true },
+  { 127333, true },
+  { 127346, false },
+  { 127364, true },
+  { 127395, true },
+  { 127415, true },
+  { 127432, true },
+  { 127445, true },
+  { 127460, true },
+  { 127472, true },
+  { 127482, true },
+  { 127489, true },
+  { 127506, true },
+  { 127522, true },
+  { 127534, true },
+  { 127548, true },
+  { 127560, true },
   { 127575, true },
   { 127593, true },
-  { 127610, true },
-  { 127619, true },
-  { 127631, true },
-  { 127645, true },
-  { 127654, true },
-  { 127662, true },
+  { 127606, true },
+  { 127616, true },
+  { 127627, true },
+  { 127638, true },
+  { 127649, true },
+  { 127664, true },
   { 127675, true },
-  { 127700, true },
-  { 127711, true },
-  { 127724, true },
-  { 127738, true },
-  { 127751, false },
-  { 127762, true },
-  { 127770, true },
-  { 127782, false },
-  { 127793, true },
-  { 127808, true },
-  { 127828, true },
-  { 127836, true },
-  { 127854, true },
-  { 127874, true },
-  { 127893, true },
-  { 127914, true },
-  { 127932, true },
-  { 127942, true },
-  { 127955, false },
-  { 127973, true },
-  { 128004, true },
-  { 128024, true },
-  { 128041, true },
-  { 128054, true },
-  { 128069, true },
-  { 128081, true },
-  { 128091, true },
-  { 128098, true },
-  { 128115, true },
-  { 128131, true },
-  { 128143, true },
-  { 128157, true },
-  { 128169, true },
-  { 128184, true },
-  { 128202, true },
-  { 128215, true },
-  { 128225, true },
+  { 127687, false },
+  { 127699, true },
+  { 127716, true },
+  { 127730, true },
+  { 127747, true },
+  { 127757, true },
+  { 127770, false },
+  { 127788, true },
+  { 127799, true },
+  { 127815, true },
+  { 127830, true },
+  { 127847, true },
+  { 127864, true },
+  { 127881, true },
+  { 127891, true },
+  { 127901, true },
+  { 127916, true },
+  { 127933, true },
+  { 127951, true },
+  { 127966, true },
+  { 127991, true },
+  { 128008, true },
+  { 128027, true },
+  { 128044, true },
+  { 128064, true },
+  { 128085, true },
+  { 128099, true },
+  { 128124, true },
+  { 128145, true },
+  { 128167, true },
+  { 128197, true },
+  { 128221, true },
   { 128236, true },
-  { 128247, true },
-  { 128258, true },
-  { 128273, true },
-  { 128284, true },
-  { 128296, false },
-  { 128308, true },
-  { 128325, true },
-  { 128339, true },
-  { 128356, true },
-  { 128366, true },
-  { 128379, false },
-  { 128397, true },
-  { 128408, true },
-  { 128424, true },
-  { 128439, true },
-  { 128456, true },
-  { 128473, true },
+  { 128249, true },
+  { 128259, true },
+  { 128282, true },
+  { 128293, true },
+  { 128300, true },
+  { 128314, true },
+  { 128333, true },
+  { 128340, true },
+  { 128360, true },
+  { 128371, true },
+  { 128390, true },
+  { 128406, true },
+  { 128416, true },
+  { 128427, true },
+  { 128437, true },
+  { 128448, true },
+  { 128462, true },
+  { 128474, true },
   { 128490, true },
-  { 128500, true },
-  { 128515, true },
-  { 128525, true },
-  { 128540, true },
-  { 128557, true },
-  { 128575, true },
-  { 128590, true },
-  { 128615, true },
-  { 128632, true },
-  { 128651, true },
-  { 128668, true },
-  { 128688, true },
-  { 128709, true },
-  { 128723, true },
-  { 128748, true },
-  { 128769, true },
-  { 128791, true },
-  { 128821, true },
-  { 128845, true },
-  { 128860, true },
-  { 128870, true },
-  { 128893, true },
-  { 128904, true },
-  { 128911, true },
-  { 128925, true },
-  { 128944, true },
-  { 128951, true },
-  { 128971, true },
-  { 128982, true },
-  { 129001, true },
-  { 129017, true },
-  { 129027, true },
-  { 129038, true },
-  { 129048, true },
-  { 129059, true },
-  { 129073, true },
-  { 129085, true },
-  { 129101, true },
-  { 129109, true },
-  { 129119, true },
-  { 129129, true },
-  { 129141, true },
-  { 129152, true },
-  { 129167, true },
-  { 129191, true },
-  { 129205, true },
-  { 129213, true },
-  { 129231, true },
-  { 129242, true },
-  { 129255, true },
-  { 129266, true },
-  { 129285, true },
-  { 129296, true },
-  { 129311, true },
-  { 129326, true },
-  { 129338, true },
-  { 129356, true },
-  { 129376, true },
-  { 129388, true },
+  { 128498, true },
+  { 128508, true },
+  { 128518, true },
+  { 128530, true },
+  { 128541, true },
+  { 128556, true },
+  { 128580, true },
+  { 128594, true },
+  { 128602, true },
+  { 128620, true },
+  { 128631, true },
+  { 128644, true },
+  { 128655, true },
+  { 128674, true },
+  { 128685, true },
+  { 128700, true },
+  { 128715, true },
+  { 128727, true },
+  { 128745, true },
+  { 128765, true },
+  { 128777, true },
+  { 128794, true },
+  { 128809, true },
+  { 128823, true },
+  { 128837, true },
+  { 128848, true },
+  { 128857, true },
+  { 128866, true },
+  { 128884, true },
+  { 128895, true },
+  { 128902, true },
+  { 128913, true },
+  { 128930, false },
+  { 128956, false },
+  { 128968, true },
+  { 128981, true },
+  { 128995, true },
+  { 129006, true },
+  { 129023, true },
+  { 129033, true },
+  { 129046, true },
+  { 129061, true },
+  { 129082, true },
+  { 129106, true },
+  { 129120, true },
+  { 129131, true },
+  { 129145, true },
+  { 129160, true },
+  { 129170, true },
+  { 129183, true },
+  { 129196, true },
+  { 129209, true },
+  { 129232, true },
+  { 129252, true },
+  { 129274, true },
+  { 129288, true },
+  { 129303, false },
+  { 129316, true },
+  { 129331, true },
+  { 129342, true },
+  { 129362, true },
+  { 129375, false },
+  { 129394, true },
   { 129405, true },
-  { 129420, true },
-  { 129434, true },
-  { 129448, true },
-  { 129459, true },
-  { 129468, true },
-  { 129477, true },
+  { 129424, true },
+  { 129432, true },
+  { 129449, true },
+  { 129465, true },
+  { 129474, true },
+  { 129485, true },
   { 129495, true },
   { 129506, true },
-  { 129520, true },
-  { 129527, true },
-  { 129544, false },
-  { 129570, false },
-  { 129582, true },
-  { 129595, true },
-  { 129609, true },
-  { 129620, true },
-  { 129637, true },
-  { 129647, true },
-  { 129660, true },
-  { 129675, true },
-  { 129696, true },
+  { 129516, true },
+  { 129528, true },
+  { 129535, true },
+  { 129553, true },
+  { 129565, true },
+  { 129576, true },
+  { 129598, false },
+  { 129612, true },
+  { 129631, true },
+  { 129639, true },
+  { 129658, true },
+  { 129667, true },
+  { 129679, true },
+  { 129697, true },
+  { 129711, true },
   { 129720, true },
-  { 129734, true },
-  { 129745, true },
-  { 129759, true },
-  { 129774, true },
-  { 129784, true },
-  { 129797, true },
-  { 129810, true },
-  { 129823, true },
-  { 129846, true },
-  { 129866, true },
+  { 129736, true },
+  { 129744, true },
+  { 129756, true },
+  { 129771, true },
+  { 129791, true },
+  { 129799, true },
+  { 129812, true },
+  { 129830, true },
+  { 129842, true },
+  { 129861, true },
+  { 129875, true },
   { 129888, true },
-  { 129902, true },
-  { 129917, false },
-  { 129930, true },
-  { 129945, true },
-  { 129956, true },
-  { 129976, true },
-  { 129989, false },
-  { 130008, true },
-  { 130019, true },
-  { 130038, true },
-  { 130046, true },
-  { 130063, true },
-  { 130079, true },
-  { 130088, true },
-  { 130099, true },
-  { 130109, true },
-  { 130120, true },
+  { 129900, true },
+  { 129924, true },
+  { 129940, true },
+  { 129954, true },
+  { 129968, true },
+  { 129985, true },
+  { 130001, true },
+  { 130018, true },
+  { 130026, true },
+  { 130044, true },
+  { 130053, false },
+  { 130062, true },
+  { 130076, true },
+  { 130086, true },
+  { 130095, true },
+  { 130118, true },
   { 130130, true },
-  { 130137, true },
-  { 130155, true },
-  { 130167, true },
-  { 130178, true },
-  { 130200, false },
-  { 130214, true },
-  { 130233, true },
-  { 130241, true },
-  { 130260, true },
-  { 130269, true },
-  { 130281, true },
+  { 130140, false },
+  { 130149, true },
+  { 130156, true },
+  { 130165, true },
+  { 130173, true },
+  { 130182, false },
+  { 130196, true },
+  { 130210, true },
+  { 130220, true },
+  { 130230, true },
+  { 130240, true },
+  { 130258, false },
+  { 130271, true },
+  { 130289, true },
   { 130299, true },
-  { 130313, true },
-  { 130332, true },
-  { 130341, true },
-  { 130357, true },
-  { 130365, true },
-  { 130377, true },
-  { 130392, true },
-  { 130412, true },
-  { 130420, true },
-  { 130433, true },
-  { 130451, true },
-  { 130463, true },
-  { 130482, true },
-  { 130496, true },
-  { 130509, true },
-  { 130521, true },
-  { 130545, true },
-  { 130561, true },
-  { 130575, true },
-  { 130589, true },
-  { 130606, true },
-  { 130622, true },
-  { 130639, true },
-  { 130647, true },
-  { 130665, true },
-  { 130674, false },
-  { 130683, true },
-  { 130697, true },
-  { 130707, true },
-  { 130718, true },
-  { 130727, true },
-  { 130750, true },
-  { 130762, true },
-  { 130772, false },
-  { 130781, true },
-  { 130788, true },
-  { 130797, true },
-  { 130805, true },
-  { 130814, false },
-  { 130828, true },
-  { 130842, true },
-  { 130852, true },
-  { 130862, true },
-  { 130872, true },
-  { 130890, false },
-  { 130903, true },
-  { 130921, true },
-  { 130931, true },
-  { 130942, true },
-  { 130955, true },
-  { 130969, true },
-  { 130984, true },
-  { 130997, true },
-  { 131007, true },
-  { 131018, true },
-  { 131027, true },
-  { 131044, true },
-  { 131053, true },
-  { 131066, true },
-  { 131077, true },
-  { 131095, true },
-  { 131105, true },
-  { 131117, true },
-  { 131129, false },
-  { 131146, true },
-  { 131157, true },
-  { 131174, true },
-  { 131187, true },
-  { 131201, true },
-  { 131210, true },
-  { 131223, false },
-  { 131232, false },
-  { 131243, true },
-  { 131255, false },
-  { 131270, false },
-  { 131281, true },
-  { 131295, false },
-  { 131302, true },
-  { 131318, true },
-  { 131333, true },
+  { 130310, true },
+  { 130323, true },
+  { 130337, true },
+  { 130350, true },
+  { 130360, true },
+  { 130371, true },
+  { 130380, true },
+  { 130397, true },
+  { 130406, true },
+  { 130419, true },
+  { 130430, true },
+  { 130448, true },
+  { 130458, true },
+  { 130470, true },
+  { 130482, false },
+  { 130499, true },
+  { 130510, true },
+  { 130527, true },
+  { 130540, true },
+  { 130554, true },
+  { 130563, true },
+  { 130576, false },
+  { 130585, false },
+  { 130596, true },
+  { 130608, false },
+  { 130623, false },
+  { 130634, true },
+  { 130648, false },
+  { 130655, true },
+  { 130671, true },
+  { 130686, true },
+  { 130704, true },
+  { 130723, true },
+  { 130738, true },
+  { 130755, true },
+  { 130769, true },
+  { 130785, true },
+  { 130799, true },
+  { 130816, true },
+  { 130835, false },
+  { 130850, false },
+  { 130864, true },
+  { 130878, true },
+  { 130891, true },
+  { 130912, true },
+  { 130924, true },
+  { 130937, true },
+  { 130947, true },
+  { 130967, true },
+  { 130980, true },
+  { 130992, true },
+  { 131010, true },
+  { 131029, true },
+  { 131047, true },
+  { 131061, true },
+  { 131073, true },
+  { 131083, true },
+  { 131097, true },
+  { 131107, true },
+  { 131123, true },
+  { 131136, true },
+  { 131151, true },
+  { 131167, true },
+  { 131191, true },
+  { 131207, true },
+  { 131221, true },
+  { 131233, true },
+  { 131245, true },
+  { 131263, true },
+  { 131276, true },
+  { 131295, true },
+  { 131313, true },
+  { 131328, true },
   { 131351, true },
-  { 131370, true },
-  { 131385, true },
-  { 131402, true },
-  { 131416, true },
-  { 131432, true },
-  { 131446, true },
-  { 131463, true },
-  { 131482, false },
-  { 131497, false },
-  { 131511, true },
-  { 131525, true },
-  { 131538, true },
-  { 131559, true },
-  { 131571, true },
-  { 131584, true },
-  { 131594, true },
-  { 131614, true },
-  { 131627, true },
-  { 131639, true },
-  { 131657, true },
-  { 131676, true },
-  { 131694, true },
-  { 131708, true },
-  { 131720, true },
-  { 131730, true },
-  { 131744, true },
-  { 131754, true },
-  { 131770, true },
-  { 131783, true },
-  { 131798, true },
-  { 131814, true },
-  { 131838, true },
-  { 131854, true },
-  { 131868, true },
-  { 131880, true },
-  { 131892, true },
-  { 131910, true },
-  { 131923, true },
-  { 131942, true },
-  { 131960, true },
-  { 131975, true },
+  { 131368, true },
+  { 131387, true },
+  { 131407, true },
+  { 131430, true },
+  { 131449, true },
+  { 131468, true },
+  { 131487, true },
+  { 131506, true },
+  { 131517, true },
+  { 131527, true },
+  { 131542, true },
+  { 131563, true },
+  { 131583, true },
+  { 131602, true },
+  { 131616, true },
+  { 131628, true },
+  { 131638, true },
+  { 131650, true },
+  { 131668, true },
+  { 131684, true },
+  { 131705, true },
+  { 131717, true },
+  { 131727, false },
+  { 131739, true },
+  { 131756, true },
+  { 131774, true },
+  { 131794, true },
+  { 131809, true },
+  { 131821, true },
+  { 131832, true },
+  { 131844, true },
+  { 131856, false },
+  { 131873, true },
+  { 131886, true },
+  { 131904, true },
+  { 131919, true },
+  { 131934, true },
+  { 131954, true },
+  { 131966, true },
+  { 131980, true },
   { 131998, true },
-  { 132015, true },
-  { 132034, true },
+  { 132011, true },
+  { 132027, true },
+  { 132042, true },
   { 132054, true },
-  { 132077, true },
-  { 132096, true },
-  { 132115, true },
-  { 132134, true },
-  { 132153, true },
-  { 132164, true },
-  { 132174, true },
-  { 132189, true },
-  { 132210, true },
-  { 132230, true },
-  { 132249, true },
+  { 132070, true },
+  { 132080, true },
+  { 132087, true },
+  { 132102, true },
+  { 132122, true },
+  { 132135, true },
+  { 132146, true },
+  { 132159, true },
+  { 132168, true },
+  { 132188, true },
+  { 132208, true },
+  { 132231, true },
+  { 132251, true },
   { 132263, true },
-  { 132275, true },
-  { 132285, true },
-  { 132297, true },
-  { 132315, true },
-  { 132331, true },
-  { 132352, true },
-  { 132364, true },
-  { 132374, false },
-  { 132386, true },
-  { 132403, true },
+  { 132274, true },
+  { 132285, false },
+  { 132296, true },
+  { 132307, false },
+  { 132317, false },
+  { 132334, true },
+  { 132346, true },
+  { 132362, true },
+  { 132375, true },
+  { 132384, true },
+  { 132398, true },
+  { 132409, true },
   { 132421, true },
-  { 132441, true },
-  { 132456, true },
-  { 132468, true },
-  { 132479, true },
-  { 132491, true },
-  { 132503, false },
-  { 132520, true },
+  { 132439, true },
+  { 132453, true },
+  { 132466, true },
+  { 132475, true },
+  { 132490, true },
+  { 132501, true },
+  { 132521, true },
   { 132533, true },
-  { 132551, true },
-  { 132566, true },
-  { 132581, true },
-  { 132601, true },
-  { 132613, true },
-  { 132627, true },
-  { 132645, true },
-  { 132658, true },
-  { 132674, true },
-  { 132689, true },
-  { 132701, true },
-  { 132717, true },
-  { 132727, true },
-  { 132734, true },
-  { 132749, true },
-  { 132769, true },
-  { 132782, true },
-  { 132793, true },
-  { 132806, true },
+  { 132543, true },
+  { 132554, true },
+  { 132587, true },
+  { 132599, true },
+  { 132618, true },
+  { 132632, true },
+  { 132646, false },
+  { 132666, true },
+  { 132683, true },
+  { 132694, true },
+  { 132707, true },
+  { 132722, true },
+  { 132738, true },
+  { 132756, true },
+  { 132772, true },
+  { 132789, true },
+  { 132801, true },
   { 132815, true },
-  { 132835, true },
-  { 132855, true },
-  { 132878, true },
-  { 132898, true },
-  { 132910, true },
-  { 132921, true },
-  { 132932, false },
-  { 132943, true },
-  { 132954, false },
-  { 132964, false },
-  { 132981, true },
-  { 132993, true },
-  { 133009, true },
-  { 133022, true },
-  { 133031, true },
-  { 133045, true },
-  { 133056, true },
-  { 133068, true },
-  { 133086, true },
-  { 133100, true },
+  { 132831, true },
+  { 132844, true },
+  { 132856, true },
+  { 132867, true },
+  { 132884, true },
+  { 132893, true },
+  { 132902, true },
+  { 132915, true },
+  { 132946, true },
+  { 132959, true },
+  { 132972, true },
+  { 132985, true },
+  { 132996, true },
+  { 133005, true },
+  { 133020, true },
+  { 133032, true },
+  { 133048, true },
+  { 133069, true },
+  { 133086, false },
+  { 133099, true },
   { 133113, true },
-  { 133122, true },
-  { 133137, true },
-  { 133148, true },
-  { 133168, true },
-  { 133180, true },
-  { 133190, true },
+  { 133125, true },
+  { 133136, true },
+  { 133153, true },
+  { 133164, true },
+  { 133183, true },
   { 133201, true },
-  { 133234, true },
-  { 133246, true },
-  { 133265, true },
-  { 133279, true },
-  { 133293, false },
+  { 133237, true },
+  { 133250, true },
+  { 133264, true },
+  { 133273, true },
+  { 133283, true },
+  { 133295, true },
   { 133313, true },
-  { 133330, true },
-  { 133341, true },
-  { 133354, true },
-  { 133369, true },
-  { 133385, true },
-  { 133403, true },
-  { 133419, true },
-  { 133436, true },
-  { 133448, true },
-  { 133462, true },
-  { 133478, true },
-  { 133491, true },
+  { 133327, true },
+  { 133345, true },
+  { 133366, true },
+  { 133386, true },
+  { 133409, true },
+  { 133425, true },
+  { 133439, true },
+  { 133455, true },
+  { 133469, true },
+  { 133482, true },
   { 133503, true },
-  { 133514, true },
-  { 133531, true },
-  { 133540, true },
+  { 133523, true },
+  { 133532, true },
   { 133549, true },
-  { 133562, true },
-  { 133593, true },
-  { 133606, true },
-  { 133619, true },
-  { 133632, true },
-  { 133643, true },
-  { 133652, true },
-  { 133667, true },
-  { 133679, true },
-  { 133695, true },
-  { 133716, true },
-  { 133733, false },
-  { 133746, true },
-  { 133760, true },
-  { 133772, true },
-  { 133783, true },
-  { 133800, true },
+  { 133560, true },
+  { 133571, true },
+  { 133582, true },
+  { 133601, true },
+  { 133613, true },
+  { 133626, true },
+  { 133642, true },
+  { 133661, true },
+  { 133676, true },
+  { 133693, false },
+  { 133708, true },
+  { 133728, true },
+  { 133739, true },
+  { 133750, true },
+  { 133770, false },
+  { 133779, true },
+  { 133788, true },
+  { 133799, true },
   { 133811, true },
-  { 133830, true },
-  { 133848, true },
+  { 133825, true },
+  { 133843, true },
+  { 133857, true },
+  { 133869, true },
   { 133884, true },
   { 133897, true },
-  { 133911, true },
-  { 133920, true },
-  { 133930, true },
-  { 133942, true },
-  { 133960, true },
-  { 133974, true },
-  { 133992, true },
-  { 134013, true },
-  { 134033, true },
-  { 134056, true },
+  { 133914, true },
+  { 133924, true },
+  { 133945, true },
+  { 133973, false },
+  { 133984, true },
+  { 133991, true },
+  { 134002, true },
+  { 134012, true },
+  { 134022, true },
+  { 134036, true },
+  { 134050, true },
+  { 134061, false },
   { 134072, true },
-  { 134086, true },
-  { 134102, true },
-  { 134116, true },
-  { 134129, true },
-  { 134150, true },
-  { 134170, true },
-  { 134179, true },
-  { 134196, true },
-  { 134207, true },
-  { 134218, true },
-  { 134229, true },
-  { 134248, true },
-  { 134260, true },
-  { 134273, true },
-  { 134289, true },
+  { 134080, false },
+  { 134100, true },
+  { 134115, true },
+  { 134128, true },
+  { 134144, true },
+  { 134159, true },
+  { 134172, true },
+  { 134188, true },
+  { 134208, true },
+  { 134221, true },
+  { 134240, true },
+  { 134258, true },
+  { 134268, true },
+  { 134282, true },
+  { 134300, true },
   { 134308, true },
-  { 134323, true },
-  { 134340, false },
-  { 134355, true },
+  { 134328, true },
+  { 134360, true },
   { 134375, true },
-  { 134386, true },
-  { 134397, true },
-  { 134417, false },
-  { 134426, true },
-  { 134435, true },
-  { 134446, true },
-  { 134458, true },
-  { 134472, true },
-  { 134490, true },
-  { 134504, true },
-  { 134516, true },
-  { 134531, true },
-  { 134544, true },
-  { 134561, true },
-  { 134571, true },
-  { 134592, true },
-  { 134620, false },
-  { 134631, true },
-  { 134638, true },
-  { 134649, true },
-  { 134659, true },
-  { 134669, true },
-  { 134683, true },
-  { 134697, true },
-  { 134708, false },
-  { 134719, true },
-  { 134727, false },
-  { 134747, true },
-  { 134762, true },
+  { 134394, true },
+  { 134409, true },
+  { 134424, true },
+  { 134445, true },
+  { 134466, true },
+  { 134480, true },
+  { 134496, true },
+  { 134521, true },
+  { 134533, true },
+  { 134546, true },
+  { 134557, true },
+  { 134574, true },
+  { 134598, true },
+  { 134612, true },
+  { 134625, true },
+  { 134637, true },
+  { 134650, true },
+  { 134668, true },
+  { 134685, true },
+  { 134705, true },
+  { 134730, true },
+  { 134744, true },
+  { 134758, true },
   { 134775, true },
-  { 134791, true },
-  { 134806, true },
-  { 134819, true },
-  { 134835, true },
-  { 134855, true },
-  { 134868, true },
-  { 134887, true },
+  { 134795, true },
+  { 134811, true },
+  { 134829, true },
+  { 134844, true },
+  { 134857, true },
+  { 134872, true },
+  { 134880, false },
+  { 134893, true },
   { 134905, true },
-  { 134915, true },
-  { 134929, true },
-  { 134947, true },
-  { 134955, true },
-  { 134975, true },
-  { 135007, true },
-  { 135022, true },
-  { 135041, true },
-  { 135056, true },
-  { 135071, true },
-  { 135092, true },
-  { 135113, true },
-  { 135127, true },
-  { 135143, true },
-  { 135168, true },
-  { 135180, true },
-  { 135193, true },
-  { 135204, true },
-  { 135221, true },
-  { 135245, true },
-  { 135259, true },
-  { 135272, true },
-  { 135284, true },
-  { 135297, true },
-  { 135315, true },
-  { 135332, true },
-  { 135352, true },
-  { 135377, true },
-  { 135390, true },
-  { 135404, true },
-  { 135418, true },
-  { 135435, true },
-  { 135455, true },
-  { 135471, true },
-  { 135489, true },
-  { 135504, true },
-  { 135517, true },
-  { 135532, true },
-  { 135540, false },
-  { 135553, true },
-  { 135565, true },
-  { 135579, true },
-  { 135587, true },
-  { 135609, true },
-  { 135623, true },
-  { 135637, true },
-  { 135645, true },
+  { 134919, true },
+  { 134927, true },
+  { 134949, true },
+  { 134963, true },
+  { 134977, true },
+  { 134985, true },
+  { 135001, true },
+  { 135011, true },
+  { 135024, true },
+  { 135037, true },
+  { 135051, true },
+  { 135067, true },
+  { 135080, true },
+  { 135094, true },
+  { 135105, true },
+  { 135115, true },
+  { 135135, true },
+  { 135149, true },
+  { 135164, true },
+  { 135176, true },
+  { 135184, true },
+  { 135196, true },
+  { 135207, true },
+  { 135228, true },
+  { 135247, true },
+  { 135265, true },
+  { 135283, true },
+  { 135303, true },
+  { 135312, true },
+  { 135330, true },
+  { 135346, true },
+  { 135359, true },
+  { 135373, true },
+  { 135392, true },
+  { 135405, true },
+  { 135417, true },
+  { 135429, true },
+  { 135440, true },
+  { 135454, true },
+  { 135468, false },
+  { 135483, true },
+  { 135500, true },
+  { 135511, true },
+  { 135522, true },
+  { 135536, true },
+  { 135557, true },
+  { 135573, true },
+  { 135592, true },
+  { 135608, true },
+  { 135626, true },
+  { 135649, true },
   { 135661, true },
-  { 135671, true },
-  { 135684, true },
-  { 135697, true },
-  { 135711, true },
-  { 135727, true },
-  { 135740, true },
-  { 135754, true },
-  { 135765, true },
-  { 135775, true },
-  { 135795, true },
-  { 135809, true },
-  { 135824, true },
-  { 135836, true },
-  { 135844, true },
-  { 135856, true },
-  { 135867, true },
-  { 135888, true },
-  { 135907, true },
-  { 135925, true },
-  { 135943, true },
-  { 135963, true },
-  { 135972, true },
-  { 135990, true },
-  { 136006, true },
-  { 136019, true },
-  { 136033, true },
+  { 135670, true },
+  { 135683, true },
+  { 135701, true },
+  { 135716, true },
+  { 135731, true },
+  { 135747, true },
+  { 135762, true },
+  { 135777, true },
+  { 135792, true },
+  { 135808, true },
+  { 135823, true },
+  { 135838, true },
+  { 135853, true },
+  { 135869, true },
+  { 135879, true },
+  { 135892, true },
+  { 135905, true },
+  { 135915, true },
+  { 135927, false },
+  { 135938, true },
+  { 135952, true },
+  { 135964, false },
+  { 135983, true },
+  { 136000, true },
+  { 136013, true },
+  { 136029, false },
+  { 136042, false },
   { 136052, true },
   { 136065, true },
-  { 136077, true },
-  { 136089, true },
-  { 136100, true },
-  { 136114, true },
-  { 136128, false },
-  { 136143, true },
-  { 136160, true },
-  { 136171, true },
-  { 136182, true },
-  { 136196, true },
-  { 136217, true },
-  { 136233, true },
-  { 136252, true },
-  { 136268, true },
-  { 136286, true },
-  { 136309, true },
-  { 136321, true },
-  { 136330, true },
-  { 136343, true },
-  { 136361, true },
-  { 136376, true },
-  { 136391, true },
-  { 136407, true },
-  { 136422, true },
-  { 136437, true },
-  { 136452, true },
+  { 136075, true },
+  { 136085, false },
+  { 136094, false },
+  { 136102, false },
+  { 136122, true },
+  { 136135, true },
+  { 136147, false },
+  { 136159, true },
+  { 136176, true },
+  { 136190, true },
+  { 136207, true },
+  { 136223, true },
+  { 136242, true },
+  { 136258, false },
+  { 136275, true },
+  { 136289, true },
+  { 136303, true },
+  { 136324, true },
+  { 136338, true },
+  { 136354, true },
+  { 136367, false },
+  { 136381, true },
+  { 136395, true },
+  { 136414, true },
+  { 136436, true },
+  { 136451, true },
   { 136468, true },
-  { 136483, true },
-  { 136498, true },
-  { 136513, true },
-  { 136529, true },
-  { 136539, true },
-  { 136552, true },
-  { 136565, true },
-  { 136575, true },
-  { 136587, false },
-  { 136598, true },
-  { 136612, true },
-  { 136624, false },
+  { 136476, true },
+  { 136488, true },
+  { 136501, true },
+  { 136514, true },
+  { 136527, false },
+  { 136536, false },
+  { 136547, true },
+  { 136558, true },
+  { 136567, true },
+  { 136576, false },
+  { 136590, true },
+  { 136608, true },
+  { 136626, true },
   { 136643, true },
-  { 136660, true },
-  { 136673, true },
-  { 136689, false },
-  { 136702, false },
-  { 136712, true },
-  { 136725, true },
-  { 136735, true },
-  { 136745, false },
-  { 136754, false },
-  { 136762, false },
+  { 136655, false },
+  { 136671, false },
+  { 136695, true },
+  { 136722, true },
+  { 136741, true },
+  { 136749, true },
+  { 136758, true },
+  { 136770, true },
   { 136782, true },
-  { 136795, true },
-  { 136807, false },
-  { 136819, true },
-  { 136836, true },
-  { 136850, true },
-  { 136867, true },
-  { 136883, true },
-  { 136902, true },
-  { 136918, false },
-  { 136935, true },
-  { 136949, true },
-  { 136963, true },
-  { 136984, true },
-  { 136998, true },
-  { 137014, true },
-  { 137027, false },
-  { 137041, true },
-  { 137056, true },
-  { 137070, true },
-  { 137089, true },
-  { 137111, true },
-  { 137126, true },
-  { 137143, true },
-  { 137151, true },
-  { 137163, true },
-  { 137176, true },
-  { 137189, true },
-  { 137202, false },
-  { 137211, false },
-  { 137222, true },
-  { 137237, true },
-  { 137248, true },
-  { 137257, true },
-  { 137266, false },
-  { 137280, true },
-  { 137298, true },
-  { 137316, true },
-  { 137333, true },
-  { 137345, false },
-  { 137361, false },
-  { 137385, true },
-  { 137412, true },
-  { 137431, true },
-  { 137439, true },
-  { 137448, true },
-  { 137460, true },
-  { 137472, true },
-  { 137497, true },
-  { 137514, true },
+  { 136807, true },
+  { 136824, true },
+  { 136841, true },
+  { 136856, true },
+  { 136868, true },
+  { 136881, true },
+  { 136899, true },
+  { 136908, false },
+  { 136916, true },
+  { 136937, true },
+  { 136951, true },
+  { 136973, true },
+  { 136986, true },
+  { 136999, true },
+  { 137011, true },
+  { 137024, false },
+  { 137037, true },
+  { 137053, true },
+  { 137067, true },
+  { 137088, true },
+  { 137100, true },
+  { 137121, true },
+  { 137140, true },
+  { 137165, true },
+  { 137177, true },
+  { 137190, true },
+  { 137203, true },
+  { 137215, true },
+  { 137227, true },
+  { 137239, true },
+  { 137256, true },
+  { 137274, true },
+  { 137286, false },
+  { 137295, true },
+  { 137310, true },
+  { 137332, true },
+  { 137346, true },
+  { 137359, true },
+  { 137381, true },
+  { 137396, true },
+  { 137411, true },
+  { 137422, true },
+  { 137447, true },
+  { 137464, true },
+  { 137476, true },
+  { 137492, false },
+  { 137507, false },
   { 137531, true },
-  { 137546, true },
-  { 137558, true },
-  { 137571, true },
+  { 137539, true },
+  { 137552, true },
+  { 137564, true },
+  { 137577, true },
   { 137589, true },
-  { 137598, false },
-  { 137606, true },
-  { 137627, true },
-  { 137641, true },
-  { 137663, true },
-  { 137676, true },
+  { 137605, true },
+  { 137620, true },
+  { 137639, true },
+  { 137653, true },
+  { 137673, true },
   { 137689, true },
-  { 137701, true },
-  { 137714, false },
-  { 137727, true },
-  { 137743, true },
-  { 137757, true },
-  { 137778, true },
-  { 137790, true },
-  { 137811, true },
-  { 137830, true },
-  { 137855, true },
-  { 137867, true },
-  { 137880, true },
-  { 137893, true },
-  { 137905, true },
-  { 137917, true },
-  { 137929, true },
-  { 137946, true },
-  { 137964, true },
-  { 137976, false },
-  { 137985, true },
-  { 138000, true },
-  { 138022, true },
-  { 138036, true },
-  { 138049, true },
-  { 138071, true },
-  { 138086, true },
-  { 138101, true },
-  { 138112, true },
-  { 138137, true },
-  { 138154, true },
-  { 138170, false },
-  { 138185, false },
-  { 138209, true },
-  { 138217, true },
-  { 138230, true },
-  { 138242, true },
-  { 138255, true },
-  { 138268, true },
-  { 138280, true },
-  { 138296, true },
-  { 138311, true },
-  { 138330, true },
-  { 138344, true },
-  { 138358, true },
-  { 138378, true },
-  { 138394, true },
-  { 138413, true },
-  { 138433, true },
+  { 137708, true },
+  { 137728, true },
+  { 137740, true },
+  { 137752, true },
+  { 137782, true },
+  { 137794, true },
+  { 137805, true },
+  { 137815, true },
+  { 137829, true },
+  { 137842, true },
+  { 137860, false },
+  { 137870, true },
+  { 137885, true },
+  { 137903, true },
+  { 137912, true },
+  { 137925, false },
+  { 137942, true },
+  { 137958, true },
+  { 137969, true },
+  { 137980, true },
+  { 137990, true },
+  { 137999, true },
+  { 138013, true },
+  { 138034, true },
+  { 138045, true },
+  { 138067, true },
+  { 138082, true },
+  { 138092, true },
+  { 138114, true },
+  { 138136, true },
+  { 138153, true },
+  { 138167, true },
+  { 138180, true },
+  { 138197, true },
+  { 138222, true },
+  { 138238, true },
+  { 138248, true },
+  { 138259, true },
+  { 138268, false },
+  { 138277, true },
+  { 138287, true },
+  { 138301, true },
+  { 138319, true },
+  { 138328, true },
+  { 138352, true },
+  { 138373, true },
+  { 138393, true },
+  { 138411, true },
+  { 138424, true },
   { 138445, true },
-  { 138457, true },
-  { 138487, true },
-  { 138499, true },
-  { 138510, true },
-  { 138520, true },
-  { 138534, true },
-  { 138547, true },
-  { 138565, false },
-  { 138575, true },
-  { 138590, true },
-  { 138608, true },
-  { 138617, true },
-  { 138630, true },
-  { 138646, true },
-  { 138657, true },
-  { 138668, true },
-  { 138678, true },
-  { 138687, true },
-  { 138701, true },
-  { 138722, true },
-  { 138733, true },
-  { 138755, true },
-  { 138770, true },
-  { 138780, true },
-  { 138802, true },
-  { 138824, true },
-  { 138841, true },
-  { 138855, true },
-  { 138868, true },
-  { 138885, true },
-  { 138910, true },
-  { 138926, true },
-  { 138936, true },
-  { 138947, true },
-  { 138956, false },
-  { 138965, true },
-  { 138975, true },
-  { 138989, true },
-  { 139007, true },
-  { 139016, true },
-  { 139040, true },
-  { 139061, true },
-  { 139081, true },
-  { 139099, true },
-  { 139112, true },
-  { 139133, true },
-  { 139151, true },
-  { 139163, true },
-  { 139185, false },
-  { 139204, true },
-  { 139215, true },
+  { 138463, true },
+  { 138475, true },
+  { 138497, false },
+  { 138516, true },
+  { 138527, true },
+  { 138540, true },
+  { 138561, true },
+  { 138572, true },
+  { 138587, true },
+  { 138599, true },
+  { 138616, true },
+  { 138642, true },
+  { 138659, false },
+  { 138677, true },
+  { 138696, false },
+  { 138715, true },
+  { 138727, true },
+  { 138747, true },
+  { 138769, true },
+  { 138782, true },
+  { 138804, true },
+  { 138817, true },
+  { 138840, true },
+  { 138854, true },
+  { 138877, true },
+  { 138887, true },
+  { 138897, true },
+  { 138916, true },
+  { 138929, true },
+  { 138949, true },
+  { 138959, true },
+  { 138978, true },
+  { 138990, true },
+  { 139011, true },
+  { 139037, true },
+  { 139058, true },
+  { 139078, true },
+  { 139090, true },
+  { 139104, true },
+  { 139116, true },
+  { 139139, true },
+  { 139155, true },
+  { 139167, true },
+  { 139192, true },
+  { 139207, true },
   { 139228, true },
-  { 139249, true },
-  { 139260, true },
-  { 139275, true },
-  { 139287, true },
-  { 139304, true },
-  { 139330, true },
-  { 139347, false },
+  { 139245, true },
+  { 139266, false },
+  { 139283, true },
+  { 139293, true },
+  { 139307, true },
+  { 139321, true },
+  { 139331, true },
+  { 139343, true },
+  { 139355, true },
   { 139365, true },
-  { 139384, false },
-  { 139403, true },
-  { 139415, true },
+  { 139379, true },
+  { 139391, true },
+  { 139420, true },
   { 139435, true },
-  { 139457, true },
-  { 139470, true },
-  { 139492, true },
-  { 139505, true },
-  { 139528, true },
-  { 139542, true },
+  { 139449, true },
+  { 139463, true },
+  { 139479, true },
+  { 139494, true },
+  { 139506, true },
+  { 139526, true },
+  { 139540, true },
+  { 139553, true },
   { 139565, true },
-  { 139575, true },
-  { 139585, true },
-  { 139604, true },
-  { 139617, false },
-  { 139629, true },
-  { 139649, true },
+  { 139578, true },
+  { 139590, true },
+  { 139609, true },
+  { 139635, true },
   { 139659, true },
-  { 139678, true },
-  { 139690, true },
-  { 139716, true },
-  { 139737, true },
-  { 139757, true },
-  { 139769, true },
-  { 139783, true },
-  { 139795, true },
-  { 139818, true },
-  { 139834, true },
-  { 139846, true },
-  { 139871, true },
+  { 139682, true },
+  { 139694, true },
+  { 139712, true },
+  { 139728, true },
+  { 139748, true },
+  { 139766, true },
+  { 139786, true },
+  { 139807, true },
+  { 139820, true },
+  { 139840, true },
+  { 139848, true },
+  { 139867, true },
   { 139886, true },
-  { 139907, true },
-  { 139924, true },
-  { 139945, false },
-  { 139962, true },
-  { 139972, true },
-  { 139986, true },
-  { 140000, true },
-  { 140010, true },
-  { 140022, true },
-  { 140034, true },
-  { 140044, true },
-  { 140058, true },
+  { 139900, true },
+  { 139918, true },
+  { 139934, false },
+  { 139953, true },
+  { 139974, true },
+  { 139988, true },
+  { 139997, true },
+  { 140015, true },
+  { 140032, true },
+  { 140048, true },
   { 140070, true },
-  { 140099, true },
-  { 140114, true },
-  { 140128, true },
-  { 140142, true },
-  { 140158, true },
-  { 140173, true },
-  { 140185, true },
-  { 140205, true },
-  { 140219, true },
-  { 140232, true },
-  { 140244, true },
-  { 140257, true },
-  { 140269, true },
-  { 140288, true },
-  { 140314, true },
-  { 140338, true },
-  { 140361, true },
-  { 140373, true },
-  { 140391, true },
-  { 140407, true },
-  { 140427, true },
-  { 140445, true },
-  { 140465, true },
-  { 140486, true },
-  { 140499, true },
-  { 140519, true },
-  { 140527, true },
-  { 140546, true },
-  { 140565, true },
-  { 140579, true },
-  { 140597, false },
-  { 140616, true },
-  { 140637, true },
-  { 140651, true },
-  { 140660, true },
-  { 140678, true },
-  { 140695, true },
-  { 140711, true },
-  { 140733, true },
-  { 140750, true },
-  { 140768, true },
-  { 140787, true },
-  { 140804, true },
-  { 140817, true },
-  { 140827, true },
-  { 140835, true },
-  { 140863, true },
-  { 140880, true },
-  { 140894, true },
-  { 140909, false },
-  { 140922, true },
-  { 140934, true },
-  { 140944, true },
-  { 140957, true },
-  { 140972, true },
-  { 140984, true },
+  { 140087, true },
+  { 140105, true },
+  { 140124, true },
+  { 140141, true },
+  { 140154, true },
+  { 140164, true },
+  { 140172, true },
+  { 140200, true },
+  { 140217, true },
+  { 140231, true },
+  { 140246, false },
+  { 140259, true },
+  { 140271, true },
+  { 140281, true },
+  { 140294, true },
+  { 140309, true },
+  { 140321, true },
+  { 140333, true },
+  { 140345, true },
+  { 140357, true },
+  { 140370, true },
+  { 140383, true },
+  { 140395, true },
+  { 140411, true },
+  { 140423, true },
+  { 140436, true },
+  { 140446, true },
+  { 140456, true },
+  { 140471, true },
+  { 140482, true },
+  { 140500, true },
+  { 140508, true },
+  { 140516, true },
+  { 140528, true },
+  { 140542, true },
+  { 140559, true },
+  { 140574, true },
+  { 140590, true },
+  { 140605, true },
+  { 140620, true },
+  { 140635, true },
+  { 140643, true },
+  { 140658, true },
+  { 140671, true },
+  { 140679, true },
+  { 140689, true },
+  { 140710, true },
+  { 140723, true },
+  { 140735, true },
+  { 140743, true },
+  { 140760, true },
+  { 140776, true },
+  { 140783, true },
+  { 140794, true },
+  { 140802, false },
+  { 140826, true },
+  { 140858, true },
+  { 140885, true },
+  { 140905, true },
+  { 140929, true },
+  { 140946, false },
+  { 140959, true },
+  { 140974, true },
+  { 140985, true },
   { 140996, true },
-  { 141008, true },
-  { 141020, true },
-  { 141033, true },
-  { 141046, true },
-  { 141058, true },
-  { 141074, true },
-  { 141086, true },
-  { 141099, true },
-  { 141109, true },
-  { 141119, true },
-  { 141134, true },
-  { 141145, true },
-  { 141156, true },
-  { 141174, true },
-  { 141182, true },
-  { 141190, true },
-  { 141202, true },
-  { 141216, true },
-  { 141233, true },
-  { 141248, true },
-  { 141264, true },
+  { 141006, true },
+  { 141018, true },
+  { 141030, false },
+  { 141042, false },
+  { 141050, false },
+  { 141075, true },
+  { 141088, true },
+  { 141103, true },
+  { 141117, true },
+  { 141130, true },
+  { 141142, true },
+  { 141155, true },
+  { 141172, true },
+  { 141186, true },
+  { 141203, true },
+  { 141217, true },
+  { 141232, true },
+  { 141247, true },
+  { 141258, true },
+  { 141265, true },
   { 141279, true },
-  { 141294, true },
-  { 141309, true },
-  { 141317, true },
-  { 141332, true },
-  { 141345, true },
+  { 141287, true },
+  { 141295, false },
+  { 141310, true },
+  { 141322, true },
+  { 141336, true },
+  { 141346, true },
   { 141353, true },
-  { 141363, true },
-  { 141384, true },
-  { 141397, true },
-  { 141409, true },
-  { 141417, true },
-  { 141434, true },
-  { 141450, true },
+  { 141366, true },
+  { 141379, true },
+  { 141388, true },
+  { 141396, true },
+  { 141413, true },
+  { 141421, true },
+  { 141430, true },
+  { 141446, true },
   { 141457, true },
-  { 141468, true },
-  { 141476, false },
-  { 141500, true },
-  { 141532, true },
+  { 141469, true },
+  { 141479, true },
+  { 141496, false },
+  { 141507, true },
+  { 141515, true },
+  { 141525, true },
+  { 141534, true },
   { 141559, true },
-  { 141579, true },
-  { 141603, true },
-  { 141620, false },
-  { 141633, true },
-  { 141648, true },
-  { 141659, true },
-  { 141670, true },
-  { 141680, true },
-  { 141692, true },
-  { 141704, false },
-  { 141716, false },
-  { 141724, false },
-  { 141749, true },
-  { 141762, true },
-  { 141777, true },
-  { 141791, true },
-  { 141804, true },
-  { 141816, true },
-  { 141829, true },
-  { 141846, true },
-  { 141860, true },
-  { 141877, true },
-  { 141891, true },
-  { 141906, true },
-  { 141921, true },
-  { 141932, true },
-  { 141939, true },
-  { 141953, true },
-  { 141961, true },
-  { 141969, false },
-  { 141984, true },
-  { 141996, true },
-  { 142010, true },
-  { 142020, true },
-  { 142030, true },
-  { 142037, true },
-  { 142050, true },
-  { 142063, true },
-  { 142072, true },
-  { 142080, true },
-  { 142097, true },
-  { 142105, true },
-  { 142114, true },
-  { 142130, true },
-  { 142141, true },
-  { 142153, true },
-  { 142163, true },
-  { 142180, false },
-  { 142191, true },
+  { 141575, true },
+  { 141587, true },
+  { 141600, true },
+  { 141608, true },
+  { 141616, false },
+  { 141636, false },
+  { 141655, false },
+  { 141674, false },
+  { 141694, false },
+  { 141714, false },
+  { 141734, false },
+  { 141753, false },
+  { 141772, true },
+  { 141783, true },
+  { 141793, true },
+  { 141802, true },
+  { 141815, true },
+  { 141830, true },
+  { 141840, true },
+  { 141853, true },
+  { 141865, false },
+  { 141876, true },
+  { 141887, true },
+  { 141896, true },
+  { 141904, true },
+  { 141917, true },
+  { 141925, true },
+  { 141935, true },
+  { 141944, true },
+  { 141967, true },
+  { 141986, false },
+  { 141997, true },
+  { 142019, true },
+  { 142033, true },
+  { 142042, true },
+  { 142049, true },
+  { 142058, true },
+  { 142065, true },
+  { 142077, true },
+  { 142094, true },
+  { 142101, true },
+  { 142109, true },
+  { 142120, true },
+  { 142134, true },
+  { 142146, true },
+  { 142158, true },
+  { 142167, true },
+  { 142176, true },
+  { 142188, false },
   { 142199, true },
-  { 142209, true },
-  { 142218, true },
-  { 142243, true },
-  { 142259, true },
-  { 142271, true },
-  { 142284, true },
-  { 142292, true },
-  { 142300, false },
-  { 142320, false },
-  { 142339, false },
-  { 142358, false },
-  { 142378, false },
-  { 142398, false },
-  { 142418, false },
-  { 142437, false },
-  { 142456, true },
-  { 142467, true },
-  { 142477, true },
-  { 142486, true },
-  { 142499, true },
-  { 142514, true },
-  { 142524, true },
-  { 142537, true },
-  { 142549, false },
-  { 142560, true },
-  { 142571, true },
-  { 142580, true },
-  { 142588, true },
-  { 142601, true },
-  { 142609, true },
-  { 142619, true },
-  { 142628, true },
-  { 142651, true },
-  { 142670, false },
-  { 142681, true },
-  { 142703, true },
-  { 142717, true },
-  { 142726, true },
-  { 142733, true },
-  { 142742, true },
-  { 142749, true },
-  { 142761, true },
-  { 142778, true },
-  { 142785, true },
-  { 142793, true },
-  { 142804, true },
-  { 142818, true },
-  { 142830, true },
-  { 142842, true },
-  { 142851, true },
-  { 142860, true },
-  { 142872, false },
-  { 142883, true },
-  { 142896, true },
-  { 142922, true },
-  { 142945, false },
-  { 142965, true },
-  { 142982, true },
+  { 142212, true },
+  { 142238, true },
+  { 142261, false },
+  { 142281, true },
+  { 142298, true },
+  { 142313, true },
+  { 142327, true },
+  { 142346, true },
+  { 142359, true },
+  { 142370, true },
+  { 142388, true },
+  { 142403, true },
+  { 142423, true },
+  { 142438, true },
+  { 142447, true },
+  { 142468, true },
+  { 142488, true },
+  { 142503, true },
+  { 142518, true },
+  { 142533, true },
+  { 142547, true },
+  { 142561, true },
+  { 142570, true },
+  { 142581, true },
+  { 142596, true },
+  { 142605, true },
+  { 142613, true },
+  { 142631, true },
+  { 142642, true },
+  { 142652, true },
+  { 142661, true },
+  { 142672, true },
+  { 142682, true },
+  { 142691, true },
+  { 142704, true },
+  { 142715, true },
+  { 142725, true },
+  { 142732, true },
+  { 142743, true },
+  { 142754, true },
+  { 142768, true },
+  { 142775, true },
+  { 142786, true },
+  { 142794, true },
+  { 142812, true },
+  { 142825, true },
+  { 142837, true },
+  { 142845, true },
+  { 142865, false },
+  { 142881, true },
+  { 142900, true },
+  { 142923, true },
+  { 142942, true },
+  { 142953, true },
+  { 142975, true },
+  { 142988, true },
   { 142997, true },
-  { 143011, true },
-  { 143030, true },
-  { 143043, true },
+  { 143020, true },
   { 143054, true },
-  { 143072, true },
-  { 143087, true },
-  { 143107, true },
-  { 143122, true },
-  { 143131, true },
-  { 143152, true },
-  { 143172, true },
+  { 143070, true },
+  { 143086, true },
+  { 143108, true },
+  { 143135, true },
+  { 143149, true },
+  { 143159, true },
+  { 143177, true },
   { 143187, true },
-  { 143202, true },
-  { 143217, true },
-  { 143231, true },
-  { 143245, true },
-  { 143254, true },
-  { 143265, true },
-  { 143280, true },
-  { 143289, true },
-  { 143297, true },
-  { 143315, true },
-  { 143326, true },
+  { 143206, true },
+  { 143220, true },
+  { 143234, true },
+  { 143250, true },
+  { 143261, true },
+  { 143272, true },
+  { 143295, true },
+  { 143318, true },
   { 143336, true },
-  { 143345, true },
-  { 143356, true },
-  { 143366, true },
-  { 143375, true },
+  { 143353, true },
+  { 143363, true },
   { 143388, true },
-  { 143399, true },
-  { 143409, true },
+  { 143406, true },
   { 143416, true },
-  { 143427, true },
-  { 143438, true },
+  { 143428, true },
+  { 143441, true },
   { 143452, true },
-  { 143463, true },
-  { 143471, true },
-  { 143489, true },
-  { 143502, true },
-  { 143514, true },
+  { 143469, true },
+  { 143479, true },
+  { 143500, true },
   { 143522, true },
-  { 143542, false },
-  { 143558, true },
-  { 143577, true },
-  { 143600, true },
-  { 143619, true },
-  { 143630, true },
-  { 143652, true },
-  { 143665, true },
-  { 143674, true },
-  { 143697, true },
-  { 143731, true },
-  { 143747, true },
-  { 143763, true },
+  { 143540, true },
+  { 143551, true },
+  { 143564, true },
+  { 143575, true },
+  { 143589, true },
+  { 143602, true },
+  { 143613, true },
+  { 143623, true },
+  { 143637, true },
+  { 143647, true },
+  { 143658, true },
+  { 143671, false },
+  { 143689, true },
+  { 143698, true },
+  { 143714, true },
+  { 143730, false },
+  { 143743, false },
+  { 143756, false },
+  { 143768, true },
   { 143785, true },
-  { 143812, true },
-  { 143826, true },
-  { 143836, true },
+  { 143796, true },
+  { 143811, true },
+  { 143823, true },
+  { 143840, true },
   { 143854, true },
-  { 143864, true },
-  { 143883, true },
-  { 143897, true },
-  { 143911, true },
-  { 143927, true },
-  { 143938, true },
-  { 143953, true },
-  { 143964, true },
-  { 143987, true },
-  { 144010, true },
-  { 144028, true },
-  { 144045, true },
-  { 144055, true },
-  { 144080, true },
-  { 144098, true },
-  { 144108, true },
-  { 144120, true },
-  { 144133, true },
-  { 144144, true },
-  { 144161, true },
-  { 144171, true },
-  { 144192, true },
-  { 144214, true },
+  { 143867, true },
+  { 143876, true },
+  { 143887, true },
+  { 143898, true },
+  { 143910, true },
+  { 143923, true },
+  { 143932, true },
+  { 143943, true },
+  { 143959, true },
+  { 143971, true },
+  { 143983, true },
+  { 143995, true },
+  { 144012, true },
+  { 144024, true },
+  { 144038, true },
+  { 144048, true },
+  { 144061, true },
+  { 144078, true },
+  { 144092, true },
+  { 144107, true },
+  { 144123, true },
+  { 144139, true },
+  { 144148, true },
+  { 144155, true },
+  { 144166, true },
+  { 144183, true },
+  { 144196, true },
+  { 144211, true },
+  { 144221, true },
   { 144232, true },
-  { 144243, true },
-  { 144256, true },
-  { 144267, true },
+  { 144255, true },
+  { 144267, false },
   { 144281, true },
-  { 144294, true },
-  { 144305, true },
-  { 144315, true },
-  { 144329, true },
-  { 144339, true },
-  { 144352, false },
-  { 144370, true },
-  { 144379, true },
+  { 144297, true },
+  { 144308, true },
+  { 144324, false },
+  { 144343, true },
+  { 144362, true },
+  { 144373, true },
   { 144394, true },
   { 144410, true },
-  { 144426, false },
-  { 144439, false },
-  { 144452, false },
-  { 144464, true },
-  { 144481, true },
-  { 144492, true },
-  { 144507, true },
-  { 144519, true },
-  { 144536, true },
-  { 144550, true },
-  { 144563, true },
-  { 144572, true },
-  { 144583, true },
-  { 144594, true },
-  { 144605, true },
-  { 144621, true },
-  { 144633, true },
-  { 144645, true },
-  { 144662, true },
+  { 144422, true },
+  { 144436, true },
+  { 144450, true },
+  { 144461, true },
+  { 144482, true },
+  { 144495, true },
+  { 144505, true },
+  { 144516, true },
+  { 144533, true },
+  { 144553, true },
+  { 144568, true },
+  { 144587, false },
+  { 144604, true },
+  { 144620, true },
+  { 144643, true },
+  { 144658, true },
   { 144674, true },
-  { 144688, true },
-  { 144698, true },
-  { 144711, true },
-  { 144728, true },
-  { 144742, true },
+  { 144685, true },
+  { 144693, true },
+  { 144705, true },
+  { 144713, true },
+  { 144739, true },
   { 144757, true },
-  { 144767, true },
-  { 144783, true },
-  { 144799, true },
-  { 144808, true },
-  { 144815, true },
-  { 144826, true },
-  { 144843, true },
-  { 144856, true },
-  { 144871, true },
-  { 144881, true },
-  { 144892, true },
-  { 144915, true },
-  { 144927, false },
-  { 144941, true },
-  { 144957, true },
-  { 144968, true },
-  { 144984, false },
-  { 145003, true },
-  { 145022, true },
-  { 145033, true },
-  { 145054, true },
-  { 145070, true },
-  { 145082, true },
-  { 145096, true },
-  { 145110, true },
-  { 145121, true },
-  { 145142, true },
-  { 145155, true },
-  { 145165, true },
-  { 145176, true },
-  { 145193, true },
-  { 145213, true },
-  { 145228, true },
-  { 145247, false },
-  { 145264, true },
-  { 145280, true },
+  { 144770, true },
+  { 144782, true },
+  { 144809, true },
+  { 144840, true },
+  { 144851, true },
+  { 144861, true },
+  { 144876, true },
+  { 144887, true },
+  { 144898, false },
+  { 144911, true },
+  { 144920, true },
+  { 144933, true },
+  { 144961, true },
+  { 144982, true },
+  { 144996, true },
+  { 145018, true },
+  { 145035, true },
+  { 145045, true },
+  { 145057, true },
+  { 145073, true },
+  { 145087, true },
+  { 145098, true },
+  { 145112, true },
+  { 145130, true },
+  { 145147, true },
+  { 145167, true },
+  { 145178, true },
+  { 145189, false },
+  { 145196, true },
+  { 145223, true },
+  { 145243, true },
+  { 145261, true },
+  { 145276, false },
+  { 145287, true },
   { 145303, true },
-  { 145318, true },
-  { 145334, true },
-  { 145345, true },
-  { 145353, true },
-  { 145376, true },
-  { 145388, true },
-  { 145396, true },
+  { 145320, true },
+  { 145337, true },
+  { 145359, true },
+  { 145373, true },
+  { 145389, false },
+  { 145406, true },
   { 145422, true },
-  { 145440, true },
+  { 145432, true },
   { 145453, true },
-  { 145465, true },
-  { 145492, true },
-  { 145523, true },
-  { 145534, true },
-  { 145544, true },
-  { 145559, true },
-  { 145570, true },
-  { 145581, false },
-  { 145594, true },
-  { 145603, true },
-  { 145616, true },
-  { 145644, true },
-  { 145665, true },
-  { 145679, true },
-  { 145701, true },
-  { 145718, true },
-  { 145728, true },
-  { 145740, true },
-  { 145756, true },
-  { 145770, true },
-  { 145781, true },
-  { 145795, true },
-  { 145813, true },
-  { 145830, true },
-  { 145850, true },
-  { 145861, true },
-  { 145872, false },
-  { 145879, true },
-  { 145906, true },
-  { 145926, true },
-  { 145944, true },
-  { 145959, false },
-  { 145970, true },
-  { 145986, true },
-  { 146003, true },
-  { 146020, true },
-  { 146042, true },
-  { 146056, true },
-  { 146072, false },
-  { 146089, true },
-  { 146105, true },
-  { 146115, true },
-  { 146136, true },
-  { 146154, true },
-  { 146172, true },
-  { 146186, true },
-  { 146196, true },
-  { 146207, true },
-  { 146229, true },
-  { 146246, true },
-  { 146266, true },
-  { 146280, true },
-  { 146295, true },
-  { 146312, true },
-  { 146329, true },
-  { 146350, true },
-  { 146366, true },
-  { 146389, true },
-  { 146406, true },
-  { 146424, true },
-  { 146434, true },
-  { 146450, true },
-  { 146461, false },
-  { 146481, true },
-  { 146494, true },
-  { 146504, true },
-  { 146521, true },
-  { 146541, true },
-  { 146556, true },
-  { 146570, true },
-  { 146588, true },
-  { 146602, true },
-  { 146623, true },
-  { 146634, true },
-  { 146648, true },
-  { 146664, false },
-  { 146678, true },
+  { 145471, true },
+  { 145489, true },
+  { 145503, true },
+  { 145513, true },
+  { 145524, true },
+  { 145546, true },
+  { 145563, true },
+  { 145583, true },
+  { 145597, true },
+  { 145612, true },
+  { 145629, true },
+  { 145646, true },
+  { 145667, true },
+  { 145683, true },
+  { 145706, true },
+  { 145723, true },
+  { 145741, true },
+  { 145751, true },
+  { 145767, true },
+  { 145778, false },
+  { 145798, true },
+  { 145811, true },
+  { 145821, true },
+  { 145838, true },
+  { 145858, true },
+  { 145873, true },
+  { 145887, true },
+  { 145905, true },
+  { 145919, true },
+  { 145940, true },
+  { 145951, true },
+  { 145965, true },
+  { 145981, false },
+  { 145995, true },
+  { 146011, true },
+  { 146028, true },
+  { 146045, true },
+  { 146061, true },
+  { 146081, true },
+  { 146104, true },
+  { 146113, false },
+  { 146121, true },
+  { 146133, false },
+  { 146155, true },
+  { 146170, true },
+  { 146184, true },
+  { 146198, true },
+  { 146211, true },
+  { 146226, true },
+  { 146240, true },
+  { 146261, true },
+  { 146272, true },
+  { 146282, true },
+  { 146290, true },
+  { 146302, true },
+  { 146327, true },
+  { 146337, true },
+  { 146362, true },
+  { 146375, false },
+  { 146400, true },
+  { 146417, true },
+  { 146430, true },
+  { 146438, true },
+  { 146447, true },
+  { 146461, true },
+  { 146474, true },
+  { 146490, true },
+  { 146500, true },
+  { 146511, true },
+  { 146522, true },
+  { 146538, true },
+  { 146548, false },
+  { 146560, true },
+  { 146572, true },
+  { 146587, true },
+  { 146605, true },
+  { 146617, true },
+  { 146627, true },
+  { 146643, true },
+  { 146667, true },
+  { 146680, true },
+  { 146687, true },
   { 146694, true },
-  { 146711, true },
-  { 146728, true },
+  { 146708, true },
+  { 146720, true },
+  { 146732, true },
   { 146744, true },
-  { 146764, true },
-  { 146787, true },
-  { 146796, false },
-  { 146804, true },
-  { 146816, false },
-  { 146838, true },
-  { 146853, true },
-  { 146867, true },
-  { 146881, true },
-  { 146894, true },
-  { 146909, true },
-  { 146923, true },
-  { 146944, true },
-  { 146955, true },
-  { 146965, true },
-  { 146973, true },
-  { 146985, true },
-  { 147010, true },
-  { 147020, true },
-  { 147045, true },
-  { 147058, false },
-  { 147083, true },
-  { 147100, true },
+  { 146758, true },
+  { 146779, true },
+  { 146792, true },
+  { 146803, true },
+  { 146820, true },
+  { 146835, true },
+  { 146860, true },
+  { 146875, true },
+  { 146886, true },
+  { 146895, true },
+  { 146917, true },
+  { 146926, true },
+  { 146941, true },
+  { 146951, true },
+  { 146967, true },
+  { 146980, true },
+  { 146992, true },
+  { 147009, true },
+  { 147030, true },
+  { 147051, true },
+  { 147068, true },
+  { 147086, true },
+  { 147098, true },
   { 147113, true },
-  { 147121, true },
-  { 147130, true },
-  { 147144, true },
-  { 147157, true },
-  { 147173, true },
-  { 147183, true },
-  { 147194, true },
-  { 147205, true },
-  { 147221, true },
-  { 147231, false },
-  { 147243, true },
-  { 147255, true },
-  { 147270, true },
-  { 147288, true },
-  { 147300, true },
-  { 147310, true },
-  { 147326, true },
-  { 147350, true },
-  { 147363, true },
-  { 147370, true },
-  { 147377, true },
-  { 147394, true },
-  { 147408, true },
-  { 147420, true },
-  { 147432, true },
-  { 147444, true },
-  { 147458, true },
-  { 147479, true },
-  { 147492, true },
-  { 147503, true },
-  { 147520, true },
-  { 147535, true },
-  { 147560, true },
-  { 147575, true },
-  { 147586, true },
-  { 147595, true },
-  { 147617, true },
-  { 147626, true },
-  { 147641, true },
-  { 147651, true },
-  { 147667, true },
-  { 147680, true },
-  { 147692, true },
-  { 147709, true },
-  { 147730, true },
-  { 147751, true },
+  { 147129, true },
+  { 147143, true },
+  { 147155, true },
+  { 147169, true },
+  { 147181, true },
+  { 147200, true },
+  { 147216, true },
+  { 147232, true },
+  { 147248, true },
+  { 147266, true },
+  { 147283, true },
+  { 147297, true },
+  { 147315, true },
+  { 147332, true },
+  { 147351, true },
+  { 147371, true },
+  { 147388, true },
+  { 147404, true },
+  { 147422, true },
+  { 147435, true },
+  { 147452, true },
+  { 147469, false },
+  { 147490, true },
+  { 147507, true },
+  { 147526, true },
+  { 147540, true },
+  { 147553, true },
+  { 147568, true },
+  { 147581, true },
+  { 147592, true },
+  { 147610, true },
+  { 147622, true },
+  { 147635, true },
+  { 147659, true },
+  { 147668, true },
+  { 147683, true },
+  { 147710, true },
+  { 147728, true },
+  { 147737, true },
+  { 147747, true },
+  { 147758, true },
   { 147768, true },
-  { 147786, true },
-  { 147798, true },
-  { 147813, true },
-  { 147829, true },
-  { 147843, true },
-  { 147855, true },
-  { 147869, true },
-  { 147881, true },
-  { 147900, true },
-  { 147916, true },
-  { 147932, true },
-  { 147948, true },
-  { 147966, true },
-  { 147983, true },
-  { 147997, true },
-  { 148015, true },
-  { 148032, true },
-  { 148051, true },
-  { 148071, true },
-  { 148088, true },
-  { 148104, true },
-  { 148122, true },
-  { 148135, true },
-  { 148152, true },
-  { 148169, false },
-  { 148190, true },
-  { 148207, true },
-  { 148226, true },
-  { 148240, true },
-  { 148253, true },
-  { 148268, true },
-  { 148281, true },
-  { 148292, true },
-  { 148310, true },
-  { 148322, true },
-  { 148335, true },
-  { 148359, true },
-  { 148368, true },
-  { 148383, true },
-  { 148410, true },
-  { 148428, true },
-  { 148437, true },
-  { 148447, true },
-  { 148458, true },
-  { 148468, true },
-  { 148481, true },
-  { 148489, true },
-  { 148496, true },
-  { 148515, true },
-  { 148522, true },
-  { 148537, true },
-  { 148546, true },
-  { 148558, false },
-  { 148578, true },
-  { 148592, true },
-  { 148602, true },
-  { 148619, true },
-  { 148637, true },
-  { 148654, true },
-  { 148676, true },
-  { 148689, true },
+  { 147781, true },
+  { 147789, true },
+  { 147796, true },
+  { 147815, true },
+  { 147822, true },
+  { 147837, true },
+  { 147846, true },
+  { 147858, false },
+  { 147878, true },
+  { 147888, true },
+  { 147905, true },
+  { 147923, true },
+  { 147940, true },
+  { 147962, true },
+  { 147975, true },
+  { 147994, true },
+  { 148006, true },
+  { 148017, true },
+  { 148030, true },
+  { 148049, true },
+  { 148064, true },
+  { 148080, true },
+  { 148103, true },
+  { 148123, true },
+  { 148136, true },
+  { 148150, true },
+  { 148162, true },
+  { 148173, true },
+  { 148192, true },
+  { 148204, true },
+  { 148221, true },
+  { 148238, true },
+  { 148250, true },
+  { 148267, true },
+  { 148278, true },
+  { 148302, true },
+  { 148312, true },
+  { 148324, true },
+  { 148334, true },
+  { 148350, true },
+  { 148381, true },
+  { 148390, true },
+  { 148407, true },
+  { 148419, true },
+  { 148438, true },
+  { 148454, true },
+  { 148471, true },
+  { 148484, true },
+  { 148497, true },
+  { 148507, true },
+  { 148521, true },
+  { 148530, true },
+  { 148540, true },
+  { 148555, true },
+  { 148565, true },
+  { 148579, true },
+  { 148595, true },
+  { 148608, true },
+  { 148618, true },
+  { 148636, true },
+  { 148653, true },
+  { 148669, true },
+  { 148686, true },
   { 148708, true },
   { 148720, true },
-  { 148731, true },
-  { 148744, true },
-  { 148763, true },
-  { 148778, true },
-  { 148794, true },
+  { 148738, true },
+  { 148752, false },
+  { 148767, true },
+  { 148780, true },
+  { 148793, true },
+  { 148805, true },
   { 148817, true },
-  { 148837, true },
-  { 148850, true },
-  { 148864, true },
+  { 148828, true },
+  { 148845, true },
+  { 148857, true },
   { 148876, true },
-  { 148887, true },
-  { 148906, true },
-  { 148918, true },
-  { 148935, true },
-  { 148952, true },
+  { 148902, true },
+  { 148911, true },
+  { 148926, false },
+  { 148933, true },
+  { 148949, true },
   { 148964, true },
-  { 148981, true },
-  { 148992, true },
-  { 149016, true },
-  { 149026, true },
-  { 149038, true },
-  { 149048, true },
-  { 149064, true },
-  { 149095, true },
-  { 149104, true },
-  { 149121, true },
-  { 149133, true },
-  { 149152, true },
-  { 149168, true },
-  { 149185, true },
-  { 149198, true },
-  { 149211, true },
-  { 149221, true },
-  { 149235, true },
-  { 149244, true },
+  { 148986, true },
+  { 149011, true },
+  { 149027, true },
+  { 149045, true },
+  { 149059, true },
+  { 149069, true },
+  { 149079, true },
+  { 149090, true },
+  { 149105, true },
+  { 149115, true },
+  { 149127, true },
+  { 149145, true },
+  { 149161, true },
+  { 149176, true },
+  { 149191, false },
+  { 149214, true },
+  { 149230, true },
+  { 149243, true },
   { 149254, true },
-  { 149269, true },
-  { 149279, true },
-  { 149293, true },
-  { 149309, true },
+  { 149271, true },
+  { 149291, true },
   { 149322, true },
-  { 149332, true },
-  { 149350, true },
-  { 149367, true },
-  { 149383, true },
-  { 149400, true },
-  { 149422, true },
-  { 149434, true },
-  { 149452, true },
-  { 149466, false },
-  { 149481, true },
+  { 149343, true },
+  { 149356, true },
+  { 149377, true },
+  { 149388, true },
+  { 149405, true },
+  { 149417, true },
+  { 149430, true },
+  { 149438, true },
+  { 149449, true },
+  { 149458, true },
+  { 149467, true },
+  { 149479, false },
+  { 149486, true },
   { 149494, true },
-  { 149507, true },
-  { 149519, true },
-  { 149531, true },
-  { 149542, true },
-  { 149559, true },
-  { 149571, true },
-  { 149590, true },
-  { 149616, true },
-  { 149625, true },
-  { 149640, false },
-  { 149647, true },
-  { 149663, true },
+  { 149503, true },
+  { 149514, true },
+  { 149521, true },
+  { 149538, true },
+  { 149546, true },
+  { 149560, true },
+  { 149568, true },
+  { 149587, false },
+  { 149607, true },
+  { 149617, true },
+  { 149638, true },
+  { 149649, false },
+  { 149661, true },
   { 149678, true },
-  { 149700, true },
-  { 149725, true },
-  { 149741, true },
-  { 149759, true },
-  { 149773, true },
-  { 149783, true },
-  { 149793, true },
-  { 149804, true },
-  { 149819, true },
-  { 149829, true },
-  { 149841, true },
-  { 149859, true },
-  { 149875, true },
-  { 149890, true },
-  { 149905, false },
-  { 149928, true },
-  { 149944, true },
-  { 149957, true },
-  { 149968, true },
-  { 149985, true },
-  { 150005, true },
-  { 150036, true },
-  { 150057, true },
-  { 150070, true },
-  { 150091, true },
-  { 150102, true },
-  { 150119, true },
-  { 150131, true },
-  { 150144, true },
-  { 150152, true },
-  { 150163, true },
-  { 150172, true },
-  { 150181, true },
-  { 150193, false },
-  { 150200, true },
-  { 150208, true },
-  { 150217, true },
+  { 149689, true },
+  { 149718, true },
+  { 149732, true },
+  { 149746, true },
+  { 149763, true },
+  { 149775, true },
+  { 149790, true },
+  { 149798, true },
+  { 149806, true },
+  { 149820, true },
+  { 149837, true },
+  { 149855, true },
+  { 149868, true },
+  { 149877, false },
+  { 149895, true },
+  { 149907, true },
+  { 149920, true },
+  { 149929, true },
+  { 149952, true },
+  { 149966, true },
+  { 149979, true },
+  { 149995, true },
+  { 150012, true },
+  { 150025, true },
+  { 150043, true },
+  { 150055, true },
+  { 150074, true },
+  { 150096, true },
+  { 150118, true },
+  { 150138, false },
+  { 150154, true },
+  { 150177, true },
+  { 150186, true },
+  { 150194, true },
+  { 150209, true },
   { 150228, true },
-  { 150235, true },
-  { 150252, true },
-  { 150260, true },
+  { 150244, true },
+  { 150258, true },
   { 150274, true },
-  { 150282, true },
-  { 150301, false },
-  { 150321, true },
-  { 150331, true },
-  { 150352, true },
-  { 150363, false },
-  { 150375, true },
-  { 150392, true },
-  { 150403, true },
-  { 150432, true },
-  { 150446, true },
-  { 150460, true },
-  { 150477, true },
-  { 150489, true },
-  { 150504, true },
-  { 150512, true },
+  { 150294, true },
+  { 150304, true },
+  { 150322, true },
+  { 150329, true },
+  { 150341, true },
+  { 150354, true },
+  { 150364, true },
+  { 150372, true },
+  { 150380, true },
+  { 150388, false },
+  { 150411, true },
+  { 150430, true },
+  { 150455, true },
+  { 150472, true },
+  { 150484, true },
+  { 150496, true },
+  { 150511, true },
   { 150520, true },
   { 150534, true },
-  { 150551, true },
+  { 150547, true },
   { 150569, true },
-  { 150582, true },
-  { 150591, false },
-  { 150609, true },
+  { 150579, true },
+  { 150600, true },
   { 150621, true },
-  { 150634, true },
-  { 150643, true },
-  { 150666, true },
-  { 150680, true },
-  { 150693, true },
-  { 150709, true },
-  { 150726, true },
-  { 150739, true },
-  { 150757, true },
-  { 150769, true },
-  { 150788, true },
-  { 150810, true },
-  { 150832, true },
-  { 150852, false },
-  { 150868, true },
-  { 150891, true },
-  { 150900, true },
-  { 150908, true },
-  { 150923, true },
-  { 150942, true },
-  { 150958, true },
-  { 150972, true },
-  { 150988, true },
-  { 151008, true },
-  { 151018, true },
-  { 151036, true },
-  { 151043, true },
-  { 151055, true },
-  { 151068, true },
-  { 151078, true },
-  { 151086, true },
-  { 151094, true },
-  { 151102, false },
-  { 151125, true },
+  { 150638, true },
+  { 150659, true },
+  { 150673, true },
+  { 150689, true },
+  { 150702, true },
+  { 150712, true },
+  { 150725, true },
+  { 150749, true },
+  { 150768, true },
+  { 150780, true },
+  { 150798, true },
+  { 150807, true },
+  { 150824, true },
+  { 150842, true },
+  { 150855, true },
+  { 150868, false },
+  { 150889, true },
+  { 150899, true },
+  { 150918, true },
+  { 150931, true },
+  { 150946, true },
+  { 150966, true },
+  { 150977, true },
+  { 150989, true },
+  { 151004, true },
+  { 151017, true },
+  { 151032, true },
+  { 151047, true },
+  { 151060, false },
+  { 151069, true },
+  { 151088, true },
+  { 151105, false },
+  { 151120, true },
+  { 151134, true },
   { 151144, true },
-  { 151169, true },
-  { 151186, true },
-  { 151198, true },
-  { 151210, true },
-  { 151225, true },
-  { 151234, true },
+  { 151157, true },
+  { 151173, true },
+  { 151191, true },
+  { 151201, true },
+  { 151213, true },
+  { 151226, true },
+  { 151239, true },
   { 151248, true },
-  { 151261, true },
-  { 151283, true },
-  { 151293, true },
-  { 151314, true },
-  { 151335, true },
-  { 151352, true },
-  { 151373, true },
-  { 151387, true },
-  { 151403, true },
-  { 151416, true },
-  { 151426, true },
-  { 151439, true },
-  { 151463, true },
-  { 151482, true },
-  { 151494, true },
-  { 151512, true },
-  { 151521, true },
-  { 151538, true },
-  { 151556, true },
-  { 151569, true },
-  { 151582, false },
-  { 151603, true },
-  { 151613, true },
-  { 151632, true },
-  { 151645, true },
-  { 151660, true },
-  { 151680, true },
-  { 151691, true },
-  { 151703, true },
-  { 151718, true },
-  { 151731, true },
+  { 151272, true },
+  { 151296, false },
+  { 151309, true },
+  { 151320, true },
+  { 151336, true },
+  { 151348, true },
+  { 151364, true },
+  { 151381, false },
+  { 151393, true },
+  { 151410, true },
+  { 151429, false },
+  { 151438, true },
+  { 151460, true },
+  { 151474, true },
+  { 151487, false },
+  { 151502, true },
+  { 151517, true },
+  { 151529, true },
+  { 151548, false },
+  { 151571, true },
+  { 151587, true },
+  { 151603, false },
+  { 151623, true },
+  { 151636, true },
+  { 151652, true },
+  { 151663, true },
+  { 151682, true },
+  { 151696, true },
+  { 151707, true },
+  { 151717, true },
+  { 151734, true },
   { 151746, true },
-  { 151761, true },
-  { 151774, false },
-  { 151783, true },
-  { 151802, true },
-  { 151819, false },
-  { 151834, true },
-  { 151848, true },
-  { 151858, true },
-  { 151871, true },
-  { 151887, true },
-  { 151905, true },
-  { 151915, true },
-  { 151927, true },
-  { 151940, true },
-  { 151953, true },
-  { 151962, true },
-  { 151986, true },
-  { 152010, false },
-  { 152023, true },
-  { 152034, true },
-  { 152050, true },
-  { 152062, true },
-  { 152078, true },
-  { 152095, true },
-  { 152112, true },
-  { 152131, false },
-  { 152140, true },
-  { 152162, true },
-  { 152176, true },
-  { 152189, false },
-  { 152204, true },
-  { 152219, true },
-  { 152231, true },
-  { 152250, false },
+  { 151765, true },
+  { 151777, true },
+  { 151788, true },
+  { 151807, true },
+  { 151828, true },
+  { 151841, true },
+  { 151857, true },
+  { 151881, false },
+  { 151899, true },
+  { 151917, false },
+  { 151937, true },
+  { 151956, true },
+  { 151972, true },
+  { 151990, true },
+  { 152002, true },
+  { 152019, true },
+  { 152042, true },
+  { 152061, true },
+  { 152081, true },
+  { 152094, true },
+  { 152106, true },
+  { 152114, true },
+  { 152134, true },
+  { 152142, true },
+  { 152158, true },
+  { 152172, true },
+  { 152181, true },
+  { 152193, true },
+  { 152203, true },
+  { 152212, true },
+  { 152229, true },
+  { 152241, true },
+  { 152252, true },
+  { 152262, true },
   { 152273, true },
-  { 152289, true },
-  { 152305, false },
-  { 152325, true },
-  { 152338, true },
-  { 152354, true },
-  { 152365, true },
-  { 152384, true },
-  { 152398, true },
+  { 152290, true },
+  { 152301, true },
+  { 152311, true },
+  { 152328, true },
+  { 152337, true },
+  { 152351, true },
+  { 152363, true },
+  { 152382, true },
+  { 152392, true },
   { 152409, true },
-  { 152419, true },
-  { 152436, true },
-  { 152448, true },
-  { 152467, true },
-  { 152479, true },
-  { 152490, true },
+  { 152431, true },
+  { 152445, true },
+  { 152459, true },
+  { 152474, true },
+  { 152488, true },
+  { 152497, true },
+  { 152503, true },
   { 152509, true },
-  { 152530, true },
-  { 152543, true },
-  { 152559, true },
-  { 152583, false },
-  { 152601, true },
-  { 152619, false },
-  { 152639, true },
-  { 152658, true },
+  { 152517, true },
+  { 152529, true },
+  { 152550, true },
+  { 152560, true },
+  { 152571, true },
+  { 152589, true },
+  { 152602, true },
+  { 152621, true },
+  { 152637, true },
+  { 152650, true },
+  { 152661, true },
   { 152674, true },
-  { 152692, true },
-  { 152704, true },
-  { 152721, true },
-  { 152744, true },
-  { 152763, true },
-  { 152783, true },
-  { 152796, true },
-  { 152808, true },
+  { 152688, true },
+  { 152705, false },
+  { 152719, true },
+  { 152738, true },
+  { 152748, true },
+  { 152756, true },
+  { 152773, true },
+  { 152787, true },
+  { 152799, true },
   { 152816, true },
-  { 152836, true },
-  { 152844, true },
-  { 152860, true },
-  { 152874, true },
-  { 152883, true },
-  { 152895, true },
-  { 152905, true },
-  { 152914, true },
-  { 152931, true },
-  { 152943, true },
-  { 152954, true },
-  { 152964, true },
-  { 152975, true },
-  { 152988, true },
+  { 152830, true },
+  { 152844, false },
+  { 152857, true },
+  { 152875, true },
+  { 152887, true },
+  { 152899, true },
+  { 152918, true },
+  { 152937, true },
+  { 152951, true },
+  { 152963, true },
+  { 152976, true },
+  { 152992, true },
   { 153005, true },
-  { 153016, true },
-  { 153026, true },
-  { 153043, true },
-  { 153052, true },
-  { 153066, true },
-  { 153078, true },
-  { 153097, true },
-  { 153107, true },
-  { 153124, true },
-  { 153146, true },
-  { 153160, true },
-  { 153174, true },
-  { 153189, true },
-  { 153203, true },
-  { 153212, true },
-  { 153218, true },
-  { 153224, true },
-  { 153232, true },
-  { 153244, true },
-  { 153265, true },
-  { 153275, true },
-  { 153286, true },
-  { 153304, true },
-  { 153317, true },
-  { 153336, true },
-  { 153352, true },
-  { 153365, true },
-  { 153376, true },
-  { 153389, true },
-  { 153403, true },
-  { 153420, false },
-  { 153434, true },
-  { 153453, true },
-  { 153463, true },
-  { 153471, true },
-  { 153488, true },
-  { 153502, true },
-  { 153514, true },
-  { 153531, true },
+  { 153018, true },
+  { 153033, true },
+  { 153061, true },
+  { 153072, true },
+  { 153085, true },
+  { 153104, true },
+  { 153117, true },
+  { 153142, true },
+  { 153154, true },
+  { 153168, true },
+  { 153182, true },
+  { 153197, true },
+  { 153211, true },
+  { 153225, true },
+  { 153239, true },
+  { 153253, true },
+  { 153269, true },
+  { 153292, true },
+  { 153308, true },
+  { 153323, true },
+  { 153347, true },
+  { 153366, true },
+  { 153379, true },
+  { 153390, true },
+  { 153410, true },
+  { 153422, true },
+  { 153440, true },
+  { 153455, true },
+  { 153474, true },
+  { 153487, true },
+  { 153505, true },
+  { 153529, true },
   { 153545, true },
-  { 153559, false },
-  { 153572, true },
-  { 153590, true },
-  { 153602, true },
-  { 153614, true },
-  { 153633, true },
-  { 153652, true },
-  { 153666, true },
-  { 153678, true },
-  { 153691, true },
-  { 153707, true },
+  { 153558, true },
+  { 153578, true },
+  { 153591, true },
+  { 153608, true },
+  { 153623, true },
+  { 153643, true },
+  { 153656, true },
+  { 153671, true },
+  { 153683, true },
+  { 153701, true },
   { 153720, true },
-  { 153733, true },
-  { 153748, true },
-  { 153776, true },
-  { 153787, true },
-  { 153800, true },
-  { 153819, true },
-  { 153832, true },
-  { 153857, true },
-  { 153869, true },
-  { 153883, true },
-  { 153897, true },
-  { 153912, true },
-  { 153926, true },
-  { 153940, true },
-  { 153954, true },
-  { 153968, true },
-  { 153984, true },
-  { 154007, true },
-  { 154023, true },
-  { 154038, true },
-  { 154062, true },
-  { 154081, true },
-  { 154094, true },
-  { 154105, true },
-  { 154125, true },
-  { 154145, true },
-  { 154157, true },
-  { 154175, true },
+  { 153739, true },
+  { 153753, true },
+  { 153768, true },
+  { 153780, true },
+  { 153797, true },
+  { 153812, true },
+  { 153830, true },
+  { 153842, true },
+  { 153856, true },
+  { 153867, true },
+  { 153889, true },
+  { 153901, true },
+  { 153910, true },
+  { 153922, true },
+  { 153937, true },
+  { 153960, true },
+  { 153978, true },
+  { 153994, true },
+  { 154011, true },
+  { 154030, true },
+  { 154048, true },
+  { 154054, true },
+  { 154072, false },
+  { 154092, true },
+  { 154109, true },
+  { 154123, true },
+  { 154135, true },
+  { 154154, false },
+  { 154171, true },
   { 154190, true },
-  { 154209, true },
-  { 154222, true },
-  { 154240, true },
-  { 154264, true },
-  { 154280, true },
-  { 154293, true },
-  { 154313, true },
+  { 154201, true },
+  { 154220, true },
+  { 154243, true },
+  { 154254, true },
+  { 154272, true },
+  { 154289, true },
+  { 154308, true },
   { 154326, true },
-  { 154343, true },
-  { 154358, true },
-  { 154378, true },
-  { 154391, true },
-  { 154406, true },
-  { 154418, true },
-  { 154436, true },
-  { 154455, true },
-  { 154474, true },
-  { 154488, true },
-  { 154503, true },
-  { 154515, true },
-  { 154532, true },
-  { 154547, true },
-  { 154565, true },
-  { 154577, true },
-  { 154591, true },
-  { 154602, true },
-  { 154624, true },
-  { 154636, true },
-  { 154645, true },
-  { 154657, true },
-  { 154672, true },
-  { 154695, true },
-  { 154713, true },
-  { 154729, true },
-  { 154746, true },
-  { 154765, true },
-  { 154783, true },
-  { 154789, true },
-  { 154807, false },
-  { 154827, true },
-  { 154844, true },
-  { 154858, true },
-  { 154870, true },
-  { 154889, false },
-  { 154906, true },
-  { 154925, true },
-  { 154936, true },
-  { 154955, true },
+  { 154335, true },
+  { 154342, true },
+  { 154349, true },
+  { 154361, false },
+  { 154381, true },
+  { 154389, true },
+  { 154400, true },
+  { 154423, true },
+  { 154447, true },
+  { 154470, true },
+  { 154493, true },
+  { 154521, true },
+  { 154550, true },
+  { 154563, true },
+  { 154578, true },
+  { 154597, true },
+  { 154615, true },
+  { 154638, true },
+  { 154649, true },
+  { 154666, true },
+  { 154677, true },
+  { 154688, true },
+  { 154706, true },
+  { 154732, true },
+  { 154761, true },
+  { 154773, true },
+  { 154786, false },
+  { 154806, true },
+  { 154824, false },
+  { 154839, true },
+  { 154860, false },
+  { 154876, true },
+  { 154894, true },
+  { 154910, true },
+  { 154928, true },
+  { 154944, true },
+  { 154956, true },
   { 154978, true },
-  { 154989, true },
-  { 155007, true },
-  { 155024, true },
-  { 155043, true },
-  { 155061, true },
-  { 155070, true },
-  { 155077, true },
-  { 155084, true },
-  { 155096, false },
-  { 155116, true },
-  { 155124, true },
-  { 155135, true },
-  { 155158, true },
+  { 154998, true },
+  { 155018, true },
+  { 155037, true },
+  { 155054, true },
+  { 155072, false },
+  { 155090, true },
+  { 155110, true },
+  { 155129, true },
+  { 155156, true },
+  { 155168, true },
   { 155182, true },
-  { 155205, true },
-  { 155228, true },
-  { 155256, true },
-  { 155285, true },
-  { 155298, true },
-  { 155313, true },
-  { 155332, true },
-  { 155350, true },
-  { 155373, true },
-  { 155384, true },
+  { 155197, true },
+  { 155209, true },
+  { 155220, true },
+  { 155239, true },
+  { 155253, true },
+  { 155268, true },
+  { 155277, true },
+  { 155292, true },
+  { 155302, true },
+  { 155315, true },
+  { 155335, true },
+  { 155344, true },
+  { 155354, true },
+  { 155375, false },
+  { 155392, true },
   { 155401, true },
-  { 155412, true },
-  { 155423, true },
-  { 155441, true },
-  { 155467, true },
-  { 155496, true },
-  { 155508, true },
-  { 155521, false },
-  { 155541, true },
-  { 155559, false },
-  { 155574, true },
-  { 155595, false },
-  { 155611, true },
-  { 155629, true },
-  { 155645, true },
-  { 155663, true },
+  { 155414, true },
+  { 155431, true },
+  { 155445, true },
+  { 155459, true },
+  { 155471, true },
+  { 155488, true },
+  { 155504, true },
+  { 155516, true },
+  { 155527, false },
+  { 155543, true },
+  { 155554, true },
+  { 155570, true },
+  { 155583, true },
+  { 155592, true },
+  { 155605, true },
+  { 155622, true },
+  { 155634, true },
+  { 155646, true },
+  { 155658, true },
+  { 155667, true },
   { 155679, true },
-  { 155691, true },
-  { 155713, true },
-  { 155733, true },
-  { 155753, true },
-  { 155772, true },
-  { 155789, true },
-  { 155807, false },
-  { 155825, true },
-  { 155845, true },
-  { 155864, true },
+  { 155694, true },
+  { 155708, true },
+  { 155718, true },
+  { 155739, true },
+  { 155757, true },
+  { 155769, true },
+  { 155784, true },
+  { 155794, true },
+  { 155809, true },
+  { 155821, true },
+  { 155833, true },
+  { 155848, true },
+  { 155859, true },
+  { 155870, true },
+  { 155878, true },
   { 155891, true },
-  { 155903, true },
-  { 155917, true },
-  { 155932, true },
+  { 155904, true },
+  { 155921, true },
+  { 155931, true },
   { 155944, true },
-  { 155955, true },
-  { 155974, true },
-  { 155988, true },
-  { 156003, true },
-  { 156012, true },
+  { 155961, true },
+  { 155975, true },
+  { 155984, true },
+  { 155999, true },
+  { 156013, true },
   { 156027, true },
-  { 156037, true },
-  { 156050, true },
-  { 156070, true },
-  { 156079, true },
-  { 156089, true },
-  { 156110, false },
-  { 156127, true },
-  { 156136, true },
-  { 156149, true },
-  { 156166, true },
-  { 156180, true },
-  { 156194, true },
-  { 156206, true },
-  { 156223, true },
-  { 156233, true },
-  { 156249, true },
-  { 156261, true },
-  { 156272, false },
-  { 156288, true },
-  { 156299, true },
-  { 156315, true },
-  { 156328, true },
-  { 156337, true },
-  { 156350, true },
-  { 156367, true },
-  { 156379, true },
-  { 156391, true },
-  { 156403, true },
-  { 156412, true },
-  { 156424, true },
+  { 156041, true },
+  { 156060, true },
+  { 156068, true },
+  { 156085, true },
+  { 156100, true },
+  { 156115, true },
+  { 156129, true },
+  { 156145, true },
+  { 156161, true },
+  { 156175, true },
+  { 156191, true },
+  { 156208, true },
+  { 156221, true },
+  { 156235, false },
+  { 156253, true },
+  { 156268, true },
+  { 156285, false },
+  { 156311, true },
+  { 156326, true },
+  { 156344, true },
+  { 156357, true },
+  { 156370, true },
+  { 156382, true },
+  { 156401, true },
+  { 156411, true },
+  { 156427, true },
   { 156439, true },
-  { 156453, true },
+  { 156452, true },
   { 156463, true },
-  { 156484, true },
-  { 156502, true },
-  { 156514, true },
-  { 156529, true },
-  { 156539, true },
-  { 156554, true },
-  { 156566, true },
-  { 156578, true },
-  { 156593, true },
-  { 156604, true },
-  { 156615, true },
-  { 156623, true },
-  { 156636, true },
-  { 156649, true },
-  { 156666, true },
-  { 156676, true },
-  { 156689, true },
+  { 156480, true },
+  { 156511, true },
+  { 156521, true },
+  { 156532, true },
+  { 156543, true },
+  { 156555, true },
+  { 156569, true },
+  { 156581, true },
+  { 156589, true },
+  { 156597, true },
+  { 156608, false },
+  { 156628, true },
+  { 156646, true },
+  { 156661, false },
+  { 156675, true },
+  { 156695, true },
   { 156706, true },
-  { 156720, true },
-  { 156729, true },
-  { 156744, true },
-  { 156758, true },
-  { 156771, true },
-  { 156785, true },
-  { 156799, true },
-  { 156818, true },
-  { 156826, true },
-  { 156843, true },
-  { 156858, true },
-  { 156873, true },
-  { 156887, true },
-  { 156903, true },
-  { 156919, true },
-  { 156933, true },
-  { 156949, true },
-  { 156966, true },
-  { 156979, true },
-  { 156993, false },
-  { 157011, true },
-  { 157026, true },
-  { 157043, true },
-  { 157060, false },
-  { 157086, true },
-  { 157101, true },
-  { 157119, true },
-  { 157132, true },
-  { 157145, true },
-  { 157157, true },
-  { 157176, true },
-  { 157186, true },
-  { 157202, true },
-  { 157214, true },
-  { 157227, true },
-  { 157238, true },
-  { 157255, true },
-  { 157286, true },
-  { 157296, true },
-  { 157307, true },
-  { 157318, true },
-  { 157330, true },
-  { 157344, true },
-  { 157356, true },
-  { 157364, true },
-  { 157372, true },
-  { 157383, true },
-  { 157394, false },
-  { 157414, true },
-  { 157432, true },
-  { 157447, false },
-  { 157461, true },
-  { 157481, true },
-  { 157492, true },
-  { 157517, true },
-  { 157535, true },
-  { 157550, true },
-  { 157567, true },
-  { 157583, true },
-  { 157608, true },
-  { 157619, true },
-  { 157630, true },
+  { 156731, true },
+  { 156749, true },
+  { 156764, true },
+  { 156781, true },
+  { 156797, true },
+  { 156822, true },
+  { 156833, true },
+  { 156844, true },
+  { 156857, true },
+  { 156869, true },
+  { 156882, false },
+  { 156890, true },
+  { 156900, true },
+  { 156915, true },
+  { 156934, true },
+  { 156947, true },
+  { 156960, true },
+  { 156975, true },
+  { 156988, true },
+  { 157001, true },
+  { 157015, true },
+  { 157028, true },
+  { 157048, true },
+  { 157066, true },
+  { 157080, true },
+  { 157094, true },
+  { 157105, true },
+  { 157116, true },
+  { 157129, true },
+  { 157146, true },
+  { 157154, true },
+  { 157169, true },
+  { 157182, true },
+  { 157196, true },
+  { 157211, true },
+  { 157236, true },
+  { 157272, true },
+  { 157285, true },
+  { 157295, true },
+  { 157310, true },
+  { 157323, true },
+  { 157345, true },
+  { 157363, true },
+  { 157376, true },
+  { 157387, true },
+  { 157399, true },
+  { 157417, true },
+  { 157425, true },
+  { 157458, true },
+  { 157465, true },
+  { 157482, true },
+  { 157500, false },
+  { 157518, true },
+  { 157536, true },
+  { 157548, true },
+  { 157560, true },
+  { 157573, true },
+  { 157589, true },
+  { 157603, true },
+  { 157623, true },
   { 157643, true },
-  { 157655, true },
-  { 157668, false },
-  { 157676, true },
-  { 157686, true },
-  { 157701, true },
-  { 157720, true },
-  { 157733, true },
-  { 157746, true },
-  { 157761, true },
-  { 157774, true },
-  { 157787, true },
-  { 157801, true },
-  { 157814, true },
-  { 157834, true },
-  { 157852, true },
-  { 157866, true },
-  { 157880, true },
-  { 157891, true },
-  { 157902, true },
-  { 157915, true },
-  { 157932, true },
-  { 157940, true },
-  { 157955, true },
-  { 157968, true },
-  { 157982, true },
-  { 157997, true },
-  { 158022, true },
-  { 158058, true },
-  { 158071, true },
-  { 158081, true },
-  { 158096, true },
-  { 158109, true },
-  { 158131, true },
-  { 158149, true },
-  { 158162, true },
-  { 158173, true },
-  { 158185, true },
-  { 158203, true },
-  { 158211, true },
-  { 158244, true },
+  { 157654, true },
+  { 157664, true },
+  { 157673, true },
+  { 157684, true },
+  { 157703, true },
+  { 157717, true },
+  { 157731, true },
+  { 157754, true },
+  { 157768, true },
+  { 157782, true },
+  { 157794, true },
+  { 157808, false },
+  { 157818, true },
+  { 157832, true },
+  { 157841, true },
+  { 157853, true },
+  { 157865, true },
+  { 157876, true },
+  { 157885, true },
+  { 157894, true },
+  { 157906, true },
+  { 157920, true },
+  { 157926, true },
+  { 157938, true },
+  { 157953, false },
+  { 157980, true },
+  { 158000, true },
+  { 158010, true },
+  { 158023, true },
+  { 158036, true },
+  { 158052, true },
+  { 158073, true },
+  { 158092, true },
+  { 158102, true },
+  { 158114, true },
+  { 158126, true },
+  { 158137, false },
+  { 158145, true },
+  { 158160, true },
+  { 158174, true },
+  { 158183, true },
+  { 158195, true },
+  { 158208, true },
+  { 158218, true },
+  { 158239, true },
   { 158251, true },
-  { 158268, true },
-  { 158286, false },
-  { 158304, true },
-  { 158322, true },
-  { 158334, true },
-  { 158346, true },
-  { 158359, true },
-  { 158375, true },
+  { 158262, true },
+  { 158282, true },
+  { 158301, true },
+  { 158312, true },
+  { 158327, false },
+  { 158355, false },
+  { 158367, true },
+  { 158378, true },
   { 158389, true },
-  { 158409, true },
-  { 158429, true },
-  { 158440, true },
-  { 158450, true },
-  { 158459, true },
-  { 158470, true },
-  { 158489, true },
-  { 158503, true },
-  { 158517, true },
-  { 158540, true },
-  { 158554, true },
-  { 158568, true },
-  { 158580, true },
-  { 158594, false },
-  { 158604, true },
-  { 158618, true },
-  { 158627, true },
-  { 158639, true },
-  { 158651, true },
-  { 158662, true },
-  { 158671, true },
-  { 158680, true },
+  { 158404, true },
+  { 158419, true },
+  { 158436, true },
+  { 158448, false },
+  { 158465, true },
+  { 158481, true },
+  { 158495, true },
+  { 158510, true },
+  { 158525, true },
+  { 158541, true },
+  { 158558, true },
+  { 158581, true },
+  { 158600, true },
+  { 158614, true },
+  { 158635, true },
+  { 158655, true },
+  { 158673, true },
   { 158692, true },
-  { 158706, true },
-  { 158712, true },
-  { 158724, true },
-  { 158739, false },
-  { 158766, true },
-  { 158786, true },
-  { 158796, true },
+  { 158710, true },
+  { 158728, false },
+  { 158745, false },
+  { 158760, true },
+  { 158771, true },
+  { 158782, true },
+  { 158794, true },
   { 158809, true },
-  { 158822, true },
-  { 158838, true },
-  { 158859, true },
-  { 158878, true },
-  { 158888, true },
-  { 158900, true },
-  { 158912, true },
-  { 158923, false },
-  { 158931, true },
-  { 158946, true },
-  { 158960, true },
-  { 158969, true },
-  { 158981, true },
-  { 158994, true },
-  { 159004, true },
-  { 159025, true },
-  { 159037, true },
-  { 159048, true },
-  { 159068, true },
-  { 159087, true },
-  { 159098, true },
-  { 159113, false },
-  { 159141, false },
-  { 159153, true },
-  { 159164, true },
-  { 159175, true },
-  { 159190, true },
-  { 159205, true },
-  { 159222, true },
-  { 159234, false },
-  { 159251, true },
-  { 159267, true },
-  { 159281, true },
-  { 159296, true },
-  { 159311, true },
-  { 159327, true },
-  { 159344, true },
-  { 159367, true },
-  { 159386, true },
-  { 159400, true },
-  { 159421, true },
-  { 159441, true },
-  { 159459, true },
-  { 159478, true },
-  { 159496, true },
-  { 159514, false },
-  { 159531, true },
-  { 159546, false },
-  { 159561, true },
-  { 159572, true },
+  { 158827, true },
+  { 158849, true },
+  { 158863, true },
+  { 158880, true },
+  { 158899, true },
+  { 158920, true },
+  { 158934, true },
+  { 158949, true },
+  { 158965, true },
+  { 158983, true },
+  { 158993, true },
+  { 159005, false },
+  { 159016, true },
+  { 159035, false },
+  { 159054, true },
+  { 159069, true },
+  { 159082, false },
+  { 159101, true },
+  { 159112, true },
+  { 159130, true },
+  { 159144, true },
+  { 159169, true },
+  { 159184, true },
+  { 159202, true },
+  { 159217, true },
+  { 159232, true },
+  { 159249, true },
+  { 159260, true },
+  { 159270, true },
+  { 159285, true },
+  { 159294, true },
+  { 159304, true },
+  { 159314, true },
+  { 159331, true },
+  { 159346, false },
+  { 159359, true },
+  { 159375, true },
+  { 159396, true },
+  { 159416, true },
+  { 159435, true },
+  { 159447, true },
+  { 159458, true },
+  { 159468, true },
+  { 159480, true },
+  { 159495, true },
+  { 159509, true },
+  { 159529, true },
+  { 159552, true },
+  { 159565, true },
   { 159583, true },
-  { 159595, true },
-  { 159610, true },
-  { 159628, true },
-  { 159650, true },
-  { 159664, true },
-  { 159681, true },
-  { 159700, true },
-  { 159721, true },
-  { 159735, true },
-  { 159750, true },
-  { 159766, true },
-  { 159784, true },
-  { 159794, true },
-  { 159806, false },
-  { 159817, true },
-  { 159836, false },
-  { 159855, true },
-  { 159870, true },
-  { 159883, false },
-  { 159902, true },
-  { 159913, true },
-  { 159931, true },
-  { 159945, true },
-  { 159970, true },
-  { 159985, true },
-  { 160003, true },
-  { 160018, true },
-  { 160033, true },
-  { 160050, true },
-  { 160061, true },
-  { 160071, true },
-  { 160086, true },
-  { 160095, true },
-  { 160105, true },
-  { 160115, true },
-  { 160132, true },
-  { 160147, false },
-  { 160160, true },
-  { 160176, true },
-  { 160197, true },
-  { 160217, true },
-  { 160236, true },
-  { 160248, true },
-  { 160259, true },
-  { 160269, true },
-  { 160281, true },
-  { 160296, true },
-  { 160310, true },
-  { 160330, true },
-  { 160353, true },
-  { 160366, true },
-  { 160384, true },
-  { 160392, true },
-  { 160400, true },
-  { 160412, true },
-  { 160424, true },
-  { 160441, true },
-  { 160452, true },
-  { 160469, false },
-  { 160486, true },
-  { 160499, true },
-  { 160510, false },
-  { 160523, true },
-  { 160538, false },
-  { 160562, false },
-  { 160574, true },
-  { 160599, true },
-  { 160608, true },
-  { 160620, true },
-  { 160640, true },
-  { 160657, true },
-  { 160667, true },
+  { 159591, true },
+  { 159599, true },
+  { 159611, true },
+  { 159623, true },
+  { 159640, true },
+  { 159651, true },
+  { 159668, false },
+  { 159685, true },
+  { 159698, true },
+  { 159709, false },
+  { 159722, true },
+  { 159737, false },
+  { 159761, false },
+  { 159773, true },
+  { 159798, true },
+  { 159807, true },
+  { 159819, true },
+  { 159839, true },
+  { 159856, true },
+  { 159866, true },
+  { 159887, true },
+  { 159896, true },
+  { 159915, true },
+  { 159933, true },
+  { 159949, true },
+  { 159964, true },
+  { 159979, true },
+  { 159994, true },
+  { 160007, true },
+  { 160020, true },
+  { 160029, true },
+  { 160043, true },
+  { 160066, true },
+  { 160088, true },
+  { 160114, true },
+  { 160129, true },
+  { 160144, true },
+  { 160158, true },
+  { 160170, true },
+  { 160193, true },
+  { 160203, true },
+  { 160211, true },
+  { 160227, true },
+  { 160241, true },
+  { 160253, true },
+  { 160266, false },
+  { 160284, true },
+  { 160297, true },
+  { 160308, true },
+  { 160321, true },
+  { 160331, true },
+  { 160346, true },
+  { 160359, true },
+  { 160375, true },
+  { 160385, false },
+  { 160395, true },
+  { 160408, true },
+  { 160423, true },
+  { 160433, true },
+  { 160449, true },
+  { 160461, true },
+  { 160470, true },
+  { 160485, true },
+  { 160496, true },
+  { 160514, true },
+  { 160534, true },
+  { 160550, true },
+  { 160567, true },
+  { 160580, true },
+  { 160590, true },
+  { 160600, true },
+  { 160614, true },
+  { 160626, true },
+  { 160639, true },
+  { 160656, true },
+  { 160671, true },
   { 160688, true },
-  { 160697, true },
-  { 160716, true },
-  { 160734, true },
-  { 160750, true },
-  { 160765, true },
-  { 160780, true },
-  { 160795, true },
-  { 160815, true },
-  { 160828, true },
-  { 160841, true },
-  { 160850, true },
-  { 160864, true },
-  { 160887, true },
-  { 160909, true },
-  { 160935, true },
-  { 160950, true },
-  { 160965, true },
-  { 160979, true },
-  { 160991, true },
-  { 161014, true },
-  { 161024, true },
-  { 161032, true },
-  { 161048, true },
-  { 161062, true },
-  { 161074, true },
-  { 161087, false },
-  { 161105, true },
-  { 161118, true },
-  { 161129, true },
-  { 161142, true },
-  { 161152, true },
-  { 161167, true },
-  { 161180, true },
-  { 161196, true },
-  { 161206, false },
-  { 161216, true },
+  { 160700, true },
+  { 160717, true },
+  { 160731, true },
+  { 160747, true },
+  { 160760, true },
+  { 160775, false },
+  { 160787, true },
+  { 160797, true },
+  { 160806, true },
+  { 160818, true },
+  { 160826, true },
+  { 160834, true },
+  { 160842, true },
+  { 160848, true },
+  { 160863, true },
+  { 160876, true },
+  { 160891, true },
+  { 160910, true },
+  { 160934, true },
+  { 160947, true },
+  { 160962, true },
+  { 160986, true },
+  { 160996, true },
+  { 161012, true },
+  { 161033, false },
+  { 161056, true },
+  { 161077, true },
+  { 161090, true },
+  { 161103, true },
+  { 161120, true },
+  { 161134, true },
+  { 161146, false },
+  { 161159, true },
+  { 161178, true },
+  { 161202, false },
   { 161229, true },
-  { 161244, true },
-  { 161254, true },
+  { 161255, true },
   { 161270, true },
-  { 161282, true },
-  { 161291, true },
-  { 161306, true },
-  { 161317, true },
-  { 161335, true },
+  { 161287, true },
+  { 161303, true },
+  { 161320, true },
+  { 161333, true },
+  { 161344, true },
   { 161355, true },
-  { 161371, true },
-  { 161388, true },
-  { 161401, true },
-  { 161411, true },
-  { 161421, true },
-  { 161435, true },
-  { 161447, true },
-  { 161460, true },
-  { 161477, true },
-  { 161492, true },
-  { 161509, true },
-  { 161521, true },
-  { 161538, true },
-  { 161552, true },
-  { 161568, true },
-  { 161581, true },
-  { 161596, false },
-  { 161608, true },
+  { 161366, true },
+  { 161376, true },
+  { 161385, true },
+  { 161398, true },
+  { 161416, true },
+  { 161429, true },
+  { 161443, true },
+  { 161453, true },
+  { 161464, true },
+  { 161485, true },
+  { 161499, true },
+  { 161508, true },
+  { 161515, true },
+  { 161523, true },
+  { 161546, true },
+  { 161559, true },
+  { 161573, true },
+  { 161586, true },
+  { 161601, true },
+  { 161610, true },
   { 161618, true },
-  { 161627, true },
-  { 161635, true },
-  { 161643, true },
-  { 161651, true },
-  { 161657, true },
-  { 161672, true },
-  { 161685, true },
-  { 161700, true },
-  { 161719, true },
+  { 161631, true },
+  { 161649, true },
+  { 161660, false },
+  { 161676, true },
+  { 161692, true },
+  { 161705, true },
+  { 161716, true },
+  { 161728, true },
   { 161743, true },
-  { 161756, true },
-  { 161771, true },
-  { 161795, true },
-  { 161805, true },
-  { 161821, true },
-  { 161842, false },
-  { 161865, true },
-  { 161886, true },
-  { 161899, true },
-  { 161912, true },
+  { 161752, true },
+  { 161764, true },
+  { 161775, true },
+  { 161787, true },
+  { 161800, true },
+  { 161815, true },
+  { 161835, true },
+  { 161847, true },
+  { 161864, true },
+  { 161874, true },
+  { 161884, true },
+  { 161891, true },
+  { 161901, true },
+  { 161913, true },
   { 161929, true },
-  { 161943, true },
-  { 161955, false },
-  { 161968, true },
+  { 161944, true },
+  { 161953, true },
+  { 161967, true },
   { 161987, true },
-  { 162011, false },
-  { 162038, true },
-  { 162064, true },
-  { 162079, true },
-  { 162096, true },
-  { 162112, true },
-  { 162129, true },
-  { 162142, true },
-  { 162153, true },
-  { 162164, true },
-  { 162175, true },
-  { 162185, true },
-  { 162194, true },
-  { 162207, true },
-  { 162225, true },
-  { 162238, true },
-  { 162252, true },
-  { 162262, true },
-  { 162273, true },
-  { 162294, true },
-  { 162308, true },
-  { 162317, true },
-  { 162324, true },
-  { 162332, true },
-  { 162355, true },
-  { 162368, true },
-  { 162382, true },
-  { 162395, true },
-  { 162410, true },
+  { 161999, true },
+  { 162012, true },
+  { 162030, true },
+  { 162037, true },
+  { 162054, true },
+  { 162071, true },
+  { 162091, true },
+  { 162110, true },
+  { 162126, false },
+  { 162144, true },
+  { 162171, true },
+  { 162188, true },
+  { 162202, true },
+  { 162216, true },
+  { 162231, false },
+  { 162250, true },
+  { 162268, true },
+  { 162286, true },
+  { 162304, true },
+  { 162321, true },
+  { 162342, true },
+  { 162361, true },
+  { 162375, true },
+  { 162386, true },
+  { 162394, true },
+  { 162404, true },
   { 162419, true },
-  { 162427, true },
-  { 162440, true },
-  { 162448, true },
-  { 162466, true },
-  { 162477, false },
-  { 162493, true },
-  { 162509, true },
-  { 162522, true },
-  { 162533, true },
-  { 162545, true },
-  { 162560, true },
-  { 162569, true },
-  { 162581, true },
+  { 162434, true },
+  { 162445, true },
+  { 162467, true },
+  { 162480, true },
+  { 162499, true },
+  { 162525, true },
+  { 162541, true },
+  { 162559, true },
+  { 162577, true },
   { 162592, true },
-  { 162604, true },
-  { 162617, true },
+  { 162600, true },
+  { 162613, true },
+  { 162621, true },
   { 162632, true },
-  { 162652, true },
-  { 162664, true },
-  { 162681, true },
-  { 162691, true },
-  { 162701, true },
-  { 162708, true },
-  { 162718, true },
-  { 162730, true },
-  { 162746, true },
-  { 162761, true },
-  { 162770, true },
-  { 162784, true },
+  { 162646, true },
+  { 162662, true },
+  { 162671, true },
+  { 162688, true },
+  { 162698, true },
+  { 162711, true },
+  { 162729, true },
+  { 162742, true },
+  { 162761, false },
+  { 162771, true },
+  { 162788, true },
   { 162804, true },
-  { 162816, true },
-  { 162829, true },
-  { 162847, true },
-  { 162854, true },
-  { 162871, true },
-  { 162888, true },
-  { 162908, true },
-  { 162927, true },
-  { 162943, false },
-  { 162961, true },
-  { 162988, true },
-  { 163005, true },
-  { 163019, true },
-  { 163033, true },
-  { 163048, false },
-  { 163067, true },
-  { 163085, true },
-  { 163103, true },
+  { 162827, true },
+  { 162852, true },
+  { 162866, true },
+  { 162879, true },
+  { 162890, true },
+  { 162905, true },
+  { 162917, true },
+  { 162935, true },
+  { 162960, true },
+  { 162972, true },
+  { 162984, true },
+  { 162996, true },
+  { 163014, true },
+  { 163035, true },
+  { 163051, true },
+  { 163063, true },
+  { 163077, true },
+  { 163092, true },
+  { 163105, true },
   { 163121, true },
-  { 163138, true },
-  { 163159, true },
-  { 163178, true },
-  { 163192, true },
-  { 163203, true },
+  { 163139, true },
+  { 163153, true },
+  { 163163, false },
+  { 163174, true },
+  { 163182, false },
+  { 163194, true },
   { 163211, true },
   { 163221, true },
-  { 163236, true },
-  { 163251, true },
-  { 163262, true },
-  { 163284, true },
-  { 163297, true },
-  { 163316, true },
-  { 163342, true },
-  { 163358, true },
-  { 163376, true },
+  { 163232, true },
+  { 163239, true },
+  { 163250, true },
+  { 163267, true },
+  { 163287, true },
+  { 163302, true },
+  { 163311, true },
+  { 163318, true },
+  { 163328, true },
+  { 163339, true },
+  { 163348, true },
+  { 163363, true },
+  { 163373, true },
   { 163394, true },
-  { 163409, true },
-  { 163417, true },
-  { 163430, true },
-  { 163438, true },
-  { 163449, true },
-  { 163463, true },
-  { 163479, true },
-  { 163488, true },
-  { 163505, true },
-  { 163515, true },
-  { 163528, true },
-  { 163546, true },
-  { 163559, true },
-  { 163578, false },
-  { 163588, true },
-  { 163605, true },
-  { 163621, true },
-  { 163644, true },
-  { 163669, true },
-  { 163683, true },
-  { 163696, true },
-  { 163707, true },
-  { 163722, true },
+  { 163403, true },
+  { 163419, false },
+  { 163432, true },
+  { 163448, true },
+  { 163468, true },
+  { 163482, true },
+  { 163498, true },
+  { 163512, true },
+  { 163527, true },
+  { 163535, true },
+  { 163548, true },
+  { 163564, true },
+  { 163577, true },
+  { 163590, true },
+  { 163604, true },
+  { 163626, true },
+  { 163647, true },
+  { 163666, true },
+  { 163694, true },
+  { 163715, true },
   { 163734, true },
-  { 163752, true },
+  { 163758, true },
+  { 163768, true },
   { 163777, true },
-  { 163789, true },
-  { 163801, true },
-  { 163813, true },
-  { 163831, true },
-  { 163852, true },
-  { 163868, true },
-  { 163880, true },
-  { 163894, true },
-  { 163909, true },
-  { 163922, true },
-  { 163938, true },
-  { 163956, true },
-  { 163970, true },
-  { 163980, false },
-  { 163991, true },
-  { 163999, false },
-  { 164011, true },
-  { 164028, true },
-  { 164038, true },
-  { 164049, true },
-  { 164056, true },
-  { 164067, true },
+  { 163790, true },
+  { 163796, true },
+  { 163808, true },
+  { 163822, true },
+  { 163836, true },
+  { 163850, false },
+  { 163863, true },
+  { 163876, false },
+  { 163887, true },
+  { 163900, true },
+  { 163910, true },
+  { 163923, true },
+  { 163942, true },
+  { 163961, true },
+  { 163981, true },
+  { 163990, true },
+  { 164001, true },
+  { 164010, true },
+  { 164029, false },
+  { 164045, false },
+  { 164058, true },
+  { 164073, true },
   { 164084, true },
-  { 164104, true },
-  { 164119, true },
+  { 164103, true },
+  { 164116, true },
   { 164128, true },
-  { 164135, true },
-  { 164145, true },
+  { 164141, true },
   { 164156, true },
   { 164165, true },
-  { 164180, true },
-  { 164190, true },
-  { 164211, true },
-  { 164220, true },
-  { 164236, false },
+  { 164178, true },
+  { 164193, true },
+  { 164209, true },
+  { 164226, true },
+  { 164235, true },
   { 164249, true },
-  { 164265, true },
-  { 164285, true },
-  { 164299, true },
-  { 164315, true },
-  { 164329, true },
-  { 164344, true },
-  { 164352, true },
-  { 164365, true },
-  { 164381, true },
-  { 164394, true },
-  { 164407, true },
-  { 164421, true },
-  { 164443, true },
-  { 164464, true },
-  { 164483, true },
-  { 164511, true },
-  { 164532, true },
-  { 164551, true },
-  { 164575, true },
-  { 164585, true },
-  { 164594, true },
-  { 164607, true },
-  { 164613, true },
-  { 164625, true },
-  { 164639, true },
-  { 164653, true },
-  { 164667, false },
-  { 164680, true },
-  { 164693, false },
-  { 164704, true },
-  { 164717, true },
-  { 164727, true },
-  { 164740, true },
-  { 164759, true },
-  { 164778, true },
-  { 164798, true },
-  { 164807, true },
-  { 164818, true },
-  { 164827, true },
-  { 164846, false },
-  { 164862, false },
-  { 164875, true },
-  { 164890, true },
-  { 164901, true },
-  { 164920, true },
-  { 164933, true },
+  { 164263, true },
+  { 164287, true },
+  { 164302, true },
+  { 164318, true },
+  { 164333, true },
+  { 164351, true },
+  { 164364, true },
+  { 164377, true },
+  { 164386, true },
+  { 164399, true },
+  { 164419, true },
+  { 164430, true },
+  { 164444, true },
+  { 164453, true },
+  { 164471, true },
+  { 164489, true },
+  { 164503, true },
+  { 164520, true },
+  { 164537, true },
+  { 164553, true },
+  { 164565, true },
+  { 164579, true },
+  { 164600, true },
+  { 164625, false },
+  { 164641, true },
+  { 164658, true },
+  { 164677, true },
+  { 164692, true },
+  { 164702, true },
+  { 164726, true },
+  { 164738, true },
+  { 164751, true },
+  { 164765, true },
+  { 164774, true },
+  { 164803, true },
+  { 164828, true },
+  { 164853, true },
+  { 164882, true },
+  { 164894, true },
+  { 164910, true },
+  { 164919, true },
+  { 164931, true },
   { 164945, true },
-  { 164958, true },
+  { 164959, true },
   { 164973, true },
-  { 164982, true },
-  { 164995, true },
-  { 165010, true },
-  { 165026, true },
-  { 165043, true },
-  { 165052, true },
-  { 165066, true },
-  { 165080, true },
-  { 165104, true },
-  { 165119, true },
-  { 165135, true },
-  { 165150, true },
-  { 165168, true },
-  { 165181, true },
+  { 164986, true },
+  { 165005, true },
+  { 165018, true },
+  { 165035, true },
+  { 165044, true },
+  { 165062, true },
+  { 165076, false },
+  { 165087, true },
+  { 165107, false },
+  { 165120, true },
+  { 165130, true },
+  { 165149, true },
+  { 165171, true },
+  { 165182, true },
+  { 165193, true },
   { 165204, true },
-  { 165217, true },
-  { 165226, true },
-  { 165239, true },
-  { 165259, true },
-  { 165270, true },
-  { 165284, true },
-  { 165293, true },
-  { 165311, true },
-  { 165329, true },
-  { 165343, true },
-  { 165360, true },
-  { 165377, true },
-  { 165393, true },
-  { 165405, true },
-  { 165419, true },
-  { 165440, true },
-  { 165465, false },
-  { 165481, true },
-  { 165498, true },
+  { 165214, true },
+  { 165223, true },
+  { 165231, true },
+  { 165237, false },
+  { 165245, true },
+  { 165254, true },
+  { 165262, true },
+  { 165272, true },
+  { 165280, true },
+  { 165299, true },
+  { 165324, true },
+  { 165331, true },
+  { 165344, true },
+  { 165358, true },
+  { 165368, true },
+  { 165378, true },
+  { 165397, true },
+  { 165409, true },
+  { 165424, true },
+  { 165436, true },
+  { 165449, true },
+  { 165461, true },
+  { 165480, true },
+  { 165491, false },
+  { 165502, true },
   { 165517, true },
-  { 165532, true },
-  { 165542, true },
-  { 165566, true },
-  { 165578, true },
-  { 165591, true },
-  { 165605, true },
+  { 165533, true },
+  { 165555, true },
+  { 165569, true },
+  { 165582, true },
+  { 165595, true },
   { 165614, true },
+  { 165630, true },
   { 165643, true },
-  { 165668, true },
-  { 165693, true },
+  { 165663, false },
+  { 165690, false },
+  { 165706, true },
   { 165722, true },
-  { 165734, true },
-  { 165750, true },
-  { 165759, true },
-  { 165771, true },
-  { 165785, true },
-  { 165799, true },
-  { 165813, true },
-  { 165826, true },
-  { 165845, true },
-  { 165858, true },
-  { 165875, true },
-  { 165884, true },
-  { 165902, true },
-  { 165916, false },
-  { 165927, true },
-  { 165947, false },
-  { 165960, true },
-  { 165970, true },
-  { 165989, true },
-  { 166011, true },
-  { 166022, true },
-  { 166033, true },
+  { 165737, true },
+  { 165753, true },
+  { 165772, true },
+  { 165781, true },
+  { 165794, true },
+  { 165811, true },
+  { 165830, true },
+  { 165843, true },
+  { 165859, true },
+  { 165872, true },
+  { 165891, true },
+  { 165908, true },
+  { 165922, true },
+  { 165940, true },
+  { 165958, true },
+  { 165976, true },
+  { 165994, true },
+  { 166007, true },
+  { 166023, true },
   { 166044, true },
   { 166054, true },
-  { 166063, true },
-  { 166071, true },
-  { 166077, false },
-  { 166085, true },
-  { 166094, true },
-  { 166102, true },
-  { 166112, true },
-  { 166120, true },
-  { 166139, true },
-  { 166164, true },
-  { 166171, true },
-  { 166184, true },
-  { 166198, true },
-  { 166208, true },
-  { 166218, true },
-  { 166237, true },
-  { 166249, true },
-  { 166264, true },
-  { 166276, true },
-  { 166289, true },
-  { 166301, true },
-  { 166320, true },
-  { 166331, false },
-  { 166342, true },
-  { 166357, true },
-  { 166373, true },
-  { 166395, true },
-  { 166409, true },
-  { 166422, true },
-  { 166435, true },
+  { 166075, true },
+  { 166088, true },
+  { 166097, true },
+  { 166108, true },
+  { 166121, false },
+  { 166134, true },
+  { 166147, true },
+  { 166163, true },
+  { 166176, true },
+  { 166190, true },
+  { 166205, true },
+  { 166219, true },
+  { 166234, true },
+  { 166246, true },
+  { 166262, true },
+  { 166281, true },
+  { 166297, true },
+  { 166310, true },
+  { 166325, true },
+  { 166334, true },
+  { 166344, true },
+  { 166371, false },
+  { 166388, true },
+  { 166406, true },
+  { 166430, true },
   { 166454, true },
-  { 166470, true },
-  { 166483, true },
-  { 166503, false },
-  { 166530, false },
-  { 166546, true },
-  { 166562, true },
-  { 166577, true },
-  { 166593, true },
-  { 166611, true },
-  { 166630, true },
-  { 166639, true },
-  { 166652, true },
-  { 166669, true },
-  { 166688, true },
-  { 166701, true },
-  { 166717, true },
-  { 166730, true },
-  { 166749, true },
-  { 166766, true },
-  { 166780, true },
-  { 166798, true },
-  { 166815, true },
-  { 166833, true },
-  { 166851, true },
-  { 166869, true },
-  { 166882, true },
+  { 166473, true },
+  { 166487, true },
+  { 166495, true },
+  { 166506, true },
+  { 166534, true },
+  { 166548, true },
+  { 166560, true },
+  { 166569, true },
+  { 166579, true },
+  { 166599, true },
+  { 166613, true },
+  { 166626, true },
+  { 166646, true },
+  { 166664, true },
+  { 166676, true },
+  { 166691, true },
+  { 166706, true },
+  { 166721, false },
+  { 166738, true },
+  { 166750, false },
+  { 166773, true },
+  { 166790, true },
+  { 166803, true },
+  { 166814, true },
+  { 166837, true },
+  { 166855, true },
+  { 166876, true },
   { 166898, true },
   { 166919, true },
-  { 166929, true },
-  { 166950, true },
-  { 166963, true },
-  { 166972, true },
-  { 166983, true },
-  { 166996, false },
-  { 167009, true },
-  { 167022, true },
-  { 167038, true },
-  { 167051, true },
-  { 167065, true },
-  { 167080, true },
-  { 167094, true },
-  { 167109, true },
-  { 167121, true },
-  { 167137, true },
-  { 167156, true },
+  { 166940, true },
+  { 166950, false },
+  { 166964, true },
+  { 166981, true },
+  { 166998, true },
+  { 167008, true },
+  { 167021, true },
+  { 167036, true },
+  { 167054, true },
+  { 167071, true },
+  { 167087, true },
+  { 167124, true },
+  { 167143, true },
+  { 167157, true },
   { 167172, true },
-  { 167185, true },
-  { 167200, true },
-  { 167209, true },
-  { 167219, true },
-  { 167246, false },
-  { 167263, true },
-  { 167281, true },
-  { 167305, true },
-  { 167329, true },
-  { 167348, true },
-  { 167362, true },
-  { 167370, true },
-  { 167381, true },
-  { 167409, true },
-  { 167423, true },
-  { 167435, true },
-  { 167444, true },
-  { 167454, true },
-  { 167474, true },
-  { 167488, true },
-  { 167501, true },
-  { 167521, true },
-  { 167539, true },
-  { 167551, true },
-  { 167566, true },
-  { 167581, true },
-  { 167596, false },
-  { 167613, true },
-  { 167625, false },
-  { 167648, true },
-  { 167665, true },
-  { 167678, true },
-  { 167689, true },
-  { 167712, true },
-  { 167730, true },
-  { 167751, true },
-  { 167773, true },
-  { 167794, true },
-  { 167815, true },
-  { 167825, false },
-  { 167839, true },
-  { 167856, true },
-  { 167873, true },
-  { 167883, true },
-  { 167896, true },
-  { 167911, true },
-  { 167929, true },
-  { 167946, true },
-  { 167962, true },
-  { 167999, true },
-  { 168018, true },
-  { 168032, true },
-  { 168047, true },
-  { 168062, false },
+  { 167187, false },
+  { 167199, true },
+  { 167216, true },
+  { 167233, false },
+  { 167248, true },
+  { 167261, true },
+  { 167282, false },
+  { 167294, false },
+  { 167311, true },
+  { 167328, true },
+  { 167345, true },
+  { 167358, true },
+  { 167374, true },
+  { 167390, true },
+  { 167403, true },
+  { 167421, true },
+  { 167431, true },
+  { 167442, true },
+  { 167458, true },
+  { 167468, true },
+  { 167487, true },
+  { 167500, true },
+  { 167514, true },
+  { 167529, true },
+  { 167540, true },
+  { 167560, true },
+  { 167573, true },
+  { 167586, true },
+  { 167598, true },
+  { 167617, true },
+  { 167630, true },
+  { 167641, true },
+  { 167652, true },
+  { 167672, true },
+  { 167682, true },
+  { 167692, true },
+  { 167714, true },
+  { 167734, true },
+  { 167752, true },
+  { 167765, true },
+  { 167774, true },
+  { 167785, true },
+  { 167800, true },
+  { 167816, true },
+  { 167832, true },
+  { 167854, true },
+  { 167870, true },
+  { 167886, true },
+  { 167901, true },
+  { 167914, true },
+  { 167933, true },
+  { 167943, true },
+  { 167957, true },
+  { 167968, true },
+  { 167986, true },
+  { 168003, true },
+  { 168015, true },
+  { 168028, true },
+  { 168045, true },
+  { 168057, true },
   { 168074, true },
-  { 168091, true },
-  { 168108, false },
+  { 168083, true },
+  { 168103, true },
   { 168123, true },
-  { 168136, true },
-  { 168157, false },
-  { 168169, false },
-  { 168186, true },
-  { 168203, true },
-  { 168220, true },
-  { 168233, true },
-  { 168249, true },
-  { 168265, true },
-  { 168278, true },
-  { 168296, true },
-  { 168306, true },
-  { 168317, true },
-  { 168333, true },
-  { 168343, true },
-  { 168362, true },
-  { 168375, true },
-  { 168389, true },
-  { 168404, true },
-  { 168415, true },
-  { 168435, true },
+  { 168140, true },
+  { 168150, true },
+  { 168167, true },
+  { 168179, true },
+  { 168196, true },
+  { 168211, true },
+  { 168230, true },
+  { 168247, true },
+  { 168264, true },
+  { 168281, true },
+  { 168292, true },
+  { 168304, true },
+  { 168316, true },
+  { 168326, true },
+  { 168335, true },
+  { 168348, true },
+  { 168363, true },
+  { 168373, true },
+  { 168385, true },
+  { 168399, false },
+  { 168408, true },
+  { 168420, true },
+  { 168431, true },
   { 168448, true },
   { 168461, true },
-  { 168473, true },
+  { 168471, true },
+  { 168481, true },
   { 168492, true },
-  { 168505, true },
-  { 168516, true },
-  { 168527, true },
-  { 168547, true },
-  { 168557, true },
-  { 168567, true },
-  { 168589, true },
+  { 168501, true },
+  { 168513, false },
+  { 168526, true },
+  { 168542, true },
+  { 168553, true },
+  { 168567, false },
+  { 168578, true },
+  { 168601, true },
   { 168609, true },
-  { 168627, true },
-  { 168636, true },
-  { 168647, true },
-  { 168662, true },
-  { 168678, true },
-  { 168694, true },
-  { 168716, true },
-  { 168732, true },
-  { 168748, true },
-  { 168763, true },
-  { 168776, true },
-  { 168795, true },
-  { 168805, true },
-  { 168819, true },
-  { 168830, true },
-  { 168848, true },
-  { 168865, true },
-  { 168877, true },
-  { 168890, true },
-  { 168907, true },
+  { 168619, true },
+  { 168631, true },
+  { 168644, true },
+  { 168652, true },
+  { 168660, true },
+  { 168675, true },
+  { 168685, true },
+  { 168698, true },
+  { 168707, true },
+  { 168722, true },
+  { 168731, true },
+  { 168740, true },
+  { 168759, true },
+  { 168774, true },
+  { 168796, true },
+  { 168812, true },
+  { 168828, true },
+  { 168841, true },
+  { 168852, true },
+  { 168864, true },
+  { 168878, true },
+  { 168889, true },
+  { 168906, true },
   { 168919, true },
-  { 168936, true },
-  { 168945, true },
-  { 168965, true },
-  { 168985, true },
+  { 168935, true },
+  { 168956, true },
+  { 168973, true },
+  { 168989, true },
   { 169002, true },
-  { 169012, true },
-  { 169029, true },
-  { 169041, true },
-  { 169058, true },
-  { 169073, true },
-  { 169092, true },
+  { 169013, true },
+  { 169027, true },
+  { 169051, true },
+  { 169074, true },
+  { 169096, false },
   { 169109, true },
-  { 169126, true },
-  { 169143, true },
-  { 169154, true },
-  { 169166, true },
-  { 169178, true },
-  { 169188, true },
-  { 169197, true },
-  { 169210, true },
-  { 169225, true },
-  { 169235, true },
-  { 169247, true },
-  { 169261, false },
-  { 169270, true },
-  { 169282, true },
-  { 169293, true },
-  { 169310, true },
-  { 169323, true },
-  { 169333, true },
-  { 169343, true },
-  { 169354, true },
-  { 169363, true },
-  { 169375, false },
-  { 169388, true },
-  { 169404, true },
-  { 169415, true },
-  { 169429, false },
-  { 169440, true },
-  { 169450, true },
-  { 169473, true },
-  { 169481, true },
-  { 169491, true },
-  { 169503, true },
-  { 169516, true },
-  { 169524, true },
-  { 169532, true },
-  { 169547, true },
-  { 169557, true },
-  { 169570, true },
-  { 169579, true },
+  { 169123, true },
+  { 169137, false },
+  { 169158, true },
+  { 169168, true },
+  { 169180, true },
+  { 169206, true },
+  { 169219, true },
+  { 169233, true },
+  { 169250, true },
+  { 169269, true },
+  { 169286, true },
+  { 169304, true },
+  { 169325, true },
+  { 169339, true },
+  { 169361, true },
+  { 169380, true },
+  { 169392, true },
+  { 169416, true },
+  { 169426, true },
+  { 169439, true },
+  { 169454, true },
+  { 169471, true },
+  { 169487, true },
+  { 169505, true },
+  { 169522, true },
+  { 169537, true },
+  { 169553, true },
+  { 169580, true },
   { 169594, true },
-  { 169603, true },
-  { 169612, true },
-  { 169631, true },
-  { 169646, true },
-  { 169668, true },
-  { 169684, true },
-  { 169700, true },
-  { 169713, true },
-  { 169724, true },
-  { 169732, true },
-  { 169746, true },
-  { 169757, true },
-  { 169774, true },
-  { 169787, true },
-  { 169803, true },
-  { 169824, true },
-  { 169841, true },
-  { 169857, true },
-  { 169870, true },
-  { 169881, true },
-  { 169895, true },
-  { 169919, true },
-  { 169942, true },
-  { 169964, true },
-  { 169977, false },
-  { 169990, true },
-  { 170004, true },
-  { 170018, false },
-  { 170039, true },
-  { 170049, true },
-  { 170061, true },
-  { 170087, true },
-  { 170100, true },
-  { 170114, true },
-  { 170131, true },
-  { 170150, true },
+  { 169610, true },
+  { 169625, true },
+  { 169638, true },
+  { 169647, true },
+  { 169663, true },
+  { 169678, true },
+  { 169691, true },
+  { 169702, true },
+  { 169714, true },
+  { 169731, true },
+  { 169742, true },
+  { 169765, true },
+  { 169775, true },
+  { 169789, true },
+  { 169798, true },
+  { 169805, false },
+  { 169825, true },
+  { 169836, true },
+  { 169850, true },
+  { 169863, false },
+  { 169877, true },
+  { 169885, true },
+  { 169896, true },
+  { 169914, true },
+  { 169924, true },
+  { 169934, true },
+  { 169945, true },
+  { 169970, true },
+  { 169984, true },
+  { 169995, true },
+  { 170006, true },
+  { 170021, true },
+  { 170036, true },
+  { 170052, false },
+  { 170063, true },
+  { 170078, true },
+  { 170093, false },
+  { 170112, true },
+  { 170123, true },
+  { 170133, true },
+  { 170153, true },
   { 170167, true },
-  { 170185, true },
-  { 170206, true },
-  { 170220, true },
-  { 170242, true },
-  { 170261, true },
-  { 170273, true },
-  { 170297, true },
-  { 170307, true },
-  { 170320, true },
-  { 170335, true },
-  { 170352, true },
-  { 170368, true },
-  { 170386, true },
-  { 170403, true },
-  { 170418, true },
-  { 170434, true },
-  { 170461, true },
-  { 170475, true },
-  { 170491, true },
-  { 170506, true },
-  { 170519, true },
-  { 170528, true },
-  { 170544, true },
-  { 170559, true },
-  { 170572, true },
-  { 170583, true },
-  { 170595, true },
-  { 170612, true },
-  { 170623, true },
-  { 170646, true },
-  { 170656, true },
-  { 170670, true },
+  { 170181, true },
+  { 170192, true },
+  { 170199, true },
+  { 170212, true },
+  { 170225, false },
+  { 170235, true },
+  { 170244, true },
+  { 170254, true },
+  { 170265, true },
+  { 170277, true },
+  { 170285, true },
+  { 170295, true },
+  { 170312, true },
+  { 170321, true },
+  { 170340, true },
+  { 170351, true },
+  { 170370, false },
+  { 170381, true },
+  { 170398, true },
+  { 170415, true },
+  { 170428, true },
+  { 170444, true },
+  { 170455, true },
+  { 170466, true },
+  { 170483, true },
+  { 170500, false },
+  { 170508, true },
+  { 170517, false },
+  { 170530, true },
+  { 170541, true },
+  { 170548, true },
+  { 170562, true },
+  { 170576, true },
+  { 170596, false },
+  { 170608, false },
+  { 170624, true },
+  { 170636, true },
+  { 170655, true },
   { 170679, true },
-  { 170686, true },
-  { 170700, false },
+  { 170687, true },
+  { 170704, true },
   { 170720, true },
-  { 170731, true },
-  { 170745, true },
-  { 170758, false },
-  { 170772, true },
-  { 170780, true },
-  { 170791, true },
-  { 170809, true },
-  { 170819, true },
-  { 170829, true },
-  { 170840, true },
-  { 170865, true },
-  { 170879, true },
-  { 170890, true },
-  { 170901, true },
-  { 170916, true },
-  { 170931, true },
-  { 170947, false },
-  { 170958, true },
-  { 170973, true },
-  { 170988, false },
-  { 171007, true },
-  { 171018, true },
-  { 171028, true },
-  { 171048, true },
-  { 171062, true },
-  { 171076, true },
-  { 171087, true },
-  { 171094, true },
-  { 171107, true },
-  { 171120, false },
-  { 171130, true },
-  { 171139, true },
+  { 170736, true },
+  { 170748, true },
+  { 170761, true },
+  { 170775, true },
+  { 170791, false },
+  { 170806, true },
+  { 170826, true },
+  { 170834, true },
+  { 170848, true },
+  { 170861, true },
+  { 170872, true },
+  { 170882, false },
+  { 170892, true },
+  { 170906, true },
+  { 170918, true },
+  { 170928, false },
+  { 170941, true },
+  { 170957, true },
+  { 170979, true },
+  { 170996, true },
+  { 171005, true },
+  { 171014, true },
+  { 171029, true },
+  { 171043, true },
+  { 171053, true },
+  { 171063, true },
+  { 171084, true },
+  { 171099, true },
+  { 171113, true },
+  { 171133, true },
   { 171149, true },
-  { 171160, true },
-  { 171172, true },
-  { 171180, true },
-  { 171190, true },
+  { 171161, false },
+  { 171177, true },
+  { 171192, true },
   { 171207, true },
-  { 171224, true },
-  { 171233, true },
-  { 171252, true },
-  { 171263, true },
-  { 171282, false },
-  { 171293, true },
-  { 171310, true },
-  { 171327, true },
-  { 171340, true },
-  { 171356, true },
-  { 171367, true },
-  { 171378, true },
-  { 171395, true },
+  { 171221, true },
+  { 171234, true },
+  { 171245, true },
+  { 171255, false },
+  { 171274, false },
+  { 171286, true },
+  { 171302, true },
+  { 171330, true },
+  { 171362, true },
+  { 171377, true },
+  { 171389, true },
+  { 171398, true },
   { 171412, false },
-  { 171420, true },
-  { 171429, false },
-  { 171442, true },
-  { 171453, true },
-  { 171460, true },
-  { 171474, true },
-  { 171488, true },
-  { 171508, false },
-  { 171520, false },
-  { 171536, true },
-  { 171548, true },
-  { 171567, true },
-  { 171591, true },
-  { 171599, true },
-  { 171616, true },
-  { 171632, true },
-  { 171648, true },
-  { 171657, true },
-  { 171669, true },
-  { 171682, true },
-  { 171696, true },
-  { 171712, false },
-  { 171727, true },
-  { 171747, true },
-  { 171755, true },
-  { 171769, true },
-  { 171782, true },
-  { 171793, true },
-  { 171803, false },
-  { 171813, true },
-  { 171827, true },
-  { 171839, true },
-  { 171849, false },
-  { 171862, true },
-  { 171878, true },
-  { 171900, true },
-  { 171917, true },
+  { 171425, true },
+  { 171443, true },
+  { 171451, true },
+  { 171465, true },
+  { 171479, true },
+  { 171491, true },
+  { 171512, true },
+  { 171527, true },
+  { 171543, false },
+  { 171551, false },
+  { 171563, true },
+  { 171572, true },
+  { 171582, true },
+  { 171593, true },
+  { 171605, true },
+  { 171618, true },
+  { 171634, true },
+  { 171644, true },
+  { 171655, true },
+  { 171666, true },
+  { 171678, true },
+  { 171688, true },
+  { 171697, true },
+  { 171716, true },
+  { 171744, true },
+  { 171760, true },
+  { 171771, true },
+  { 171786, true },
+  { 171799, true },
+  { 171816, true },
+  { 171829, true },
+  { 171847, true },
+  { 171865, true },
+  { 171879, true },
+  { 171891, true },
+  { 171906, true },
   { 171926, true },
-  { 171935, true },
-  { 171950, true },
+  { 171945, true },
   { 171964, true },
-  { 171974, true },
-  { 171984, true },
-  { 172005, true },
-  { 172020, true },
-  { 172034, true },
+  { 171977, true },
+  { 171993, true },
+  { 172006, true },
+  { 172021, true },
+  { 172037, true },
   { 172054, true },
   { 172070, true },
-  { 172082, false },
-  { 172098, true },
-  { 172113, true },
-  { 172128, true },
-  { 172141, true },
-  { 172152, true },
-  { 172162, false },
-  { 172181, false },
-  { 172193, true },
-  { 172209, true },
-  { 172237, true },
-  { 172269, true },
-  { 172284, true },
-  { 172296, true },
-  { 172305, true },
-  { 172319, false },
-  { 172332, true },
-  { 172350, true },
-  { 172358, true },
-  { 172372, true },
-  { 172386, true },
-  { 172398, true },
-  { 172419, true },
-  { 172434, true },
-  { 172450, false },
-  { 172462, true },
-  { 172471, true },
-  { 172481, true },
-  { 172492, true },
+  { 172087, true },
+  { 172100, true },
+  { 172115, true },
+  { 172134, true },
+  { 172147, true },
+  { 172163, true },
+  { 172174, true },
+  { 172187, true },
+  { 172201, true },
+  { 172215, false },
+  { 172231, true },
+  { 172250, true },
+  { 172270, true },
+  { 172290, false },
+  { 172306, true },
+  { 172322, true },
+  { 172337, true },
+  { 172352, true },
+  { 172373, true },
+  { 172391, false },
+  { 172410, true },
+  { 172421, true },
+  { 172437, true },
+  { 172451, true },
+  { 172464, true },
+  { 172477, true },
+  { 172493, true },
   { 172504, true },
-  { 172517, true },
-  { 172533, true },
-  { 172543, true },
-  { 172554, true },
-  { 172565, true },
-  { 172577, true },
-  { 172587, true },
-  { 172596, true },
-  { 172615, true },
-  { 172643, true },
-  { 172659, true },
-  { 172670, true },
-  { 172685, true },
-  { 172698, false },
+  { 172513, true },
+  { 172523, true },
+  { 172534, true },
+  { 172546, true },
+  { 172560, true },
+  { 172569, true },
+  { 172582, true },
+  { 172601, true },
+  { 172618, false },
+  { 172633, true },
+  { 172649, false },
+  { 172661, true },
+  { 172681, true },
+  { 172694, true },
   { 172714, true },
-  { 172731, true },
-  { 172744, true },
-  { 172762, true },
-  { 172780, true },
-  { 172794, true },
+  { 172736, true },
+  { 172759, true },
+  { 172777, true },
+  { 172793, true },
   { 172806, true },
-  { 172821, true },
+  { 172818, true },
+  { 172832, true },
   { 172841, true },
-  { 172860, true },
-  { 172879, true },
-  { 172892, true },
-  { 172908, true },
-  { 172921, true },
-  { 172936, true },
-  { 172952, true },
-  { 172969, true },
-  { 172985, true },
-  { 173002, true },
+  { 172855, true },
+  { 172863, true },
+  { 172881, true },
+  { 172891, true },
+  { 172911, true },
+  { 172928, true },
+  { 172948, true },
+  { 172959, true },
+  { 172972, true },
+  { 172987, true },
+  { 172999, true },
   { 173015, true },
-  { 173030, true },
-  { 173049, true },
-  { 173062, true },
-  { 173078, true },
-  { 173090, true },
-  { 173101, true },
-  { 173114, true },
-  { 173128, true },
-  { 173142, false },
-  { 173158, true },
-  { 173177, true },
-  { 173197, true },
-  { 173217, false },
-  { 173233, true },
-  { 173249, true },
-  { 173264, true },
-  { 173279, true },
-  { 173300, true },
-  { 173318, false },
-  { 173337, true },
-  { 173348, true },
-  { 173364, true },
-  { 173378, true },
-  { 173391, true },
-  { 173404, true },
+  { 173028, true },
+  { 173045, true },
+  { 173066, true },
+  { 173074, true },
+  { 173084, true },
+  { 173107, true },
+  { 173116, true },
+  { 173126, true },
+  { 173139, true },
+  { 173149, true },
+  { 173162, true },
+  { 173183, true },
+  { 173193, true },
+  { 173207, true },
+  { 173227, true },
+  { 173240, true },
+  { 173260, false },
+  { 173283, true },
+  { 173296, true },
+  { 173307, true },
+  { 173318, true },
+  { 173328, true },
+  { 173353, true },
+  { 173363, true },
+  { 173377, true },
+  { 173391, false },
+  { 173406, true },
   { 173420, true },
-  { 173431, true },
-  { 173440, true },
-  { 173450, true },
-  { 173461, true },
-  { 173473, true },
-  { 173487, true },
-  { 173496, true },
-  { 173509, true },
-  { 173528, true },
-  { 173545, false },
-  { 173560, true },
-  { 173576, false },
-  { 173588, true },
-  { 173608, true },
-  { 173621, true },
-  { 173641, true },
-  { 173663, true },
-  { 173686, true },
-  { 173704, true },
-  { 173720, true },
-  { 173733, true },
-  { 173745, true },
-  { 173759, true },
-  { 173768, true },
-  { 173782, true },
-  { 173790, true },
-  { 173808, true },
-  { 173818, true },
-  { 173838, true },
-  { 173855, true },
-  { 173875, true },
-  { 173886, true },
-  { 173899, true },
-  { 173914, true },
-  { 173926, true },
-  { 173942, true },
-  { 173955, true },
-  { 173972, true },
+  { 173445, true },
+  { 173459, true },
+  { 173471, true },
+  { 173485, true },
+  { 173495, false },
+  { 173515, true },
+  { 173529, true },
+  { 173548, true },
+  { 173561, true },
+  { 173576, true },
+  { 173586, true },
+  { 173600, true },
+  { 173609, true },
+  { 173620, true },
+  { 173631, true },
+  { 173642, true },
+  { 173652, false },
+  { 173672, true },
+  { 173687, true },
+  { 173699, true },
+  { 173711, true },
+  { 173730, true },
+  { 173750, true },
+  { 173760, true },
+  { 173774, true },
+  { 173791, true },
+  { 173806, true },
+  { 173814, true },
+  { 173835, false },
+  { 173853, true },
+  { 173865, true },
+  { 173881, true },
+  { 173896, true },
+  { 173907, true },
+  { 173929, true },
+  { 173944, true },
+  { 173958, true },
+  { 173979, true },
   { 173993, true },
-  { 174001, true },
-  { 174011, true },
-  { 174034, true },
-  { 174043, true },
-  { 174053, true },
-  { 174066, true },
-  { 174076, true },
-  { 174089, true },
-  { 174110, true },
-  { 174120, true },
-  { 174134, true },
-  { 174154, true },
-  { 174167, true },
-  { 174187, false },
-  { 174210, true },
-  { 174223, true },
-  { 174234, true },
-  { 174245, true },
-  { 174255, true },
-  { 174280, true },
-  { 174290, true },
-  { 174304, true },
-  { 174318, false },
+  { 174010, true },
+  { 174029, true },
+  { 174048, true },
+  { 174061, true },
+  { 174081, true },
+  { 174097, true },
+  { 174123, true },
+  { 174144, true },
+  { 174162, true },
+  { 174181, true },
+  { 174205, true },
+  { 174221, true },
+  { 174246, true },
+  { 174272, true },
+  { 174283, true },
+  { 174307, true },
   { 174333, true },
-  { 174347, true },
-  { 174372, true },
-  { 174386, true },
-  { 174398, true },
-  { 174412, true },
-  { 174422, false },
-  { 174442, true },
-  { 174456, true },
-  { 174475, true },
-  { 174488, true },
-  { 174503, true },
-  { 174513, true },
-  { 174527, true },
-  { 174536, false },
-  { 174547, true },
-  { 174558, true },
-  { 174569, true },
-  { 174580, true },
-  { 174590, false },
-  { 174610, true },
-  { 174625, true },
-  { 174637, true },
-  { 174649, true },
-  { 174668, true },
+  { 174355, true },
+  { 174376, false },
+  { 174393, true },
+  { 174410, true },
+  { 174428, true },
+  { 174438, true },
+  { 174454, false },
+  { 174472, true },
+  { 174487, false },
+  { 174506, true },
+  { 174528, true },
+  { 174551, true },
+  { 174570, true },
+  { 174588, true },
+  { 174611, true },
+  { 174624, true },
+  { 174640, true },
+  { 174658, true },
+  { 174674, true },
   { 174688, true },
-  { 174698, true },
-  { 174712, true },
-  { 174729, true },
-  { 174744, true },
+  { 174706, true },
+  { 174721, true },
+  { 174738, true },
   { 174752, true },
-  { 174773, false },
-  { 174791, true },
-  { 174803, true },
-  { 174819, true },
-  { 174834, true },
-  { 174845, true },
-  { 174867, true },
-  { 174882, true },
-  { 174896, true },
-  { 174917, true },
-  { 174931, true },
-  { 174948, true },
-  { 174967, true },
-  { 174986, true },
-  { 174999, true },
-  { 175019, true },
+  { 174766, false },
+  { 174783, true },
+  { 174801, true },
+  { 174817, true },
+  { 174833, true },
+  { 174846, true },
+  { 174866, true },
+  { 174884, true },
+  { 174903, true },
+  { 174916, true },
+  { 174952, true },
+  { 174975, true },
+  { 174990, true },
+  { 175006, true },
+  { 175017, true },
   { 175035, true },
-  { 175061, true },
-  { 175082, true },
-  { 175100, true },
-  { 175119, true },
-  { 175143, true },
-  { 175159, true },
-  { 175184, true },
-  { 175210, true },
-  { 175221, true },
-  { 175245, true },
-  { 175271, true },
-  { 175293, true },
-  { 175314, false },
-  { 175331, true },
-  { 175348, true },
-  { 175374, true },
-  { 175392, true },
-  { 175402, true },
-  { 175418, false },
+  { 175065, true },
+  { 175081, true },
+  { 175096, true },
+  { 175111, true },
+  { 175122, true },
+  { 175136, true },
+  { 175158, true },
+  { 175173, true },
+  { 175186, true },
+  { 175209, true },
+  { 175218, true },
+  { 175240, true },
+  { 175259, true },
+  { 175283, true },
+  { 175309, true },
+  { 175320, true },
+  { 175337, true },
+  { 175351, true },
+  { 175364, true },
+  { 175380, true },
+  { 175399, true },
+  { 175423, true },
   { 175436, true },
-  { 175451, false },
-  { 175470, true },
-  { 175492, true },
-  { 175515, true },
-  { 175534, true },
+  { 175453, true },
+  { 175464, true },
+  { 175479, true },
+  { 175501, true },
+  { 175520, true },
+  { 175537, false },
   { 175552, true },
-  { 175575, true },
-  { 175588, true },
-  { 175604, true },
-  { 175622, true },
-  { 175638, true },
-  { 175652, true },
-  { 175670, true },
-  { 175685, true },
-  { 175702, true },
-  { 175716, true },
-  { 175730, false },
-  { 175747, true },
-  { 175765, true },
-  { 175781, true },
-  { 175797, true },
-  { 175810, true },
+  { 175570, true },
+  { 175592, true },
+  { 175608, true },
+  { 175620, true },
+  { 175632, true },
+  { 175644, true },
+  { 175660, true },
+  { 175679, true },
+  { 175695, true },
+  { 175714, true },
+  { 175744, false },
+  { 175758, true },
+  { 175775, true },
+  { 175796, true },
+  { 175816, true },
   { 175830, true },
   { 175848, true },
-  { 175867, true },
-  { 175880, true },
+  { 175864, true },
+  { 175874, true },
+  { 175885, true },
+  { 175897, true },
   { 175916, true },
-  { 175939, true },
-  { 175954, true },
-  { 175970, true },
-  { 175981, true },
-  { 175999, true },
-  { 176029, true },
-  { 176045, true },
-  { 176060, true },
-  { 176075, true },
-  { 176086, true },
-  { 176100, true },
-  { 176122, true },
-  { 176137, true },
-  { 176150, true },
-  { 176173, true },
-  { 176182, true },
-  { 176204, true },
-  { 176223, true },
-  { 176247, true },
-  { 176273, true },
-  { 176284, true },
-  { 176301, true },
-  { 176315, true },
-  { 176328, true },
-  { 176344, true },
-  { 176363, true },
-  { 176387, true },
-  { 176400, true },
-  { 176417, true },
-  { 176428, true },
-  { 176443, true },
-  { 176465, true },
-  { 176484, true },
-  { 176501, false },
-  { 176516, true },
-  { 176534, true },
-  { 176556, true },
-  { 176572, true },
-  { 176584, true },
-  { 176596, true },
-  { 176608, true },
-  { 176624, true },
-  { 176643, true },
-  { 176659, true },
-  { 176678, true },
-  { 176708, false },
+  { 175932, true },
+  { 175952, true },
+  { 175966, true },
+  { 175979, true },
+  { 175995, true },
+  { 176006, true },
+  { 176027, true },
+  { 176055, true },
+  { 176071, true },
+  { 176084, true },
+  { 176109, true },
+  { 176126, true },
+  { 176144, false },
+  { 176159, true },
+  { 176184, true },
+  { 176193, true },
+  { 176203, true },
+  { 176215, true },
+  { 176234, true },
+  { 176251, true },
+  { 176268, true },
+  { 176284, false },
+  { 176302, true },
+  { 176319, true },
+  { 176332, true },
+  { 176352, true },
+  { 176376, true },
+  { 176394, true },
+  { 176415, true },
+  { 176430, true },
+  { 176445, true },
+  { 176457, true },
+  { 176482, true },
+  { 176495, true },
+  { 176517, true },
+  { 176527, true },
+  { 176544, true },
+  { 176557, true },
+  { 176571, true },
+  { 176604, true },
+  { 176619, true },
+  { 176633, true },
+  { 176642, true },
+  { 176656, true },
+  { 176666, true },
+  { 176677, false },
+  { 176691, true },
+  { 176700, true },
+  { 176711, true },
   { 176722, true },
-  { 176739, true },
-  { 176760, true },
-  { 176780, true },
-  { 176794, true },
-  { 176812, true },
-  { 176828, true },
-  { 176838, true },
-  { 176849, true },
-  { 176861, true },
-  { 176880, true },
-  { 176896, true },
-  { 176916, true },
-  { 176930, true },
-  { 176943, true },
-  { 176959, true },
-  { 176970, true },
-  { 176991, true },
-  { 177019, true },
-  { 177035, true },
-  { 177048, true },
-  { 177065, true },
-  { 177083, false },
+  { 176740, true },
+  { 176755, true },
+  { 176768, true },
+  { 176778, true },
+  { 176793, true },
+  { 176806, true },
+  { 176825, true },
+  { 176845, true },
+  { 176860, true },
+  { 176867, true },
+  { 176883, true },
+  { 176901, true },
+  { 176922, true },
+  { 176934, true },
+  { 176964, true },
+  { 176977, true },
+  { 176987, true },
+  { 176999, true },
+  { 177013, true },
+  { 177027, true },
+  { 177038, true },
+  { 177052, true },
+  { 177071, true },
+  { 177086, true },
   { 177098, true },
-  { 177123, true },
-  { 177132, true },
-  { 177142, true },
-  { 177154, true },
-  { 177173, true },
-  { 177190, true },
-  { 177207, true },
-  { 177223, false },
-  { 177241, false },
-  { 177261, true },
-  { 177278, true },
-  { 177291, true },
-  { 177311, true },
-  { 177335, true },
+  { 177109, true },
+  { 177124, true },
+  { 177136, true },
+  { 177152, true },
+  { 177167, true },
+  { 177183, true },
+  { 177192, true },
+  { 177206, true },
+  { 177217, false },
+  { 177232, true },
+  { 177246, true },
+  { 177262, true },
+  { 177275, true },
+  { 177295, true },
+  { 177308, false },
+  { 177328, true },
+  { 177342, true },
   { 177353, true },
-  { 177374, true },
-  { 177389, true },
-  { 177404, true },
-  { 177416, true },
-  { 177441, true },
-  { 177454, true },
-  { 177476, true },
-  { 177486, true },
-  { 177503, true },
-  { 177516, true },
-  { 177530, true },
-  { 177563, true },
-  { 177578, true },
-  { 177592, true },
-  { 177601, true },
-  { 177610, true },
-  { 177624, true },
+  { 177370, true },
+  { 177384, true },
+  { 177396, true },
+  { 177410, true },
+  { 177422, true },
+  { 177434, true },
+  { 177446, true },
+  { 177458, true },
+  { 177468, true },
+  { 177481, true },
+  { 177498, true },
+  { 177525, true },
+  { 177538, true },
+  { 177556, true },
+  { 177564, true },
+  { 177576, true },
+  { 177589, true },
+  { 177616, true },
   { 177634, true },
-  { 177645, false },
+  { 177641, true },
+  { 177649, true },
   { 177659, true },
   { 177668, true },
-  { 177679, true },
-  { 177690, true },
-  { 177708, true },
-  { 177723, true },
-  { 177733, true },
-  { 177748, true },
-  { 177761, true },
+  { 177677, true },
+  { 177685, true },
+  { 177698, true },
+  { 177707, true },
+  { 177719, true },
+  { 177726, true },
+  { 177742, true },
+  { 177759, true },
+  { 177766, true },
   { 177780, true },
+  { 177792, true },
   { 177800, true },
-  { 177815, true },
-  { 177822, true },
-  { 177838, true },
-  { 177856, true },
-  { 177877, true },
-  { 177889, true },
-  { 177919, true },
-  { 177932, true },
-  { 177942, true },
-  { 177954, true },
-  { 177968, true },
+  { 177807, true },
+  { 177816, true },
+  { 177825, true },
+  { 177839, true },
+  { 177855, true },
+  { 177871, true },
+  { 177890, true },
+  { 177908, true },
+  { 177923, true },
+  { 177941, true },
+  { 177951, true },
+  { 177963, true },
   { 177982, true },
-  { 177993, true },
-  { 178007, true },
-  { 178026, true },
-  { 178041, true },
-  { 178053, true },
-  { 178064, true },
-  { 178079, true },
-  { 178091, true },
-  { 178107, true },
-  { 178122, true },
-  { 178138, true },
-  { 178147, true },
-  { 178161, true },
-  { 178172, false },
-  { 178187, true },
-  { 178201, true },
-  { 178217, true },
-  { 178230, true },
-  { 178250, true },
-  { 178263, false },
-  { 178283, true },
-  { 178297, true },
-  { 178308, true },
-  { 178325, true },
-  { 178339, true },
-  { 178351, true },
-  { 178365, true },
-  { 178377, true },
+  { 177997, true },
+  { 178012, true },
+  { 178024, true },
+  { 178032, false },
+  { 178057, true },
+  { 178067, true },
+  { 178082, true },
+  { 178094, true },
+  { 178108, true },
+  { 178117, false },
+  { 178129, true },
+  { 178142, true },
+  { 178175, true },
+  { 178190, true },
+  { 178213, true },
+  { 178226, true },
+  { 178237, true },
+  { 178251, true },
+  { 178271, true },
+  { 178284, true },
+  { 178298, true },
+  { 178316, true },
+  { 178330, true },
+  { 178342, true },
+  { 178357, true },
+  { 178379, true },
   { 178389, true },
   { 178401, true },
-  { 178413, true },
-  { 178423, true },
-  { 178436, true },
-  { 178453, true },
+  { 178417, true },
+  { 178427, true },
+  { 178440, true },
+  { 178455, true },
+  { 178464, true },
+  { 178472, false },
   { 178480, true },
-  { 178493, true },
-  { 178511, true },
-  { 178519, true },
+  { 178491, true },
+  { 178507, true },
+  { 178518, true },
   { 178531, true },
-  { 178544, true },
-  { 178571, true },
-  { 178589, true },
-  { 178596, true },
-  { 178606, true },
-  { 178615, true },
+  { 178543, false },
+  { 178557, true },
+  { 178570, true },
+  { 178581, true },
+  { 178591, true },
+  { 178605, true },
   { 178624, true },
-  { 178632, true },
-  { 178645, true },
-  { 178654, true },
-  { 178666, true },
-  { 178673, true },
-  { 178689, true },
-  { 178706, true },
-  { 178713, true },
-  { 178727, true },
-  { 178744, true },
-  { 178756, true },
-  { 178764, true },
-  { 178771, true },
-  { 178780, true },
-  { 178789, true },
+  { 178635, true },
+  { 178649, true },
+  { 178660, true },
+  { 178671, true },
+  { 178682, true },
+  { 178693, true },
+  { 178704, true },
+  { 178718, true },
+  { 178730, true },
+  { 178745, true },
+  { 178759, true },
+  { 178774, true },
+  { 178787, true },
   { 178803, true },
-  { 178819, true },
+  { 178812, true },
+  { 178821, true },
   { 178835, true },
-  { 178854, true },
-  { 178872, true },
-  { 178887, true },
-  { 178905, true },
-  { 178915, true },
-  { 178927, true },
-  { 178946, true },
-  { 178961, true },
-  { 178976, true },
-  { 178988, true },
-  { 178996, false },
-  { 179021, true },
-  { 179031, true },
-  { 179046, true },
-  { 179058, true },
-  { 179072, true },
-  { 179081, false },
-  { 179093, true },
-  { 179106, true },
-  { 179139, true },
-  { 179154, true },
-  { 179177, true },
-  { 179190, true },
-  { 179201, true },
-  { 179215, true },
-  { 179235, true },
-  { 179248, true },
-  { 179262, true },
-  { 179280, true },
-  { 179294, true },
-  { 179306, true },
-  { 179321, true },
-  { 179343, true },
-  { 179353, true },
-  { 179365, true },
-  { 179381, true },
-  { 179391, true },
-  { 179404, true },
-  { 179419, true },
-  { 179428, true },
-  { 179436, false },
-  { 179444, true },
-  { 179455, true },
+  { 178846, true },
+  { 178857, false },
+  { 178873, true },
+  { 178884, true },
+  { 178895, true },
+  { 178911, false },
+  { 178925, true },
+  { 178934, true },
+  { 178947, true },
+  { 178957, true },
+  { 178971, true },
+  { 178981, true },
+  { 178994, true },
+  { 179008, true },
+  { 179022, true },
+  { 179043, true },
+  { 179057, true },
+  { 179069, true },
+  { 179084, true },
+  { 179103, true },
+  { 179113, true },
+  { 179132, true },
+  { 179141, false },
+  { 179156, true },
+  { 179172, false },
+  { 179184, true },
+  { 179210, true },
+  { 179221, true },
+  { 179242, true },
+  { 179257, true },
+  { 179275, true },
+  { 179292, true },
+  { 179307, true },
+  { 179327, true },
+  { 179338, true },
+  { 179350, true },
+  { 179361, true },
+  { 179374, true },
+  { 179392, true },
+  { 179412, true },
+  { 179431, true },
+  { 179450, true },
   { 179471, true },
-  { 179482, true },
-  { 179495, true },
-  { 179507, false },
-  { 179521, true },
-  { 179534, true },
-  { 179545, true },
+  { 179480, true },
+  { 179504, false },
+  { 179523, true },
+  { 179537, true },
   { 179555, true },
-  { 179569, true },
-  { 179588, true },
-  { 179599, true },
-  { 179613, true },
-  { 179624, true },
-  { 179635, true },
-  { 179646, true },
-  { 179657, true },
-  { 179668, true },
-  { 179682, true },
-  { 179694, true },
-  { 179709, true },
-  { 179723, true },
-  { 179738, true },
-  { 179751, true },
-  { 179767, true },
-  { 179776, true },
-  { 179785, true },
-  { 179799, true },
-  { 179810, true },
-  { 179821, false },
-  { 179837, true },
-  { 179848, true },
-  { 179859, true },
-  { 179875, false },
-  { 179889, true },
-  { 179898, true },
-  { 179911, true },
-  { 179921, true },
-  { 179935, true },
-  { 179945, true },
-  { 179958, true },
-  { 179972, true },
-  { 179986, true },
-  { 180007, true },
-  { 180021, true },
-  { 180033, true },
-  { 180048, true },
-  { 180067, true },
+  { 179572, true },
+  { 179592, true },
+  { 179606, true },
+  { 179619, true },
+  { 179640, true },
+  { 179652, true },
+  { 179663, true },
+  { 179678, true },
+  { 179699, true },
+  { 179718, true },
+  { 179747, true },
+  { 179754, true },
+  { 179766, true },
+  { 179781, true },
+  { 179797, true },
+  { 179814, true },
+  { 179836, true },
+  { 179846, true },
+  { 179858, true },
+  { 179870, true },
+  { 179887, false },
+  { 179900, false },
+  { 179920, true },
+  { 179930, true },
+  { 179942, true },
+  { 179959, true },
+  { 179975, true },
+  { 179990, true },
+  { 180003, true },
+  { 180018, true },
+  { 180031, true },
+  { 180047, true },
+  { 180065, true },
   { 180077, true },
-  { 180096, true },
-  { 180105, false },
-  { 180120, true },
-  { 180136, false },
-  { 180148, true },
-  { 180174, true },
-  { 180185, true },
-  { 180206, true },
+  { 180091, true },
+  { 180104, true },
+  { 180115, true },
+  { 180134, true },
+  { 180153, true },
+  { 180163, true },
+  { 180175, true },
+  { 180195, true },
+  { 180208, true },
   { 180221, true },
-  { 180239, true },
-  { 180256, true },
-  { 180271, true },
-  { 180291, true },
-  { 180302, true },
-  { 180314, true },
-  { 180325, true },
-  { 180338, true },
-  { 180356, true },
-  { 180376, true },
-  { 180395, true },
-  { 180414, true },
-  { 180435, true },
-  { 180444, true },
-  { 180468, false },
-  { 180487, true },
-  { 180501, true },
-  { 180519, true },
-  { 180536, true },
-  { 180556, true },
-  { 180570, true },
-  { 180583, true },
-  { 180604, true },
-  { 180616, true },
-  { 180627, true },
-  { 180642, true },
-  { 180663, true },
-  { 180682, true },
+  { 180234, true },
+  { 180247, true },
+  { 180260, true },
+  { 180272, true },
+  { 180287, true },
+  { 180297, true },
+  { 180310, true },
+  { 180328, true },
+  { 180346, true },
+  { 180365, true },
+  { 180378, true },
+  { 180396, true },
+  { 180418, true },
+  { 180431, true },
+  { 180448, true },
+  { 180468, true },
+  { 180484, true },
+  { 180512, true },
+  { 180537, true },
+  { 180569, true },
+  { 180588, true },
+  { 180603, true },
+  { 180623, true },
+  { 180636, true },
+  { 180652, true },
+  { 180669, true },
+  { 180686, true },
+  { 180698, true },
   { 180711, true },
-  { 180718, true },
-  { 180730, true },
-  { 180745, true },
-  { 180761, true },
+  { 180724, true },
+  { 180746, true },
+  { 180764, true },
   { 180778, true },
-  { 180800, true },
-  { 180810, true },
-  { 180822, true },
-  { 180834, true },
-  { 180851, false },
-  { 180864, false },
-  { 180884, true },
-  { 180894, true },
-  { 180906, true },
-  { 180923, true },
-  { 180939, true },
-  { 180954, true },
-  { 180967, true },
-  { 180982, true },
-  { 180995, true },
-  { 181011, true },
+  { 180799, true },
+  { 180811, true },
+  { 180826, true },
+  { 180843, true },
+  { 180855, true },
+  { 180870, true },
+  { 180881, true },
+  { 180895, true },
+  { 180914, true },
+  { 180931, true },
+  { 180941, true },
+  { 180953, true },
+  { 180973, true },
+  { 180987, true },
+  { 180997, true },
+  { 181010, true },
   { 181029, true },
-  { 181041, true },
-  { 181055, true },
-  { 181068, true },
-  { 181079, true },
-  { 181098, true },
-  { 181117, true },
-  { 181127, true },
-  { 181139, true },
+  { 181043, true },
+  { 181057, true },
+  { 181071, true },
+  { 181081, true },
+  { 181093, true },
+  { 181111, false },
+  { 181119, true },
+  { 181135, true },
+  { 181147, true },
   { 181159, true },
-  { 181172, true },
-  { 181185, true },
-  { 181198, true },
-  { 181211, true },
-  { 181224, true },
-  { 181236, true },
-  { 181251, true },
-  { 181261, true },
-  { 181274, true },
-  { 181292, true },
-  { 181310, true },
+  { 181170, true },
+  { 181182, true },
+  { 181191, true },
+  { 181201, true },
+  { 181215, true },
+  { 181229, true },
+  { 181243, true },
+  { 181254, true },
+  { 181262, true },
+  { 181278, true },
+  { 181296, true },
+  { 181316, true },
   { 181329, true },
-  { 181342, true },
-  { 181360, true },
-  { 181382, true },
-  { 181395, true },
-  { 181412, true },
-  { 181432, true },
-  { 181448, true },
-  { 181476, true },
-  { 181501, true },
-  { 181533, true },
-  { 181552, true },
-  { 181567, true },
-  { 181587, true },
-  { 181600, true },
-  { 181616, true },
-  { 181633, true },
-  { 181650, true },
-  { 181662, true },
-  { 181675, true },
+  { 181350, true },
+  { 181361, true },
+  { 181376, false },
+  { 181394, false },
+  { 181415, true },
+  { 181424, true },
+  { 181447, true },
+  { 181470, true },
+  { 181487, true },
+  { 181499, true },
+  { 181520, true },
+  { 181537, true },
+  { 181557, true },
+  { 181570, true },
+  { 181583, true },
+  { 181597, true },
+  { 181619, true },
+  { 181634, true },
+  { 181651, true },
+  { 181668, true },
   { 181688, true },
-  { 181710, true },
-  { 181728, true },
-  { 181742, true },
-  { 181763, true },
-  { 181775, true },
-  { 181790, true },
-  { 181807, true },
-  { 181819, true },
-  { 181834, true },
-  { 181845, true },
-  { 181859, true },
-  { 181878, true },
-  { 181895, true },
+  { 181713, true },
+  { 181738, true },
+  { 181764, true },
+  { 181780, true },
+  { 181791, true },
+  { 181806, true },
+  { 181815, true },
+  { 181826, true },
+  { 181840, true },
+  { 181849, true },
+  { 181871, true },
+  { 181883, true },
+  { 181891, true },
   { 181905, true },
-  { 181917, true },
-  { 181937, true },
-  { 181951, true },
-  { 181961, true },
-  { 181974, true },
-  { 181993, true },
-  { 182007, true },
-  { 182021, true },
-  { 182035, true },
-  { 182045, true },
-  { 182057, true },
-  { 182075, false },
-  { 182083, true },
-  { 182099, true },
-  { 182111, true },
-  { 182123, true },
-  { 182134, true },
-  { 182146, true },
-  { 182155, true },
-  { 182165, true },
-  { 182179, true },
-  { 182193, true },
+  { 181913, true },
+  { 181923, true },
+  { 181930, true },
+  { 181940, true },
+  { 181947, true },
+  { 181964, true },
+  { 181976, true },
+  { 181986, true },
+  { 181999, true },
+  { 182009, true },
+  { 182020, true },
+  { 182031, true },
+  { 182039, true },
+  { 182051, true },
+  { 182062, true },
+  { 182076, true },
+  { 182089, true },
+  { 182115, false },
+  { 182129, true },
+  { 182145, true },
+  { 182161, true },
+  { 182174, true },
+  { 182186, true },
   { 182207, true },
-  { 182218, true },
-  { 182226, true },
-  { 182242, true },
-  { 182260, true },
-  { 182280, true },
-  { 182293, true },
-  { 182314, true },
-  { 182325, true },
-  { 182340, false },
-  { 182358, false },
+  { 182219, true },
+  { 182229, true },
+  { 182251, true },
+  { 182268, true },
+  { 182279, false },
+  { 182290, true },
+  { 182300, true },
+  { 182312, true },
+  { 182321, true },
+  { 182335, true },
+  { 182346, false },
+  { 182359, false },
   { 182379, true },
-  { 182388, true },
-  { 182411, true },
-  { 182434, true },
-  { 182451, true },
-  { 182463, true },
-  { 182484, true },
-  { 182501, true },
-  { 182521, true },
-  { 182534, true },
-  { 182547, true },
+  { 182389, true },
+  { 182397, false },
+  { 182406, true },
+  { 182419, true },
+  { 182465, true },
+  { 182512, true },
+  { 182525, true },
+  { 182538, true },
   { 182561, true },
-  { 182583, true },
-  { 182598, true },
-  { 182615, true },
-  { 182632, true },
-  { 182652, true },
-  { 182677, true },
-  { 182702, true },
-  { 182728, true },
-  { 182744, true },
-  { 182755, true },
-  { 182770, true },
-  { 182779, true },
-  { 182790, true },
-  { 182804, true },
-  { 182813, true },
-  { 182835, true },
-  { 182847, true },
-  { 182855, true },
-  { 182869, true },
-  { 182877, true },
-  { 182887, true },
-  { 182894, true },
-  { 182904, true },
-  { 182911, true },
-  { 182928, true },
-  { 182940, true },
-  { 182951, true },
-  { 182961, true },
-  { 182974, true },
-  { 182984, true },
+  { 182577, true },
+  { 182590, true },
+  { 182606, true },
+  { 182616, false },
+  { 182628, true },
+  { 182645, true },
+  { 182663, true },
+  { 182679, true },
+  { 182690, true },
+  { 182698, true },
+  { 182708, true },
+  { 182715, true },
+  { 182724, true },
+  { 182731, true },
+  { 182740, true },
+  { 182758, true },
+  { 182774, true },
+  { 182793, true },
+  { 182806, true },
+  { 182820, true },
+  { 182832, true },
+  { 182846, true },
+  { 182861, true },
+  { 182873, true },
+  { 182886, true },
+  { 182897, true },
+  { 182907, true },
+  { 182916, true },
+  { 182925, true },
+  { 182932, true },
+  { 182939, true },
+  { 182947, true },
+  { 182971, true },
+  { 182985, true },
   { 182995, true },
-  { 183006, true },
-  { 183014, true },
-  { 183026, true },
-  { 183037, true },
-  { 183051, true },
-  { 183064, true },
-  { 183090, false },
-  { 183104, true },
-  { 183120, true },
-  { 183136, true },
-  { 183149, true },
-  { 183161, true },
-  { 183173, true },
-  { 183194, true },
-  { 183206, true },
-  { 183216, true },
-  { 183238, true },
-  { 183255, true },
-  { 183266, false },
-  { 183277, true },
+  { 183012, false },
+  { 183027, true },
+  { 183041, true },
+  { 183053, true },
+  { 183067, true },
+  { 183084, true },
+  { 183095, true },
+  { 183107, true },
+  { 183119, true },
+  { 183129, true },
+  { 183139, true },
+  { 183150, true },
+  { 183160, true },
+  { 183179, true },
+  { 183191, true },
+  { 183207, true },
+  { 183222, true },
+  { 183245, true },
+  { 183252, true },
+  { 183263, true },
+  { 183273, true },
+  { 183280, true },
   { 183287, true },
   { 183299, true },
-  { 183308, true },
-  { 183322, true },
-  { 183333, false },
-  { 183346, false },
-  { 183366, true },
-  { 183376, true },
-  { 183384, false },
-  { 183393, true },
-  { 183406, true },
-  { 183452, true },
-  { 183499, true },
-  { 183512, true },
-  { 183525, true },
+  { 183310, true },
+  { 183320, false },
+  { 183340, true },
+  { 183363, true },
+  { 183387, true },
+  { 183397, false },
+  { 183404, true },
+  { 183417, true },
+  { 183431, true },
+  { 183445, true },
+  { 183458, true },
+  { 183469, true },
+  { 183480, true },
+  { 183490, true },
+  { 183506, true },
+  { 183527, true },
+  { 183537, true },
   { 183548, true },
-  { 183564, true },
+  { 183563, true },
   { 183577, true },
-  { 183593, true },
-  { 183603, false },
-  { 183615, true },
-  { 183632, true },
-  { 183650, true },
-  { 183666, true },
-  { 183677, true },
-  { 183685, true },
-  { 183695, true },
-  { 183702, true },
-  { 183711, true },
-  { 183718, true },
-  { 183736, true },
-  { 183755, true },
-  { 183768, true },
-  { 183782, true },
-  { 183794, true },
-  { 183808, true },
-  { 183823, true },
-  { 183835, true },
-  { 183848, true },
-  { 183859, true },
-  { 183869, true },
-  { 183878, true },
-  { 183887, true },
+  { 183588, true },
+  { 183602, true },
+  { 183622, true },
+  { 183636, true },
+  { 183645, true },
+  { 183656, true },
+  { 183671, true },
+  { 183684, true },
+  { 183699, true },
+  { 183715, true },
+  { 183730, true },
+  { 183744, true },
+  { 183760, true },
+  { 183774, true },
+  { 183788, true },
+  { 183806, true },
+  { 183824, true },
+  { 183844, true },
+  { 183863, true },
+  { 183879, true },
   { 183894, true },
-  { 183901, true },
-  { 183909, true },
-  { 183933, true },
-  { 183947, true },
-  { 183957, true },
-  { 183974, false },
-  { 183989, true },
-  { 184003, true },
+  { 183908, true },
+  { 183928, true },
+  { 183944, true },
+  { 183959, true },
+  { 183973, true },
+  { 184004, true },
   { 184015, true },
-  { 184029, true },
-  { 184046, true },
-  { 184057, true },
-  { 184069, true },
-  { 184081, true },
-  { 184091, true },
-  { 184101, true },
-  { 184112, true },
-  { 184122, true },
-  { 184141, true },
-  { 184153, true },
-  { 184169, true },
-  { 184184, true },
-  { 184207, true },
-  { 184214, true },
-  { 184225, true },
-  { 184235, true },
-  { 184242, true },
-  { 184249, true },
-  { 184261, true },
-  { 184272, true },
-  { 184282, false },
-  { 184302, true },
-  { 184325, true },
-  { 184349, true },
-  { 184359, false },
-  { 184366, true },
-  { 184379, true },
-  { 184393, true },
-  { 184407, true },
-  { 184420, true },
-  { 184431, true },
-  { 184442, true },
-  { 184452, true },
-  { 184468, true },
-  { 184489, true },
-  { 184499, true },
-  { 184510, true },
-  { 184525, true },
-  { 184539, true },
-  { 184550, true },
-  { 184564, true },
-  { 184584, true },
-  { 184598, true },
-  { 184607, true },
-  { 184618, true },
-  { 184633, true },
-  { 184646, true },
+  { 184025, false },
+  { 184049, true },
+  { 184063, true },
+  { 184075, true },
+  { 184089, true },
+  { 184099, true },
+  { 184116, true },
+  { 184129, true },
+  { 184142, true },
+  { 184159, true },
+  { 184176, false },
+  { 184193, true },
+  { 184206, true },
+  { 184223, true },
+  { 184244, true },
+  { 184257, true },
+  { 184270, true },
+  { 184290, true },
+  { 184308, true },
+  { 184318, true },
+  { 184331, true },
+  { 184350, true },
+  { 184364, true },
+  { 184378, false },
+  { 184389, true },
+  { 184406, true },
+  { 184429, true },
+  { 184457, true },
+  { 184473, true },
+  { 184485, true },
+  { 184499, false },
+  { 184512, true },
+  { 184524, true },
+  { 184540, true },
+  { 184553, true },
+  { 184569, true },
+  { 184579, true },
+  { 184594, true },
+  { 184602, true },
+  { 184617, true },
+  { 184634, true },
+  { 184641, true },
+  { 184651, true },
   { 184661, true },
-  { 184677, true },
-  { 184692, true },
-  { 184706, true },
-  { 184722, true },
-  { 184736, true },
+  { 184682, true },
+  { 184698, true },
+  { 184717, true },
+  { 184730, true },
   { 184750, true },
-  { 184768, true },
-  { 184786, true },
-  { 184806, true },
-  { 184825, true },
-  { 184841, true },
-  { 184856, true },
-  { 184870, true },
-  { 184890, true },
-  { 184906, true },
-  { 184921, true },
-  { 184935, true },
-  { 184966, true },
-  { 184977, true },
-  { 184987, false },
+  { 184765, true },
+  { 184773, true },
+  { 184792, true },
+  { 184808, false },
+  { 184816, true },
+  { 184831, true },
+  { 184839, true },
+  { 184850, true },
+  { 184863, true },
+  { 184874, true },
+  { 184889, false },
+  { 184909, true },
+  { 184924, true },
+  { 184939, true },
+  { 184949, true },
+  { 184961, true },
+  { 184985, true },
+  { 184998, true },
   { 185011, true },
-  { 185025, true },
-  { 185037, true },
-  { 185051, true },
-  { 185061, true },
-  { 185078, true },
-  { 185091, true },
-  { 185104, true },
-  { 185121, true },
-  { 185138, false },
-  { 185155, true },
-  { 185168, true },
-  { 185185, true },
-  { 185206, true },
-  { 185219, true },
-  { 185232, true },
-  { 185252, true },
-  { 185270, true },
-  { 185280, true },
-  { 185293, true },
-  { 185312, true },
-  { 185326, true },
-  { 185340, false },
-  { 185351, true },
-  { 185368, true },
-  { 185381, true },
-  { 185404, true },
-  { 185432, true },
-  { 185448, true },
-  { 185460, true },
-  { 185474, false },
-  { 185487, true },
-  { 185499, true },
-  { 185515, true },
-  { 185528, true },
-  { 185544, true },
-  { 185554, true },
-  { 185569, true },
-  { 185577, true },
-  { 185592, true },
-  { 185609, true },
+  { 185023, true },
+  { 185036, true },
+  { 185050, true },
+  { 185066, true },
+  { 185085, true },
+  { 185105, true },
+  { 185116, true },
+  { 185126, true },
+  { 185137, true },
+  { 185145, true },
+  { 185158, true },
+  { 185172, true },
+  { 185182, true },
+  { 185200, true },
+  { 185227, true },
+  { 185236, true },
+  { 185249, false },
+  { 185272, true },
+  { 185294, true },
+  { 185309, true },
+  { 185316, true },
+  { 185323, true },
+  { 185334, true },
+  { 185350, true },
+  { 185363, true },
+  { 185375, true },
+  { 185385, true },
+  { 185402, true },
+  { 185417, true },
+  { 185426, true },
+  { 185437, true },
+  { 185455, true },
+  { 185469, true },
+  { 185481, true },
+  { 185490, true },
+  { 185500, true },
+  { 185512, true },
+  { 185524, true },
+  { 185537, true },
+  { 185553, true },
+  { 185572, true },
+  { 185591, true },
+  { 185606, true },
   { 185616, true },
-  { 185626, true },
-  { 185636, true },
-  { 185657, true },
-  { 185673, true },
-  { 185692, true },
-  { 185705, true },
-  { 185725, true },
-  { 185740, true },
-  { 185748, true },
-  { 185767, true },
-  { 185783, false },
-  { 185791, true },
-  { 185799, true },
-  { 185810, true },
-  { 185823, true },
-  { 185834, true },
-  { 185849, false },
-  { 185869, true },
-  { 185884, true },
-  { 185899, true },
-  { 185909, true },
-  { 185921, true },
-  { 185945, true },
-  { 185958, true },
-  { 185971, true },
-  { 185983, true },
-  { 185996, true },
-  { 186010, true },
-  { 186026, true },
-  { 186045, true },
-  { 186065, true },
-  { 186076, true },
-  { 186086, true },
-  { 186097, true },
-  { 186105, true },
-  { 186118, true },
-  { 186132, true },
-  { 186142, true },
-  { 186160, true },
-  { 186187, true },
-  { 186196, true },
-  { 186209, false },
-  { 186232, true },
+  { 185634, true },
+  { 185646, true },
+  { 185665, false },
+  { 185680, true },
+  { 185694, true },
+  { 185709, true },
+  { 185720, false },
+  { 185730, true },
+  { 185736, true },
+  { 185745, true },
+  { 185753, true },
+  { 185772, true },
+  { 185781, true },
+  { 185795, true },
+  { 185813, true },
+  { 185825, true },
+  { 185835, true },
+  { 185859, true },
+  { 185882, true },
+  { 185895, true },
+  { 185911, true },
+  { 185923, true },
+  { 185937, false },
+  { 185950, true },
+  { 185969, true },
+  { 185979, true },
+  { 186001, true },
+  { 186014, true },
+  { 186023, true },
+  { 186034, true },
+  { 186047, true },
+  { 186060, true },
+  { 186071, true },
+  { 186085, true },
+  { 186100, true },
+  { 186115, true },
+  { 186138, false },
+  { 186151, true },
+  { 186166, true },
+  { 186178, true },
+  { 186188, true },
+  { 186202, true },
+  { 186215, true },
+  { 186228, false },
+  { 186242, true },
   { 186254, true },
-  { 186265, true },
-  { 186280, true },
-  { 186287, true },
-  { 186294, true },
-  { 186305, true },
-  { 186321, true },
-  { 186334, true },
-  { 186346, true },
-  { 186356, true },
-  { 186373, true },
+  { 186266, true },
+  { 186282, true },
+  { 186308, true },
+  { 186326, false },
+  { 186339, true },
+  { 186357, true },
+  { 186367, true },
+  { 186377, true },
   { 186388, true },
-  { 186397, true },
-  { 186408, true },
-  { 186426, true },
-  { 186440, true },
-  { 186452, true },
-  { 186461, true },
-  { 186471, true },
-  { 186483, true },
-  { 186495, true },
-  { 186508, true },
-  { 186524, true },
-  { 186543, true },
-  { 186562, true },
-  { 186577, true },
-  { 186587, true },
-  { 186605, true },
-  { 186617, true },
-  { 186636, false },
-  { 186651, true },
-  { 186665, true },
-  { 186680, true },
-  { 186691, false },
-  { 186701, true },
-  { 186707, true },
-  { 186716, true },
+  { 186403, true },
+  { 186419, true },
+  { 186427, true },
+  { 186437, true },
+  { 186447, true },
+  { 186457, true },
+  { 186467, true },
+  { 186478, true },
+  { 186498, true },
+  { 186506, false },
+  { 186527, true },
+  { 186540, true },
+  { 186549, true },
+  { 186563, true },
+  { 186573, true },
+  { 186586, true },
+  { 186595, true },
+  { 186611, true },
+  { 186622, false },
+  { 186642, true },
+  { 186652, true },
+  { 186662, true },
+  { 186677, true },
+  { 186691, true },
+  { 186708, true },
   { 186724, true },
-  { 186743, true },
-  { 186752, true },
-  { 186766, true },
-  { 186784, true },
-  { 186796, true },
-  { 186806, true },
-  { 186830, true },
-  { 186853, true },
-  { 186866, true },
-  { 186882, true },
-  { 186894, true },
-  { 186908, false },
-  { 186921, true },
-  { 186940, true },
-  { 186950, true },
-  { 186972, true },
-  { 186985, true },
-  { 186994, true },
-  { 187005, true },
-  { 187018, true },
-  { 187031, true },
-  { 187042, true },
-  { 187056, true },
-  { 187071, true },
-  { 187086, true },
-  { 187109, false },
-  { 187122, true },
-  { 187137, true },
-  { 187149, true },
-  { 187159, true },
+  { 186735, true },
+  { 186765, true },
+  { 186791, true },
+  { 186799, true },
+  { 186818, true },
+  { 186832, true },
+  { 186841, true },
+  { 186860, true },
+  { 186870, true },
+  { 186885, true },
+  { 186901, true },
+  { 186918, true },
+  { 186929, true },
+  { 186946, true },
+  { 186962, true },
+  { 186982, true },
+  { 187004, true },
+  { 187017, true },
+  { 187027, true },
+  { 187049, true },
+  { 187070, true },
+  { 187091, true },
+  { 187104, true },
+  { 187128, true },
+  { 187139, true },
+  { 187151, true },
+  { 187163, true },
   { 187173, true },
-  { 187186, true },
-  { 187199, false },
-  { 187213, true },
-  { 187225, true },
-  { 187237, true },
-  { 187253, true },
-  { 187279, true },
-  { 187297, false },
-  { 187310, true },
+  { 187191, false },
+  { 187208, true },
+  { 187240, true },
+  { 187251, true },
+  { 187261, true },
+  { 187274, true },
+  { 187283, true },
+  { 187296, true },
+  { 187307, true },
+  { 187318, true },
   { 187328, true },
-  { 187338, true },
-  { 187348, true },
-  { 187359, true },
-  { 187374, true },
-  { 187390, true },
-  { 187398, true },
-  { 187408, true },
-  { 187418, true },
-  { 187428, true },
-  { 187438, true },
-  { 187449, true },
-  { 187469, true },
-  { 187477, false },
-  { 187498, true },
-  { 187511, true },
-  { 187520, true },
-  { 187534, true },
-  { 187544, true },
-  { 187557, true },
-  { 187566, true },
-  { 187582, true },
-  { 187593, false },
-  { 187613, true },
-  { 187623, true },
+  { 187335, true },
+  { 187347, true },
+  { 187360, false },
+  { 187372, true },
+  { 187392, true },
+  { 187402, true },
+  { 187423, true },
+  { 187440, true },
+  { 187457, true },
+  { 187475, true },
+  { 187493, false },
+  { 187511, false },
+  { 187529, false },
+  { 187546, true },
+  { 187568, true },
+  { 187581, true },
+  { 187594, false },
+  { 187609, false },
+  { 187619, false },
   { 187633, true },
   { 187648, true },
-  { 187662, true },
-  { 187679, true },
-  { 187695, true },
-  { 187706, true },
-  { 187736, true },
-  { 187762, true },
-  { 187770, true },
-  { 187789, true },
-  { 187803, true },
-  { 187812, true },
-  { 187831, true },
-  { 187841, true },
+  { 187660, true },
+  { 187678, true },
+  { 187693, true },
+  { 187711, true },
+  { 187727, true },
+  { 187737, true },
+  { 187747, true },
+  { 187775, true },
+  { 187790, true },
+  { 187801, true },
+  { 187811, false },
+  { 187829, true },
+  { 187844, true },
   { 187856, true },
-  { 187872, true },
-  { 187889, true },
-  { 187900, true },
-  { 187917, true },
-  { 187933, true },
-  { 187953, true },
-  { 187975, true },
-  { 187988, true },
-  { 187998, true },
-  { 188020, true },
-  { 188041, true },
-  { 188062, true },
-  { 188075, true },
-  { 188099, true },
-  { 188110, true },
-  { 188122, true },
-  { 188134, true },
-  { 188144, true },
-  { 188162, true },
-  { 188174, false },
-  { 188191, true },
+  { 187869, true },
+  { 187887, true },
+  { 187904, true },
+  { 187914, true },
+  { 187925, false },
+  { 187940, true },
+  { 187958, true },
+  { 187973, true },
+  { 187991, true },
+  { 188003, true },
+  { 188026, true },
+  { 188040, true },
+  { 188056, true },
+  { 188070, true },
+  { 188088, true },
+  { 188112, true },
+  { 188145, false },
+  { 188168, true },
+  { 188188, true },
+  { 188205, true },
   { 188223, true },
-  { 188234, true },
-  { 188244, true },
-  { 188257, true },
-  { 188266, true },
-  { 188279, true },
-  { 188290, true },
-  { 188301, true },
-  { 188311, true },
-  { 188318, true },
-  { 188330, true },
-  { 188343, false },
-  { 188355, true },
-  { 188375, true },
-  { 188385, true },
-  { 188406, true },
-  { 188423, true },
-  { 188440, true },
-  { 188458, true },
-  { 188476, false },
-  { 188494, false },
-  { 188512, false },
-  { 188529, true },
-  { 188551, true },
-  { 188564, true },
-  { 188577, false },
-  { 188592, false },
-  { 188602, false },
-  { 188616, true },
-  { 188631, true },
+  { 188233, true },
+  { 188246, true },
+  { 188259, true },
+  { 188276, true },
+  { 188287, true },
+  { 188309, true },
+  { 188327, true },
+  { 188341, true },
+  { 188359, true },
+  { 188379, true },
+  { 188393, true },
+  { 188402, true },
+  { 188415, true },
+  { 188433, true },
+  { 188445, true },
+  { 188460, true },
+  { 188473, true },
+  { 188485, true },
+  { 188497, true },
+  { 188508, true },
+  { 188519, true },
+  { 188528, true },
+  { 188541, true },
+  { 188555, true },
+  { 188566, true },
+  { 188577, true },
+  { 188590, true },
+  { 188604, false },
+  { 188617, true },
+  { 188626, true },
   { 188643, true },
-  { 188661, true },
-  { 188676, true },
-  { 188694, true },
-  { 188710, true },
-  { 188720, true },
-  { 188730, true },
-  { 188758, true },
-  { 188773, true },
-  { 188784, true },
-  { 188794, false },
-  { 188812, true },
-  { 188827, true },
-  { 188839, true },
-  { 188852, true },
-  { 188870, true },
-  { 188887, true },
-  { 188897, true },
-  { 188908, false },
-  { 188923, true },
-  { 188941, true },
-  { 188956, true },
-  { 188974, true },
-  { 188986, true },
-  { 189009, true },
-  { 189023, true },
-  { 189039, true },
-  { 189053, true },
-  { 189071, true },
-  { 189095, true },
-  { 189128, false },
-  { 189151, true },
-  { 189171, true },
-  { 189188, true },
-  { 189206, true },
-  { 189216, true },
-  { 189229, true },
-  { 189242, true },
-  { 189259, true },
-  { 189270, true },
-  { 189292, true },
-  { 189310, false },
-  { 189324, true },
-  { 189338, true },
-  { 189356, true },
-  { 189376, true },
-  { 189390, true },
-  { 189399, true },
-  { 189412, true },
-  { 189430, true },
-  { 189442, true },
-  { 189457, true },
-  { 189470, true },
-  { 189482, true },
-  { 189494, true },
-  { 189505, true },
-  { 189516, true },
-  { 189525, true },
-  { 189538, true },
-  { 189552, true },
-  { 189563, true },
-  { 189574, true },
-  { 189587, true },
-  { 189601, false },
-  { 189614, true },
-  { 189623, true },
-  { 189640, true },
-  { 189650, true },
-  { 189663, true },
-  { 189672, true },
-  { 189682, true },
-  { 189693, true },
-  { 189703, true },
-  { 189711, true },
-  { 189719, false },
-  { 189733, false },
-  { 189753, true },
-  { 189763, true },
-  { 189777, true },
-  { 189787, true },
-  { 189798, true },
-  { 189810, true },
-  { 189821, true },
-  { 189833, true },
-  { 189843, true },
-  { 189852, true },
-  { 189864, true },
+  { 188653, true },
+  { 188666, true },
+  { 188675, true },
+  { 188685, true },
+  { 188696, true },
+  { 188706, true },
+  { 188714, true },
+  { 188722, false },
+  { 188736, false },
+  { 188756, true },
+  { 188766, true },
+  { 188780, true },
+  { 188790, true },
+  { 188801, true },
+  { 188813, true },
+  { 188824, true },
+  { 188836, true },
+  { 188846, true },
+  { 188855, true },
+  { 188867, true },
+  { 188879, true },
+  { 188890, true },
+  { 188902, true },
+  { 188918, true },
+  { 188933, true },
+  { 188945, true },
+  { 188955, true },
+  { 188970, true },
+  { 188985, true },
+  { 188997, true },
+  { 189004, true },
+  { 189015, true },
+  { 189025, true },
+  { 189040, true },
+  { 189051, true },
+  { 189065, true },
+  { 189079, true },
+  { 189090, true },
+  { 189103, true },
+  { 189114, false },
+  { 189129, true },
+  { 189138, true },
+  { 189148, true },
+  { 189155, true },
+  { 189166, true },
+  { 189178, true },
+  { 189200, true },
+  { 189214, true },
+  { 189237, true },
+  { 189272, true },
+  { 189315, false },
+  { 189326, true },
+  { 189339, true },
+  { 189349, true },
+  { 189359, true },
+  { 189386, true },
+  { 189395, true },
+  { 189404, true },
+  { 189421, true },
+  { 189433, true },
+  { 189446, true },
+  { 189473, true },
+  { 189480, true },
+  { 189497, true },
+  { 189513, true },
+  { 189524, true },
+  { 189537, true },
+  { 189561, true },
+  { 189568, true },
+  { 189578, true },
+  { 189585, true },
+  { 189605, true },
+  { 189617, true },
+  { 189638, true },
+  { 189649, true },
+  { 189661, true },
+  { 189671, true },
+  { 189680, true },
+  { 189688, true },
+  { 189697, true },
+  { 189706, true },
+  { 189725, true },
+  { 189745, true },
+  { 189759, true },
+  { 189780, true },
+  { 189793, true },
+  { 189805, true },
+  { 189829, true },
+  { 189847, false },
+  { 189861, true },
   { 189876, true },
-  { 189887, true },
-  { 189899, true },
-  { 189915, true },
-  { 189930, true },
-  { 189942, true },
-  { 189952, true },
-  { 189967, true },
+  { 189891, true },
+  { 189900, false },
+  { 189917, false },
+  { 189927, true },
+  { 189937, true },
+  { 189951, true },
+  { 189966, true },
   { 189982, true },
-  { 189994, true },
-  { 190001, true },
-  { 190012, true },
-  { 190022, true },
-  { 190037, true },
-  { 190048, true },
-  { 190062, true },
-  { 190076, true },
-  { 190087, true },
-  { 190100, true },
-  { 190111, false },
-  { 190126, true },
-  { 190135, true },
-  { 190145, true },
-  { 190152, true },
-  { 190163, true },
-  { 190175, true },
-  { 190197, true },
-  { 190211, true },
-  { 190234, true },
-  { 190269, true },
-  { 190312, false },
-  { 190323, true },
-  { 190336, true },
-  { 190346, true },
-  { 190356, true },
-  { 190383, true },
-  { 190392, true },
-  { 190401, true },
-  { 190418, true },
-  { 190430, true },
-  { 190443, true },
-  { 190470, true },
-  { 190477, true },
-  { 190494, true },
-  { 190510, true },
-  { 190521, true },
-  { 190534, true },
-  { 190558, true },
+  { 189998, true },
+  { 190021, true },
+  { 190031, true },
+  { 190042, true },
+  { 190052, true },
+  { 190068, true },
+  { 190079, true },
+  { 190090, true },
+  { 190102, true },
+  { 190113, true },
+  { 190127, true },
+  { 190141, true },
+  { 190158, true },
+  { 190174, true },
+  { 190186, false },
+  { 190205, true },
+  { 190215, true },
+  { 190233, true },
+  { 190256, true },
+  { 190267, true },
+  { 190287, true },
+  { 190304, true },
+  { 190320, true },
+  { 190339, true },
+  { 190354, true },
+  { 190370, true },
+  { 190387, true },
+  { 190407, true },
+  { 190419, true },
+  { 190438, true },
+  { 190447, true },
+  { 190464, true },
+  { 190476, true },
+  { 190488, true },
+  { 190500, true },
+  { 190509, true },
+  { 190519, true },
+  { 190536, true },
+  { 190554, true },
   { 190565, true },
   { 190575, true },
-  { 190582, true },
-  { 190602, true },
-  { 190614, true },
-  { 190635, true },
-  { 190646, true },
-  { 190658, true },
+  { 190590, true },
+  { 190600, true },
+  { 190610, false },
+  { 190617, true },
+  { 190627, true },
+  { 190648, true },
   { 190668, true },
-  { 190677, true },
-  { 190685, true },
-  { 190694, true },
-  { 190703, true },
-  { 190722, true },
-  { 190742, true },
-  { 190756, true },
-  { 190777, true },
-  { 190790, true },
-  { 190802, true },
-  { 190826, true },
-  { 190844, false },
-  { 190858, true },
-  { 190873, true },
-  { 190888, true },
-  { 190897, false },
-  { 190914, false },
-  { 190924, true },
-  { 190934, true },
-  { 190948, true },
-  { 190963, true },
-  { 190979, true },
-  { 190995, true },
-  { 191018, true },
+  { 190691, true },
+  { 190711, true },
+  { 190726, true },
+  { 190744, true },
+  { 190755, false },
+  { 190779, true },
+  { 190798, true },
+  { 190811, true },
+  { 190827, false },
+  { 190843, true },
+  { 190857, true },
+  { 190864, true },
+  { 190876, false },
+  { 190890, true },
+  { 190908, false },
+  { 190921, true },
+  { 190935, false },
+  { 190951, true },
+  { 190969, true },
+  { 190992, true },
+  { 191005, true },
+  { 191017, true },
   { 191028, true },
   { 191039, true },
-  { 191049, true },
-  { 191065, true },
-  { 191076, true },
-  { 191087, true },
-  { 191101, true },
-  { 191115, true },
-  { 191132, true },
-  { 191148, true },
-  { 191160, false },
-  { 191179, true },
-  { 191189, true },
-  { 191207, true },
-  { 191230, true },
-  { 191241, true },
-  { 191261, true },
-  { 191278, true },
-  { 191294, true },
-  { 191313, true },
-  { 191328, true },
-  { 191344, true },
-  { 191361, true },
-  { 191381, true },
-  { 191393, true },
-  { 191408, true },
-  { 191427, true },
-  { 191436, true },
-  { 191453, true },
-  { 191465, true },
-  { 191477, true },
-  { 191489, true },
-  { 191498, true },
-  { 191508, true },
-  { 191525, true },
-  { 191543, true },
-  { 191554, true },
-  { 191564, true },
-  { 191579, true },
+  { 191054, true },
+  { 191079, true },
+  { 191112, true },
+  { 191138, true },
+  { 191172, true },
+  { 191195, true },
+  { 191208, true },
+  { 191224, true },
+  { 191236, true },
+  { 191248, true },
+  { 191264, false },
+  { 191284, true },
+  { 191297, false },
+  { 191315, false },
+  { 191338, true },
+  { 191358, true },
+  { 191374, true },
+  { 191388, true },
+  { 191409, true },
+  { 191424, false },
+  { 191437, true },
+  { 191451, true },
+  { 191463, true },
+  { 191475, true },
+  { 191491, false },
+  { 191513, true },
+  { 191533, true },
+  { 191545, true },
+  { 191561, false },
+  { 191573, true },
   { 191589, true },
-  { 191599, false },
-  { 191606, true },
-  { 191616, true },
-  { 191637, true },
-  { 191657, true },
-  { 191680, true },
-  { 191700, true },
+  { 191607, true },
+  { 191619, true },
+  { 191633, true },
+  { 191653, true },
+  { 191667, true },
+  { 191684, true },
+  { 191701, true },
   { 191715, true },
-  { 191733, true },
-  { 191744, false },
-  { 191768, true },
-  { 191787, true },
-  { 191800, true },
-  { 191816, false },
-  { 191832, true },
-  { 191846, true },
-  { 191853, true },
-  { 191865, false },
-  { 191879, true },
-  { 191897, false },
-  { 191910, true },
-  { 191924, false },
-  { 191940, true },
-  { 191958, true },
+  { 191725, false },
+  { 191739, true },
+  { 191749, true },
+  { 191770, true },
+  { 191783, true },
+  { 191796, true },
+  { 191807, true },
+  { 191820, true },
+  { 191841, true },
+  { 191861, true },
+  { 191878, true },
+  { 191890, true },
+  { 191904, true },
+  { 191914, true },
+  { 191931, true },
+  { 191941, true },
+  { 191949, true },
+  { 191965, true },
   { 191981, true },
-  { 191994, true },
-  { 192006, true },
-  { 192017, true },
-  { 192028, true },
-  { 192043, true },
-  { 192068, true },
-  { 192101, true },
-  { 192127, true },
-  { 192161, true },
-  { 192184, true },
-  { 192197, true },
-  { 192213, true },
-  { 192225, true },
-  { 192237, true },
-  { 192253, false },
+  { 191997, true },
+  { 192018, true },
+  { 192029, true },
+  { 192041, true },
+  { 192054, true },
+  { 192079, true },
+  { 192094, true },
+  { 192114, true },
+  { 192128, true },
+  { 192142, true },
+  { 192157, true },
+  { 192179, true },
+  { 192199, true },
+  { 192214, true },
+  { 192224, true },
+  { 192242, true },
+  { 192257, true },
   { 192273, true },
-  { 192286, false },
-  { 192304, false },
-  { 192327, true },
-  { 192347, true },
-  { 192363, true },
-  { 192377, true },
-  { 192398, true },
-  { 192413, false },
-  { 192426, true },
-  { 192440, true },
-  { 192452, true },
-  { 192464, true },
-  { 192480, false },
-  { 192502, true },
-  { 192522, true },
-  { 192534, true },
-  { 192550, false },
-  { 192562, true },
-  { 192575, true },
-  { 192591, true },
-  { 192609, true },
-  { 192621, true },
-  { 192635, true },
-  { 192655, true },
-  { 192669, true },
-  { 192686, true },
-  { 192703, true },
+  { 192294, true },
+  { 192310, true },
+  { 192319, false },
+  { 192329, true },
+  { 192341, true },
+  { 192358, true },
+  { 192370, true },
+  { 192386, true },
+  { 192402, true },
+  { 192423, true },
+  { 192435, true },
+  { 192454, false },
+  { 192466, true },
+  { 192476, true },
+  { 192491, true },
+  { 192503, true },
+  { 192517, true },
+  { 192541, true },
+  { 192553, true },
+  { 192574, true },
+  { 192605, true },
+  { 192630, true },
+  { 192653, true },
+  { 192664, true },
+  { 192676, true },
+  { 192691, true },
+  { 192704, true },
   { 192717, true },
-  { 192727, false },
-  { 192741, true },
-  { 192751, true },
-  { 192772, true },
-  { 192785, true },
-  { 192798, true },
-  { 192809, true },
-  { 192822, true },
-  { 192843, true },
-  { 192863, true },
-  { 192880, true },
-  { 192892, true },
-  { 192906, true },
-  { 192916, true },
-  { 192933, true },
-  { 192943, true },
-  { 192951, true },
+  { 192746, true },
+  { 192769, true },
+  { 192793, true },
+  { 192820, true },
+  { 192834, true },
+  { 192857, true },
+  { 192883, true },
+  { 192911, true },
+  { 192942, true },
   { 192967, true },
-  { 192983, true },
-  { 192999, true },
-  { 193020, true },
-  { 193031, true },
-  { 193043, true },
-  { 193056, true },
-  { 193081, true },
-  { 193096, true },
-  { 193116, true },
-  { 193130, true },
+  { 192975, true },
+  { 192982, true },
+  { 192994, true },
+  { 193002, true },
+  { 193014, true },
+  { 193027, true },
+  { 193048, true },
+  { 193061, true },
+  { 193082, true },
+  { 193101, true },
+  { 193120, true },
+  { 193131, true },
   { 193144, true },
-  { 193159, true },
-  { 193181, true },
-  { 193201, true },
-  { 193216, true },
-  { 193226, true },
-  { 193244, true },
-  { 193259, true },
-  { 193275, true },
-  { 193296, true },
-  { 193312, true },
-  { 193321, false },
-  { 193331, true },
-  { 193343, true },
-  { 193360, true },
-  { 193372, true },
-  { 193388, true },
-  { 193404, true },
-  { 193425, true },
-  { 193437, true },
-  { 193456, false },
-  { 193468, true },
-  { 193478, true },
-  { 193493, true },
-  { 193505, true },
-  { 193519, true },
-  { 193543, true },
-  { 193555, true },
-  { 193576, true },
-  { 193607, true },
-  { 193632, true },
-  { 193655, true },
-  { 193666, true },
-  { 193678, true },
-  { 193693, true },
-  { 193706, true },
-  { 193719, true },
-  { 193748, true },
-  { 193771, true },
-  { 193795, true },
-  { 193822, true },
-  { 193836, true },
-  { 193859, true },
-  { 193885, true },
-  { 193913, true },
-  { 193944, true },
-  { 193969, true },
-  { 193977, true },
-  { 193984, true },
-  { 193996, true },
-  { 194004, true },
-  { 194016, true },
-  { 194029, true },
-  { 194050, true },
-  { 194063, true },
-  { 194084, true },
-  { 194103, true },
-  { 194122, true },
-  { 194133, true },
-  { 194146, true },
-  { 194162, false },
-  { 194178, true },
-  { 194186, true },
-  { 194201, true },
-  { 194218, false },
-  { 194233, true },
-  { 194249, true },
-  { 194259, true },
-  { 194271, true },
-  { 194290, true },
-  { 194304, false },
-  { 194313, true },
-  { 194325, true },
-  { 194338, true },
-  { 194350, true },
-  { 194365, true },
-  { 194387, true },
-  { 194404, true },
-  { 194426, true },
-  { 194440, true },
-  { 194447, true },
-  { 194460, true },
-  { 194473, true },
-  { 194499, true },
-  { 194511, true },
-  { 194522, true },
-  { 194548, true },
-  { 194558, false },
-  { 194575, true },
-  { 194587, true },
-  { 194602, true },
-  { 194612, true },
-  { 194629, true },
-  { 194642, true },
-  { 194654, true },
-  { 194664, true },
-  { 194677, false },
-  { 194693, true },
-  { 194709, true },
-  { 194723, true },
-  { 194736, false },
-  { 194753, true },
-  { 194767, true },
-  { 194781, true },
-  { 194795, true },
-  { 194819, true },
-  { 194832, true },
-  { 194845, true },
-  { 194859, true },
-  { 194873, true },
-  { 194888, true },
-  { 194902, true },
-  { 194918, true },
-  { 194933, true },
-  { 194948, true },
-  { 194966, true },
-  { 194978, true },
-  { 194990, true },
-  { 195006, true },
-  { 195023, true },
-  { 195047, true },
-  { 195064, true },
-  { 195082, true },
-  { 195101, true },
-  { 195121, true },
-  { 195136, true },
-  { 195148, true },
+  { 193160, false },
+  { 193176, true },
+  { 193184, true },
+  { 193199, true },
+  { 193216, false },
+  { 193231, true },
+  { 193247, true },
+  { 193257, true },
+  { 193269, true },
+  { 193288, true },
+  { 193302, false },
+  { 193311, true },
+  { 193323, true },
+  { 193336, true },
+  { 193348, true },
+  { 193363, true },
+  { 193385, true },
+  { 193402, true },
+  { 193424, true },
+  { 193438, true },
+  { 193445, true },
+  { 193458, true },
+  { 193471, true },
+  { 193497, true },
+  { 193509, true },
+  { 193520, true },
+  { 193546, true },
+  { 193556, false },
+  { 193573, true },
+  { 193585, true },
+  { 193600, true },
+  { 193610, true },
+  { 193627, true },
+  { 193640, true },
+  { 193652, true },
+  { 193662, true },
+  { 193675, false },
+  { 193691, true },
+  { 193707, true },
+  { 193721, false },
+  { 193736, true },
+  { 193749, false },
+  { 193766, true },
+  { 193780, true },
+  { 193794, true },
+  { 193808, true },
+  { 193832, true },
+  { 193845, true },
+  { 193858, true },
+  { 193872, true },
+  { 193886, true },
+  { 193901, true },
+  { 193915, true },
+  { 193931, true },
+  { 193946, true },
+  { 193961, true },
+  { 193979, true },
+  { 193991, true },
+  { 194003, true },
+  { 194019, true },
+  { 194036, true },
+  { 194060, true },
+  { 194077, true },
+  { 194095, true },
+  { 194114, true },
+  { 194129, true },
+  { 194141, true },
+  { 194155, true },
+  { 194172, true },
+  { 194181, true },
+  { 194194, true },
+  { 194208, true },
+  { 194223, true },
+  { 194235, true },
+  { 194245, false },
+  { 194258, true },
+  { 194269, true },
+  { 194283, true },
+  { 194296, true },
+  { 194308, false },
+  { 194327, true },
+  { 194349, true },
+  { 194364, true },
+  { 194383, true },
+  { 194397, false },
+  { 194408, true },
+  { 194423, true },
+  { 194437, true },
+  { 194449, true },
+  { 194466, true },
+  { 194484, true },
+  { 194495, true },
+  { 194502, true },
+  { 194515, true },
+  { 194527, true },
+  { 194535, true },
+  { 194545, true },
+  { 194555, true },
+  { 194570, true },
+  { 194589, true },
+  { 194605, false },
+  { 194615, false },
+  { 194627, true },
+  { 194636, true },
+  { 194650, true },
+  { 194662, true },
+  { 194670, true },
+  { 194677, true },
+  { 194687, true },
+  { 194699, true },
+  { 194712, true },
+  { 194731, true },
+  { 194739, false },
+  { 194751, true },
+  { 194764, true },
+  { 194779, true },
+  { 194801, true },
+  { 194815, true },
+  { 194826, true },
+  { 194838, true },
+  { 194856, true },
+  { 194872, true },
+  { 194881, false },
+  { 194898, true },
+  { 194919, true },
+  { 194940, true },
+  { 194952, true },
+  { 194977, true },
+  { 195003, true },
+  { 195029, true },
+  { 195040, true },
+  { 195052, true },
+  { 195065, true },
+  { 195078, true },
+  { 195088, true },
+  { 195097, true },
+  { 195111, true },
+  { 195131, true },
+  { 195146, true },
   { 195162, true },
-  { 195179, true },
-  { 195188, true },
-  { 195201, true },
-  { 195215, true },
-  { 195230, true },
-  { 195242, true },
-  { 195252, false },
-  { 195265, true },
-  { 195276, true },
-  { 195290, true },
+  { 195172, true },
+  { 195184, true },
+  { 195204, true },
+  { 195226, true },
+  { 195243, true },
+  { 195256, true },
+  { 195275, true },
+  { 195289, true },
   { 195303, true },
-  { 195315, false },
-  { 195334, true },
-  { 195356, true },
-  { 195371, true },
-  { 195390, true },
-  { 195404, false },
+  { 195315, true },
+  { 195339, true },
+  { 195356, false },
+  { 195370, true },
+  { 195383, true },
+  { 195396, true },
   { 195415, true },
-  { 195430, true },
-  { 195444, true },
-  { 195456, true },
-  { 195473, true },
-  { 195491, true },
-  { 195502, true },
-  { 195509, true },
-  { 195522, true },
-  { 195534, true },
-  { 195542, true },
+  { 195437, true },
+  { 195449, true },
+  { 195464, true },
+  { 195485, true },
+  { 195510, true },
+  { 195526, true },
   { 195552, true },
-  { 195562, true },
-  { 195577, true },
-  { 195596, true },
-  { 195612, false },
-  { 195622, false },
-  { 195634, true },
-  { 195643, true },
-  { 195657, true },
-  { 195669, true },
-  { 195677, true },
-  { 195684, true },
-  { 195694, true },
+  { 195572, true },
+  { 195588, true },
+  { 195601, true },
+  { 195613, true },
+  { 195631, true },
+  { 195645, true },
+  { 195664, true },
+  { 195675, true },
+  { 195687, true },
+  { 195697, true },
   { 195706, true },
-  { 195719, true },
-  { 195738, true },
-  { 195746, false },
-  { 195758, true },
-  { 195771, true },
-  { 195786, true },
-  { 195808, true },
-  { 195822, true },
-  { 195833, true },
-  { 195845, true },
-  { 195863, true },
-  { 195879, true },
-  { 195888, false },
-  { 195905, true },
-  { 195926, true },
-  { 195947, true },
-  { 195959, true },
-  { 195984, true },
-  { 196010, true },
-  { 196036, true },
-  { 196047, true },
-  { 196059, true },
-  { 196072, true },
-  { 196085, true },
-  { 196095, true },
-  { 196104, true },
-  { 196118, true },
-  { 196138, true },
-  { 196153, true },
-  { 196169, true },
-  { 196179, true },
-  { 196191, true },
-  { 196211, true },
-  { 196233, true },
-  { 196250, true },
-  { 196263, true },
-  { 196282, true },
-  { 196296, true },
-  { 196310, true },
-  { 196322, true },
-  { 196346, true },
-  { 196363, false },
-  { 196377, true },
-  { 196390, true },
-  { 196403, true },
-  { 196422, true },
-  { 196444, true },
-  { 196456, true },
-  { 196471, true },
+  { 195720, true },
+  { 195731, true },
+  { 195742, true },
+  { 195750, true },
+  { 195763, true },
+  { 195777, true },
+  { 195794, true },
+  { 195805, false },
+  { 195817, true },
+  { 195836, true },
+  { 195849, true },
+  { 195860, true },
+  { 195871, true },
+  { 195884, true },
+  { 195896, true },
+  { 195906, true },
+  { 195916, true },
+  { 195936, true },
+  { 195946, true },
+  { 195969, true },
+  { 195981, true },
+  { 196000, true },
+  { 196008, true },
+  { 196022, true },
+  { 196034, true },
+  { 196049, false },
+  { 196062, true },
+  { 196075, true },
+  { 196086, true },
+  { 196097, true },
+  { 196113, true },
+  { 196123, true },
+  { 196137, true },
+  { 196144, true },
+  { 196157, true },
+  { 196174, true },
+  { 196184, true },
+  { 196192, true },
+  { 196204, true },
+  { 196220, true },
+  { 196235, true },
+  { 196245, true },
+  { 196270, true },
+  { 196278, true },
+  { 196290, false },
+  { 196301, false },
+  { 196319, false },
+  { 196332, true },
+  { 196347, true },
+  { 196361, true },
+  { 196375, true },
+  { 196392, true },
+  { 196409, true },
+  { 196424, true },
+  { 196442, true },
+  { 196460, true },
+  { 196478, true },
   { 196492, true },
-  { 196517, true },
-  { 196533, true },
-  { 196559, true },
-  { 196579, true },
-  { 196592, true },
-  { 196608, true },
-  { 196621, true },
-  { 196633, true },
-  { 196651, true },
-  { 196665, true },
-  { 196684, true },
-  { 196695, true },
-  { 196707, true },
-  { 196717, true },
-  { 196726, true },
-  { 196740, true },
-  { 196751, true },
-  { 196762, true },
-  { 196770, true },
-  { 196783, true },
-  { 196797, true },
-  { 196814, true },
-  { 196825, false },
-  { 196837, true },
-  { 196856, true },
-  { 196869, true },
-  { 196880, true },
-  { 196891, true },
-  { 196904, true },
-  { 196916, true },
-  { 196926, true },
-  { 196936, true },
-  { 196956, true },
-  { 196966, true },
-  { 196989, true },
-  { 197001, true },
-  { 197020, true },
-  { 197028, true },
-  { 197042, true },
-  { 197054, true },
-  { 197069, false },
-  { 197082, true },
-  { 197095, true },
-  { 197106, true },
-  { 197117, true },
-  { 197133, true },
-  { 197143, true },
-  { 197157, true },
-  { 197164, true },
-  { 197177, true },
-  { 197194, true },
-  { 197204, true },
-  { 197212, true },
-  { 197224, true },
-  { 197240, true },
-  { 197255, true },
-  { 197265, true },
-  { 197290, true },
-  { 197298, true },
-  { 197310, false },
-  { 197321, false },
-  { 197339, false },
-  { 197352, true },
-  { 197367, true },
-  { 197381, true },
-  { 197398, true },
-  { 197415, true },
-  { 197430, true },
-  { 197448, true },
+  { 196506, true },
+  { 196520, true },
+  { 196534, true },
+  { 196548, false },
+  { 196566, false },
+  { 196589, false },
+  { 196610, false },
+  { 196629, true },
+  { 196645, false },
+  { 196661, false },
+  { 196677, true },
+  { 196699, true },
+  { 196712, false },
+  { 196729, false },
+  { 196746, true },
+  { 196763, false },
+  { 196780, false },
+  { 196794, false },
+  { 196813, false },
+  { 196824, false },
+  { 196836, false },
+  { 196848, false },
+  { 196867, true },
+  { 196885, false },
+  { 196899, true },
+  { 196915, false },
+  { 196932, false },
+  { 196949, false },
+  { 196964, false },
+  { 196980, true },
+  { 197001, false },
+  { 197020, false },
+  { 197038, false },
+  { 197058, true },
+  { 197074, false },
+  { 197089, true },
+  { 197104, true },
+  { 197128, true },
+  { 197135, true },
+  { 197154, false },
+  { 197169, true },
+  { 197190, false },
+  { 197214, false },
+  { 197233, false },
+  { 197249, false },
+  { 197264, false },
+  { 197277, true },
+  { 197293, false },
+  { 197308, false },
+  { 197322, false },
+  { 197340, true },
+  { 197351, true },
+  { 197362, true },
+  { 197370, true },
+  { 197385, true },
+  { 197395, true },
+  { 197408, true },
+  { 197425, true },
+  { 197437, true },
+  { 197445, true },
+  { 197456, true },
   { 197466, true },
-  { 197484, true },
-  { 197498, true },
-  { 197512, true },
-  { 197526, true },
-  { 197540, true },
-  { 197554, false },
-  { 197572, false },
-  { 197595, false },
-  { 197616, false },
-  { 197635, true },
-  { 197651, false },
-  { 197667, false },
-  { 197683, true },
+  { 197482, true },
+  { 197487, true },
+  { 197492, true },
+  { 197502, true },
+  { 197510, true },
+  { 197530, true },
+  { 197537, true },
+  { 197556, true },
+  { 197563, true },
+  { 197570, true },
+  { 197577, true },
+  { 197586, true },
+  { 197607, true },
+  { 197627, true },
+  { 197651, true },
+  { 197658, true },
+  { 197668, true },
+  { 197685, true },
   { 197705, true },
-  { 197718, false },
-  { 197735, false },
-  { 197752, true },
-  { 197769, false },
-  { 197786, false },
-  { 197800, false },
-  { 197819, false },
-  { 197830, false },
-  { 197842, false },
-  { 197854, false },
-  { 197873, true },
-  { 197891, false },
-  { 197905, true },
-  { 197921, false },
-  { 197938, false },
-  { 197955, false },
-  { 197970, false },
-  { 197986, true },
-  { 198007, false },
-  { 198026, false },
-  { 198044, false },
-  { 198064, true },
-  { 198080, false },
-  { 198095, true },
-  { 198110, true },
-  { 198134, true },
-  { 198141, true },
-  { 198160, false },
-  { 198175, true },
-  { 198196, false },
-  { 198220, false },
-  { 198239, false },
-  { 198255, false },
-  { 198270, false },
-  { 198283, true },
-  { 198299, false },
-  { 198314, false },
-  { 198328, false },
-  { 198346, true },
-  { 198357, true },
-  { 198368, true },
-  { 198376, true },
-  { 198391, true },
-  { 198401, true },
-  { 198414, true },
-  { 198431, true },
-  { 198443, true },
-  { 198451, true },
-  { 198462, true },
-  { 198472, true },
-  { 198488, true },
-  { 198493, true },
-  { 198498, true },
-  { 198508, true },
-  { 198516, true },
-  { 198536, true },
-  { 198543, true },
-  { 198562, true },
-  { 198569, true },
-  { 198576, true },
-  { 198583, true },
-  { 198592, true },
-  { 198613, true },
-  { 198633, true },
-  { 198657, true },
-  { 198664, true },
-  { 198674, true },
-  { 198691, true },
-  { 198711, true },
-  { 198717, true },
-  { 198729, true },
-  { 198742, true },
-  { 198757, false },
-  { 198768, true },
-  { 198779, true },
-  { 198787, false },
-  { 198806, true },
-  { 198817, true },
-  { 198828, true },
+  { 197711, true },
+  { 197723, true },
+  { 197736, true },
+  { 197751, false },
+  { 197762, true },
+  { 197773, true },
+  { 197781, false },
+  { 197800, true },
+  { 197811, true },
+  { 197822, true },
+  { 197829, true },
+  { 197841, true },
+  { 197860, true },
+  { 197876, true },
+  { 197888, true },
+  { 197899, true },
+  { 197912, true },
+  { 197927, true },
+  { 197942, true },
+  { 197952, true },
+  { 197962, true },
+  { 197973, false },
+  { 197983, true },
+  { 197994, true },
+  { 198004, true },
+  { 198013, false },
+  { 198027, true },
+  { 198037, true },
+  { 198045, true },
+  { 198057, true },
+  { 198068, true },
+  { 198079, true },
+  { 198091, true },
+  { 198099, true },
+  { 198113, true },
+  { 198120, true },
+  { 198127, true },
+  { 198145, true },
+  { 198171, true },
+  { 198197, true },
+  { 198220, true },
+  { 198251, true },
+  { 198262, true },
+  { 198278, true },
+  { 198290, true },
+  { 198309, true },
+  { 198342, true },
+  { 198366, true },
+  { 198392, true },
+  { 198417, true },
+  { 198442, true },
+  { 198466, true },
+  { 198496, true },
+  { 198507, true },
+  { 198526, true },
+  { 198557, true },
+  { 198568, false },
+  { 198589, true },
+  { 198626, true },
+  { 198649, true },
+  { 198677, true },
+  { 198692, true },
+  { 198706, true },
+  { 198728, true },
+  { 198770, true },
+  { 198793, true },
+  { 198809, true },
   { 198835, true },
-  { 198846, true },
-  { 198858, true },
-  { 198877, true },
+  { 198869, true },
   { 198893, true },
-  { 198905, true },
-  { 198916, true },
-  { 198929, true },
-  { 198944, true },
-  { 198959, true },
-  { 198969, true },
-  { 198979, true },
-  { 198990, false },
-  { 199000, true },
-  { 199011, true },
-  { 199021, true },
-  { 199030, false },
-  { 199044, true },
+  { 198920, false },
+  { 198927, true },
+  { 198933, true },
+  { 198942, false },
+  { 198952, true },
+  { 198963, true },
+  { 198973, true },
+  { 198983, true },
+  { 198990, true },
+  { 198997, true },
+  { 199010, true },
+  { 199017, true },
+  { 199031, true },
+  { 199040, true },
   { 199054, true },
-  { 199062, true },
+  { 199064, true },
   { 199074, true },
-  { 199085, true },
-  { 199096, true },
-  { 199108, true },
-  { 199116, true },
-  { 199130, true },
+  { 199087, true },
+  { 199094, true },
+  { 199101, true },
+  { 199112, true },
+  { 199121, true },
   { 199137, true },
-  { 199144, true },
-  { 199162, true },
-  { 199188, true },
+  { 199146, true },
+  { 199159, true },
+  { 199166, true },
+  { 199176, true },
+  { 199184, true },
+  { 199195, true },
+  { 199204, true },
   { 199214, true },
-  { 199237, true },
-  { 199268, true },
-  { 199279, true },
-  { 199295, true },
-  { 199307, true },
-  { 199326, true },
-  { 199359, true },
-  { 199383, true },
-  { 199409, true },
-  { 199434, true },
-  { 199459, true },
-  { 199483, true },
+  { 199229, true },
+  { 199239, true },
+  { 199248, true },
+  { 199255, true },
+  { 199275, true },
+  { 199286, true },
+  { 199297, true },
+  { 199311, true },
+  { 199327, true },
+  { 199334, true },
+  { 199346, true },
+  { 199356, true },
+  { 199363, true },
+  { 199374, true },
+  { 199386, false },
+  { 199398, true },
+  { 199412, true },
+  { 199425, true },
+  { 199441, true },
+  { 199456, true },
+  { 199468, false },
+  { 199478, true },
+  { 199491, true },
+  { 199503, true },
   { 199513, true },
-  { 199524, true },
-  { 199543, true },
-  { 199574, true },
-  { 199585, false },
-  { 199606, true },
+  { 199521, true },
+  { 199530, true },
+  { 199542, true },
+  { 199552, false },
+  { 199560, true },
+  { 199570, true },
+  { 199579, true },
+  { 199599, true },
+  { 199615, false },
+  { 199630, false },
   { 199643, true },
-  { 199666, true },
-  { 199694, true },
-  { 199709, true },
-  { 199723, true },
-  { 199745, true },
+  { 199657, true },
+  { 199667, false },
+  { 199676, true },
+  { 199692, true },
+  { 199699, true },
+  { 199708, true },
+  { 199717, true },
+  { 199728, true },
+  { 199739, true },
+  { 199750, true },
+  { 199772, true },
   { 199787, true },
-  { 199810, true },
-  { 199826, true },
-  { 199852, true },
-  { 199886, true },
-  { 199910, true },
-  { 199937, false },
-  { 199944, true },
-  { 199950, true },
-  { 199959, false },
-  { 199969, true },
-  { 199980, true },
-  { 199990, true },
-  { 200000, true },
-  { 200007, true },
-  { 200014, true },
-  { 200027, true },
-  { 200034, true },
-  { 200048, true },
-  { 200057, true },
-  { 200071, true },
-  { 200081, true },
-  { 200091, true },
-  { 200104, true },
-  { 200111, true },
-  { 200118, true },
-  { 200129, true },
-  { 200138, true },
-  { 200154, true },
-  { 200163, true },
-  { 200176, true },
-  { 200183, true },
-  { 200193, true },
-  { 200201, true },
-  { 200212, true },
+  { 199794, true },
+  { 199805, true },
+  { 199813, true },
+  { 199823, true },
+  { 199836, false },
+  { 199845, true },
+  { 199859, true },
+  { 199875, true },
+  { 199893, true },
+  { 199904, true },
+  { 199916, false },
+  { 199931, true },
+  { 199941, true },
+  { 199953, true },
+  { 199973, true },
+  { 199983, true },
+  { 199993, true },
+  { 200005, true },
+  { 200018, true },
+  { 200033, true },
+  { 200047, true },
+  { 200062, true },
+  { 200077, true },
+  { 200089, true },
+  { 200101, true },
+  { 200112, true },
+  { 200122, true },
+  { 200134, true },
+  { 200147, true },
+  { 200160, true },
+  { 200175, true },
+  { 200194, true },
+  { 200209, true },
   { 200221, true },
-  { 200231, true },
-  { 200246, true },
-  { 200256, true },
-  { 200265, true },
-  { 200272, true },
-  { 200292, true },
-  { 200303, true },
-  { 200314, true },
-  { 200328, true },
-  { 200344, true },
-  { 200351, true },
-  { 200363, true },
-  { 200373, true },
-  { 200380, true },
-  { 200391, true },
-  { 200403, false },
-  { 200415, true },
-  { 200429, true },
-  { 200442, true },
+  { 200232, true },
+  { 200254, true },
+  { 200270, true },
+  { 200290, true },
+  { 200299, true },
+  { 200307, true },
+  { 200315, false },
+  { 200327, true },
+  { 200340, true },
+  { 200352, true },
+  { 200364, true },
+  { 200379, true },
+  { 200389, true },
+  { 200400, true },
+  { 200416, true },
+  { 200425, true },
+  { 200434, true },
+  { 200443, true },
   { 200458, true },
-  { 200473, true },
-  { 200485, false },
-  { 200495, true },
-  { 200508, true },
-  { 200520, true },
+  { 200471, true },
+  { 200480, true },
+  { 200491, true },
+  { 200505, true },
+  { 200517, true },
   { 200530, true },
   { 200538, true },
-  { 200547, true },
-  { 200559, true },
-  { 200569, false },
-  { 200577, true },
+  { 200552, true },
+  { 200564, true },
+  { 200571, true },
+  { 200579, true },
   { 200587, true },
-  { 200596, true },
-  { 200616, true },
-  { 200631, true },
-  { 200647, false },
-  { 200662, false },
-  { 200675, true },
-  { 200689, true },
-  { 200699, false },
-  { 200708, true },
-  { 200724, true },
-  { 200731, true },
-  { 200741, true },
-  { 200750, true },
+  { 200597, true },
+  { 200606, true },
+  { 200619, true },
+  { 200624, true },
+  { 200634, true },
+  { 200641, true },
+  { 200648, true },
+  { 200660, false },
+  { 200679, true },
+  { 200695, true },
+  { 200710, true },
+  { 200725, true },
+  { 200738, true },
+  { 200751, true },
   { 200759, true },
-  { 200770, true },
-  { 200781, true },
+  { 200769, true },
+  { 200779, true },
   { 200792, true },
-  { 200814, true },
-  { 200829, true },
-  { 200836, true },
-  { 200847, true },
-  { 200855, true },
-  { 200865, true },
-  { 200878, false },
-  { 200887, true },
-  { 200901, true },
-  { 200917, true },
-  { 200935, true },
-  { 200946, true },
-  { 200958, false },
-  { 200973, true },
-  { 200983, true },
-  { 200995, true },
+  { 200805, true },
+  { 200822, true },
+  { 200830, true },
+  { 200839, true },
+  { 200852, true },
+  { 200864, true },
+  { 200894, true },
+  { 200905, true },
+  { 200923, true },
+  { 200931, true },
+  { 200955, true },
+  { 200965, true },
+  { 200977, true },
+  { 200988, true },
+  { 201006, true },
   { 201015, true },
-  { 201025, true },
-  { 201035, true },
-  { 201047, true },
-  { 201060, true },
-  { 201075, true },
-  { 201089, true },
-  { 201104, true },
-  { 201119, true },
-  { 201131, true },
-  { 201143, true },
-  { 201154, true },
-  { 201164, true },
-  { 201176, true },
-  { 201189, true },
-  { 201202, true },
-  { 201217, true },
-  { 201236, true },
-  { 201251, true },
-  { 201263, true },
-  { 201274, true },
-  { 201296, true },
-  { 201312, true },
-  { 201332, true },
-  { 201341, true },
-  { 201349, true },
-  { 201357, false },
-  { 201369, true },
-  { 201382, true },
-  { 201394, true },
-  { 201406, true },
-  { 201421, true },
-  { 201431, true },
-  { 201442, true },
-  { 201458, true },
-  { 201467, true },
-  { 201476, true },
-  { 201485, true },
-  { 201500, true },
-  { 201513, true },
+  { 201026, true },
+  { 201038, true },
+  { 201046, true },
+  { 201053, true },
+  { 201061, true },
+  { 201072, true },
+  { 201082, true },
+  { 201091, true },
+  { 201100, true },
+  { 201125, true },
+  { 201137, true },
+  { 201157, true },
+  { 201179, true },
+  { 201190, true },
+  { 201201, true },
+  { 201214, true },
+  { 201229, true },
+  { 201247, true },
+  { 201260, true },
+  { 201276, true },
+  { 201294, true },
+  { 201308, true },
+  { 201318, true },
+  { 201330, true },
+  { 201342, true },
+  { 201354, true },
+  { 201365, true },
+  { 201377, true },
+  { 201390, true },
+  { 201403, true },
+  { 201415, true },
+  { 201427, true },
+  { 201438, false },
+  { 201448, true },
+  { 201459, true },
+  { 201474, true },
+  { 201487, true },
+  { 201498, true },
+  { 201508, true },
   { 201522, true },
-  { 201533, true },
-  { 201547, true },
-  { 201559, true },
-  { 201572, true },
-  { 201580, true },
-  { 201594, true },
-  { 201606, true },
-  { 201613, true },
-  { 201621, true },
-  { 201629, true },
-  { 201639, true },
-  { 201648, true },
+  { 201534, true },
+  { 201550, true },
+  { 201565, true },
+  { 201578, true },
+  { 201590, true },
+  { 201603, true },
+  { 201618, true },
+  { 201625, true },
+  { 201640, true },
+  { 201652, true },
   { 201661, true },
-  { 201666, true },
-  { 201676, true },
-  { 201683, true },
-  { 201690, true },
-  { 201702, false },
-  { 201721, true },
-  { 201737, true },
-  { 201752, true },
-  { 201767, true },
-  { 201780, true },
-  { 201793, true },
-  { 201801, true },
-  { 201811, true },
-  { 201821, true },
-  { 201834, true },
-  { 201847, true },
-  { 201864, true },
-  { 201872, true },
+  { 201673, true },
+  { 201681, true },
+  { 201696, true },
+  { 201705, false },
+  { 201713, true },
+  { 201724, true },
+  { 201732, true },
+  { 201743, true },
+  { 201754, true },
+  { 201769, true },
+  { 201786, false },
+  { 201798, true },
+  { 201817, true },
+  { 201835, true },
+  { 201855, true },
+  { 201867, true },
   { 201881, true },
-  { 201894, true },
-  { 201906, true },
-  { 201936, true },
-  { 201947, true },
+  { 201891, true },
+  { 201898, true },
+  { 201909, true },
+  { 201919, true },
+  { 201925, true },
+  { 201940, true },
+  { 201950, true },
   { 201965, true },
-  { 201973, true },
-  { 201997, true },
+  { 201977, true },
+  { 201989, true },
+  { 201996, true },
   { 202007, true },
-  { 202019, true },
-  { 202030, true },
-  { 202042, true },
-  { 202060, true },
-  { 202069, true },
-  { 202080, true },
-  { 202092, true },
-  { 202100, true },
-  { 202107, true },
-  { 202115, true },
-  { 202126, true },
-  { 202136, true },
-  { 202145, true },
-  { 202154, true },
-  { 202179, true },
-  { 202191, true },
+  { 202020, true },
+  { 202044, true },
+  { 202051, true },
+  { 202062, true },
+  { 202073, true },
+  { 202091, true },
+  { 202104, true },
+  { 202119, true },
+  { 202135, true },
+  { 202146, true },
+  { 202162, true },
+  { 202186, true },
+  { 202201, true },
   { 202211, true },
-  { 202233, true },
-  { 202244, true },
-  { 202255, true },
-  { 202268, true },
+  { 202219, true },
+  { 202230, true },
+  { 202240, true },
+  { 202250, true },
+  { 202261, true },
+  { 202269, true },
   { 202283, true },
-  { 202301, true },
-  { 202314, true },
-  { 202330, true },
-  { 202348, true },
-  { 202362, true },
+  { 202295, true },
+  { 202309, true },
+  { 202318, true },
+  { 202327, true },
+  { 202341, true },
+  { 202349, true },
+  { 202359, true },
   { 202372, true },
-  { 202384, true },
-  { 202396, true },
-  { 202408, true },
-  { 202419, true },
-  { 202431, true },
-  { 202444, true },
-  { 202457, true },
-  { 202469, true },
-  { 202481, true },
-  { 202492, false },
-  { 202502, true },
-  { 202513, true },
-  { 202528, true },
+  { 202386, true },
+  { 202407, true },
+  { 202417, true },
+  { 202424, true },
+  { 202435, true },
+  { 202445, true },
+  { 202458, true },
+  { 202466, true },
+  { 202475, true },
+  { 202488, true },
+  { 202501, true },
+  { 202512, true },
+  { 202522, true },
+  { 202531, true },
   { 202541, true },
-  { 202552, true },
-  { 202562, true },
-  { 202576, true },
-  { 202588, true },
-  { 202604, true },
-  { 202619, true },
-  { 202632, true },
-  { 202644, true },
-  { 202657, true },
-  { 202672, true },
-  { 202679, true },
-  { 202694, true },
-  { 202706, true },
-  { 202715, true },
-  { 202723, true },
-  { 202738, true },
-  { 202747, false },
-  { 202755, true },
-  { 202766, true },
-  { 202774, true },
-  { 202785, true },
-  { 202800, true },
-  { 202817, false },
-  { 202829, true },
-  { 202848, true },
-  { 202866, true },
-  { 202886, true },
-  { 202898, true },
-  { 202908, true },
-  { 202915, true },
-  { 202926, true },
-  { 202936, true },
-  { 202942, true },
-  { 202957, true },
-  { 202967, true },
-  { 202982, true },
-  { 202994, true },
-  { 203006, true },
-  { 203013, true },
-  { 203024, true },
-  { 203037, true },
-  { 203061, true },
-  { 203068, true },
-  { 203079, true },
-  { 203090, true },
-  { 203108, true },
-  { 203121, true },
-  { 203136, true },
-  { 203152, true },
-  { 203163, true },
-  { 203179, true },
-  { 203203, true },
-  { 203218, true },
-  { 203228, true },
-  { 203236, true },
-  { 203247, true },
-  { 203257, true },
-  { 203267, true },
-  { 203278, true },
-  { 203286, true },
-  { 203300, true },
-  { 203312, true },
-  { 203326, true },
-  { 203335, true },
-  { 203344, true },
-  { 203358, true },
-  { 203366, true },
-  { 203376, true },
-  { 203389, true },
-  { 203403, true },
-  { 203424, true },
-  { 203434, true },
-  { 203441, true },
-  { 203452, true },
-  { 203462, true },
-  { 203475, true },
-  { 203483, true },
-  { 203492, true },
-  { 203505, true },
-  { 203518, true },
-  { 203529, true },
-  { 203539, true },
-  { 203548, true },
-  { 203558, true },
 };
diff --git a/security/sandbox/mac/Sandbox.mm b/security/sandbox/mac/Sandbox.mm
index d7f8e5cb162a..40048935e4c3 100644
--- a/security/sandbox/mac/Sandbox.mm
+++ b/security/sandbox/mac/Sandbox.mm
@@ -135,7 +135,6 @@ static const char pluginSandboxRules[] =
   "(allow file-read*\n"
   "    (regex #\"^/etc$\")\n"
   "    (regex #\"^/dev/u?random$\")\n"
-  "    (regex #\"^/(private/)?var($|/)\")\n"
   "    (literal \"/usr/share/icu/icudt51l.dat\")\n"
   "    (regex #\"^/System/Library/Displays/Overrides/*\")\n"
   "    (regex #\"^/System/Library/CoreServices/CoreTypes.bundle/*\")\n"
diff --git a/services/sync/tests/unit/test_addons_engine.js b/services/sync/tests/unit/test_addons_engine.js
index 177e65b43e14..048635f15890 100644
--- a/services/sync/tests/unit/test_addons_engine.js
+++ b/services/sync/tests/unit/test_addons_engine.js
@@ -36,6 +36,7 @@ function advance_test() {
   reconciler.saveState(null, cb);
   cb.wait();
 
+  tracker.clearChangedIDs();
   run_next_test();
 }
 
diff --git a/services/sync/tests/unit/test_clients_engine.js b/services/sync/tests/unit/test_clients_engine.js
index 5575bee9ee96..e34b65df4ba1 100644
--- a/services/sync/tests/unit/test_clients_engine.js
+++ b/services/sync/tests/unit/test_clients_engine.js
@@ -199,6 +199,7 @@ add_test(function test_properties() {
     equal(engine.lastRecordUpload, Math.floor(now / 1000));
   } finally {
     Svc.Prefs.resetBranch("");
+    engine._tracker.clearChangedIDs();
     run_next_test();
   }
 });
@@ -359,6 +360,7 @@ add_test(function test_client_name_change() {
 
   Svc.Obs.notify("weave:engine:stop-tracking");
 
+  engine._tracker.clearChangedIDs();
   run_next_test();
 });
 
@@ -390,6 +392,7 @@ add_test(function test_send_command() {
 
   notEqual(tracker.changedIDs[remoteId], undefined);
 
+  engine._tracker.clearChangedIDs();
   run_next_test();
 });
 
@@ -446,6 +449,7 @@ add_test(function test_command_validation() {
     }
 
   }
+  engine._tracker.clearChangedIDs();
   run_next_test();
 });
 
@@ -481,6 +485,7 @@ add_test(function test_command_duplication() {
   clientCommands = engine._readCommands()[remoteId];
   equal(clientCommands.length, 2);
 
+  engine._tracker.clearChangedIDs();
   run_next_test();
 });
 
@@ -498,6 +503,7 @@ add_test(function test_command_invalid_client() {
 
   equal(error.message.indexOf("Unknown remote client ID: "), 0);
 
+  engine._tracker.clearChangedIDs();
   run_next_test();
 });
 
@@ -515,6 +521,7 @@ add_test(function test_process_incoming_commands() {
     Service.recordManager.clearCache();
     engine._resetClient();
 
+    engine._tracker.clearChangedIDs();
     run_next_test();
   };
 
@@ -809,6 +816,7 @@ add_test(function test_send_uri_to_client_for_display() {
   Service.recordManager.clearCache();
   engine._resetClient();
 
+  engine._tracker.clearChangedIDs();
   run_next_test();
 });
 
@@ -841,6 +849,7 @@ add_test(function test_receive_display_uri() {
     equal(subject[0].title, title);
     equal(data, null);
 
+    engine._tracker.clearChangedIDs();
     run_next_test();
   };
 
@@ -877,6 +886,7 @@ add_test(function test_optional_client_fields() {
   // See Bug 1100722, Bug 1100723.
 
   engine._resetClient();
+  engine._tracker.clearChangedIDs();
   run_next_test();
 });
 
@@ -1433,6 +1443,7 @@ add_task(async function test_command_sync() {
   } finally {
     Svc.Prefs.resetBranch("");
     Service.recordManager.clearCache();
+    engine._tracker.clearChangedIDs();
 
     try {
       server.deleteCollections("foo");
diff --git a/services/sync/tests/unit/test_engine.js b/services/sync/tests/unit/test_engine.js
index 74b6db119819..7b93a82d8681 100644
--- a/services/sync/tests/unit/test_engine.js
+++ b/services/sync/tests/unit/test_engine.js
@@ -102,6 +102,7 @@ add_task(async function test_resetClient() {
 
   engine.wasReset = false;
   engineObserver.reset();
+  engine._tracker.clearChangedIDs();
 });
 
 add_task(async function test_invalidChangedIDs() {
@@ -120,6 +121,7 @@ add_task(async function test_invalidChangedIDs() {
   ok(tracker._storage.dataReady);
 
   do_check_true(tracker.changedIDs.placeholder);
+  engine._tracker.clearChangedIDs();
 });
 
 add_task(async function test_wipeClient() {
@@ -142,6 +144,7 @@ add_task(async function test_wipeClient() {
   engine.wasReset = false;
   engine._store.wasWiped = false;
   engineObserver.reset();
+  engine._tracker.clearChangedIDs();
 });
 
 add_task(async function test_enabled() {
@@ -180,6 +183,7 @@ add_task(async function test_sync() {
     Svc.Prefs.resetBranch("");
     engine.wasSynced = false;
     engineObserver.reset();
+    engine._tracker.clearChangedIDs();
   }
 });
 
@@ -208,4 +212,6 @@ add_task(async function test_disabled_no_track() {
   Svc.Prefs.set("engine." + engine.prefName, false);
   do_check_false(tracker._isTracking);
   do_check_empty(tracker.changedIDs);
+
+  engine._tracker.clearChangedIDs();
 });
diff --git a/services/sync/tests/unit/test_hmac_error.js b/services/sync/tests/unit/test_hmac_error.js
index b83c5de8d94d..5bddd6a3cb20 100644
--- a/services/sync/tests/unit/test_hmac_error.js
+++ b/services/sync/tests/unit/test_hmac_error.js
@@ -231,6 +231,7 @@ add_task(async function hmac_error_during_node_reassignment() {
 
             Svc.Prefs.resetBranch("");
             Service.recordManager.clearCache();
+            engine._tracker.clearChangedIDs();
             server.stop(resolve);
           };
 
diff --git a/services/sync/tests/unit/test_syncengine_sync.js b/services/sync/tests/unit/test_syncengine_sync.js
index e5322280a5cd..4e2e6e906d22 100644
--- a/services/sync/tests/unit/test_syncengine_sync.js
+++ b/services/sync/tests/unit/test_syncengine_sync.js
@@ -15,19 +15,20 @@ function makeRotaryEngine() {
   return new RotaryEngine(Service);
 }
 
-function clean() {
+function clean(engine) {
   Svc.Prefs.resetBranch("");
   Svc.Prefs.set("log.logger.engine.rotary", "Trace");
   Service.recordManager.clearCache();
+  engine._tracker.clearChangedIDs();
 }
 
-async function cleanAndGo(server) {
-  clean();
+async function cleanAndGo(engine, server) {
+  clean(engine);
   await promiseStopServer(server);
 }
 
-async function promiseClean(server) {
-  clean();
+async function promiseClean(engine, server) {
+  clean(engine);
   await promiseStopServer(server);
 }
 
@@ -128,7 +129,7 @@ add_task(async function test_syncStartup_emptyOrOutdatedGlobalsResetsSync() {
     do_check_eq(collection.payload("scotsman"), undefined);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -157,7 +158,7 @@ add_task(async function test_syncStartup_serverHasNewerVersion() {
     do_check_eq(error.failureCode, VERSION_OUT_OF_DATE);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -193,7 +194,7 @@ add_task(async function test_syncStartup_syncIDMismatchResetsClient() {
     do_check_eq(engine.lastSync, 0);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -217,7 +218,7 @@ add_task(async function test_processIncoming_emptyServer() {
     do_check_eq(engine.lastSync, 0);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -278,7 +279,7 @@ add_task(async function test_processIncoming_createFromServer() {
     do_check_eq(engine._store.items['../pathological'], "Pathological Case");
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -389,7 +390,7 @@ add_task(async function test_processIncoming_reconcile() {
     // The 'nukeme' record marked as deleted is removed.
     do_check_eq(engine._store.items.nukeme, undefined);
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -425,7 +426,7 @@ add_task(async function test_processIncoming_reconcile_local_deleted() {
   do_check_eq(1, collection.count());
   do_check_neq(undefined, collection.wbo("DUPE_INCOMING"));
 
-  await cleanAndGo(server);
+  await cleanAndGo(engine, server);
 });
 
 add_task(async function test_processIncoming_reconcile_equivalent() {
@@ -448,7 +449,7 @@ add_task(async function test_processIncoming_reconcile_equivalent() {
 
   do_check_attribute_count(engine._store.items, 1);
 
-  await cleanAndGo(server);
+  await cleanAndGo(engine, server);
 });
 
 add_task(async function test_processIncoming_reconcile_locally_deleted_dupe_new() {
@@ -487,7 +488,7 @@ add_task(async function test_processIncoming_reconcile_locally_deleted_dupe_new(
   let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext);
   do_check_true(payload.deleted);
 
-  await cleanAndGo(server);
+  await cleanAndGo(engine, server);
 });
 
 add_task(async function test_processIncoming_reconcile_locally_deleted_dupe_old() {
@@ -526,7 +527,7 @@ add_task(async function test_processIncoming_reconcile_locally_deleted_dupe_old(
   let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext);
   do_check_eq("incoming", payload.denomination);
 
-  await cleanAndGo(server);
+  await cleanAndGo(engine, server);
 });
 
 add_task(async function test_processIncoming_reconcile_changed_dupe() {
@@ -563,7 +564,7 @@ add_task(async function test_processIncoming_reconcile_changed_dupe() {
   let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext);
   do_check_eq("local", payload.denomination);
 
-  await cleanAndGo(server);
+  await cleanAndGo(engine, server);
 });
 
 add_task(async function test_processIncoming_reconcile_changed_dupe_new() {
@@ -600,7 +601,7 @@ add_task(async function test_processIncoming_reconcile_changed_dupe_new() {
   do_check_neq(undefined, wbo);
   let payload = JSON.parse(JSON.parse(wbo.payload).ciphertext);
   do_check_eq("incoming", payload.denomination);
-  await cleanAndGo(server);
+  await cleanAndGo(engine, server);
 });
 
 add_task(async function test_processIncoming_mobile_batchSize() {
@@ -669,7 +670,7 @@ add_task(async function test_processIncoming_mobile_batchSize() {
     }
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -736,7 +737,7 @@ add_task(async function test_processIncoming_store_toFetch() {
     do_check_eq(engine.lastSync, collection.wbo("record-no-99").modified);
 
   } finally {
-    await promiseClean(server);
+    await promiseClean(engine, server);
   }
 });
 
@@ -805,7 +806,7 @@ add_task(async function test_processIncoming_resume_toFetch() {
     do_check_eq(engine._store.items.failed2, "Record No. 2");
     do_check_eq(engine.previousFailed.length, 0);
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -860,7 +861,7 @@ add_task(async function test_processIncoming_applyIncomingBatchSize_smaller() {
     do_check_eq(engine.previousFailed[1], "record-no-8");
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -913,7 +914,7 @@ add_task(async function test_processIncoming_applyIncomingBatchSize_multiple() {
     do_check_attribute_count(engine._store.items, APPLY_BATCH_SIZE * 3);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1002,7 +1003,7 @@ add_task(async function test_processIncoming_notify_count() {
 
     Svc.Obs.remove("weave:engine:sync:applied", onApplied);
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1088,7 +1089,7 @@ add_task(async function test_processIncoming_previousFailed() {
     do_check_eq(engine._store.items['record-no-12'], "Record No. 12");
     do_check_eq(engine._store.items['record-no-13'], "Record No. 13");
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1222,7 +1223,7 @@ add_task(async function test_processIncoming_failed_records() {
     do_check_eq(batchDownload(BOGUS_RECORDS.length), 4);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1303,7 +1304,7 @@ add_task(async function test_processIncoming_decrypt_failed() {
     do_check_eq(observerSubject.failed, 4);
 
   } finally {
-    await promiseClean(server);
+    await promiseClean(engine, server);
   }
 });
 
@@ -1362,7 +1363,7 @@ add_task(async function test_uploadOutgoing_toEmptyServer() {
     do_check_eq(collection.payload("flying"), undefined);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1409,7 +1410,7 @@ add_task(async function test_uploadOutgoing_huge() {
     do_check_eq(engine._tracker.changedIDs["flying"], undefined);
 
   } finally {
-    cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1472,7 +1473,7 @@ add_task(async function test_uploadOutgoing_failed() {
     do_check_eq(engine._tracker.changedIDs['peppercorn'], PEPPERCORN_CHANGED);
 
   } finally {
-    await promiseClean(server);
+    await promiseClean(engine, server);
   }
 });
 
@@ -1541,7 +1542,7 @@ add_task(async function test_uploadOutgoing_MAX_UPLOAD_RECORDS() {
     do_check_eq(noOfUploads, Math.ceil(234/MAX_UPLOAD_RECORDS));
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1579,7 +1580,7 @@ add_task(async function test_uploadOutgoing_largeRecords() {
     }
     ok(!!error);
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1636,7 +1637,7 @@ add_task(async function test_syncFinish_deleteByIds() {
     do_check_eq(engine._delete.ids, undefined);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1707,7 +1708,7 @@ add_task(async function test_syncFinish_deleteLotsInBatches() {
     do_check_eq(engine._delete.ids, undefined);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1783,7 +1784,7 @@ add_task(async function test_sync_partialUpload() {
     }
 
   } finally {
-    await promiseClean(server);
+    await promiseClean(engine, server);
   }
 });
 
@@ -1810,7 +1811,7 @@ add_task(async function test_canDecrypt_noCryptoKeys() {
     do_check_false(engine.canDecrypt());
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -1836,7 +1837,7 @@ add_task(async function test_canDecrypt_true() {
     do_check_true(engine.canDecrypt());
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 
 });
@@ -1893,7 +1894,7 @@ add_task(async function test_syncapplied_observer() {
 
     do_check_true(Service.scheduler.hasIncomingItems);
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
     Service.scheduler.hasIncomingItems = false;
     Svc.Obs.remove("weave:engine:sync:applied", onApplied);
   }
diff --git a/services/sync/tests/unit/test_telemetry.js b/services/sync/tests/unit/test_telemetry.js
index 3d199977af45..ab8430e8909f 100644
--- a/services/sync/tests/unit/test_telemetry.js
+++ b/services/sync/tests/unit/test_telemetry.js
@@ -58,10 +58,11 @@ function BogusEngine(service) {
 
 BogusEngine.prototype = Object.create(SteamEngine.prototype);
 
-async function cleanAndGo(server) {
+async function cleanAndGo(engine, server) {
   Svc.Prefs.resetBranch("");
   Svc.Prefs.set("log.logger.engine.rotary", "Trace");
   Service.recordManager.clearCache();
+  engine._tracker.clearChangedIDs();
   await promiseStopServer(server);
 }
 
@@ -139,7 +140,7 @@ add_task(async function test_processIncoming_error() {
 
   } finally {
     store.wipe();
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -187,7 +188,7 @@ add_task(async function test_uploading() {
   } finally {
     // Clean up.
     store.wipe();
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -237,7 +238,7 @@ add_task(async function test_upload_failed() {
     deepEqual(ping.engines[0].outgoing, [{ sent: 2, failed: 2 }]);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -317,7 +318,7 @@ add_task(async function test_sync_partialUpload() {
     deepEqual(ping.engines[0].failureReason, uploadFailureError);
 
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -344,7 +345,7 @@ add_task(async function test_generic_engine_fail() {
     });
   } finally {
     Service.engineManager.unregister(engine);
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -380,7 +381,7 @@ add_task(async function test_engine_fail_ioerror() {
     ok(failureReason.error.includes("[profileDir]"), failureReason.error);
   } finally {
     Service.engineManager.unregister(engine);
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -417,7 +418,7 @@ add_task(async function test_initial_sync_engines() {
       equal(e.outgoing[0].failed, undefined);
     }
   } finally {
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -446,7 +447,7 @@ add_task(async function test_nserror() {
     });
   } finally {
     Service.engineManager.unregister(engine);
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -512,7 +513,7 @@ add_task(async function test_no_foreign_engines_in_error_ping() {
     ok(ping.engines.every(e => e.name !== "bogus"));
   } finally {
     Service.engineManager.unregister(engine);
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -538,7 +539,7 @@ add_task(async function test_sql_error() {
     deepEqual(enginePing.failureReason, { name: "sqlerror", code: 1 });
   } finally {
     Service.engineManager.unregister(engine);
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
 
@@ -558,6 +559,6 @@ add_task(async function test_no_foreign_engines_in_success_ping() {
     ok(ping.engines.every(e => e.name !== "bogus"));
   } finally {
     Service.engineManager.unregister(engine);
-    await cleanAndGo(server);
+    await cleanAndGo(engine, server);
   }
 });
\ No newline at end of file
diff --git a/storage/test/unit/head_storage.js b/storage/test/unit/head_storage.js
index 27a4749eda18..ab05e10b593b 100644
--- a/storage/test/unit/head_storage.js
+++ b/storage/test/unit/head_storage.js
@@ -316,15 +316,15 @@ function openAsyncDatabase(file, options) {
 function executeAsync(statement, onResult) {
   let deferred = Promise.defer();
   statement.executeAsync({
-    handleError: function(error) {
+    handleError(error) {
       deferred.reject(error);
     },
-    handleResult: function(result) {
+    handleResult(result) {
       if (onResult) {
         onResult(result);
       }
     },
-    handleCompletion: function(result) {
+    handleCompletion(result) {
       deferred.resolve(result);
     }
   });
@@ -334,15 +334,15 @@ function executeAsync(statement, onResult) {
 function executeMultipleStatementsAsync(db, statements, onResult) {
   let deferred = Promise.defer();
   db.executeAsync(statements, statements.length, {
-    handleError: function(error) {
+    handleError(error) {
       deferred.reject(error);
     },
-    handleResult: function(result) {
+    handleResult(result) {
       if (onResult) {
         onResult(result);
       }
     },
-    handleCompletion: function(result) {
+    handleCompletion(result) {
       deferred.resolve(result);
     }
   });
diff --git a/taskcluster/ci/test/test-platforms.yml b/taskcluster/ci/test/test-platforms.yml
index 641e8130d90e..51b737e5e9f5 100644
--- a/taskcluster/ci/test/test-platforms.yml
+++ b/taskcluster/ci/test/test-platforms.yml
@@ -123,10 +123,11 @@ macosx64/debug:
     build-platform: macosx64/debug
     test-sets:
         - macosx64-tests-debug
-macosx64/opt:
-    build-platform: macosx64/opt
-    test-sets:
-        - macosx64-tests-talos
+# Disable bbb talos tests for mac until we disable bb scheduling
+# macosx64/opt:
+#     build-platform: macosx64/opt
+#     test-sets:
+#         - macosx64-tests-talos
 
 ##
 # Android platforms (matching /android.*/)
diff --git a/taskcluster/ci/test/tests.yml b/taskcluster/ci/test/tests.yml
index a09b5f628190..99916a23caba 100644
--- a/taskcluster/ci/test/tests.yml
+++ b/taskcluster/ci/test/tests.yml
@@ -904,7 +904,7 @@ talos-chrome:
     suite: talos
     talos-try-name: chromez
     treeherder-symbol: tc-T(c)
-    run-on-projects: []
+    run-on-projects: ['mozilla-beta', 'mozilla-aurora', 'mozilla-central', 'mozilla-inbound', 'autoland', 'graphics', 'try']
     max-run-time: 3600
     mozharness:
         script: talos_script.py
@@ -922,7 +922,7 @@ talos-dromaeojs:
     suite: talos
     talos-try-name: dromaeojs
     treeherder-symbol: tc-T(d)
-    run-on-projects: []
+    run-on-projects: ['mozilla-beta', 'mozilla-aurora', 'mozilla-central', 'mozilla-inbound', 'autoland', 'graphics', 'try']
     max-run-time: 3600
     mozharness:
         script: talos_script.py
@@ -940,7 +940,7 @@ talos-g1:
     suite: talos
     talos-try-name: g1
     treeherder-symbol: tc-T(g1)
-    run-on-projects: []
+    run-on-projects: ['mozilla-beta', 'mozilla-aurora', 'mozilla-central', 'mozilla-inbound', 'autoland', 'graphics', 'try']
     max-run-time: 3600
     mozharness:
         script: talos_script.py
@@ -958,7 +958,7 @@ talos-g2:
     suite: talos
     talos-try-name: g2
     treeherder-symbol: tc-T(g2)
-    run-on-projects: []
+    run-on-projects: ['mozilla-beta', 'mozilla-aurora', 'mozilla-central', 'mozilla-inbound', 'autoland', 'graphics', 'try']
     max-run-time: 3600
     mozharness:
         script: talos_script.py
@@ -976,7 +976,7 @@ talos-g3:
     suite: talos
     talos-try-name: g3
     treeherder-symbol: tc-T(g3)
-    run-on-projects: []
+    run-on-projects: ['mozilla-beta', 'mozilla-aurora', 'mozilla-central', 'mozilla-inbound', 'autoland', 'graphics', 'try']
     max-run-time: 3600
     mozharness:
         script: talos_script.py
@@ -994,7 +994,7 @@ talos-g4:
     suite: talos
     talos-try-name: g4
     treeherder-symbol: tc-T(g4)
-    run-on-projects: []
+    run-on-projects: ['mozilla-beta', 'mozilla-aurora', 'mozilla-central', 'mozilla-inbound', 'autoland', 'graphics', 'try']
     max-run-time: 3600
     mozharness:
         script: talos_script.py
@@ -1012,7 +1012,7 @@ talos-other:
     suite: talos
     talos-try-name: other
     treeherder-symbol: tc-T(o)
-    run-on-projects: []
+    run-on-projects: ['mozilla-beta', 'mozilla-aurora', 'mozilla-central', 'mozilla-inbound', 'autoland', 'graphics', 'try']
     max-run-time: 3600
     mozharness:
         script: talos_script.py
@@ -1030,7 +1030,7 @@ talos-svgr:
     suite: talos
     talos-try-name: svgr
     treeherder-symbol: tc-T(s)
-    run-on-projects: []
+    run-on-projects: ['mozilla-beta', 'mozilla-aurora', 'mozilla-central', 'mozilla-inbound', 'autoland', 'graphics', 'try']
     max-run-time: 3600
     mozharness:
         script: talos_script.py
@@ -1048,7 +1048,7 @@ talos-tp5o:
     suite: talos
     talos-try-name: tp5o
     treeherder-symbol: tc-T(tp)
-    run-on-projects: []
+    run-on-projects: ['mozilla-beta', 'mozilla-aurora', 'mozilla-central', 'mozilla-inbound', 'autoland', 'graphics', 'try']
     max-run-time: 3600
     mozharness:
         script: talos_script.py
diff --git a/taskcluster/scripts/builder/build-l10n.sh b/taskcluster/scripts/builder/build-l10n.sh
index be16955a5445..77d97d0e5ff9 100755
--- a/taskcluster/scripts/builder/build-l10n.sh
+++ b/taskcluster/scripts/builder/build-l10n.sh
@@ -35,6 +35,7 @@ fail() {
 export MOZ_CRASHREPORTER_NO_REPORT=1
 export MOZ_OBJDIR=obj-firefox
 export TINDERBOX_OUTPUT=1
+export MOZ_AUTOMATION=1
 
 # Ensure that in tree libraries can be found
 export LIBRARY_PATH=$LIBRARY_PATH:$WORKSPACE/src/obj-firefox:$WORKSPACE/src/gcc/lib64
diff --git a/taskcluster/taskgraph/target_tasks.py b/taskcluster/taskgraph/target_tasks.py
index c5c73a068b2b..38cc822a800a 100644
--- a/taskcluster/taskgraph/target_tasks.py
+++ b/taskcluster/taskgraph/target_tasks.py
@@ -93,8 +93,8 @@ def target_tasks_ash(full_task_graph, parameters):
         # and none of this linux64-asan/debug stuff
         if platform == 'linux64-asan' and task.attributes['build_type'] == 'debug':
             return False
-        # no non-et10s tests
-        if task.attributes.get('unittest_suite') or task.attributes.get('talos_siute'):
+        # no non-e10s tests
+        if task.attributes.get('unittest_suite') or task.attributes.get('talos_suite'):
             if not task.attributes.get('e10s'):
                 return False
         # don't upload symbols
diff --git a/testing/firefox-ui/tests/puppeteer/test_about_window.py b/testing/firefox-ui/tests/puppeteer/test_about_window.py
index c8cf2036d413..c957211bb709 100644
--- a/testing/firefox-ui/tests/puppeteer/test_about_window.py
+++ b/testing/firefox-ui/tests/puppeteer/test_about_window.py
@@ -3,6 +3,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from firefox_puppeteer import PuppeteerMixin
+from firefox_puppeteer.ui.deck import Panel
 from marionette_harness import MarionetteTestCase
 
 
@@ -53,6 +54,10 @@ class TestAboutWindow(PuppeteerMixin, MarionetteTestCase):
         # downloading panel
         self.assertEqual(self.deck.downloading.element.get_property('localName'), 'hbox')
 
+        # check deck attributes
+        self.assertIsInstance(self.deck.selected_index, int)
+        self.assertIsInstance(self.deck.selected_panel, Panel)
+
     def test_open_window(self):
         """Test various opening strategies."""
         def opener(win):
diff --git a/testing/firefox-ui/tests/puppeteer/test_update_wizard.py b/testing/firefox-ui/tests/puppeteer/test_update_wizard.py
index af4f1c969c95..7170ea8e2545 100644
--- a/testing/firefox-ui/tests/puppeteer/test_update_wizard.py
+++ b/testing/firefox-ui/tests/puppeteer/test_update_wizard.py
@@ -3,6 +3,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from firefox_puppeteer import PuppeteerMixin
+from firefox_puppeteer.ui.deck import Panel
 from firefox_puppeteer.ui.update_wizard import UpdateWizardDialog
 from marionette_harness import MarionetteTestCase
 
@@ -60,3 +61,7 @@ class TestUpdateWizard(PuppeteerMixin, MarionetteTestCase):
         # elements of the downloading panel
         self.assertEqual(self.wizard.downloading.progress.get_property('localName'),
                          'progressmeter')
+
+        # check wizard attributes
+        self.assertIsInstance(self.wizard.selected_index, int)
+        self.assertIsInstance(self.wizard.selected_panel, Panel)
diff --git a/testing/instrumentation/moz.build b/testing/instrumentation/moz.build
index 3bab625bcaff..64cdd44269e0 100644
--- a/testing/instrumentation/moz.build
+++ b/testing/instrumentation/moz.build
@@ -7,3 +7,6 @@
 TEST_HARNESS_FILES.instrumentation += [
     'runinstrumentation.py',
 ]
+
+with Files("**"):
+    BUG_COMPONENT = ("Firefox for Android", "Testing")
diff --git a/testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/about_window/deck.py b/testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/about_window/deck.py
index 53c25355dad0..9d8d90603c13 100644
--- a/testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/about_window/deck.py
+++ b/testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/about_window/deck.py
@@ -114,7 +114,7 @@ class Deck(UIBaseLib):
 
         :return: Index of the selected panel.
         """
-        return int(self.element.get_attribute('selectedIndex'))
+        return int(self.element.get_property('selectedIndex'))
 
     @property
     def selected_panel(self):
diff --git a/testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/update_wizard/wizard.py b/testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/update_wizard/wizard.py
index 95ac9cad9bfb..9687ac917812 100644
--- a/testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/update_wizard/wizard.py
+++ b/testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/update_wizard/wizard.py
@@ -207,7 +207,7 @@ class Wizard(UIBaseLib):
 
         :return: Index of the selected panel.
         """
-        return int(self.element.get_attribute('pageIndex'))
+        return int(self.element.get_property('pageIndex'))
 
     @property
     def selected_panel(self):
diff --git a/testing/mochitest/moz.build b/testing/mochitest/moz.build
index dd4cff324903..39bbcce6f6fd 100644
--- a/testing/mochitest/moz.build
+++ b/testing/mochitest/moz.build
@@ -165,3 +165,20 @@ TEST_HARNESS_FILES.testing.mochitest.websocketprocessbridge += [
     '/testing/tools/websocketprocessbridge/websocketprocessbridge_requirements.txt',
 ]
 
+with Files("**"):
+    BUG_COMPONENT = ("Testing", "Mochitest")
+
+with Files("chrome/**"):
+    BUG_COMPONENT = ("Testing", "Mochitest Chrome")
+
+with Files("chrome-harness.js"):
+    BUG_COMPONENT = ("Testing", "Mochitest Chrome")
+
+with Files("BrowserTestUtils/**"):
+    BUG_COMPONENT = ("Testing", "BrowserTest")
+
+with Files("browser*"):
+    BUG_COMPONENT = ("Testing", "BrowserTest")
+
+with Files("tests/browser/**"):
+    BUG_COMPONENT = ("Testing", "BrowserTest")
diff --git a/testing/modules/moz.build b/testing/modules/moz.build
index 4ac70c7f5efd..08e9d663fbd8 100644
--- a/testing/modules/moz.build
+++ b/testing/modules/moz.build
@@ -26,3 +26,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
 
 
 TEST_HARNESS_FILES.testing.mochitest.tests.SimpleTest += ['StructuredLog.jsm']
+
+with Files("**"):
+    BUG_COMPONENT = ("Testing", "General")
+
+with Files("tests/xpcshell/**"):
+    BUG_COMPONENT = ("Testing", "XPCShell Harness")
+
+with Files("tests/browser/**"):
+    BUG_COMPONENT = ("Testing", "BrowserTest")
diff --git a/testing/mozbase/moz.build b/testing/mozbase/moz.build
index da1d401ab975..1515e321559f 100644
--- a/testing/mozbase/moz.build
+++ b/testing/mozbase/moz.build
@@ -47,3 +47,6 @@ TEST_HARNESS_FILES.mozbase += [m + '/**' for m in python_modules]
 TEST_HARNESS_FILES.mozbase += [
     'setup_development.py',
 ]
+
+with Files('**'):
+    BUG_COMPONENT = ('Testing', 'Mozbase')
\ No newline at end of file
diff --git a/testing/mozharness/configs/builds/releng_base_linux_32_builds.py b/testing/mozharness/configs/builds/releng_base_linux_32_builds.py
index 393cf8983e6b..ab7fc2d6b2fa 100644
--- a/testing/mozharness/configs/builds/releng_base_linux_32_builds.py
+++ b/testing/mozharness/configs/builds/releng_base_linux_32_builds.py
@@ -64,7 +64,7 @@ config = {
     'tooltool_script': ["/builds/tooltool.py"],
     'tooltool_bootstrap': "setup.sh",
     'enable_count_ctors': True,
-    'enable_talos_sendchange': True,
+    'enable_talos_sendchange': False,
     'enable_unittest_sendchange': True,
     #########################################################################
 
diff --git a/testing/mozharness/configs/builds/releng_base_linux_64_builds.py b/testing/mozharness/configs/builds/releng_base_linux_64_builds.py
index fe04b73b5bb5..ae549478931e 100644
--- a/testing/mozharness/configs/builds/releng_base_linux_64_builds.py
+++ b/testing/mozharness/configs/builds/releng_base_linux_64_builds.py
@@ -63,7 +63,7 @@ config = {
     'tooltool_script': ["/builds/tooltool.py"],
     'tooltool_bootstrap': "setup.sh",
     'enable_count_ctors': True,
-    'enable_talos_sendchange': True,
+    'enable_talos_sendchange': False,
     'enable_unittest_sendchange': True,
     #########################################################################
 
diff --git a/testing/profiles/moz.build b/testing/profiles/moz.build
index 2238cb4425de..5c291437b4f8 100644
--- a/testing/profiles/moz.build
+++ b/testing/profiles/moz.build
@@ -10,3 +10,6 @@ mochitest_profile_files = [
 
 TEST_HARNESS_FILES.testing.mochitest.profile_data += mochitest_profile_files
 TEST_HARNESS_FILES['web-platform'].prefs += mochitest_profile_files
+
+with Files("**"):
+    BUG_COMPONENT = ("Testing", "Mochitest")
diff --git a/testing/runtimes/moz.build b/testing/runtimes/moz.build
index cee5884e7009..15171b52bf33 100644
--- a/testing/runtimes/moz.build
+++ b/testing/runtimes/moz.build
@@ -7,3 +7,6 @@
 TEST_HARNESS_FILES.testing.mochitest.runtimes += [
     '**/mochitest-*.runtimes.json',
 ]
+
+with Files("**"):
+    BUG_COMPONENT = ("Testing", "Mochitest")
\ No newline at end of file
diff --git a/testing/specialpowers/content/SpecialPowersObserverAPI.js b/testing/specialpowers/content/SpecialPowersObserverAPI.js
index d3137a42d45c..9d2f194a19f7 100644
--- a/testing/specialpowers/content/SpecialPowersObserverAPI.js
+++ b/testing/specialpowers/content/SpecialPowersObserverAPI.js
@@ -544,17 +544,13 @@ SpecialPowersObserverAPI.prototype = {
       }
 
       case "SPStartupExtension": {
-        let {ExtensionData, Management} = Components.utils.import("resource://gre/modules/Extension.jsm", {});
+        let {ExtensionData} = Components.utils.import("resource://gre/modules/Extension.jsm", {});
 
         let id = aMessage.data.id;
         let extension = this._extensions.get(id);
-        let startupListener = (msg, ext) => {
-          if (ext == extension) {
-            this._sendReply(aMessage, "SPExtensionMessage", {id, type: "extensionSetId", args: [extension.id]});
-            Management.off("startup", startupListener);
-          }
-        };
-        Management.on("startup", startupListener);
+        extension.on("startup", () => {
+          this._sendReply(aMessage, "SPExtensionMessage", {id, type: "extensionSetId", args: [extension.id]});
+        });
 
         // Make sure the extension passes the packaging checks when
         // they're run on a bare archive rather than a running instance,
@@ -579,7 +575,6 @@ SpecialPowersObserverAPI.prototype = {
           this._sendReply(aMessage, "SPExtensionMessage", {id, type: "extensionStarted", args: []});
         }).catch(e => {
           dump(`Extension startup failed: ${e}\n${e.stack}`);
-          Management.off("startup", startupListener);
           this._sendReply(aMessage, "SPExtensionMessage", {id, type: "extensionFailed", args: []});
         });
         return undefined;
diff --git a/testing/web-platform/meta/encrypted-media/clearkey-mp4-requestmediakeysystemaccess.html.ini b/testing/web-platform/meta/encrypted-media/clearkey-mp4-requestmediakeysystemaccess.html.ini
index 01503c6147d1..acbc7b7a7e26 100644
--- a/testing/web-platform/meta/encrypted-media/clearkey-mp4-requestmediakeysystemaccess.html.ini
+++ b/testing/web-platform/meta/encrypted-media/clearkey-mp4-requestmediakeysystemaccess.html.ini
@@ -90,10 +90,3 @@
       if debug and not e10s and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
       if debug and e10s and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
       if not debug and not e10s and (os == "win") and (version == "5.1.2600") and (processor == "x86") and (bits == 32): FAIL
-
-  [org.w3.clearkey, requestMediaKeySystemAccess: Empty Key System () should result in InvalidAccessError]
-    expected: FAIL
-
-  [org.w3.clearkey, requestMediaKeySystemAccess: Empty supportedConfigurations should result in InvalidAccessError]
-    expected: FAIL
-
diff --git a/testing/web-platform/moz.build b/testing/web-platform/moz.build
index 0bd0a32bb69f..5525327efc82 100644
--- a/testing/web-platform/moz.build
+++ b/testing/web-platform/moz.build
@@ -21,3 +21,18 @@ TEST_HARNESS_FILES['web-platform'].certs = [
     'certs/web-platform.test.key',
     'certs/web-platform.test.pem',
 ]
+
+with Files("update/**"):
+    BUG_COMPONENT = ("Testing", "web-platform-tests")
+
+with Files("harness/**"):
+    BUG_COMPONENT = ("Testing", "web-platform-tests")
+
+with Files("certs/**"):
+    BUG_COMPONENT = ("Testing", "web-platform-tests")
+
+with Files("mach*"):
+    BUG_COMPONENT = ("Testing", "web-platform-tests")
+
+with Files("*.py"):
+    BUG_COMPONENT = ("Testing", "web-platform-tests")
diff --git a/testing/web-platform/tests/cssom-view/elementFromPoint.html b/testing/web-platform/tests/cssom-view/elementFromPoint.html
index 3ae4a9dbfe05..9df05d20b5ac 100644
--- a/testing/web-platform/tests/cssom-view/elementFromPoint.html
+++ b/testing/web-platform/tests/cssom-view/elementFromPoint.html
@@ -52,6 +52,21 @@
   area 1
   area 2
   area 3
+  
+  
+
+
+
+ + +
+
diff --git a/testing/xpcshell/moz.build b/testing/xpcshell/moz.build index 03d2f95553d2..d30bc63b3700 100644 --- a/testing/xpcshell/moz.build +++ b/testing/xpcshell/moz.build @@ -13,3 +13,6 @@ PYTHON_UNITTEST_MANIFESTS += [ TESTING_JS_MODULES += [ 'dbg-actors.js', ] + +with Files("**"): + BUG_COMPONENT = ("Testing", "XPCShell Harness") \ No newline at end of file diff --git a/toolkit/.eslintrc.js b/toolkit/.eslintrc.js index c79d8702d966..5eec2b565574 100644 --- a/toolkit/.eslintrc.js +++ b/toolkit/.eslintrc.js @@ -163,6 +163,9 @@ module.exports = { // No using with "no-with": "error", + // Require object-literal shorthand with ES6 method syntax + "object-shorthand": ["error", "always", { "avoidQuotes": true }], + // No spacing inside rest or spread expressions "rest-spread-spacing": "error", diff --git a/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js b/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js index 4cbd141f7662..091a8a6750db 100644 --- a/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js +++ b/toolkit/components/aboutcheckerboard/content/aboutCheckerboard.js @@ -114,7 +114,7 @@ function loadData() { if (destIndex == 0) { // create the initial frame renderData.push({ - timestamp: timestamp, + timestamp, rects: {}, }); } else if (renderData[destIndex - 1].timestamp == timestamp) { diff --git a/toolkit/components/aboutmemory/content/aboutMemory.js b/toolkit/components/aboutmemory/content/aboutMemory.js index c62416dc5427..7856aa9feb57 100644 --- a/toolkit/components/aboutmemory/content/aboutMemory.js +++ b/toolkit/components/aboutmemory/content/aboutMemory.js @@ -498,7 +498,7 @@ function dumpGCLogAndCCLog(aVerbose) dumper.dumpGCAndCCLogsToFile("", aVerbose, /* dumpChildProcesses = */ true, { onDump: displayInfo, - onFinish: function() { + onFinish() { inProgress.remove(); } }); @@ -657,12 +657,12 @@ function loadMemoryReportsFromFile(aFilename, aTitleNote, aFn) let converter = new nsGzipConverter(); converter.asyncConvertData("gzip", "uncompressed", { data: [], - onStartRequest: function(aR, aC) {}, - onDataAvailable: function(aR, aC, aStream, aO, aCount) { + onStartRequest(aR, aC) {}, + onDataAvailable(aR, aC, aStream, aO, aCount) { let bi = new nsBinaryStream(aStream); this.data.push(bi.readBytes(aCount)); }, - onStopRequest: function(aR, aC, aStatusCode) { + onStopRequest(aR, aC, aStatusCode) { try { if (!Components.isSuccessCode(aStatusCode)) { throw new Components.Exception("Error while reading gzip file", aStatusCode); @@ -746,7 +746,7 @@ function DReport(aKind, aUnits, aAmount, aDescription, aNMerged, aPresence) } DReport.prototype = { - assertCompatible: function(aKind, aUnits) + assertCompatible(aKind, aUnits) { assert(this._kind == aKind, "Mismatched kinds"); assert(this._units == aUnits, "Mismatched units"); @@ -767,13 +767,13 @@ DReport.prototype = { // the descriptions to differ seems reasonable.) }, - merge: function(aJr) { + merge(aJr) { this.assertCompatible(aJr.kind, aJr.units); this._amount += aJr.amount; this._nMerged++; }, - toJSON: function(aProcess, aPath, aAmount) { + toJSON(aProcess, aPath, aAmount) { return { process: aProcess, path: aPath, @@ -1126,7 +1126,7 @@ function TreeNode(aUnsafeName, aUnits, aIsDegenerate) } TreeNode.prototype = { - findKid: function(aUnsafeName) { + findKid(aUnsafeName) { if (this._kids) { for (let i = 0; i < this._kids.length; i++) { if (this._kids[i]._unsafeName === aUnsafeName) { @@ -1143,7 +1143,7 @@ TreeNode.prototype = { // things. So for a non-leaf node, instead of just looking at _amount, we // instead look at the maximum absolute value of the node and all of its // descendants. - maxAbsDescendant: function() { + maxAbsDescendant() { if (!this._kids) { // No kids? Just return the absolute value of the amount. return Math.abs(this._amount); @@ -1163,7 +1163,7 @@ TreeNode.prototype = { return max; }, - toString: function() { + toString() { switch (this._units) { case UNITS_BYTES: return formatBytes(this._amount); case UNITS_COUNT: diff --git a/toolkit/components/aboutperformance/content/aboutPerformance.js b/toolkit/components/aboutperformance/content/aboutPerformance.js index 862d3cf0e249..f1b04df719df 100644 --- a/toolkit/components/aboutperformance/content/aboutPerformance.js +++ b/toolkit/components/aboutperformance/content/aboutPerformance.js @@ -72,7 +72,7 @@ const MODE_GLOBAL = "global"; const MODE_RECENT = "recent"; let tabFinder = { - update: function() { + update() { this._map = new Map(); let windows = Services.wm.getEnumerator("navigator:browser"); while (windows.hasMoreElements()) { @@ -97,7 +97,7 @@ let tabFinder = { * @return {{tabbrowser: , tab: }} The * tabbrowser and tab if the latter could be found. */ - get: function(id) { + get(id) { let browser = this._map.get(id); if (!browser) { return null; @@ -106,7 +106,7 @@ let tabFinder = { return {tabbrowser, tab:tabbrowser.getTabForBrowser(browser)}; }, - getAny: function(ids) { + getAny(ids) { for (let id of ids) { let result = this.get(id); if (result) { @@ -258,7 +258,7 @@ Delta.prototype = { /** * Initialize, asynchronously. */ - promiseInit: function() { + promiseInit() { if (this.kind == "webpages") { return this._initWebpage(); } else if (this.kind == "addons") { @@ -266,7 +266,7 @@ Delta.prototype = { } throw new TypeError(); }, - _initWebpage: function() { + _initWebpage() { this._initialized = true; let found = tabFinder.getAny(this.diff.windowIds); if (!found || found.tab.linkedBrowser.contentTitle == null) { @@ -296,7 +296,7 @@ Delta.prototype = { this._show = found; this.fullName = this.diff.addonId; }), - toString: function() { + toString() { return `[Delta] ${this.diff.key} => ${this.readableName}, ${this.fullName}`; } }; @@ -444,14 +444,14 @@ var State = { /** * @return {Promise} */ - promiseDeltaSinceStartOfTime: function() { + promiseDeltaSinceStartOfTime() { return this._promiseDeltaSince(this._oldest); }, /** * @return {Promise} */ - promiseDeltaSinceStartOfBuffer: function() { + promiseDeltaSinceStartOfBuffer() { return this._promiseDeltaSince(this._buffer[0]); }, @@ -528,10 +528,10 @@ var View = { * @return {null} If the `deltaKey` doesn't have a component cached yet. * Otherwise, the value stored with `set`. */ - get: function(deltaKey) { + get(deltaKey) { return this._map.get(deltaKey); }, - set: function(deltaKey, value) { + set(deltaKey, value) { this._map.set(deltaKey, value); }, /** @@ -539,7 +539,7 @@ var View = { * * @param {Set} set a set of deltaKey. */ - trimTo: function(set) { + trimTo(set) { let remove = []; for (let key of this._map.keys()) { if (!set.has(key)) { @@ -560,7 +560,7 @@ var View = { * @param {string} nature The nature of the subset. One of "addons", "webpages" or "system". * @param {string} currentMode The current display mode. One of MODE_GLOBAL or MODE_RECENT. */ - updateCategory: function(subset, id, nature, currentMode) { + updateCategory(subset, id, nature, currentMode) { subset = subset.slice().sort(Delta.revCompare); let watcherAlerts = null; @@ -657,7 +657,7 @@ var View = { this._insertElements(toAdd, id); }, - _insertElements: function(elements, id) { + _insertElements(elements, id) { let eltContainer = document.getElementById(id); eltContainer.classList.remove("measuring"); eltContainer.eltVisibleContent.innerHTML = ""; @@ -681,7 +681,7 @@ var View = { eltContainer.textContent = "Nothing"; } }, - _setupStructure: function(id) { + _setupStructure(id) { let eltContainer = document.getElementById(id); if (!eltContainer.eltVisibleContent) { eltContainer.eltVisibleContent = document.createElement("ul"); @@ -712,7 +712,7 @@ var View = { return eltContainer; }, - _grabOrCreateElements: function(delta, nature) { + _grabOrCreateElements(delta, nature) { let cachedElements = this.DOMCache.get(delta.key); if (cachedElements) { if (cachedElements.eltRoot.parentElement) { @@ -857,7 +857,7 @@ var View = { }; var Control = { - init: function() { + init() { this._initAutorefresh(); this._initDisplayMode(); }, @@ -886,7 +886,7 @@ var Control = { // Inform watchers Services.obs.notifyObservers(null, UPDATE_COMPLETE_TOPIC, mode); }), - _setOptions: function(options) { + _setOptions(options) { dump(`about:performance _setOptions ${JSON.stringify(options)}\n`); let eltRefresh = document.getElementById("check-autorefresh"); if ((options.autoRefresh > 0) != eltRefresh.checked) { @@ -897,7 +897,7 @@ var Control = { eltCheckRecent.click(); } }, - _initAutorefresh: function() { + _initAutorefresh() { let onRefreshChange = (shouldUpdateNow = false) => { if (eltRefresh.checked == !!this._autoRefreshInterval) { // Nothing to change. @@ -920,7 +920,7 @@ var Control = { onRefreshChange(false); }, _autoRefreshInterval: null, - _initDisplayMode: function() { + _initDisplayMode() { let onModeChange = (shouldUpdateNow) => { if (eltCheckRecent.checked) { this._displayMode = MODE_RECENT; @@ -956,7 +956,7 @@ var SubprocessMonitor = { * Init will start the process of updating the table if the page is not hidden, * and set up an event listener for handling visibility changes. */ - init: function() { + init() { if (!document.hidden) { SubprocessMonitor.updateTable(); } @@ -967,7 +967,7 @@ var SubprocessMonitor = { * This function updates the table after an interval if the page is visible * and clears the interval otherwise. */ - handleVisibilityChange: function() { + handleVisibilityChange() { if (!document.hidden) { SubprocessMonitor.queueUpdate(); } else { @@ -980,7 +980,7 @@ var SubprocessMonitor = { * This function queues a timer to request the next summary using updateTable * after some delay. */ - queueUpdate: function() { + queueUpdate() { this._timeout = setTimeout(() => this.updateTable(), UPDATE_INTERVAL_MS); }, @@ -990,7 +990,7 @@ var SubprocessMonitor = { * @param {object} summaries The object with the updated RSS and USS values. * @param {string} pid The pid represented by the row for which we update. */ - updateRow: function(row, summaries, pid) { + updateRow(row, summaries, pid) { row.cells[0].textContent = pid; let RSSval = DownloadUtils.convertByteUnits(summaries[pid].rss); row.cells[1].textContent = RSSval.join(" "); @@ -1002,7 +1002,7 @@ var SubprocessMonitor = { * This function adds a row to the subprocess-performance table for every new pid * and populates and regularly updates it with RSS/USS measurements. */ - updateTable: function() { + updateTable() { if (!document.hidden) { Memory.summary().then((summaries) => { if (!(Object.keys(summaries).length)) { diff --git a/toolkit/components/addoncompat/CompatWarning.jsm b/toolkit/components/addoncompat/CompatWarning.jsm index b32409a46b6b..2e9fd5ad6be7 100644 --- a/toolkit/components/addoncompat/CompatWarning.jsm +++ b/toolkit/components/addoncompat/CompatWarning.jsm @@ -27,7 +27,7 @@ var CompatWarning = { // might only want to warn about it if the listener actually // fires. However, we want the warning to show a stack for the // registration site. - delayedWarning: function(msg, addon, warning) { + delayedWarning(msg, addon, warning) { function isShimLayer(filename) { return filename.indexOf("CompatWarning.jsm") != -1 || filename.indexOf("RemoteAddonsParent.jsm") != -1 || @@ -86,7 +86,7 @@ var CompatWarning = { }; }, - warn: function(msg, addon, warning) { + warn(msg, addon, warning) { let delayed = this.delayedWarning(msg, addon, warning); delayed(); }, diff --git a/toolkit/components/addoncompat/Prefetcher.jsm b/toolkit/components/addoncompat/Prefetcher.jsm index 2d836690cc23..3dd59e1f1609 100644 --- a/toolkit/components/addoncompat/Prefetcher.jsm +++ b/toolkit/components/addoncompat/Prefetcher.jsm @@ -314,7 +314,7 @@ function Database(trigger, addons) Database.prototype = { // Add an object to a table. - add: function(table, obj) { + add(table, obj) { if (!this.tables.has(table)) { this.tables.set(table, new Set()); } @@ -327,13 +327,13 @@ Database.prototype = { this.todo.push([table, obj]); }, - cache: function(...args) { + cache(...args) { this.cached.push(args); }, // Run a fixed-point iteration that adds objects to table based on // this.rules until there are no more objects to add. - process: function() { + process() { while (this.todo.length) { let [table, obj] = this.todo.pop(); let rules = this.rules.get(table); @@ -348,7 +348,7 @@ Database.prototype = { }; var Prefetcher = { - init: function() { + init() { // Give an index to each rule and store it in this.ruleMap based // on the index. The index is used to serialize and deserialize // data from content to chrome. @@ -368,7 +368,7 @@ var Prefetcher = { Services.obs.addObserver(this, "xpcom-shutdown", false); }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { if (topic == "xpcom-shutdown") { Services.prefs.removeObserver(PREF_PREFETCHING_ENABLED, this); Services.obs.removeObserver(this, "xpcom-shutdown"); @@ -381,7 +381,7 @@ var Prefetcher = { // described by the trigger string. |addons| is a list of addons // that have listeners installed for the event. |args| is // event-specific data (such as the event object). - prefetch: function(trigger, addons, args) { + prefetch(trigger, addons, args) { if (!this.prefetchingEnabled) { return [[], []]; } @@ -425,7 +425,7 @@ var Prefetcher = { // Generate a two-level mapping based on cached data received from // the content process. - generateCache: function(prefetched, cpows) { + generateCache(prefetched, cpows) { let cache = new Map(); for (let item of prefetched) { // Replace anything of the form {cpow: } with the actual @@ -446,7 +446,7 @@ var Prefetcher = { // Run |func|, using the prefetched data in |prefetched| and |cpows| // as a cache. - withPrefetching: function(prefetched, cpows, func) { + withPrefetching(prefetched, cpows, func) { if (!this.prefetchingEnabled) { return func(); } @@ -466,7 +466,7 @@ var Prefetcher = { // Called by shim code in the chrome process to check if target.prop // is cached. - lookupInCache: function(addon, target, prop) { + lookupInCache(addon, target, prop) { if (!this.cache || !Cu.isCrossProcessWrapper(target)) { return null; } diff --git a/toolkit/components/addoncompat/RemoteAddonsChild.jsm b/toolkit/components/addoncompat/RemoteAddonsChild.jsm index 1aacc7f7abf3..9e430a44e90e 100644 --- a/toolkit/components/addoncompat/RemoteAddonsChild.jsm +++ b/toolkit/components/addoncompat/RemoteAddonsChild.jsm @@ -45,7 +45,7 @@ function setDefault(dict, key, default_) // In the child, clients can watch for changes to all paths that start // with a given component. var NotificationTracker = { - init: function() { + init() { let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"] .getService(Ci.nsISyncMessageSender); cpmm.addMessageListener("Addons:ChangeNotification", this); @@ -54,7 +54,7 @@ var NotificationTracker = { this._watchers = {}; }, - receiveMessage: function(msg) { + receiveMessage(msg) { let path = msg.data.path; let count = msg.data.count; @@ -72,7 +72,7 @@ var NotificationTracker = { } }, - runCallback: function(watcher, path, count) { + runCallback(watcher, path, count) { let pathString = path.join("/"); let registeredSet = this._registered.get(watcher); let registered = registeredSet.has(pathString); @@ -85,7 +85,7 @@ var NotificationTracker = { } }, - findPaths: function(prefix) { + findPaths(prefix) { if (!this._paths) { return []; } @@ -117,12 +117,12 @@ var NotificationTracker = { return result; }, - findSuffixes: function(prefix) { + findSuffixes(prefix) { let paths = this.findPaths(prefix); return paths.map(([path, count]) => path[path.length - 1]); }, - watch: function(component1, watcher) { + watch(component1, watcher) { setDefault(this._watchers, component1, []).push(watcher); this._registered.set(watcher, new Set()); @@ -132,7 +132,7 @@ var NotificationTracker = { } }, - unwatch: function(component1, watcher) { + unwatch(component1, watcher) { let watchers = this._watchers[component1]; let index = watchers.lastIndexOf(watcher); if (index > -1) { @@ -156,7 +156,7 @@ var ContentPolicyChild = { _classID: Components.ID("6e869130-635c-11e2-bcfd-0800200c9a66"), _contractID: "@mozilla.org/addon-child/policy;1", - init: function() { + init() { let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar); registrar.registerFactory(this._classID, this._classDescription, this._contractID, this); @@ -167,7 +167,7 @@ var ContentPolicyChild = { Ci.nsIChannelEventSink, Ci.nsIFactory, Ci.nsISupportsWeakReference]), - track: function(path, register) { + track(path, register) { let catMan = Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager); if (register) { catMan.addCategoryEntry("content-policy", this._contractID, this._contractID, false, true); @@ -176,7 +176,7 @@ var ContentPolicyChild = { } }, - shouldLoad: function(contentType, contentLocation, requestOrigin, + shouldLoad(contentType, contentLocation, requestOrigin, node, mimeTypeGuess, extra, requestPrincipal) { let addons = NotificationTracker.findSuffixes(["content-policy"]); let [prefetched, cpows] = Prefetcher.prefetch("ContentPolicy.shouldLoad", @@ -186,12 +186,12 @@ var ContentPolicyChild = { let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"] .getService(Ci.nsISyncMessageSender); let rval = cpmm.sendRpcMessage("Addons:ContentPolicy:Run", { - contentType: contentType, + contentType, contentLocation: contentLocation.spec, requestOrigin: requestOrigin ? requestOrigin.spec : null, - mimeTypeGuess: mimeTypeGuess, - requestPrincipal: requestPrincipal, - prefetched: prefetched, + mimeTypeGuess, + requestPrincipal, + prefetched, }, cpows); if (rval.length != 1) { return Ci.nsIContentPolicy.ACCEPT; @@ -200,11 +200,11 @@ var ContentPolicyChild = { return rval[0]; }, - shouldProcess: function(contentType, contentLocation, requestOrigin, insecNode, mimeType, extra) { + shouldProcess(contentType, contentLocation, requestOrigin, insecNode, mimeType, extra) { return Ci.nsIContentPolicy.ACCEPT; }, - createInstance: function(outer, iid) { + createInstance(outer, iid) { if (outer) { throw Cr.NS_ERROR_NO_AGGREGATION; } @@ -235,7 +235,7 @@ AboutProtocolChannel.prototype = { name: null, status: Cr.NS_OK, - asyncOpen: function(listener, context) { + asyncOpen(listener, context) { // Ask the parent to synchronously read all the data from the channel. let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"] .getService(Ci.nsISyncMessageSender); @@ -277,33 +277,33 @@ AboutProtocolChannel.prototype = { Services.tm.currentThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL); }, - asyncOpen2: function(listener) { + asyncOpen2(listener) { // throws an error if security checks fail var outListener = contentSecManager.performSecurityCheck(this, listener); this.asyncOpen(outListener, null); }, - open: function() { + open() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, - open2: function() { + open2() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, - isPending: function() { + isPending() { return false; }, - cancel: function() { + cancel() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, - suspend: function() { + suspend() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, - resume: function() { + resume() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, @@ -318,7 +318,7 @@ function AboutProtocolInstance(contractID) } AboutProtocolInstance.prototype = { - createInstance: function(outer, iid) { + createInstance(outer, iid) { if (outer != null) { throw Cr.NS_ERROR_NO_AGGREGATION; } @@ -326,7 +326,7 @@ AboutProtocolInstance.prototype = { return this.QueryInterface(iid); }, - getURIFlags: function(uri) { + getURIFlags(uri) { // Cache the result to avoid the extra IPC. if (this._uriFlags !== undefined) { return this._uriFlags; @@ -354,7 +354,7 @@ AboutProtocolInstance.prototype = { // available to CPOWs. Consequently, we return a shim channel that, // when opened, asks the parent to open the channel and read out all // the data. - newChannel: function(uri, loadInfo) { + newChannel(uri, loadInfo) { return new AboutProtocolChannel(uri, this._contractID, loadInfo); }, @@ -364,7 +364,7 @@ AboutProtocolInstance.prototype = { var AboutProtocolChild = { _classDescription: "Addon shim about: protocol handler", - init: function() { + init() { // Maps contractIDs to instances this._instances = new Map(); // Maps contractIDs to classIDs @@ -372,7 +372,7 @@ var AboutProtocolChild = { NotificationTracker.watch("about-protocol", this); }, - track: function(path, register) { + track(path, register) { let contractID = path[1]; let registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar); if (register) { @@ -397,11 +397,11 @@ var AboutProtocolChild = { // This code registers observers in the child whenever an add-on in // the parent asks for notifications on the given topic. var ObserverChild = { - init: function() { + init() { NotificationTracker.watch("observer", this); }, - track: function(path, register) { + track(path, register) { let topic = path[1]; if (register) { Services.obs.addObserver(this, topic, false); @@ -410,13 +410,13 @@ var ObserverChild = { } }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { let cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"] .getService(Ci.nsISyncMessageSender); cpmm.sendRpcMessage("Addons:Observer:Run", {}, { - topic: topic, - subject: subject, - data: data + topic, + subject, + data }); } }; @@ -433,11 +433,11 @@ function EventTargetChild(childGlobal) } EventTargetChild.prototype = { - uninit: function() { + uninit() { NotificationTracker.unwatch("event", this); }, - track: function(path, register) { + track(path, register) { let eventType = path[1]; let useCapture = path[2]; let listener = useCapture ? this.capturingHandler : this.nonCapturingHandler; @@ -448,7 +448,7 @@ EventTargetChild.prototype = { } }, - handleEvent: function(capturing, event) { + handleEvent(capturing, event) { let addons = NotificationTracker.findSuffixes(["event", event.type, capturing]); let [prefetched, cpows] = Prefetcher.prefetch("EventTarget.handleEvent", addons, @@ -459,9 +459,9 @@ EventTargetChild.prototype = { this._childGlobal.sendRpcMessage("Addons:Event:Run", {type: event.type, - capturing: capturing, + capturing, isTrusted: event.isTrusted, - prefetched: prefetched}, + prefetched}, cpows); } }; @@ -481,34 +481,34 @@ function SandboxChild(chromeGlobal) } SandboxChild.prototype = { - uninit: function() { + uninit() { this.clearSandboxes(); }, - addListener: function() { + addListener() { let webProgress = this.chromeGlobal.docShell.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebProgress); webProgress.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_LOCATION); }, - removeListener: function() { + removeListener() { let webProgress = this.chromeGlobal.docShell.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebProgress); webProgress.removeProgressListener(this); }, - onLocationChange: function(webProgress, request, location, flags) { + onLocationChange(webProgress, request, location, flags) { this.clearSandboxes(); }, - addSandbox: function(sandbox) { + addSandbox(sandbox) { if (this.sandboxes.length == 0) { this.addListener(); } this.sandboxes.push(sandbox); }, - clearSandboxes: function() { + clearSandboxes() { if (this.sandboxes.length) { this.removeListener(); } @@ -522,7 +522,7 @@ SandboxChild.prototype = { var RemoteAddonsChild = { _ready: false, - makeReady: function() { + makeReady() { let shims = [ Prefetcher, NotificationTracker, @@ -540,7 +540,7 @@ var RemoteAddonsChild = { } }, - init: function(global) { + init(global) { if (!this._ready) { if (!Services.cpmm.initialProcessData.remoteAddonsParentInitted) { @@ -551,7 +551,7 @@ var RemoteAddonsChild = { this._ready = true; } - global.sendAsyncMessage("Addons:RegisterGlobal", {}, {global: global}); + global.sendAsyncMessage("Addons:RegisterGlobal", {}, {global}); let sandboxChild = new SandboxChild(global); global.addSandbox = sandboxChild.addSandbox.bind(sandboxChild); @@ -560,7 +560,7 @@ var RemoteAddonsChild = { return [new EventTargetChild(global), sandboxChild]; }, - uninit: function(perTabShims) { + uninit(perTabShims) { for (let shim of perTabShims) { try { shim.uninit(); diff --git a/toolkit/components/addoncompat/RemoteAddonsParent.jsm b/toolkit/components/addoncompat/RemoteAddonsParent.jsm index ec2d49758ccf..5f409a832896 100644 --- a/toolkit/components/addoncompat/RemoteAddonsParent.jsm +++ b/toolkit/components/addoncompat/RemoteAddonsParent.jsm @@ -50,13 +50,13 @@ var NotificationTracker = { // given path are present in _paths. _paths: {}, - init: function() { + init() { let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIMessageBroadcaster); ppmm.initialProcessData.remoteAddonsNotificationPaths = this._paths; }, - add: function(path) { + add(path) { let tracked = this._paths; for (let component of path) { tracked = setDefault(tracked, component, {}); @@ -67,10 +67,10 @@ var NotificationTracker = { let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIMessageBroadcaster); - ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path: path, count: count}); + ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path, count}); }, - remove: function(path) { + remove(path) { let tracked = this._paths; for (let component of path) { tracked = setDefault(tracked, component, {}); @@ -79,7 +79,7 @@ var NotificationTracker = { let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIMessageBroadcaster); - ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path: path, count: tracked._count}); + ppmm.broadcastAsyncMessage("Addons:ChangeNotification", {path, count: tracked._count}); }, }; NotificationTracker.init(); @@ -106,7 +106,7 @@ function Interposition(name, base) // content policy is added or removed. It also runs all the registered // add-on content policies when the child asks it to do so. var ContentPolicyParent = { - init: function() { + init() { let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIMessageBroadcaster); ppmm.addMessageListener("Addons:ContentPolicy:Run", this); @@ -114,17 +114,17 @@ var ContentPolicyParent = { this._policies = new Map(); }, - addContentPolicy: function(addon, name, cid) { + addContentPolicy(addon, name, cid) { this._policies.set(name, cid); NotificationTracker.add(["content-policy", addon]); }, - removeContentPolicy: function(addon, name) { + removeContentPolicy(addon, name) { this._policies.delete(name); NotificationTracker.remove(["content-policy", addon]); }, - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { switch (aMessage.name) { case "Addons:ContentPolicy:Run": return this.shouldLoad(aMessage.data, aMessage.objects); @@ -132,7 +132,7 @@ var ContentPolicyParent = { return undefined; }, - shouldLoad: function(aData, aObjects) { + shouldLoad(aData, aObjects) { for (let policyCID of this._policies.values()) { let policy; try { @@ -196,7 +196,7 @@ CategoryManagerInterposition.methods.deleteCategoryEntry = // protocol handler in the parent and we want the child to be able to // use it. This code is pretty specific to Adblock's usage. var AboutProtocolParent = { - init: function() { + init() { let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIMessageBroadcaster); ppmm.addMessageListener("Addons:AboutProtocol:GetURIFlags", this); @@ -204,12 +204,12 @@ var AboutProtocolParent = { this._protocols = []; }, - registerFactory: function(addon, class_, className, contractID, factory) { - this._protocols.push({contractID: contractID, factory: factory}); + registerFactory(addon, class_, className, contractID, factory) { + this._protocols.push({contractID, factory}); NotificationTracker.add(["about-protocol", contractID, addon]); }, - unregisterFactory: function(addon, class_, factory) { + unregisterFactory(addon, class_, factory) { for (let i = 0; i < this._protocols.length; i++) { if (this._protocols[i].factory == factory) { NotificationTracker.remove(["about-protocol", this._protocols[i].contractID, addon]); @@ -219,7 +219,7 @@ var AboutProtocolParent = { } }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "Addons:AboutProtocol:GetURIFlags": return this.getURIFlags(msg); @@ -229,7 +229,7 @@ var AboutProtocolParent = { return undefined; }, - getURIFlags: function(msg) { + getURIFlags(msg) { let uri = BrowserUtils.makeURI(msg.data.uri); let contractID = msg.data.contractID; let module = Cc[contractID].getService(Ci.nsIAboutModule); @@ -243,10 +243,10 @@ var AboutProtocolParent = { // We immediately read all the data out of the channel here and // return it to the child. - openChannel: function(msg) { + openChannel(msg) { function wrapGetInterface(cpow) { return { - getInterface: function(intf) { return cpow.getInterface(intf); } + getInterface(intf) { return cpow.getInterface(intf); } }; } @@ -292,7 +292,7 @@ var AboutProtocolParent = { let stream = channel.open2(); let data = NetUtil.readInputStreamToString(stream, stream.available(), {}); return { - data: data, + data, contentType: channel.contentType }; } catch (e) { @@ -334,23 +334,23 @@ ComponentRegistrarInterposition.methods.unregisterFactory = // in the parent because there might be non-add-on T observers that // won't expect to get notified in this case. var ObserverParent = { - init: function() { + init() { let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIMessageBroadcaster); ppmm.addMessageListener("Addons:Observer:Run", this); }, - addObserver: function(addon, observer, topic, ownsWeak) { + addObserver(addon, observer, topic, ownsWeak) { Services.obs.addObserver(observer, "e10s-" + topic, ownsWeak); NotificationTracker.add(["observer", topic, addon]); }, - removeObserver: function(addon, observer, topic) { + removeObserver(addon, observer, topic) { Services.obs.removeObserver(observer, "e10s-" + topic); NotificationTracker.remove(["observer", topic, addon]); }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "Addons:Observer:Run": this.notify(msg.objects.subject, msg.objects.topic, msg.objects.data); @@ -358,7 +358,7 @@ var ObserverParent = { } }, - notify: function(subject, topic, data) { + notify(subject, topic, data) { let e = Services.obs.enumerateObservers("e10s-" + topic); while (e.hasMoreElements()) { let obs = e.getNext().QueryInterface(Ci.nsIObserver); @@ -410,7 +410,7 @@ ObserverInterposition.methods.removeObserver = // This object is responsible for forwarding events from the child to // the parent. var EventTargetParent = { - init: function() { + init() { // The _listeners map goes from targets (either elements // or windows) to a dictionary from event types to listeners. this._listeners = new WeakMap(); @@ -426,7 +426,7 @@ var EventTargetParent = { // (the or elements), then we return the // . If it's some generic element, then we return the // window itself. - redirectEventTarget: function(target) { + redirectEventTarget(target) { if (Cu.isCrossProcessWrapper(target)) { return null; } @@ -456,12 +456,12 @@ var EventTargetParent = { // When a given event fires in the child, we fire it on the // element and the window since those are the two possible // results of redirectEventTarget. - getTargets: function(browser) { + getTargets(browser) { let window = browser.ownerDocument.defaultView; return [browser, window]; }, - addEventListener: function(addon, target, type, listener, useCapture, wantsUntrusted, delayedWarning) { + addEventListener(addon, target, type, listener, useCapture, wantsUntrusted, delayedWarning) { let newTarget = this.redirectEventTarget(target); if (!newTarget) { return; @@ -489,14 +489,14 @@ var EventTargetParent = { } } - forType.push({listener: listener, - target: target, - wantsUntrusted: wantsUntrusted, - useCapture: useCapture, - delayedWarning: delayedWarning}); + forType.push({listener, + target, + wantsUntrusted, + useCapture, + delayedWarning}); }, - removeEventListener: function(addon, target, type, listener, useCapture) { + removeEventListener(addon, target, type, listener, useCapture) { let newTarget = this.redirectEventTarget(target); if (!newTarget) { return; @@ -521,7 +521,7 @@ var EventTargetParent = { } }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "Addons:Event:Run": this.dispatch(msg.target, msg.data.type, msg.data.capturing, @@ -530,7 +530,7 @@ var EventTargetParent = { } }, - dispatch: function(browser, type, capturing, isTrusted, prefetched, cpows) { + dispatch(browser, type, capturing, isTrusted, prefetched, cpows) { let event = cpows.event; let eventTarget = cpows.eventTarget; let targets = this.getTargets(browser); @@ -554,7 +554,7 @@ var EventTargetParent = { for (let [handler, target] of handlers) { let EventProxy = { - get: function(knownProps, name) { + get(knownProps, name) { if (knownProps.hasOwnProperty(name)) return knownProps[name]; return event[name]; @@ -563,8 +563,8 @@ var EventTargetParent = { let proxyEvent = new Proxy({ currentTarget: target, target: eventTarget, - type: type, - QueryInterface: function(iid) { + type, + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIDOMEventTarget)) return proxyEvent; @@ -698,7 +698,7 @@ function chromeGlobalForContentWindow(window) var SandboxParent = { componentsMap: new WeakMap(), - makeContentSandbox: function(addon, chromeGlobal, principals, ...rest) { + makeContentSandbox(addon, chromeGlobal, principals, ...rest) { CompatWarning.warn("This sandbox should be created from the child process.", addon, CompatWarning.warnings.sandboxes); if (rest.length) { @@ -733,7 +733,7 @@ var SandboxParent = { return sandbox; }, - evalInSandbox: function(code, sandbox, ...rest) { + evalInSandbox(code, sandbox, ...rest) { let cu = this.componentsMap.get(sandbox); return cu.evalInSandbox(code, sandbox, ...rest); } @@ -933,7 +933,7 @@ function wrapProgressListener(kind, listener) } let ListenerHandler = { - get: function(target, name) { + get(target, name) { if (name.startsWith("on")) { return function(...args) { listener[name].apply(listener, RemoteWebProgressManager.argumentsForAddonListener(kind, args)); @@ -1026,7 +1026,7 @@ RemoteWebNavigationInterposition.getters.sessionHistory = function(addon, target } var RemoteAddonsParent = { - init: function() { + init() { let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager); mm.addMessageListener("Addons:RegisterGlobal", this); @@ -1036,7 +1036,7 @@ var RemoteAddonsParent = { this.browserToGlobal = new WeakMap(); }, - getInterfaceInterpositions: function() { + getInterfaceInterpositions() { let result = {}; function register(intf, interp) { @@ -1052,7 +1052,7 @@ var RemoteAddonsParent = { return result; }, - getTaggedInterpositions: function() { + getTaggedInterpositions() { let result = {}; function register(tag, interp) { @@ -1069,7 +1069,7 @@ var RemoteAddonsParent = { return result; }, - receiveMessage: function(msg) { + receiveMessage(msg) { switch (msg.name) { case "Addons:RegisterGlobal": this.browserToGlobal.set(msg.target, msg.objects.global); diff --git a/toolkit/components/addoncompat/ShimWaiver.jsm b/toolkit/components/addoncompat/ShimWaiver.jsm index 402ab4c32247..67db8f60f5aa 100644 --- a/toolkit/components/addoncompat/ShimWaiver.jsm +++ b/toolkit/components/addoncompat/ShimWaiver.jsm @@ -5,7 +5,7 @@ this.EXPORTED_SYMBOLS = ["ShimWaiver"]; this.ShimWaiver = { - getProperty: function(obj, prop) { + getProperty(obj, prop) { let rv = obj[prop]; if (rv instanceof Function) { rv = rv.bind(obj); diff --git a/toolkit/components/addoncompat/defaultShims.js b/toolkit/components/addoncompat/defaultShims.js index a786efed7d39..c7675cad5135 100644 --- a/toolkit/components/addoncompat/defaultShims.js +++ b/toolkit/components/addoncompat/defaultShims.js @@ -22,15 +22,15 @@ DefaultInterpositionService.prototype = { classID: Components.ID("{50bc93ce-602a-4bef-bf3a-61fc749c4caf}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsIAddonInterposition, Ci.nsISupportsWeakReference]), - getWhitelist: function() { + getWhitelist() { return []; }, - interposeProperty: function(addon, target, iid, prop) { + interposeProperty(addon, target, iid, prop) { return null; }, - interposeCall: function(addonId, originalFunc, originalThis, args) { + interposeCall(addonId, originalFunc, originalThis, args) { args.splice(0, 0, addonId); return originalFunc.apply(originalThis, args); }, diff --git a/toolkit/components/addoncompat/multiprocessShims.js b/toolkit/components/addoncompat/multiprocessShims.js index 8b252a0c484a..1e5ea4f72752 100644 --- a/toolkit/components/addoncompat/multiprocessShims.js +++ b/toolkit/components/addoncompat/multiprocessShims.js @@ -102,13 +102,13 @@ AddonInterpositionService.prototype = { classID: Components.ID("{1363d5f0-d95e-11e3-9c1a-0800200c9a66}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsIAddonInterposition, Ci.nsISupportsWeakReference]), - getWhitelist: function() { + getWhitelist() { return this._whitelist; }, // When the interface is not known for a method call, this code // determines the type of the target object. - getObjectTag: function(target) { + getObjectTag(target) { if (Cu.isCrossProcessWrapper(target)) { return Cu.getCrossProcessWrapperTag(target); } @@ -134,7 +134,7 @@ AddonInterpositionService.prototype = { return "generic"; }, - interposeProperty: function(addon, target, iid, prop) { + interposeProperty(addon, target, iid, prop) { let interp; if (iid) { interp = this._interfaceInterpositions[iid]; @@ -173,7 +173,7 @@ AddonInterpositionService.prototype = { return Prefetcher.lookupInCache(addon, target, prop); }, - interposeCall: function(addonId, originalFunc, originalThis, args) { + interposeCall(addonId, originalFunc, originalThis, args) { args.splice(0, 0, addonId); return originalFunc.apply(originalThis, args); }, diff --git a/toolkit/components/addoncompat/tests/addon/bootstrap.js b/toolkit/components/addoncompat/tests/addon/bootstrap.js index 5e69fee22cf9..1364346bfed7 100644 --- a/toolkit/components/addoncompat/tests/addon/bootstrap.js +++ b/toolkit/components/addoncompat/tests/addon/bootstrap.js @@ -283,7 +283,7 @@ function testAboutModuleRegistration() } TestChannel.prototype = { - asyncOpen: function(listener, context) { + asyncOpen(listener, context) { let stream = this.open(); let runnable = { run: () => { @@ -301,13 +301,13 @@ function testAboutModuleRegistration() Services.tm.currentThread.dispatch(runnable, Ci.nsIEventTarget.DISPATCH_NORMAL); }, - asyncOpen2: function(listener) { + asyncOpen2(listener) { // throws an error if security checks fail var outListener = contentSecManager.performSecurityCheck(this, listener); return this.asyncOpen(outListener, null); }, - open: function() { + open() { function getWindow(channel) { try { @@ -334,22 +334,22 @@ function testAboutModuleRegistration() return stream; }, - open2: function() { + open2() { // throws an error if security checks fail contentSecManager.performSecurityCheck(this, null); return this.open(); }, - isPending: function() { + isPending() { return false; }, - cancel: function() { + cancel() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, - suspend: function() { + suspend() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, - resume: function() { + resume() { throw Cr.NS_ERROR_NOT_IMPLEMENTED; }, @@ -391,7 +391,7 @@ function testAboutModuleRegistration() }; let factory = { - createInstance: function(outer, iid) { + createInstance(outer, iid) { if (outer) { throw Cr.NS_ERROR_NO_AGGREGATION; } @@ -519,7 +519,7 @@ function testProgressListener() let sawTabsLocChange = false; let globalListener = { - onLocationChange: function(webProgress, request, uri) { + onLocationChange(webProgress, request, uri) { if (uri.spec == url) { sawGlobalLocChange = true; ok(request instanceof Ci.nsIHttpChannel, "Global listener channel is an HTTP channel"); @@ -528,7 +528,7 @@ function testProgressListener() }; let tabsListener = { - onLocationChange: function(browser, webProgress, request, uri) { + onLocationChange(browser, webProgress, request, uri) { if (uri.spec == url) { sawTabsLocChange = true; ok(request instanceof Ci.nsIHttpChannel, "Tab listener channel is an HTTP channel"); diff --git a/toolkit/components/addoncompat/tests/browser/browser_addonShims.js b/toolkit/components/addoncompat/tests/browser/browser_addonShims.js index ca28782cd0c6..d2326ac16206 100644 --- a/toolkit/components/addoncompat/tests/browser/browser_addonShims.js +++ b/toolkit/components/addoncompat/tests/browser/browser_addonShims.js @@ -14,7 +14,7 @@ function addAddon(url) AddonManager.getInstallForURL(url, installer => { installer.install(); let listener = { - onInstallEnded: function(addon, addonInstall) { + onInstallEnded(addon, addonInstall) { installer.removeListener(listener); // Wait for add-on's startup scripts to execute. See bug 997408 @@ -36,7 +36,7 @@ function removeAddon(addon) return new Promise(function(resolve, reject) { let listener = { - onUninstalled: function(uninstalledAddon) { + onUninstalled(uninstalledAddon) { if (uninstalledAddon != addon) { return; } @@ -53,12 +53,12 @@ add_task(function* test_addon_shims() { yield SpecialPowers.pushPrefEnv({set: [["dom.ipc.shims.enabledWarnings", true]]}); let addon = yield addAddon(ADDON_URL); - yield window.runAddonShimTests({ok: ok, is: is, info: info}); + yield window.runAddonShimTests({ok, is, info}); yield removeAddon(addon); if (Services.appinfo.browserTabsRemoteAutostart) { addon = yield addAddon(COMPAT_ADDON_URL); - yield window.runAddonTests({ok: ok, is: is, info: info}); + yield window.runAddonTests({ok, is, info}); yield removeAddon(addon); } }); diff --git a/toolkit/components/alerts/test/test_alerts.html b/toolkit/components/alerts/test/test_alerts.html index 2e55aa5ffa8a..b210af4b6d9a 100644 --- a/toolkit/components/alerts/test/test_alerts.html +++ b/toolkit/components/alerts/test/test_alerts.html @@ -21,7 +21,7 @@ var observer = { alertShow: false, - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { is(aData, "foobarcookie", "Checking whether the alert cookie was passed correctly"); if (aTopic == "alertclickcallback") { todo(false, "Did someone click the notification while running mochitests? (Please don't.)"); diff --git a/toolkit/components/asyncshutdown/AsyncShutdown.jsm b/toolkit/components/asyncshutdown/AsyncShutdown.jsm index 8a341edb1ba4..755cffbf1a01 100644 --- a/toolkit/components/asyncshutdown/AsyncShutdown.jsm +++ b/toolkit/components/asyncshutdown/AsyncShutdown.jsm @@ -53,7 +53,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task", XPCOMUtils.defineLazyServiceGetter(this, "gDebug", "@mozilla.org/xpcom/debug;1", "nsIDebug2"); Object.defineProperty(this, "gCrashReporter", { - get: function() { + get() { delete this.gCrashReporter; try { let reporter = Cc["@mozilla.org/xre/app-info;1"]. @@ -116,7 +116,7 @@ PromiseSet.prototype = { * @return {Promise} Resolved once all Promise have been resolved or removed, * or rejected after at least one Promise has rejected. */ - wait: function() { + wait() { // Pick an arbitrary element in the map, if any exists. let entry = this._indirections.entries().next(); if (entry.done) { @@ -139,7 +139,7 @@ PromiseSet.prototype = { * Calls to wait (including ongoing calls) will only return once * `key` has either resolved or been removed. */ - add: function(key) { + add(key) { this._ensurePromise(key); let indirection = PromiseUtils.defer(); key.then( @@ -163,7 +163,7 @@ PromiseSet.prototype = { * Calls to wait (including ongoing calls) will ignore this promise, * unless it is added again. */ - delete: function(key) { + delete(key) { this._ensurePromise(key); let value = this._indirections.get(key); if (!value) { @@ -174,7 +174,7 @@ PromiseSet.prototype = { return true; }, - _ensurePromise: function(key) { + _ensurePromise(key) { if (!key || typeof key != "object") { throw new Error("Expected an object"); } @@ -335,9 +335,9 @@ function getOrigin(topFrame, filename = null, lineNumber = null, stack = null) { } return { - filename: filename, - lineNumber: lineNumber, - stack: stack, + filename, + lineNumber, + stack, }; } catch (ex) { return { @@ -436,7 +436,7 @@ function getPhase(topic) { * // No specific guarantee about completion of profileBeforeChange * }); */ - addBlocker: function(name, condition, details = null) { + addBlocker(name, condition, details = null) { spinner.addBlocker(name, condition, details); }, /** @@ -451,7 +451,7 @@ function getPhase(topic) { * the blocker has never been installed or that the phase has * completed and the blocker has already been resolved. */ - removeBlocker: function(condition) { + removeBlocker(condition) { return spinner.removeBlocker(condition); }, @@ -499,7 +499,7 @@ Spinner.prototype = { * See the documentation of `addBlocker` in property `client` * of instances of `Barrier`. */ - addBlocker: function(name, condition, details) { + addBlocker(name, condition, details) { this._barrier.client.addBlocker(name, condition, details); }, /** @@ -513,7 +513,7 @@ Spinner.prototype = { * the blocker has never been installed or that the phase has * completed and the blocker has already been resolved. */ - removeBlocker: function(condition) { + removeBlocker(condition) { return this._barrier.client.removeBlocker(condition); }, @@ -522,7 +522,7 @@ Spinner.prototype = { }, // nsIObserver.observe - observe: function() { + observe() { let topic = this._topic; debug(`Starting phase ${ topic }`); Services.obs.removeObserver(this, topic); @@ -751,10 +751,10 @@ function Barrier(name) { } let blocker = { - trigger: trigger, - promise: promise, - name: name, - fetchState: fetchState, + trigger, + promise, + name, + fetchState, getOrigin: () => getOrigin(topFrame, filename, lineNumber, stack), }; @@ -810,11 +810,11 @@ Barrier.prototype = Object.freeze({ let {name, fetchState} = blocker; let {stack, filename, lineNumber} = blocker.getOrigin(); frozen.push({ - name: name, + name, state: safeGetState(fetchState), - filename: filename, - lineNumber: lineNumber, - stack: stack + filename, + lineNumber, + stack }); } return frozen; @@ -842,14 +842,14 @@ Barrier.prototype = Object.freeze({ * * @return {Promise} A promise satisfied once all blockers are complete. */ - wait: function(options = {}) { + wait(options = {}) { // This method only implements caching on top of _wait() if (this._promise) { return this._promise; } return this._promise = this._wait(options); }, - _wait: function(options) { + _wait(options) { // Sanity checks if (this._isStarted) { @@ -990,7 +990,7 @@ Barrier.prototype = Object.freeze({ return promise; }, - _removeBlocker: function(condition) { + _removeBlocker(condition) { if (!this._waitForMe || !this._promiseToBlocker || !this._conditionToPromise) { // We have already cleaned up everything. return false; diff --git a/toolkit/components/asyncshutdown/nsAsyncShutdown.js b/toolkit/components/asyncshutdown/nsAsyncShutdown.js index bd2c9a2fdf3a..349fd175d3a3 100644 --- a/toolkit/components/asyncshutdown/nsAsyncShutdown.js +++ b/toolkit/components/asyncshutdown/nsAsyncShutdown.js @@ -27,7 +27,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task", */ var PropertyBagConverter = { // From nsIPropertyBag to JS - toObject: function(bag) { + toObject(bag) { if (!(bag instanceof Ci.nsIPropertyBag)) { throw new TypeError("Not a property bag"); } @@ -40,7 +40,7 @@ var PropertyBagConverter = { } return result; }, - toValue: function(property) { + toValue(property) { if (typeof property != "object") { return property; } @@ -54,7 +54,7 @@ var PropertyBagConverter = { }, // From JS to nsIPropertyBag - fromObject: function(obj) { + fromObject(obj) { if (obj == null || typeof obj != "object") { throw new TypeError("Invalid object: " + obj); } @@ -66,7 +66,7 @@ var PropertyBagConverter = { } return bag; }, - fromValue: function(value) { + fromValue(value) { if (typeof value == "function") { return null; // Emulating the behavior of JSON.stringify with functions } @@ -100,7 +100,7 @@ function nsAsyncShutdownClient(moduleClient) { this._byName = new Map(); } nsAsyncShutdownClient.prototype = { - _getPromisified: function(xpcomBlocker) { + _getPromisified(xpcomBlocker) { let candidate = this._byName.get(xpcomBlocker.name); if (!candidate) { return null; @@ -110,7 +110,7 @@ nsAsyncShutdownClient.prototype = { } return null; }, - _setPromisified: function(xpcomBlocker, moduleBlocker) { + _setPromisified(xpcomBlocker, moduleBlocker) { let candidate = this._byName.get(xpcomBlocker.name); if (!candidate) { this._byName.set(xpcomBlocker.name, {xpcom: xpcomBlocker, @@ -122,7 +122,7 @@ nsAsyncShutdownClient.prototype = { } throw new Error("We have already registered a distinct blocker with the same name: " + xpcomBlocker.name); }, - _deletePromisified: function(xpcomBlocker) { + _deletePromisified(xpcomBlocker) { let candidate = this._byName.get(xpcomBlocker.name); if (!candidate || candidate.xpcom !== xpcomBlocker) { return false; @@ -136,7 +136,7 @@ nsAsyncShutdownClient.prototype = { get name() { return this._moduleClient.name; }, - addBlocker: function(/* nsIAsyncShutdownBlocker*/ xpcomBlocker, + addBlocker(/* nsIAsyncShutdownBlocker*/ xpcomBlocker, fileName, lineNumber, stack) { // We need a Promise-based function with the same behavior as // `xpcomBlocker`. Furthermore, to support `removeBlocker`, we @@ -171,12 +171,12 @@ nsAsyncShutdownClient.prototype = { return null; }, filename: fileName, - lineNumber: lineNumber, - stack: stack, + lineNumber, + stack, }); }, - removeBlocker: function(xpcomBlocker) { + removeBlocker(xpcomBlocker) { let moduleBlocker = this._getPromisified(xpcomBlocker); if (!moduleBlocker) { return false; @@ -210,7 +210,7 @@ nsAsyncShutdownBarrier.prototype = { get client() { return this._client; }, - wait: function(onReady) { + wait(onReady) { this._moduleBarrier.wait().then(() => { onReady.done(); }); @@ -242,7 +242,7 @@ function nsAsyncShutdownService() { let k = _k; Object.defineProperty(this, k, { configurable: true, - get: function() { + get() { delete this[k]; let wrapped = AsyncShutdown[k]; // May be undefined, if we're on the wrong process. let result = wrapped ? new nsAsyncShutdownClient(wrapped) : undefined; @@ -260,7 +260,7 @@ function nsAsyncShutdownService() { }; } nsAsyncShutdownService.prototype = { - makeBarrier: function(name) { + makeBarrier(name) { return new nsAsyncShutdownBarrier(new AsyncShutdown.Barrier(name)); }, diff --git a/toolkit/components/asyncshutdown/tests/xpcshell/head.js b/toolkit/components/asyncshutdown/tests/xpcshell/head.js index 9de489808d91..735dea9fa5fc 100644 --- a/toolkit/components/asyncshutdown/tests/xpcshell/head.js +++ b/toolkit/components/asyncshutdown/tests/xpcshell/head.js @@ -37,13 +37,13 @@ function makeLock(kind) { let topic = "test-Phase-" + ++makeLock.counter; let phase = AsyncShutdown._getPhase(topic); return { - addBlocker: function(...args) { + addBlocker(...args) { return phase.addBlocker(...args); }, - removeBlocker: function(blocker) { + removeBlocker(blocker) { return phase.removeBlocker(blocker); }, - wait: function() { + wait() { Services.obs.notifyObservers(null, topic, null); return Promise.resolve(); } @@ -54,7 +54,7 @@ function makeLock(kind) { return { addBlocker: barrier.client.addBlocker, removeBlocker: barrier.client.removeBlocker, - wait: function() { + wait() { return barrier.wait(); } }; @@ -62,7 +62,7 @@ function makeLock(kind) { let name = "test-xpcom-Barrier-" + ++makeLock.counter; let barrier = asyncShutdownService.makeBarrier(name); return { - addBlocker: function(blockerName, condition, state) { + addBlocker(blockerName, condition, state) { if (condition == null) { // Slight trick as `null` or `undefined` cannot be used as keys // for `xpcomMap`. Note that this has no incidence on the result @@ -74,8 +74,8 @@ function makeLock(kind) { if (!blocker) { blocker = { name: blockerName, - state: state, - blockShutdown: function(aBarrierClient) { + state, + blockShutdown(aBarrierClient) { return Task.spawn(function*() { try { if (typeof condition == "function") { @@ -94,14 +94,14 @@ function makeLock(kind) { let {fileName, lineNumber, stack} = (new Error()); return barrier.client.addBlocker(blocker, fileName, lineNumber, stack); }, - removeBlocker: function(condition) { + removeBlocker(condition) { let blocker = makeLock.xpcomMap.get(condition); if (!blocker) { return; } barrier.client.removeBlocker(blocker); }, - wait: function() { + wait() { return new Promise(resolve => { barrier.wait(resolve); }); @@ -114,7 +114,7 @@ function makeLock(kind) { return { addBlocker: client.addBlocker, removeBlocker: client.removeBlocker, - wait: function() { + wait() { return new Promise(resolve => { barrier.wait(resolve); }); diff --git a/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js b/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js index 33da1f53fbd4..9df2425ba26a 100644 --- a/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js +++ b/toolkit/components/asyncshutdown/tests/xpcshell/test_AsyncShutdown_leave_uncaught.js @@ -27,7 +27,7 @@ add_task(function* test_phase_simple_async() { throw new Error("State BOOM"); }], [function() { return { - toJSON: function() { + toJSON() { throw new Error("State.toJSON BOOM"); } }; diff --git a/toolkit/components/autocomplete/tests/unit/head_autocomplete.js b/toolkit/components/autocomplete/tests/unit/head_autocomplete.js index 478f4d4d13f0..581ca77a8d81 100644 --- a/toolkit/components/autocomplete/tests/unit/head_autocomplete.js +++ b/toolkit/components/autocomplete/tests/unit/head_autocomplete.js @@ -37,7 +37,7 @@ AutoCompleteInputBase.prototype = { get selectionEnd() { return this._selEnd; }, - selectTextRange: function(aStart, aEnd) { + selectTextRange(aStart, aEnd) { this._selStart = aStart; this._selEnd = aEnd; }, @@ -46,12 +46,12 @@ AutoCompleteInputBase.prototype = { return this.searches.length; }, - getSearchAt: function(aIndex) { + getSearchAt(aIndex) { return this.searches[aIndex]; }, - onSearchBegin: function() {}, - onSearchComplete: function() {}, + onSearchBegin() {}, + onSearchComplete() {}, popupOpen: false, @@ -89,31 +89,31 @@ AutoCompleteResultBase.prototype = { return this._values.length; }, - getValueAt: function(aIndex) { + getValueAt(aIndex) { return this._values[aIndex]; }, - getLabelAt: function(aIndex) { + getLabelAt(aIndex) { return this.getValueAt(aIndex); }, - getCommentAt: function(aIndex) { + getCommentAt(aIndex) { return this._comments[aIndex]; }, - getStyleAt: function(aIndex) { + getStyleAt(aIndex) { return this._styles[aIndex]; }, - getImageAt: function(aIndex) { + getImageAt(aIndex) { return ""; }, - getFinalCompleteValueAt: function(aIndex) { + getFinalCompleteValueAt(aIndex) { return this._finalCompleteValues[aIndex] || this._values[aIndex]; }, - removeValueAt: function(aRowIndex, aRemoveFromDb) {}, + removeValueAt(aRowIndex, aRemoveFromDb) {}, // nsISupports implementation QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompleteResult]) @@ -135,7 +135,7 @@ AutoCompleteSearchBase.prototype = { // AutoCompleteResult _result: null, - startSearch: function(aSearchString, + startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) { @@ -145,14 +145,14 @@ AutoCompleteSearchBase.prototype = { aListener.onSearchResult(this, result); }, - stopSearch: function() {}, + stopSearch() {}, // nsISupports implementation QueryInterface: XPCOMUtils.generateQI([Ci.nsIFactory, Ci.nsIAutoCompleteSearch]), // nsIFactory implementation - createInstance: function(outer, iid) { + createInstance(outer, iid) { return this.QueryInterface(iid); } } diff --git a/toolkit/components/autocomplete/tests/unit/test_330578.js b/toolkit/components/autocomplete/tests/unit/test_330578.js index c422dbb6a0c8..29b368269aab 100644 --- a/toolkit/components/autocomplete/tests/unit/test_330578.js +++ b/toolkit/components/autocomplete/tests/unit/test_330578.js @@ -9,7 +9,7 @@ var gResultListener = { _lastValue: "", _lastRemoveFromDb: false, - onValueRemoved: function(aResult, aValue, aRemoveFromDb) { + onValueRemoved(aResult, aValue, aRemoveFromDb) { this._lastResult = aResult; this._lastValue = aValue; this._lastRemoveFromDb = aRemoveFromDb; diff --git a/toolkit/components/autocomplete/tests/unit/test_378079.js b/toolkit/components/autocomplete/tests/unit/test_378079.js index b8b734884187..b5ac52e0ac80 100644 --- a/toolkit/components/autocomplete/tests/unit/test_378079.js +++ b/toolkit/components/autocomplete/tests/unit/test_378079.js @@ -37,21 +37,21 @@ AutoCompleteInput.prototype = { return this.searches.length; }, - getSearchAt: function(aIndex) { + getSearchAt(aIndex) { return this.searches[aIndex]; }, - onSearchBegin: function() {}, - onSearchComplete: function() {}, + onSearchBegin() {}, + onSearchComplete() {}, popupOpen: false, popup: { - setSelectedIndex: function(aIndex) {}, - invalidate: function() {}, + setSelectedIndex(aIndex) {}, + invalidate() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompletePopup)) return this; @@ -61,7 +61,7 @@ AutoCompleteInput.prototype = { }, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteInput)) return this; @@ -103,34 +103,34 @@ AutoCompleteResult.prototype = { return this._values.length; }, - getValueAt: function(aIndex) { + getValueAt(aIndex) { return this._values[aIndex]; }, - getLabelAt: function(aIndex) { + getLabelAt(aIndex) { return this.getValueAt(aIndex); }, - getCommentAt: function(aIndex) { + getCommentAt(aIndex) { return this._comments[aIndex]; }, - getStyleAt: function(aIndex) { + getStyleAt(aIndex) { return this._styles[aIndex]; }, - getImageAt: function(aIndex) { + getImageAt(aIndex) { return ""; }, - getFinalCompleteValueAt: function(aIndex) { + getFinalCompleteValueAt(aIndex) { return this.getValueAt(aIndex); }, - removeValueAt: function(aRowIndex, aRemoveFromDb) {}, + removeValueAt(aRowIndex, aRemoveFromDb) {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteResult)) return this; @@ -162,7 +162,7 @@ AutoCompleteSearch.prototype = { /** * Return the same result set for every search */ - startSearch: function(aSearchString, + startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) @@ -170,10 +170,10 @@ AutoCompleteSearch.prototype = { aListener.onSearchResult(this, this._result); }, - stopSearch: function() {}, + stopSearch() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIFactory) || iid.equals(Ci.nsIAutoCompleteSearch)) @@ -183,7 +183,7 @@ AutoCompleteSearch.prototype = { }, // nsIFactory implementation - createInstance: function(outer, iid) { + createInstance(outer, iid) { return this.QueryInterface(iid); } } diff --git a/toolkit/components/autocomplete/tests/unit/test_393191.js b/toolkit/components/autocomplete/tests/unit/test_393191.js index 750bcbd9abb4..ce32b4261787 100644 --- a/toolkit/components/autocomplete/tests/unit/test_393191.js +++ b/toolkit/components/autocomplete/tests/unit/test_393191.js @@ -36,21 +36,21 @@ AutoCompleteInput.prototype = { return this.searches.length; }, - getSearchAt: function(aIndex) { + getSearchAt(aIndex) { return this.searches[aIndex]; }, - onSearchBegin: function() {}, - onSearchComplete: function() {}, + onSearchBegin() {}, + onSearchComplete() {}, popupOpen: false, popup: { - setSelectedIndex: function(aIndex) {}, - invalidate: function() {}, + setSelectedIndex(aIndex) {}, + invalidate() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompletePopup)) return this; @@ -60,7 +60,7 @@ AutoCompleteInput.prototype = { }, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteInput)) return this; @@ -102,34 +102,34 @@ AutoCompleteResult.prototype = { return this._values.length; }, - getValueAt: function(aIndex) { + getValueAt(aIndex) { return this._values[aIndex]; }, - getLabelAt: function(aIndex) { + getLabelAt(aIndex) { return this.getValueAt(aIndex); }, - getCommentAt: function(aIndex) { + getCommentAt(aIndex) { return this._comments[aIndex]; }, - getStyleAt: function(aIndex) { + getStyleAt(aIndex) { return this._styles[aIndex]; }, - getImageAt: function(aIndex) { + getImageAt(aIndex) { return ""; }, - getFinalCompleteValueAt: function(aIndex) { + getFinalCompleteValueAt(aIndex) { return this.getValueAt(aIndex); }, - removeValueAt: function(aRowIndex, aRemoveFromDb) {}, + removeValueAt(aRowIndex, aRemoveFromDb) {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteResult)) return this; @@ -161,7 +161,7 @@ AutoCompleteSearch.prototype = { /** * Return the same result set for every search */ - startSearch: function(aSearchString, + startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) @@ -169,10 +169,10 @@ AutoCompleteSearch.prototype = { aListener.onSearchResult(this, this._result); }, - stopSearch: function() {}, + stopSearch() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIFactory) || iid.equals(Ci.nsIAutoCompleteSearch)) @@ -182,7 +182,7 @@ AutoCompleteSearch.prototype = { }, // nsIFactory implementation - createInstance: function(outer, iid) { + createInstance(outer, iid) { return this.QueryInterface(iid); } } diff --git a/toolkit/components/autocomplete/tests/unit/test_440866.js b/toolkit/components/autocomplete/tests/unit/test_440866.js index e42dd8831c90..558ac78b7d29 100644 --- a/toolkit/components/autocomplete/tests/unit/test_440866.js +++ b/toolkit/components/autocomplete/tests/unit/test_440866.js @@ -35,21 +35,21 @@ AutoCompleteInput.prototype = { return this.searches.length; }, - getSearchAt: function(aIndex) { + getSearchAt(aIndex) { return this.searches[aIndex]; }, - onSearchBegin: function() {}, - onSearchComplete: function() {}, + onSearchBegin() {}, + onSearchComplete() {}, popupOpen: false, popup: { - setSelectedIndex: function(aIndex) {}, - invalidate: function() {}, + setSelectedIndex(aIndex) {}, + invalidate() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompletePopup)) return this; @@ -59,7 +59,7 @@ AutoCompleteInput.prototype = { }, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteInput)) return this; @@ -101,34 +101,34 @@ AutoCompleteResult.prototype = { return this._values.length; }, - getValueAt: function(aIndex) { + getValueAt(aIndex) { return this._values[aIndex]; }, - getLabelAt: function(aIndex) { + getLabelAt(aIndex) { return this.getValueAt(aIndex); }, - getCommentAt: function(aIndex) { + getCommentAt(aIndex) { return this._comments[aIndex]; }, - getStyleAt: function(aIndex) { + getStyleAt(aIndex) { return this._styles[aIndex]; }, - getImageAt: function(aIndex) { + getImageAt(aIndex) { return ""; }, - getFinalCompleteValueAt: function(aIndex) { + getFinalCompleteValueAt(aIndex) { return this.getValueAt(aIndex); }, - removeValueAt: function(aRowIndex, aRemoveFromDb) {}, + removeValueAt(aRowIndex, aRemoveFromDb) {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteResult)) return this; @@ -160,7 +160,7 @@ AutoCompleteSearch.prototype = { /** * Return the same result set for every search */ - startSearch: function(aSearchString, + startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) @@ -168,10 +168,10 @@ AutoCompleteSearch.prototype = { aListener.onSearchResult(this, this._result); }, - stopSearch: function() {}, + stopSearch() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIFactory) || iid.equals(Ci.nsIAutoCompleteSearch)) @@ -181,7 +181,7 @@ AutoCompleteSearch.prototype = { }, // nsIFactory implementation - createInstance: function(outer, iid) { + createInstance(outer, iid) { return this.QueryInterface(iid); } } diff --git a/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js b/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js index 15274140fcd4..6186df34d8f4 100644 --- a/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js +++ b/toolkit/components/autocomplete/tests/unit/test_autocomplete_multiple.js @@ -30,21 +30,21 @@ AutoCompleteInput.prototype = { return this.searches.length; }, - getSearchAt: function(aIndex) { + getSearchAt(aIndex) { return this.searches[aIndex]; }, - onSearchBegin: function() {}, - onSearchComplete: function() {}, + onSearchBegin() {}, + onSearchComplete() {}, popupOpen: false, popup: { - setSelectedIndex: function(aIndex) {}, - invalidate: function() {}, + setSelectedIndex(aIndex) {}, + invalidate() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompletePopup)) return this; @@ -54,7 +54,7 @@ AutoCompleteInput.prototype = { }, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteInput)) return this; @@ -90,34 +90,34 @@ AutoCompleteResult.prototype = { return this._values.length; }, - getValueAt: function(aIndex) { + getValueAt(aIndex) { return this._values[aIndex]; }, - getLabelAt: function(aIndex) { + getLabelAt(aIndex) { return this.getValueAt(aIndex); }, - getCommentAt: function(aIndex) { + getCommentAt(aIndex) { return this._comments[aIndex]; }, - getStyleAt: function(aIndex) { + getStyleAt(aIndex) { return this._styles[aIndex]; }, - getImageAt: function(aIndex) { + getImageAt(aIndex) { return ""; }, - getFinalCompleteValueAt: function(aIndex) { + getFinalCompleteValueAt(aIndex) { return this.getValueAt(aIndex); }, - removeValueAt: function(aRowIndex, aRemoveFromDb) {}, + removeValueAt(aRowIndex, aRemoveFromDb) {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteResult)) return this; @@ -149,7 +149,7 @@ AutoCompleteSearch.prototype = { /** * Return the same result set for every search */ - startSearch: function(aSearchString, + startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) @@ -170,10 +170,10 @@ AutoCompleteSearch.prototype = { aListener.onSearchResult(this, result); }, - stopSearch: function() {}, + stopSearch() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIFactory) || iid.equals(Ci.nsIAutoCompleteSearch)) @@ -183,7 +183,7 @@ AutoCompleteSearch.prototype = { }, // nsIFactory implementation - createInstance: function(outer, iid) { + createInstance(outer, iid) { return this.QueryInterface(iid); } } diff --git a/toolkit/components/autocomplete/tests/unit/test_previousResult.js b/toolkit/components/autocomplete/tests/unit/test_previousResult.js index a9c6da31a4b2..0367f782de14 100644 --- a/toolkit/components/autocomplete/tests/unit/test_previousResult.js +++ b/toolkit/components/autocomplete/tests/unit/test_previousResult.js @@ -36,21 +36,21 @@ AutoCompleteInput.prototype = { return this.searches.length; }, - getSearchAt: function(aIndex) { + getSearchAt(aIndex) { return this.searches[aIndex]; }, - onSearchBegin: function() {}, - onSearchComplete: function() {}, + onSearchBegin() {}, + onSearchComplete() {}, popupOpen: false, popup: { - setSelectedIndex: function(aIndex) {}, - invalidate: function() {}, + setSelectedIndex(aIndex) {}, + invalidate() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompletePopup)) return this; @@ -60,7 +60,7 @@ AutoCompleteInput.prototype = { }, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteInput)) return this; @@ -101,34 +101,34 @@ AutoCompleteResult.prototype = { return this._values.length; }, - getValueAt: function(aIndex) { + getValueAt(aIndex) { return this._values[aIndex]; }, - getLabelAt: function(aIndex) { + getLabelAt(aIndex) { return this.getValueAt(aIndex); }, - getCommentAt: function(aIndex) { + getCommentAt(aIndex) { return this._comments[aIndex]; }, - getStyleAt: function(aIndex) { + getStyleAt(aIndex) { return this._styles[aIndex]; }, - getImageAt: function(aIndex) { + getImageAt(aIndex) { return ""; }, - getFinalCompleteValueAt: function(aIndex) { + getFinalCompleteValueAt(aIndex) { return this.getValueAt(aIndex); }, - removeValueAt: function(aRowIndex, aRemoveFromDb) {}, + removeValueAt(aRowIndex, aRemoveFromDb) {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIAutoCompleteResult)) return this; @@ -161,7 +161,7 @@ AutoCompleteSearch.prototype = { /** * Return the same result set for every search */ - startSearch: function(aSearchString, + startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) @@ -170,10 +170,10 @@ AutoCompleteSearch.prototype = { aListener.onSearchResult(this, this._result); }, - stopSearch: function() {}, + stopSearch() {}, // nsISupports implementation - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIFactory) || iid.equals(Ci.nsIAutoCompleteSearch)) @@ -183,7 +183,7 @@ AutoCompleteSearch.prototype = { }, // nsIFactory implementation - createInstance: function(outer, iid) { + createInstance(outer, iid) { return this.QueryInterface(iid); } } diff --git a/toolkit/components/autocomplete/tests/unit/test_stopSearch.js b/toolkit/components/autocomplete/tests/unit/test_stopSearch.js index 0972092bb63e..4ef0294b73bc 100644 --- a/toolkit/components/autocomplete/tests/unit/test_stopSearch.js +++ b/toolkit/components/autocomplete/tests/unit/test_stopSearch.js @@ -32,14 +32,14 @@ AutoCompleteInput.prototype = { set popupOpen(val) { return val; }, // ignore get popupOpen() { return false; }, get searchCount() { return this.searches.length; }, - getSearchAt: function(aIndex) { return this.searches[aIndex]; }, - onSearchBegin: function() {}, - onSearchComplete: function() {}, - onTextReverted: function() {}, - onTextEntered: function() {}, + getSearchAt(aIndex) { return this.searches[aIndex]; }, + onSearchBegin() {}, + onSearchComplete() {}, + onTextReverted() {}, + onTextEntered() {}, popup: { - selectBy: function() {}, - invalidate: function() {}, + selectBy() {}, + invalidate() {}, set selectedIndex(val) { return val; }, // ignore get selectedIndex() { return -1 }, QueryInterface: XPCOMUtils.generateQI([Ci.nsIAutoCompletePopup]) @@ -58,13 +58,13 @@ function AutoCompleteSearch(aName) AutoCompleteSearch.prototype = { constructor: AutoCompleteSearch, stopSearchInvoked: true, - startSearch: function(aSearchString, aSearchParam, aPreviousResult, aListener) + startSearch(aSearchString, aSearchParam, aPreviousResult, aListener) { print("Check stop search has been called"); do_check_true(this.stopSearchInvoked); this.stopSearchInvoked = false; }, - stopSearch: function() + stopSearch() { this.stopSearchInvoked = true; }, @@ -72,7 +72,7 @@ AutoCompleteSearch.prototype = { Ci.nsIFactory , Ci.nsIAutoCompleteSearch ]), - createInstance: function(outer, iid) + createInstance(outer, iid) { return this.QueryInterface(iid); } diff --git a/toolkit/components/captivedetect/captivedetect.js b/toolkit/components/captivedetect/captivedetect.js index f347736b39aa..4362f8e790d7 100644 --- a/toolkit/components/captivedetect/captivedetect.js +++ b/toolkit/components/captivedetect/captivedetect.js @@ -66,9 +66,9 @@ function URLFetcher(url, timeout) { URLFetcher.prototype = { _isAborted: false, - ontimeout: function() {}, - onerror: function() {}, - abort: function() { + ontimeout() {}, + onerror() {}, + abort() { if (!this._isAborted) { this._isAborted = true; this._xhr.abort(); @@ -339,7 +339,7 @@ CaptivePortalDetector.prototype = { let id = this._allocateRequestId(); let details = { type: kOpenCaptivePortalLoginEvent, - id: id, + id, url: this._canonicalSiteURL, }; this._loginObserver.attach(); diff --git a/toolkit/components/contentprefs/ContentPrefService2.jsm b/toolkit/components/contentprefs/ContentPrefService2.jsm index 5d4287897024..69180fe13101 100644 --- a/toolkit/components/contentprefs/ContentPrefService2.jsm +++ b/toolkit/components/contentprefs/ContentPrefService2.jsm @@ -418,7 +418,7 @@ ContentPrefService2.prototype = { }, // Deletes settings and groups that are no longer used. - _settingsAndGroupsCleanupStmts: function() { + _settingsAndGroupsCleanupStmts() { // The NOTNULL term in the subquery of the second statment is needed because of // SQLite's weird IN behavior vis-a-vis NULLs. See http://sqlite.org/lang_expr.html. return [ diff --git a/toolkit/components/contentprefs/ContentPrefServiceChild.jsm b/toolkit/components/contentprefs/ContentPrefServiceChild.jsm index ea1f969dfd64..cad1c71caf67 100644 --- a/toolkit/components/contentprefs/ContentPrefServiceChild.jsm +++ b/toolkit/components/contentprefs/ContentPrefServiceChild.jsm @@ -31,18 +31,18 @@ function CallbackCaller(callback) { } CallbackCaller.prototype = { - handleResult: function(contentPref) { + handleResult(contentPref) { cbHandleResult(this._callback, new ContentPref(contentPref.domain, contentPref.name, contentPref.value)); }, - handleError: function(result) { + handleError(result) { cbHandleError(this._callback, result); }, - handleCompletion: function(reason) { + handleCompletion(reason) { cbHandleCompletion(this._callback, reason); }, }; @@ -56,7 +56,7 @@ var ContentPrefServiceChild = { _mm: Cc["@mozilla.org/childprocessmessagemanager;1"] .getService(Ci.nsIMessageSender), - _getRandomId: function() { + _getRandomId() { return Cc["@mozilla.org/uuid-generator;1"] .getService(Ci.nsIUUIDGenerator).generateUUID().toString(); }, @@ -64,13 +64,13 @@ var ContentPrefServiceChild = { // Map from random ID string -> CallbackCaller, per request _requests: new Map(), - init: function() { + init() { this._mm.addMessageListener("ContentPrefs:HandleResult", this); this._mm.addMessageListener("ContentPrefs:HandleError", this); this._mm.addMessageListener("ContentPrefs:HandleCompletion", this); }, - receiveMessage: function(msg) { + receiveMessage(msg) { let data = msg.data; let callback; switch (msg.name) { @@ -104,34 +104,34 @@ var ContentPrefServiceChild = { } }, - _callFunction: function(call, args, callback) { + _callFunction(call, args, callback) { let requestId = this._getRandomId(); - let data = { call: call, args: args, requestId: requestId }; + let data = { call, args, requestId }; this._mm.sendAsyncMessage("ContentPrefs:FunctionCall", data); this._requests.set(requestId, new CallbackCaller(callback)); }, - getByName: function(name, context, callback) { + getByName(name, context, callback) { return this._callFunction("getByName", [ name, contextArg(context) ], callback); }, - getByDomainAndName: function(domain, name, context, callback) { + getByDomainAndName(domain, name, context, callback) { return this._callFunction("getByDomainAndName", [ domain, name, contextArg(context) ], callback); }, - getBySubdomainAndName: function(domain, name, context, callback) { + getBySubdomainAndName(domain, name, context, callback) { return this._callFunction("getBySubdomainAndName", [ domain, name, contextArg(context) ], callback); }, - getGlobal: function(name, context, callback) { + getGlobal(name, context, callback) { return this._callFunction("getGlobal", [ name, contextArg(context) ], callback); @@ -141,59 +141,59 @@ var ContentPrefServiceChild = { getCachedBySubdomainAndName: NYI, getCachedGlobal: NYI, - set: function(domain, name, value, context, callback) { + set(domain, name, value, context, callback) { this._callFunction("set", [ domain, name, value, contextArg(context) ], callback); }, - setGlobal: function(name, value, context, callback) { + setGlobal(name, value, context, callback) { this._callFunction("setGlobal", [ name, value, contextArg(context) ], callback); }, - removeByDomainAndName: function(domain, name, context, callback) { + removeByDomainAndName(domain, name, context, callback) { this._callFunction("removeByDomainAndName", [ domain, name, contextArg(context) ], callback); }, - removeBySubdomainAndName: function(domain, name, context, callback) { + removeBySubdomainAndName(domain, name, context, callback) { this._callFunction("removeBySubdomainAndName", [ domain, name, contextArg(context) ], callback); }, - removeGlobal: function(name, context, callback) { + removeGlobal(name, context, callback) { this._callFunction("removeGlobal", [ name, contextArg(context) ], callback); }, - removeByDomain: function(domain, context, callback) { + removeByDomain(domain, context, callback) { this._callFunction("removeByDomain", [ domain, contextArg(context) ], callback); }, - removeBySubdomain: function(domain, context, callback) { + removeBySubdomain(domain, context, callback) { this._callFunction("removeBySubdomain", [ domain, contextArg(context) ], callback); }, - removeByName: function(name, context, callback) { + removeByName(name, context, callback) { this._callFunction("removeByName", [ name, value, contextArg(context) ], callback); }, - removeAllDomains: function(context, callback) { + removeAllDomains(context, callback) { this._callFunction("removeAllDomains", [ contextArg(context) ], callback); }, - removeAllGlobals: function(context, callback) { + removeAllGlobals(context, callback) { this._callFunction("removeAllGlobals", [ contextArg(context) ], callback); }, - addObserverForName: function(name, observer) { + addObserverForName(name, observer) { let set = this._observers.get(name); if (!set) { set = new Set(); @@ -204,14 +204,14 @@ var ContentPrefServiceChild = { // This is the first observer for this name. Start listening for changes // to it. - this._mm.sendAsyncMessage("ContentPrefs:AddObserverForName", { name: name }); + this._mm.sendAsyncMessage("ContentPrefs:AddObserverForName", { name }); this._observers.set(name, set); } set.add(observer); }, - removeObserverForName: function(name, observer) { + removeObserverForName(name, observer) { let set = this._observers.get(name); if (!set) return; @@ -219,7 +219,7 @@ var ContentPrefServiceChild = { set.delete(observer); if (set.size === 0) { // This was the last observer for this name. Stop listening for changes. - this._mm.sendAsyncMessage("ContentPrefs:RemoveObserverForName", { name: name }); + this._mm.sendAsyncMessage("ContentPrefs:RemoveObserverForName", { name }); this._observers.delete(name); if (this._observers.size === 0) { diff --git a/toolkit/components/contentprefs/ContentPrefServiceParent.jsm b/toolkit/components/contentprefs/ContentPrefServiceParent.jsm index f4b02f018ace..e0cb15e58491 100644 --- a/toolkit/components/contentprefs/ContentPrefServiceParent.jsm +++ b/toolkit/components/contentprefs/ContentPrefServiceParent.jsm @@ -14,7 +14,7 @@ const Cu = Components.utils; var ContentPrefServiceParent = { _cps2: null, - init: function() { + init() { let globalMM = Cc["@mozilla.org/parentprocessmessagemanager;1"] .getService(Ci.nsIMessageListenerManager); @@ -32,7 +32,7 @@ var ContentPrefServiceParent = { // Map from message manager -> content pref observer. _observers: new Map(), - handleObserverChange: function(msg) { + handleObserverChange(msg) { let observer = this._observers.get(msg.target); if (msg.name === "child-process-shutdown") { // If we didn't have any observers for this child process, don't do @@ -54,15 +54,15 @@ var ContentPrefServiceParent = { // observers for the same name. if (!observer) { observer = { - onContentPrefSet: function(group, name, value, isPrivate) { + onContentPrefSet(group, name, value, isPrivate) { msg.target.sendAsyncMessage("ContentPrefs:NotifyObservers", - { name: name, callback: "onContentPrefSet", + { name, callback: "onContentPrefSet", args: [ group, name, value, isPrivate ] }); }, - onContentPrefRemoved: function(group, name, isPrivate) { + onContentPrefRemoved(group, name, isPrivate) { msg.target.sendAsyncMessage("ContentPrefs:NotifyObservers", - { name: name, callback: "onContentPrefRemoved", + { name, callback: "onContentPrefRemoved", args: [ group, name, isPrivate ] }); }, @@ -92,16 +92,16 @@ var ContentPrefServiceParent = { } }, - receiveMessage: function(msg) { + receiveMessage(msg) { let data = msg.data; let args = data.args; let requestId = data.requestId; let listener = { - handleResult: function(pref) { + handleResult(pref) { msg.target.sendAsyncMessage("ContentPrefs:HandleResult", - { requestId: requestId, + { requestId, contentPref: { domain: pref.domain, name: pref.name, @@ -110,15 +110,15 @@ var ContentPrefServiceParent = { }); }, - handleError: function(error) { + handleError(error) { msg.target.sendAsyncMessage("ContentPrefs:HandleError", - { requestId: requestId, - error: error }); + { requestId, + error }); }, - handleCompletion: function(reason) { + handleCompletion(reason) { msg.target.sendAsyncMessage("ContentPrefs:HandleCompletion", - { requestId: requestId, - reason: reason }); + { requestId, + reason }); } }; diff --git a/toolkit/components/contentprefs/nsContentPrefService.js b/toolkit/components/contentprefs/nsContentPrefService.js index 4f5726e6ea44..8e92432e9f2c 100644 --- a/toolkit/components/contentprefs/nsContentPrefService.js +++ b/toolkit/components/contentprefs/nsContentPrefService.js @@ -580,7 +580,7 @@ ContentPrefService.prototype = { return this.__stmtSelectPref; }, - _scheduleCallback: function(func) { + _scheduleCallback(func) { let tm = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager); tm.mainThread.dispatch(func, Ci.nsIThread.DISPATCH_NORMAL); }, @@ -602,7 +602,7 @@ ContentPrefService.prototype = { if (aCallback) { let cache = this._cache; - new AsyncStatement(this._stmtSelectPref).execute({onResult: function(aResult) { + new AsyncStatement(this._stmtSelectPref).execute({onResult(aResult) { cache.set(aGroup, aSetting, aResult); aCallback.onResult(aResult); }}); @@ -651,7 +651,7 @@ ContentPrefService.prototype = { if (aCallback) { let cache = this._cache; - new AsyncStatement(this._stmtSelectGlobalPref).execute({onResult: function(aResult) { + new AsyncStatement(this._stmtSelectGlobalPref).execute({onResult(aResult) { cache.set(null, aName, aResult); aCallback.onResult(aResult); }}); @@ -1309,19 +1309,19 @@ AsyncStatement.prototype = { stmt.executeAsync({ _callback: aCallback, _hadResult: false, - handleResult: function(aResult) { + handleResult(aResult) { this._hadResult = true; if (this._callback) { let row = aResult.getNextRow(); this._callback.onResult(row.getResultByName("value")); } }, - handleCompletion: function(aReason) { + handleCompletion(aReason) { if (!this._hadResult && this._callback && aReason == Ci.mozIStorageStatementCallback.REASON_FINISHED) this._callback.onResult(undefined); }, - handleError: function(aError) {} + handleError(aError) {} }); } }; diff --git a/toolkit/components/contentprefs/tests/unit/test_bug679784.js b/toolkit/components/contentprefs/tests/unit/test_bug679784.js index 97251d87ba9c..123c8712acb7 100644 --- a/toolkit/components/contentprefs/tests/unit/test_bug679784.js +++ b/toolkit/components/contentprefs/tests/unit/test_bug679784.js @@ -5,11 +5,11 @@ var prefObserver = { setCalledNum: 0, - onContentPrefSet: function(aGroup, aName, aValue) { + onContentPrefSet(aGroup, aName, aValue) { this.setCalledNum++; }, removedCalledNum: 0, - onContentPrefRemoved: function(aGroup, aName) { + onContentPrefRemoved(aGroup, aName) { this.removedCalledNum++; } }; diff --git a/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js b/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js index 27d239f793f5..826619ed740d 100644 --- a/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js +++ b/toolkit/components/contentprefs/tests/unit/test_getPrefAsync.js @@ -18,7 +18,7 @@ function run_test() { function testCallbackObj() { cps.getPref(uri, "asynctest", { - onResult: function(aValue) { + onResult(aValue) { do_check_eq(aValue, "pie"); cps.removePref(uri, "asynctest"); testNoResult(); diff --git a/toolkit/components/contentprefs/tests/unit_cps2/head.js b/toolkit/components/contentprefs/tests/unit_cps2/head.js index 6ce75d997753..50cc9ae37622 100644 --- a/toolkit/components/contentprefs/tests/unit_cps2/head.js +++ b/toolkit/components/contentprefs/tests/unit_cps2/head.js @@ -25,7 +25,7 @@ function runAsyncTests(tests, dontResetBefore = false) { Cu.import("resource://test/AsyncRunner.jsm", s); asyncRunner = new s.AsyncRunner({ done: do_test_finished, - error: function(err) { + error(err) { // xpcshell test functions like equal throw NS_ERROR_ABORT on // failure. Ignore those and catch only uncaught exceptions. if (err !== Cr.NS_ERROR_ABORT) { @@ -36,7 +36,7 @@ function runAsyncTests(tests, dontResetBefore = false) { do_throw(err); } }, - consoleError: function(scriptErr) { + consoleError(scriptErr) { // Previously, this code checked for console errors related to the test, // and treated them as failures. This was problematic, because our current // very-broken exception reporting machinery in XPCWrappedJSClass reports @@ -138,10 +138,10 @@ function setWithDate(group, name, val, timestamp, context) { stmt.params.group = group; stmt.executeAsync({ - handleCompletion: function(reason) { + handleCompletion(reason) { next(); }, - handleError: function(err) { + handleError(err) { do_throw(err); } }); @@ -164,14 +164,14 @@ function getDate(group, name, context) { let res; stmt.executeAsync({ - handleResult: function(results) { + handleResult(results) { let row = results.getNextRow(); res = row.getResultByName("timestamp"); }, - handleCompletion: function(reason) { + handleCompletion(reason) { next(res * 1000); }, - handleError: function(err) { + handleError(err) { do_throw(err); } }); @@ -336,17 +336,17 @@ function dbOK(expectedRows) { let cols = ["grp", "name", "value"]; db.executeAsync([stmt], 1, { - handleCompletion: function(reason) { + handleCompletion(reason) { arraysOfArraysOK(actualRows, expectedRows); next(); }, - handleResult: function(results) { + handleResult(results) { let row = null; while (row = results.getNextRow()) { actualRows.push(cols.map(c => row.getResultByName(c))); } }, - handleError: function(err) { + handleError(err) { do_throw(err); } }); @@ -355,7 +355,7 @@ function dbOK(expectedRows) { function on(event, names, dontRemove) { let args = { - reset: function() { + reset() { for (let prop in this) { if (Array.isArray(this[prop])) this[prop].splice(0, this[prop].length); diff --git a/toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js b/toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js index 0fdc3b7adf32..546ff0b2bd2b 100644 --- a/toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js +++ b/toolkit/components/contentprefs/tests/unit_cps2/test_setGet.js @@ -143,7 +143,7 @@ var tests = [ // (3) Set the pref to a new value but don't wait for it to finish. cps.set("a.com", "foo", 2, null, { - handleCompletion: function() { + handleCompletion() { // (6) The pref should be cached after setting it. getCachedOK(["a.com", "foo"], true, 2); }, @@ -155,10 +155,10 @@ var tests = [ // (5) Call getByDomainAndName. var fetchedPref; cps.getByDomainAndName("a.com", "foo", null, { - handleResult: function(pref) { + handleResult(pref) { fetchedPref = pref; }, - handleCompletion: function() { + handleCompletion() { // (7) Finally, this callback should be called after set's above. do_check_true(!!fetchedPref); do_check_eq(fetchedPref.value, 2); diff --git a/toolkit/components/crashes/CrashManager.jsm b/toolkit/components/crashes/CrashManager.jsm index 1df8ed739db9..65216391c8d8 100644 --- a/toolkit/components/crashes/CrashManager.jsm +++ b/toolkit/components/crashes/CrashManager.jsm @@ -262,7 +262,7 @@ this.CrashManager.prototype = Object.freeze({ * * @return Promise */ - pendingDumps: function() { + pendingDumps() { return this._getDirectoryEntries(this._pendingDumpsDir, this.DUMP_REGEX); }, @@ -286,7 +286,7 @@ this.CrashManager.prototype = Object.freeze({ * * @return Promise */ - submittedDumps: function() { + submittedDumps() { return this._getDirectoryEntries(this._submittedDumpsDir, this.SUBMITTED_REGEX); }, @@ -306,7 +306,7 @@ this.CrashManager.prototype = Object.freeze({ * * @return promise The number of event files that were examined. */ - aggregateEventsFiles: function() { + aggregateEventsFiles() { if (this._aggregatePromise) { return this._aggregatePromise; } @@ -389,7 +389,7 @@ this.CrashManager.prototype = Object.freeze({ * (Date) The cutoff point for pruning. Crashes without data newer * than this will be pruned. */ - pruneOldCrashes: function(date) { + pruneOldCrashes(date) { return Task.spawn(function* () { let store = yield this._getStore(); store.pruneOldCrashes(date); @@ -400,7 +400,7 @@ this.CrashManager.prototype = Object.freeze({ /** * Run tasks that should be periodically performed. */ - runMaintenanceTasks: function() { + runMaintenanceTasks() { return Task.spawn(function* () { yield this.aggregateEventsFiles(); @@ -415,7 +415,7 @@ this.CrashManager.prototype = Object.freeze({ * @param delay * (integer) Delay in milliseconds when maintenance should occur. */ - scheduleMaintenance: function(delay) { + scheduleMaintenance(delay) { let deferred = PromiseUtils.defer(); setTimeout(() => { @@ -439,7 +439,7 @@ this.CrashManager.prototype = Object.freeze({ * * @return promise Resolved when the store has been saved. */ - addCrash: function(processType, crashType, id, date, metadata) { + addCrash(processType, crashType, id, date, metadata) { let promise = Task.spawn(function* () { let store = yield this._getStore(); if (store.addCrash(processType, crashType, id, date, metadata)) { @@ -561,7 +561,7 @@ this.CrashManager.prototype = Object.freeze({ * * The promise-resolved array is sorted by file mtime, oldest to newest. */ - _getUnprocessedEventsFiles: function() { + _getUnprocessedEventsFiles() { return Task.spawn(function* () { let entries = []; @@ -578,7 +578,7 @@ this.CrashManager.prototype = Object.freeze({ }, // See docs/crash-events.rst for the file format specification. - _processEventFile: function(entry) { + _processEventFile(entry) { return Task.spawn(function* () { let data = yield OS.File.read(entry.path); let store = yield this._getStore(); @@ -617,7 +617,7 @@ this.CrashManager.prototype = Object.freeze({ }.bind(this)); }, - _filterAnnotations: function(annotations) { + _filterAnnotations(annotations) { let filteredAnnotations = {}; for (let line in annotations) { @@ -629,7 +629,7 @@ this.CrashManager.prototype = Object.freeze({ return filteredAnnotations; }, - _sendCrashPing: function(crashId, type, date, metadata = {}) { + _sendCrashPing(crashId, type, date, metadata = {}) { // If we have a saved environment, use it. Otherwise report // the current environment. let reportMeta = Cu.cloneInto(metadata, myScope); @@ -646,10 +646,10 @@ this.CrashManager.prototype = Object.freeze({ { version: 1, crashDate: date.toISOString().slice(0, 10), // YYYY-MM-DD - sessionId: sessionId, - crashId: crashId, + sessionId, + crashId, processType: type, - stackTraces: stackTraces, + stackTraces, metadata: reportMeta, hasCrashEnvironment: (crashEnvironment !== null), }, @@ -662,7 +662,7 @@ this.CrashManager.prototype = Object.freeze({ ); }, - _handleEventFilePayload: function(store, entry, type, date, payload) { + _handleEventFilePayload(store, entry, type, date, payload) { // The payload types and formats are documented in docs/crash-events.rst. // Do not change the format of an existing type. Instead, invent a new // type. @@ -720,7 +720,7 @@ this.CrashManager.prototype = Object.freeze({ * id -- regexp.match()[1] (likely the crash ID) * date -- Date mtime of the file */ - _getDirectoryEntries: function(path, re) { + _getDirectoryEntries(path, re) { return Task.spawn(function* () { try { yield OS.File.stat(path); @@ -763,7 +763,7 @@ this.CrashManager.prototype = Object.freeze({ }.bind(this)); }, - _getStore: function() { + _getStore() { if (this._getStoreTask) { return this._getStoreTask; } @@ -823,7 +823,7 @@ this.CrashManager.prototype = Object.freeze({ * * Returns an array of CrashRecord instances. Instances are read-only. */ - getCrashes: function() { + getCrashes() { return Task.spawn(function* () { let store = yield this._getStore(); @@ -831,7 +831,7 @@ this.CrashManager.prototype = Object.freeze({ }.bind(this)); }, - getCrashCountsByDay: function() { + getCrashCountsByDay() { return Task.spawn(function* () { let store = yield this._getStore(); @@ -908,7 +908,7 @@ CrashStore.prototype = Object.freeze({ * * @return Promise */ - load: function() { + load() { return Task.spawn(function* () { // Loading replaces data. this.reset(); @@ -1008,7 +1008,7 @@ CrashStore.prototype = Object.freeze({ * * @return Promise */ - save: function() { + save() { return Task.spawn(function* () { if (!this._data) { return; @@ -1078,7 +1078,7 @@ CrashStore.prototype = Object.freeze({ * We convert these to milliseconds since epoch on output and back to * Date on input. */ - _normalize: function(o) { + _normalize(o) { let normalized = {}; for (let k in o) { @@ -1096,7 +1096,7 @@ CrashStore.prototype = Object.freeze({ /** * Convert a serialized object back to its native form. */ - _denormalize: function(o) { + _denormalize(o) { let n = {}; for (let k in o) { @@ -1122,7 +1122,7 @@ CrashStore.prototype = Object.freeze({ * (Date) The cutoff at which data will be pruned. If an entry * doesn't have data newer than this, it will be pruned. */ - pruneOldCrashes: function(date) { + pruneOldCrashes(date) { for (let crash of this.crashes) { let newest = crash.newestDate; if (!newest || newest.getTime() < date.getTime()) { @@ -1167,7 +1167,7 @@ CrashStore.prototype = Object.freeze({ * A CrashRecord will be returned if the crash exists. null will be returned * if the crash is unknown. */ - getCrash: function(id) { + getCrash(id) { for (let crash of this.crashes) { if (crash.id == id) { return crash; @@ -1177,7 +1177,7 @@ CrashStore.prototype = Object.freeze({ return null; }, - _ensureCountsForDay: function(day) { + _ensureCountsForDay(day) { if (!this._countsByDay.has(day)) { this._countsByDay.set(day, new Map()); } @@ -1202,7 +1202,7 @@ CrashStore.prototype = Object.freeze({ * * @return null | object crash record */ - _ensureCrashRecord: function(processType, crashType, id, date, metadata) { + _ensureCrashRecord(processType, crashType, id, date, metadata) { if (!id) { // Crashes are keyed on ID, so it's not really helpful to store crashes // without IDs. @@ -1232,13 +1232,13 @@ CrashStore.prototype = Object.freeze({ } this._data.crashes.set(id, { - id: id, + id, remoteID: null, - type: type, + type, crashDate: date, submissions: new Map(), classifications: [], - metadata: metadata, + metadata, }); } @@ -1260,14 +1260,14 @@ CrashStore.prototype = Object.freeze({ * * @return boolean True if the crash was recorded and false if not. */ - addCrash: function(processType, crashType, id, date, metadata) { + addCrash(processType, crashType, id, date, metadata) { return !!this._ensureCrashRecord(processType, crashType, id, date, metadata); }, /** * @return boolean True if the remote ID was recorded and false if not. */ - setRemoteCrashID: function(crashID, remoteID) { + setRemoteCrashID(crashID, remoteID) { let crash = this._data.crashes.get(crashID); if (!crash || !remoteID) { return false; @@ -1277,7 +1277,7 @@ CrashStore.prototype = Object.freeze({ return true; }, - getCrashesOfType: function(processType, crashType) { + getCrashesOfType(processType, crashType) { let crashes = []; for (let crash of this.crashes) { if (crash.isOfType(processType, crashType)) { @@ -1292,7 +1292,7 @@ CrashStore.prototype = Object.freeze({ * Ensure the submission record is present in storage. * @returns [submission, crash] */ - _ensureSubmissionRecord: function(crashID, submissionID) { + _ensureSubmissionRecord(crashID, submissionID) { let crash = this._data.crashes.get(crashID); if (!crash || !submissionID) { return null; @@ -1312,7 +1312,7 @@ CrashStore.prototype = Object.freeze({ /** * @return boolean True if the attempt was recorded. */ - addSubmissionAttempt: function(crashID, submissionID, date) { + addSubmissionAttempt(crashID, submissionID, date) { let [submission, crash] = this._ensureSubmissionRecord(crashID, submissionID); if (!submission) { @@ -1328,7 +1328,7 @@ CrashStore.prototype = Object.freeze({ /** * @return boolean True if the response was recorded. */ - addSubmissionResult: function(crashID, submissionID, date, result) { + addSubmissionResult(crashID, submissionID, date, result) { let crash = this._data.crashes.get(crashID); if (!crash || !submissionID) { return false; @@ -1348,7 +1348,7 @@ CrashStore.prototype = Object.freeze({ /** * @return boolean True if the classifications were set. */ - setCrashClassifications: function(crashID, classifications) { + setCrashClassifications(crashID, classifications) { let crash = this._data.crashes.get(crashID); if (!crash) { return false; @@ -1407,7 +1407,7 @@ CrashRecord.prototype = Object.freeze({ return this._o.type; }, - isOfType: function(processType, crashType) { + isOfType(processType, crashType) { return processType + "-" + crashType == this.type; }, diff --git a/toolkit/components/crashes/CrashManagerTest.jsm b/toolkit/components/crashes/CrashManagerTest.jsm index e55da45468fd..f7fa11d8e0cf 100644 --- a/toolkit/components/crashes/CrashManagerTest.jsm +++ b/toolkit/components/crashes/CrashManagerTest.jsm @@ -57,7 +57,7 @@ this.TestingCrashManager = function(options) { this.TestingCrashManager.prototype = { __proto__: CrashManager.prototype, - createDummyDump: function(submitted = false, date = new Date(), hr = false) { + createDummyDump(submitted = false, date = new Date(), hr = false) { let uuid = Cc["@mozilla.org/uuid-generator;1"] .getService(Ci.nsIUUIDGenerator) .generateUUID() @@ -89,7 +89,7 @@ this.TestingCrashManager.prototype = { }); }, - createIgnoredDumpFile: function(filename, submitted = false) { + createIgnoredDumpFile(filename, submitted = false) { let path; if (submitted) { path = OS.Path.join(this._submittedDumpsDir, filename); @@ -104,7 +104,7 @@ this.TestingCrashManager.prototype = { }); }, - createEventsFile: function(filename, type, date, content, index = 0) { + createEventsFile(filename, type, date, content, index = 0) { let path = OS.Path.join(this._eventsDirs[index], filename); let data = type + "\n" + @@ -124,7 +124,7 @@ this.TestingCrashManager.prototype = { * * We can probably delete this once we have actual events defined. */ - _handleEventFilePayload: function(store, entry, type, date, payload) { + _handleEventFilePayload(store, entry, type, date, payload) { if (type == "test.1") { if (payload == "malformed") { return this.EVENT_FILE_ERROR_MALFORMED; diff --git a/toolkit/components/crashes/CrashService.js b/toolkit/components/crashes/CrashService.js index 72f804fc079d..76713524b81b 100644 --- a/toolkit/components/crashes/CrashService.js +++ b/toolkit/components/crashes/CrashService.js @@ -57,7 +57,7 @@ CrashService.prototype = Object.freeze({ Ci.nsIObserver, ]), - addCrash: function(processType, crashType, id) { + addCrash(processType, crashType, id) { switch (processType) { case Ci.nsICrashService.PROCESS_TYPE_MAIN: processType = Services.crashmanager.PROCESS_TYPE_MAIN; @@ -98,7 +98,7 @@ CrashService.prototype = Object.freeze({ ); }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { switch (topic) { case "profile-after-change": // Side-effect is the singleton is instantiated. diff --git a/toolkit/components/crashmonitor/CrashMonitor.jsm b/toolkit/components/crashmonitor/CrashMonitor.jsm index 6540d516fc2b..2ee173527507 100644 --- a/toolkit/components/crashmonitor/CrashMonitor.jsm +++ b/toolkit/components/crashmonitor/CrashMonitor.jsm @@ -93,7 +93,7 @@ var CrashMonitorInternal = { * * @return {Promise} A promise that resolves/rejects once loading is complete */ - loadPreviousCheckpoints: function() { + loadPreviousCheckpoints() { this.previousCheckpoints = Task.spawn(function*() { let data; try { @@ -155,7 +155,7 @@ this.CrashMonitor = { * * @return {Promise} */ - init: function() { + init() { if (CrashMonitorInternal.initialized) { throw new Error("CrashMonitor.init() must only be called once!"); } @@ -185,7 +185,7 @@ this.CrashMonitor = { * * Update checkpoint file for every new notification received. */ - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { if (!(aTopic in CrashMonitorInternal.checkpoints)) { // If this is the first time this notification is received, // remember it and write it to file diff --git a/toolkit/components/crashmonitor/nsCrashMonitor.js b/toolkit/components/crashmonitor/nsCrashMonitor.js index fe29a9c8eaea..d53fecd6d067 100644 --- a/toolkit/components/crashmonitor/nsCrashMonitor.js +++ b/toolkit/components/crashmonitor/nsCrashMonitor.js @@ -18,7 +18,7 @@ CrashMonitor.prototype = { QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIObserver]), - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { switch (aTopic) { case "profile-after-change": MonitorAPI.init(); diff --git a/toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js b/toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js index eec85025b5c5..7163e2755415 100644 --- a/toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js +++ b/toolkit/components/ctypes/tests/chrome/xpcshellTestHarnessAdaptor.js @@ -13,7 +13,7 @@ var Components = { caller: null }, utils: { - import: function() { } + import() { } } }; @@ -72,7 +72,7 @@ FileFaker.prototype = { this._path = this._path.substring(0, lastSlash); return this; }, - append: function(leaf) { + append(leaf) { this._path = this._path + "/" + leaf; } }; diff --git a/toolkit/components/ctypes/tests/unit/head.js b/toolkit/components/ctypes/tests/unit/head.js index 4e51b22a2ab5..e2c2ea4683c0 100644 --- a/toolkit/components/ctypes/tests/unit/head.js +++ b/toolkit/components/ctypes/tests/unit/head.js @@ -44,7 +44,7 @@ function ResourceTester(start, stop) { this._stop = stop; } ResourceTester.prototype = { - launch: function(size, test, args) { + launch(size, test, args) { trigger_gc(); let cleaner = new ResourceCleaner(); this._start(size); diff --git a/toolkit/components/ctypes/tests/unit/test_finalizer.js b/toolkit/components/ctypes/tests/unit/test_finalizer.js index d50437da6eb5..d19c82eed1fc 100644 --- a/toolkit/components/ctypes/tests/unit/test_finalizer.js +++ b/toolkit/components/ctypes/tests/unit/test_finalizer.js @@ -34,8 +34,8 @@ function run_test() ctypes.bool, ctypes.size_t, ctypes.size_t), - status: status, - released: released + status, + released }); samples.push( { @@ -53,8 +53,8 @@ function run_test() ctypes.bool, ctypes.size_t, ctypes.size_t), - status: status, - released: released + status, + released }); samples.push( { @@ -72,8 +72,8 @@ function run_test() ctypes.bool, ctypes.int32_t, ctypes.int32_t), - status: status, - released: released + status, + released } ); samples.push( @@ -92,8 +92,8 @@ function run_test() ctypes.bool, ctypes.int64_t, ctypes.int64_t), - status: status, - released: released + status, + released } ); samples.push( @@ -112,8 +112,8 @@ function run_test() ctypes.bool, ctypes.void_t.ptr, ctypes.void_t.ptr), - status: status, - released: released + status, + released } ); samples.push( @@ -132,8 +132,8 @@ function run_test() ctypes.bool, ctypes.char.ptr, ctypes.char.ptr), - status: status, - released: released + status, + released } ); const rect_t = new ctypes.StructType("myRECT", @@ -157,8 +157,8 @@ function run_test() ctypes.bool, rect_t, rect_t), - status: status, - released: released + status, + released } ); samples.push( @@ -177,7 +177,7 @@ function run_test() ctypes.bool, ctypes.size_t, ctypes.size_t), - status: status, + status, released: function released_eq(i, witness) { return i == witness; } @@ -199,7 +199,7 @@ function run_test() ctypes.bool, ctypes.size_t, ctypes.size_t), - status: status, + status, released: function released_rect_eq(i, witness) { return witness.top == i && witness.bottom == i @@ -228,7 +228,7 @@ function run_test() ctypes.bool, ctypes.void_t.ptr, ctypes.void_t.ptr), - released: released + released } ); @@ -397,8 +397,8 @@ function test_executing_forget(size, tc, cleanup) let finalizer = ctypes.CDataFinalizer(original, tc.release); ref.push( { - original: original, - finalizer: finalizer + original, + finalizer } ); cleanup.add(finalizer); diff --git a/toolkit/components/ctypes/tests/unit/test_jsctypes.js b/toolkit/components/ctypes/tests/unit/test_jsctypes.js index 18861a185c3c..f91f40992d24 100644 --- a/toolkit/components/ctypes/tests/unit/test_jsctypes.js +++ b/toolkit/components/ctypes/tests/unit/test_jsctypes.js @@ -413,8 +413,8 @@ function run_Int64_tests() { ctypes.UInt64("0x8000000000000000"), Infinity, -Infinity, NaN, 0.1, 5.68e21, null, undefined, "", {}, [], new Number(16), - {toString: function() { return 7; }}, - {valueOf: function() { return 7; }}]; + {toString() { return 7; }}, + {valueOf() { return 7; }}]; for (let i = 0; i < vals.length; i++) do_check_throws(function() { ctypes.Int64(vals[i]); }, TypeError); @@ -563,8 +563,8 @@ function run_UInt64_tests() { let vals = [-1, 0x10000000000000000, "-1", "-0x1", ctypes.Int64("-1"), Infinity, -Infinity, NaN, 0.1, 5.68e21, null, undefined, "", {}, [], new Number(16), - {toString: function() { return 7; }}, - {valueOf: function() { return 7; }}]; + {toString() { return 7; }}, + {valueOf() { return 7; }}]; for (let i = 0; i < vals.length; i++) do_check_throws(function() { ctypes.UInt64(vals[i]); }, TypeError); @@ -778,8 +778,8 @@ function run_bool_tests(library) { let vals = [-1, 2, Infinity, -Infinity, NaN, 0.1, ctypes.Int64(0), ctypes.UInt64(0), null, undefined, "", "0", {}, [], new Number(16), - {toString: function() { return 7; }}, - {valueOf: function() { return 7; }}]; + {toString() { return 7; }}, + {valueOf() { return 7; }}]; for (let i = 0; i < vals.length; i++) do_check_throws(function() { d.value = vals[i]; }, TypeError); @@ -858,8 +858,8 @@ function run_integer_tests(library, t, name, size, signed, limits) { // don't convert anything else let vals = [limits[0] - 1, limits[1] + 1, Infinity, -Infinity, NaN, 0.1, null, undefined, "", "0", {}, [], new Number(16), - {toString: function() { return 7; }}, - {valueOf: function() { return 7; }}]; + {toString() { return 7; }}, + {valueOf() { return 7; }}]; for (let i = 0; i < vals.length; i++) do_check_throws(function() { d.value = vals[i]; }, TypeError); @@ -945,8 +945,8 @@ function run_float_tests(library, t, name, size) { // don't convert anything else let vals = [true, false, null, undefined, "", "0", {}, [], new Number(16), - {toString: function() { return 7; }}, - {valueOf: function() { return 7; }}]; + {toString() { return 7; }}, + {valueOf() { return 7; }}]; for (let i = 0; i < vals.length; i++) do_check_throws(function() { d.value = vals[i]; }, TypeError); @@ -1045,8 +1045,8 @@ function run_wrapped_integer_tests(library, t, name, size, signed, w, wname, lim // don't convert anything else let vals = [limits[2], limits[3], Infinity, -Infinity, NaN, 0.1, null, undefined, "", "0", {}, [], new Number(16), - {toString: function() { return 7; }}, - {valueOf: function() { return 7; }}]; + {toString() { return 7; }}, + {valueOf() { return 7; }}]; for (let i = 0; i < vals.length; i++) do_check_throws(function() { d.value = vals[i]; }, TypeError); @@ -1128,8 +1128,8 @@ function run_char_tests(library, t, name, size, signed, limits) { // don't convert anything else let vals = [limits[0] - 1, limits[1] + 1, Infinity, -Infinity, NaN, 0.1, null, undefined, "", "aa", {}, [], new Number(16), - {toString: function() { return 7; }}, - {valueOf: function() { return 7; }}]; + {toString() { return 7; }}, + {valueOf() { return 7; }}]; for (let i = 0; i < vals.length; i++) do_check_throws(function() { d.value = vals[i]; }, TypeError); @@ -1220,8 +1220,8 @@ function run_char16_tests(library, t, name, limits) { // don't convert anything else let vals = [limits[0] - 1, limits[1] + 1, Infinity, -Infinity, NaN, 0.1, null, undefined, "", "aa", {}, [], new Number(16), - {toString: function() { return 7; }}, - {valueOf: function() { return 7; }}]; + {toString() { return 7; }}, + {valueOf() { return 7; }}]; for (let i = 0; i < vals.length; i++) do_check_throws(function() { d.value = vals[i]; }, TypeError); @@ -2223,7 +2223,7 @@ function run_string_tests(library) { do_check_eq(test_ansi_len("hello world"), 11); // don't convert anything else to a string - let vals = [true, 0, 1 / 3, undefined, {}, {toString: function() { return "bad"; }}, []]; + let vals = [true, 0, 1 / 3, undefined, {}, {toString() { return "bad"; }}, []]; for (let i = 0; i < vals.length; i++) do_check_throws(function() { test_ansi_len(vals[i]); }, TypeError); diff --git a/toolkit/components/downloads/test/unit/test_app_rep_windows.js b/toolkit/components/downloads/test/unit/test_app_rep_windows.js index 49d89751bc83..44fd26999830 100644 --- a/toolkit/components/downloads/test/unit/test_app_rep_windows.js +++ b/toolkit/components/downloads/test/unit/test_app_rep_windows.js @@ -119,8 +119,8 @@ function promiseCopyToSaver(aSourceString, aSaverOutputStream, aCloseWhenDone) { copier.init(inputStream, aSaverOutputStream, null, false, true, 0x8000, true, aCloseWhenDone); copier.asyncCopy({ - onStartRequest: function() { }, - onStopRequest: function(aRequest, aContext, aStatusCode) + onStartRequest() { }, + onStopRequest(aRequest, aContext, aStatusCode) { if (Components.isSuccessCode(aStatusCode)) { deferred.resolve(); diff --git a/toolkit/components/extensions/ExtensionContent.jsm b/toolkit/components/extensions/ExtensionContent.jsm index 53a2fff41d74..6d762348674a 100644 --- a/toolkit/components/extensions/ExtensionContent.jsm +++ b/toolkit/components/extensions/ExtensionContent.jsm @@ -143,6 +143,7 @@ Script.prototype = { matches(window) { let uri = window.document.documentURIObject; + let principal = window.document.nodePrincipal; // If mozAddonManager is present on this page, don't allow // content scripts. @@ -150,16 +151,25 @@ Script.prototype = { return false; } - if (this.match_about_blank && ["about:blank", "about:srcdoc"].includes(uri.spec)) { - const principal = window.document.nodePrincipal; - + if (this.match_about_blank) { // When matching top-level about:blank documents, // allow loading into any with a NullPrincipal. - if (window === window.top && principal.isNullPrincipal) { + if (uri.spec === "about:blank" && window === window.top && principal.isNullPrincipal) { return true; } + // When matching about:blank/srcdoc iframes, the checks below // need to be performed against the "owner" document's URI. + if (["about:blank", "about:srcdoc"].includes(uri.spec)) { + uri = principal.URI; + } + } + + // Documents from data: URIs also inherit the principal. + if (Services.netUtils.URIChainHasFlags(uri, Ci.nsIProtocolHandler.URI_INHERITS_SECURITY_CONTEXT)) { + if (!this.match_about_blank) { + return false; + } uri = principal.URI; } diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js b/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js index 7e9c715f69a1..f1f32995fa5f 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_storage_sync.js @@ -513,7 +513,6 @@ add_task(function* ensureKeysFor_posts_new_keys() { const newBody = yield assertPostedEncryptedKeys(newPost); ok(newBody.keys.collections[extensionId], `keys object should have a key for ${extensionId}`); ok(newBody.keys.collections[extensionId2], `keys object should have a key for ${extensionId2}`); - }); }); }); diff --git a/toolkit/components/exthelper/extApplication.js b/toolkit/components/exthelper/extApplication.js index ff17f37e5234..b592e8cdc782 100644 --- a/toolkit/components/exthelper/extApplication.js +++ b/toolkit/components/exthelper/extApplication.js @@ -663,7 +663,7 @@ extApplication.prototype = { return this.prefs; }, - getExtensions: function(callback) { + getExtensions(callback) { AddonManager.getAddonsByTypes(["extension"], function(addons) { callback.callback(new Extensions(addons)); }); diff --git a/toolkit/components/feeds/test/test_xml.js b/toolkit/components/feeds/test/test_xml.js index 5bc0d759d12a..5a6f350ef011 100644 --- a/toolkit/components/feeds/test/test_xml.js +++ b/toolkit/components/feeds/test/test_xml.js @@ -32,7 +32,7 @@ function FeedListener(testcase) { } FeedListener.prototype = { - handleResult: function(result) { + handleResult(result) { var feed = result.doc; try { do_print("Testing feed " + this.testcase.file.path); diff --git a/toolkit/components/filepicker/content/filepicker.js b/toolkit/components/filepicker/content/filepicker.js index 7dc0a936e616..1069a7b2cfa4 100644 --- a/toolkit/components/filepicker/content/filepicker.js +++ b/toolkit/components/filepicker/content/filepicker.js @@ -368,11 +368,11 @@ var gFilesEnumerator = { mFiles: null, mIndex: 0, - hasMoreElements: function() + hasMoreElements() { return (this.mIndex < this.mFiles.length); }, - getNext: function() + getNext() { if (this.mIndex >= this.mFiles.length) throw Components.results.NS_ERROR_FAILURE; diff --git a/toolkit/components/filepicker/nsFilePicker.js b/toolkit/components/filepicker/nsFilePicker.js index 97bb78e7631f..f40b0562765d 100644 --- a/toolkit/components/filepicker/nsFilePicker.js +++ b/toolkit/components/filepicker/nsFilePicker.js @@ -68,7 +68,7 @@ function nsFilePicker() nsFilePicker.prototype = { classID: Components.ID("{54ae32f8-1dd2-11b2-a209-df7c505370f8}"), - QueryInterface: function(iid) { + QueryInterface(iid) { if (iid.equals(nsIFilePicker) || iid.equals(nsISupports)) return this; @@ -113,11 +113,11 @@ nsFilePicker.prototype = { mFiles: [], mIndex: 0, - hasMoreElements: function() { + hasMoreElements() { return (this.mIndex < this.mFiles.length); }, - getNext: function() { + getNext() { if (this.mIndex >= this.mFiles.length) { throw Components.results.NS_ERROR_FAILURE; } @@ -176,13 +176,13 @@ nsFilePicker.prototype = { mParentWindow: null, /* methods */ - init: function(parent, title, mode) { + init(parent, title, mode) { this.mParentWindow = parent; this.mTitle = title; this.mMode = mode; }, - appendFilters: function(filterMask) { + appendFilters(filterMask) { if (filterMask & nsIFilePicker.filterHTML) { this.appendFilter(titleBundle.GetStringFromName("htmlTitle"), filterBundle.GetStringFromName("htmlFilter")); @@ -223,12 +223,12 @@ nsFilePicker.prototype = { } }, - appendFilter: function(title, extensions) { + appendFilter(title, extensions) { this.mFilterTitles.push(title); this.mFilters.push(extensions); }, - open: function(aFilePickerShownCallback) { + open(aFilePickerShownCallback) { var tm = Components.classes["@mozilla.org/thread-manager;1"] .getService(Components.interfaces.nsIThreadManager); tm.mainThread.dispatch(function() { @@ -243,7 +243,7 @@ nsFilePicker.prototype = { }.bind(this), Components.interfaces.nsIThread.DISPATCH_NORMAL); }, - show: function() { + show() { var o = {}; o.title = this.mTitle; o.mode = this.mMode; diff --git a/toolkit/components/filepicker/test/unit/test_filecomplete.js b/toolkit/components/filepicker/test/unit/test_filecomplete.js index d1e18d533748..8e15f4ac2bbf 100644 --- a/toolkit/components/filepicker/test/unit/test_filecomplete.js +++ b/toolkit/components/filepicker/test/unit/test_filecomplete.js @@ -19,7 +19,7 @@ dir.append("test_dir"); dir.create(dir.DIRECTORY_TYPE, -1); var gListener = { - onSearchResult: function(aSearch, aResult) { + onSearchResult(aSearch, aResult) { // Check that we got same search string back. do_check_eq(aResult.searchString, "test"); // Check that the search succeeded. diff --git a/toolkit/components/formautofill/FormAutofillContentService.js b/toolkit/components/formautofill/FormAutofillContentService.js index 2b64e19663a3..1de839f54d63 100644 --- a/toolkit/components/formautofill/FormAutofillContentService.js +++ b/toolkit/components/formautofill/FormAutofillContentService.js @@ -76,7 +76,7 @@ FormHandler.prototype = { ? new this.window.Event("autocomplete", { bubbles: true }) : new this.window.AutocompleteErrorEvent("autocompleteerror", { bubbles: true, - reason: reason }); + reason }); yield this.waitForTick(); this.form.dispatchEvent(event); }), @@ -143,7 +143,7 @@ FormHandler.prototype = { * interface, or null if the operation failed because the constraints * on the allowed fields were not honored. */ - collectFormFields: function() { + collectFormFields() { let autofillData = { sections: [], }; @@ -173,7 +173,7 @@ FormHandler.prototype = { addressType: info.addressType, contactType: info.contactType, fieldName: info.fieldName, - element: element, + element, }); // The first level is the custom section. @@ -225,7 +225,7 @@ FormHandler.prototype = { * ], * } */ - autofillFormFields: function(aAutofillResult) { + autofillFormFields(aAutofillResult) { for (let field of aAutofillResult.fields) { // Get the field details, if it was processed by the user interface. let fieldDetail = this.fieldDetails @@ -244,7 +244,7 @@ FormHandler.prototype = { /** * Waits for one tick of the event loop before resolving the returned promise. */ - waitForTick: function() { + waitForTick() { return new Promise(function(resolve) { Services.tm.currentThread.dispatch(resolve, Ci.nsIThread.DISPATCH_NORMAL); }); @@ -263,7 +263,7 @@ FormAutofillContentService.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIFormAutofillContentService]), // nsIFormAutofillContentService - requestAutocomplete: function(aForm, aWindow) { + requestAutocomplete(aForm, aWindow) { new FormHandler(aForm, aWindow).handleRequestAutocomplete() .catch(Cu.reportError); }, diff --git a/toolkit/components/formautofill/FormAutofillStartup.js b/toolkit/components/formautofill/FormAutofillStartup.js index a2c3b125774f..b459bc67fa61 100644 --- a/toolkit/components/formautofill/FormAutofillStartup.js +++ b/toolkit/components/formautofill/FormAutofillStartup.js @@ -31,7 +31,7 @@ FormAutofillStartup.prototype = { ]), // nsIObserver - observe: function(aSubject, aTopic, aData) { + observe(aSubject, aTopic, aData) { // This method is called by the "profile-after-change" category on startup, // which is called before any web page loads. At this time, we need to // register a global message listener in the parent process preemptively, @@ -44,7 +44,7 @@ FormAutofillStartup.prototype = { }, // nsIFrameMessageListener - receiveMessage: function(aMessage) { + receiveMessage(aMessage) { // Process the "FormAutofill:RequestAutocomplete" message. Any exception // raised in the parent process is caught and serialized into the reply // message that is sent to the requesting child process. diff --git a/toolkit/components/formautofill/content/RequestAutocompleteUI.jsm b/toolkit/components/formautofill/content/RequestAutocompleteUI.jsm index f2f2ddded104..23743f49e056 100644 --- a/toolkit/components/formautofill/content/RequestAutocompleteUI.jsm +++ b/toolkit/components/formautofill/content/RequestAutocompleteUI.jsm @@ -40,7 +40,7 @@ this.RequestAutocompleteUI.prototype = { // Wrap the callback function so that it survives XPCOM. let args = { - resolveFn: resolveFn, + resolveFn, autofillData: this._autofillData, }; args.wrappedJSObject = args; diff --git a/toolkit/components/formautofill/content/requestAutocomplete.js b/toolkit/components/formautofill/content/requestAutocomplete.js index 5dbbdc9c182d..269018d8ffb9 100644 --- a/toolkit/components/formautofill/content/requestAutocomplete.js +++ b/toolkit/components/formautofill/content/requestAutocomplete.js @@ -22,7 +22,7 @@ const RequestAutocompleteDialog = { resolveFn: null, autofillData: null, - onLoad: function() { + onLoad() { Task.spawn(function* () { let args = window.arguments[0].wrappedJSObject; this.resolveFn = args.resolveFn; @@ -35,7 +35,7 @@ const RequestAutocompleteDialog = { }.bind(this)).catch(Cu.reportError); }, - onAccept: function() { + onAccept() { // TODO: Replace with autofill storage module (bug 1018304). const dummyDB = { "": { @@ -65,7 +65,7 @@ const RequestAutocompleteDialog = { result.fields.push({ section: section.name, - addressType: addressType, + addressType, contactType: field.contactType, fieldName: field.fieldName, value: dummyDB[addressType][fieldName], @@ -78,7 +78,7 @@ const RequestAutocompleteDialog = { this.resolveFn(result); }, - onCancel: function() { + onCancel() { window.close(); this.resolveFn({ canceled: true }); }, diff --git a/toolkit/components/formautofill/test/chrome/loader.js b/toolkit/components/formautofill/test/chrome/loader.js index 556211e3df30..4cdc3cd6ed59 100644 --- a/toolkit/components/formautofill/test/chrome/loader.js +++ b/toolkit/components/formautofill/test/chrome/loader.js @@ -33,7 +33,7 @@ var testUrl = location.href.replace(/\.\w+$/, ".js"); var promiseParentInitFinished = new Promise(function(resolve) { parentScript.addMessageListener("finish_load_in_parent", resolve); }); -parentScript.sendAsyncMessage("start_load_in_parent", { testUrl: testUrl }); +parentScript.sendAsyncMessage("start_load_in_parent", { testUrl }); // Define output functions so they look the same across all frameworks. var Output = { diff --git a/toolkit/components/formautofill/test/head_common.js b/toolkit/components/formautofill/test/head_common.js index f3fec4293929..87a23f0756a1 100644 --- a/toolkit/components/formautofill/test/head_common.js +++ b/toolkit/components/formautofill/test/head_common.js @@ -42,7 +42,7 @@ var TestUtils = { * @resolves When pending events have been processed. * @rejects Never. */ - waitForTick: function() { + waitForTick() { return new Promise(resolve => executeSoon(resolve)); }, @@ -58,7 +58,7 @@ var TestUtils = { * @resolves When the specified time has passed. * @rejects Never. */ - waitMs: function(aTimeMs) { + waitMs(aTimeMs) { return new Promise(resolve => setTimeout(resolve, aTimeMs)); }, @@ -72,7 +72,7 @@ var TestUtils = { * @resolves The array [aSubject, aData] from the observed notification. * @rejects Never. */ - waitForNotification: function(aTopic) { + waitForNotification(aTopic) { Output.print("Waiting for notification: '" + aTopic + "'."); return new Promise(resolve => Services.obs.addObserver( @@ -96,7 +96,7 @@ var TestUtils = { * @resolves The arguments from the observed event. * @rejects Never. */ - waitForEvent: function(aTarget, aEventName, aUseCapture = false) { + waitForEvent(aTarget, aEventName, aUseCapture = false) { Output.print("Waiting for event: '" + aEventName + "' on " + aTarget + "."); return new Promise(resolve => aTarget.addEventListener(aEventName, @@ -183,7 +183,7 @@ var FormAutofillTest = { // The window is the subject of the observer notification. return { uiWindow: (yield promiseUIWindow)[0], - promiseResult: promiseResult, + promiseResult, }; }), }; diff --git a/toolkit/components/formautofill/test/loader_common.js b/toolkit/components/formautofill/test/loader_common.js index 3f5fae5b2f49..33a838b4a31b 100644 --- a/toolkit/components/formautofill/test/loader_common.js +++ b/toolkit/components/formautofill/test/loader_common.js @@ -104,12 +104,12 @@ function getTaskId(stackFrame) { // This is a shared helper for mochitest-chrome and mochitest-browser. var _mochitestAssert = { - ok: function(actual) { + ok(actual) { let stack = Components.stack.caller; ok(actual, "[" + stack.name + " : " + stack.lineNumber + "] " + actual + " == true"); }, - equal: function(actual, expected) { + equal(actual, expected) { let stack = Components.stack.caller; is(actual, expected, "[" + stack.name + " : " + stack.lineNumber + "] " + actual + " == " + expected); diff --git a/toolkit/components/gfx/SanityTest.js b/toolkit/components/gfx/SanityTest.js index f600d2bd4e56..3f43202cd163 100644 --- a/toolkit/components/gfx/SanityTest.js +++ b/toolkit/components/gfx/SanityTest.js @@ -153,7 +153,7 @@ var listener = { "gfxSanity:ContentLoaded", ], - scheduleTest: function(win) { + scheduleTest(win) { this.win = win; this.win.onload = this.onWindowLoaded.bind(this); this.utils = this.win.QueryInterface(Ci.nsIInterfaceRequestor) @@ -166,7 +166,7 @@ var listener = { }); }, - runSanityTest: function() { + runSanityTest() { this.canvas = this.win.document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"); this.canvas.setAttribute("width", PAGE_WIDTH); this.canvas.setAttribute("height", PAGE_HEIGHT); @@ -187,7 +187,7 @@ var listener = { } }, - onWindowLoaded: function() { + onWindowLoaded() { let browser = this.win.document.createElementNS(XUL_NS, "browser"); browser.setAttribute("type", "content"); @@ -208,7 +208,7 @@ var listener = { this.mm.loadFrameScript(FRAME_SCRIPT_URL, false); }, - endTest: function() { + endTest() { if (!this.win) { return; } @@ -240,7 +240,7 @@ SanityTest.prototype = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]), - shouldRunTest: function() { + shouldRunTest() { // Only test gfx features if firefox has updated, or if the user has a new // gpu or drivers. var buildId = Services.appinfo.platformBuildID; @@ -286,7 +286,7 @@ SanityTest.prototype = { return true; }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { if (topic != "profile-after-change") return; // profile-after-change fires only at startup, so we won't need diff --git a/toolkit/components/gfx/content/gfxFrameScript.js b/toolkit/components/gfx/content/gfxFrameScript.js index 4b48dc11ac7e..eaac257ceff7 100644 --- a/toolkit/components/gfx/content/gfxFrameScript.js +++ b/toolkit/components/gfx/content/gfxFrameScript.js @@ -3,7 +3,7 @@ var { classes: Cc, interfaces: Ci, utils: Cu } = Components; const gfxFrameScript = { domUtils: null, - init: function() { + init() { let webNav = docShell.QueryInterface(Ci.nsIWebNavigation); let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebProgress); @@ -18,7 +18,7 @@ const gfxFrameScript = { }, - handleEvent: function(aEvent) { + handleEvent(aEvent) { switch (aEvent.type) { case "MozAfterPaint": sendAsyncMessage('gfxSanity:ContentLoaded'); @@ -27,7 +27,7 @@ const gfxFrameScript = { } }, - isSanityTest: function(aUri) { + isSanityTest(aUri) { if (!aUri) { return false; } @@ -35,7 +35,7 @@ const gfxFrameScript = { return aUri.endsWith("/sanitytest.html"); }, - onStateChange: function(webProgress, req, flags, status) { + onStateChange(webProgress, req, flags, status) { if (webProgress.isTopLevel && (flags & Ci.nsIWebProgressListener.STATE_STOP) && this.isSanityTest(req.name)) { diff --git a/toolkit/components/jsdownloads/src/DownloadCore.jsm b/toolkit/components/jsdownloads/src/DownloadCore.jsm index 043f20cc18e9..ef10dec742b9 100644 --- a/toolkit/components/jsdownloads/src/DownloadCore.jsm +++ b/toolkit/components/jsdownloads/src/DownloadCore.jsm @@ -622,7 +622,7 @@ this.Download.prototype = { * @resolves When the Download has been unblocked and succeeded. * @rejects JavaScript exception if any of the operations failed. */ - unblock: function() { + unblock() { if (this._promiseUnblock) { return this._promiseUnblock; } @@ -666,7 +666,7 @@ this.Download.prototype = { * @resolves When the Download's data has been removed. * @rejects JavaScript exception if any of the operations failed. */ - confirmBlock: function() { + confirmBlock() { if (this._promiseConfirmBlock) { return this._promiseConfirmBlock; } @@ -711,7 +711,7 @@ this.Download.prototype = { * @rejects JavaScript exception if there was an error trying to launch * the file. */ - launch: function() { + launch() { if (!this.succeeded) { return Promise.reject( new Error("launch can only be called if the download succeeded") @@ -845,7 +845,7 @@ this.Download.prototype = { * @resolves When the partial data has been successfully removed. * @rejects JavaScript exception if the operation could not be completed. */ - removePartialData: function() + removePartialData() { if (!this.canceled && !this.error) { return Promise.resolve(); @@ -920,7 +920,7 @@ this.Download.prototype = { * @resolves When the operation has completed. * @rejects Never. */ - refresh: function() + refresh() { return Task.spawn(function* () { if (!this.stopped || this._finalized) { @@ -999,7 +999,7 @@ this.Download.prototype = { * @rejects JavaScript exception if an error occurred while removing the * partially downloaded data. */ - finalize: function(aRemovePartialData) + finalize(aRemovePartialData) { // Prevents the download from starting again after having been stopped. this._finalized = true; @@ -1096,7 +1096,7 @@ this.Download.prototype = { * * @return A JavaScript object that can be serialized to JSON. */ - toSerializable: function() + toSerializable() { let serializable = { source: this.source.toSerializable(), @@ -1148,7 +1148,7 @@ this.Download.prototype = { * * @return String representing the relevant download state. */ - getSerializationHash: function() + getSerializationHash() { // The "succeeded", "canceled", "error", and startTime properties are not // taken into account because they all change before the "stopped" property @@ -1296,7 +1296,7 @@ this.DownloadSource.prototype = { * * @return A JavaScript object that can be serialized to JSON. */ - toSerializable: function() + toSerializable() { if (this.adjustChannel) { // If the callback was used, we can't reproduce this across sessions. @@ -1452,7 +1452,7 @@ this.DownloadTarget.prototype = { * * @return A JavaScript object that can be serialized to JSON. */ - toSerializable: function() + toSerializable() { // Simplify the representation if we don't have other details. if (!this.partFilePath && !this._unknownProperties) { @@ -1654,7 +1654,7 @@ this.DownloadError.prototype = { * * @return A JavaScript object that can be serialized to JSON. */ - toSerializable: function() + toSerializable() { let serializable = { result: this.result, @@ -1769,7 +1769,7 @@ this.DownloadSaver.prototype = { * started, to add it to the browsing history. This method has no effect if * the download is private. */ - addToHistory: function() + addToHistory() { if (this.download.source.isPrivate) { return; @@ -1806,7 +1806,7 @@ this.DownloadSaver.prototype = { * * @return A JavaScript object that can be serialized to JSON. */ - toSerializable: function() + toSerializable() { throw new Error("Not implemented."); }, @@ -1814,12 +1814,12 @@ this.DownloadSaver.prototype = { /** * Returns the SHA-256 hash of the downloaded file, if it exists. */ - getSha256Hash: function() + getSha256Hash() { throw new Error("Not implemented."); }, - getSignatureInfo: function() + getSignatureInfo() { throw new Error("Not implemented."); }, @@ -1968,7 +1968,7 @@ this.DownloadCopySaver.prototype = { // When the operation completes, reflect the status in the promise // returned by this download execution function. backgroundFileSaver.observer = { - onTargetChange: function() { }, + onTargetChange() { }, onSaveComplete: (aSaver, aStatus) => { // Send notifications now that we can restart if needed. if (Components.isSuccessCode(aStatus)) { @@ -2033,7 +2033,7 @@ this.DownloadCopySaver.prototype = { aSetProgressBytesFn(currentBytes, totalBytes, aProgress > 0 && partFilePath && keepPartialData); }, - onStatus: function() { }, + onStatus() { }, }; // If the callback was set, handle it now before opening the channel. @@ -2257,7 +2257,7 @@ this.DownloadCopySaver.prototype = { /** * Implements "DownloadSaver.removePartialData". */ - removePartialData: function() + removePartialData() { return Task.spawn(function* task_DCS_removePartialData() { if (this.download.target.partFilePath) { @@ -2275,7 +2275,7 @@ this.DownloadCopySaver.prototype = { /** * Implements "DownloadSaver.toSerializable". */ - toSerializable: function() + toSerializable() { // Simplify the representation if we don't have other details. if (!this.entityID && !this._unknownProperties) { @@ -2291,7 +2291,7 @@ this.DownloadCopySaver.prototype = { /** * Implements "DownloadSaver.getSha256Hash" */ - getSha256Hash: function() + getSha256Hash() { return this._sha256Hash; }, @@ -2299,7 +2299,7 @@ this.DownloadCopySaver.prototype = { /* * Implements DownloadSaver.getSignatureInfo. */ - getSignatureInfo: function() + getSignatureInfo() { return this._signatureInfo; }, @@ -2307,7 +2307,7 @@ this.DownloadCopySaver.prototype = { /* * Implements DownloadSaver.getRedirects. */ - getRedirects: function() + getRedirects() { return this._redirects; } @@ -2440,7 +2440,7 @@ this.DownloadLegacySaver.prototype = { * download is added to the browsing history here. Private downloads * are never added to history even if this parameter is false. */ - onTransferStarted: function(aRequest, aAlreadyAddedToHistory) + onTransferStarted(aRequest, aAlreadyAddedToHistory) { // Store the entity ID to use for resuming if required. if (this.download.tryToKeepPartialData && @@ -2603,7 +2603,7 @@ this.DownloadLegacySaver.prototype = { }.bind(this)); }, - _checkReputationAndMove: function() { + _checkReputationAndMove() { return DownloadCopySaver.prototype._checkReputationAndMove .apply(this, arguments); }, @@ -2629,7 +2629,7 @@ this.DownloadLegacySaver.prototype = { /** * Implements "DownloadSaver.removePartialData". */ - removePartialData: function() + removePartialData() { // DownloadCopySaver and DownloadLeagcySaver use the same logic for removing // partially downloaded data, though this implementation isn't shared by @@ -2640,7 +2640,7 @@ this.DownloadLegacySaver.prototype = { /** * Implements "DownloadSaver.toSerializable". */ - toSerializable: function() + toSerializable() { // This object depends on legacy components that are created externally, // thus it cannot be rebuilt during deserialization. To support resuming @@ -2652,7 +2652,7 @@ this.DownloadLegacySaver.prototype = { /** * Implements "DownloadSaver.getSha256Hash". */ - getSha256Hash: function() + getSha256Hash() { if (this.copySaver) { return this.copySaver.getSha256Hash(); @@ -2663,7 +2663,7 @@ this.DownloadLegacySaver.prototype = { /** * Called by the nsITransfer implementation when the hash is available. */ - setSha256Hash: function(hash) + setSha256Hash(hash) { this._sha256Hash = hash; }, @@ -2671,7 +2671,7 @@ this.DownloadLegacySaver.prototype = { /** * Implements "DownloadSaver.getSignatureInfo". */ - getSignatureInfo: function() + getSignatureInfo() { if (this.copySaver) { return this.copySaver.getSignatureInfo(); @@ -2682,7 +2682,7 @@ this.DownloadLegacySaver.prototype = { /** * Called by the nsITransfer implementation when the hash is available. */ - setSignatureInfo: function(signatureInfo) + setSignatureInfo(signatureInfo) { this._signatureInfo = signatureInfo; }, @@ -2690,7 +2690,7 @@ this.DownloadLegacySaver.prototype = { /** * Implements "DownloadSaver.getRedirects". */ - getRedirects: function() + getRedirects() { if (this.copySaver) { return this.copySaver.getRedirects(); @@ -2702,7 +2702,7 @@ this.DownloadLegacySaver.prototype = { * Called by the nsITransfer implementation when the redirect chain is * available. */ - setRedirects: function(redirects) + setRedirects(redirects) { this._redirects = redirects; }, @@ -2746,7 +2746,7 @@ this.DownloadPDFSaver.prototype = { /** * Implements "DownloadSaver.execute". */ - execute: function(aSetProgressBytesFn, aSetPropertiesFn) + execute(aSetProgressBytesFn, aSetPropertiesFn) { return Task.spawn(function* task_DCS_execute() { if (!this.download.source.windowRef) { @@ -2801,7 +2801,7 @@ this.DownloadPDFSaver.prototype = { try { yield new Promise((resolve, reject) => { this._webBrowserPrint.print(printSettings, { - onStateChange: function(webProgress, request, stateFlags, status) { + onStateChange(webProgress, request, stateFlags, status) { if (stateFlags & Ci.nsIWebProgressListener.STATE_STOP) { if (!Components.isSuccessCode(status)) { reject(new DownloadError({ result: status, @@ -2811,14 +2811,14 @@ this.DownloadPDFSaver.prototype = { } } }, - onProgressChange: function(webProgress, request, curSelfProgress, + onProgressChange(webProgress, request, curSelfProgress, maxSelfProgress, curTotalProgress, maxTotalProgress) { aSetProgressBytesFn(curTotalProgress, maxTotalProgress, false); }, - onLocationChange: function() {}, - onStatusChange: function() {}, - onSecurityChange: function() {}, + onLocationChange() {}, + onStatusChange() {}, + onSecurityChange() {}, }); }); } finally { @@ -2845,7 +2845,7 @@ this.DownloadPDFSaver.prototype = { /** * Implements "DownloadSaver.toSerializable". */ - toSerializable: function() + toSerializable() { if (this.download.succeeded) { return DownloadCopySaver.prototype.toSerializable.call(this); diff --git a/toolkit/components/jsdownloads/src/DownloadImport.jsm b/toolkit/components/jsdownloads/src/DownloadImport.jsm index c1c81cc6e617..fec2348fe499 100644 --- a/toolkit/components/jsdownloads/src/DownloadImport.jsm +++ b/toolkit/components/jsdownloads/src/DownloadImport.jsm @@ -68,7 +68,7 @@ this.DownloadImport.prototype = { * from the previous database has been read and added to * the DownloadList) */ - import: function() { + import() { return Task.spawn(function* task_DI_import() { let connection = yield Sqlite.openConnection({ path: this.path }); @@ -142,7 +142,7 @@ this.DownloadImport.prototype = { let downloadOptions = { source: { url: source, - referrer: referrer + referrer }, target: { path: targetPath, @@ -150,13 +150,13 @@ this.DownloadImport.prototype = { }, saver: { type: "copy", - entityID: entityID + entityID }, startTime: new Date(startTime / 1000), totalBytes: maxBytes, hasPartialData: !!tempPath, tryToKeepPartialData: true, - launchWhenSucceeded: launchWhenSucceeded, + launchWhenSucceeded, contentType: mimeType, launcherPath: preferredApplication }; diff --git a/toolkit/components/jsdownloads/src/DownloadLegacy.js b/toolkit/components/jsdownloads/src/DownloadLegacy.js index c9bcbdd82e15..368215524eaf 100644 --- a/toolkit/components/jsdownloads/src/DownloadLegacy.js +++ b/toolkit/components/jsdownloads/src/DownloadLegacy.js @@ -166,7 +166,7 @@ DownloadLegacyTransfer.prototype = { aMaxTotalProgress); }, - onLocationChange: function() { }, + onLocationChange() { }, onStatusChange: function DLT_onStatusChange(aWebProgress, aRequest, aStatus, aMessage) @@ -184,7 +184,7 @@ DownloadLegacyTransfer.prototype = { } }, - onSecurityChange: function() { }, + onSecurityChange() { }, // nsIWebProgressListener2 @@ -237,9 +237,9 @@ DownloadLegacyTransfer.prototype = { target: { path: aTarget.QueryInterface(Ci.nsIFileURL).file.path, partFilePath: aTempFile && aTempFile.path }, saver: "legacy", - launchWhenSucceeded: launchWhenSucceeded, - contentType: contentType, - launcherPath: launcherPath + launchWhenSucceeded, + contentType, + launcherPath }).then(function DLT_I_onDownload(aDownload) { // Legacy components keep partial data when they use a ".part" file. if (aTempFile) { @@ -257,17 +257,17 @@ DownloadLegacyTransfer.prototype = { }.bind(this)).then(null, Cu.reportError); }, - setSha256Hash: function(hash) + setSha256Hash(hash) { this._sha256Hash = hash; }, - setSignatureInfo: function(signatureInfo) + setSignatureInfo(signatureInfo) { this._signatureInfo = signatureInfo; }, - setRedirects: function(redirects) + setRedirects(redirects) { this._redirects = redirects; }, diff --git a/toolkit/components/jsdownloads/src/DownloadList.jsm b/toolkit/components/jsdownloads/src/DownloadList.jsm index 4ab42e18648a..32fbfe5966bf 100644 --- a/toolkit/components/jsdownloads/src/DownloadList.jsm +++ b/toolkit/components/jsdownloads/src/DownloadList.jsm @@ -204,7 +204,7 @@ this.DownloadList.prototype = { * @param aDownload * The Download object that changed. */ - _notifyAllViews: function(aMethodName, aDownload) { + _notifyAllViews(aMethodName, aDownload) { for (let view of this._views) { try { if (aMethodName in view) { @@ -305,7 +305,7 @@ this.DownloadCombinedList.prototype = { * @resolves When the download has been added. * @rejects JavaScript exception. */ - add: function(aDownload) + add(aDownload) { if (aDownload.source.isPrivate) { return this._privateList.add(aDownload); @@ -329,7 +329,7 @@ this.DownloadCombinedList.prototype = { * @resolves When the download has been removed. * @rejects JavaScript exception. */ - remove: function(aDownload) + remove(aDownload) { if (aDownload.source.isPrivate) { return this._privateList.remove(aDownload); @@ -339,18 +339,18 @@ this.DownloadCombinedList.prototype = { // DownloadList view - onDownloadAdded: function(aDownload) + onDownloadAdded(aDownload) { this._downloads.push(aDownload); this._notifyAllViews("onDownloadAdded", aDownload); }, - onDownloadChanged: function(aDownload) + onDownloadChanged(aDownload) { this._notifyAllViews("onDownloadChanged", aDownload); }, - onDownloadRemoved: function(aDownload) + onDownloadRemoved(aDownload) { let index = this._downloads.indexOf(aDownload); if (index != -1) { @@ -396,7 +396,7 @@ this.DownloadSummary.prototype = { * @resolves When the view on the underlying list has been registered. * @rejects JavaScript exception. */ - bindToList: function(aList) + bindToList(aList) { if (this._list) { throw new Error("bindToList may be called only once."); @@ -432,7 +432,7 @@ this.DownloadSummary.prototype = { * notification has been sent. * @rejects JavaScript exception. */ - addView: function(aView) + addView(aView) { this._views.add(aView); @@ -458,7 +458,7 @@ this.DownloadSummary.prototype = { * will not receive any more notifications. * @rejects JavaScript exception. */ - removeView: function(aView) + removeView(aView) { this._views.delete(aView); @@ -494,7 +494,7 @@ this.DownloadSummary.prototype = { * and will recalculate the summary and notify the views in case the * aggregated properties are different. */ - _onListChanged: function() { + _onListChanged() { let allHaveStopped = true; let progressTotalBytes = 0; let progressCurrentBytes = 0; @@ -535,7 +535,7 @@ this.DownloadSummary.prototype = { // DownloadList view - onDownloadAdded: function(aDownload) + onDownloadAdded(aDownload) { this._downloads.push(aDownload); if (this._list) { @@ -543,12 +543,12 @@ this.DownloadSummary.prototype = { } }, - onDownloadChanged: function(aDownload) + onDownloadChanged(aDownload) { this._onListChanged(); }, - onDownloadRemoved: function(aDownload) + onDownloadRemoved(aDownload) { let index = this._downloads.indexOf(aDownload); if (index != -1) { diff --git a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm index 6e85d0b04b25..9eb05dd6367d 100644 --- a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm +++ b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm @@ -63,7 +63,7 @@ this.DownloadUIHelper = { * * @return A DownloadPrompter object. */ - getPrompter: function(aParent) + getPrompter(aParent) { return new DownloadPrompter(aParent || null); }, @@ -139,7 +139,7 @@ this.DownloadPrompter.prototype = { * @resolves Boolean indicating whether the launch operation can continue. * @rejects JavaScript exception. */ - confirmLaunchExecutable: function(aPath) + confirmLaunchExecutable(aPath) { const kPrefAlertOnEXEOpen = "browser.download.manager.alertOnEXEOpen"; diff --git a/toolkit/components/jsdownloads/src/Downloads.jsm b/toolkit/components/jsdownloads/src/Downloads.jsm index 174f807a5977..cbbb79a6309b 100644 --- a/toolkit/components/jsdownloads/src/Downloads.jsm +++ b/toolkit/components/jsdownloads/src/Downloads.jsm @@ -139,7 +139,7 @@ this.Downloads = { * @resolves When the download has finished successfully. * @rejects JavaScript exception if the download failed. */ - fetch: function(aSource, aTarget, aOptions) { + fetch(aSource, aTarget, aOptions) { return this.createDownload({ source: aSource, target: aTarget, @@ -170,7 +170,7 @@ this.Downloads = { * @resolves The requested DownloadList or DownloadCombinedList object. * @rejects JavaScript exception. */ - getList: function(aType) + getList(aType) { if (!this._promiseListsInitialized) { this._promiseListsInitialized = Task.spawn(function* () { @@ -232,7 +232,7 @@ this.Downloads = { * @resolves The requested DownloadList or DownloadCombinedList object. * @rejects JavaScript exception. */ - getSummary: function(aType) + getSummary(aType) { if (aType != Downloads.PUBLIC && aType != Downloads.PRIVATE && aType != Downloads.ALL) { diff --git a/toolkit/components/jsdownloads/test/unit/common_test_Download.js b/toolkit/components/jsdownloads/test/unit/common_test_Download.js index 3310eef05a19..1b0ad82c32c0 100644 --- a/toolkit/components/jsdownloads/test/unit/common_test_Download.js +++ b/toolkit/components/jsdownloads/test/unit/common_test_Download.js @@ -200,7 +200,7 @@ add_task(function* test_basic() // When testing DownloadLegacySaver, the download is already started when it // is created, thus we must check its basic properties while in progress. download = yield promiseStartLegacyDownload(null, - { targetFile: targetFile }); + { targetFile }); do_check_eq(download.source.url, httpUrl("source.txt")); do_check_eq(download.target.path, targetFile.path); @@ -1391,7 +1391,7 @@ add_task(function* test_error_target() // the "error" property checked by promiseDownloadStopped. This happens // because we don't have control over when the download is started. download = yield promiseStartLegacyDownload(null, - { targetFile: targetFile }); + { targetFile }); yield promiseDownloadStopped(download); } do_throw("The download should have failed."); @@ -1438,7 +1438,7 @@ add_task(function* test_error_restart() download.start().catch(() => {}); } else { download = yield promiseStartLegacyDownload(null, - { targetFile: targetFile }); + { targetFile }); } yield promiseDownloadStopped(download); do_throw("The download should have failed."); @@ -2167,7 +2167,7 @@ add_task(function* test_launch() { download = yield Downloads.createDownload({ source: httpUrl("source.txt"), target: getTempFile(TEST_TARGET_FILE_NAME).path, - launcherPath: launcherPath, + launcherPath, launchWhenSucceeded: true }); @@ -2185,7 +2185,7 @@ add_task(function* test_launch() { // it is created, thus we don't test calling "launch" before starting. download = yield promiseStartLegacyDownload( httpUrl("source.txt"), - { launcherPath: launcherPath, + { launcherPath, launchWhenSucceeded: true }); yield promiseDownloadStopped(download); } @@ -2266,13 +2266,13 @@ add_task(function* test_launchWhenSucceeded() { source: httpUrl("source.txt"), target: getTempFile(TEST_TARGET_FILE_NAME).path, launchWhenSucceeded: true, - launcherPath: launcherPath, + launcherPath, }); yield download.start(); } else { let download = yield promiseStartLegacyDownload( httpUrl("source.txt"), - { launcherPath: launcherPath, + { launcherPath, launchWhenSucceeded: true }); yield promiseDownloadStopped(download); } @@ -2338,7 +2338,7 @@ add_task(function* test_platform_integration() } let downloadWatcherNotified = false; let observer = { - observe: function(subject, topic, data) { + observe(subject, topic, data) { do_check_eq(topic, "download-watcher-notify"); do_check_eq(data, "modified"); downloadWatcherNotified = true; diff --git a/toolkit/components/jsdownloads/test/unit/head.js b/toolkit/components/jsdownloads/test/unit/head.js index 42fa2bb96f87..866392c79ebd 100644 --- a/toolkit/components/jsdownloads/test/unit/head.js +++ b/toolkit/components/jsdownloads/test/unit/head.js @@ -203,20 +203,20 @@ function promiseWaitForVisit(aUrl) PlacesUtils.history.addObserver({ QueryInterface: XPCOMUtils.generateQI([Ci.nsINavHistoryObserver]), - onBeginUpdateBatch: function() {}, - onEndUpdateBatch: function() {}, - onVisit: function(aURI, aVisitID, aTime, aSessionID, aReferringID, + onBeginUpdateBatch() {}, + onEndUpdateBatch() {}, + onVisit(aURI, aVisitID, aTime, aSessionID, aReferringID, aTransitionType, aGUID, aHidden) { if (aURI.equals(uri)) { PlacesUtils.history.removeObserver(this); deferred.resolve([aTime, aTransitionType]); } }, - onTitleChanged: function() {}, - onDeleteURI: function() {}, - onClearHistory: function() {}, - onPageChanged: function() {}, - onDeleteVisits: function() {}, + onTitleChanged() {}, + onDeleteURI() {}, + onClearHistory() {}, + onPageChanged() {}, + onDeleteVisits() {}, }, false); return deferred.promise; @@ -342,7 +342,7 @@ function promiseStartLegacyDownload(aSourceUrl, aOptions) { // Temporarily register a view that will get notified when the download we // are controlling becomes visible in the list of downloads. aList.addView({ - onDownloadAdded: function(aDownload) { + onDownloadAdded(aDownload) { aList.removeView(this).then(null, do_report_unexpected_exception); // Remove the download to keep the list empty for the next test. This @@ -395,7 +395,7 @@ function promiseStartExternalHelperAppServiceDownload(aSourceUrl) { // Temporarily register a view that will get notified when the download we // are controlling becomes visible in the list of downloads. aList.addView({ - onDownloadAdded: function(aDownload) { + onDownloadAdded(aDownload) { aList.removeView(this).then(null, do_report_unexpected_exception); // Remove the download to keep the list empty for the next test. This @@ -417,7 +417,7 @@ function promiseStartExternalHelperAppServiceDownload(aSourceUrl) { channel.asyncOpen2({ contentListener: null, - onStartRequest: function(aRequest, aContext) + onStartRequest(aRequest, aContext) { let requestChannel = aRequest.QueryInterface(Ci.nsIChannel); this.contentListener = gExternalHelperAppService.doContent( @@ -425,12 +425,12 @@ function promiseStartExternalHelperAppServiceDownload(aSourceUrl) { this.contentListener.onStartRequest(aRequest, aContext); }, - onStopRequest: function(aRequest, aContext, aStatusCode) + onStopRequest(aRequest, aContext, aStatusCode) { this.contentListener.onStopRequest(aRequest, aContext, aStatusCode); }, - onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, + onDataAvailable(aRequest, aContext, aInputStream, aOffset, aCount) { this.contentListener.onDataAvailable(aRequest, aContext, aInputStream, @@ -577,10 +577,10 @@ function startFakeServer() { let serverSocket = new ServerSocket(-1, true, -1); serverSocket.asyncListen({ - onSocketAccepted: function(aServ, aTransport) { + onSocketAccepted(aServ, aTransport) { aTransport.close(Cr.NS_BINDING_ABORTED); }, - onStopListening: function() { }, + onStopListening() { }, }); return serverSocket; } diff --git a/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js b/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js index cce155716fd6..d470d33da908 100644 --- a/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js +++ b/toolkit/components/jsdownloads/test/unit/test_DownloadImport.js @@ -169,14 +169,14 @@ function promiseEntityID(aUrl) { }); channel.asyncOpen2({ - onStartRequest: function(aRequest) { + onStartRequest(aRequest) { if (aRequest instanceof Ci.nsIResumableChannel) { entityID = aRequest.entityID; } aRequest.cancel(Cr.NS_BINDING_ABORTED); }, - onStopRequest: function(aRequest, aContext, aStatusCode) { + onStopRequest(aRequest, aContext, aStatusCode) { if (aStatusCode == Cr.NS_BINDING_ABORTED) { deferred.resolve(entityID); } else { @@ -184,7 +184,7 @@ function promiseEntityID(aUrl) { } }, - onDataAvailable: function() {} + onDataAvailable() {} }); return deferred.promise; diff --git a/toolkit/components/jsdownloads/test/unit/test_DownloadList.js b/toolkit/components/jsdownloads/test/unit/test_DownloadList.js index b3e24b0dba67..42cd77e784ee 100644 --- a/toolkit/components/jsdownloads/test/unit/test_DownloadList.js +++ b/toolkit/components/jsdownloads/test/unit/test_DownloadList.js @@ -56,7 +56,7 @@ function promiseExpirableDownloadVisit(aSourceUrl) aResultCode); deferred.reject(ex); }, - handleResult: function() {}, + handleResult() {}, handleCompletion: function handleCompletion() { deferred.resolve(); } @@ -192,7 +192,7 @@ add_task(function* test_notifications_add_remove() // Check that we receive add notifications for existing elements. let addNotifications = 0; let viewOne = { - onDownloadAdded: function(aDownload) { + onDownloadAdded(aDownload) { // The first download to be notified should be the first that was added. if (addNotifications == 0) { do_check_eq(aDownload, downloadOne); @@ -212,7 +212,7 @@ add_task(function* test_notifications_add_remove() // Check that we receive remove notifications. let removeNotifications = 0; let viewTwo = { - onDownloadRemoved: function(aDownload) { + onDownloadRemoved(aDownload) { do_check_eq(aDownload, downloadOne); removeNotifications++; }, @@ -257,7 +257,7 @@ add_task(function* test_notifications_change() // Check that we receive change notifications. let receivedOnDownloadChanged = false; yield list.addView({ - onDownloadChanged: function(aDownload) { + onDownloadChanged(aDownload) { do_check_eq(aDownload, downloadOne); receivedOnDownloadChanged = true; }, @@ -285,18 +285,18 @@ add_task(function* test_notifications_this() let receivedOnDownloadChanged = false; let receivedOnDownloadRemoved = false; let view = { - onDownloadAdded: function() { + onDownloadAdded() { do_check_eq(this, view); receivedOnDownloadAdded = true; }, - onDownloadChanged: function() { + onDownloadChanged() { // Only do this check once. if (!receivedOnDownloadChanged) { do_check_eq(this, view); receivedOnDownloadChanged = true; } }, - onDownloadRemoved: function() { + onDownloadRemoved() { do_check_eq(this, view); receivedOnDownloadRemoved = true; }, @@ -336,7 +336,7 @@ add_task(function* test_history_expiration() let deferred = Promise.defer(); let removeNotifications = 0; let downloadView = { - onDownloadRemoved: function(aDownload) { + onDownloadRemoved(aDownload) { if (++removeNotifications == 2) { deferred.resolve(); } @@ -383,7 +383,7 @@ add_task(function* test_history_clear() let deferred = Promise.defer(); let removeNotifications = 0; let downloadView = { - onDownloadRemoved: function(aDownload) { + onDownloadRemoved(aDownload) { if (++removeNotifications == 2) { deferred.resolve(); } @@ -419,7 +419,7 @@ add_task(function* test_removeFinished() let deferred = Promise.defer(); let removeNotifications = 0; let downloadView = { - onDownloadRemoved: function(aDownload) { + onDownloadRemoved(aDownload) { do_check_true(aDownload == downloadOne || aDownload == downloadTwo || aDownload == downloadThree); @@ -555,7 +555,7 @@ add_task(function* test_DownloadSummary_notifications() // Check that we receive change notifications. let receivedOnSummaryChanged = false; yield summary.addView({ - onSummaryChanged: function() { + onSummaryChanged() { receivedOnSummaryChanged = true; }, }); diff --git a/toolkit/components/lz4/lz4.js b/toolkit/components/lz4/lz4.js index 8d4ffcf8e58e..70dd758e8537 100644 --- a/toolkit/components/lz4/lz4.js +++ b/toolkit/components/lz4/lz4.js @@ -150,7 +150,7 @@ exports.decompressFileContent = decompressFileContent; if (typeof Components != "undefined") { this.Lz4 = { - compressFileContent: compressFileContent, - decompressFileContent: decompressFileContent + compressFileContent, + decompressFileContent }; } diff --git a/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js b/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js index b26d554a8e6a..745f44dd81cd 100644 --- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js +++ b/toolkit/components/mediasniffer/test/unit/test_mediasniffer.js @@ -45,12 +45,12 @@ const tests = [ // A basic listener that reads checks the if we sniffed properly. var listener = { - onStartRequest: function(request, context) { + onStartRequest(request, context) { do_check_eq(request.QueryInterface(Ci.nsIChannel).contentType, tests[testRan].expectedContentType); }, - onDataAvailable: function(request, context, stream, offset, count) { + onDataAvailable(request, context, stream, offset, count) { try { var bis = Components.classes["@mozilla.org/binaryinputstream;1"] .createInstance(Components.interfaces.nsIBinaryInputStream); @@ -61,7 +61,7 @@ var listener = { } }, - onStopRequest: function(request, context, status) { + onStopRequest(request, context, status) { testRan++; runNext(); } @@ -72,7 +72,7 @@ function setupChannel(url, flags) let uri = "http://localhost:" + httpserver.identity.primaryPort + url; var chan = NetUtil.newChannel({ - uri: uri, + uri, loadUsingSystemPrincipal: true, contentPolicyType: Ci.nsIContentPolicy.TYPE_MEDIA }); diff --git a/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js b/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js index ce30a5c1ba18..78cb68c038a3 100644 --- a/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js +++ b/toolkit/components/mediasniffer/test/unit/test_mediasniffer_ext.js @@ -46,12 +46,12 @@ const tests = [ // A basic listener that reads checks the if we sniffed properly. var listener = { - onStartRequest: function(request, context) { + onStartRequest(request, context) { do_print("Sniffing " + tests[testRan].path); do_check_eq(request.QueryInterface(Ci.nsIChannel).contentType, tests[testRan].expected); }, - onDataAvailable: function(request, context, stream, offset, count) { + onDataAvailable(request, context, stream, offset, count) { try { var bis = Components.classes["@mozilla.org/binaryinputstream;1"] .createInstance(Components.interfaces.nsIBinaryInputStream); @@ -62,7 +62,7 @@ var listener = { } }, - onStopRequest: function(request, context, status) { + onStopRequest(request, context, status) { testRan++; runNext(); } diff --git a/toolkit/components/microformats/microformat-shiv.js b/toolkit/components/microformats/microformat-shiv.js index f12d5208ad48..47651bbb88f8 100644 --- a/toolkit/components/microformats/microformat-shiv.js +++ b/toolkit/components/microformats/microformat-shiv.js @@ -43,7 +43,7 @@ var Microformats; // jshint ignore:line modules.Parser.prototype = { - init: function() { + init() { this.rootNode = null; this.document = null; this.options = { @@ -67,7 +67,7 @@ var Microformats; // jshint ignore:line * @param {Object} options * @return {Object} */ - get: function(options) { + get(options) { var out = this.formatEmpty(), data = [], rels; @@ -126,7 +126,7 @@ var Microformats; // jshint ignore:line * @param {Object} options * @return {Object} */ - getParent: function(node, options) { + getParent(node, options) { this.init(); options = (options) ? options : {}; @@ -144,7 +144,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} rootNode * @return {Int} */ - count: function( options ) { + count( options ) { var out = {}, items, classItems, @@ -194,7 +194,7 @@ var Microformats; // jshint ignore:line * @param {Objecte} options * @return {Boolean} */ - isMicroformat: function( node, options ) { + isMicroformat( node, options ) { var classes, i; @@ -227,7 +227,7 @@ var Microformats; // jshint ignore:line * @param {Objecte} options * @return {Boolean} */ - hasMicroformats: function( node, options ) { + hasMicroformats( node, options ) { var items, i; @@ -258,7 +258,7 @@ var Microformats; // jshint ignore:line * * @param {Array} maps */ - add: function( maps ) { + add( maps ) { maps.forEach(function(map) { if (map && map.root && map.name && map.properties) { modules.maps[map.name] = JSON.parse(JSON.stringify(map)); @@ -275,7 +275,7 @@ var Microformats; // jshint ignore:line * @param {Int} recursive * @return {Object} */ - getParentTreeWalk: function(node, options, recursive) { + getParentTreeWalk(node, options, recursive) { options = (options) ? options : {}; // recursive calls @@ -303,7 +303,7 @@ var Microformats; // jshint ignore:line * * @param {Object} options */ - getDOMContext: function( options ) { + getDOMContext( options ) { var nodes = modules.domUtils.getDOMContext( options ); this.rootNode = nodes.rootNode; this.document = nodes.document; @@ -316,7 +316,7 @@ var Microformats; // jshint ignore:line * @param {Object} options * @return {Boolean} */ - prepareDOM: function( options ) { + prepareDOM( options ) { var baseTag, href; @@ -370,7 +370,7 @@ var Microformats; // jshint ignore:line * * @return {Object} */ - formatError: function() { + formatError() { var out = this.formatEmpty(); out.errors = this.errors; return out; @@ -382,7 +382,7 @@ var Microformats; // jshint ignore:line * * @return {Object} */ - formatEmpty: function() { + formatEmpty() { return { 'items': [], 'rels': {}, @@ -392,7 +392,7 @@ var Microformats; // jshint ignore:line // find microformats of a given type and return node structures - findFilterNodes: function(rootNode, filters) { + findFilterNodes(rootNode, filters) { if (modules.utils.isString(filters)) { filters = [filters]; } @@ -438,7 +438,7 @@ var Microformats; // jshint ignore:line * @param {Int} count * @param {Object} */ - appendCount: function(name, count, out) { + appendCount(name, count, out) { if (out[name]) { out[name] = out[name] + count; } else { @@ -454,7 +454,7 @@ var Microformats; // jshint ignore:line * @param {Array} filters * @return {Boolean} */ - shouldInclude: function(uf, filters) { + shouldInclude(uf, filters) { var i; if (modules.utils.isArray(filters) && filters.length > 0) { @@ -477,7 +477,7 @@ var Microformats; // jshint ignore:line * @param {Boolean} includeRoot * @return {Array} */ - findRootNodes: function(rootNode, includeRoot) { + findRootNodes(rootNode, includeRoot) { var arr = null, out = [], classList = [], @@ -538,7 +538,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {Array} */ - walkRoot: function(node) { + walkRoot(node) { var context = this, children = [], child, @@ -577,7 +577,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {Array} */ - walkTree: function(node) { + walkTree(node) { var classes, out = [], obj, @@ -612,7 +612,7 @@ var Microformats; // jshint ignore:line * @param {Int} rootID * @param {Object} parentClasses */ - walkChildren: function(node, out, ufName, rootID, parentClasses) { + walkChildren(node, out, ufName, rootID, parentClasses) { var context = this, children = [], rootItem, @@ -777,7 +777,7 @@ var Microformats; // jshint ignore:line * @param {Object} uf * @return {String || Object} */ - getValue: function(node, className, uf) { + getValue(node, className, uf) { var value = ''; if (modules.utils.startWith(className, 'p-')) { @@ -806,7 +806,7 @@ var Microformats; // jshint ignore:line * @param {Boolean} valueParse * @return {String} */ - getPValue: function(node, valueParse) { + getPValue(node, valueParse) { var out = ''; if (valueParse) { out = this.getValueClass(node, 'p'); @@ -846,7 +846,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {Object} */ - getEValue: function(node) { + getEValue(node) { var out = {value: '', html: ''}; @@ -867,7 +867,7 @@ var Microformats; // jshint ignore:line * @param {Boolean} valueParse * @return {String} */ - getUValue: function(node, valueParse) { + getUValue(node, valueParse) { var out = ''; if (valueParse) { out = this.getValueClass(node, 'u'); @@ -919,7 +919,7 @@ var Microformats; // jshint ignore:line * @param {Boolean} valueParse * @return {String} */ - getDTValue: function(node, className, uf, valueParse) { + getDTValue(node, className, uf, valueParse) { var out = ''; if (valueParse) { @@ -974,7 +974,7 @@ var Microformats; // jshint ignore:line * @param {String} id * @param {String} propertyName */ - appendRootID: function(node, id, propertyName) { + appendRootID(node, id, propertyName) { if (this.hasRootID(node, id, propertyName) === false) { var rootids = []; if (modules.domUtils.hasAttribute(node, 'rootids')) { @@ -994,7 +994,7 @@ var Microformats; // jshint ignore:line * @param {String} propertyName * @return {Boolean} */ - hasRootID: function(node, id, propertyName) { + hasRootID(node, id, propertyName) { var rootids = []; if (!modules.domUtils.hasAttribute(node, 'rootids')) { return false; @@ -1012,7 +1012,7 @@ var Microformats; // jshint ignore:line * @param {String} propertyName * @return {String || null} */ - getValueClass: function(node, propertyType) { + getValueClass(node, propertyType) { var context = this, children = [], out = [], @@ -1068,7 +1068,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {String} */ - getValueTitle: function(node) { + getValueTitle(node) { var out = [], items, i, @@ -1093,7 +1093,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {Boolean} */ - hasHClass: function(node) { + hasHClass(node) { var classes = this.getUfClassNames(node); if (classes.root && classes.root.length > 0) { return true; @@ -1109,7 +1109,7 @@ var Microformats; // jshint ignore:line * @param {Array} ufNameArr * @return {Object} */ - getUfClassNames: function(node, ufNameArr) { + getUfClassNames(node, ufNameArr) { var context = this, out = { 'root': [], @@ -1258,7 +1258,7 @@ var Microformats; // jshint ignore:line * @param {String} name * @return {Object || null} */ - getMapping: function(name) { + getMapping(name) { var key; for (key in modules.maps) { if (modules.maps[key].root === name || key === name) { @@ -1275,7 +1275,7 @@ var Microformats; // jshint ignore:line * @param {String} name * @return {String || null} */ - getV2RootName: function(name) { + getV2RootName(name) { var key; for (key in modules.maps) { if (modules.maps[key].root === name) { @@ -1293,7 +1293,7 @@ var Microformats; // jshint ignore:line * @param {String} propertyVersion * @return {Boolean} */ - isAllowedPropertyVersion: function(typeVersion, propertyVersion) { + isAllowedPropertyVersion(typeVersion, propertyVersion) { if (this.options.overlappingVersions === true) { return true; } @@ -1308,7 +1308,7 @@ var Microformats; // jshint ignore:line * @param {String} value * @return {Object} */ - createUfObject: function(names, typeVersion, value) { + createUfObject(names, typeVersion, value) { var out = {}; // is more than just whitespace @@ -1337,7 +1337,7 @@ var Microformats; // jshint ignore:line * * @param {Object} microformat */ - cleanUfObject: function( microformat ) { + cleanUfObject( microformat ) { delete microformat.times; delete microformat.dates; delete microformat.typeVersion; @@ -1353,7 +1353,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {String} */ - removePropPrefix: function(text) { + removePropPrefix(text) { var i; i = this.propertyPrefixes.length; @@ -1374,7 +1374,7 @@ var Microformats; // jshint ignore:line * @param {String} attrName * @param {String} baseUrl */ - expandURLs: function(node, attrName, baseUrl) { + expandURLs(node, attrName, baseUrl) { var i, nodes, attr; @@ -1403,7 +1403,7 @@ var Microformats; // jshint ignore:line * * @param {Object} options */ - mergeOptions: function(options) { + mergeOptions(options) { var key; for (key in options) { if (options.hasOwnProperty(key)) { @@ -1418,7 +1418,7 @@ var Microformats; // jshint ignore:line * * @param {DOM Node} rootNode */ - removeRootIds: function(rootNode) { + removeRootIds(rootNode) { var arr, i; @@ -1435,7 +1435,7 @@ var Microformats; // jshint ignore:line * * @param {DOM Node} rootNode */ - clearUpDom: function(rootNode) { + clearUpDom(rootNode) { if (this.removeIncludes) { this.removeIncludes(rootNode); } @@ -1751,15 +1751,15 @@ var Microformats; // jshint ignore:line if (uf.value && !uf.altValue) { // first p-name of the h-* child if (modules.utils.startWith(parentPropertyName, 'p-') && propertyName === 'p-name') { - uf.altValue = {name: propertyName, value: value}; + uf.altValue = {name: propertyName, value}; } // if it's an e-* property element if (modules.utils.startWith(parentPropertyName, 'e-') && modules.utils.startWith(propertyName, 'e-')) { - uf.altValue = {name: propertyName, value: value}; + uf.altValue = {name: propertyName, value}; } // if it's an u-* property element if (modules.utils.startWith(parentPropertyName, 'u-') && propertyName === 'u-url') { - uf.altValue = {name: propertyName, value: value}; + uf.altValue = {name: propertyName, value}; } } return uf; @@ -2205,7 +2205,7 @@ var Microformats; // jshint ignore:line * @param {Object} obj * @return {Boolean} */ - isString: function( obj ) { + isString( obj ) { return typeof( obj ) === 'string'; }, @@ -2215,7 +2215,7 @@ var Microformats; // jshint ignore:line * @param {Object} obj * @return {Boolean} */ - isNumber: function( obj ) { + isNumber( obj ) { return !isNaN(parseFloat( obj )) && isFinite( obj ); }, @@ -2226,7 +2226,7 @@ var Microformats; // jshint ignore:line * @param {Object} obj * @return {Boolean} */ - isArray: function( obj ) { + isArray( obj ) { return obj && !( obj.propertyIsEnumerable( 'length' ) ) && typeof obj === 'object' && typeof obj.length === 'number'; }, @@ -2237,7 +2237,7 @@ var Microformats; // jshint ignore:line * @param {Object} obj * @return {Boolean} */ - isFunction: function(obj) { + isFunction(obj) { return !!(obj && obj.constructor && obj.call && obj.apply); }, @@ -2249,7 +2249,7 @@ var Microformats; // jshint ignore:line * @param {String} test * @return {Boolean} */ - startWith: function( text, test ) { + startWith( text, test ) { return (text.indexOf(test) === 0); }, @@ -2260,7 +2260,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {String} */ - trim: function( text ) { + trim( text ) { if (text && this.isString(text)) { return (text.trim()) ? text.trim() : text.replace(/^\s+|\s+$/g, ''); } @@ -2276,7 +2276,7 @@ var Microformats; // jshint ignore:line * @param {String} character * @return {String} */ - replaceCharAt: function( text, index, character ) { + replaceCharAt( text, index, character ) { if (text && text.length > index) { return text.substr(0, index) + character + text.substr(index + character.length); } @@ -2290,7 +2290,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {String} */ - trimWhitespace: function( text ) { + trimWhitespace( text ) { if (text && text.length) { var i = text.length, x = 0; @@ -2325,7 +2325,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {Boolean} */ - isOnlyWhiteSpace: function( text ) { + isOnlyWhiteSpace( text ) { return !(/[^\t\n\r ]/.test( text )); }, @@ -2336,7 +2336,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {Sring} */ - collapseWhiteSpace: function( text ) { + collapseWhiteSpace( text ) { return text.replace(/[\t\n\r ]+/g, ' '); }, @@ -2347,7 +2347,7 @@ var Microformats; // jshint ignore:line * @param {Object} obj * @return {Boolean} */ - hasProperties: function( obj ) { + hasProperties( obj ) { var key; for (key in obj) { if ( obj.hasOwnProperty( key ) ) { @@ -2365,7 +2365,7 @@ var Microformats; // jshint ignore:line * @param {Boolean} reverse * @return {Int} */ - sortObjects: function(property, reverse) { + sortObjects(property, reverse) { reverse = (reverse) ? -1 : 1; return function(a, b) { a = a[property]; @@ -2395,7 +2395,7 @@ var Microformats; // jshint ignore:line * * @return {Object || undefined} */ - getDOMParser: function() { + getDOMParser() { if (typeof DOMParser === "undefined") { try { return Components.classes["@mozilla.org/xmlextras/domparser;1"] @@ -2415,7 +2415,7 @@ var Microformats; // jshint ignore:line * @param {Object} options * @return {DOM Node} node */ - getDOMContext: function( options ) { + getDOMContext( options ) { // if a node is passed if (options.node) { @@ -2465,7 +2465,7 @@ var Microformats; // jshint ignore:line * @param {Dom Document} * @return {DOM Node} node */ - getTopMostNode: function( node ) { + getTopMostNode( node ) { // var doc = this.ownerDocument(node); // if(doc && doc.nodeType && doc.nodeType === 9 && doc.documentElement){ // return doc.documentElement; @@ -2481,7 +2481,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {Dom Document} */ - ownerDocument: function(node) { + ownerDocument(node) { return node.ownerDocument; }, @@ -2492,7 +2492,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {String} */ - textContent: function(node) { + textContent(node) { if (node.textContent) { return node.textContent; } else if (node.innerText) { @@ -2508,7 +2508,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {String} */ - innerHTML: function(node) { + innerHTML(node) { return node.innerHTML; }, @@ -2520,7 +2520,7 @@ var Microformats; // jshint ignore:line * @param {String} attributeName * @return {Boolean} */ - hasAttribute: function(node, attributeName) { + hasAttribute(node, attributeName) { return node.hasAttribute(attributeName); }, @@ -2533,7 +2533,7 @@ var Microformats; // jshint ignore:line * @param {String} value * @return {Boolean} */ - hasAttributeValue: function(node, attributeName, value) { + hasAttributeValue(node, attributeName, value) { return (this.getAttributeList(node, attributeName).indexOf(value) > -1); }, @@ -2545,7 +2545,7 @@ var Microformats; // jshint ignore:line * @param {String} attributeName * @return {String || null} */ - getAttribute: function(node, attributeName) { + getAttribute(node, attributeName) { return node.getAttribute(attributeName); }, @@ -2557,7 +2557,7 @@ var Microformats; // jshint ignore:line * @param {String} attributeName * @param {String} attributeValue */ - setAttribute: function(node, attributeName, attributeValue) { + setAttribute(node, attributeName, attributeValue) { node.setAttribute(attributeName, attributeValue); }, @@ -2568,7 +2568,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @param {String} attributeName */ - removeAttribute: function(node, attributeName) { + removeAttribute(node, attributeName) { node.removeAttribute(attributeName); }, @@ -2580,7 +2580,7 @@ var Microformats; // jshint ignore:line * @param {String} id * @return {DOM Node} */ - getElementById: function(docNode, id) { + getElementById(docNode, id) { return docNode.querySelector( '#' + id ); }, @@ -2592,7 +2592,7 @@ var Microformats; // jshint ignore:line * @param {String} selector * @return {DOM Node} */ - querySelector: function(docNode, selector) { + querySelector(docNode, selector) { return docNode.querySelector( selector ); }, @@ -2604,7 +2604,7 @@ var Microformats; // jshint ignore:line * @param {String} attributeName * @return {Array} */ - getAttributeList: function(node, attributeName) { + getAttributeList(node, attributeName) { var out = [], attList; @@ -2627,7 +2627,7 @@ var Microformats; // jshint ignore:line * @param {String} attributeName * @return {NodeList} */ - getNodesByAttribute: function(node, attributeName) { + getNodesByAttribute(node, attributeName) { var selector = '[' + attributeName + ']'; return node.querySelectorAll(selector); }, @@ -2640,7 +2640,7 @@ var Microformats; // jshint ignore:line * @param {String} attributeName * @return {DOM NodeList} */ - getNodesByAttributeValue: function(rootNode, name, value) { + getNodesByAttributeValue(rootNode, name, value) { var arr = [], x = 0, i, @@ -2667,7 +2667,7 @@ var Microformats; // jshint ignore:line * @param {String} attributeName * @return {String || null} */ - getAttrValFromTagList: function(node, tagNames, attributeName) { + getAttrValFromTagList(node, tagNames, attributeName) { var i = tagNames.length; while (i--) { @@ -2689,7 +2689,7 @@ var Microformats; // jshint ignore:line * @param {Array} tagNames * @return {DOM Node || null} */ - getSingleDescendant: function(node) { + getSingleDescendant(node) { return this.getDescendant( node, null, false ); }, @@ -2701,7 +2701,7 @@ var Microformats; // jshint ignore:line * @param {Array} tagNames * @return {DOM Node || null} */ - getSingleDescendantOfType: function(node, tagNames) { + getSingleDescendantOfType(node, tagNames) { return this.getDescendant( node, tagNames, true ); }, @@ -2713,7 +2713,7 @@ var Microformats; // jshint ignore:line * @param {Array} tagNames * @return {DOM Node || null} */ - getDescendant: function( node, tagNames, onlyOfType ) { + getDescendant( node, tagNames, onlyOfType ) { var i = node.children.length, countAll = 0, countOfType = 0, @@ -2750,7 +2750,7 @@ var Microformats; // jshint ignore:line * @param {Array} tagNames * @return {Boolean} */ - hasTagName: function(node, tagNames) { + hasTagName(node, tagNames) { var i = tagNames.length; while (i--) { if (node.tagName.toLowerCase() === tagNames[i]) { @@ -2768,7 +2768,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} childNode * @return {DOM Node} */ - appendChild: function(node, childNode) { + appendChild(node, childNode) { return node.appendChild(childNode); }, @@ -2779,7 +2779,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} childNode * @return {DOM Node || null} */ - removeChild: function(childNode) { + removeChild(childNode) { if (childNode.parentNode) { return childNode.parentNode.removeChild(childNode); } @@ -2793,7 +2793,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {DOM Node} */ - clone: function(node) { + clone(node) { var newNode = node.cloneNode(true); newNode.removeAttribute('id'); return newNode; @@ -2806,7 +2806,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {String} */ - getElementText: function( node ) { + getElementText( node ) { if (node && node.data) { return node.data; } @@ -2820,7 +2820,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {Array} */ - getOrderedAttributes: function( node ) { + getOrderedAttributes( node ) { var nodeStr = node.outerHTML, attrs = []; @@ -2841,7 +2841,7 @@ var Microformats; // jshint ignore:line * @param String} text * @return {String} */ - decodeEntities: function( doc, text ) { + decodeEntities( doc, text ) { // return text; return doc.createTextNode( text ).nodeValue; }, @@ -2853,7 +2853,7 @@ var Microformats; // jshint ignore:line * @param {DOM Document} document * @return {DOM Document} */ - cloneDocument: function( document ) { + cloneDocument( document ) { var newNode, newDocument = null; @@ -2872,7 +2872,7 @@ var Microformats; // jshint ignore:line * @param {DOM Document} document * @return {Boolean} */ - canCloneDocument: function( document ) { + canCloneDocument( document ) { return (document && document.importNode && document.implementation && document.implementation.createHTMLDocument); }, @@ -2883,7 +2883,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {Int} */ - getChildIndex: function(node) { + getChildIndex(node) { var parent = node.parentNode, i = -1, child; @@ -2902,7 +2902,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {Array} */ - getNodePath: function(node) { + getNodePath(node) { var parent = node.parentNode, path = [], index = this.getChildIndex(node); @@ -2923,7 +2923,7 @@ var Microformats; // jshint ignore:line * @param {Array} path * @return {DOM Node} */ - getNodeByPath: function(document, path) { + getNodeByPath(document, path) { var node = document.documentElement, i = 0, index; @@ -2940,7 +2940,7 @@ var Microformats; // jshint ignore:line * @param {DOM node} node * @return {Array} */ - getChildren: function( node ) { + getChildren( node ) { return node.children; }, @@ -2951,7 +2951,7 @@ var Microformats; // jshint ignore:line * @param {String} tagName * @return {DOM node} */ - createNode: function( tagName ) { + createNode( tagName ) { return this.document.createElement(tagName); }, @@ -2963,7 +2963,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {DOM node} */ - createNodeWithText: function( tagName, text ) { + createNodeWithText( tagName, text ) { var node = this.document.createElement(tagName); node.innerHTML = text; return node; @@ -2980,7 +2980,7 @@ var Microformats; // jshint ignore:line /** * creates DOM objects needed to resolve URLs */ - init: function() { + init() { // this._domParser = new DOMParser(); this._domParser = modules.domUtils.getDOMParser(); // do not use a head tag it does not work with IE9 @@ -2998,7 +2998,7 @@ var Microformats; // jshint ignore:line * @param {String} baseUrl * @return {String} */ - resolve: function(url, baseUrl) { + resolve(url, baseUrl) { // use modern URL web API where we can if (modules.utils.isString(url) && modules.utils.isString(baseUrl) && url.indexOf('://') === -1) { // this try catch is required as IE has an URL object but no constuctor support @@ -3062,7 +3062,7 @@ var Microformats; // jshint ignore:line * clear all states * */ - clear: function() { + clear() { this.clearDate(); this.clearTime(); this.clearTimeZone(); @@ -3074,7 +3074,7 @@ var Microformats; // jshint ignore:line * clear date states * */ - clearDate: function() { + clearDate() { this.dY = -1; this.dM = -1; this.dD = -1; @@ -3086,7 +3086,7 @@ var Microformats; // jshint ignore:line * clear time states * */ - clearTime: function() { + clearTime() { this.tH = -1; this.tM = -1; this.tS = -1; @@ -3098,7 +3098,7 @@ var Microformats; // jshint ignore:line * clear timezone states * */ - clearTimeZone: function() { + clearTimeZone() { this.tzH = -1; this.tzM = -1; this.tzPN = '+'; @@ -3110,7 +3110,7 @@ var Microformats; // jshint ignore:line * resets the auto profile state * */ - setAutoProfileState: function() { + setAutoProfileState() { this.autoProfile = { sep: 'T', dsep: '-', @@ -3128,7 +3128,7 @@ var Microformats; // jshint ignore:line * @param {String} format * @return {String} */ - parse: function( dateString, format ) { + parse( dateString, format ) { this.clear(); var parts = [], @@ -3218,7 +3218,7 @@ var Microformats; // jshint ignore:line * @param {String} format * @return {String} */ - parseDate: function( dateString, format ) { + parseDate( dateString, format ) { this.clearDate(); var parts = []; @@ -3263,7 +3263,7 @@ var Microformats; // jshint ignore:line * @param {String} format * @return {String} */ - parseTime: function( timeString, format ) { + parseTime( timeString, format ) { this.clearTime(); var parts = []; @@ -3297,7 +3297,7 @@ var Microformats; // jshint ignore:line * @param {String} format * @return {String} */ - parseTimeZone: function( timeString, format ) { + parseTimeZone( timeString, format ) { this.clearTimeZone(); var parts = []; @@ -3337,7 +3337,7 @@ var Microformats; // jshint ignore:line * @param {String} format * @return {String} */ - toString: function( format ) { + toString( format ) { var output = ''; if (format) { @@ -3374,7 +3374,7 @@ var Microformats; // jshint ignore:line * @param {String} format * @return {String} */ - toTimeString: function( format ) { + toTimeString( format ) { var out = ''; if (format) { @@ -3417,7 +3417,7 @@ var Microformats; // jshint ignore:line * set the current profile to W3C Note, RFC 3339, HTML5, or auto profile * */ - setFormatSep: function() { + setFormatSep() { switch ( this.format.toLowerCase() ) { case 'rfc3339': this.sep = 'T'; @@ -3456,7 +3456,7 @@ var Microformats; // jshint ignore:line * * @return {Boolean} */ - hasFullDate: function() { + hasFullDate() { return (this.dY !== -1 && this.dM !== -1 && this.dD !== -1); }, @@ -3466,7 +3466,7 @@ var Microformats; // jshint ignore:line * * @return {Boolean} */ - hasDate: function() { + hasDate() { return (this.dY !== -1); }, @@ -3476,7 +3476,7 @@ var Microformats; // jshint ignore:line * * @return {Boolean} */ - hasTime: function() { + hasTime() { return (this.tH !== -1); }, @@ -3485,7 +3485,7 @@ var Microformats; // jshint ignore:line * * @return {Boolean} */ - hasTimeZone: function() { + hasTimeZone() { return (this.tzH !== -1); } @@ -3503,7 +3503,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {Boolean} */ - hasAM: function( text ) { + hasAM( text ) { text = text.toLowerCase(); return (text.indexOf('am') > -1 || text.indexOf('a.m.') > -1); }, @@ -3515,7 +3515,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {Boolean} */ - hasPM: function( text ) { + hasPM( text ) { text = text.toLowerCase(); return (text.indexOf('pm') > -1 || text.indexOf('p.m.') > -1); }, @@ -3527,7 +3527,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {String} */ - removeAMPM: function( text ) { + removeAMPM( text ) { return text.replace('pm', '').replace('p.m.', '').replace('am', '').replace('a.m.', ''); }, @@ -3538,7 +3538,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {Boolean} */ - isDuration: function( text ) { + isDuration( text ) { if (modules.utils.isString( text )) { text = text.toLowerCase(); if (modules.utils.startWith(text, 'p') ) { @@ -3556,7 +3556,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {Boolean} */ - isTime: function( text ) { + isTime( text ) { if (modules.utils.isString(text)) { text = text.toLowerCase(); text = modules.utils.trim( text ); @@ -3592,7 +3592,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {String} */ - parseAmPmTime: function( text ) { + parseAmPmTime( text ) { var out = text, times = []; @@ -3643,7 +3643,7 @@ var Microformats; // jshint ignore:line * @param {String} format ( Modules.ISODate profile format ) * @return {Object} Modules.ISODate */ - dateTimeUnion: function(date, time, format) { + dateTimeUnion(date, time, format) { var isodate = new modules.ISODate(date, format), isotime = new modules.ISODate(); @@ -3670,7 +3670,7 @@ var Microformats; // jshint ignore:line * @param {String} format ( Modules.ISODate profile format ) * @return {Object} Modules.ISODate */ - concatFragments: function(arr, format) { + concatFragments(arr, format) { var out = new modules.ISODate(), i = 0, value = ''; @@ -3721,7 +3721,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {Array} Modules.ISODate */ - splitTimeAndZone: function( text ) { + splitTimeAndZone( text ) { var out = [text], chars = ['-', '+', 'z', 'Z'], i = chars.length; @@ -3762,7 +3762,7 @@ var Microformats; // jshint ignore:line * @param {String} textFormat * @return {String} */ - parse: function(doc, node, textFormat) { + parse(doc, node, textFormat) { var out; this.textFormat = (textFormat) ? textFormat : this.textFormat; if (this.textFormat === 'normalised') { @@ -3784,7 +3784,7 @@ var Microformats; // jshint ignore:line * @param {String} textFormat * @return {String} */ - parseText: function( doc, text, textFormat ) { + parseText( doc, text, textFormat ) { var node = modules.domUtils.createNodeWithText( 'div', text ); return this.parse( doc, node, textFormat ); }, @@ -3797,7 +3797,7 @@ var Microformats; // jshint ignore:line * @param {String} textFormat * @return {String} */ - formatText: function( doc, text, textFormat ) { + formatText( doc, text, textFormat ) { this.textFormat = (textFormat) ? textFormat : this.textFormat; if (text) { var out = '', @@ -3821,7 +3821,7 @@ var Microformats; // jshint ignore:line * @param {String} text * @return {String} */ - normalise: function( doc, text ) { + normalise( doc, text ) { text = text.replace( / /g, ' ') ; // exchanges html entity for space into space char text = modules.utils.collapseWhiteSpace( text ); // removes linefeeds, tabs and addtional spaces text = modules.domUtils.decodeEntities( doc, text ); // decode HTML entities @@ -3836,7 +3836,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {String} */ - walkTreeForText: function( node ) { + walkTreeForText( node ) { var out = '', j = 0; @@ -3882,7 +3882,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {String} */ - parse: function( node ) { + parse( node ) { var out = '', j = 0; @@ -3907,7 +3907,7 @@ var Microformats; // jshint ignore:line * @param {DOM Node} node * @return {String} */ - walkTreeForHtml: function( node ) { + walkTreeForHtml( node ) { var out = '', j = 0; diff --git a/toolkit/components/mozintl/MozIntl.cpp b/toolkit/components/mozintl/MozIntl.cpp index 1ab98fd2ad60..432db62b14ba 100644 --- a/toolkit/components/mozintl/MozIntl.cpp +++ b/toolkit/components/mozintl/MozIntl.cpp @@ -18,8 +18,8 @@ MozIntl::MozIntl() = default; MozIntl::~MozIntl() = default; -NS_IMETHODIMP -MozIntl::AddGetCalendarInfo(JS::Handle val, JSContext* cx) +static nsresult +AddFunctions(JSContext* cx, JS::Handle val, const JSFunctionSpec* funcs) { if (!val.isObject()) { return NS_ERROR_INVALID_ARG; @@ -32,11 +32,6 @@ MozIntl::AddGetCalendarInfo(JS::Handle val, JSContext* cx) JSAutoCompartment ac(cx, realIntlObj); - static const JSFunctionSpec funcs[] = { - JS_SELF_HOSTED_FN("getCalendarInfo", "Intl_getCalendarInfo", 1, 0), - JS_FS_END - }; - if (!JS_DefineFunctions(cx, realIntlObj, funcs)) { return NS_ERROR_FAILURE; } @@ -44,8 +39,30 @@ MozIntl::AddGetCalendarInfo(JS::Handle val, JSContext* cx) return NS_OK; } +NS_IMETHODIMP +MozIntl::AddGetCalendarInfo(JS::Handle val, JSContext* cx) +{ + static const JSFunctionSpec funcs[] = { + JS_SELF_HOSTED_FN("getCalendarInfo", "Intl_getCalendarInfo", 1, 0), + JS_FS_END + }; + + return AddFunctions(cx, val, funcs); +} + NS_IMETHODIMP MozIntl::AddGetDisplayNames(JS::Handle val, JSContext* cx) +{ + static const JSFunctionSpec funcs[] = { + JS_SELF_HOSTED_FN("getDisplayNames", "Intl_getDisplayNames", 2, 0), + JS_FS_END + }; + + return AddFunctions(cx, val, funcs); +} + +NS_IMETHODIMP +MozIntl::AddPluralRulesConstructor(JS::Handle val, JSContext* cx) { if (!val.isObject()) { return NS_ERROR_INVALID_ARG; @@ -58,12 +75,7 @@ MozIntl::AddGetDisplayNames(JS::Handle val, JSContext* cx) JSAutoCompartment ac(cx, realIntlObj); - static const JSFunctionSpec funcs[] = { - JS_SELF_HOSTED_FN("getDisplayNames", "Intl_getDisplayNames", 2, 0), - JS_FS_END - }; - - if (!JS_DefineFunctions(cx, realIntlObj, funcs)) { + if (!js::AddPluralRulesConstructor(cx, realIntlObj)) { return NS_ERROR_FAILURE; } diff --git a/toolkit/components/mozintl/mozIMozIntl.idl b/toolkit/components/mozintl/mozIMozIntl.idl index f28824d47bf3..e0d88e12a766 100644 --- a/toolkit/components/mozintl/mozIMozIntl.idl +++ b/toolkit/components/mozintl/mozIMozIntl.idl @@ -10,4 +10,11 @@ interface mozIMozIntl : nsISupports { [implicit_jscontext] void addGetCalendarInfo(in jsval intlObject); [implicit_jscontext] void addGetDisplayNames(in jsval intlObject); + + /** + * Adds a PluralRules constructor to the given object. This function may only + * be called once within a realm/global object: calling it multiple times will + * throw. + */ + [implicit_jscontext] void addPluralRulesConstructor(in jsval intlObject); }; diff --git a/toolkit/components/narrate/NarrateControls.jsm b/toolkit/components/narrate/NarrateControls.jsm index bfee9dd96ff5..3ad889d82cc2 100644 --- a/toolkit/components/narrate/NarrateControls.jsm +++ b/toolkit/components/narrate/NarrateControls.jsm @@ -137,7 +137,7 @@ function NarrateControls(mm, win, languagePromise) { } NarrateControls.prototype = { - handleEvent: function(evt) { + handleEvent(evt) { switch (evt.type) { case "change": if (evt.target.id == "narrate-rate-input") { @@ -163,7 +163,7 @@ NarrateControls.prototype = { /** * Returns true if synth voices are available. */ - _setupVoices: function() { + _setupVoices() { return this._languagePromise.then(language => { this.voiceSelect.clear(); let win = this._win; @@ -211,7 +211,7 @@ NarrateControls.prototype = { }); }, - _getVoicePref: function() { + _getVoicePref() { let voicePref = Services.prefs.getCharPref("narrate.voice"); try { return JSON.parse(voicePref); @@ -220,12 +220,12 @@ NarrateControls.prototype = { } }, - _onRateInput: function(evt) { + _onRateInput(evt) { AsyncPrefs.set("narrate.rate", parseInt(evt.target.value, 10)); this.narrator.setRate(this._convertRate(evt.target.value)); }, - _onVoiceChange: function() { + _onVoiceChange() { let voice = this.voice; this.narrator.setVoice(voice); this._languagePromise.then(language => { @@ -237,7 +237,7 @@ NarrateControls.prototype = { }); }, - _onButtonClick: function(evt) { + _onButtonClick(evt) { switch (evt.target.id) { case "narrate-skip-previous": this.narrator.skipPrevious(); @@ -262,7 +262,7 @@ NarrateControls.prototype = { } }, - _updateSpeechControls: function(speaking) { + _updateSpeechControls(speaking) { let dropdown = this._doc.getElementById("narrate-dropdown"); dropdown.classList.toggle("keep-open", speaking); dropdown.classList.toggle("speaking", speaking); @@ -281,7 +281,7 @@ NarrateControls.prototype = { } }, - _createVoiceLabel: function(voice) { + _createVoiceLabel(voice) { // This is a highly imperfect method of making human-readable labels // for system voices. Because each platform has a different naming scheme // for voices, we use a different method for each platform. @@ -304,7 +304,7 @@ NarrateControls.prototype = { } }, - _getLanguageName: function(lang) { + _getLanguageName(lang) { if (!this._langStrings) { this._langStrings = Services.strings.createBundle( "chrome://global/locale/languageNames.properties "); @@ -318,7 +318,7 @@ NarrateControls.prototype = { } }, - _convertRate: function(rate) { + _convertRate(rate) { // We need to convert a relative percentage value to a fraction rate value. // eg. -100 is half the speed, 100 is twice the speed in percentage, // 0.5 is half the speed and 2 is twice the speed in fractions. diff --git a/toolkit/components/narrate/Narrator.jsm b/toolkit/components/narrate/Narrator.jsm index 4af9c7eed604..03bec2500cf0 100644 --- a/toolkit/components/narrate/Narrator.jsm +++ b/toolkit/components/narrate/Narrator.jsm @@ -53,7 +53,7 @@ Narrator.prototype = { // For example, paragraphs. But nested anchors and other elements // are not interesting since their text already appears in their // parent's textContent. - acceptNode: function(node) { + acceptNode(node) { if (this._matches.has(node.parentNode)) { // Reject sub-trees of accepted nodes. return nf.FILTER_REJECT; @@ -106,7 +106,7 @@ Narrator.prototype = { this._win.speechSynthesis.pending; }, - _getVoice: function(voiceURI) { + _getVoice(voiceURI) { if (!this._voiceMap || !this._voiceMap.has(voiceURI)) { this._voiceMap = new Map( this._win.speechSynthesis.getVoices().map(v => [v.voiceURI, v])); @@ -115,7 +115,7 @@ Narrator.prototype = { return this._voiceMap.get(voiceURI); }, - _isParagraphInView: function(paragraph) { + _isParagraphInView(paragraph) { if (!paragraph) { return false; } @@ -124,13 +124,13 @@ Narrator.prototype = { return bb.top >= 0 && bb.top < this._win.innerHeight; }, - _sendTestEvent: function(eventType, detail) { + _sendTestEvent(eventType, detail) { let win = this._win; win.dispatchEvent(new win.CustomEvent(eventType, { detail: Cu.cloneInto(detail, win.document) })); }, - _speakInner: function() { + _speakInner() { this._win.speechSynthesis.cancel(); let tw = this._treeWalker; let paragraph = tw.currentNode; @@ -235,7 +235,7 @@ Narrator.prototype = { }); }, - start: function(speechOptions) { + start(speechOptions) { this._speechOptions = { rate: speechOptions.rate, voice: this._getVoice(speechOptions.voice) @@ -264,32 +264,32 @@ Narrator.prototype = { }); }, - stop: function() { + stop() { this._stopped = true; this._win.speechSynthesis.cancel(); }, - skipNext: function() { + skipNext() { this._win.speechSynthesis.cancel(); }, - skipPrevious: function() { + skipPrevious() { this._goBackParagraphs(this._timeIntoParagraph < PREV_THRESHOLD ? 2 : 1); }, - setRate: function(rate) { + setRate(rate) { this._speechOptions.rate = rate; /* repeat current paragraph */ this._goBackParagraphs(1); }, - setVoice: function(voice) { + setVoice(voice) { this._speechOptions.voice = this._getVoice(voice); /* repeat current paragraph */ this._goBackParagraphs(1); }, - _goBackParagraphs: function(count) { + _goBackParagraphs(count) { let tw = this._treeWalker; for (let i = 0; i < count; i++) { if (!tw.previousNode()) { @@ -316,7 +316,7 @@ Highlighter.prototype = { * @param {Number} startOffset the start offset * @param {Number} length the length in characters of the range */ - highlight: function(startOffset, length) { + highlight(startOffset, length) { let containerRect = this.container.getBoundingClientRect(); let range = this._getRange(startOffset, startOffset + length); let rangeRects = range.getClientRects(); @@ -362,7 +362,7 @@ Highlighter.prototype = { /** * Releases reference to container and removes all highlight nodes. */ - remove: function() { + remove() { for (let node of this._nodes) { node.remove(); } @@ -376,7 +376,7 @@ Highlighter.prototype = { * * @param {Number} count number of nodes needed */ - _getFreshHighlightNodes: function(count) { + _getFreshHighlightNodes(count) { let doc = this.container.ownerDocument; let nodes = Array.from(this._nodes); @@ -403,7 +403,7 @@ Highlighter.prototype = { * @param {Number} startOffset the start offset * @param {Number} endOffset the end offset */ - _getRange: function(startOffset, endOffset) { + _getRange(startOffset, endOffset) { let doc = this.container.ownerDocument; let i = 0; let treeWalker = doc.createTreeWalker( diff --git a/toolkit/components/narrate/VoiceSelect.jsm b/toolkit/components/narrate/VoiceSelect.jsm index b283a06b39f4..4d3ff82b9e24 100644 --- a/toolkit/components/narrate/VoiceSelect.jsm +++ b/toolkit/components/narrate/VoiceSelect.jsm @@ -37,7 +37,7 @@ function VoiceSelect(win, label) { } VoiceSelect.prototype = { - add: function(label, value) { + add(label, value) { let option = this._doc.createElement("button"); option.dataset.value = value; option.classList.add("option"); @@ -48,7 +48,7 @@ VoiceSelect.prototype = { return option; }, - addOptions: function(options) { + addOptions(options) { let selected = null; for (let option of options) { if (option.selected) { @@ -61,11 +61,11 @@ VoiceSelect.prototype = { this._select(selected || this.options[0], true); }, - clear: function() { + clear() { this.listbox.innerHTML = ""; }, - toggleList: function(force, focus = true) { + toggleList(force, focus = true) { if (this.element.classList.toggle("open", force)) { if (focus) { (this.selected || this.options[0]).focus(); @@ -84,7 +84,7 @@ VoiceSelect.prototype = { } }, - handleEvent: function(evt) { + handleEvent(evt) { let target = evt.target; switch (evt.type) { @@ -131,7 +131,7 @@ VoiceSelect.prototype = { } }, - _getPagedOption: function(option, up) { + _getPagedOption(option, up) { let height = elem => elem.getBoundingClientRect().height; let listboxHeight = height(this.listbox); @@ -148,7 +148,7 @@ VoiceSelect.prototype = { return next; }, - _keyPressedButton: function(evt) { + _keyPressedButton(evt) { if (evt.altKey && (evt.key === "ArrowUp" || evt.key === "ArrowUp")) { this.toggleList(true); return; @@ -178,7 +178,7 @@ VoiceSelect.prototype = { } }, - _keyPressedInBox: function(evt) { + _keyPressedInBox(evt) { let toFocus; let cur = this._doc.activeElement; @@ -212,7 +212,7 @@ VoiceSelect.prototype = { } }, - _select: function(option, suppressEvent = false) { + _select(option, suppressEvent = false) { let oldSelected = this.selected; if (oldSelected) { oldSelected.removeAttribute("aria-selected"); @@ -233,7 +233,7 @@ VoiceSelect.prototype = { } }, - _updateDropdownHeight: function(now) { + _updateDropdownHeight(now) { let updateInner = () => { let winHeight = this._win.innerHeight; let listbox = this.listbox; @@ -252,7 +252,7 @@ VoiceSelect.prototype = { } }, - _getOptionFromValue: function(value) { + _getOptionFromValue(value) { return Array.from(this.options).find(o => o.dataset.value === value); }, diff --git a/toolkit/components/narrate/test/NarrateTestUtils.jsm b/toolkit/components/narrate/test/NarrateTestUtils.jsm index 302e5c9928b8..227a7cf2b100 100644 --- a/toolkit/components/narrate/test/NarrateTestUtils.jsm +++ b/toolkit/components/narrate/test/NarrateTestUtils.jsm @@ -24,7 +24,7 @@ this.NarrateTestUtils = { BACK: "#narrate-skip-previous", FORWARD: "#narrate-skip-next", - isVisible: function(element) { + isVisible(element) { let style = element.ownerDocument.defaultView.getComputedStyle(element, ""); if (style.display == "none") { return false; @@ -42,7 +42,7 @@ this.NarrateTestUtils = { return true; }, - isStoppedState: function(window, ok) { + isStoppedState(window, ok) { let $ = window.document.querySelector.bind(window.document); ok($(this.BACK).disabled, "back button is disabled"); ok($(this.FORWARD).disabled, "forward button is disabled"); @@ -52,7 +52,7 @@ this.NarrateTestUtils = { ok($(this.START).title == "Start", "Button tooltip is correct"); }, - isStartedState: function(window, ok) { + isStartedState(window, ok) { let $ = window.document.querySelector.bind(window.document); ok(!$(this.BACK).disabled, "back button is enabled"); ok(!$(this.FORWARD).disabled, "forward button is enabled"); @@ -62,7 +62,7 @@ this.NarrateTestUtils = { ok($(this.STOP).title == "Stop", "Button tooltip is correct"); }, - selectVoice: function(window, voiceUri) { + selectVoice(window, voiceUri) { if (!this.isVisible(window.document.querySelector(this.VOICE_OPTIONS))) { window.document.querySelector(this.VOICE_SELECT).click(); } @@ -76,11 +76,11 @@ this.NarrateTestUtils = { return voiceOption.classList.contains("selected"); }, - getEventUtils: function(window) { + getEventUtils(window) { let eventUtils = { "_EU_Ci": Components.interfaces, "_EU_Cc": Components.classes, - window: window, + window, parent: window, navigator: window.navigator, KeyboardEvent: window.KeyboardEvent, @@ -91,7 +91,7 @@ this.NarrateTestUtils = { return eventUtils; }, - getReaderReadyPromise: function(window) { + getReaderReadyPromise(window) { return new Promise(resolve => { function observeReady(subject, topic) { if (subject == window) { @@ -108,13 +108,13 @@ this.NarrateTestUtils = { }); }, - waitForNarrateToggle: function(window) { + waitForNarrateToggle(window) { let toggle = window.document.querySelector(this.TOGGLE); return ContentTaskUtils.waitForCondition( () => !toggle.hidden, ""); }, - waitForPrefChange: function(pref) { + waitForPrefChange(pref) { return new Promise(resolve => { function observeChange() { Services.prefs.removeObserver(pref, observeChange); @@ -125,18 +125,18 @@ this.NarrateTestUtils = { }); }, - sendBoundaryEvent: function(window, name, charIndex, charLength) { + sendBoundaryEvent(window, name, charIndex, charLength) { let detail = { type: "boundary", args: { name, charIndex, charLength } }; window.dispatchEvent(new window.CustomEvent("testsynthevent", - { detail: detail })); + { detail })); }, - isWordHighlightGone: function(window, ok) { + isWordHighlightGone(window, ok) { let $ = window.document.querySelector.bind(window.document); ok(!$(".narrate-word-highlight"), "No more word highlights exist"); }, - getWordHighlights: function(window) { + getWordHighlights(window) { let $$ = window.document.querySelectorAll.bind(window.document); let nodes = Array.from($$(".narrate-word-highlight")); return nodes.map(node => { diff --git a/toolkit/components/passwordmgr/LoginHelper.jsm b/toolkit/components/passwordmgr/LoginHelper.jsm index f63832762138..be0fc32aac73 100644 --- a/toolkit/components/passwordmgr/LoginHelper.jsm +++ b/toolkit/components/passwordmgr/LoginHelper.jsm @@ -517,7 +517,7 @@ this.LoginHelper = { } else { window.openDialog("chrome://passwordmgr/content/passwordManager.xul", "Toolkit:PasswordManager", "", - {filterString : filterString}); + {filterString}); } }, diff --git a/toolkit/components/passwordmgr/LoginImport.jsm b/toolkit/components/passwordmgr/LoginImport.jsm index 8f4ce246b087..9d620dd43ade 100644 --- a/toolkit/components/passwordmgr/LoginImport.jsm +++ b/toolkit/components/passwordmgr/LoginImport.jsm @@ -137,19 +137,19 @@ this.LoginImport.prototype = { this.store.data.logins.push({ id: this.store.data.nextId++, - hostname: hostname, - httpRealm: httpRealm, - formSubmitURL: formSubmitURL, - usernameField: usernameField, - passwordField: passwordField, - encryptedUsername: encryptedUsername, - encryptedPassword: encryptedPassword, - guid: guid, - encType: encType, - timeCreated: timeCreated, - timeLastUsed: timeLastUsed, - timePasswordChanged: timePasswordChanged, - timesUsed: timesUsed, + hostname, + httpRealm, + formSubmitURL, + usernameField, + passwordField, + encryptedUsername, + encryptedPassword, + guid, + encType, + timeCreated, + timeLastUsed, + timePasswordChanged, + timesUsed, }); } catch (ex) { Cu.reportError("Error importing login: " + ex); diff --git a/toolkit/components/passwordmgr/LoginManagerContent.jsm b/toolkit/components/passwordmgr/LoginManagerContent.jsm index c6926f2a713c..998b6c991181 100644 --- a/toolkit/components/passwordmgr/LoginManagerContent.jsm +++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm @@ -235,7 +235,7 @@ var LoginManagerContent = { let loginsFound = LoginHelper.vanillaObjectsToLogins(msg.data.logins); request.promise.resolve({ form: request.form, - loginsFound: loginsFound, + loginsFound, recipes: msg.data.recipes, }); break; @@ -276,10 +276,10 @@ var LoginManagerContent = { let messageManager = messageManagerFromWindow(win); // XXX Weak?? - let requestData = { form: form }; - let messageData = { formOrigin: formOrigin, - actionOrigin: actionOrigin, - options: options }; + let requestData = { form }; + let messageData = { formOrigin, + actionOrigin, + options }; return this._sendRequest(messageManager, requestData, "RemoteLogins:findLogins", @@ -306,14 +306,14 @@ var LoginManagerContent = { null; let requestData = {}; - let messageData = { formOrigin: formOrigin, - actionOrigin: actionOrigin, + let messageData = { formOrigin, + actionOrigin, searchString: aSearchString, - previousResult: previousResult, + previousResult, rect: aRect, isSecure: InsecurePasswordUtils.isFormSecure(form), isPasswordField: aElement.type == "password", - remote: remote }; + remote }; return this._sendRequest(messageManager, requestData, "RemoteLogins:autoCompleteLogins", @@ -608,7 +608,7 @@ var LoginManagerContent = { pwFields[pwFields.length] = { index : i, - element : element + element }; } @@ -881,8 +881,8 @@ var LoginManagerContent = { let openerTopWindow = win.opener ? win.opener.top : null; messageManager.sendAsyncMessage("RemoteLogins:onFormSubmit", - { hostname: hostname, - formSubmitURL: formSubmitURL, + { hostname, + formSubmitURL, usernameField: mockUsername, newPasswordField: mockPassword, oldPasswordField: mockOldPassword }, diff --git a/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm b/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm index c5671a56905d..74a9bd8ca1a4 100644 --- a/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm +++ b/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm @@ -164,10 +164,10 @@ var LoginManagerContextMenu = { */ _fillTargetField(login, inputElement, browser, documentURI) { LoginManagerParent.fillForm({ - browser: browser, + browser, loginFormOrigin: documentURI.prePath, - login: login, - inputElement: inputElement, + login, + inputElement, }).catch(Cu.reportError); }, diff --git a/toolkit/components/passwordmgr/LoginManagerParent.jsm b/toolkit/components/passwordmgr/LoginManagerParent.jsm index ec951344c971..52ce73f239eb 100644 --- a/toolkit/components/passwordmgr/LoginManagerParent.jsm +++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm @@ -38,7 +38,7 @@ var LoginManagerParent = { */ _recipeManager: null, - init: function() { + init() { let mm = Cc["@mozilla.org/globalmessagemanager;1"] .getService(Ci.nsIMessageListenerManager); mm.addMessageListener("RemoteLogins:findLogins", this); @@ -57,7 +57,7 @@ var LoginManagerParent = { }); }, - receiveMessage: function(msg) { + receiveMessage(msg) { let data = msg.data; switch (msg.name) { case "RemoteLogins:findLogins": { @@ -156,7 +156,7 @@ var LoginManagerParent = { if (!showMasterPassword && !Services.logins.isLoggedIn) { try { target.sendAsyncMessage("RemoteLogins:loginsFound", { - requestId: requestId, + requestId, logins: [], recipes, }); @@ -175,14 +175,14 @@ var LoginManagerParent = { QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]), - observe: function(subject, topic, data) { + observe(subject, topic, data) { log("Got deferred sendLoginDataToChild notification:", topic); // Only run observer once. Services.obs.removeObserver(this, "passwordmgr-crypto-login"); Services.obs.removeObserver(this, "passwordmgr-crypto-loginCanceled"); if (topic == "passwordmgr-crypto-loginCanceled") { target.sendAsyncMessage("RemoteLogins:loginsFound", { - requestId: requestId, + requestId, logins: [], recipes, }); @@ -219,13 +219,13 @@ var LoginManagerParent = { // doesn't support structured cloning. var jsLogins = LoginHelper.loginsToVanillaObjects(logins); target.sendAsyncMessage("RemoteLogins:loginsFound", { - requestId: requestId, + requestId, logins: jsLogins, recipes, }); }), - doAutocompleteSearch: function({ formOrigin, actionOrigin, + doAutocompleteSearch({ formOrigin, actionOrigin, searchString, previousResult, rect, requestId, isSecure, isPasswordField, remote }, target) { @@ -283,12 +283,12 @@ var LoginManagerParent = { // doesn't support structured cloning. var jsLogins = LoginHelper.loginsToVanillaObjects(matchingLogins); target.messageManager.sendAsyncMessage("RemoteLogins:loginsAutoCompleted", { - requestId: requestId, + requestId, logins: jsLogins, }); }, - onFormSubmit: function(hostname, formSubmitURL, + onFormSubmit(hostname, formSubmitURL, usernameField, newPasswordField, oldPasswordField, openerTopWindow, target) { diff --git a/toolkit/components/passwordmgr/content/passwordManager.js b/toolkit/components/passwordmgr/content/passwordManager.js index 3dbb499cc3ab..941fe8bdf390 100644 --- a/toolkit/components/passwordmgr/content/passwordManager.js +++ b/toolkit/components/passwordmgr/content/passwordManager.js @@ -35,7 +35,7 @@ let removeAllButton; let signonsTree; let signonReloadDisplay = { - observe: function(subject, topic, data) { + observe(subject, topic, data) { if (topic == "passwordmgr-storage-changed") { switch (data) { case "addLogin": diff --git a/toolkit/components/passwordmgr/crypto-SDR.js b/toolkit/components/passwordmgr/crypto-SDR.js index 82797bb0d844..d88e87d91140 100644 --- a/toolkit/components/passwordmgr/crypto-SDR.js +++ b/toolkit/components/passwordmgr/crypto-SDR.js @@ -37,14 +37,14 @@ LoginManagerCrypto_SDR.prototype = { return this.__utfConverter; }, - _utfConverterReset : function() { + _utfConverterReset() { this.__utfConverter = null; }, _uiBusy : false, - init : function() { + init() { // Check to see if the internal PKCS#11 token has been initialized. // If not, set a blank password. let tokenDB = Cc["@mozilla.org/security/pk11tokendb;1"]. @@ -66,7 +66,7 @@ LoginManagerCrypto_SDR.prototype = { * Returns the encrypted string, or throws an exception if there was a * problem. */ - encrypt : function(plainText) { + encrypt(plainText) { let cipherText = null; let wasLoggedIn = this.isLoggedIn; @@ -107,7 +107,7 @@ LoginManagerCrypto_SDR.prototype = { * Returns the decrypted string, or throws an exception if there was a * problem. */ - decrypt : function(cipherText) { + decrypt(cipherText) { let plainText = null; let wasLoggedIn = this.isLoggedIn; @@ -178,7 +178,7 @@ LoginManagerCrypto_SDR.prototype = { /* * _notifyObservers */ - _notifyObservers : function(topic) { + _notifyObservers(topic) { this.log("Prompted for a master password, notifying for " + topic); Services.obs.notifyObservers(null, topic, null); }, diff --git a/toolkit/components/passwordmgr/nsLoginInfo.js b/toolkit/components/passwordmgr/nsLoginInfo.js index 3baed81145ce..79ed276ce1e4 100644 --- a/toolkit/components/passwordmgr/nsLoginInfo.js +++ b/toolkit/components/passwordmgr/nsLoginInfo.js @@ -29,7 +29,7 @@ nsLoginInfo.prototype = { usernameField : null, passwordField : null, - init : function(aHostname, aFormSubmitURL, aHttpRealm, + init(aHostname, aFormSubmitURL, aHttpRealm, aUsername, aPassword, aUsernameField, aPasswordField) { this.hostname = aHostname; @@ -47,7 +47,7 @@ nsLoginInfo.prototype = { }); }, - equals : function(aLogin) { + equals(aLogin) { if (this.hostname != aLogin.hostname || this.formSubmitURL != aLogin.formSubmitURL || this.httpRealm != aLogin.httpRealm || @@ -60,7 +60,7 @@ nsLoginInfo.prototype = { return true; }, - clone : function() { + clone() { let clone = Cc["@mozilla.org/login-manager/loginInfo;1"]. createInstance(Ci.nsILoginInfo); clone.init(this.hostname, this.formSubmitURL, this.httpRealm, diff --git a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js index 54c6f53d8c7d..971ff0afbef4 100644 --- a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js +++ b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js @@ -46,7 +46,7 @@ LoginManagerPromptFactory.prototype = { _asyncPrompts : {}, _asyncPromptInProgress : false, - observe : function(subject, topic, data) { + observe(subject, topic, data) { this.log("Observed: " + topic); if (topic == "quit-application-granted") { this._cancelPendingPrompts(); @@ -60,13 +60,13 @@ LoginManagerPromptFactory.prototype = { } }, - getPrompt : function(aWindow, aIID) { + getPrompt(aWindow, aIID) { var prompt = new LoginManagerPrompter().QueryInterface(aIID); prompt.init(aWindow, this); return prompt; }, - _doAsyncPrompt : function() { + _doAsyncPrompt() { if (this._asyncPromptInProgress) { this.log("_doAsyncPrompt bypassed, already in progress"); return; @@ -115,7 +115,7 @@ LoginManagerPromptFactory.prototype = { var runnable = { cancel: false, - run : function() { + run() { var ok = false; if (!this.cancel) { try { @@ -185,7 +185,7 @@ LoginManagerPromptFactory.prototype = { }, - _cancelPendingPrompts : function() { + _cancelPendingPrompts() { this.log("Canceling all pending prompts..."); var asyncPrompts = this._asyncPrompts; this.__proto__._asyncPrompts = {}; @@ -321,7 +321,7 @@ LoginManagerPrompter.prototype = { * Wrapper around the prompt service prompt. Saving random fields here * doesn't really make sense and therefore isn't implemented. */ - prompt : function(aDialogTitle, aText, aPasswordRealm, + prompt(aDialogTitle, aText, aPasswordRealm, aSavePassword, aDefaultText, aResult) { if (aSavePassword != Ci.nsIAuthPrompt.SAVE_PASSWORD_NEVER) throw new Components.Exception("prompt only supports SAVE_PASSWORD_NEVER", @@ -342,7 +342,7 @@ LoginManagerPrompter.prototype = { * Looks up a username and password in the database. Will prompt the user * with a dialog, even if a username and password are found. */ - promptUsernameAndPassword : function(aDialogTitle, aText, aPasswordRealm, + promptUsernameAndPassword(aDialogTitle, aText, aPasswordRealm, aSavePassword, aUsername, aPassword) { this.log("===== promptUsernameAndPassword() called ====="); @@ -443,7 +443,7 @@ LoginManagerPrompter.prototype = { * with a dialog with a text field and ok/cancel buttons. If the user * allows it, then the password will be saved in the database. */ - promptPassword : function(aDialogTitle, aText, aPasswordRealm, + promptPassword(aDialogTitle, aText, aPasswordRealm, aSavePassword, aPassword) { this.log("===== promptPassword called() ====="); @@ -519,7 +519,7 @@ LoginManagerPrompter.prototype = { * arguments to let callers know the login can't be saved because we don't * know whether it's http or https. */ - _getRealmInfo : function(aRealmString) { + _getRealmInfo(aRealmString) { var httpRealm = /^.+ \(.+\)$/; if (httpRealm.test(aRealmString)) return [null, null, null]; @@ -547,7 +547,7 @@ LoginManagerPrompter.prototype = { * @param {int} aLevel * @param {nsIAuthInformation} aAuthInfo */ - promptAuth : function(aChannel, aLevel, aAuthInfo) { + promptAuth(aChannel, aLevel, aAuthInfo) { var selectedLogin = null; var checkbox = { value : false }; var checkboxLabel = null; @@ -678,7 +678,7 @@ LoginManagerPrompter.prototype = { return ok; }, - asyncPromptAuth : function(aChannel, aCallback, aContext, aLevel, aAuthInfo) { + asyncPromptAuth(aChannel, aCallback, aContext, aLevel, aAuthInfo) { var cancelable = null; try { @@ -731,7 +731,7 @@ LoginManagerPrompter.prototype = { /* ---------- nsILoginManagerPrompter prompts ---------- */ - init : function(aWindow = null, aFactory = null) { + init(aWindow = null, aFactory = null) { if (!aWindow) { // There may be no applicable window e.g. in a Sandbox or JSM. this._chromeWindow = null; @@ -759,7 +759,7 @@ LoginManagerPrompter.prototype = { this._opener = aOpener; }, - promptToSavePassword : function(aLogin) { + promptToSavePassword(aLogin) { this.log("promptToSavePassword"); var notifyObj = this._getPopupNote() || this._getNotifyBox(); if (notifyObj) @@ -771,7 +771,7 @@ LoginManagerPrompter.prototype = { /** * Displays a notification bar. */ - _showLoginNotification : function(aNotifyBox, aName, aText, aButtons) { + _showLoginNotification(aNotifyBox, aName, aText, aButtons) { var oldBar = aNotifyBox.getNotificationWithValue(aName); const priority = aNotifyBox.PRIORITY_INFO_MEDIUM; @@ -1014,7 +1014,7 @@ LoginManagerPrompter.prototype = { persistent: true, passwordNotificationType: type, hideClose: true, - eventCallback: function(topic) { + eventCallback(topic) { switch (topic) { case "showing": currentNotification = this; @@ -1072,7 +1072,7 @@ LoginManagerPrompter.prototype = { * @param aLogin * The login captured from the form. */ - _showSaveLoginNotification : function(aNotifyObj, aLogin) { + _showSaveLoginNotification(aNotifyObj, aLogin) { // Ugh. We can't use the strings from the popup window, because they // have the access key marked in the string (eg "Mo&zilla"), along // with some weird rules for handling access keys that do not occur @@ -1110,7 +1110,7 @@ LoginManagerPrompter.prototype = { label: rememberButtonText, accessKey: rememberButtonAccessKey, popup: null, - callback: function(aNotifyObj, aButton) { + callback(aNotifyObj, aButton) { pwmgr.addLogin(aLogin); } }, @@ -1120,7 +1120,7 @@ LoginManagerPrompter.prototype = { label: neverButtonText, accessKey: neverButtonAccessKey, popup: null, - callback: function(aNotifyObj, aButton) { + callback(aNotifyObj, aButton) { pwmgr.setLoginSavingEnabled(aLogin.hostname, false); } }, @@ -1130,7 +1130,7 @@ LoginManagerPrompter.prototype = { label: notNowButtonText, accessKey: notNowButtonAccessKey, popup: null, - callback: function() { /* NOP */ } + callback() { /* NOP */ } } ]; @@ -1141,7 +1141,7 @@ LoginManagerPrompter.prototype = { Services.obs.notifyObservers(aLogin, "passwordmgr-prompt-save", null); }, - _removeLoginNotifications : function() { + _removeLoginNotifications() { var popupNote = this._getPopupNote(); if (popupNote) popupNote = popupNote.getNotification("password"); @@ -1169,7 +1169,7 @@ LoginManagerPrompter.prototype = { * Called when we detect a new login in a form submission, * asks the user what to do. */ - _showSaveLoginDialog : function(aLogin) { + _showSaveLoginDialog(aLogin) { const buttonFlags = Ci.nsIPrompt.BUTTON_POS_1_DEFAULT + (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_0) + (Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1) + @@ -1292,7 +1292,7 @@ LoginManagerPrompter.prototype = { label: changeButtonText, accessKey: changeButtonAccessKey, popup: null, - callback: function(aNotifyObj, aButton) { + callback(aNotifyObj, aButton) { self._updateLogin(aOldLogin, aNewLogin); } }, @@ -1302,7 +1302,7 @@ LoginManagerPrompter.prototype = { label: dontChangeButtonText, accessKey: dontChangeButtonAccessKey, popup: null, - callback: function(aNotifyObj, aButton) { + callback(aNotifyObj, aButton) { // do nothing } } @@ -1361,7 +1361,7 @@ LoginManagerPrompter.prototype = { * * Note; XPCOM stupidity: |count| is just |logins.length|. */ - promptToChangePasswordWithUsernames : function(logins, count, aNewLogin) { + promptToChangePasswordWithUsernames(logins, count, aNewLogin) { this.log("promptToChangePasswordWithUsernames with count:", count); var usernames = logins.map(l => l.username); @@ -1419,7 +1419,7 @@ LoginManagerPrompter.prototype = { /** * Given a content DOM window, returns the chrome window and browser it's in. */ - _getChromeWindow: function(aWindow) { + _getChromeWindow(aWindow) { let windows = Services.wm.getEnumerator(null); while (windows.hasMoreElements()) { let win = windows.getNext(); @@ -1431,7 +1431,7 @@ LoginManagerPrompter.prototype = { return null; }, - _getNotifyWindow: function() { + _getNotifyWindow() { // Some sites pop up a temporary login window, which disappears // upon submission of credentials. We want to put the notification // bar in the opener window if this seems to be happening. @@ -1455,7 +1455,7 @@ LoginManagerPrompter.prototype = { * Returns the popup notification to this prompter, * or null if there isn't one available. */ - _getPopupNote : function() { + _getPopupNote() { let popupNote = null; try { @@ -1475,7 +1475,7 @@ LoginManagerPrompter.prototype = { * Returns the notification box to this prompter, or null if there isn't * a notification box available. */ - _getNotifyBox : function() { + _getNotifyBox() { let notifyBox = null; try { @@ -1496,7 +1496,7 @@ LoginManagerPrompter.prototype = { * is the same as some other existing login. So, pick a login with a * matching username, or return null. */ - _repickSelectedLogin : function(foundLogins, username) { + _repickSelectedLogin(foundLogins, username) { for (var i = 0; i < foundLogins.length; i++) if (foundLogins[i].username == username) return foundLogins[i]; @@ -1515,7 +1515,7 @@ LoginManagerPrompter.prototype = { * formatted if required. * */ - _getLocalizedString : function(key, formatArgs) { + _getLocalizedString(key, formatArgs) { if (formatArgs) return this._strBundle.formatStringFromName( key, formatArgs, formatArgs.length); @@ -1528,7 +1528,7 @@ LoginManagerPrompter.prototype = { * it's too long. This helps prevent an evil site from messing with the * "save password?" prompt too much. */ - _sanitizeUsername : function(username) { + _sanitizeUsername(username) { if (username.length > 30) { username = username.substring(0, 30); username += this._ellipsis; @@ -1543,7 +1543,7 @@ LoginManagerPrompter.prototype = { * Returns the hostname to use in a nsILoginInfo object (for example, * "http://example.com"). */ - _getFormattedHostname : function(aURI) { + _getFormattedHostname(aURI) { let uri; if (aURI instanceof Ci.nsIURI) { uri = aURI; @@ -1560,7 +1560,7 @@ LoginManagerPrompter.prototype = { * prompting purposes. Eg, "http://foo.com" --> "foo.com", or * "ftp://www.site.co.uk" --> "site.co.uk". */ - _getShortDisplayHost: function(aURIString) { + _getShortDisplayHost(aURIString) { var displayHost; var eTLDService = Cc["@mozilla.org/network/effective-tld-service;1"]. @@ -1586,7 +1586,7 @@ LoginManagerPrompter.prototype = { * Returns the hostname and realm for which authentication is being * requested, in the format expected to be used with nsILoginInfo. */ - _getAuthTarget : function(aChannel, aAuthInfo) { + _getAuthTarget(aChannel, aAuthInfo) { var hostname, realm; // If our proxy is demanding authentication, don't use the @@ -1634,7 +1634,7 @@ LoginManagerPrompter.prototype = { * If the authentication was for a Windows domain, we'll prepend the * return username with the domain. (eg, "domain\user") */ - _GetAuthInfo : function(aAuthInfo) { + _GetAuthInfo(aAuthInfo) { var username, password; var flags = aAuthInfo.flags; @@ -1654,7 +1654,7 @@ LoginManagerPrompter.prototype = { * domain out of the username if necessary and sets domain, username and * password on the auth information object. */ - _SetAuthInfo : function(aAuthInfo, username, password) { + _SetAuthInfo(aAuthInfo, username, password) { var flags = aAuthInfo.flags; if (flags & Ci.nsIAuthInformation.NEED_DOMAIN) { // Domain is separated from username by a backslash @@ -1671,12 +1671,12 @@ LoginManagerPrompter.prototype = { aAuthInfo.password = password; }, - _newAsyncPromptConsumer : function(aCallback, aContext) { + _newAsyncPromptConsumer(aCallback, aContext) { return { QueryInterface: XPCOMUtils.generateQI([Ci.nsICancelable]), callback: aCallback, context: aContext, - cancel: function() { + cancel() { this.callback.onAuthCancelled(this.context, false); this.callback = null; this.context = null; diff --git a/toolkit/components/passwordmgr/storage-json.js b/toolkit/components/passwordmgr/storage-json.js index 5bf75aab5071..bf9b13cc4e28 100644 --- a/toolkit/components/passwordmgr/storage-json.js +++ b/toolkit/components/passwordmgr/storage-json.js @@ -141,7 +141,7 @@ this.LoginManagerStorage_json.prototype = { encryptedUsername: encUsername, encryptedPassword: encPassword, guid: loginClone.guid, - encType: encType, + encType, timeCreated: loginClone.timeCreated, timeLastUsed: loginClone.timeLastUsed, timePasswordChanged: loginClone.timePasswordChanged, @@ -377,9 +377,9 @@ this.LoginManagerStorage_json.prototype = { findLogins(count, hostname, formSubmitURL, httpRealm) { let loginData = { - hostname: hostname, - formSubmitURL: formSubmitURL, - httpRealm: httpRealm + hostname, + formSubmitURL, + httpRealm }; let matchData = { }; for (let field of ["hostname", "formSubmitURL", "httpRealm"]) @@ -397,9 +397,9 @@ this.LoginManagerStorage_json.prototype = { countLogins(hostname, formSubmitURL, httpRealm) { let loginData = { - hostname: hostname, - formSubmitURL: formSubmitURL, - httpRealm: httpRealm + hostname, + formSubmitURL, + httpRealm }; let matchData = { }; for (let field of ["hostname", "formSubmitURL", "httpRealm"]) diff --git a/toolkit/components/passwordmgr/storage-mozStorage.js b/toolkit/components/passwordmgr/storage-mozStorage.js index f1f1273c70c5..54f640ae4f83 100644 --- a/toolkit/components/passwordmgr/storage-mozStorage.js +++ b/toolkit/components/passwordmgr/storage-mozStorage.js @@ -31,12 +31,12 @@ function Transaction(aDatabase) { } Transaction.prototype = { - commit : function() { + commit() { if (this._hasTransaction) this._db.commitTransaction(); }, - rollback : function() { + rollback() { if (this._hasTransaction) this._db.rollbackTransaction(); }, @@ -50,7 +50,7 @@ LoginManagerStorage_mozStorage.prototype = { classID : Components.ID("{8c2023b9-175c-477e-9761-44ae7b549756}"), QueryInterface : XPCOMUtils.generateQI([Ci.nsILoginManagerStorage, Ci.nsIInterfaceRequestor]), - getInterface : function(aIID) { + getInterface(aIID) { if (aIID.equals(Ci.nsIVariant)) { // Allows unwrapping the JavaScript object for regression tests. return this; @@ -155,7 +155,7 @@ LoginManagerStorage_mozStorage.prototype = { * Internal method used by regression tests only. It overrides the default * database location. */ - initWithFile : function(aDBFile) { + initWithFile(aDBFile) { if (aDBFile) this._signonsFile = aDBFile; @@ -163,7 +163,7 @@ LoginManagerStorage_mozStorage.prototype = { }, - initialize : function() { + initialize() { this._dbStmts = {}; let isFirstRun; @@ -200,12 +200,12 @@ LoginManagerStorage_mozStorage.prototype = { * Internal method used by regression tests only. It is called before * replacing this storage module with a new instance. */ - terminate : function() { + terminate() { return Promise.resolve(); }, - addLogin : function(login) { + addLogin(login) { // Throws if there are bogus values. LoginHelper.checkLoginValues(login); @@ -254,7 +254,7 @@ LoginManagerStorage_mozStorage.prototype = { encryptedUsername: encUsername, encryptedPassword: encPassword, guid: loginClone.guid, - encType: encType, + encType, timeCreated: loginClone.timeCreated, timeLastUsed: loginClone.timeLastUsed, timePasswordChanged: loginClone.timePasswordChanged, @@ -280,7 +280,7 @@ LoginManagerStorage_mozStorage.prototype = { }, - removeLogin : function(login) { + removeLogin(login) { let [idToDelete, storedLogin] = this._getIdForLogin(login); if (!idToDelete) throw new Error("No matching logins"); @@ -307,7 +307,7 @@ LoginManagerStorage_mozStorage.prototype = { LoginHelper.notifyStorageChanged("removeLogin", storedLogin); }, - modifyLogin : function(oldLogin, newLoginData) { + modifyLogin(oldLogin, newLoginData) { let [idToModify, oldStoredLogin] = this._getIdForLogin(oldLogin); if (!idToModify) throw new Error("No matching logins"); @@ -360,7 +360,7 @@ LoginManagerStorage_mozStorage.prototype = { encryptedUsername: encUsername, encryptedPassword: encPassword, guid: newLogin.guid, - encType: encType, + encType, timeCreated: newLogin.timeCreated, timeLastUsed: newLogin.timeLastUsed, timePasswordChanged: newLogin.timePasswordChanged, @@ -387,7 +387,7 @@ LoginManagerStorage_mozStorage.prototype = { /** * Returns an array of nsILoginInfo. */ - getAllLogins : function(count) { + getAllLogins(count) { let [logins, ids] = this._searchLogins({}); // decrypt entries for caller. @@ -406,7 +406,7 @@ LoginManagerStorage_mozStorage.prototype = { * * @return {nsILoginInfo[]} which are decrypted. */ - searchLogins : function(count, matchData) { + searchLogins(count, matchData) { let realMatchData = {}; let options = {}; // Convert nsIPropertyBag to normal JS object @@ -444,7 +444,7 @@ LoginManagerStorage_mozStorage.prototype = { * is an array of encrypted nsLoginInfo and ids is an array of associated * ids in the database. */ - _searchLogins : function(matchData, aOptions = { + _searchLogins(matchData, aOptions = { schemeUpgrades: false, }) { let conditions = [], params = {}; @@ -551,7 +551,7 @@ LoginManagerStorage_mozStorage.prototype = { /** * Moves a login to the deleted logins table */ - storeDeletedLogin : function(aLogin) { + storeDeletedLogin(aLogin) { let stmt = null; try { this.log("Storing " + aLogin.guid + " in deleted passwords\n"); @@ -572,7 +572,7 @@ LoginManagerStorage_mozStorage.prototype = { /** * Removes all logins from storage. */ - removeAllLogins : function() { + removeAllLogins() { this.log("Removing all logins"); let query; let stmt; @@ -600,11 +600,11 @@ LoginManagerStorage_mozStorage.prototype = { }, - findLogins : function(count, hostname, formSubmitURL, httpRealm) { + findLogins(count, hostname, formSubmitURL, httpRealm) { let loginData = { - hostname: hostname, - formSubmitURL: formSubmitURL, - httpRealm: httpRealm + hostname, + formSubmitURL, + httpRealm }; let matchData = { }; for (let field of ["hostname", "formSubmitURL", "httpRealm"]) @@ -621,7 +621,7 @@ LoginManagerStorage_mozStorage.prototype = { }, - countLogins : function(hostname, formSubmitURL, httpRealm) { + countLogins(hostname, formSubmitURL, httpRealm) { let _countLoginsHelper = (hostname, formSubmitURL, httpRealm) => { // Do checks for null and empty strings, adjust conditions and params @@ -670,7 +670,7 @@ LoginManagerStorage_mozStorage.prototype = { * found, both items will be null. The returned login contains the actual * stored login (useful for looking at the actual nsILoginMetaInfo values). */ - _getIdForLogin : function(login) { + _getIdForLogin(login) { let matchData = { }; for (let field of ["hostname", "formSubmitURL", "httpRealm"]) if (login[field] != '') @@ -705,7 +705,7 @@ LoginManagerStorage_mozStorage.prototype = { * statement being created. This fixes the cases where nulls are involved * and the empty string is supposed to be a wildcard match */ - _buildConditionsAndParams : function(hostname, formSubmitURL, httpRealm) { + _buildConditionsAndParams(hostname, formSubmitURL, httpRealm) { let conditions = [], params = {}; if (hostname == null) { @@ -736,9 +736,9 @@ LoginManagerStorage_mozStorage.prototype = { /** * Checks to see if the specified GUID already exists. */ - _isGuidUnique : function(guid) { + _isGuidUnique(guid) { let query = "SELECT COUNT(1) AS numLogins FROM moz_logins WHERE guid = :guid"; - let params = { guid: guid }; + let params = { guid }; let stmt, numLogins; try { @@ -761,7 +761,7 @@ LoginManagerStorage_mozStorage.prototype = { * Returns the encrypted username, password, and encrypton type for the specified * login. Can throw if the user cancels a master password entry. */ - _encryptLogin : function(login) { + _encryptLogin(login) { let encUsername = this._crypto.encrypt(login.username); let encPassword = this._crypto.encrypt(login.password); let encType = this._crypto.defaultEncType; @@ -781,7 +781,7 @@ LoginManagerStorage_mozStorage.prototype = { * to lose unencrypted entries (eg, because the user clicked Cancel * instead of entering their master password) */ - _decryptLogins : function(logins) { + _decryptLogins(logins) { let result = []; for (let login of logins) { @@ -809,7 +809,7 @@ LoginManagerStorage_mozStorage.prototype = { * Returns the wrapped statement for execution. Will use memoization * so that statements can be reused. */ - _dbCreateStatement : function(query, params) { + _dbCreateStatement(query, params) { let wrappedStmt = this._dbStmts[query]; // Memoize the statements if (!wrappedStmt) { @@ -829,7 +829,7 @@ LoginManagerStorage_mozStorage.prototype = { * Attempts to initialize the database. This creates the file if it doesn't * exist, performs any migrations, etc. Return if this is the first run. */ - _dbInit : function() { + _dbInit() { this.log("Initializing Database"); let isFirstRun = false; try { @@ -856,7 +856,7 @@ LoginManagerStorage_mozStorage.prototype = { return isFirstRun; }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { switch (topic) { case "profile-before-change": Services.obs.removeObserver(this, "profile-before-change"); @@ -865,27 +865,27 @@ LoginManagerStorage_mozStorage.prototype = { } }, - _dbCreate: function() { + _dbCreate() { this.log("Creating Database"); this._dbCreateSchema(); this._dbConnection.schemaVersion = DB_VERSION; }, - _dbCreateSchema : function() { + _dbCreateSchema() { this._dbCreateTables(); this._dbCreateIndices(); }, - _dbCreateTables : function() { + _dbCreateTables() { this.log("Creating Tables"); for (let name in this._dbSchema.tables) this._dbConnection.createTable(name, this._dbSchema.tables[name]); }, - _dbCreateIndices : function() { + _dbCreateIndices() { this.log("Creating Indices"); for (let name in this._dbSchema.indices) { let index = this._dbSchema.indices[name]; @@ -896,7 +896,7 @@ LoginManagerStorage_mozStorage.prototype = { }, - _dbMigrate : function(oldVersion) { + _dbMigrate(oldVersion) { this.log("Attempting to migrate from version " + oldVersion); if (oldVersion > DB_VERSION) { @@ -943,7 +943,7 @@ LoginManagerStorage_mozStorage.prototype = { /** * Version 2 adds a GUID column. Existing logins are assigned a random GUID. */ - _dbMigrateToVersion2 : function() { + _dbMigrateToVersion2() { // Check to see if GUID column already exists, add if needed let query; if (!this._dbColumnExists("guid")) { @@ -975,7 +975,7 @@ LoginManagerStorage_mozStorage.prototype = { query = "UPDATE moz_logins SET guid = :guid WHERE id = :id"; for (let id of ids) { let params = { - id: id, + id, guid: this._uuidService.generateUUID().toString() }; @@ -997,7 +997,7 @@ LoginManagerStorage_mozStorage.prototype = { /** * Version 3 adds a encType column. */ - _dbMigrateToVersion3 : function() { + _dbMigrateToVersion3() { // Check to see if encType column already exists, add if needed let query; if (!this._dbColumnExists("encType")) { @@ -1057,7 +1057,7 @@ LoginManagerStorage_mozStorage.prototype = { * Version 4 adds timeCreated, timeLastUsed, timePasswordChanged, * and timesUsed columns */ - _dbMigrateToVersion4 : function() { + _dbMigrateToVersion4() { let query; // Add the new columns, if needed. for (let column of ["timeCreated", "timeLastUsed", "timePasswordChanged", "timesUsed"]) { @@ -1112,7 +1112,7 @@ LoginManagerStorage_mozStorage.prototype = { /** * Version 5 adds the moz_deleted_logins table */ - _dbMigrateToVersion5 : function() { + _dbMigrateToVersion5() { if (!this._dbConnection.tableExists("moz_deleted_logins")) { this._dbConnection.createTable("moz_deleted_logins", this._dbSchema.tables.moz_deleted_logins); } @@ -1122,7 +1122,7 @@ LoginManagerStorage_mozStorage.prototype = { * Version 6 migrates all the hosts from * moz_disabledHosts to the permission manager. */ - _dbMigrateToVersion6 : function() { + _dbMigrateToVersion6() { let disabledHosts = []; let query = "SELECT hostname FROM moz_disabledHosts"; let stmt; @@ -1158,7 +1158,7 @@ LoginManagerStorage_mozStorage.prototype = { * Sanity check to ensure that the columns this version of the code expects * are present in the DB we're using. */ - _dbAreExpectedColumnsPresent : function() { + _dbAreExpectedColumnsPresent() { let query = "SELECT " + "id, " + "hostname, " + @@ -1203,7 +1203,7 @@ LoginManagerStorage_mozStorage.prototype = { /** * Checks to see if the named column already exists. */ - _dbColumnExists : function(columnName) { + _dbColumnExists(columnName) { let query = "SELECT " + columnName + " FROM moz_logins"; try { let stmt = this._dbConnection.createStatement(query); @@ -1215,7 +1215,7 @@ LoginManagerStorage_mozStorage.prototype = { } }, - _dbClose : function() { + _dbClose() { this.log("Closing the DB connection."); // Finalize all statements to free memory, avoid errors later for (let query in this._dbStmts) { @@ -1238,7 +1238,7 @@ LoginManagerStorage_mozStorage.prototype = { * Called when database creation fails. Finalizes database statements, * closes the database connection, deletes the database file. */ - _dbCleanup : function(backup) { + _dbCleanup(backup) { this.log("Cleaning up DB file - close & remove & backup=" + backup); // Create backup file diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js index f2255b32738d..0b04042e3482 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js +++ b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js @@ -19,7 +19,7 @@ add_task(function* test() { let modifiedLogin; let testNumber = 0; let testObserver = { - observe: function(subject, topic, data) { + observe(subject, topic, data) { if (topic == "passwordmgr-dialog-updated") { switch (testNumber) { case 1: diff --git a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js index efe7c26c5d7c..4f841f042c34 100644 --- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js +++ b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_switchtab.js @@ -12,7 +12,7 @@ add_task(function* test() { isnot(tab, gBrowser.selectedTab, "New tab shouldn't be selected"); let listener = { - onOpenWindow: function(window) { + onOpenWindow(window) { var domwindow = window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindow); waitForFocus(() => { @@ -25,7 +25,7 @@ add_task(function* test() { }, domwindow); }, - onCloseWindow: function() { + onCloseWindow() { } }; diff --git a/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html b/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html index 65c79f3bb78b..dc4acbd01cd1 100644 --- a/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html +++ b/toolkit/components/passwordmgr/test/mochitest/test_prompt_promptAuth_proxy.html @@ -76,14 +76,14 @@ var startupComplete = new Promise(resolve => startupCompleteResolver = resolve); function proxyChannelListener() { } proxyChannelListener.prototype = { - onStartRequest: function(request, context) { + onStartRequest(request, context) { startupCompleteResolver(); }, - onStopRequest: function(request, context, status) { } + onStopRequest(request, context, status) { } }; var resolveCallback = SpecialPowers.wrapCallbackObject({ - QueryInterface : function(iid) { + QueryInterface(iid) { const interfaces = [Ci.nsIProtocolProxyCallback, Ci.nsISupports]; if (!interfaces.some( function(v) { return iid.equals(v); } )) @@ -91,7 +91,7 @@ var resolveCallback = SpecialPowers.wrapCallbackObject({ return this; }, - onProxyAvailable : function(req, uri, pi, status) { + onProxyAvailable(req, uri, pi, status) { initLogins(pi); // I'm cheating a bit here... We should probably do some magic foo to get diff --git a/toolkit/components/passwordmgr/test/prompt_common.js b/toolkit/components/passwordmgr/test/prompt_common.js index a72e04ba28eb..6749ea4db6a2 100644 --- a/toolkit/components/passwordmgr/test/prompt_common.js +++ b/toolkit/components/passwordmgr/test/prompt_common.js @@ -26,7 +26,7 @@ function startCallbackTimer() { var observer = SpecialPowers.wrapCallbackObject({ - QueryInterface : function(iid) { + QueryInterface(iid) { const interfaces = [Ci.nsIObserver, Ci.nsISupports, Ci.nsISupportsWeakReference]; @@ -35,7 +35,7 @@ var observer = SpecialPowers.wrapCallbackObject({ return this; }, - observe : function(subject, topic, data) { + observe(subject, topic, data) { var doc = getDialogDoc(); if (doc) handleDialog(doc, testNum); diff --git a/toolkit/components/passwordmgr/test/pwmgr_common.js b/toolkit/components/passwordmgr/test/pwmgr_common.js index 77425253ceb5..8db4a8efe806 100644 --- a/toolkit/components/passwordmgr/test/pwmgr_common.js +++ b/toolkit/components/passwordmgr/test/pwmgr_common.js @@ -436,7 +436,10 @@ if (this.addMessageListener) { }); } else { // Code to only run in the mochitest pages (not in the chrome script). - SpecialPowers.pushPrefEnv({"set": [["signon.rememberSignons", true]]}); + SpecialPowers.pushPrefEnv({"set": [["signon.rememberSignons", true], + ["signon.autofillForms.http", true], + ["security.insecure_field_warning.contextual.enabled", false]] + }); SimpleTest.registerCleanupFunction(() => { SpecialPowers.popPrefEnv(); runInParent(function cleanupParent() { diff --git a/toolkit/components/passwordmgr/test/test_master_password.html b/toolkit/components/passwordmgr/test/test_master_password.html index c8884811f7c6..1b2d5f48194d 100644 --- a/toolkit/components/passwordmgr/test/test_master_password.html +++ b/toolkit/components/passwordmgr/test/test_master_password.html @@ -128,7 +128,7 @@ function handleDialog(doc, testNumber) { } var outerWindowObserver = { - observe: function(id) { + observe(id) { SpecialPowers.removeObserver(outerWindowObserver, "outer-window-destroyed"); var func; if (testNum == 1) diff --git a/toolkit/components/passwordmgr/test/test_prompt_async.html b/toolkit/components/passwordmgr/test/test_prompt_async.html index 03bea611bc8f..4cb08e0959b6 100644 --- a/toolkit/components/passwordmgr/test/test_prompt_async.html +++ b/toolkit/components/passwordmgr/test/test_prompt_async.html @@ -39,7 +39,7 @@ windowsOpen : 0, windowsRegistered : 0, - QueryInterface : function(iid) { + QueryInterface(iid) { const interfaces = [Ci.nsIObserver, Ci.nsISupports]; if (!interfaces.some( function(v) { return iid.equals(v); } )) @@ -47,7 +47,7 @@ return this; }, - observe: function(subject, topic, data) { + observe(subject, topic, data) { if (topic === "domwindowopened") { this.windowsOpen++; this.windowsRegistered++; @@ -59,14 +59,14 @@ } }, - shutdown: function() { + shutdown() { var observerService = SpecialPowers.Cc["@mozilla.org/observer-service;1"] .getService(Ci.nsIObserverService); observerService.removeObserver(this, "domwindowopened"); observerService.removeObserver(this, "domwindowclosed"); }, - reset: function() { + reset() { this.windowsOpen = 0; this.windowsRegistered = 0; } @@ -130,7 +130,7 @@ } var resolveCallback = SpecialPowers.wrapCallbackObject({ - QueryInterface : function(iid) { + QueryInterface(iid) { const interfaces = [Ci.nsIProtocolProxyCallback, Ci.nsISupports]; if (!interfaces.some( function(v) { return iid.equals(v); } )) @@ -138,7 +138,7 @@ return this; }, - onProxyAvailable : function(req, uri, pi, status) { + onProxyAvailable(req, uri, pi, status) { initLogins(pi); doTest(testNum); } diff --git a/toolkit/components/passwordmgr/test/unit/test_notifications.js b/toolkit/components/passwordmgr/test/unit/test_notifications.js index d564c766aa08..0ff2253baa47 100644 --- a/toolkit/components/passwordmgr/test/unit/test_notifications.js +++ b/toolkit/components/passwordmgr/test/unit/test_notifications.js @@ -8,7 +8,7 @@ var expectedData; var TestObserver = { QueryInterface : XPCOMUtils.generateQI([Ci.nsIObserver, Ci.nsISupportsWeakReference]), - observe : function(subject, topic, data) { + observe(subject, topic, data) { do_check_eq(topic, "passwordmgr-storage-changed"); do_check_eq(data, expectedNotification); diff --git a/toolkit/components/passwordmgr/test/unit/test_storage.js b/toolkit/components/passwordmgr/test/unit/test_storage.js index d65516d9b007..09ec96131164 100644 --- a/toolkit/components/passwordmgr/test/unit/test_storage.js +++ b/toolkit/components/passwordmgr/test/unit/test_storage.js @@ -31,7 +31,7 @@ add_task(function* test_storage_addLogin_nonascii() // Store the strings "user" and "pass" using similarly looking glyphs. let loginInfo = TestData.formLogin({ - hostname: hostname, + hostname, formSubmitURL: hostname, username: String.fromCharCode(533, 537, 7570, 345), password: String.fromCharCode(421, 259, 349, 537), diff --git a/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js b/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js index 36da8e8b72bb..7b869ab6ebb3 100644 --- a/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js +++ b/toolkit/components/passwordmgr/test/unit/test_user_autocomplete_result.js @@ -35,7 +35,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: true, isSecure: true, isPasswordField: false, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "", label: LABEL_NO_USERNAME, @@ -63,7 +63,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: true, isSecure: false, isPasswordField: false, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "", label: "This connection is not secure. Logins entered here could be compromised.", @@ -95,7 +95,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: true, isSecure: true, isPasswordField: true, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "emptypass1", label: LABEL_NO_USERNAME, @@ -123,7 +123,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: true, isSecure: false, isPasswordField: true, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "", label: "This connection is not secure. Logins entered here could be compromised.", @@ -155,7 +155,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: true, isSecure: true, isPasswordField: false, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "", label: LABEL_NO_USERNAME, @@ -183,7 +183,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: true, isSecure: false, isPasswordField: false, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "", label: LABEL_NO_USERNAME, @@ -211,7 +211,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: true, isSecure: true, isPasswordField: true, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "emptypass1", label: LABEL_NO_USERNAME, @@ -239,7 +239,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: true, isSecure: false, isPasswordField: true, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "emptypass1", label: LABEL_NO_USERNAME, @@ -267,7 +267,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: false, isSecure: true, isPasswordField: false, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "", label: LABEL_NO_USERNAME, @@ -295,7 +295,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: false, isSecure: false, isPasswordField: false, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "", label: "This connection is not secure. Logins entered here could be compromised.", @@ -327,7 +327,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: false, isSecure: true, isPasswordField: true, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "emptypass1", label: LABEL_NO_USERNAME, @@ -355,7 +355,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: false, isSecure: false, isPasswordField: true, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "", label: "This connection is not secure. Logins entered here could be compromised.", @@ -387,7 +387,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: false, isSecure: true, isPasswordField: false, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "", label: LABEL_NO_USERNAME, @@ -415,7 +415,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: false, isSecure: false, isPasswordField: false, - matchingLogins: matchingLogins, + matchingLogins, items: [] }, { @@ -423,7 +423,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: false, isSecure: true, isPasswordField: true, - matchingLogins: matchingLogins, + matchingLogins, items: [{ value: "emptypass1", label: LABEL_NO_USERNAME, @@ -451,7 +451,7 @@ let expectedResults = [ insecureAutoFillFormsEnabled: false, isSecure: false, isPasswordField: true, - matchingLogins: matchingLogins, + matchingLogins, items: [] }, ]; diff --git a/toolkit/components/perfmonitoring/AddonWatcher.jsm b/toolkit/components/perfmonitoring/AddonWatcher.jsm index 58decba85722..b081f97e98d2 100644 --- a/toolkit/components/perfmonitoring/AddonWatcher.jsm +++ b/toolkit/components/perfmonitoring/AddonWatcher.jsm @@ -44,7 +44,7 @@ this.AddonWatcher = { */ TOPIC_SLOW_ADDON_DETECTED: "addon-watcher-detected-slow-addon", - init: function() { + init() { this._initializedTimeStamp = Cu.now(); try { @@ -58,7 +58,7 @@ this.AddonWatcher = { this._idleThreshold = Preferences.get("browser.addon-watch.deactivate-after-idle-ms", 3000); this.paused = false; }, - uninit: function() { + uninit() { this.paused = true; }, _initializedTimeStamp: 0, @@ -87,7 +87,7 @@ this.AddonWatcher = { * {number} latestNotificationTimeStamp The timestamp of the latest user notification * that this add-on is slow. */ - _getAlerts: function(addonId) { + _getAlerts(addonId) { let alerts = this._alerts.get(addonId); if (!alerts) { alerts = { @@ -100,7 +100,7 @@ this.AddonWatcher = { return alerts; }, _alerts: new Map(), - _onSlowAddons: function(addons) { + _onSlowAddons(addons) { try { if (IdleService.idleTime >= this._idleThreshold) { // The application is idle. Maybe the computer is sleeping, or maybe @@ -202,10 +202,10 @@ this.AddonWatcher = { } }, - ignoreAddonForSession: function(addonid) { + ignoreAddonForSession(addonid) { this._ignoreList.add(addonid); }, - ignoreAddonPermanently: function(addonid) { + ignoreAddonPermanently(addonid) { this._ignoreList.add(addonid); try { let ignoreList = JSON.parse(Preferences.get("browser.addon-watch.ignore", "[]")) diff --git a/toolkit/components/perfmonitoring/PerformanceStats.jsm b/toolkit/components/perfmonitoring/PerformanceStats.jsm index 6b5fb117c49e..155009bb2916 100644 --- a/toolkit/components/perfmonitoring/PerformanceStats.jsm +++ b/toolkit/components/perfmonitoring/PerformanceStats.jsm @@ -79,7 +79,7 @@ Probe.prototype = { * If the probe was inactive, activate it. Note that activating a probe * can incur a memory or performance cost. */ - acquire: function() { + acquire() { if (this._counter == 0) { this._impl.isActive = true; Process.broadcast("acquire", [this._name]); @@ -92,7 +92,7 @@ Probe.prototype = { * * If this was the last client for this probe, deactivate it. */ - release: function() { + release() { this._counter--; if (this._counter == 0) { try { @@ -117,7 +117,7 @@ Probe.prototype = { * @return {object} An object containing the data extracted from this * probe. Actual format depends on the probe. */ - extract: function(xpcom) { + extract(xpcom) { if (!this._impl.isActive) { throw new Error(`Probe is inactive: ${this._name}`); } @@ -130,7 +130,7 @@ Probe.prototype = { * * @return {true} If `a` and `b` hold identical values. */ - isEqual: function(a, b) { + isEqual(a, b) { if (a == null && b == null) { return true; } @@ -149,7 +149,7 @@ Probe.prototype = { * @return {object} An object representing `a - b`. If `b` is * `null`, this is `a`. */ - subtract: function(a, b) { + subtract(a, b) { if (a == null) { throw new TypeError(); } @@ -159,7 +159,7 @@ Probe.prototype = { return this._impl.subtract(a, b); }, - importChildCompartments: function(parent, children) { + importChildCompartments(parent, children) { if (!Array.isArray(children)) { throw new TypeError(); } @@ -176,7 +176,7 @@ Probe.prototype = { return this._name; }, - compose: function(stats) { + compose(stats) { if (!Array.isArray(stats)) { throw new TypeError(); } @@ -221,17 +221,17 @@ var Probes = { get isActive() { return performanceStatsService.isMonitoringJank; }, - extract: function(xpcom) { + extract(xpcom) { let durations = xpcom.getDurations(); return { totalUserTime: xpcom.totalUserTime, totalSystemTime: xpcom.totalSystemTime, totalCPUTime: xpcom.totalUserTime + xpcom.totalSystemTime, - durations: durations, + durations, longestDuration: lastNonZero(durations) } }, - isEqual: function(a, b) { + isEqual(a, b) { // invariant: `a` and `b` are both non-null if (a.totalUserTime != b.totalUserTime) { return false; @@ -246,7 +246,7 @@ var Probes = { } return true; }, - subtract: function(a, b) { + subtract(a, b) { // invariant: `a` and `b` are both non-null let result = { totalUserTime: a.totalUserTime - b.totalUserTime, @@ -261,8 +261,8 @@ var Probes = { result.longestDuration = lastNonZero(result.durations); return result; }, - importChildCompartments: function() { /* nothing to do */ }, - compose: function(stats) { + importChildCompartments() { /* nothing to do */ }, + compose(stats) { let result = { totalUserTime: 0, totalSystemTime: 0, @@ -298,21 +298,21 @@ var Probes = { get isActive() { return performanceStatsService.isMonitoringCPOW; }, - extract: function(xpcom) { + extract(xpcom) { return { totalCPOWTime: xpcom.totalCPOWTime }; }, - isEqual: function(a, b) { + isEqual(a, b) { return a.totalCPOWTime == b.totalCPOWTime; }, - subtract: function(a, b) { + subtract(a, b) { return { totalCPOWTime: a.totalCPOWTime - b.totalCPOWTime }; }, - importChildCompartments: function() { /* nothing to do */ }, - compose: function(stats) { + importChildCompartments() { /* nothing to do */ }, + compose(stats) { let totalCPOWTime = 0; for (let stat of stats) { totalCPOWTime += stat.totalCPOWTime; @@ -335,21 +335,21 @@ var Probes = { ticks: new Probe("ticks", { set isActive(x) { /* this probe cannot be deactivated */ }, get isActive() { return true; }, - extract: function(xpcom) { + extract(xpcom) { return { ticks: xpcom.ticks }; }, - isEqual: function(a, b) { + isEqual(a, b) { return a.ticks == b.ticks; }, - subtract: function(a, b) { + subtract(a, b) { return { ticks: a.ticks - b.ticks }; }, - importChildCompartments: function() { /* nothing to do */ }, - compose: function(stats) { + importChildCompartments() { /* nothing to do */ }, + compose(stats) { let ticks = 0; for (let stat of stats) { ticks += stat.ticks; @@ -365,19 +365,19 @@ var Probes = { get isActive() { return performanceStatsService.isMonitoringPerCompartment; }, - extract: function(xpcom) { + extract(xpcom) { return null; }, - isEqual: function(a, b) { + isEqual(a, b) { return true; }, - subtract: function(a, b) { + subtract(a, b) { return true; }, - importChildCompartments: function(parent, children) { + importChildCompartments(parent, children) { parent.children = children; }, - compose: function(stats) { + compose(stats) { return null; }, }), @@ -447,7 +447,7 @@ PerformanceMonitor.prototype = { * @return {Promise} * @resolve {Snapshot} */ - _checkBeforeSnapshot: function(options) { + _checkBeforeSnapshot(options) { if (!this._finalizer) { throw new Error("dispose() has already been called, this PerformanceMonitor is not usable anymore"); } @@ -472,11 +472,11 @@ PerformanceMonitor.prototype = { } return probes; }, - promiseContentSnapshot: function(options = null) { + promiseContentSnapshot(options = null) { this._checkBeforeSnapshot(options); return (new ProcessSnapshot(performanceStatsService.getSnapshot())); }, - promiseSnapshot: function(options = null) { + promiseSnapshot(options = null) { let probes = this._checkBeforeSnapshot(options); return Task.spawn(function*() { let childProcesses = yield Process.broadcastAndCollect("collect", {probeNames: probes.map(p => p.name)}); @@ -496,7 +496,7 @@ PerformanceMonitor.prototype = { * Releasing probes as soon as they are unused is a good idea, as some probes * cost CPU and/or memory. */ - dispose: function() { + dispose() { if (!this._finalizer) { return; } @@ -573,7 +573,7 @@ this.PerformanceStats = { /** * Create a monitor for observing a set of performance probes. */ - getMonitor: function(probes) { + getMonitor(probes) { return PerformanceMonitor.make(probes); } }; @@ -640,7 +640,7 @@ PerformanceDataLeaf.prototype = { * * @return `true` if `this` and `to` have equal values in all fields. */ - equals: function(to) { + equals(to) { if (!(to instanceof PerformanceDataLeaf)) { throw new TypeError(); } @@ -661,7 +661,7 @@ PerformanceDataLeaf.prototype = { * * @return {PerformanceDiff} The performance usage between `to` and `this`. */ - subtract: function(to = null) { + subtract(to = null) { return (new PerformanceDiffLeaf(this, to)); } }; @@ -673,7 +673,7 @@ function PerformanceData(timestamp) { this._timestamp = timestamp; } PerformanceData.prototype = { - addChild: function(stat) { + addChild(stat) { if (!(stat instanceof PerformanceDataLeaf)) { throw new TypeError(); // FIXME } @@ -684,7 +684,7 @@ PerformanceData.prototype = { this._all.push(stat); stat.owner = this; }, - setParent: function(stat) { + setParent(stat) { if (!(stat instanceof PerformanceDataLeaf)) { throw new TypeError(); // FIXME } @@ -695,7 +695,7 @@ PerformanceData.prototype = { this._all.push(stat); stat.owner = this; }, - equals: function(to) { + equals(to) { if (this._parent && !to._parent) { return false; } @@ -719,7 +719,7 @@ PerformanceData.prototype = { } return true; }, - subtract: function(to = null) { + subtract(to = null) { return (new PerformanceDiff(this, to)); }, get addonId() { @@ -767,7 +767,7 @@ function PerformanceDiff(current, old = null) { } } PerformanceDiff.prototype = { - toString: function() { + toString() { return `[PerformanceDiff] ${this.key}`; }, get windowIds() { @@ -924,7 +924,7 @@ var Process = { * * NOOP if we are in a child process. */ - broadcast: function(topic, payload) { + broadcast(topic, payload) { if (!this.loader) { return; } diff --git a/toolkit/components/perfmonitoring/PerformanceWatcher.jsm b/toolkit/components/perfmonitoring/PerformanceWatcher.jsm index d0d034974967..994c057c59f6 100644 --- a/toolkit/components/perfmonitoring/PerformanceWatcher.jsm +++ b/toolkit/components/perfmonitoring/PerformanceWatcher.jsm @@ -95,20 +95,20 @@ ChildManager.prototype = { * Add a listener, which will be notified whenever a child process * reports a slow performance alert for this addon/window. */ - addListener: function(listener) { + addListener(listener) { this._listeners.add(listener); }, /** * Remove a listener. */ - removeListener: function(listener) { + removeListener(listener) { let deleted = this._listeners.delete(listener); if (!deleted) { throw new Error("Unknown listener"); } }, - listeners: function() { + listeners() { return this._listeners.values(); } }; @@ -216,7 +216,7 @@ function Observable(target) { } } Observable.prototype = { - addJankObserver: function(listener) { + addJankObserver(listener) { if (this._observers.has(listener)) { throw new TypeError(`Listener already registered for target ${this._key}`); } @@ -230,7 +230,7 @@ Observable.prototype = { this._process.addJankObserver(observer); }, - removeJankObserver: function(listener) { + removeJankObserver(listener) { let observer = this._observers.get(listener); if (!observer) { throw new TypeError(`No listener for target ${this._key}`); @@ -284,10 +284,10 @@ function Observer(listener) { this._listener = listener; } Observer.prototype = { - observe: function(...args) { + observe(...args) { this._listener(...args); }, - dispose: function() { + dispose() { this._monitor.dispose(); this.observe = function poison() { throw new Error("Internal error: I should have stopped receiving notifications"); @@ -350,14 +350,14 @@ this.PerformanceWatcher = { * If the listener listens to all add-ons/all webpages, it is triggered with * an array of {source, details}, as described above. */ - addPerformanceListener: function(target, listener) { + addPerformanceListener(target, listener) { if (typeof listener != "function") { throw new TypeError(); } let observable = Observable.get(target); observable.addJankObserver(listener); }, - removePerformanceListener: function(target, listener) { + removePerformanceListener(target, listener) { if (typeof listener != "function") { throw new TypeError(); } diff --git a/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js b/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js index 8b674937282f..b7bc198e05b6 100644 --- a/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js +++ b/toolkit/components/perfmonitoring/tests/browser/browser_compartments.js @@ -64,25 +64,25 @@ function frameScript() { // A variant of `Assert` that doesn't spam the logs // in case of success. var SilentAssert = { - equal: function(a, b, msg) { + equal(a, b, msg) { if (a == b) { return; } Assert.equal(a, b, msg); }, - notEqual: function(a, b, msg) { + notEqual(a, b, msg) { if (a != b) { return; } Assert.notEqual(a, b, msg); }, - ok: function(a, msg) { + ok(a, msg) { if (a) { return; } Assert.ok(a, msg); }, - leq: function(a, b, msg) { + leq(a, b, msg) { this.ok(a <= b, `${msg}: ${a} <= ${b}`); } }; diff --git a/toolkit/components/perfmonitoring/tests/browser/head.js b/toolkit/components/perfmonitoring/tests/browser/head.js index 92258fd1b9d6..85e2ca5f2bb0 100644 --- a/toolkit/components/perfmonitoring/tests/browser/head.js +++ b/toolkit/components/perfmonitoring/tests/browser/head.js @@ -45,7 +45,7 @@ CPUBurner.prototype = { } return false; }), - dispose: function() { + dispose() { info(`CPUBurner: Closing tab for ${this.url}\n`); gBrowser.removeTab(this.tab); } @@ -142,7 +142,7 @@ function AlertListener(accept, {register, unregister}) { register(); } AlertListener.prototype = { - unregister: function() { + unregister() { this.reset(); if (this._unregistered) { info(`head.js: No need to unregister, we're already unregistered.\n`); @@ -153,7 +153,7 @@ AlertListener.prototype = { this._unregister(); info(`head.js: Unregistration complete.\n`); }, - reset: function() { + reset() { this.triggered = false; this.result = null; }, @@ -181,7 +181,7 @@ function AddonBurner(addonId = "fake add-on id: " + Math.random()) { } AddonBurner.prototype = Object.create(CPUBurner.prototype); Object.defineProperty(AddonBurner.prototype, "addonId", { - get: function() { + get() { return this._addonId; } }); diff --git a/toolkit/components/places/BookmarkHTMLUtils.jsm b/toolkit/components/places/BookmarkHTMLUtils.jsm index 5aff75e9d084..10db007368c6 100644 --- a/toolkit/components/places/BookmarkHTMLUtils.jsm +++ b/toolkit/components/places/BookmarkHTMLUtils.jsm @@ -1037,19 +1037,19 @@ BookmarkExporter.prototype = { _converterOut: null, - _write: function(aText) { + _write(aText) { this._converterOut.writeString(aText || ""); }, - _writeAttribute: function(aName, aValue) { + _writeAttribute(aName, aValue) { this._write(' ' + aName + '="' + aValue + '"'); }, - _writeLine: function(aText) { + _writeLine(aText) { this._write(aText + "\n"); }, - _writeHeader: function() { + _writeHeader() { this._writeLine(""); this._writeLine("