2017-10-17 23:11:44 +02:00
|
|
|
--- a/browser/base/content/browser-sets.inc
|
|
|
|
+++ b/browser/base/content/browser-sets.inc
|
|
|
|
@@ -43,7 +43,6 @@
|
|
|
|
<command id="View:PageSource" oncommand="BrowserViewSource(window.gBrowser.selectedBrowser);" observes="canViewSource"/>
|
|
|
|
<command id="View:PageInfo" oncommand="BrowserPageInfo();"/>
|
|
|
|
<command id="View:FullScreen" oncommand="BrowserFullScreen();"/>
|
|
|
|
- <command id="View:ReaderView" oncommand="ReaderParent.toggleReaderMode(event);"/>
|
|
|
|
<command id="cmd_find"
|
|
|
|
oncommand="gFindBar.onFindCommand();"
|
|
|
|
observes="isImage"/>
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -283,7 +282,6 @@
|
2017-10-17 23:11:44 +02:00
|
|
|
<key id="key_fullScreen_old" key="&fullScreenCmd.macCommandKey;" command="View:FullScreen" modifiers="accel,shift"/>
|
|
|
|
<key keycode="VK_F11" command="View:FullScreen"/>
|
|
|
|
#endif
|
2018-01-07 17:12:58 +01:00
|
|
|
- <key id="toggleReaderMode" key="&toggleReaderMode.key;" command="View:ReaderView" modifiers="accel,alt" disabled="true"/>
|
2017-10-17 23:11:44 +02:00
|
|
|
<key key="&reloadCmd.commandkey;" command="Browser:Reload" modifiers="accel" id="key_reload"/>
|
|
|
|
<key key="&reloadCmd.commandkey;" command="Browser:ReloadSkipCache" modifiers="accel,shift"/>
|
|
|
|
<key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/>
|
2017-09-20 19:13:30 +02:00
|
|
|
--- a/browser/base/content/browser.js
|
|
|
|
+++ b/browser/base/content/browser.js
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -37,8 +37,6 @@ Cu.import("resource://gre/modules/NotificationDB.jsm");
|
|
|
|
["PrivateBrowsingUtils", "resource://gre/modules/PrivateBrowsingUtils.jsm"],
|
|
|
|
["ProcessHangMonitor", "resource:///modules/ProcessHangMonitor.jsm"],
|
|
|
|
["PromiseUtils", "resource://gre/modules/PromiseUtils.jsm"],
|
|
|
|
- ["ReaderMode", "resource://gre/modules/ReaderMode.jsm"],
|
|
|
|
- ["ReaderParent", "resource:///modules/ReaderParent.jsm"],
|
|
|
|
["RecentWindow", "resource:///modules/RecentWindow.jsm"],
|
|
|
|
["SessionStore", "resource:///modules/sessionstore/SessionStore.jsm"],
|
|
|
|
["ShortcutUtils", "resource://gre/modules/ShortcutUtils.jsm"],
|
2018-04-04 11:10:55 +02:00
|
|
|
@@ -4579,7 +4577,6 @@ var XULBrowserWindow = {
|
2017-09-20 19:13:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
UpdateBackForwardCommands(gBrowser.webNavigation);
|
|
|
|
- ReaderParent.updateReaderButton(gBrowser.selectedBrowser);
|
|
|
|
|
2018-01-07 17:12:58 +01:00
|
|
|
gGestureSupport.restoreRotationState();
|
2017-11-20 20:14:25 +01:00
|
|
|
|
2018-04-04 11:10:55 +02:00
|
|
|
@@ -4880,9 +4877,6 @@ var TabsProgressListener = {
|
2017-11-20 20:14:25 +01:00
|
|
|
// Filter out location changes caused by anchor navigation
|
|
|
|
// or history.push/pop/replaceState.
|
|
|
|
if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) {
|
|
|
|
- // Reader mode actually cares about these:
|
|
|
|
- let mm = gBrowser.selectedBrowser.messageManager;
|
|
|
|
- mm.sendAsyncMessage("Reader:PushState", {isArticle: gBrowser.selectedBrowser.isArticle});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-09-20 19:13:30 +02:00
|
|
|
--- a/browser/base/content/browser.xul
|
|
|
|
+++ b/browser/base/content/browser.xul
|
2018-04-04 11:10:55 +02:00
|
|
|
@@ -759,10 +759,6 @@
|
2017-09-20 19:13:30 +02:00
|
|
|
hidden="true"
|
|
|
|
tooltiptext="&pageReportIcon.tooltip;"
|
|
|
|
onmousedown="gPopupBlockerObserver.onReportButtonMousedown(event);"/>
|
|
|
|
- <image id="reader-mode-button"
|
2018-01-07 17:12:58 +01:00
|
|
|
- class="urlbar-icon"
|
2017-09-20 19:13:30 +02:00
|
|
|
- hidden="true"
|
|
|
|
- onclick="ReaderParent.buttonClick(event);"/>
|
|
|
|
<toolbarbutton id="urlbar-zoom-button"
|
|
|
|
onclick="FullZoom.reset();"
|
2018-01-07 17:12:58 +01:00
|
|
|
tooltiptext="&urlbar.zoomReset.tooltip;"
|
|
|
|
--- a/browser/base/content/urlbarBindings.xml
|
|
|
|
+++ b/browser/base/content/urlbarBindings.xml
|
|
|
|
@@ -184,11 +184,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- } else {
|
|
|
|
- let originalUrl = ReaderMode.getOriginalUrl(aValue);
|
|
|
|
- if (originalUrl) {
|
|
|
|
- returnValue = originalUrl;
|
|
|
|
- }
|
|
|
|
}
|
|
|
|
|
|
|
|
// Set the actiontype only if the user is not overriding actions.
|
|
|
|
@@ -773,12 +768,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
return selectedVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
- // Avoid copying 'about:reader?url=', and always provide the original URI:
|
|
|
|
- let readerOriginalURL = ReaderMode.getOriginalUrl(uri.spec);
|
|
|
|
- if (readerOriginalURL) {
|
|
|
|
- uri = uriFixup.createFixupURI(readerOriginalURL, Ci.nsIURIFixup.FIXUP_FLAG_NONE);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// Only copy exposable URIs
|
|
|
|
try {
|
|
|
|
uri = uriFixup.createExposableURI(uri);
|
2017-09-20 19:13:30 +02:00
|
|
|
--- a/browser/components/nsBrowserGlue.js
|
|
|
|
+++ b/browser/components/nsBrowserGlue.js
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -53,7 +53,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-s
|
|
|
|
["PluralForm", "resource://gre/modules/PluralForm.jsm"],
|
|
|
|
["PrivateBrowsingUtils", "resource://gre/modules/PrivateBrowsingUtils.jsm"],
|
|
|
|
["ProcessHangMonitor", "resource:///modules/ProcessHangMonitor.jsm"],
|
|
|
|
- ["ReaderParent", "resource:///modules/ReaderParent.jsm"],
|
|
|
|
["RecentWindow", "resource:///modules/RecentWindow.jsm"],
|
|
|
|
["RemotePrompt", "resource:///modules/RemotePrompt.jsm"],
|
|
|
|
["SelfSupportBackend", "resource:///modules/SelfSupportBackend.jsm"],
|
|
|
|
@@ -685,7 +684,6 @@ BrowserGlue.prototype = {
|
|
|
|
ContentPrefServiceParent.init();
|
|
|
|
|
|
|
|
LoginManagerParent.init();
|
|
|
|
- ReaderParent.init();
|
|
|
|
URLBarZoom.init();
|
|
|
|
|
|
|
|
SelfSupportBackend.init();
|
|
|
|
--- a/browser/components/uitour/UITour-lib.js
|
|
|
|
+++ b/browser/components/uitour/UITour-lib.js
|
|
|
|
@@ -297,14 +297,6 @@ if (typeof Mozilla == 'undefined') {
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
- Mozilla.UITour.forceShowReaderIcon = function() {
|
|
|
|
- _sendEvent('forceShowReaderIcon');
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- Mozilla.UITour.toggleReaderMode = function() {
|
|
|
|
- _sendEvent('toggleReaderMode');
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
Mozilla.UITour.openPreferences = function(pane) {
|
|
|
|
_sendEvent('openPreferences', {
|
|
|
|
pane: pane
|
2017-09-20 19:13:30 +02:00
|
|
|
--- a/browser/components/uitour/UITour.jsm
|
|
|
|
+++ b/browser/components/uitour/UITour.jsm
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -32,19 +32,13 @@ XPCOMUtils.defineLazyModuleGetter(this, "BrowserUITelemetry",
|
|
|
|
"resource:///modules/BrowserUITelemetry.jsm");
|
|
|
|
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
|
2017-09-20 19:13:30 +02:00
|
|
|
"resource://gre/modules/PrivateBrowsingUtils.jsm");
|
2018-01-07 17:12:58 +01:00
|
|
|
-XPCOMUtils.defineLazyModuleGetter(this, "ReaderMode",
|
|
|
|
- "resource://gre/modules/ReaderMode.jsm");
|
2017-09-20 19:13:30 +02:00
|
|
|
-XPCOMUtils.defineLazyModuleGetter(this, "ReaderParent",
|
|
|
|
- "resource:///modules/ReaderParent.jsm");
|
|
|
|
|
2018-01-07 17:12:58 +01:00
|
|
|
// See LOG_LEVELS in Console.jsm. Common examples: "All", "Info", "Warn", & "Error".
|
|
|
|
const PREF_LOG_LEVEL = "browser.uitour.loglevel";
|
2017-10-17 23:11:44 +02:00
|
|
|
const PREF_SEENPAGEIDS = "browser.uitour.seenPageIDs";
|
2018-01-07 17:12:58 +01:00
|
|
|
-const PREF_READERVIEW_TRIGGER = "browser.uitour.readerViewTrigger";
|
|
|
|
const PREF_SURVEY_DURATION = "browser.uitour.surveyDuration";
|
2017-10-17 23:11:44 +02:00
|
|
|
|
|
|
|
const BACKGROUND_PAGE_ACTIONS_ALLOWED = new Set([
|
|
|
|
- "forceShowReaderIcon",
|
|
|
|
"getConfiguration",
|
|
|
|
"getTreatmentTag",
|
|
|
|
"hideHighlight",
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -161,7 +155,6 @@ this.UITour = {
|
2017-10-17 23:11:44 +02:00
|
|
|
}],
|
2018-01-07 17:12:58 +01:00
|
|
|
["privateWindow", {query: "#privatebrowsing-button"}],
|
|
|
|
["quit", {query: "#PanelUI-quit"}],
|
2017-10-17 23:11:44 +02:00
|
|
|
- ["readerMode-urlBar", {query: "#reader-mode-button"}],
|
|
|
|
["search", {
|
|
|
|
infoPanelOffsetX: 18,
|
|
|
|
infoPanelPosition: "after_start",
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -297,21 +290,7 @@ this.UITour = {
|
|
|
|
JSON.stringify([...this.seenPageIDs]));
|
|
|
|
},
|
|
|
|
|
|
|
|
- get _readerViewTriggerRegEx() {
|
|
|
|
- delete this._readerViewTriggerRegEx;
|
|
|
|
- let readerViewUITourTrigger = Services.prefs.getCharPref(PREF_READERVIEW_TRIGGER);
|
|
|
|
- return this._readerViewTriggerRegEx = new RegExp(readerViewUITourTrigger, "i");
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
onLocationChange: function(aLocation) {
|
|
|
|
- // The ReaderView tour page is expected to run in Reader View,
|
|
|
|
- // which disables JavaScript on the page. To get around that, we
|
|
|
|
- // automatically start a pre-defined tour on page load (for hysterical
|
|
|
|
- // raisins the ReaderView tour is known as "readinglist")
|
|
|
|
- let originalUrl = ReaderMode.getOriginalUrl(aLocation);
|
|
|
|
- if (this._readerViewTriggerRegEx.test(originalUrl)) {
|
|
|
|
- this.startSubTour("readinglist");
|
|
|
|
- }
|
|
|
|
},
|
|
|
|
|
|
|
|
onPageEvent: function(aMessage, aEvent) {
|
|
|
|
@@ -661,15 +640,10 @@ this.UITour = {
|
2017-09-20 19:13:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
case "forceShowReaderIcon": {
|
|
|
|
- ReaderParent.forceShowReaderIcon(browser);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case "toggleReaderMode": {
|
|
|
|
- let targetPromise = this.getTarget(window, "readerMode-urlBar");
|
|
|
|
- targetPromise.then(target => {
|
|
|
|
- ReaderParent.toggleReaderMode({target: target.node});
|
|
|
|
- });
|
|
|
|
break;
|
|
|
|
}
|
2017-11-20 20:14:25 +01:00
|
|
|
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -1947,12 +1921,8 @@ this.UITour = {
|
|
|
|
return;
|
|
|
|
}
|
2017-09-20 19:13:30 +02:00
|
|
|
|
2018-01-07 17:12:58 +01:00
|
|
|
- if (aFeature == "readinglist") {
|
|
|
|
- ReaderParent.showReaderModeInfoPanel(browser);
|
|
|
|
- } else {
|
|
|
|
- log.error("startSubTour: Unknown feature option specified");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
+ log.error("startSubTour: Unknown feature option specified");
|
|
|
|
+ return;
|
|
|
|
},
|
2017-11-24 23:49:08 +01:00
|
|
|
|
2018-01-07 17:12:58 +01:00
|
|
|
addNavBarWidget: function (aTarget, aMessageManager, aCallbackID) {
|
2017-09-20 19:13:30 +02:00
|
|
|
--- a/browser/modules/moz.build
|
|
|
|
+++ b/browser/modules/moz.build
|
2018-01-07 17:12:58 +01:00
|
|
|
@@ -35,7 +35,6 @@ EXTRA_JS_MODULES += [
|
|
|
|
'PermissionUI.jsm',
|
2017-09-20 19:13:30 +02:00
|
|
|
'PluginContent.jsm',
|
|
|
|
'ProcessHangMonitor.jsm',
|
|
|
|
- 'ReaderParent.jsm',
|
|
|
|
'RecentWindow.jsm',
|
|
|
|
'RemotePrompt.jsm',
|
|
|
|
'Sanitizer.jsm',
|