rebased patches; updated spec file
authorWolfgang Rosenauer <wr@rosenauer.org>
Thu, 11 Jan 2018 10:37:42 +0100
changeset 1020 d2c159cb9bf2
parent 1019 b0c883afdffa
child 1021 1307721d2345
rebased patches; updated spec file
MozillaFirefox/MozillaFirefox.changes
MozillaFirefox/MozillaFirefox.spec
firefox-kde.patch
mozilla-kde.patch
--- a/MozillaFirefox/MozillaFirefox.changes	Wed Jan 10 22:40:39 2018 +0100
+++ b/MozillaFirefox/MozillaFirefox.changes	Thu Jan 11 10:37:42 2018 +0100
@@ -9,6 +9,7 @@
   mozilla-bmo1360278.patch
   mozilla-bmo1399611-csd.patch
   mozilla-rust-1.23.patch
+- rebased patches
 
 -------------------------------------------------------------------
 Tue Jan  9 18:48:02 UTC 2018 - wr@rosenauer.org
--- a/MozillaFirefox/MozillaFirefox.spec	Wed Jan 10 22:40:39 2018 +0100
+++ b/MozillaFirefox/MozillaFirefox.spec	Thu Jan 11 10:37:42 2018 +0100
@@ -153,10 +153,6 @@
 Patch5:         mozilla-no-stdcxx-check.patch
 Patch6:         mozilla-reduce-files-per-UnifiedBindings.patch
 Patch7:         mozilla-aarch64-startup-crash.patch
-Patch8:         mozilla-bindgen-systemlibs.patch
-Patch9:         mozilla-bmo1360278.patch
-Patch10:        mozilla-bmo1399611-csd.patch
-Patch11:        mozilla-rust-1.23.patch
 # Firefox/browser
 Patch101:       firefox-kde.patch
 Patch102:       firefox-no-default-ualocale.patch
@@ -267,10 +263,6 @@
 %patch6 -p1
 %endif
 %patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
 # Firefox
 %patch101 -p1
 %patch102 -p1
--- a/firefox-kde.patch	Wed Jan 10 22:40:39 2018 +0100
+++ b/firefox-kde.patch	Thu Jan 11 10:37:42 2018 +0100
@@ -1,11 +1,11 @@
 # HG changeset patch
-# Parent  9f19902f8bcde21fa63172a85818fb11714878d8
+# Parent  671a03875b1bfe82edbebfde64654ea3ffc98e34
 
 diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
 new file mode 100644
 --- /dev/null
 +++ b/browser/base/content/browser-kde.xul
-@@ -0,0 +1,1252 @@
+@@ -0,0 +1,1248 @@
 +#filter substitution
 +<?xml version="1.0"?>
 +# -*- Mode: HTML -*-
@@ -104,12 +104,6 @@
 +                accesskey="&moveToNewWindow.accesskey;"
 +                tbattr="tabbrowser-multiple"
 +                oncommand="gBrowser.replaceTabWithWindow(TabContextMenu.contextTab);"/>
-+#ifdef E10S_TESTING_ONLY
-+      <menuitem id="context_openNonRemoteWindow" label="Open in new non-e10s window"
-+                tbattr="tabbrowser-remote"
-+                hidden="true"
-+                oncommand="gBrowser.openNonRemoteWindow(TabContextMenu.contextTab);"/>
-+#endif
 +      <menuseparator id="context_sendTabToDevice_separator"/>
 +      <menu id="context_sendTabToDevice" label="&sendTabToDevice.label;"
 +            accesskey="&sendTabToDevice.accesskey;">
@@ -435,8 +429,7 @@
 +                            mainViewId="pageActionPanelMainView"
 +                            viewCacheId="appMenu-viewCache">
 +        <panelview id="pageActionPanelMainView"
-+                   context="pageActionPanelContextMenu"
-+                   oncontextmenu="BrowserPageActions.onContextMenu(event);"
++                   context="pageActionContextMenu"
 +                   class="PanelUI-subView">
 +          <vbox class="panel-subview-body"/>
 +        </panelview>
@@ -458,13 +451,24 @@
 +      <label id="pageActionFeedbackMessage"/>
 +    </panel>
 +
-+    <menupopup id="pageActionPanelContextMenu"
++    <menupopup id="pageActionContextMenu"
 +               onpopupshowing="BrowserPageActions.onContextMenuShowing(event, this);">
-+      <menuitem id="pageActionPanelContextMenu-toggleUrlbar"
-+                add-label="&pageAction.addToUrlbar.label;"
-+                remove-label="&pageAction.removeFromUrlbar.label;"
++      <menuitem class="pageActionContextMenuItem builtInUnpinned"
 +                label="&pageAction.addToUrlbar.label;"
-+                oncommand="BrowserPageActions.toggleShownInUrlbarForContextAction();"/>
++                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
++      <menuitem class="pageActionContextMenuItem builtInPinned"
++                label="&pageAction.removeFromUrlbar.label;"
++                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
++      <menuitem class="pageActionContextMenuItem extensionUnpinned"
++                label="&pageAction.allowInUrlbar.label;"
++                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
++      <menuitem class="pageActionContextMenuItem extensionPinned"
++                label="&pageAction.disallowInUrlbar.label;"
++                oncommand="BrowserPageActions.togglePinningForContextAction();"/>
++      <menuseparator class="pageActionContextMenuItem extensionPinned extensionUnpinned"/>
++      <menuitem class="pageActionContextMenuItem extensionPinned extensionUnpinned"
++                label="&pageAction.manageExtension.label;"
++                oncommand="BrowserPageActions.openAboutAddonsForContextAction();"/>
 +    </menupopup>
 +
 +    <!-- Bookmarks and history tooltip -->
@@ -642,7 +646,6 @@
 +#endif
 +
 +      <tabs id="tabbrowser-tabs"
-+            class="tabbrowser-tabs"
 +            tabbrowser="content"
 +            flex="1"
 +            setfocus="false"
@@ -787,7 +790,6 @@
 +                     tabscrolling="true"
 +                     showcommentcolumn="true"
 +                     showimagecolumn="true"
-+                     enablehistory="true"
 +                     newlines="stripsurroundingwhitespace"
 +                     ontextentered="this.handleCommand(param);"
 +                     ontextreverted="return this.handleRevert();"
@@ -812,14 +814,14 @@
 +                         tooltiptext="&urlbar.webNotificationsBlocked.tooltip;"/>
 +                  <image data-permission-id="camera" class="blocked-permission-icon camera-icon" role="button"
 +                         tooltiptext="&urlbar.cameraBlocked.tooltip;"/>
-+                  <image data-permission-id="indexedDB" class="blocked-permission-icon indexedDB-icon" role="button"
-+                         tooltiptext="&urlbar.indexedDBBlocked.tooltip;"/>
 +                  <image data-permission-id="microphone" class="blocked-permission-icon microphone-icon" role="button"
 +                         tooltiptext="&urlbar.microphoneBlocked.tooltip;"/>
 +                  <image data-permission-id="screen" class="blocked-permission-icon screen-icon" role="button"
 +                         tooltiptext="&urlbar.screenBlocked.tooltip;"/>
 +                  <image data-permission-id="persistent-storage" class="blocked-permission-icon persistent-storage-icon" role="button"
 +                         tooltiptext="&urlbar.persistentStorageBlocked.tooltip;"/>
++                  <image data-permission-id="popup" class="blocked-permission-icon popup-icon" role="button"
++                         tooltiptext="&urlbar.popupBlocked.tooltip;"/>
 +                </box>
 +                <box id="notification-popup-box"
 +                     hidden="true"
@@ -832,6 +834,8 @@
 +                         tooltiptext="&urlbar.geolocationNotificationAnchor.tooltip;"/>
 +                  <image id="addons-notification-icon" class="notification-anchor-icon install-icon" role="button"
 +                         tooltiptext="&urlbar.addonsNotificationAnchor.tooltip;"/>
++                  <image id="canvas-notification-icon" class="notification-anchor-icon" role="button"
++                         tooltiptext="&urlbar.canvasNotificationAnchor.tooltip;"/>
 +                  <image id="indexedDB-notification-icon" class="notification-anchor-icon indexedDB-icon" role="button"
 +                         tooltiptext="&urlbar.indexedDBNotificationAnchor.tooltip;"/>
 +                  <image id="password-notification-icon" class="notification-anchor-icon login-icon" role="button"
@@ -873,17 +877,11 @@
 +                <label id="switchtab" class="urlbar-display urlbar-display-switchtab" value="&urlbar.switchToTab.label;"/>
 +                <label id="extension" class="urlbar-display urlbar-display-extension" value="&urlbar.extension.label;"/>
 +              </box>
-+              <hbox id="page-action-buttons">
++              <hbox id="page-action-buttons" context="pageActionContextMenu">
 +                <hbox id="userContext-icons" hidden="true">
 +                  <label id="userContext-label"/>
 +                  <image id="userContext-indicator"/>
 +                </hbox>
-+                <image id="page-report-button"
-+                       class="urlbar-icon urlbar-page-action"
-+                       role="button"
-+                       hidden="true"
-+                       tooltiptext="&pageReportIcon.tooltip;"
-+                       onmousedown="gPopupBlockerObserver.onReportButtonMousedown(event);"/>
 +                <image id="reader-mode-button"
 +                       class="urlbar-icon urlbar-page-action"
 +                       role="button"
@@ -902,8 +900,6 @@
 +                <hbox id="star-button-box"
 +                      hidden="true"
 +                      class="urlbar-icon-wrapper urlbar-page-action"
-+                      context="pageActionPanelContextMenu"
-+                      oncontextmenu="BrowserPageActions.onContextMenu(event);"
 +                      onclick="BrowserPageActions.doCommandForAction(PageActions.actionForID('bookmark'), event, this);">
 +                  <image id="star-button"
 +                         class="urlbar-icon"
@@ -1261,7 +1257,7 @@
 diff --git a/browser/base/jar.mn b/browser/base/jar.mn
 --- a/browser/base/jar.mn
 +++ b/browser/base/jar.mn
-@@ -58,16 +58,18 @@ browser.jar:
+@@ -52,16 +52,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)
@@ -1343,7 +1339,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
-@@ -203,16 +203,23 @@ var gMainPane = {
+@@ -193,16 +193,23 @@ var gMainPane = {
            this._backoffIndex++ : backoffTimes.length - 1]);
        };
  
@@ -1367,7 +1363,7 @@
      performanceSettingsLink.setAttribute("href", performanceSettingsUrl);
  
      this.updateDefaultPerformanceSettingsPref();
-@@ -952,16 +959,27 @@ var gMainPane = {
+@@ -898,16 +905,27 @@ var gMainPane = {
        // Reset exponential backoff delay time in order to do visual update in pollForDefaultBrowser.
        this._backoffIndex = 0;
  
@@ -1711,7 +1707,7 @@
 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
-@@ -666,16 +666,18 @@
+@@ -657,16 +657,18 @@
  @RESPATH@/browser/defaults/blocklists
  @RESPATH@/browser/defaults/pinning
  
--- a/mozilla-kde.patch	Wed Jan 10 22:40:39 2018 +0100
+++ b/mozilla-kde.patch	Thu Jan 11 10:37:42 2018 +0100
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent  2504512f9a9ba7b52dd99745d15f049f2a03f4f4
+# Parent  5be2231eadfb6de978e93c0ba95469e8a4d54cb0
 Description: Add KDE integration to Firefox (toolkit parts)
 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
 Author: Lubos Lunak <lunak@suse.com>
@@ -9,32 +9,32 @@
 diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
 --- a/modules/libpref/Preferences.cpp
 +++ b/modules/libpref/Preferences.cpp
-@@ -37,16 +37,17 @@
- #include "nsIZipReader.h"
- #include "nsPrefBranch.h"
- #include "nsString.h"
- #include "nsCRT.h"
- #include "nsCOMArray.h"
+@@ -75,16 +75,17 @@
  #include "nsXPCOMCID.h"
- #include "nsAutoPtr.h"
- #include "nsPrintfCString.h"
+ #include "nsXPCOM.h"
+ #include "nsXULAppAPI.h"
+ #include "nsZipArchive.h"
+ #include "plbase64.h"
+ #include "PLDHashTable.h"
+ #include "plstr.h"
+ #include "prlink.h"
 +#include "nsKDEUtils.h"
  
- #include "nsQuickSort.h"
- #include "PLDHashTable.h"
+ #ifdef MOZ_CRASHREPORTER
+ #include "nsICrashReporter.h"
+ #endif
  
- #include "prefapi.h"
- #include "prefread.h"
- #include "prefapi_private_data.h"
- 
-@@ -1413,16 +1414,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
- 
- static nsresult pref_LoadPrefsInDirList(const char *listId)
+ #ifdef XP_WIN
+ #include "windows.h"
+ #endif
+@@ -4324,16 +4325,34 @@ pref_LoadPrefsInDirList(const char* aLis
  {
    nsresult rv;
-   nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
-   if (NS_FAILED(rv))
+   nsCOMPtr<nsIProperties> dirSvc(
+     do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
+   if (NS_FAILED(rv)) {
      return rv;
+   }
  
 +  // make sure we load these special files after all the others
 +  static const char* specialFiles[] = {
@@ -55,34 +55,34 @@
 +  }
 +
    nsCOMPtr<nsISimpleEnumerator> list;
-   dirSvc->Get(listId,
-               NS_GET_IID(nsISimpleEnumerator),
-               getter_AddRefs(list));
-   if (!list)
+   dirSvc->Get(aListId, NS_GET_IID(nsISimpleEnumerator), getter_AddRefs(list));
+   if (!list) {
      return NS_OK;
+   }
  
    bool hasMore;
-@@ -1438,17 +1457,17 @@ static nsresult pref_LoadPrefsInDirList(
+   while (NS_SUCCEEDED(list->HasMoreElements(&hasMore)) && hasMore) {
+@@ -4344,17 +4363,17 @@ pref_LoadPrefsInDirList(const char* aLis
+     }
  
-     nsAutoCString leaf;
-     path->GetNativeLeafName(leaf);
+     nsCOMPtr<nsIFile> path = do_QueryInterface(elem);
+     if (!path) {
+       continue;
+     }
  
      // Do we care if a file provided by this process fails to load?
-     if (Substring(leaf, leaf.Length() - 4).EqualsLiteral(".xpi"))
-       ReadExtensionPrefs(path);
-     else
--      pref_LoadPrefsInDir(path, nullptr, 0);
-+      pref_LoadPrefsInDir(path, specialFiles, MOZ_ARRAY_LENGTH(specialFiles));
+-    pref_LoadPrefsInDir(path, nullptr, 0);
++    pref_LoadPrefsInDir(path, specialFiles, nullptr, 0);
    }
+ 
    return NS_OK;
  }
  
- static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
+ static nsresult
+ pref_ReadPrefFromJar(nsZipArchive* aJarReader, const char* aName)
  {
-   nsCString manifest;
-   MOZ_TRY_VAR(manifest, URLPreloader::ReadZip(jarReader, nsDependentCString(name)));
-@@ -1544,24 +1563,36 @@ pref_InitInitialObjects()
-   /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
+@@ -4461,25 +4480,37 @@ pref_InitInitialObjects()
+   // application pref files for backwards compatibility.
    static const char* specialFiles[] = {
  #if defined(XP_MACOSX)
      "macprefs.js"
@@ -92,7 +92,8 @@
      "unix.js"
 +    , "" // placeholder for KDE  (empty is otherwise harmless)
  #if defined(_AIX)
-     , "aix.js"
+     ,
+     "aix.js"
  #endif
  #elif defined(XP_BEOS)
      "beos.js"
@@ -110,24 +111,24 @@
 +    }
 +  }
 +
-   rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, ArrayLength(specialFiles));
-   if (NS_FAILED(rv))
+   rv = pref_LoadPrefsInDir(
+     defaultPrefDir, specialFiles, ArrayLength(specialFiles));
+   if (NS_FAILED(rv)) {
      NS_WARNING("Error parsing application default preferences.");
+   }
  
    // Load jar:$app/omni.jar!/defaults/preferences/*.js
    // or jar:$gre/omni.jar!/defaults/preferences/*.js.
-   RefPtr<nsZipArchive> appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP);
-   // GetReader(mozilla::Omnijar::APP) returns null when $app == $gre, in which
 diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
 --- a/modules/libpref/moz.build
 +++ b/modules/libpref/moz.build
-@@ -31,16 +31,20 @@ EXPORTS.mozilla += [
+@@ -27,16 +27,20 @@ XPIDL_MODULE = 'pref'
+ EXPORTS.mozilla += [
+     'Preferences.h',
+ ]
+ 
  UNIFIED_SOURCES += [
-     'nsPrefBranch.cpp',
-     'nsPrefsFactory.cpp',
-     'prefapi.cpp',
      'Preferences.cpp',
-     'prefread.cpp',
  ]
  
 +LOCAL_INCLUDES += [
@@ -187,24 +188,20 @@
 diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
 --- a/toolkit/components/downloads/moz.build
 +++ b/toolkit/components/downloads/moz.build
-@@ -37,16 +37,17 @@ UNIFIED_SOURCES += [
+@@ -17,9 +17,13 @@ XPIDL_SOURCES += [
+ XPIDL_MODULE = 'downloads'
+ 
+ UNIFIED_SOURCES += [
      'nsDownloadManager.cpp'
  ]
  
  FINAL_LIBRARY = 'xul'
  
- LOCAL_INCLUDES += [
-     '../protobuf',
-     '/ipc/chromium/src',
-+    '/toolkit/xre',
-     'chromium'
- ]
- 
- DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
- DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
- 
++LOCAL_INCLUDES += [
++    '/toolkit/xre'
++]
++
  CXXFLAGS += CONFIG['TK_CFLAGS']
- 
 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
 --- a/toolkit/content/jar.mn
 +++ b/toolkit/content/jar.mn
@@ -246,7 +243,7 @@
 new file mode 100644
 --- /dev/null
 +++ b/toolkit/content/widgets/dialog-kde.xml
-@@ -0,0 +1,455 @@
+@@ -0,0 +1,459 @@
 +<?xml version="1.0"?>
 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -434,8 +431,12 @@
 +                       focusedElt.getAttribute("noinitialfocus") == "true") {
 +                  document.commandDispatcher.advanceFocusIntoSubtree(focusedElt);
 +                  focusedElt = document.commandDispatcher.focusedElement;
-+                  if (focusedElt == initialFocusedElt)
++                  if (focusedElt == initialFocusedElt) {
++                    if (focusedElt.getAttribute("noinitialfocus") == "true") {
++                      focusedElt.blur();
++                    }
 +                    break;
++                  }
 +                }
 +
 +                if (initialFocusedElt.localName == "tab") {
@@ -2119,7 +2120,7 @@
 diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js
 --- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
 +++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
-@@ -628,17 +628,17 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -626,17 +626,17 @@ nsUnknownContentTypeDialog.prototype = {
        else
          typeString = mimeInfo.MIMEType;
      }
@@ -2138,7 +2139,7 @@
    },
  
    // Returns true if opening the default application makes sense.
-@@ -802,17 +802,17 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -800,17 +800,17 @@ nsUnknownContentTypeDialog.prototype = {
        switch (this.dialogElement("openHandler").selectedIndex) {
        case 0:
          // No app need be specified in this case.
@@ -2157,7 +2158,7 @@
      this.mDialog.document.documentElement.getButton("accept").disabled = !ok;
    },
  
-@@ -1067,30 +1067,57 @@ nsUnknownContentTypeDialog.prototype = {
+@@ -1065,30 +1065,57 @@ nsUnknownContentTypeDialog.prototype = {
  
        if (params.handlerApp &&
            params.handlerApp.executable &&
@@ -2770,11 +2771,11 @@
          'android/nsExternalSharingAppService.cpp',
          'android/nsExternalURLHandlerService.cpp',
          'android/nsMIMEInfoAndroid.cpp',
-@@ -125,16 +127,17 @@ include('/ipc/chromium/chromium-config.m
- 
+@@ -129,16 +131,17 @@ include('/ipc/chromium/chromium-config.m
  FINAL_LIBRARY = 'xul'
  
  LOCAL_INCLUDES += [
+     '/docshell/base',
      '/dom/base',
      '/dom/ipc',
      '/netwerk/base',
@@ -3109,11 +3110,11 @@
 diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
 --- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
 +++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
-@@ -10,17 +10,17 @@
- #if defined(MOZ_ENABLE_CONTENTACTION)
- #include <contentaction/contentaction.h>
- #include <QString>
- #endif
+@@ -5,17 +5,17 @@
+  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ 
+ #include <sys/types.h>
+ #include <sys/stat.h>
  
  #include "nsOSHelperAppService.h"
  #include "nsMIMEInfoUnix.h"
@@ -3128,20 +3129,29 @@
  #include "nsIURL.h"
  #include "nsIFileStreams.h"
  #include "nsILineInputStream.h"
-@@ -1142,26 +1142,26 @@ nsresult nsOSHelperAppService::OSProtoco
-     ContentAction::Action::defaultActionForScheme(QString(aProtocolScheme) + ':');
+@@ -1128,17 +1128,17 @@ nsOSHelperAppService::GetHandlerAndDescr
  
-   if (action.isValid())
-     *aHandlerExists = true;
- #endif
+ nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolScheme, bool * aHandlerExists)
+ {
+   nsresult rv = NS_OK;
  
+   if (!XRE_IsContentProcess()) {
  #ifdef MOZ_WIDGET_GTK
-   // Check the GNOME registry for a protocol handler
--  *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme);
-+  *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme);
+     // Check the GNOME registry for a protocol handler
+-    *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme);
++    *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme);
+ #else
+     *aHandlerExists = false;
  #endif
+   } else {
+     *aHandlerExists = false;
+     nsCOMPtr<nsIHandlerService> handlerSvc = do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv);
+     if (NS_SUCCEEDED(rv) && handlerSvc) {
+       rv = handlerSvc->ExistsForProtocol(nsCString(aProtocolScheme), aHandlerExists);
+@@ -1146,17 +1146,17 @@ nsresult nsOSHelperAppService::OSProtoco
+   }
  
-   return NS_OK;
+   return rv;
  }
  
  NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(const nsACString& aScheme, nsAString& _retval)
@@ -3157,7 +3167,7 @@
  
  nsresult nsOSHelperAppService::GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile)
  {
-@@ -1248,17 +1248,17 @@ nsOSHelperAppService::GetFromExtension(c
+@@ -1243,17 +1243,17 @@ nsOSHelperAppService::GetFromExtension(c
                                           mime_types_description,
                                           true);
  
@@ -3176,7 +3186,7 @@
  
      rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt),
                                    majorType,
-@@ -1369,17 +1369,17 @@ nsOSHelperAppService::GetFromType(const 
+@@ -1364,17 +1364,17 @@ nsOSHelperAppService::GetFromType(const 
    nsAutoString extensions, mime_types_description;
    LookUpExtensionsAndDescription(majorType,
                                   minorType,