Bug 1352501 - Remove Reader Mode promotion panel. r?MattN
Note that the UITour library can still show a panel in the event that we want to
promote the feature that way.
MozReview-Commit-ID: FzKSzO987h7
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1518,17 +1518,16 @@ pref("dom.ipc.processHangMonitor", true)
#ifdef DEBUG
// Don't report hangs in DEBUG builds. They're too slow and often a
// debugger is attached.
pref("dom.ipc.reportProcessHangs", false);
#else
pref("dom.ipc.reportProcessHangs", true);
#endif
-pref("browser.reader.detectedFirstArticle", false);
// Don't limit how many nodes we care about on desktop:
pref("reader.parse-node-limit", 0);
// On desktop, we want the URLs to be included here for ease of debugging,
// and because (normally) these errors are not persisted anywhere.
pref("reader.errors.includeURLs", true);
pref("view_source.tab", true);
--- a/browser/base/content/test/static/browser_all_files_referenced.js
+++ b/browser/base/content/test/static/browser_all_files_referenced.js
@@ -31,20 +31,16 @@ if (AppConstants.platform == "macosx")
var whitelist = new Set([
// browser/extensions/pdfjs/content/PdfStreamConverter.jsm
{file: "chrome://pdf.js/locale/chrome.properties"},
{file: "chrome://pdf.js/locale/viewer.properties"},
// security/manager/pki/resources/content/device_manager.js
{file: "chrome://pippki/content/load_device.xul"},
- // browser/modules/ReaderParent.jsm
- {file: "chrome://browser/skin/reader-tour.png"},
- {file: "chrome://browser/skin/reader-tour@2x.png"},
-
// Used by setting this url as a pref in about:config
{file: "chrome://browser/content/newtab/alternativeDefaultSites.json"},
// Add-on compat
{file: "chrome://browser/skin/devtools/common.css"},
{file: "chrome://global/content/XPCNativeWrapper.js"},
{file: "chrome://global/locale/brand.dtd"},
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -758,21 +758,16 @@ flashHang.helpButton.accesskey = L
# be replaced with a hyperlink containing the text defined in customizeTips.tip0.learnMore.
customizeTips.tip0 = %1$S: You can customize %2$S to work the way you do. Simply drag any of the above to the menu or toolbar. %3$S about customizing %2$S.
customizeTips.tip0.hint = Hint
customizeTips.tip0.learnMore = Learn more
# LOCALIZATION NOTE (customizeMode.tabTitle): %S is brandShortName
customizeMode.tabTitle = Customize %S
-# LOCALIZATION NOTE : FILE Reader View is a feature name and therefore typically used as a proper noun.
-
-readingList.promo.firstUse.readerView.title = Reader View
-readingList.promo.firstUse.readerView.body = Remove clutter so you can focus exactly on what you want to read.
-
# LOCALIZATION NOTE (appMenuRemoteTabs.mobilePromo.text2):
# %1$S will be replaced with a link, the text of which is
# appMenuRemoteTabs.mobilePromo.android and the link will be to
# https://www.mozilla.org/firefox/android/.
# %2$S will be replaced with a link, the text of which is
# appMenuRemoteTabs.mobilePromo.ios
# and the link will be to https://www.mozilla.org/firefox/ios/.
appMenuRemoteTabs.mobilePromo.text2 = Download %1$S or %2$S and connect them to your Firefox Account.
--- a/browser/modules/ReaderParent.jsm
+++ b/browser/modules/ReaderParent.jsm
@@ -15,18 +15,16 @@ Cu.import("resource://gre/modules/Task.j
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils", "resource://gre/modules/PlacesUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode", "resource://gre/modules/ReaderMode.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "UITour", "resource:///modules/UITour.jsm");
const gStringBundle = Services.strings.createBundle("chrome://global/locale/aboutReader.properties");
var ReaderParent = {
- _readerModeInfoPanelOpen: false,
-
MESSAGES: [
"Reader:ArticleGet",
"Reader:FaviconRequest",
"Reader:UpdateReaderButton",
],
init() {
let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
@@ -103,30 +101,16 @@ var ReaderParent = {
button.hidden = !browser.isArticle;
let enterText = gStringBundle.GetStringFromName("readerView.enter");
button.setAttribute("tooltiptext", enterText);
command.setAttribute("label", enterText);
command.setAttribute("hidden", !browser.isArticle);
command.setAttribute("accesskey", gStringBundle.GetStringFromName("readerView.enter.accesskey"));
key.setAttribute("disabled", !browser.isArticle);
}
-
- let currentUriHost = browser.currentURI && browser.currentURI.asciiHost;
- if (browser.isArticle &&
- !Services.prefs.getBoolPref("browser.reader.detectedFirstArticle") &&
- currentUriHost && !currentUriHost.endsWith("mozilla.org")) {
- this.showReaderModeInfoPanel(browser);
- Services.prefs.setBoolPref("browser.reader.detectedFirstArticle", true);
- this._readerModeInfoPanelOpen = true;
- } else if (this._readerModeInfoPanelOpen) {
- if (UITour.isInfoOnTarget(win, "readerMode-urlBar")) {
- UITour.hideInfo(win);
- }
- this._readerModeInfoPanelOpen = false;
- }
},
forceShowReaderIcon(browser) {
browser.isArticle = true;
this.updateReaderButton(browser);
},
buttonClick(event) {
@@ -138,39 +122,16 @@ var ReaderParent = {
toggleReaderMode(event) {
let win = event.target.ownerGlobal;
let browser = win.gBrowser.selectedBrowser;
browser.messageManager.sendAsyncMessage("Reader:ToggleReaderMode");
},
/**
- * Shows an info panel from the UITour for Reader Mode.
- *
- * @param browser The <browser> that the tour should be started for.
- */
- showReaderModeInfoPanel(browser) {
- let win = browser.ownerGlobal;
- let targetPromise = UITour.getTarget(win, "readerMode-urlBar");
- targetPromise.then(target => {
- let browserBundle = Services.strings.createBundle("chrome://browser/locale/browser.properties");
- let icon = "chrome://browser/skin/";
- if (win.devicePixelRatio > 1) {
- icon += "reader-tour@2x.png";
- } else {
- icon += "reader-tour.png";
- }
- UITour.showInfo(win, target,
- browserBundle.GetStringFromName("readingList.promo.firstUse.readerView.title"),
- browserBundle.GetStringFromName("readingList.promo.firstUse.readerView.body"),
- icon);
- });
- },
-
- /**
* Gets an article for a given URL. This method will download and parse a document.
*
* @param url The article URL.
* @param browser The browser where the article is currently loaded.
* @return {Promise}
* @resolves JS object representing the article, or null if no article is found.
*/
_getArticle: Task.async(function* (url, browser) {
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -120,18 +120,16 @@
skin/classic/browser/warning-white.svg (../shared/warning-white.svg)
skin/classic/browser/cert-error.svg (../shared/incontent-icons/cert-error.svg)
skin/classic/browser/wifi.svg (../shared/incontent-icons/wifi.svg)
skin/classic/browser/session-restore.svg (../shared/incontent-icons/session-restore.svg)
skin/classic/browser/tab-crashed.svg (../shared/incontent-icons/tab-crashed.svg)
skin/classic/browser/favicon-search-16.svg (../shared/favicon-search-16.svg)
skin/classic/browser/icon-search-64.svg (../shared/incontent-icons/icon-search-64.svg)
skin/classic/browser/welcome-back.svg (../shared/incontent-icons/welcome-back.svg)
- skin/classic/browser/reader-tour.png (../shared/reader/reader-tour.png)
- skin/classic/browser/reader-tour@2x.png (../shared/reader/reader-tour@2x.png)
skin/classic/browser/readerMode.svg (../shared/reader/readerMode.svg)
skin/classic/browser/panic-panel/header.png (../shared/panic-panel/header.png)
skin/classic/browser/panic-panel/header@2x.png (../shared/panic-panel/header@2x.png)
skin/classic/browser/panic-panel/header-small.png (../shared/panic-panel/header-small.png)
skin/classic/browser/panic-panel/header-small@2x.png (../shared/panic-panel/header-small@2x.png)
skin/classic/browser/panic-panel/icons.png (../shared/panic-panel/icons.png)
skin/classic/browser/panic-panel/icons@2x.png (../shared/panic-panel/icons@2x.png)
skin/classic/browser/privatebrowsing/aboutPrivateBrowsing.css (../shared/privatebrowsing/aboutPrivateBrowsing.css)
deleted file mode 100644
index be346b3847928f94d7a0bbca019f40d86edd0899..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index 1a60d93ca9311f8bf9e0ce3f6f175370a69f648e..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -426,19 +426,16 @@ class DesktopInstance(GeckoInstance):
# Assume the about:newtab page"s intro panels have been shown to not depend on
# which test runs first and happens to open about:newtab
"browser.newtabpage.introShown": True,
# Background thumbnails in particular cause grief, and disabling thumbnails
# in general can"t hurt - we re-enable them when tests need them
"browser.pagethumbnails.capturing_disabled": True,
- # Avoid performing Reader Mode intros during tests
- "browser.reader.detectedFirstArticle": True,
-
# Disable safebrowsing components
"browser.safebrowsing.blockedURIs.enabled": False,
"browser.safebrowsing.downloads.enabled": False,
"browser.safebrowsing.forbiddenURIs.enabled": False,
"browser.safebrowsing.malware.enabled": False,
"browser.safebrowsing.phishing.enabled": False,
# Disable updates to search engines
--- a/testing/marionette/server.js
+++ b/testing/marionette/server.js
@@ -89,19 +89,16 @@ const RECOMMENDED_PREFS = new Map([
// This should also be set in the profile prior to starting Firefox,
// as it is picked up at runtime.
["browser.offline", false],
// Background thumbnails in particular cause grief, and disabling
// thumbnails in general cannot hurt
["browser.pagethumbnails.capturing_disabled", true],
- // Avoid performing Reader Mode intros during tests
- ["browser.reader.detectedFirstArticle", true],
-
// Disable safebrowsing components.
//
// These should also be set in the profile prior to starting Firefox,
// as it is picked up at runtime.
["browser.safebrowsing.blockedURIs.enabled", false],
["browser.safebrowsing.downloads.enabled", false],
["browser.safebrowsing.enabled", false],
["browser.safebrowsing.forbiddenURIs.enabled", false],
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -318,19 +318,16 @@ user_pref("browser.tabs.remote.autostart
// Don't show a delay when hiding the audio indicator during tests
user_pref("browser.tabs.delayHidingAudioPlayingIconMS", 0);
// Don't forceably kill content processes after a timeout
user_pref("dom.ipc.tabs.shutdownTimeoutSecs", 0);
// Don't block add-ons for e10s
user_pref("extensions.e10sBlocksEnabling", false);
-// Avoid performing Reader Mode intros during tests.
-user_pref("browser.reader.detectedFirstArticle", true);
-
// Make tests run consistently on DevEdition (which has a lightweight theme
// selected by default).
user_pref("lightweightThemes.selectedThemeID", "");
// Enable speech synth test service, and disable built in platform services.
user_pref("media.webspeech.synth.test", true);
// Turn off search suggestions in the location bar so as not to trigger network
--- a/toolkit/components/reader/test/browser_readerMode.js
+++ b/toolkit/components/reader/test/browser_readerMode.js
@@ -24,44 +24,33 @@ add_task(function* test_reader_button()
gBrowser.removeCurrentTab();
}
});
// Set required test prefs.
TEST_PREFS.forEach(([name, value]) => {
Services.prefs.setBoolPref(name, value);
});
- Services.prefs.setBoolPref("browser.reader.detectedFirstArticle", false);
let tab = gBrowser.selectedTab = gBrowser.addTab();
is_element_hidden(readerButton, "Reader mode button is not present on a new tab");
ok(!UITour.isInfoOnTarget(window, "readerMode-urlBar"),
"Info panel shouldn't appear without the reader mode button");
- ok(!Services.prefs.getBoolPref("browser.reader.detectedFirstArticle"),
- "Shouldn't have detected the first article");
- // We're going to show the reader mode intro popup, make sure we wait for it:
- let tourPopupShownPromise =
- BrowserTestUtils.waitForEvent(document.getElementById("UITourTooltip"), "popupshown");
// Point tab to a test page that is reader-able.
let url = TEST_PATH + "readerModeArticle.html";
yield promiseTabLoadEvent(tab, url);
yield promiseWaitForCondition(() => !readerButton.hidden);
- yield tourPopupShownPromise;
+
is_element_visible(readerButton, "Reader mode button is present on a reader-able page");
- ok(UITour.isInfoOnTarget(window, "readerMode-urlBar"),
- "Info panel should be anchored at the reader mode button");
- ok(Services.prefs.getBoolPref("browser.reader.detectedFirstArticle"),
- "Should have detected the first article");
// Switch page into reader mode.
let promiseTabLoad = promiseTabLoadEvent(tab);
readerButton.click();
yield promiseTabLoad;
- ok(!UITour.isInfoOnTarget(window, "readerMode-urlBar"), "Info panel should have closed");
let readerUrl = gBrowser.selectedBrowser.currentURI.spec;
ok(readerUrl.startsWith("about:reader"), "about:reader loaded after clicking reader mode button");
is_element_visible(readerButton, "Reader mode button is present on about:reader");
is(gURLBar.value, readerUrl, "gURLBar value is about:reader URL");
is(gURLBar.textValue, url.substring("http://".length), "gURLBar is displaying original article URL");
--- a/toolkit/components/reader/test/browser_readerMode_hidden_nodes.js
+++ b/toolkit/components/reader/test/browser_readerMode_hidden_nodes.js
@@ -3,17 +3,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* Test that the reader mode button appears and works properly on
* reader-able content.
*/
const TEST_PREFS = [
["reader.parse-on-load.enabled", true],
- ["browser.reader.detectedFirstArticle", false],
];
const TEST_PATH = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "http://example.com");
var readerButton = document.getElementById("reader-mode-button");
add_task(function* test_reader_button() {
registerCleanupFunction(function() {