diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-08 07:48:28 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-06-08 07:48:28 +0000 |
commit | ba9e648ce2705ad1c4679325a9326c47263e2a3e (patch) | |
tree | 724cf5101a1b5923c235dc767b355a7b0e906eb7 /application/palemoon | |
parent | c8300fbd6ae08925736c32f8b02c980ce1531f3f (diff) | |
parent | 19c0f5e9ff625c6a67e5e0a08f0a800782168492 (diff) | |
download | UXP-ba9e648ce2705ad1c4679325a9326c47263e2a3e.tar UXP-ba9e648ce2705ad1c4679325a9326c47263e2a3e.tar.gz UXP-ba9e648ce2705ad1c4679325a9326c47263e2a3e.tar.lz UXP-ba9e648ce2705ad1c4679325a9326c47263e2a3e.tar.xz UXP-ba9e648ce2705ad1c4679325a9326c47263e2a3e.zip |
Merge branch 'master' into remove-unboxed
Diffstat (limited to 'application/palemoon')
8 files changed, 27 insertions, 88 deletions
diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js index 974d76d4b..d0e078eb7 100644 --- a/application/palemoon/app/profile/palemoon.js +++ b/application/palemoon/app/profile/palemoon.js @@ -1077,9 +1077,6 @@ pref("browser.newtab.preload", false); // Toggles the content of 'about:newtab'. Shows the grid when enabled. pref("browser.newtabpage.enabled", true); -// XXX: Remove this when "enhanced" tiles are dead -pref("browser.newtabpage.enhanced", false); - // Disables capturing of page thumbnails pref("browser.pagethumbnails.capturing_disabled", false); diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js index 3f8a584bf..16b7c0019 100644 --- a/application/palemoon/base/content/browser.js +++ b/application/palemoon/base/content/browser.js @@ -4481,14 +4481,15 @@ nsBrowserAccess.prototype = { } let loadInBackground = gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground"); - let referrer = aOpener ? makeURI(aOpener.location.href) : null; + let openerWindow = (aContext & Ci.nsIBrowserDOMWindow.OPEN_NO_OPENER) ? null : aOpener; let tab = win.gBrowser.loadOneTab(aURI ? aURI.spec : "about:blank", { triggeringPrincipal: triggeringPrincipal, referrerURI: referrer, referrerPolicy: referrerPolicy, fromExternal: isExternal, - inBackground: loadInBackground}); + inBackground: loadInBackground, + opener: openerWindow }); let browser = win.gBrowser.getBrowserForTab(tab); if (gPrefService.getBoolPref("browser.tabs.noWindowActivationOnExternal")) { diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml index aa1a89200..b5edd54b7 100644 --- a/application/palemoon/base/content/tabbrowser.xml +++ b/application/palemoon/base/content/tabbrowser.xml @@ -1337,6 +1337,7 @@ var aFromExternal; var aRelatedToCurrent; var aOriginPrincipal; + var aOpener; if (arguments.length == 2 && typeof arguments[1] == "object" && !(arguments[1] instanceof Ci.nsIURI)) { @@ -1351,6 +1352,7 @@ aFromExternal = params.fromExternal; aRelatedToCurrent = params.relatedToCurrent; aOriginPrincipal = params.originPrincipal; + aOpener = params.opener; } var bgLoad = (aLoadInBackground != null) ? aLoadInBackground : @@ -1366,7 +1368,8 @@ allowThirdPartyFixup: aAllowThirdPartyFixup, fromExternal: aFromExternal, originPrincipal: aOriginPrincipal, - relatedToCurrent: aRelatedToCurrent}); + relatedToCurrent: aRelatedToCurrent, + opener: aOpener }); if (!bgLoad) this.selectedTab = tab; @@ -1489,6 +1492,7 @@ var aSkipAnimation; var aOriginPrincipal; var aSkipBackgroundNotify; + var aOpener; if (arguments.length == 2 && typeof arguments[1] == "object" && !(arguments[1] instanceof Ci.nsIURI)) { @@ -1504,6 +1508,7 @@ aRelatedToCurrent = params.relatedToCurrent; aSkipAnimation = params.skipAnimation; aOriginPrincipal = params.originPrincipal; + aOpener = params.opener; aSkipBackgroundNotify = params.skipBackgroundNotify; } @@ -1578,6 +1583,10 @@ b.setAttribute("showresizer", "true"); } + if (aOpener) { + b.QueryInterface(Ci.nsIFrameLoaderOwner).presetOpenerWindow(aOpener); + } + if (this.hasAttribute("autocompletepopup")) b.setAttribute("autocompletepopup", this.getAttribute("autocompletepopup")); b.setAttribute("autoscrollpopup", this._autoScrollPopup.id); diff --git a/application/palemoon/base/content/utilityOverlay.js b/application/palemoon/base/content/utilityOverlay.js index d7c8088c7..1d284ba2a 100644 --- a/application/palemoon/base/content/utilityOverlay.js +++ b/application/palemoon/base/content/utilityOverlay.js @@ -558,7 +558,7 @@ function checkForUpdates() // If there's an update ready to be applied, show the "Update Downloaded" // UI instead and let the user know they have to restart the application for // the changes to be applied. - if (um.activeUpdate && um.activeUpdate.state == "pending") + if (um.activeUpdate && ["pending", "pending-elevate", "applied"].includes(um.activeUpdate.state)) prompter.showUpdateDownloaded(um.activeUpdate); else prompter.checkForUpdates(); 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..34387fd44 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"); - }, + aEvent.stopPropagation(); + } }; 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 = `<strong> ${this.link.targetedName} </strong>`; - let targetedSite = `<strong> ${this.link.targetedSite} </strong>`; - 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"; diff --git a/application/palemoon/locales/en-US/chrome/browser-region/region.properties b/application/palemoon/locales/en-US/chrome/browser-region/region.properties index ad6c1342f..8782ae46f 100644 --- a/application/palemoon/locales/en-US/chrome/browser-region/region.properties +++ b/application/palemoon/locales/en-US/chrome/browser-region/region.properties @@ -14,29 +14,25 @@ browser.search.order.4=Ecosia # This is the default set of web based feed handlers shown in the reader # selection UI browser.contentHandlers.types.0.title=My Yahoo! -browser.contentHandlers.types.0.uri=http://add.my.yahoo.com/rss?url=%s +browser.contentHandlers.types.0.uri=https://add.my.yahoo.com/rss?url=%s # increment this number when anything gets changed in the list below. This will # cause Firefox to re-read these prefs and inject any new handlers into the # profile database. Note that "new" is defined as "has a different URL"; this # means that it's not possible to update the name of existing handler, so # don't make any spelling errors here. -goanna.handlerService.defaultHandlersVersion=3 - -# The default set of protocol handlers for webcal: -goanna.handlerService.schemes.webcal.0.name=30 Boxes -goanna.handlerService.schemes.webcal.0.uriTemplate=http://30boxes.com/external/widget?refer=ff&url=%s +gecko.handlerService.defaultHandlersVersion=5 # The default set of protocol handlers for mailto: -goanna.handlerService.schemes.mailto.0.name=Yahoo! Mail -goanna.handlerService.schemes.mailto.0.uriTemplate=https://compose.mail.yahoo.com/?To=%s -goanna.handlerService.schemes.mailto.1.name=Gmail -goanna.handlerService.schemes.mailto.1.uriTemplate=https://mail.google.com/mail/?extsrc=mailto&url=%s +gecko.handlerService.schemes.mailto.0.name=Yahoo! Mail +gecko.handlerService.schemes.mailto.0.uriTemplate=https://compose.mail.yahoo.com/?To=%s +gecko.handlerService.schemes.mailto.1.name=Gmail +gecko.handlerService.schemes.mailto.1.uriTemplate=https://mail.google.com/mail/?extsrc=mailto&url=%s # The default set of protocol handlers for irc: -goanna.handlerService.schemes.irc.0.name=Mibbit -goanna.handlerService.schemes.irc.0.uriTemplate=https://www.mibbit.com/?url=%s +gecko.handlerService.schemes.irc.0.name=Mibbit +gecko.handlerService.schemes.irc.0.uriTemplate=https://www.mibbit.com/?url=%s # The default set of protocol handlers for ircs: -goanna.handlerService.schemes.ircs.0.name=Mibbit -goanna.handlerService.schemes.ircs.0.uriTemplate=https://www.mibbit.com/?url=%s +gecko.handlerService.schemes.ircs.0.name=Mibbit +gecko.handlerService.schemes.ircs.0.uriTemplate=https://www.mibbit.com/?url=%s |