diff --git a/allow-anonymous-user-style.patch b/allow-anonymous-user-style.patch index 22301cd..1b90da1 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 -@@ -1124,9 +1124,7 @@ +@@ -1125,9 +1125,7 @@ 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(); -@@ -1144,7 +1142,7 @@ +@@ -1145,7 +1143,7 @@ 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(); -@@ -1152,7 +1150,7 @@ +@@ -1153,7 +1151,7 @@ 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()); -@@ -1287,8 +1285,7 @@ +@@ -1288,8 +1286,7 @@ 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]) -@@ -1303,7 +1300,7 @@ +@@ -1304,7 +1301,7 @@ mBindingManager->WalkRules(aFunc, aData, &cutOffInheritance); } } @@ -50,3 +50,4 @@ 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 aa0194e..4867a1c 100644 --- a/default.nix +++ b/default.nix @@ -5,7 +5,6 @@ let gtk3Support = true; enableOfficialBranding = true; privacySupport = true; - geolocationSupport = false; pulseaudioSupport = false; }; @@ -15,15 +14,20 @@ let ./disable-datasharing-infobar.patch ./disable-locationservice.patch ./disable-sponsored-tiles.patch + ./disable-system-addons.patch ./disable-telemetry.patch ./disable-reader.patch ./disable-pocket.patch + ./disable-send-to-device.patch + ./disable-dbus.patch ./preferences.patch ]; + postPatch = '' - sed -e '/browser\/extensions/d' \ - -e '/browser\/features/d' \ - -e '/pdfjs/d' \ + sed -e '/browser\/extensions/d' \ + -e '/browser\/components\/Experiments/d' \ + -e '/browser\/features/d' \ + -e '/pdfjs/d' \ -i browser/installer/package-manifest.in : > browser/extensions/moz.build ''; @@ -31,7 +35,7 @@ let "--disable-dbus" "--disable-gconf" "--disable-eme" - ]; + ]; }); in diff --git a/disable-datasharing-infobar.patch b/disable-datasharing-infobar.patch index 92e0e89..2055fa3 100644 --- a/disable-datasharing-infobar.patch +++ b/disable-datasharing-infobar.patch @@ -1,12 +1,11 @@ --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js -@@ -1687,9 +1687,6 @@ - gSync.init(); - }, {timeout: 1000 * 5}); - +@@ -1548,9 +1548,6 @@ + MenuTouchModeObserver.init(); + } + - if (AppConstants.MOZ_DATA_REPORTING) - gDataNotificationInfoBar.init(); - - requestIdleCallback(() => { - // setup simple gestures support - gGestureSupport.init(true); + if (!AppConstants.MOZILLA_OFFICIAL) + DevelopmentHelpers.init(); diff --git a/disable-dbus.patch b/disable-dbus.patch new file mode 100644 index 0000000..fded09c --- /dev/null +++ b/disable-dbus.patch @@ -0,0 +1,38 @@ +--- a/ipc/moz.build ++++ b/ipc/moz.build +@@ -11,9 +11,6 @@ + 'testshell', + ] + +-if CONFIG['MOZ_ENABLE_DBUS']: +- DIRS += ['dbus'] +- + if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android': + DIRS += ['contentproc'] + +--- a/netwerk/moz.build ++++ b/netwerk/moz.build +@@ -27,10 +27,7 @@ + if CONFIG['MOZ_SCTP']: + DIRS += ['sctp/src', 'sctp/datachannel'] + +-if CONFIG['NECKO_WIFI']: +- DIRS += ['wifi'] +- + 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 d732229..880f1e5 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 -@@ -396,6 +396,10 @@ function migrateRegionPrefs() { +@@ -380,6 +380,10 @@ return; } @@ -11,7 +11,7 @@ // 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. -@@ -479,6 +483,10 @@ var ensureKnownCountryCode = async funct +@@ -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", ""); diff --git a/disable-pocket.patch b/disable-pocket.patch index c096fac..13749cb 100644 --- a/disable-pocket.patch +++ b/disable-pocket.patch @@ -1,6 +1,6 @@ --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js -@@ -204,7 +204,7 @@ pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name", "chrome://browser +@@ -200,7 +200,7 @@ pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description", "chrome://browser/locale/browser.properties"); pref("extensions.webextensions.themes.enabled", true); @@ -9,7 +9,7 @@ pref("lightweightThemes.update.enabled", true); pref("lightweightThemes.getMoreURL", "https://addons.mozilla.org/%LOCALE%/firefox/themes"); -@@ -1656,8 +1656,6 @@ pref("browser.migrate.chrome.history.maxAgeInDays", 180); +@@ -1648,8 +1648,6 @@ // Enable browser frames for use on desktop. Only exposed to chrome callers. pref("dom.mozBrowserFramesEnabled", true); @@ -20,67 +20,41 @@ // "Simplify Page" feature in Print Preview. This feature is disabled by default --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm -@@ -183,11 +183,6 @@ this.UITour = { - aDocument.getElementById(buttonId) : null; - } - }], +@@ -147,18 +147,6 @@ + ["help", {query: "#appMenu-help-button"}], + ["home", {query: "#home-button"}], + ["library", {query: "#appMenu-library-button"}], - ["pocket", { - allowAdd: true, -- query: "#pocket-button", -- widgetName: "pocket-button", +- 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"); +- }, - }], - ["privateWindow", { - query(aDocument) { - let buttonId = gPhotonStructure ? "appMenu-private-window-button" -@@ -1367,45 +1362,6 @@ this.UITour = { - popup.addEventListener("popupshown", onPopupShown); + ["privateWindow", {query: "#appMenu-private-window-button"}], + ["quit", {query: "#appMenu-quit-button"}], + ["search", { +@@ -1427,12 +1415,6 @@ } aWindow.document.getElementById("identity-box").click(); -- } else if (aMenuName == "pocket") { -- this.getTarget(aWindow, "pocket").then(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. -- await 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() { -- resolve(); -- }, {once: true}); -- -- aWindow.PanelUI.show(); -- }); -- } -- -- let widgetWrapper = widgetGroupWrapper.forWindow(aWindow); -- aWindow.PanelUI.showSubView(widgetGroupWrapper.viewId, -- widgetWrapper.anchor, -- placement.area); -- }).catch(log.error); + } 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; --- a/browser/extensions/moz.build +++ b/browser/extensions/moz.build -@@ -13,7 +13,6 @@ DIRS += [ +@@ -12,7 +12,6 @@ 'formautofill', 'onboarding', 'pdfjs', diff --git a/disable-reader.patch b/disable-reader.patch index ae646aa..f8a6aaa 100644 --- a/disable-reader.patch +++ b/disable-reader.patch @@ -8,7 +8,7 @@ -@@ -284,7 +283,6 @@ +@@ -281,7 +280,6 @@ #endif @@ -18,24 +18,16 @@ --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js -@@ -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, -@@ -74,8 +74,7 @@ XPCOMUtils.defineLazyPreferenceGetter(this, "gPhotonStructure", - ["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"], -@@ -4788,7 +4785,6 @@ var XULBrowserWindow = { +@@ -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); @@ -43,14 +35,36 @@ 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 -@@ -888,10 +888,6 @@ +@@ -876,11 +876,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 2017-11-02 ++++ b/browser/base/content/urlbarBindings.xml 2017-11-24 +@@ -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 @@ + ]]> + + +- +- +- +- +- +- +- + + + #endif +- +- +- +- +- + +@@ -409,46 +402,6 @@ + + + +- +- + + +--- a/browser/base/content/browser-context.inc ++++ b/browser/base/content/browser-context.inc +@@ -258,14 +258,6 @@ + label="&savePageCmd.label;" + accesskey="&savePageCmd.accesskey2;" + oncommand="gContextMenu.savePageAs();"/> +-