diff --git a/browser/base/content/browser-social.js b/browser/base/content/browser-social.js index 0ce93ebad88..b198585a72f 100644 --- a/browser/base/content/browser-social.js +++ b/browser/base/content/browser-social.js @@ -551,14 +551,15 @@ SocialShare = { }, update: function() { - let shareButton = this.shareButton; - if (!shareButton) + let widget = CustomizableUI.getWidget("social-share-button"); + if (!widget) return; - // if we got here, the button is in the window somewhere, update it's hidden - // state based on available providers. - shareButton.hidden = !SocialUI.enabled || - [p for (p of Social.providers) if (p.shareURL)].length == 0; - let disabled = shareButton.hidden || !this.canSharePage(gBrowser.currentURI); + let shareButton = widget.forWindow(window).node; + // hidden state is based on available share providers and location of + // button. It's always visible and disabled in the customization palette. + shareButton.hidden = !SocialUI.enabled || (widget.areaType && + [p for (p of Social.providers) if (p.shareURL)].length == 0); + let disabled = !widget.areaType || shareButton.hidden || !this.canSharePage(gBrowser.currentURI); // 1. update the relevent command's disabled state so the keyboard // shortcut only works when available. diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 6433dfea0bb..29b78f3adf3 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -939,6 +939,7 @@ tooltiptext="&sharePageCmd.label;" cui-areatype="toolbar" removable="true" + hidden="true" command="Social:SharePage"/> diff --git a/browser/base/content/newtab/newTab.js b/browser/base/content/newtab/newTab.js index ec53b48a5c7..bd059d30350 100644 --- a/browser/base/content/newtab/newTab.js +++ b/browser/base/content/newtab/newTab.js @@ -13,7 +13,6 @@ Cu.import("resource://gre/modules/PageThumbs.jsm"); Cu.import("resource://gre/modules/BackgroundPageThumbs.jsm"); Cu.import("resource://gre/modules/DirectoryLinksProvider.jsm"); Cu.import("resource://gre/modules/NewTabUtils.jsm"); -Cu.import("resource://gre/modules/Promise.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Rect", "resource://gre/modules/Geometry.jsm"); diff --git a/browser/base/content/newtab/transformations.js b/browser/base/content/newtab/transformations.js index 6ff123bd401..0857448e894 100644 --- a/browser/base/content/newtab/transformations.js +++ b/browser/base/content/newtab/transformations.js @@ -179,19 +179,18 @@ let gTransformation = { if (!aSite || aSite == gDrag.draggedSite) return; - let deferred = Promise.defer(); - batch.push(deferred.promise); - let cb = deferred.resolve; - - if (!cells[aIndex]) - // The site disappeared from the grid, hide it. - this.hideSite(aSite, cb); - else if (this._getNodeOpacity(aSite.node) != 1) - // The site disappeared before but is now back, show it. - this.showSite(aSite, cb); - else - // The site's position has changed, move it around. - this._moveSite(aSite, aIndex, {unfreeze: unfreeze, callback: cb}); + batch.push(new Promise(resolve => { + if (!cells[aIndex]) { + // The site disappeared from the grid, hide it. + this.hideSite(aSite, resolve); + } else if (this._getNodeOpacity(aSite.node) != 1) { + // The site disappeared before but is now back, show it. + this.showSite(aSite, resolve); + } else { + // The site's position has changed, move it around. + this._moveSite(aSite, aIndex, {unfreeze: unfreeze, callback: resolve}); + } + })); }, this); if (callback) { diff --git a/browser/base/content/newtab/updater.js b/browser/base/content/newtab/updater.js index 66924323f36..78649b2db26 100644 --- a/browser/base/content/newtab/updater.js +++ b/browser/base/content/newtab/updater.js @@ -134,17 +134,16 @@ let gUpdater = { if (!aSite || aSites.indexOf(aSite) != -1) return; - let deferred = Promise.defer(); - batch.push(deferred.promise); + batch.push(new Promise(resolve => { + // Fade out the to-be-removed site. + gTransformation.hideSite(aSite, function () { + let node = aSite.node; - // Fade out the to-be-removed site. - gTransformation.hideSite(aSite, function () { - let node = aSite.node; - - // Remove the site from the DOM. - node.parentNode.removeChild(node); - deferred.resolve(); - }); + // Remove the site from the DOM. + node.parentNode.removeChild(node); + resolve(); + }); + })); }); Promise.all(batch).then(aCallback); @@ -164,19 +163,18 @@ let gUpdater = { if (aSite || !aLinks[aIndex]) return; - let deferred = Promise.defer(); - batch.push(deferred.promise); + batch.push(new Promise(resolve => { + // Create the new site and fade it in. + let site = gGrid.createSite(aLinks[aIndex], cells[aIndex]); - // Create the new site and fade it in. - let site = gGrid.createSite(aLinks[aIndex], cells[aIndex]); + // Set the site's initial opacity to zero. + site.node.style.opacity = 0; - // Set the site's initial opacity to zero. - site.node.style.opacity = 0; - - // Flush all style changes for the dynamically inserted site to make - // the fade-in transition work. - window.getComputedStyle(site.node).opacity; - gTransformation.showSite(site, function () deferred.resolve()); + // Flush all style changes for the dynamically inserted site to make + // the fade-in transition work. + window.getComputedStyle(site.node).opacity; + gTransformation.showSite(site, resolve); + })); }); Promise.all(batch).then(aCallback); diff --git a/browser/base/content/test/newtab/browser_newtab_reportLinkAction.js b/browser/base/content/test/newtab/browser_newtab_reportLinkAction.js index 1f2da3ac746..8811d14e605 100644 --- a/browser/base/content/test/newtab/browser_newtab_reportLinkAction.js +++ b/browser/base/content/test/newtab/browser_newtab_reportLinkAction.js @@ -47,6 +47,7 @@ function runTests() { expected.action = "unpin"; expected.pinned = true; yield EventUtils.synthesizeMouseAtCenter(pinButton, {}, getContentWindow()); + yield whenPagesUpdated(); // Block the site in the 0th tile spot let blockedSite = getCell(0).node.querySelector(".newtab-site"); diff --git a/browser/branding/aurora/pref/firefox-branding.js b/browser/branding/aurora/pref/firefox-branding.js index d847ce7be24..d3d9ad7cac3 100644 --- a/browser/branding/aurora/pref/firefox-branding.js +++ b/browser/branding/aurora/pref/firefox-branding.js @@ -11,7 +11,8 @@ pref("startup.homepage_welcome_url",""); pref("app.update.interval", 28800); // 8 hours // The time interval between the downloading of mar file chunks in the // background (in seconds) -pref("app.update.download.backgroundInterval", 60); +// 0 means "download everything at once" +pref("app.update.download.backgroundInterval", 0); // Give the user x seconds to react before showing the big UI. default=168 hours pref("app.update.promptWaitTime", 604800); // URL user can browse to manually if for some reason all update installation diff --git a/browser/branding/nightly/pref/firefox-branding.js b/browser/branding/nightly/pref/firefox-branding.js index 4dfa3de86f1..af23d59c7e5 100644 --- a/browser/branding/nightly/pref/firefox-branding.js +++ b/browser/branding/nightly/pref/firefox-branding.js @@ -8,7 +8,8 @@ pref("startup.homepage_welcome_url", "https://www.mozilla.org/projects/firefox/% pref("app.update.interval", 7200); // 2 hours // The time interval between the downloading of mar file chunks in the // background (in seconds) -pref("app.update.download.backgroundInterval", 60); +// 0 means "download everything at once" +pref("app.update.download.backgroundInterval", 0); // Give the user x seconds to react before showing the big UI. default=12 hours pref("app.update.promptWaitTime", 43200); // URL user can browse to manually if for some reason all update installation diff --git a/browser/components/preferences/in-content/privacy.xul b/browser/components/preferences/in-content/privacy.xul index 5059562e8b1..f30c1a2500a 100644 --- a/browser/components/preferences/in-content/privacy.xul +++ b/browser/components/preferences/in-content/privacy.xul @@ -78,7 +78,7 @@