mozilla-kde.patch
changeset 1074 4b99400f6d17
parent 1067 735b140fb042
child 1082 821cfbe8efcc
equal deleted inserted replaced
1073:63a32fb3b602 1074:4b99400f6d17
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent  989a507ffc5faf9a3bd950c2391a24afa9f463c8
     2 # Parent  06a62125ffbb15e88dacb486169d8e6a9595bd78
     3 Description: Add KDE integration to Firefox (toolkit parts)
     3 Description: Add KDE integration to Firefox (toolkit parts)
     4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
     4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
     5 Author: Lubos Lunak <lunak@suse.com>
     5 Author: Lubos Lunak <lunak@suse.com>
     6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
     6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
     7      https://bugzilla.novell.com/show_bug.cgi?id=170055
     7      https://bugzilla.novell.com/show_bug.cgi?id=170055
     8 
     8 
     9 diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
     9 diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
    10 --- a/modules/libpref/Preferences.cpp
    10 --- a/modules/libpref/Preferences.cpp
    11 +++ b/modules/libpref/Preferences.cpp
    11 +++ b/modules/libpref/Preferences.cpp
    12 @@ -77,16 +77,17 @@
    12 @@ -80,16 +80,17 @@
    13  #include "nsXPCOMCID.h"
    13  #include "nsXPCOMCID.h"
    14  #include "nsXPCOM.h"
    14  #include "nsXPCOM.h"
    15  #include "nsXULAppAPI.h"
    15  #include "nsXULAppAPI.h"
    16  #include "nsZipArchive.h"
    16  #include "nsZipArchive.h"
    17  #include "plbase64.h"
    17  #include "plbase64.h"
    18  #include "PLDHashTable.h"
    18  #include "PLDHashTable.h"
    19  #include "plstr.h"
    19  #include "plstr.h"
    20  #include "prlink.h"
    20  #include "prlink.h"
    21 +#include "nsKDEUtils.h"
    21 +#include "nsKDEUtils.h"
    22  
    22  
       
    23  #ifdef MOZ_MEMORY
       
    24  #include "mozmemory.h"
       
    25  #endif
       
    26  
    23  #ifdef XP_WIN
    27  #ifdef XP_WIN
    24  #include "windows.h"
    28  #include "windows.h"
    25  #endif
    29  #endif
    26  
    30 @@ -4932,25 +4933,37 @@ Preferences::InitInitialObjects(bool aIs
    27  using namespace mozilla;
       
    28  
       
    29  #ifdef DEBUG
       
    30 @@ -4189,25 +4190,37 @@ Preferences::InitInitialObjects(bool aIs
       
    31    // application pref files for backwards compatibility.
    31    // application pref files for backwards compatibility.
    32    static const char* specialFiles[] = {
    32    static const char* specialFiles[] = {
    33  #if defined(XP_MACOSX)
    33  #if defined(XP_MACOSX)
    34      "macprefs.js"
    34      "macprefs.js"
    35  #elif defined(XP_WIN)
    35  #elif defined(XP_WIN)
    63      NS_WARNING("Error parsing application default preferences.");
    63      NS_WARNING("Error parsing application default preferences.");
    64    }
    64    }
    65  
    65  
    66    // Load jar:$app/omni.jar!/defaults/preferences/*.js
    66    // Load jar:$app/omni.jar!/defaults/preferences/*.js
    67    // or jar:$gre/omni.jar!/defaults/preferences/*.js.
    67    // or jar:$gre/omni.jar!/defaults/preferences/*.js.
    68 @@ -4256,17 +4269,17 @@ Preferences::InitInitialObjects(bool aIs
    68 @@ -4999,17 +5012,17 @@ Preferences::InitInitialObjects(bool aIs
    69        }
    69        }
    70  
    70  
    71        nsCOMPtr<nsIFile> path = do_QueryInterface(elem);
    71        nsCOMPtr<nsIFile> path = do_QueryInterface(elem);
    72        if (!path) {
    72        if (!path) {
    73          continue;
    73          continue;
    85  
    85  
    86    NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID,
    86    NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID,
    87 diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
    87 diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
    88 --- a/modules/libpref/moz.build
    88 --- a/modules/libpref/moz.build
    89 +++ b/modules/libpref/moz.build
    89 +++ b/modules/libpref/moz.build
    90 @@ -29,16 +29,20 @@ EXPORTS.mozilla += [
    90 @@ -31,16 +31,20 @@ EXPORTS.mozilla += [
    91      'Preferences.h',
       
    92      'StaticPrefs.h',
    91      'StaticPrefs.h',
    93  ]
    92  ]
    94  
    93  
    95  UNIFIED_SOURCES += [
    94  UNIFIED_SOURCES += [
    96      'Preferences.cpp',
    95      'Preferences.cpp',
       
    96      'SharedPrefMap.cpp',
    97  ]
    97  ]
    98  
    98  
    99 +LOCAL_INCLUDES += [
    99 +LOCAL_INCLUDES += [
   100 +     '/toolkit/xre'
   100 +     '/toolkit/xre'
   101 +]
   101 +]
   165 +LOCAL_INCLUDES += [
   165 +LOCAL_INCLUDES += [
   166 +    '/toolkit/xre'
   166 +    '/toolkit/xre'
   167 +]
   167 +]
   168 +
   168 +
   169  with Files('**'):
   169  with Files('**'):
   170      BUG_COMPONENT = ('Toolkit', 'Download Manager')
   170      BUG_COMPONENT = ('Toolkit', 'Downloads API')
   171 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
   171 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
   172 --- a/toolkit/content/jar.mn
   172 --- a/toolkit/content/jar.mn
   173 +++ b/toolkit/content/jar.mn
   173 +++ b/toolkit/content/jar.mn
   174 @@ -69,16 +69,18 @@ toolkit.jar:
   174 @@ -70,16 +70,18 @@ toolkit.jar:
   175     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
   175     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
   176     content/global/bindings/colorpicker.xml     (widgets/colorpicker.xml)
   176     content/global/bindings/colorpicker.xml     (widgets/colorpicker.xml)
   177     content/global/bindings/datekeeper.js       (widgets/datekeeper.js)
   177     content/global/bindings/datekeeper.js       (widgets/datekeeper.js)
   178     content/global/bindings/datepicker.js       (widgets/datepicker.js)
   178     content/global/bindings/datepicker.js       (widgets/datepicker.js)
   179     content/global/bindings/datetimepopup.xml   (widgets/datetimepopup.xml)
   179     content/global/bindings/datetimepopup.xml   (widgets/datetimepopup.xml)
   180     content/global/bindings/datetimebox.xml     (widgets/datetimebox.xml)
   180     content/global/bindings/datetimebox.xml     (widgets/datetimebox.xml)
   181     content/global/bindings/datetimebox.css     (widgets/datetimebox.css)
   181     content/global/bindings/datetimebox.css     (widgets/datetimebox.css)
   182  *  content/global/bindings/dialog.xml          (widgets/dialog.xml)
   182  *  content/global/bindings/dialog.xml          (widgets/dialog.xml)
   183 +*  content/global/bindings/dialog-kde.xml      (widgets/dialog-kde.xml)
   183 +*  content/global/bindings/dialog-kde.xml      (widgets/dialog-kde.xml)
   184 +% override chrome://global/content/bindings/dialog.xml chrome://global/content/bindings/dialog-kde.xml desktop=kde
   184 +% override chrome://global/content/bindings/dialog.xml chrome://global/content/bindings/dialog-kde.xml desktop=kde
   185     content/global/bindings/editor.xml          (widgets/editor.xml)
       
   186  *  content/global/bindings/findbar.xml         (widgets/findbar.xml)
   185  *  content/global/bindings/findbar.xml         (widgets/findbar.xml)
   187     content/global/bindings/general.xml         (widgets/general.xml)
   186     content/global/bindings/general.xml         (widgets/general.xml)
   188     content/global/bindings/groupbox.xml        (widgets/groupbox.xml)
   187     content/global/bindings/groupbox.xml        (widgets/groupbox.xml)
   189     content/global/bindings/listbox.xml         (widgets/listbox.xml)
       
   190     content/global/bindings/menu.xml            (widgets/menu.xml)
   188     content/global/bindings/menu.xml            (widgets/menu.xml)
   191     content/global/bindings/menulist.xml        (widgets/menulist.xml)
   189     content/global/bindings/menulist.xml        (widgets/menulist.xml)
   192     content/global/bindings/notification.xml    (widgets/notification.xml)
   190     content/global/bindings/notification.xml    (widgets/notification.xml)
       
   191     content/global/bindings/numberbox.xml       (widgets/numberbox.xml)
       
   192     content/global/bindings/popup.xml           (widgets/popup.xml)
   193 diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml
   193 diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml
   194 new file mode 100644
   194 new file mode 100644
   195 --- /dev/null
   195 --- /dev/null
   196 +++ b/toolkit/content/widgets/dialog-kde.xml
   196 +++ b/toolkit/content/widgets/dialog-kde.xml
   197 @@ -0,0 +1,478 @@
   197 @@ -0,0 +1,475 @@
   198 +<?xml version="1.0"?>
   198 +<?xml version="1.0"?>
   199 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
   199 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
   200 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
   200 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
   201 +   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
   201 +   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
   202 +
   202 +
   209 +          xmlns="http://www.mozilla.org/xbl"
   209 +          xmlns="http://www.mozilla.org/xbl"
   210 +          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   210 +          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   211 +          xmlns:xbl="http://www.mozilla.org/xbl">
   211 +          xmlns:xbl="http://www.mozilla.org/xbl">
   212 +
   212 +
   213 +  <binding id="dialog">
   213 +  <binding id="dialog">
   214 +    <resources>
       
   215 +      <stylesheet src="chrome://global/skin/dialog.css"/>
       
   216 +    </resources>
       
   217 +    <content>
   214 +    <content>
   218 +      <xul:vbox class="box-inherit dialog-content-box" flex="1">
   215 +      <xul:vbox class="box-inherit dialog-content-box" flex="1">
   219 +        <children/>
   216 +        <children/>
   220 +      </xul:vbox>
   217 +      </xul:vbox>
   221 +
   218 +
   230 +        <xul:spacer anonid="spacer" flex="1"/>
   227 +        <xul:spacer anonid="spacer" flex="1"/>
   231 +        <xul:button dlgtype="cancel" class="dialog-button"/>
   228 +        <xul:button dlgtype="cancel" class="dialog-button"/>
   232 +        <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
   229 +        <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
   233 +#elif XP_UNIX
   230 +#elif XP_UNIX
   234 +                >
   231 +                >
   235 +        <xul:button dlgtype="help" class="dialog-button" hidden="true"/>
   232 +	<xul:button dlgtype="help" class="dialog-button" hidden="true"/>
   236 +        <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
   233 +        <xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
   237 +        <xul:spacer anonid="spacer" flex="1"/>
   234 +        <xul:spacer anonid="spacer" flex="1"/>
   238 +        <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
   235 +        <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
   239 +        <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
   236 +        <xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
   240 +        <xul:button dlgtype="cancel" class="dialog-button"/>
   237 +        <xul:button dlgtype="cancel" class="dialog-button"/>
   674 +
   671 +
   675 +</bindings>
   672 +</bindings>
   676 diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js
   673 diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js
   677 --- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
   674 --- a/toolkit/mozapps/downloads/nsHelperAppDlg.js
   678 +++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
   675 +++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js
   679 @@ -1035,30 +1035,60 @@ nsUnknownContentTypeDialog.prototype = {
   676 @@ -1030,30 +1030,60 @@ nsUnknownContentTypeDialog.prototype = {
   680  
   677  
   681        if (params.handlerApp &&
   678        if (params.handlerApp &&
   682            params.handlerApp.executable &&
   679            params.handlerApp.executable &&
   683            params.handlerApp.executable.isFile()) {
   680            params.handlerApp.executable.isFile()) {
   684          // Remember the file they chose to run.
   681          // Remember the file they chose to run.
   846 +}
   843 +}
   847 +
   844 +
   848 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
   845 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
   849 --- a/toolkit/xre/moz.build
   846 --- a/toolkit/xre/moz.build
   850 +++ b/toolkit/xre/moz.build
   847 +++ b/toolkit/xre/moz.build
   851 @@ -71,17 +71,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
   848 @@ -67,17 +67,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
   852          '../components/printingui',
   849          '../components/printingui',
   853      ]
   850      ]
   854  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
   851  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
   855      UNIFIED_SOURCES += [
   852      UNIFIED_SOURCES += [
   856          'nsNativeAppSupportDefault.cpp',
   853          'nsNativeAppSupportDefault.cpp',
  1311  mozilla::ipc::IPCResult
  1308  mozilla::ipc::IPCResult
  1312  HandlerServiceParent::RecvGetTypeFromExtension(const nsCString& aFileExtension,
  1309  HandlerServiceParent::RecvGetTypeFromExtension(const nsCString& aFileExtension,
  1313 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
  1310 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
  1314 --- a/uriloader/exthandler/moz.build
  1311 --- a/uriloader/exthandler/moz.build
  1315 +++ b/uriloader/exthandler/moz.build
  1312 +++ b/uriloader/exthandler/moz.build
  1316 @@ -77,17 +77,19 @@ else:
  1313 @@ -76,17 +76,19 @@ else:
  1317      SOURCES += [
  1314      SOURCES += [
  1318          osdir + '/nsOSHelperAppService.cpp',
  1315          osdir + '/nsOSHelperAppService.cpp',
  1319      ]
  1316      ]
  1320      if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
  1317      if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
  1321          CXXFLAGS += ['-Wno-error=shadow']
  1318          CXXFLAGS += ['-Wno-error=shadow']
  1328          'unix/nsMIMEInfoUnix.cpp',
  1325          'unix/nsMIMEInfoUnix.cpp',
  1329      ]
  1326      ]
  1330  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
  1327  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
  1331      UNIFIED_SOURCES += [
  1328      UNIFIED_SOURCES += [
  1332          'android/nsAndroidHandlerApp.cpp',
  1329          'android/nsAndroidHandlerApp.cpp',
  1333          'android/nsExternalSharingAppService.cpp',
       
  1334          'android/nsExternalURLHandlerService.cpp',
  1330          'android/nsExternalURLHandlerService.cpp',
  1335          'android/nsMIMEInfoAndroid.cpp',
  1331          'android/nsMIMEInfoAndroid.cpp',
  1336 @@ -122,16 +124,17 @@ include('/ipc/chromium/chromium-config.m
  1332      ]
       
  1333 @@ -120,16 +122,17 @@ include('/ipc/chromium/chromium-config.m
  1337  FINAL_LIBRARY = 'xul'
  1334  FINAL_LIBRARY = 'xul'
  1338  
  1335  
  1339  LOCAL_INCLUDES += [
  1336  LOCAL_INCLUDES += [
  1340      '/docshell/base',
  1337      '/docshell/base',
  1341      '/dom/base',
  1338      '/dom/base',
  1689  #include "nsReadableUtils.h"
  1686  #include "nsReadableUtils.h"
  1690  #include "nsUnicharUtils.h"
  1687  #include "nsUnicharUtils.h"
  1691  #include "nsIURL.h"
  1688  #include "nsIURL.h"
  1692  #include "nsIFileStreams.h"
  1689  #include "nsIFileStreams.h"
  1693  #include "nsILineInputStream.h"
  1690  #include "nsILineInputStream.h"
  1694 @@ -1128,17 +1128,17 @@ nsOSHelperAppService::GetHandlerAndDescr
  1691 @@ -1125,17 +1125,17 @@ nsOSHelperAppService::GetHandlerAndDescr
  1695  
  1692  
  1696  nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolScheme, bool * aHandlerExists)
  1693  nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolScheme, bool * aHandlerExists)
  1697  {
  1694  {
  1698    nsresult rv = NS_OK;
  1695    nsresult rv = NS_OK;
  1699  
  1696  
  1708    } else {
  1705    } else {
  1709      *aHandlerExists = false;
  1706      *aHandlerExists = false;
  1710      nsCOMPtr<nsIHandlerService> handlerSvc = do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv);
  1707      nsCOMPtr<nsIHandlerService> handlerSvc = do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv);
  1711      if (NS_SUCCEEDED(rv) && handlerSvc) {
  1708      if (NS_SUCCEEDED(rv) && handlerSvc) {
  1712        rv = handlerSvc->ExistsForProtocol(nsCString(aProtocolScheme), aHandlerExists);
  1709        rv = handlerSvc->ExistsForProtocol(nsCString(aProtocolScheme), aHandlerExists);
  1713 @@ -1146,17 +1146,17 @@ nsresult nsOSHelperAppService::OSProtoco
  1710 @@ -1143,17 +1143,17 @@ nsresult nsOSHelperAppService::OSProtoco
  1714    }
  1711    }
  1715  
  1712  
  1716    return rv;
  1713    return rv;
  1717  }
  1714  }
  1718  
  1715  
  1727  #endif
  1724  #endif
  1728  }
  1725  }
  1729  
  1726  
  1730  nsresult nsOSHelperAppService::GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile)
  1727  nsresult nsOSHelperAppService::GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile)
  1731  {
  1728  {
  1732 @@ -1243,17 +1243,17 @@ nsOSHelperAppService::GetFromExtension(c
  1729 @@ -1240,17 +1240,17 @@ nsOSHelperAppService::GetFromExtension(c
  1733                                           mime_types_description,
  1730                                           mime_types_description,
  1734                                           true);
  1731                                           true);
  1735  
  1732  
  1736    if (NS_FAILED(rv) || majorType.IsEmpty()) {
  1733    if (NS_FAILED(rv) || majorType.IsEmpty()) {
  1737  
  1734  
  1746      }
  1743      }
  1747  #endif
  1744  #endif
  1748  
  1745  
  1749      rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt),
  1746      rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt),
  1750                                    majorType,
  1747                                    majorType,
  1751 @@ -1364,17 +1364,17 @@ nsOSHelperAppService::GetFromType(const 
  1748 @@ -1361,17 +1361,17 @@ nsOSHelperAppService::GetFromType(const 
  1752    nsAutoString extensions, mime_types_description;
  1749    nsAutoString extensions, mime_types_description;
  1753    LookUpExtensionsAndDescription(majorType,
  1750    LookUpExtensionsAndDescription(majorType,
  1754                                   minorType,
  1751                                   minorType,
  1755                                   extensions,
  1752                                   extensions,
  1756                                   mime_types_description);
  1753                                   mime_types_description);
  1768        return gnomeInfo.forget();
  1765        return gnomeInfo.forget();
  1769      }
  1766      }
  1770 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
  1767 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
  1771 --- a/widget/gtk/moz.build
  1768 --- a/widget/gtk/moz.build
  1772 +++ b/widget/gtk/moz.build
  1769 +++ b/widget/gtk/moz.build
  1773 @@ -122,16 +122,17 @@ else:
  1770 @@ -123,16 +123,17 @@ include('/ipc/chromium/chromium-config.m
  1774  include('/ipc/chromium/chromium-config.mozbuild')
       
  1775  
  1771  
  1776  FINAL_LIBRARY = 'xul'
  1772  FINAL_LIBRARY = 'xul'
  1777  
  1773  
  1778  LOCAL_INCLUDES += [
  1774  LOCAL_INCLUDES += [
       
  1775      '/layout/base',
  1779      '/layout/generic',
  1776      '/layout/generic',
  1780      '/layout/xul',
  1777      '/layout/xul',
  1781      '/other-licenses/atk-1.0',
  1778      '/other-licenses/atk-1.0',
  1782 +    '/toolkit/xre',
  1779 +    '/toolkit/xre',
  1783      '/widget',
  1780      '/widget',
  2164  struct ManifestDirective
  2161  struct ManifestDirective
  2165  {
  2162  {
  2166    const char* directive;
  2163    const char* directive;
  2167    int argc;
  2164    int argc;
  2168  
  2165  
  2169 @@ -437,16 +438,17 @@ ParseManifest(NSLocationType aType, File
  2166 @@ -419,16 +420,17 @@ ParseManifest(NSLocationType aType, File
  2170    NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled");
  2167    NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled");
  2171    NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired");
  2168    NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired");
  2172    NS_NAMED_LITERAL_STRING(kApplication, "application");
  2169    NS_NAMED_LITERAL_STRING(kApplication, "application");
  2173    NS_NAMED_LITERAL_STRING(kAppVersion, "appversion");
  2170    NS_NAMED_LITERAL_STRING(kAppVersion, "appversion");
  2174    NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion");
  2171    NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion");
  2182  #endif
  2179  #endif
  2183  
  2180  
  2184    NS_NAMED_LITERAL_STRING(kMain, "main");
  2181    NS_NAMED_LITERAL_STRING(kMain, "main");
  2185    NS_NAMED_LITERAL_STRING(kContent, "content");
  2182    NS_NAMED_LITERAL_STRING(kContent, "content");
  2186  
  2183  
  2187 @@ -492,44 +494,49 @@ ParseManifest(NSLocationType aType, File
  2184 @@ -474,44 +476,49 @@ ParseManifest(NSLocationType aType, File
  2188          CopyUTF8toUTF16(s, abi);
  2185          CopyUTF8toUTF16(s, abi);
  2189          abi.Insert(char16_t('_'), 0);
  2186          abi.Insert(char16_t('_'), 0);
  2190          abi.Insert(osTarget, 0);
  2187          abi.Insert(osTarget, 0);
  2191        }
  2188        }
  2192      }
  2189      }
  2232      process = kContent;
  2229      process = kContent;
  2233    } else {
  2230    } else {
  2234      process = kMain;
  2231      process = kMain;
  2235    }
  2232    }
  2236  
  2233  
  2237 @@ -631,25 +638,27 @@ ParseManifest(NSLocationType aType, File
  2234 @@ -598,25 +605,27 @@ ParseManifest(NSLocationType aType, File
  2238      TriState stOsVersion = eUnspecified;
  2235      TriState stOsVersion = eUnspecified;
  2239      TriState stOs = eUnspecified;
  2236      TriState stOs = eUnspecified;
  2240      TriState stABI = eUnspecified;
  2237      TriState stABI = eUnspecified;
  2241      TriState stProcess = eUnspecified;
  2238      TriState stProcess = eUnspecified;
  2242  #if defined(MOZ_WIDGET_ANDROID)
  2239  #if defined(MOZ_WIDGET_ANDROID)
  2260            CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) {
  2257            CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) {
  2261          continue;
  2258          continue;
  2262        }
  2259        }
  2263  
  2260  
  2264  #if defined(MOZ_WIDGET_ANDROID)
  2261  #if defined(MOZ_WIDGET_ANDROID)
  2265 @@ -694,16 +703,17 @@ ParseManifest(NSLocationType aType, File
  2262 @@ -661,16 +670,17 @@ ParseManifest(NSLocationType aType, File
  2266      }
  2263      }
  2267  
  2264  
  2268      if (!ok ||
  2265      if (!ok ||
  2269          stApp == eBad ||
  2266          stApp == eBad ||
  2270          stAppVersion == eBad ||
  2267          stAppVersion == eBad ||
  2301 --- a/xpcom/io/nsLocalFileUnix.cpp
  2298 --- a/xpcom/io/nsLocalFileUnix.cpp
  2302 +++ b/xpcom/io/nsLocalFileUnix.cpp
  2299 +++ b/xpcom/io/nsLocalFileUnix.cpp
  2303 @@ -47,16 +47,17 @@
  2300 @@ -47,16 +47,17 @@
  2304  #include "prproces.h"
  2301  #include "prproces.h"
  2305  #include "nsIDirectoryEnumerator.h"
  2302  #include "nsIDirectoryEnumerator.h"
  2306  #include "nsISimpleEnumerator.h"
  2303  #include "nsSimpleEnumerator.h"
  2307  #include "private/pprio.h"
  2304  #include "private/pprio.h"
  2308  #include "prlink.h"
  2305  #include "prlink.h"
  2309  
  2306  
  2310  #ifdef MOZ_WIDGET_GTK
  2307  #ifdef MOZ_WIDGET_GTK
  2311  #include "nsIGIOService.h"
  2308  #include "nsIGIOService.h"
  2316  #include <Carbon/Carbon.h>
  2313  #include <Carbon/Carbon.h>
  2317  #include "CocoaFileUtils.h"
  2314  #include "CocoaFileUtils.h"
  2318  #include "prmem.h"
  2315  #include "prmem.h"
  2319  #include "plbase64.h"
  2316  #include "plbase64.h"
  2320  
  2317  
  2321 @@ -1999,63 +2000,78 @@ nsLocalFile::SetPersistentDescriptor(con
  2318 @@ -2007,63 +2008,78 @@ nsLocalFile::SetPersistentDescriptor(con
  2322  NS_IMETHODIMP
  2319  NS_IMETHODIMP
  2323  nsLocalFile::Reveal()
  2320  nsLocalFile::Reveal()
  2324  {
  2321  {
  2325    if (!FilePreferences::IsAllowedPath(mPath)) {
  2322    if (!FilePreferences::IsAllowedPath(mPath)) {
  2326      return NS_ERROR_FILE_ACCESS_DENIED;
  2323      return NS_ERROR_FILE_ACCESS_DENIED;