firefox-patches/disable-reader.patch

150 lines
7.0 KiB
Diff
Raw Normal View History

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"/>
@@ -284,7 +283,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"/>
2017-09-20 19:13:30 +02:00
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
2017-10-17 23:11:44 +02:00
@@ -33,7 +33,6 @@ XPCOMUtils.defineLazyPreferenceGetter(this, "gPhotonStructure",
LoginManagerParent:false, NewTabUtils:false, PageThumbs:false,
PluralForm:false, PrivateBrowsingUtils:false,
ProcessHangMonitor:false, PromiseUtils:false, ReaderMode:false,
- ReaderParent:false, RecentWindow:false, SafeBrowsing: false,
SessionStore:false,
ShortcutUtils:false, SimpleServiceDiscovery:false, SitePermissions:false,
Social:false, TabCrashHandler:false, TelemetryStopwatch:false,
2017-10-20 03:05:03 +02:00
@@ -74,8 +74,7 @@ XPCOMUtils.defineLazyPreferenceGetter(this, "gPhotonStructure",
2017-10-17 23:11:44 +02:00
["PrivateBrowsingUtils", "resource://gre/modules/PrivateBrowsingUtils.jsm"],
2017-09-20 19:13:30 +02:00
["ProcessHangMonitor", "resource:///modules/ProcessHangMonitor.jsm"],
["PromiseUtils", "resource://gre/modules/PromiseUtils.jsm"],
2017-10-20 03:05:03 +02:00
["ReaderMode", "resource://gre/modules/ReaderMode.jsm"],
2017-09-20 19:13:30 +02:00
- ["ReaderParent", "resource:///modules/ReaderParent.jsm"],
["RecentWindow", "resource:///modules/RecentWindow.jsm"],
2017-10-17 23:11:44 +02:00
["SafeBrowsing", "resource://gre/modules/SafeBrowsing.jsm"],
2017-09-20 19:13:30 +02:00
["SessionStore", "resource:///modules/sessionstore/SessionStore.jsm"],
2017-10-17 23:11:44 +02:00
@@ -4788,7 +4785,6 @@ var XULBrowserWindow = {
2017-09-20 19:13:30 +02:00
}
}
UpdateBackForwardCommands(gBrowser.webNavigation);
- ReaderParent.updateReaderButton(gBrowser.selectedBrowser);
2017-10-17 23:11:44 +02:00
if (!gMultiProcessBrowser) // Bug 1108553 - Cannot rotate images with e10s
gGestureSupport.restoreRotationState();
2017-09-20 19:13:30 +02:00
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
2017-10-17 23:11:44 +02:00
@@ -888,10 +888,6 @@
2017-09-20 19:13:30 +02:00
hidden="true"
tooltiptext="&pageReportIcon.tooltip;"
onmousedown="gPopupBlockerObserver.onReportButtonMousedown(event);"/>
- <image id="reader-mode-button"
- class="urlbar-icon"
- 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
2017-10-17 23:11:44 +02:00
@@ -37,7 +37,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "SafeBrowsing",
PageActions:false,
PageThumbs:false, PdfJs:false, PermissionUI:false, PlacesBackups:false,
PlacesUtils:false, PluralForm:false, PrivateBrowsingUtils:false,
- ProcessHangMonitor:false, ReaderParent:false, RecentWindow:false,
RemotePrompt:false, SessionStore:false,
ShellService:false, SimpleServiceDiscovery:false, TabCrashHandler:false,
UITour:false, UIState:false, UpdateListener:false, WebChannel:false,
@@ -89,7 +88,6 @@ let initializedModules = {};
2017-09-20 19:13:30 +02:00
["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"],
["SessionStore", "resource:///modules/sessionstore/SessionStore.jsm"],
2017-10-17 23:11:44 +02:00
@@ -167,9 +165,6 @@ const listeners = {
2017-09-20 19:13:30 +02:00
"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 LISTENERS ADDED IN LoginManagerParent.init
"RemoteLogins:findLogins": ["LoginManagerParent"],
"RemoteLogins:findRecipes": ["LoginManagerParent"],
--- a/browser/components/uitour/UITour.jsm
+++ b/browser/components/uitour/UITour.jsm
2017-10-17 23:11:44 +02:00
@@ -30,8 +30,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
2017-09-20 19:13:30 +02:00
"resource://gre/modules/PrivateBrowsingUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ProfileAge",
"resource://gre/modules/ProfileAge.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ReaderParent",
- "resource:///modules/ReaderParent.jsm");
XPCOMUtils.defineLazyPreferenceGetter(this, "gPhotonStructure", "browser.photon.structure.enabled");
2017-10-17 23:11:44 +02:00
@@ -40,7 +38,6 @@ const PREF_LOG_LEVEL = "browser.uitour.loglevel";
const PREF_SEENPAGEIDS = "browser.uitour.seenPageIDs";
const BACKGROUND_PAGE_ACTIONS_ALLOWED = new Set([
- "forceShowReaderIcon",
"getConfiguration",
"getTreatmentTag",
"hideHighlight",
@@ -205,7 +202,6 @@ this.UITour = {
return aDocument.getElementById(buttonId);
}
}],
- ["readerMode-urlBar", {query: "#reader-mode-button"}],
["search", {
infoPanelOffsetX: 18,
infoPanelPosition: "after_start",
@@ -664,15 +660,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;
}
--- a/browser/modules/moz.build
+++ b/browser/modules/moz.build
2017-10-17 23:11:44 +02:00
@@ -85,9 +85,6 @@ with Files("PluginContent.jsm"):
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")
@@ -153,7 +150,6 @@ EXTRA_JS_MODULES += [
2017-09-20 19:13:30 +02:00
'PermissionUI.jsm',
'PluginContent.jsm',
'ProcessHangMonitor.jsm',
- 'ReaderParent.jsm',
'RecentWindow.jsm',
'RemotePrompt.jsm',
'Sanitizer.jsm',