diff --git a/allow-anonymous-user-style.patch b/allow-anonymous-user-style.patch index 1b90da1..264f960 100644 --- a/allow-anonymous-user-style.patch +++ b/allow-anonymous-user-style.patch @@ -2,7 +2,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=285140 --- a/layout/style/nsStyleSet.cpp +++ b/layout/style/nsStyleSet.cpp -@@ -1125,9 +1125,7 @@ +@@ -1130,9 +1130,7 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc, bool haveImportantUARules = !aRuleWalker->GetCheckForImportantRules(); aRuleWalker->SetLevel(SheetType::User, false, true); @@ -13,7 +13,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=285140 (*aCollectorFunc)(mRuleProcessors[SheetType::User], aData); nsRuleNode* lastUserRN = aRuleWalker->CurrentNode(); bool haveImportantUserRules = !aRuleWalker->GetCheckForImportantRules(); -@@ -1145,7 +1143,7 @@ +@@ -1154,7 +1152,7 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc, static_cast(aData), &cutOffInheritance); } @@ -22,7 +22,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=285140 mRuleProcessors[SheetType::Doc]) (*aCollectorFunc)(mRuleProcessors[SheetType::Doc], aData); nsRuleNode* lastDocRN = aRuleWalker->CurrentNode(); -@@ -1153,7 +1151,7 @@ +@@ -1162,7 +1160,7 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc, nsTArray lastScopedRNs; nsTArray haveImportantScopedRules; bool haveAnyImportantScopedRules = false; @@ -31,7 +31,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=285140 aElement && aElement->IsElementInStyleScope()) { lastScopedRNs.SetLength(mScopedDocSheetRuleProcessors.Length()); haveImportantScopedRules.SetLength(mScopedDocSheetRuleProcessors.Length()); -@@ -1288,8 +1286,7 @@ +@@ -1297,8 +1295,7 @@ nsStyleSet::WalkRuleProcessors(nsIStyleRuleProcessor::EnumFunc aFunc, if (mRuleProcessors[SheetType::Agent]) (*aFunc)(mRuleProcessors[SheetType::Agent], aData); @@ -41,7 +41,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=285140 (*aFunc)(mRuleProcessors[SheetType::User], aData); if (mRuleProcessors[SheetType::PresHint]) -@@ -1304,7 +1301,7 @@ +@@ -1316,7 +1313,7 @@ nsStyleSet::WalkRuleProcessors(nsIStyleRuleProcessor::EnumFunc aFunc, mBindingManager->WalkRules(aFunc, aData, &cutOffInheritance); } } @@ -50,4 +50,3 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=285140 if (mRuleProcessors[SheetType::Doc]) // NOTE: different (*aFunc)(mRuleProcessors[SheetType::Doc], aData); if (aData->mElement->IsElementInStyleScope()) { -f (aData->mElement->IsElementInStyleScope()) { diff --git a/default.nix b/default.nix index a7e9985..82b9463 100644 --- a/default.nix +++ b/default.nix @@ -1,7 +1,7 @@ { pkgs ? import { } }: let - firefox = pkgs.firefox-unwrapped.override { + firefox = pkgs.firefox-esr-unwrapped.override { gtk3Support = true; enableOfficialBranding = true; privacySupport = true; @@ -11,7 +11,6 @@ let patched = firefox.overrideDerivation (base: { patches = base.patches ++ [ ./allow-anonymous-user-style.patch - ./enable-legacy-addons.patch ./disable-datasharing-infobar.patch ./disable-locationservice.patch ./disable-sponsored-tiles.patch @@ -23,6 +22,7 @@ let ./disable-pdfjs.patch ./disable-dbus.patch ./preferences.patch + ./mitigate-spectre.patch ]; postPatch = '' diff --git a/disable-datasharing-infobar.patch b/disable-datasharing-infobar.patch index 2055fa3..287316f 100644 --- a/disable-datasharing-infobar.patch +++ b/disable-datasharing-infobar.patch @@ -1,11 +1,12 @@ --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js -@@ -1548,9 +1548,6 @@ - MenuTouchModeObserver.init(); - } - +@@ -1353,9 +1353,6 @@ var gBrowserInit = { + gSyncUI.init(); + gFxAccounts.init(); + - if (AppConstants.MOZ_DATA_REPORTING) - gDataNotificationInfoBar.init(); - - if (!AppConstants.MOZILLA_OFFICIAL) - DevelopmentHelpers.init(); + gBrowserThumbnails.init(); + + gMenuButtonBadgeManager.init(); diff --git a/disable-dbus.patch b/disable-dbus.patch index fded09c..cb6a962 100644 --- a/disable-dbus.patch +++ b/disable-dbus.patch @@ -1,18 +1,31 @@ +--- a/browser/confvars.sh ++++ b/browser/confvars.sh +@@ -29,6 +29,10 @@ if test "$OS_ARCH" = "WINNT"; then + fi + fi + ++MOZ_ENABLE_DBUS=0 ++NECKO_WIFI=0 ++NECKO_WIFI_DBUS=0 ++ + # Enable building ./signmar and running libmar signature tests + MOZ_ENABLE_SIGNMAR=1 + --- a/ipc/moz.build +++ b/ipc/moz.build -@@ -11,9 +11,6 @@ +@@ -11,9 +11,6 @@ DIRS += [ 'testshell', ] -if CONFIG['MOZ_ENABLE_DBUS']: - DIRS += ['dbus'] - - if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android': - DIRS += ['contentproc'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': + DIRS += ['unixfd', 'unixsocket'] --- a/netwerk/moz.build +++ b/netwerk/moz.build -@@ -27,10 +27,7 @@ +@@ -25,9 +25,6 @@ if CONFIG['MOZ_SRTP']: if CONFIG['MOZ_SCTP']: DIRS += ['sctp/src', 'sctp/datachannel'] @@ -22,17 +35,3 @@ DIRS += ['locales'] DIRS += ['build'] - TEST_DIRS += ['test'] ---- a/browser/confvars.sh -+++ b/browser/confvars.sh -@@ -60,6 +60,10 @@ - ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-release - MAR_CHANNEL_ID=firefox-mozilla-release - fi -+MOZ_ENABLE_DBUS=0 -+NECKO_WIFI=0 -+NECKO_WIFI_DBUS=0 -+ - MOZ_PROFILE_MIGRATOR=1 - - # Enable checking that add-ons are signed by the trusted root diff --git a/disable-locationservice.patch b/disable-locationservice.patch index 880f1e5..da4e318 100644 --- a/disable-locationservice.patch +++ b/disable-locationservice.patch @@ -1,6 +1,6 @@ --- a/toolkit/components/search/nsSearchService.js +++ b/toolkit/components/search/nsSearchService.js -@@ -380,6 +380,10 @@ +@@ -421,6 +421,10 @@ function migrateRegionPrefs() { return; } @@ -11,9 +11,9 @@ // If we have 'isUS' but no 'countryCode' then we are almost certainly // a profile from Fx 34/35 that set 'isUS' based purely on a timezone // check. If this said they were US, we force region to be US. -@@ -463,6 +467,10 @@ - // If we have a country-code already stored in our prefs we trust it. - let countryCode = Services.prefs.getCharPref("browser.search.countryCode", ""); +@@ -507,6 +511,10 @@ var ensureKnownCountryCode = Task.async(function* (ss) { + countryCode = Services.prefs.getCharPref("browser.search.countryCode"); + } catch (e) {} + // No countryCode set, use US as default, don't contact location.services.mozilla.com + Services.prefs.setCharPref("browser.search.countryCode", "US"); diff --git a/disable-pdfjs.patch b/disable-pdfjs.patch index 224c989..87c491a 100644 --- a/disable-pdfjs.patch +++ b/disable-pdfjs.patch @@ -1,41 +1,31 @@ --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js -@@ -47,7 +47,6 @@ - OS: "resource://gre/modules/osfile.jsm", - PageActions: "resource:///modules/PageActions.jsm", - PageThumbs: "resource://gre/modules/PageThumbs.jsm", -- PdfJs: "resource://pdf.js/PdfJs.jsm", - PermissionUI: "resource:///modules/PermissionUI.jsm", - PingCentre: "resource:///modules/PingCentre.jsm", - PlacesBackups: "resource://gre/modules/PlacesBackups.jsm", -@@ -505,14 +504,6 @@ - this._updateFxaBadges(); - break; - case "handlersvc-store-initialized": -- // Initialize PdfJs when running in-process and remote. This only -- // happens once since PdfJs registers global hooks. If the PdfJs -- // extension is installed the init method below will be overridden -- // leaving initialization to the extension. -- // parent only: configure default prefs, set up pref observers, register -- // pdf content handler, and initializes parent side message manager -- // shim for privileged api access. -- PdfJs.init(true); - break; - case "shield-init-complete": - this._sendMainPingCentrePing(); -@@ -866,15 +857,6 @@ +@@ -46,7 +46,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-s + ["NewTabUtils", "resource://gre/modules/NewTabUtils.jsm"], + ["OS", "resource://gre/modules/osfile.jsm"], + ["PageThumbs", "resource://gre/modules/PageThumbs.jsm"], +- ["PdfJs", "resource://pdf.js/PdfJs.jsm"], + ["PermissionUI", "resource:///modules/PermissionUI.jsm"], + ["PlacesBackups", "resource://gre/modules/PlacesBackups.jsm"], + ["PlacesUtils", "resource://gre/modules/PlacesUtils.jsm"], +@@ -930,20 +929,6 @@ BrowserGlue.prototype = { // the first browser window has finished initializing _onFirstWindowLoaded: function BG__onFirstWindowLoaded(aWindow) { -- // Set up listeners and, if PdfJs is enabled, register the PDF stream converter. -- // We delay all of the parent's initialization other than stream converter -- // registration, because it requires file IO from nsHandlerService-json.js +- // Initialize PdfJs when running in-process and remote. This only +- // happens once since PdfJs registers global hooks. If the PdfJs +- // extension is installed the init method below will be overridden +- // leaving initialization to the extension. +- // parent only: configure default prefs, set up pref observers, register +- // pdf content handler, and initializes parent side message manager +- // shim for privileged api access. +- PdfJs.init(true); +- // child only: similar to the call above for parent - register content +- // handler and init message manager child shim for privileged api access. +- // With older versions of the extension installed, this load will fail +- // passively. - Services.ppmm.loadProcessScript("resource://pdf.js/pdfjschildbootstrap.js", true); -- if (PdfJs.enabled) { -- PdfJs.ensureRegistered(); -- Services.ppmm.loadProcessScript("resource://pdf.js/pdfjschildbootstrap-enabled.js", true); -- } - - TabCrashHandler.init(); - if (AppConstants.MOZ_CRASHREPORTER) { - PluginCrashReporter.init(); + if (AppConstants.platform == "win") { + // For Windows 7, initialize the jump list module. + const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1"; diff --git a/disable-pocket.patch b/disable-pocket.patch index 13749cb..3054f37 100644 --- a/disable-pocket.patch +++ b/disable-pocket.patch @@ -1,15 +1,6 @@ --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js -@@ -200,7 +200,7 @@ - pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description", "chrome://browser/locale/browser.properties"); - - pref("extensions.webextensions.themes.enabled", true); --pref("extensions.webextensions.themes.icons.buttons", "back,forward,reload,stop,bookmark_star,bookmark_menu,downloads,home,app_menu,cut,copy,paste,new_window,new_private_window,save_page,print,history,full_screen,find,options,addons,developer,synced_tabs,open_file,sidebars,share_page,subscribe,text_encoding,email_link,forget,pocket"); -+pref("extensions.webextensions.themes.icons.buttons", "back,forward,reload,stop,bookmark_star,bookmark_menu,downloads,home,app_menu,cut,copy,paste,new_window,new_private_window,save_page,print,history,full_screen,find,options,addons,developer,synced_tabs,open_file,sidebars,share_page,subscribe,text_encoding,email_link,forget"); - - pref("lightweightThemes.update.enabled", true); - pref("lightweightThemes.getMoreURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes"); -@@ -1648,8 +1648,6 @@ +@@ -1525,8 +1525,6 @@ pref("browser.migrate.chrome.history.maxAgeInDays", 0); // Enable browser frames for use on desktop. Only exposed to chrome callers. pref("dom.mozBrowserFramesEnabled", true); @@ -18,47 +9,188 @@ pref("signon.schemeUpgrades", true); // "Simplify Page" feature in Print Preview. This feature is disabled by default +--- a/browser/base/content/test/general/browser_contextmenu.js ++++ b/browser/base/content/test/general/browser_contextmenu.js +@@ -10,7 +10,6 @@ let LOGIN_FILL_ITEMS = [ + "fill-login-saved-passwords", true + ], null, + ]; +-let hasPocket = Services.prefs.getBoolPref("extensions.pocket.enabled"); + let hasContainers = Services.prefs.getBoolPref("privacy.userContext.enabled"); + + const example_base = "http://example.com/browser/browser/base/content/test/general/"; +@@ -35,7 +34,6 @@ add_task(function* test_xul_text_link_label() { + "---", null, + "context-bookmarklink", true, + "context-savelink", true, +- ...(hasPocket ? ["context-savelinktopocket", true] : []), + "context-copylink", true, + "context-searchselect", true + ] +@@ -79,7 +77,6 @@ add_task(function* test_plaintext() { + "context-bookmarkpage", true], null, + "---", null, + "context-savepage", true, +- ...(hasPocket ? ["context-pocket", true] : []), + "---", null, + "context-viewbgimage", false, + "context-selectall", true, +@@ -102,7 +99,6 @@ add_task(function* test_link() { + "---", null, + "context-bookmarklink", true, + "context-savelink", true, +- ...(hasPocket ? ["context-savelinktopocket", true] : []), + "context-copylink", true, + "context-searchselect", true + ] +@@ -248,7 +244,6 @@ add_task(function* test_iframe() { + "context-bookmarkpage", true], null, + "---", null, + "context-savepage", true, +- ...(hasPocket ? ["context-pocket", true] : []), + "---", null, + "context-viewbgimage", false, + "context-selectall", true, +@@ -554,7 +549,6 @@ add_task(function* test_pagemenu() { + "+Checkbox", {type: "checkbox", icon: "", checked: false, disabled: false}], null, + "---", null, + "context-savepage", true, +- ...(hasPocket ? ["context-pocket", true] : []), + "---", null, + "context-viewbgimage", false, + "context-selectall", true, +@@ -585,7 +579,6 @@ add_task(function* test_dom_full_screen() { + "context-leave-dom-fullscreen", true, + "---", null, + "context-savepage", true, +- ...(hasPocket ? ["context-pocket", true] : []), + "---", null, + "context-viewbgimage", false, + "context-selectall", true, +@@ -631,7 +624,6 @@ add_task(function* test_pagemenu2() { + "context-bookmarkpage", true], null, + "---", null, + "context-savepage", true, +- ...(hasPocket ? ["context-pocket", true] : []), + "---", null, + "context-viewbgimage", false, + "context-selectall", true, +@@ -708,7 +700,6 @@ add_task(function* test_imagelink() { + "---", null, + "context-bookmarklink", true, + "context-savelink", true, +- ...(hasPocket ? ["context-savelinktopocket", true] : []), + "context-copylink", true, + "---", null, + "context-viewimage", true, +@@ -811,7 +802,6 @@ add_task(function* test_click_to_play_blocked_plugin() { + "context-ctp-hide", true, + "---", null, + "context-savepage", true, +- ...(hasPocket ? ["context-pocket", true] : []), + "---", null, + "context-viewbgimage", false, + "context-selectall", true, +@@ -855,7 +845,6 @@ add_task(function* test_srcdoc() { + "context-bookmarkpage", true], null, + "---", null, + "context-savepage", true, +- ...(hasPocket ? ["context-pocket", true] : []), + "---", null, + "context-viewbgimage", false, + "context-selectall", true, +--- a/browser/components/customizableui/CustomizableUI.jsm ++++ b/browser/components/customizableui/CustomizableUI.jsm +@@ -64,7 +64,6 @@ var kVersion = 6; + * version the button is removed in as the value. e.g. "pocket-button": 5 + */ + var ObsoleteBuiltinButtons = { +- "pocket-button": 6 + }; + + /** +@@ -247,13 +246,6 @@ var CustomizableUIInternal = { + navbarPlacements.push("webide-button"); + } + +- // Place this last, when createWidget is called for pocket, it will +- // append to the toolbar. +- if (Services.prefs.getPrefType("extensions.pocket.enabled") != Services.prefs.PREF_INVALID && +- Services.prefs.getBoolPref("extensions.pocket.enabled")) { +- navbarPlacements.push("pocket-button"); +- } +- + this.registerArea(CustomizableUI.AREA_NAVBAR, { + legacy: true, + type: CustomizableUI.TYPE_TOOLBAR, --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm -@@ -147,18 +147,6 @@ - ["help", {query: "#appMenu-help-button"}], - ["home", {query: "#home-button"}], - ["library", {query: "#appMenu-library-button"}], +@@ -148,11 +148,6 @@ this.UITour = { + query: "#panic-button", + widgetName: "panic-button", + }], - ["pocket", { - allowAdd: true, -- query: (aDocument) => { -- // The pocket's urlbar page action button is pre-defined in the DOM. -- // It would be hidden if toggled off from the urlbar. -- let node = aDocument.getElementById("pocket-button-box"); -- if (node && node.hidden == false) { -- return node; -- } -- return aDocument.getElementById("pageAction-panel-pocket"); -- }, +- query: "#pocket-button", +- widgetName: "pocket-button", - }], - ["privateWindow", {query: "#appMenu-private-window-button"}], - ["quit", {query: "#appMenu-quit-button"}], + ["privateWindow", {query: "#privatebrowsing-button"}], + ["quit", {query: "#PanelUI-quit"}], ["search", { -@@ -1427,12 +1415,6 @@ +@@ -1662,46 +1657,6 @@ this.UITour = { + popup.addEventListener("popupshown", onPopupShown); } aWindow.document.getElementById("identity-box").click(); - } else if (aMenuName == "pocket") { -- let pageAction = PageActions.actionForID("pocket"); -- if (!pageAction) { -- log.error("Can't open the pocket menu without a page action"); -- return; -- } -- pageAction.doCommand(aWindow); - } else if (aMenuName == "urlbar") { - this.getTarget(aWindow, "urlbar").then(target => { - let urlbar = target.node; +- } else if (aMenuName == "pocket") { +- this.getTarget(aWindow, "pocket").then(Task.async(function* onPocketTarget(target) { +- let widgetGroupWrapper = CustomizableUI.getWidget(target.widgetName); +- if (widgetGroupWrapper.type != "view" || !widgetGroupWrapper.viewId) { +- log.error("Can't open the pocket menu without a view"); +- return; +- } +- let placement = CustomizableUI.getPlacementOfWidget(target.widgetName); +- if (!placement || !placement.area) { +- log.error("Can't open the pocket menu without a placement"); +- return; +- } +- +- if (placement.area == CustomizableUI.AREA_PANEL) { +- // Open the appMenu and wait for it if it's not already opened or showing a subview. +- yield new Promise((resolve, reject) => { +- if (aWindow.PanelUI.panel.state != "closed") { +- if (aWindow.PanelUI.multiView.showingSubView) { +- reject("A subview is already showing"); +- return; +- } +- +- resolve(); +- return; +- } +- +- aWindow.PanelUI.panel.addEventListener("popupshown", function onShown() { +- aWindow.PanelUI.panel.removeEventListener("popupshown", onShown); +- resolve(); +- }); +- +- aWindow.PanelUI.show(); +- }); +- } +- +- let widgetWrapper = widgetGroupWrapper.forWindow(aWindow); +- aWindow.PanelUI.showSubView(widgetGroupWrapper.viewId, +- widgetWrapper.anchor, +- placement.area); +- })).catch(log.error); + } + }, + --- a/browser/extensions/moz.build +++ b/browser/extensions/moz.build -@@ -12,7 +12,6 @@ - 'formautofill', - 'onboarding', +@@ -8,7 +8,6 @@ DIRS += [ + 'aushelper', + 'e10srollout', 'pdfjs', - 'pocket', - 'screenshots', - 'shield-recipe-client', 'webcompat', + ] + diff --git a/disable-reader.patch b/disable-reader.patch index b05a49e..202c1e7 100644 --- a/disable-reader.patch +++ b/disable-reader.patch @@ -8,45 +8,34 @@ -@@ -281,7 +280,6 @@ +@@ -283,7 +282,6 @@ #endif -- +- --- 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 @@ +@@ -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"], +@@ -4576,7 +4574,6 @@ var XULBrowserWindow = { } } 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; - } + gGestureSupport.restoreRotationState(); -@@ -5195,9 +5192,6 @@ +@@ -4877,9 +4874,6 @@ var TabsProgressListener = { // Filter out location changes caused by anchor navigation // or history.push/pop/replaceState. if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) { @@ -58,66 +47,132 @@ --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul -@@ -876,11 +876,6 @@ +@@ -759,10 +759,6 @@ hidden="true" tooltiptext="&pageReportIcon.tooltip;" onmousedown="gPopupBlockerObserver.onReportButtonMousedown(event);"/> - pocket - *
  • privateWindow - *
  • quit -- *
  • readerMode-urlBar - *
  • screenshots - *
  • search - *
  • 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; -- } - } +@@ -1947,12 +1921,8 @@ this.UITour = { + return; + } - // Set the actiontype only if the user is not overriding actions. -@@ -947,26 +942,6 @@ - ]]> - +- if (aFeature == "readinglist") { +- ReaderParent.showReaderModeInfoPanel(browser); +- } else { +- log.error("startSubTour: Unknown feature option specified"); +- return; +- } ++ log.error("startSubTour: Unknown feature option specified"); ++ return; + }, -- -- -- -- -- -- -- - - - #endif -- -- -- -- -- - -@@ -409,46 +402,6 @@ - - - -- -- - - --- a/browser/base/content/browser-context.inc +++ b/browser/base/content/browser-context.inc -@@ -258,14 +258,6 @@ +@@ -279,14 +279,6 @@ label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey2;" oncommand="gContextMenu.savePageAs();"/> @@ -73,323 +10,57 @@ - accesskey="&sendPageToDevice.accesskey;" - hidden="true"> - +- onpopupshowing="(() => { let browser = gBrowser || getPanelBrowser(); gFxAccounts.populateSendTabToDevicesMenu(event.target, browser.currentURI.spec, browser.contentTitle); })()"/> - { -- console.error("Could not send tab to device", e); -- }); -- }, -- -- populateSendTabToDevicesMenu(devicesPopup, url, title, createDeviceNodeFn) { -- if (!createDeviceNodeFn) { -- createDeviceNodeFn = (clientId, name, clientType) => { -- let eltName = name ? "menuitem" : "menuseparator"; -- return document.createElement(eltName); -- }; -- } -- -- // remove existing menu items -- for (let i = devicesPopup.childNodes.length - 1; i >= 0; --i) { -- let child = devicesPopup.childNodes[i]; -- if (child.classList.contains("sync-menuitem")) { -- child.remove(); -- } -- } -- -- if (gSync.syncConfiguredAndLoading) { -- // We can only be in this case in the page action menu. -- return; -- } -- -- const fragment = document.createDocumentFragment(); -- -- const state = UIState.get(); -- if (state.status == UIState.STATUS_SIGNED_IN && this.remoteClients.length > 0) { -- this._appendSendTabDeviceList(fragment, createDeviceNodeFn, url, title); -- } else if (state.status == UIState.STATUS_SIGNED_IN) { -- this._appendSendTabSingleDevice(fragment, createDeviceNodeFn); -- } else if (state.status == UIState.STATUS_NOT_VERIFIED || -- state.status == UIState.STATUS_LOGIN_FAILED) { -- this._appendSendTabVerify(fragment, createDeviceNodeFn); -- } else /* status is STATUS_NOT_CONFIGURED */ { -- this._appendSendTabUnconfigured(fragment, createDeviceNodeFn); -- } -- -- devicesPopup.appendChild(fragment); -- }, -- -- _appendSendTabDeviceList(fragment, createDeviceNodeFn, url, title) { -- const onTargetDeviceCommand = (event) => { -- let clients = event.target.getAttribute("clientId") ? -- [event.target.getAttribute("clientId")] : -- this.remoteClients.map(client => client.id); -- -- clients.forEach(clientId => this.sendTabToDevice(url, clientId, title)); -- } -- -- function addTargetDevice(clientId, name, clientType) { -- const targetDevice = createDeviceNodeFn(clientId, name, clientType); -- targetDevice.addEventListener("command", onTargetDeviceCommand, true); -- targetDevice.classList.add("sync-menuitem", "sendtab-target"); -- targetDevice.setAttribute("clientId", clientId); -- targetDevice.setAttribute("clientType", clientType); -- targetDevice.setAttribute("label", name); -- fragment.appendChild(targetDevice); -- } -- -- const clients = this.remoteClients; -- for (let client of clients) { -- const type = client.formfactor && client.formfactor.includes("tablet") ? -- "tablet" : client.type; -- addTargetDevice(client.id, client.name, type); -- } -- -- // "Send to All Devices" menu item -- if (clients.length > 1) { -- const separator = createDeviceNodeFn(); -- separator.classList.add("sync-menuitem"); -- fragment.appendChild(separator); -- const allDevicesLabel = this.fxaStrings.GetStringFromName("sendToAllDevices.menuitem"); -- addTargetDevice("", allDevicesLabel, ""); -- } -- }, -- -- _appendSendTabSingleDevice(fragment, createDeviceNodeFn) { -- const noDevices = this.fxaStrings.GetStringFromName("sendTabToDevice.singledevice.status"); -- const learnMore = this.fxaStrings.GetStringFromName("sendTabToDevice.singledevice"); -- this._appendSendTabInfoItems(fragment, createDeviceNodeFn, noDevices, learnMore, () => { -- this.openSendToDevicePromo(); -- }); -- }, -- -- _appendSendTabVerify(fragment, createDeviceNodeFn) { -- const notVerified = this.fxaStrings.GetStringFromName("sendTabToDevice.verify.status"); -- const verifyAccount = this.fxaStrings.GetStringFromName("sendTabToDevice.verify"); -- this._appendSendTabInfoItems(fragment, createDeviceNodeFn, notVerified, verifyAccount, () => { -- this.openPrefs("sendtab"); -- }); -- }, -- -- _appendSendTabUnconfigured(fragment, createDeviceNodeFn) { -- const notConnected = this.fxaStrings.GetStringFromName("sendTabToDevice.unconfigured.status"); -- const learnMore = this.fxaStrings.GetStringFromName("sendTabToDevice.unconfigured"); -- this._appendSendTabInfoItems(fragment, createDeviceNodeFn, notConnected, learnMore, () => { -- this.openSendToDevicePromo(); -- }); -- -- // Now add a 'sign in to sync' item above the 'learn more' item. -- const signInToSync = this.fxaStrings.GetStringFromName("sendTabToDevice.signintosync"); -- let signInItem = createDeviceNodeFn(null, signInToSync, null); -- signInItem.classList.add("sync-menuitem"); -- signInItem.setAttribute("label", signInToSync); -- // Show an icon if opened in the page action panel: -- if (signInItem.classList.contains("subviewbutton")) { -- signInItem.classList.add("subviewbutton-iconic", "signintosync"); -- } -- signInItem.addEventListener("command", () => { -- this.openPrefs("sendtab"); -- }); -- fragment.insertBefore(signInItem, fragment.lastChild); -- }, -- -- _appendSendTabInfoItems(fragment, createDeviceNodeFn, statusLabel, actionLabel, actionCommand) { -- const status = createDeviceNodeFn(null, statusLabel, null); -- status.setAttribute("label", statusLabel); -- status.setAttribute("disabled", true); -- status.classList.add("sync-menuitem"); -- fragment.appendChild(status); -- -- const separator = createDeviceNodeFn(null, null, null); -- separator.classList.add("sync-menuitem"); -- fragment.appendChild(separator); -- -- const actionItem = createDeviceNodeFn(null, actionLabel, null); -- actionItem.addEventListener("command", actionCommand, true); -- actionItem.classList.add("sync-menuitem"); -- actionItem.setAttribute("label", actionLabel); -- fragment.appendChild(actionItem); -- }, -- -- isSendableURI(aURISpec) { -- if (!aURISpec) { -- return false; -- } -- // Disallow sending tabs with more than 65535 characters. -- if (aURISpec.length > 65535) { -- return false; -- } -- try { -- // Filter out un-sendable URIs -- things like local files, object urls, etc. -- const unsendableRegexp = new RegExp( -- Services.prefs.getCharPref("services.sync.engine.tabs.filteredUrls"), "i"); -- return !unsendableRegexp.test(aURISpec); -- } catch (e) { -- // The preference has been removed, or is an invalid regexp, so we log an -- // error and treat it as a valid URI -- and the more problematic case is -- // the length, which we've already addressed. -- Cu.reportError(`Failed to build url filter regexp for send tab: ${e}`); -- return true; -- } -- }, -- -- // "Send Tab to Device" menu item -- updateTabContextMenu(aPopupMenu, aTargetTab) { -- const enabled = !this.syncConfiguredAndLoading && -- this.isSendableURI(aTargetTab.linkedBrowser.currentURI.spec); -- -- document.getElementById("context_sendTabToDevice").disabled = !enabled; -- }, -- -- // "Send Page to Device" and "Send Link to Device" menu items -- updateContentContextMenu(contextMenu) { -- // showSendLink and showSendPage are mutually exclusive -- const showSendLink = contextMenu.onSaveableLink || contextMenu.onPlainTextLink; -- const showSendPage = !showSendLink -- && !(contextMenu.isContentSelected || -- contextMenu.onImage || contextMenu.onCanvas || -- contextMenu.onVideo || contextMenu.onAudio || -- contextMenu.onLink || contextMenu.onTextInput); -- -- ["context-sendpagetodevice", "context-sep-sendpagetodevice"] -- .forEach(id => contextMenu.showItem(id, showSendPage)); -- ["context-sendlinktodevice", "context-sep-sendlinktodevice"] -- .forEach(id => contextMenu.showItem(id, showSendLink)); -- -- if (!showSendLink && !showSendPage) { -- return; -- } -- -- const targetURI = showSendLink ? contextMenu.linkURL : -- contextMenu.browser.currentURI.spec; -- const enabled = !this.syncConfiguredAndLoading && this.isSendableURI(targetURI); -- contextMenu.setItemAttr(showSendPage ? "context-sendpagetodevice" : -- "context-sendlinktodevice", -- "disabled", !enabled || null); -- }, -- - // Functions called by observers - onActivityStart() { - clearTimeout(this._syncAnimationTimer); +@@ -326,14 +318,6 @@ + oncommand="AddKeywordForSearchField();"/> + +-