From 5d119ce85efb17b6f9b4dff60e937f1312e717b3 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Thu, 9 May 2019 14:21:18 -0400 Subject: Issue #1083 - Deprecate FUEL extension helper javascript library --- application/palemoon/components/fuel/fuelApplication.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'application/palemoon/components') diff --git a/application/palemoon/components/fuel/fuelApplication.js b/application/palemoon/components/fuel/fuelApplication.js index 017813143..bc3a091ea 100644 --- a/application/palemoon/components/fuel/fuelApplication.js +++ b/application/palemoon/components/fuel/fuelApplication.js @@ -6,6 +6,8 @@ const Ci = Components.interfaces; const Cc = Components.classes; Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Deprecated", + "resource://gre/modules/Deprecated.jsm"); const APPLICATION_CID = Components.ID("fe74cf80-aa2d-11db-abbd-0800200c9a66"); const APPLICATION_CONTRACTID = "@mozilla.org/fuel/application;1"; @@ -734,6 +736,8 @@ var ApplicationFactory = { //================================================= // Application constructor function Application() { + Deprecated.warning("FUEL is deprecated, you should use the standard Toolkit API instead.", + "https://github.com/MoonchildProductions/UXP/issues/1083"); this.initToolkitHelpers(); } -- cgit v1.2.3 From c7dc667e614cbff35c0d76d3647fde81f7192184 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 12 May 2019 21:00:32 -0400 Subject: Remove deprecated appending of #-moz-resolution from Pale Moon and left over from nsMediaFragmentURIParser.h This also magically makes Aero Peek work properly with Pale Moon thus: Resolves #809 --- application/palemoon/components/places/PlacesUIUtils.jsm | 7 ++----- application/palemoon/components/search/content/search.xml | 5 ----- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'application/palemoon/components') diff --git a/application/palemoon/components/places/PlacesUIUtils.jsm b/application/palemoon/components/places/PlacesUIUtils.jsm index 05d79241c..e3a9e1322 100644 --- a/application/palemoon/components/places/PlacesUIUtils.jsm +++ b/application/palemoon/components/places/PlacesUIUtils.jsm @@ -1170,11 +1170,8 @@ this.PlacesUIUtils = { * @return The URL with the fragment at the end */ getImageURLForResolution: - function PUIU_getImageURLForResolution(aWindow, aURL, aWidth = 16, aHeight = 16) { - let width = Math.round(aWidth * aWindow.devicePixelRatio); - let height = Math.round(aHeight * aWindow.devicePixelRatio); - return aURL + (aURL.includes("#") ? "&" : "#") + - "-moz-resolution=" + width + "," + height; + function PUIU_getImageURLForResolution(aWindow, aURL, aWidth, aHeight) { + return aURL; } }; diff --git a/application/palemoon/components/search/content/search.xml b/application/palemoon/components/search/content/search.xml index 4532f5720..0c33b1527 100644 --- a/application/palemoon/components/search/content/search.xml +++ b/application/palemoon/components/search/content/search.xml @@ -283,11 +283,6 @@ -- cgit v1.2.3 From 97477c1e96fded7c40534afa3ad0bfc3980658e3 Mon Sep 17 00:00:00 2001 From: adeshkp Date: Sat, 25 May 2019 15:59:28 -0400 Subject: Issue #246 - Remove "enhanced" newtab code from Pale Moon --- application/palemoon/components/newtab/grid.js | 4 -- application/palemoon/components/newtab/page.js | 50 +------------------------ application/palemoon/components/newtab/sites.js | 14 +------ 3 files changed, 2 insertions(+), 66 deletions(-) (limited to 'application/palemoon/components') diff --git a/application/palemoon/components/newtab/grid.js b/application/palemoon/components/newtab/grid.js index db3d319c3..e63ea54a6 100644 --- a/application/palemoon/components/newtab/grid.js +++ b/application/palemoon/components/newtab/grid.js @@ -130,13 +130,9 @@ var gGrid = { // Create sites. let numLinks = Math.min(links.length, cells.length); - let hasHistoryTiles = false; for (let i = 0; i < numLinks; i++) { if (links[i]) { this.createSite(links[i], cells[i]); - if (links[i].type == "history") { - hasHistoryTiles = true; - } } } diff --git a/application/palemoon/components/newtab/page.js b/application/palemoon/components/newtab/page.js index 7117d4527..ceb2c2a76 100644 --- a/application/palemoon/components/newtab/page.js +++ b/application/palemoon/components/newtab/page.js @@ -47,11 +47,6 @@ var gPage = { let enabled = gAllPages.enabled; this._updateAttributes(enabled); - // Update thumbnails to the new enhanced setting - if (aData == "browser.newtabpage.enhanced") { - this.update(); - } - // Initialize the whole page if we haven't done that, yet. if (enabled) { this._init(); @@ -166,16 +161,6 @@ var gPage = { */ _handleUnloadEvent: function Page_handleUnloadEvent() { gAllPages.unregister(this); - // compute page life-span and send telemetry probe: using milli-seconds will leave - // many low buckets empty. Instead we use half-second precision to make low end - // of histogram linear and not lose the change in user attention - let delta = Math.round((Date.now() - this._firstVisibleTime) / 500); - if (this._suggestedTilePresent) { - Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN_SUGGESTED").add(delta); - } - else { - Services.telemetry.getHistogramById("NEWTAB_PAGE_LIFE_SPAN").add(delta); - } }, /** @@ -250,43 +235,10 @@ var gPage = { }, onPageVisibleAndLoaded() { - // Send the index of the last visible tile. - this.reportLastVisibleTileIndex(); - // Maybe tell the user they can undo an initial automigration - this.maybeShowAutoMigrationUndoNotification(); - }, - - reportLastVisibleTileIndex() { - let cwu = window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindowUtils); - - let rect = cwu.getBoundsWithoutFlushing(gGrid.node); - let nodes = cwu.nodesFromRect(rect.left, rect.top, 0, rect.width, - rect.height, 0, true, false); - - let i = -1; - let lastIndex = -1; - let sites = gGrid.sites; - - for (let node of nodes) { - if (node.classList && node.classList.contains("newtab-cell")) { - if (sites[++i]) { - lastIndex = i; - if (sites[i].link.targetedSite) { - // record that suggested tile is shown to use suggested-tiles-histogram - this._suggestedTilePresent = true; - } - } - } - } }, toggleEnabled: function(aEvent) { gAllPages.enabled = !gAllPages.enabled; event.stopPropagation(); - }, - - maybeShowAutoMigrationUndoNotification() { - // sendAsyncMessage("NewTab:MaybeShowAutoMigrationUndoNotification"); - }, + } }; diff --git a/application/palemoon/components/newtab/sites.js b/application/palemoon/components/newtab/sites.js index a368146bb..cb5675238 100644 --- a/application/palemoon/components/newtab/sites.js +++ b/application/palemoon/components/newtab/sites.js @@ -136,15 +136,6 @@ Site.prototype = { return str; }, - _getSuggestedTileExplanation: function() { - let targetedName = ` ${this.link.targetedName} `; - let targetedSite = ` ${this.link.targetedSite} `; - if (this.link.explanation) { - return this._newTabString(this.link.explanation, [targetedName, targetedSite]); - } - return newTabString("suggested.button", [targetedName]); - }, - /** * Checks for and modifies link at campaign end time */ @@ -155,11 +146,8 @@ Site.prototype = { this.link.url = Services.io.newURI(this.url, null, null).resolve("/"); // clear supplied images - this triggers thumbnail download for new url delete this.link.imageURI; - delete this.link.enhancedImageURI; // remove endTime to avoid further time checks delete this.link.endTime; - // clear enhanced-content image that may still exist in preloaded page - this._querySelector(".enhanced-content").style.backgroundImage = ""; gPinnedLinks.replace(oldUrl, this.link); } }, @@ -337,7 +325,7 @@ Site.prototype = { } else if (!pinned && target.classList.contains("newtab-control-pin")) { if (this.pin()) { - // suggested link has changed - update rest of the pages + // link has changed - update rest of the pages gAllPages.update(gPage); } action = "pin"; -- cgit v1.2.3 From a38cc1a2f5177ea18b4c2c3e260e527250283c57 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sat, 25 May 2019 18:36:25 -0400 Subject: [Pale Moon] Fix event.stopPropagation is not defined when clicking the show/hide tiles on about:newtab --- application/palemoon/components/newtab/page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/palemoon/components') diff --git a/application/palemoon/components/newtab/page.js b/application/palemoon/components/newtab/page.js index ceb2c2a76..34387fd44 100644 --- a/application/palemoon/components/newtab/page.js +++ b/application/palemoon/components/newtab/page.js @@ -239,6 +239,6 @@ var gPage = { toggleEnabled: function(aEvent) { gAllPages.enabled = !gAllPages.enabled; - event.stopPropagation(); + aEvent.stopPropagation(); } }; -- cgit v1.2.3