Bug 1226238 - (Part 2) Remove reader view footer. r=Gijs
MozReview-Commit-ID: B474joTtVwa
--- a/mobile/android/themes/core/aboutReaderControls.css
+++ b/mobile/android/themes/core/aboutReaderControls.css
@@ -236,18 +236,17 @@
color: #333333;
background-color: #ffffff;
}
/*======= Toolbar icons =======*/
/* desktop-only controls */
.close-button,
-.list-button,
-.footer {
+.list-button {
display: none;
}
.toggle-button.on {
background-image: url('chrome://browser/skin/images/reader-toggle-on-icon-mdpi.png');
}
.toggle-button {
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -71,19 +71,16 @@ var AboutReader = function(mm, win, arti
this._setupStyleDropdown();
this._setupButton("close-button", this._onReaderClose.bind(this), "aboutReader.toolbar.close");
try {
if (Services.prefs.getBoolPref("browser.readinglist.enabled")) {
this._setupButton("toggle-button", this._onReaderToggle.bind(this, "button"), "aboutReader.toolbar.addToReadingList");
this._setupButton("list-button", this._onList.bind(this), "aboutReader.toolbar.openReadingList");
- this._setupButton("remove-button", this._onReaderToggle.bind(this, "footer"),
- "aboutReader.footer.deleteThisArticle", "aboutReader.footer.deleteThisArticle");
- this._doc.getElementById("reader-footer").setAttribute('readinglist-enabled', "true");
}
} catch (e) {
// Pref doesn't exist.
}
const gIsFirefoxDesktop = Services.appinfo.ID == "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
if (gIsFirefoxDesktop) {
// we're ready for any external setup, send a signal for that.
@@ -309,17 +306,16 @@ AboutReader.prototype = {
if (this._isReadingListItem == 1) {
button.classList.add("on");
button.setAttribute("title", gStrings.GetStringFromName("aboutReader.toolbar.removeFromReadingList"));
} else {
button.classList.remove("on");
button.setAttribute("title", gStrings.GetStringFromName("aboutReader.toolbar.addToReadingList"));
}
- this._updateFooter();
},
_requestReadingListStatus: function() {
let handleListStatusData = (message) => {
this._mm.removeMessageListener("Reader:ListStatusData", handleListStatusData);
let args = message.data;
if (args.url == this._article.url) {
@@ -477,26 +473,16 @@ AboutReader.prototype = {
}
currentSize--;
updateControls();
this._setFontSize(currentSize);
}, true);
},
- _updateFooter: function() {
- let footer = this._doc.getElementById("reader-footer");
- if (!this._article || this._isReadingListItem == 0 ||
- footer.getAttribute("readinglist-enabled") != "true") {
- footer.style.display = "none";
- return;
- }
- footer.style.display = null;
- },
-
_handleDeviceLight: function(newLux) {
// Desired size of the this._luxValues array.
let luxValuesSize = 10;
// Add new lux value at the front of the array.
this._luxValues.unshift(newLux);
// Add new lux value to this._totalLux for averaging later.
this._totalLux += newLux;
@@ -625,17 +611,16 @@ AboutReader.prototype = {
} else {
this._toolbarElement.removeAttribute("visible");
}
this._setSystemUIVisibility(visible);
if (!visible) {
this._mm.sendAsyncMessage("Reader:ToolbarHidden");
}
- this._updateFooter();
},
_toggleToolbarVisibility: function() {
this._setToolbarVisibility(!this._getToolbarVisibility());
},
_setSystemUIVisibility: function(visible) {
this._mm.sendAsyncMessage("Reader:SystemUIVisibility", { visible: visible });
--- a/toolkit/components/reader/content/aboutReader.html
+++ b/toolkit/components/reader/content/aboutReader.html
@@ -30,23 +30,16 @@
</div>
<div>
<style scoped>
@import url("chrome://global/skin/aboutReaderControls.css");
</style>
<div id="reader-message"></div>
</div>
-
- <div id="reader-footer" class="footer">
- <style scoped>
- @import url("chrome://global/skin/aboutReaderControls.css");
- </style>
- <button id="remove-button" class="button remove-button"/>
- </div>
</div>
<ul id="reader-toolbar" class="toolbar">
<style scoped>
@import url("chrome://global/skin/aboutReaderControls.css");
</style>
<li><button id="close-button" class="button close-button"/></li>
<ul id="style-dropdown" class="dropdown">
--- a/toolkit/locales/en-US/chrome/global/aboutReader.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutReader.properties
@@ -23,16 +23,14 @@ aboutReader.fontTypeSample=Aa
aboutReader.toolbar.close=Close Reader View
aboutReader.toolbar.typeControls=Type controls
aboutReader.toolbar.addToReadingList=Add to Reading List
aboutReader.toolbar.removeFromReadingList=Remove from Reading List
aboutReader.toolbar.openReadingList=Open Reading List
aboutReader.toolbar.closeReadingList=Close Reading List
-aboutReader.footer.deleteThisArticle=Delete this article
-
# These are used for the Reader View toolbar button and the menuitem within the
# View menu.
readerView.enter=Enter Reader View
readerView.enter.accesskey=R
readerView.close=Close Reader View
readerView.close.accesskey=R
--- a/toolkit/themes/shared/aboutReaderControls.css
+++ b/toolkit/themes/shared/aboutReaderControls.css
@@ -295,41 +295,16 @@
.plus-button {
background-color: transparent;
border: 0;
background-size: 18px 18px;
background-repeat: no-repeat;
background-position: center;
}
-.footer {
- height: 64px;
- background-color: #ebebeb;
- position: absolute;
- left: 0;
- width: 100%;
- text-align: center;
- padding: 12px 0;
- box-sizing: border-box;
- box-shadow: 0 3px 3px -3px rgba(0, 0, 0, 0.35) inset;
-}
-
-.remove-button {
- background-image: url("chrome://global/skin/reader/RM-Delete-24x24.svg");
- margin: 0 auto;
- border: 1px solid #c1c1c1;
- background-position: 10px 7px;
- padding-left: 42px;
- padding-right: 10px;
- border-radius: 2px;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- font-size: 18px;
-}
-
-
/*======= Toolbar icons =======*/
.close-button {
background-image: url("chrome://global/skin/reader/RM-Close-24x24.svg#close");
height: 68px;
background-position: center 8px;
}
@@ -373,12 +348,9 @@
.plus-button {
background-image: url("chrome://global/skin/reader/RM-Plus-24x24.svg");
}
@media print {
.toolbar {
display: none !important;
}
- .footer {
- display: none !important;
- }
}