rebased patches
authorWolfgang Rosenauer <wr@rosenauer.org>
Fri, 24 Aug 2018 14:17:12 +0200
changeset 1067 735b140fb042
parent 1066 3f18b0f2a868
child 1068 70cd69cfa868
rebased patches
MozillaFirefox/MozillaFirefox.changes
MozillaFirefox/MozillaFirefox.spec
MozillaFirefox/mozilla-bmo1464766.patch
firefox-kde.patch
mozilla-aarch64-startup-crash.patch
mozilla-bmo1464766.patch
mozilla-kde.patch
series
--- a/MozillaFirefox/MozillaFirefox.changes	Thu Aug 23 16:59:04 2018 +0200
+++ b/MozillaFirefox/MozillaFirefox.changes	Fri Aug 24 14:17:12 2018 +0200
@@ -3,6 +3,8 @@
 
 - update to Firefox 62.0b19
 - requires NSS >= 3.38
+- removed obsolete patches
+  mozilla-bmo1464766.patch
 
 -------------------------------------------------------------------
 Thu Aug  9 14:22:00 UTC 2018 - wr@rosenauer.org
--- a/MozillaFirefox/MozillaFirefox.spec	Thu Aug 23 16:59:04 2018 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Fri Aug 24 14:17:12 2018 +0200
@@ -160,7 +160,6 @@
 Patch7:         mozilla-aarch64-startup-crash.patch
 Patch8:         mozilla-bmo256180.patch
 Patch9:         mozilla-no-return.patch
-Patch10:        mozilla-bmo1464766.patch
 # Firefox/browser
 Patch101:       firefox-kde.patch
 Patch102:       firefox-branded-icons.patch
@@ -271,7 +270,6 @@
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
-%patch10 -p1
 # Firefox
 %patch101 -p1
 %patch102 -p1
--- a/MozillaFirefox/mozilla-bmo1464766.patch	Thu Aug 23 16:59:04 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-../mozilla-bmo1464766.patch
\ No newline at end of file
--- a/firefox-kde.patch	Thu Aug 23 16:59:04 2018 +0200
+++ b/firefox-kde.patch	Fri Aug 24 14:17:12 2018 +0200
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent  242712e5a1879111d1a93a5d55dfae3fd5d47abc
+# Parent  9db8523a81b9b43b952541cd47fc95d472f1eecf
 
 diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
 new file mode 100644
@@ -1302,7 +1302,7 @@
 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
 --- a/browser/base/jar.mn
 +++ b/browser/base/jar.mn
-@@ -44,16 +44,18 @@ browser.jar:
+@@ -24,16 +24,18 @@ browser.jar:
          content/browser/aboutRobots-icon.png          (content/aboutRobots-icon.png)
          content/browser/aboutRobots-widget-left.png   (content/aboutRobots-widget-left.png)
          content/browser/aboutTabCrashed.css           (content/aboutTabCrashed.css)
@@ -1314,13 +1314,13 @@
 +*       content/browser/browser-kde.xul               (content/browser-kde.xul)
 +%       override chrome://browser/content/browser.xul chrome://browser/content/browser-kde.xul desktop=kde
          content/browser/browser-addons.js             (content/browser-addons.js)
+         content/browser/browser-allTabsMenu.js        (content/browser-allTabsMenu.js)
          content/browser/browser-captivePortal.js      (content/browser-captivePortal.js)
          content/browser/browser-ctrlTab.js            (content/browser-ctrlTab.js)
          content/browser/browser-customization.js      (content/browser-customization.js)
          content/browser/browser-data-submission-info-bar.js (content/browser-data-submission-info-bar.js)
          content/browser/browser-compacttheme.js       (content/browser-compacttheme.js)
  #ifndef MOZILLA_OFFICIAL
-         content/browser/browser-development-helpers.js (content/browser-development-helpers.js)
 diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
 --- a/browser/components/build/nsModule.cpp
 +++ b/browser/components/build/nsModule.cpp
@@ -1341,9 +1341,9 @@
  #include "nsIEHistoryEnumerator.h"
  #endif
  
- #include "rdf.h"
  #include "nsFeedSniffer.h"
-@@ -31,18 +31,16 @@ using namespace mozilla::browser;
+ #include "AboutRedirector.h"
+@@ -30,18 +30,16 @@ using namespace mozilla::browser;
  
  /////////////////////////////////////////////////////////////////////////////
  
@@ -1362,7 +1362,7 @@
  
  NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
  
-@@ -60,17 +58,17 @@ NS_DEFINE_NAMED_CID(NS_WINIEHISTORYENUME
+@@ -59,17 +57,17 @@ NS_DEFINE_NAMED_CID(NS_WINIEHISTORYENUME
  NS_DEFINE_NAMED_CID(NS_SHELLSERVICE_CID);
  #endif
  
@@ -1384,7 +1384,7 @@
 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
 --- a/browser/components/preferences/in-content/main.js
 +++ b/browser/components/preferences/in-content/main.js
-@@ -327,16 +327,23 @@ var gMainPane = {
+@@ -321,16 +321,23 @@ var gMainPane = {
            this._backoffIndex++ : backoffTimes.length - 1]);
        };
  
@@ -1408,7 +1408,7 @@
      performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
  
      this.updateDefaultPerformanceSettingsPref();
-@@ -868,16 +875,27 @@ var gMainPane = {
+@@ -861,16 +868,27 @@ var gMainPane = {
        // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
        this._backoffIndex = 0;
  
@@ -1752,9 +1752,9 @@
 diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
 --- a/browser/installer/package-manifest.in
 +++ b/browser/installer/package-manifest.in
-@@ -452,16 +452,18 @@
- @RESPATH@/browser/defaults/blocklists
- @RESPATH@/browser/defaults/pinning
+@@ -455,16 +455,18 @@
+ @RESPATH@/browser/defaults/settings/pinning
+ @RESPATH@/browser/defaults/settings/main
  
  ; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
  ; Technically this is an app pref file, but we are keeping it in the original
--- a/mozilla-aarch64-startup-crash.patch	Thu Aug 23 16:59:04 2018 +0200
+++ b/mozilla-aarch64-startup-crash.patch	Fri Aug 24 14:17:12 2018 +0200
@@ -1,12 +1,12 @@
 # HG changeset patch
 # Parent a5cfa3aa11a9d3391df49de6fc5a0e5232c12c10
-# Parent  3005da37da3f1e2c568b1675307d10860182d214
+# Parent  07236b512cd930e3fc7a94fed549431ccaa51c90
 Bug 991344 - Rpi3: Firefox crashes after a few seconds of usage
 
 diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp
 --- a/netwerk/base/nsIOService.cpp
 +++ b/netwerk/base/nsIOService.cpp
-@@ -887,17 +887,23 @@ nsIOService::NewChannelFromURIWithProxyF
+@@ -923,17 +923,23 @@ nsIOService::NewChannelFromURIWithProxyF
                      "doesn't support nsIUploadChannel2. An extension has "
                      "supplied a non-functional http protocol handler. This will "
                      "break behavior and in future releases not work at all.");
@@ -29,4 +29,4 @@
  nsIOService::NewChannelFromURIWithProxyFlags2(nsIURI* aURI,
                                                nsIURI* aProxyURI,
                                                uint32_t aProxyFlags,
-                                               nsIDOMNode* aLoadingNode,
+                                               nsINode* aLoadingNode,
--- a/mozilla-bmo1464766.patch	Thu Aug 23 16:59:04 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-
-# HG changeset patch
-# User Mike Hommey <mh+mozilla@glandium.org>
-# Date 1527491713 -32400
-# Node ID c28becad0c10b906454d7e424f9a9402799ea8dd
-# Parent  86eaa6799cf51660c0b598937121305b8f70c84d
-Bug 1464766 - Allow to relax the addon signature requirements. r?rhelmer
-
-diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
---- a/modules/libpref/init/all.js
-+++ b/modules/libpref/init/all.js
-@@ -1134,16 +1134,19 @@ pref("print.print_via_parent", true);
- pref("print.print_via_parent", false);
- #endif
- 
- // Pref used by the spellchecker extension to control the
- // maximum number of misspelled words that will be underlined
- // in a document.
- pref("extensions.spellcheck.inline.max-misspellings", 500);
- 
-+// Add-on manager scoped allowing unsigned addons. None by default.
-+pref("extensions.unsignedScopes", 12, locked);
-+
- // Prefs used by libeditor. Prefs specific to seamonkey composer
- // belong in comm-central/editor/ui/composer.js
- 
- pref("editor.use_custom_colors", false);
- pref("editor.singleLine.pasteNewlines",      2);
- pref("editor.use_css",                       false);
- pref("editor.css.default_length_unit",       "px");
- pref("editor.resizing.preserve_ratio",       true);
-diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js
---- a/toolkit/mozapps/extensions/content/extensions.js
-+++ b/toolkit/mozapps/extensions/content/extensions.js
-@@ -42,16 +42,17 @@ XPCOMUtils.defineLazyPreferenceGetter(th
- const PREF_DISCOVERURL = "extensions.webservice.discoverURL";
- const PREF_DISCOVER_ENABLED = "extensions.getAddons.showPane";
- const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled";
- const PREF_GETADDONS_CACHE_ID_ENABLED = "extensions.%ID%.getAddons.cache.enabled";
- const PREF_UI_TYPE_HIDDEN = "extensions.ui.%TYPE%.hidden";
- const PREF_UI_LASTCATEGORY = "extensions.ui.lastCategory";
- const PREF_LEGACY_EXCEPTIONS = "extensions.legacy.exceptions";
- const PREF_LEGACY_ENABLED = "extensions.legacy.enabled";
-+const PREF_UNSIGNED_SCOPES = "extensions.unsignedScopes";
- 
- const LOADING_MSG_DELAY = 100;
- 
- const UPDATES_RECENT_TIMESPAN = 2 * 24 * 3600000; // 2 days (in milliseconds)
- const UPDATES_RELEASENOTES_TRANSFORMFILE = "chrome://mozapps/content/extensions/updateinfo.xsl";
- 
- const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/parsererror.xml";
- 
-@@ -223,19 +224,21 @@ function loadView(aViewId) {
- 
- function isCorrectlySigned(aAddon) {
-   // Add-ons without an "isCorrectlySigned" property are correctly signed as
-   // they aren't the correct type for signing.
-   return aAddon.isCorrectlySigned !== false;
- }
- 
- function isDisabledUnsigned(addon) {
--  let signingRequired = (addon.type == "locale") ?
--                        AddonSettings.LANGPACKS_REQUIRE_SIGNING :
--                        AddonSettings.REQUIRE_SIGNING;
-+  let unsignedScopes = Services.prefs.getIntPref(PREF_UNSIGNED_SCOPES, 0);
-+  let signingRequired = !(addon.scope & unsignedScopes) &&
-+                        ((addon.type == "locale") ?
-+                         AddonSettings.LANGPACKS_REQUIRE_SIGNING :
-+                         AddonSettings.REQUIRE_SIGNING);
-   return signingRequired && !isCorrectlySigned(addon);
- }
- 
- function isLegacyExtension(addon) {
-   let legacy = false;
-   if (addon.type == "extension" && !addon.isWebExtension) {
-     legacy = true;
-   }
-diff --git a/toolkit/mozapps/extensions/internal/XPIDatabase.jsm b/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
---- a/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
-+++ b/toolkit/mozapps/extensions/internal/XPIDatabase.jsm
-@@ -78,16 +78,17 @@ const KEY_PROFILEDIR                  = 
- const FILE_JSON_DB                    = "extensions.json";
- 
- // The last version of DB_SCHEMA implemented in SQLITE
- const LAST_SQLITE_DB_SCHEMA           = 14;
- 
- const PREF_BLOCKLIST_ITEM_URL         = "extensions.blocklist.itemURL";
- const PREF_DB_SCHEMA                  = "extensions.databaseSchema";
- const PREF_EM_AUTO_DISABLED_SCOPES    = "extensions.autoDisableScopes";
-+const PREF_EM_UNSIGNED_SCOPES         = "extensions.unsignedScopes";
- const PREF_EM_EXTENSION_FORMAT        = "extensions.";
- const PREF_PENDING_OPERATIONS         = "extensions.pendingOperations";
- const PREF_XPI_SIGNATURES_DEV_ROOT    = "xpinstall.signatures.dev-root";
- 
- const TOOLKIT_ID                      = "toolkit@mozilla.org";
- 
- const KEY_APP_SYSTEM_ADDONS           = "app-system-addons";
- const KEY_APP_SYSTEM_DEFAULTS         = "app-system-defaults";
-@@ -1959,17 +1960,19 @@ this.XPIDatabase = {
-    * Calculates whether an add-on should be appDisabled or not.
-    *
-    * @param {AddonInternal} aAddon
-    *        The add-on to check
-    * @returns {boolean}
-    *        True if the add-on should not be appDisabled
-    */
-   isUsableAddon(aAddon) {
--    if (this.mustSign(aAddon.type) && !aAddon.isCorrectlySigned) {
-+    let unsignedScopes = Services.prefs.getIntPref(PREF_EM_UNSIGNED_SCOPES, 0);
-+    if (!(aAddon._installLocation.scope & unsignedScopes) &&
-+        this.mustSign(aAddon.type) && !aAddon.isCorrectlySigned) {
-       logger.warn(`Add-on ${aAddon.id} is not correctly signed.`);
-       if (Services.prefs.getBoolPref(PREF_XPI_SIGNATURES_DEV_ROOT, false)) {
-         logger.warn(`Preference ${PREF_XPI_SIGNATURES_DEV_ROOT} is set.`);
-       }
-       return false;
-     }
- 
-     if (aAddon.blocklistState == nsIBlocklistService.STATE_BLOCKED) {
--- a/mozilla-kde.patch	Thu Aug 23 16:59:04 2018 +0200
+++ b/mozilla-kde.patch	Fri Aug 24 14:17:12 2018 +0200
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent  8671b358718cb8898a55fada20fc9999408daefe
+# Parent  989a507ffc5faf9a3bd950c2391a24afa9f463c8
 Description: Add KDE integration to Firefox (toolkit parts)
 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
 Author: Lubos Lunak <lunak@suse.com>
@@ -27,7 +27,7 @@
  using namespace mozilla;
  
  #ifdef DEBUG
-@@ -4201,25 +4202,37 @@ Preferences::InitInitialObjects(bool aIs
+@@ -4189,25 +4190,37 @@ Preferences::InitInitialObjects(bool aIs
    // application pref files for backwards compatibility.
    static const char* specialFiles[] = {
  #if defined(XP_MACOSX)
@@ -65,7 +65,7 @@
  
    // Load jar:$app/omni.jar!/defaults/preferences/*.js
    // or jar:$gre/omni.jar!/defaults/preferences/*.js.
-@@ -4268,17 +4281,17 @@ Preferences::InitInitialObjects(bool aIs
+@@ -4256,17 +4269,17 @@ Preferences::InitInitialObjects(bool aIs
        }
  
        nsCOMPtr<nsIFile> path = do_QueryInterface(elem);
@@ -132,7 +132,7 @@
 diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py
 --- a/python/mozbuild/mozpack/chrome/manifest.py
 +++ b/python/mozbuild/mozpack/chrome/manifest.py
-@@ -34,16 +34,17 @@ class ManifestEntry(object):
+@@ -39,16 +39,17 @@ class ManifestEntry(object):
          'platformversion',
          'os',
          'osversion',
@@ -171,7 +171,7 @@
 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
 --- a/toolkit/content/jar.mn
 +++ b/toolkit/content/jar.mn
-@@ -68,16 +68,18 @@ toolkit.jar:
+@@ -69,16 +69,18 @@ toolkit.jar:
     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
     content/global/bindings/colorpicker.xml     (widgets/colorpicker.xml)
     content/global/bindings/datekeeper.js       (widgets/datekeeper.js)
@@ -848,7 +848,7 @@
 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
 --- a/toolkit/xre/moz.build
 +++ b/toolkit/xre/moz.build
-@@ -65,17 +65,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
+@@ -71,17 +71,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
          '../components/printingui',
      ]
  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
@@ -1291,7 +1291,7 @@
  using mozilla::dom::RemoteHandlerApp;
  
  namespace {
-@@ -264,17 +264,17 @@ HandlerServiceParent::RecvExists(const H
+@@ -265,17 +265,17 @@ HandlerServiceParent::RecvExists(const H
  }
  
  mozilla::ipc::IPCResult
@@ -2166,7 +2166,7 @@
    const char* directive;
    int argc;
  
-@@ -441,16 +442,17 @@ ParseManifest(NSLocationType aType, File
+@@ -437,16 +438,17 @@ ParseManifest(NSLocationType aType, File
    NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled");
    NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired");
    NS_NAMED_LITERAL_STRING(kApplication, "application");
@@ -2184,7 +2184,7 @@
    NS_NAMED_LITERAL_STRING(kMain, "main");
    NS_NAMED_LITERAL_STRING(kContent, "content");
  
-@@ -496,44 +498,49 @@ ParseManifest(NSLocationType aType, File
+@@ -492,44 +494,49 @@ ParseManifest(NSLocationType aType, File
          CopyUTF8toUTF16(s, abi);
          abi.Insert(char16_t('_'), 0);
          abi.Insert(osTarget, 0);
@@ -2234,7 +2234,7 @@
      process = kMain;
    }
  
-@@ -635,25 +642,27 @@ ParseManifest(NSLocationType aType, File
+@@ -631,25 +638,27 @@ ParseManifest(NSLocationType aType, File
      TriState stOsVersion = eUnspecified;
      TriState stOs = eUnspecified;
      TriState stABI = eUnspecified;
@@ -2262,7 +2262,7 @@
        }
  
  #if defined(MOZ_WIDGET_ANDROID)
-@@ -698,16 +707,17 @@ ParseManifest(NSLocationType aType, File
+@@ -694,16 +703,17 @@ ParseManifest(NSLocationType aType, File
      }
  
      if (!ok ||
@@ -2300,7 +2300,7 @@
 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
 --- a/xpcom/io/nsLocalFileUnix.cpp
 +++ b/xpcom/io/nsLocalFileUnix.cpp
-@@ -46,16 +46,17 @@
+@@ -47,16 +47,17 @@
  #include "prproces.h"
  #include "nsIDirectoryEnumerator.h"
  #include "nsISimpleEnumerator.h"
@@ -2318,14 +2318,14 @@
  #include "prmem.h"
  #include "plbase64.h"
  
-@@ -1955,59 +1956,74 @@ nsLocalFile::SetPersistentDescriptor(con
-   return InitWithNativePath(aPersistentDescriptor);
- #endif
- }
- 
+@@ -1999,63 +2000,78 @@ nsLocalFile::SetPersistentDescriptor(con
  NS_IMETHODIMP
  nsLocalFile::Reveal()
  {
+   if (!FilePreferences::IsAllowedPath(mPath)) {
+     return NS_ERROR_FILE_ACCESS_DENIED;
+   }
+ 
  #ifdef MOZ_WIDGET_GTK
 -  nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
 -  if (!giovfs) {
@@ -2384,6 +2384,10 @@
  NS_IMETHODIMP
  nsLocalFile::Launch()
  {
+   if (!FilePreferences::IsAllowedPath(mPath)) {
+     return NS_ERROR_FILE_ACCESS_DENIED;
+   }
+ 
  #ifdef MOZ_WIDGET_GTK
 +  if( nsKDEUtils::kdeSupport()) {
 +    nsTArray<nsCString> command;
--- a/series	Thu Aug 23 16:59:04 2018 +0200
+++ b/series	Fri Aug 24 14:17:12 2018 +0200
@@ -8,7 +8,6 @@
 mozilla-aarch64-startup-crash.patch
 mozilla-bmo256180.patch
 mozilla-no-return.patch
-mozilla-bmo1464766.patch
 
 # Firefox patches
 firefox-kde.patch