295 lines
11 KiB
Diff
295 lines
11 KiB
Diff
--- 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"/>
|
|
@@ -281,7 +280,6 @@
|
|
<key id="key_fullScreen_old" key="&fullScreenCmd.macCommandKey;" command="View:FullScreen" modifiers="accel,shift"/>
|
|
<key keycode="VK_F11" command="View:FullScreen"/>
|
|
#endif
|
|
- <key id="key_toggleReaderMode" key="&toggleReaderMode.key;" command="View:ReaderView" modifiers="accel,alt" disabled="true"/>
|
|
<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"/>
|
|
--- a/browser/base/content/browser.js
|
|
+++ b/browser/base/content/browser.js
|
|
@@ -46,8 +46,6 @@
|
|
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",
|
|
SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
|
|
SessionStore: "resource:///modules/sessionstore/SessionStore.jsm",
|
|
@@ -4753,7 +4751,6 @@
|
|
}
|
|
}
|
|
UpdateBackForwardCommands(gBrowser.webNavigation);
|
|
- ReaderParent.updateReaderButton(gBrowser.selectedBrowser);
|
|
|
|
if (!gMultiProcessBrowser) // Bug 1108553 - Cannot rotate images with e10s
|
|
gGestureSupport.restoreRotationState();
|
|
@@ -5122,8 +5119,8 @@
|
|
aRequest.originalURI &&
|
|
(aRequest.originalURI.schemeIs("chrome") ||
|
|
(aRequest.originalURI.schemeIs("about") &&
|
|
- aWebProgress.isTopLevel &&
|
|
- !aRequest.originalURI.spec.startsWith("about:reader")))) {
|
|
+ aWebProgress.isTopLevel
|
|
+ ))) {
|
|
return false;
|
|
}
|
|
|
|
@@ -5195,9 +5192,6 @@
|
|
// 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;
|
|
}
|
|
|
|
--- a/browser/base/content/browser.xul
|
|
+++ b/browser/base/content/browser.xul
|
|
@@ -876,11 +876,6 @@
|
|
hidden="true"
|
|
tooltiptext="&pageReportIcon.tooltip;"
|
|
onmousedown="gPopupBlockerObserver.onReportButtonMousedown(event);"/>
|
|
- <image id="reader-mode-button"
|
|
- class="urlbar-icon urlbar-page-action"
|
|
- role="button"
|
|
- hidden="true"
|
|
- onclick="ReaderParent.buttonClick(event);"/>
|
|
<toolbarbutton id="urlbar-zoom-button"
|
|
onclick="FullZoom.reset();"
|
|
tooltip="dynamic-shortcut-tooltip"
|
|
--- a/browser/components/nsBrowserGlue.js
|
|
+++ b/browser/components/nsBrowserGlue.js
|
|
@@ -55,7 +55,6 @@
|
|
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",
|
|
SafeBrowsing: "resource://gre/modules/SafeBrowsing.jsm",
|
|
@@ -145,9 +144,6 @@
|
|
"FormValidation:ShowPopup": ["FormValidationHandler"],
|
|
"FormValidation:HidePopup": ["FormValidationHandler"],
|
|
"Prompt:Open": ["RemotePrompt"],
|
|
- "Reader:ArticleGet": ["ReaderParent"],
|
|
- "Reader:FaviconRequest": ["ReaderParent"],
|
|
- "Reader:UpdateReaderButton": ["ReaderParent"],
|
|
// PLEASE KEEP THIS LIST IN SYNC WITH THE MOBILE LISTENERS IN BrowserCLH.js
|
|
"RemoteLogins:findLogins": ["LoginManagerParent"],
|
|
"RemoteLogins:findRecipes": ["LoginManagerParent"],
|
|
--- a/browser/components/uitour/UITour.jsm
|
|
+++ b/browser/components/uitour/UITour.jsm
|
|
@@ -30,8 +30,6 @@
|
|
"resource://gre/modules/PrivateBrowsingUtils.jsm");
|
|
XPCOMUtils.defineLazyModuleGetter(this, "ProfileAge",
|
|
"resource://gre/modules/ProfileAge.jsm");
|
|
-XPCOMUtils.defineLazyModuleGetter(this, "ReaderParent",
|
|
- "resource:///modules/ReaderParent.jsm");
|
|
XPCOMUtils.defineLazyModuleGetter(this, "PageActions",
|
|
"resource:///modules/PageActions.jsm");
|
|
|
|
@@ -40,7 +38,6 @@
|
|
const PREF_SEENPAGEIDS = "browser.uitour.seenPageIDs";
|
|
|
|
const BACKGROUND_PAGE_ACTIONS_ALLOWED = new Set([
|
|
- "forceShowReaderIcon",
|
|
"getConfiguration",
|
|
"getTreatmentTag",
|
|
"hideHighlight",
|
|
@@ -164,7 +161,6 @@
|
|
}],
|
|
["privateWindow", {query: "#appMenu-private-window-button"}],
|
|
["quit", {query: "#appMenu-quit-button"}],
|
|
- ["readerMode-urlBar", {query: "#reader-mode-button"}],
|
|
["search", {
|
|
infoPanelOffsetX: 18,
|
|
infoPanelPosition: "after_start",
|
|
@@ -653,15 +649,10 @@
|
|
}
|
|
|
|
case "forceShowReaderIcon": {
|
|
- ReaderParent.forceShowReaderIcon(browser);
|
|
break;
|
|
}
|
|
|
|
case "toggleReaderMode": {
|
|
- let targetPromise = this.getTarget(window, "readerMode-urlBar");
|
|
- targetPromise.then(target => {
|
|
- ReaderParent.toggleReaderMode({target: target.node});
|
|
- });
|
|
break;
|
|
}
|
|
|
|
--- a/browser/components/uitour/UITour-lib.js
|
|
+++ b/browser/components/uitour/UITour-lib.js
|
|
@@ -119,7 +119,6 @@
|
|
* <li>pocket
|
|
* <li>privateWindow
|
|
* <li>quit
|
|
- * <li>readerMode-urlBar
|
|
* <li>screenshots
|
|
* <li>search
|
|
* <li>searchIcon
|
|
@@ -704,26 +703,6 @@
|
|
};
|
|
|
|
/**
|
|
- * @summary Force the reader mode icon to appear in the address bar regardless of whether
|
|
- * heuristics determine it's appropriate.
|
|
- *
|
|
- * @description This is useful if you want to target an annotation (panel/highlight) on it
|
|
- * but the tour page doesn't have much textual content.
|
|
- */
|
|
- Mozilla.UITour.forceShowReaderIcon = function() {
|
|
- _sendEvent("forceShowReaderIcon");
|
|
- };
|
|
-
|
|
- /**
|
|
- * Toggle into reader mode for the current tab. Once the user enters reader
|
|
- * mode, the UITour document will not be active and therefore cannot call other
|
|
- * UITour APIs.
|
|
- */
|
|
- Mozilla.UITour.toggleReaderMode = function() {
|
|
- _sendEvent("toggleReaderMode");
|
|
- };
|
|
-
|
|
- /**
|
|
* @param {String} pane - Pane to open/switch the preferences to.
|
|
* Valid values match fragments on about:preferences and are subject to change e.g.:
|
|
*
|
|
--- a/browser/components/uitour/test/browser_UITour_toggleReaderMode.js
|
|
+++ b/browser/components/uitour/test/browser_UITour_toggleReaderMode.js
|
|
@@ -1,16 +0,0 @@
|
|
-"use strict";
|
|
-
|
|
-var gTestTab;
|
|
-var gContentAPI;
|
|
-var gContentWindow;
|
|
-
|
|
-add_task(setup_UITourTest);
|
|
-
|
|
-add_UITour_task(async function() {
|
|
- ok(!gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"),
|
|
- "Should not be in reader mode at start of test.");
|
|
- await gContentAPI.toggleReaderMode();
|
|
- await waitForConditionPromise(() => gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"));
|
|
- ok(gBrowser.selectedBrowser.currentURI.spec.startsWith("about:reader"),
|
|
- "Should be in reader mode now.");
|
|
-});
|
|
--- a/browser/components/uitour/test/browser.ini
|
|
+++ b/browser/components/uitour/test/browser.ini
|
|
@@ -34,7 +34,6 @@
|
|
[browser_UITour_annotation_size_attributes.js]
|
|
[browser_UITour_defaultBrowser.js]
|
|
[browser_UITour_detach_tab.js]
|
|
-[browser_UITour_forceReaderMode.js]
|
|
[browser_UITour_modalDialog.js]
|
|
skip-if = os != "mac" # modal dialog disabling only working on OS X.
|
|
[browser_UITour_observe.js]
|
|
@@ -46,4 +45,3 @@
|
|
[browser_UITour_resetProfile.js]
|
|
[browser_UITour_showNewTab.js]
|
|
[browser_UITour_sync.js]
|
|
-[browser_UITour_toggleReaderMode.js]
|
|
--- a/browser/components/sessionstore/test/browser.ini
|
|
+++ b/browser/components/sessionstore/test/browser.ini
|
|
@@ -31,7 +31,6 @@
|
|
browser_scrollPositions_sample.html
|
|
browser_scrollPositions_sample2.html
|
|
browser_scrollPositions_sample_frameset.html
|
|
- browser_scrollPositions_readerModeArticle.html
|
|
browser_sessionStorage.html
|
|
browser_speculative_connect.html
|
|
browser_248970_b_sample.html
|
|
@@ -111,7 +110,6 @@
|
|
[browser_restore_redirect.js]
|
|
[browser_restore_cookies_noOriginAttributes.js]
|
|
[browser_scrollPositions.js]
|
|
-[browser_scrollPositionsReaderMode.js]
|
|
[browser_sessionHistory.js]
|
|
support-files =
|
|
file_sessionHistory_hashchange.html
|
|
--- a/browser/base/content/urlbarBindings.xml
|
|
+++ b/browser/base/content/urlbarBindings.xml
|
|
@@ -230,11 +230,6 @@
|
|
break;
|
|
}
|
|
}
|
|
- } else {
|
|
- let originalUrl = ReaderMode.getOriginalUrlObjectForDisplay(aValue);
|
|
- if (originalUrl) {
|
|
- returnValue = originalUrl.displaySpec;
|
|
- }
|
|
}
|
|
|
|
// Set the actiontype only if the user is not overriding actions.
|
|
@@ -947,26 +942,6 @@
|
|
]]></body>
|
|
</method>
|
|
|
|
- <method name="makeURIReadable">
|
|
- <parameter name="aURI"/>
|
|
- <body>
|
|
- <![CDATA[
|
|
- // Avoid copying 'about:reader?url=', and always provide the original URI:
|
|
- // Reader mode ensures we call createExposableURI itself.
|
|
- let readerStrippedURI = ReaderMode.getOriginalUrlObjectForDisplay(aURI.displaySpec);
|
|
- if (readerStrippedURI) {
|
|
- aURI = readerStrippedURI;
|
|
- } else {
|
|
- // Only copy exposable URIs
|
|
- try {
|
|
- aURI = Services.uriFixup.createExposableURI(aURI);
|
|
- } catch (ex) {}
|
|
- }
|
|
- return aURI;
|
|
- ]]>
|
|
- </body>
|
|
- </method>
|
|
-
|
|
<method name="_getSelectedValueForClipboard">
|
|
<body><![CDATA[
|
|
// Grab the actual input field's value, not our value, which could include moz-action:
|
|
@@ -1008,8 +983,6 @@
|
|
return selectedVal;
|
|
}
|
|
|
|
- uri = this.makeURIReadable(uri);
|
|
-
|
|
// If the entire URL is selected, just use the actual loaded URI,
|
|
// unless we want a decoded URI, or it's a data: or javascript: URI,
|
|
// since those are hard to read when encoded.
|
|
--- a/browser/modules/moz.build
|
|
+++ b/browser/modules/moz.build
|
|
@@ -85,9 +85,6 @@
|
|
with Files("ProcessHangMonitor.jsm"):
|
|
BUG_COMPONENT = ("Core", "DOM: Content Processes")
|
|
|
|
-with Files("ReaderParent.jsm"):
|
|
- BUG_COMPONENT = ("Toolkit", "Reader Mode")
|
|
-
|
|
with Files("Sanitizer.jsm"):
|
|
BUG_COMPONENT = ("Firefox", "Preferences")
|
|
|
|
@@ -149,7 +146,6 @@
|
|
'PingCentre.jsm',
|
|
'PluginContent.jsm',
|
|
'ProcessHangMonitor.jsm',
|
|
- 'ReaderParent.jsm',
|
|
'RecentWindow.jsm',
|
|
'RemotePrompt.jsm',
|
|
'Sanitizer.jsm',
|