mozilla-kde.patch
branchfirefox104
changeset 1178 e27c6e9c5c63
parent 1177 4bb6d80fcc64
child 1179 c19c9e7820ef
equal deleted inserted replaced
1177:4bb6d80fcc64 1178:e27c6e9c5c63
     1 # HG changeset patch
     1 # HG changeset patch
     2 # User msirringhaus@suse.de
     2 # User msirringhaus@suse.de
     3 # Date 1559294891 -7200
     3 # Date 1559294891 -7200
     4 #      Fri May 31 11:28:11 2019 +0200
     4 #      Fri May 31 11:28:11 2019 +0200
     5 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112
     5 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112
     6 # Parent  b7a9df31234bb6342e8b01dcfa98b7d8ecdfd1dd
     6 # Parent  65e96e081f6f4b68d6b7998f4182a3764832c2ce
     7 Description: Add KDE integration to Firefox (toolkit parts)
     7 Description: Add KDE integration to Firefox (toolkit parts)
     8 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
     8 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org>
     9 Author: Lubos Lunak <lunak@suse.com>
     9 Author: Lubos Lunak <lunak@suse.com>
    10 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
    10 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751
    11      https://bugzilla.novell.com/show_bug.cgi?id=170055
    11      https://bugzilla.novell.com/show_bug.cgi?id=170055
   808      UNIFIED_SOURCES += [
   808      UNIFIED_SOURCES += [
   809          "android/nsMIMEInfoAndroid.cpp",
   809          "android/nsMIMEInfoAndroid.cpp",
   810      ]
   810      ]
   811  elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
   811  elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
   812      UNIFIED_SOURCES += [
   812      UNIFIED_SOURCES += [
   813 @@ -130,16 +132,17 @@ include("/ipc/chromium/chromium-config.m
   813 @@ -126,16 +128,17 @@ include("/ipc/chromium/chromium-config.m
   814  FINAL_LIBRARY = "xul"
   814  FINAL_LIBRARY = "xul"
   815  
   815  
   816  LOCAL_INCLUDES += [
   816  LOCAL_INCLUDES += [
   817      "/docshell/base",
   817      "/docshell/base",
   818      "/dom/base",
   818      "/dom/base",
  1164  #  endif
  1164  #  endif
  1165  #endif
  1165  #endif
  1166  #include "nsISupports.h"
  1166  #include "nsISupports.h"
  1167  #include "nsString.h"
  1167  #include "nsString.h"
  1168  #include "nsReadableUtils.h"
  1168  #include "nsReadableUtils.h"
  1169 @@ -1025,17 +1025,17 @@ nsresult nsOSHelperAppService::GetHandle
  1169 @@ -1102,17 +1102,17 @@ nsresult nsOSHelperAppService::GetHandle
  1170  
  1170  
  1171  nsresult nsOSHelperAppService::OSProtocolHandlerExists(
  1171  nsresult nsOSHelperAppService::OSProtocolHandlerExists(
  1172      const char* aProtocolScheme, bool* aHandlerExists) {
  1172      const char* aProtocolScheme, bool* aHandlerExists) {
  1173    nsresult rv = NS_OK;
  1173    nsresult rv = NS_OK;
  1174  
  1174  
  1183    } else {
  1183    } else {
  1184      *aHandlerExists = false;
  1184      *aHandlerExists = false;
  1185      nsCOMPtr<nsIHandlerService> handlerSvc =
  1185      nsCOMPtr<nsIHandlerService> handlerSvc =
  1186          do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv);
  1186          do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv);
  1187      if (NS_SUCCEEDED(rv) && handlerSvc) {
  1187      if (NS_SUCCEEDED(rv) && handlerSvc) {
  1188 @@ -1045,17 +1045,17 @@ nsresult nsOSHelperAppService::OSProtoco
  1188 @@ -1122,17 +1122,17 @@ nsresult nsOSHelperAppService::OSProtoco
  1189    }
  1189    }
  1190  
  1190  
  1191    return rv;
  1191    return rv;
  1192  }
  1192  }
  1193  
  1193  
  1202  #endif
  1202  #endif
  1203  }
  1203  }
  1204  
  1204  
  1205  NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol(
  1205  NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol(
  1206      const nsACString& aScheme, bool* _retval) {
  1206      const nsACString& aScheme, bool* _retval) {
  1207 @@ -1148,17 +1148,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
  1207 @@ -1227,17 +1227,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
  1208    nsresult rv =
  1208    nsresult rv =
  1209        LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType,
  1209        LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType,
  1210                                 minorType, mime_types_description, true);
  1210                                 minorType, mime_types_description, true);
  1211  
  1211  
  1212    if (NS_FAILED(rv) || majorType.IsEmpty()) {
  1212    if (NS_FAILED(rv) || majorType.IsEmpty()) {
  1213  #ifdef MOZ_WIDGET_GTK
  1213  #ifdef MOZ_WIDGET_GTK
  1214      LOG(("Looking in GNOME registry\n"));
  1214      LOG("Looking in GNOME registry\n");
  1215      RefPtr<nsMIMEInfoBase> gnomeInfo =
  1215      RefPtr<nsMIMEInfoBase> gnomeInfo =
  1216 -        nsGNOMERegistry::GetFromExtension(aFileExt);
  1216 -        nsGNOMERegistry::GetFromExtension(aFileExt);
  1217 +        nsCommonRegistry::GetFromExtension(aFileExt);
  1217 +        nsCommonRegistry::GetFromExtension(aFileExt);
  1218      if (gnomeInfo) {
  1218      if (gnomeInfo) {
  1219        LOG(("Got MIMEInfo from GNOME registry\n"));
  1219        LOG("Got MIMEInfo from GNOME registry\n");
  1220        return gnomeInfo.forget();
  1220        return gnomeInfo.forget();
  1221      }
  1221      }
  1222  #endif
  1222  #endif
  1223  
  1223  
  1224      rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType,
  1224      rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType,
  1225                                    minorType, mime_types_description, false);
  1225                                    minorType, mime_types_description, false);
  1226 @@ -1261,17 +1261,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
  1226 @@ -1342,17 +1342,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel
  1227  
  1227  
  1228    // Now look up our extensions
  1228    // Now look up our extensions
  1229    nsAutoString extensions, mime_types_description;
  1229    nsAutoString extensions, mime_types_description;
  1230    LookUpExtensionsAndDescription(majorType, minorType, extensions,
  1230    LookUpExtensionsAndDescription(majorType, minorType, extensions,
  1231                                   mime_types_description);
  1231                                   mime_types_description);
  1233  #ifdef MOZ_WIDGET_GTK
  1233  #ifdef MOZ_WIDGET_GTK
  1234    if (handler.IsEmpty()) {
  1234    if (handler.IsEmpty()) {
  1235 -    RefPtr<nsMIMEInfoBase> gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType);
  1235 -    RefPtr<nsMIMEInfoBase> gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType);
  1236 +    RefPtr<nsMIMEInfoBase> gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType);
  1236 +    RefPtr<nsMIMEInfoBase> gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType);
  1237      if (gnomeInfo) {
  1237      if (gnomeInfo) {
  1238        LOG(
  1238        LOG("Got MIMEInfo from GNOME registry without extensions; setting them "
  1239            ("Got MIMEInfo from GNOME registry without extensions; setting them "
  1239            "to %s\n",
  1240             "to %s\n",
  1240            NS_LossyConvertUTF16toASCII(extensions).get());
  1241             NS_LossyConvertUTF16toASCII(extensions).get()));
       
  1242  
  1241  
  1243        NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?");
  1242        NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?");
  1244        gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions));
  1243        gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions));
       
  1244        return gnomeInfo.forget();
  1245 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
  1245 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
  1246 --- a/widget/gtk/moz.build
  1246 --- a/widget/gtk/moz.build
  1247 +++ b/widget/gtk/moz.build
  1247 +++ b/widget/gtk/moz.build
  1248 @@ -146,16 +146,17 @@ FINAL_LIBRARY = "xul"
  1248 @@ -147,16 +147,17 @@ FINAL_LIBRARY = "xul"
  1249  
  1249  
  1250  LOCAL_INCLUDES += [
  1250  LOCAL_INCLUDES += [
  1251      "/layout/base",
  1251      "/layout/base",
  1252      "/layout/forms",
  1252      "/layout/forms",
  1253      "/layout/generic",
  1253      "/layout/generic",
  1653  struct ManifestDirective {
  1653  struct ManifestDirective {
  1654    const char* directive;
  1654    const char* directive;
  1655    int argc;
  1655    int argc;
  1656  
  1656  
  1657    bool ischrome;
  1657    bool ischrome;
  1658 @@ -397,16 +398,17 @@ void ParseManifest(NSLocationType aType,
  1658 @@ -389,16 +390,17 @@ void ParseManifest(NSLocationType aType,
  1659    constexpr auto kRemoteEnabled = u"remoteenabled"_ns;
  1659    constexpr auto kRemoteEnabled = u"remoteenabled"_ns;
  1660    constexpr auto kRemoteRequired = u"remoterequired"_ns;
  1660    constexpr auto kRemoteRequired = u"remoterequired"_ns;
  1661    constexpr auto kApplication = u"application"_ns;
  1661    constexpr auto kApplication = u"application"_ns;
  1662    constexpr auto kAppVersion = u"appversion"_ns;
  1662    constexpr auto kAppVersion = u"appversion"_ns;
  1663    constexpr auto kGeckoVersion = u"platformversion"_ns;
  1663    constexpr auto kGeckoVersion = u"platformversion"_ns;
  1671  #endif
  1671  #endif
  1672    // You might expect this to be guarded by MOZ_BACKGROUNDTASKS, but it's not
  1672    // You might expect this to be guarded by MOZ_BACKGROUNDTASKS, but it's not
  1673    // possible to have conditional manifest contents, so we need to recognize and
  1673    // possible to have conditional manifest contents, so we need to recognize and
  1674    // discard these tokens even when MOZ_BACKGROUNDTASKS is not set.
  1674    // discard these tokens even when MOZ_BACKGROUNDTASKS is not set.
  1675    constexpr auto kBackgroundTask = u"backgroundtask"_ns;
  1675    constexpr auto kBackgroundTask = u"backgroundtask"_ns;
  1676 @@ -456,39 +458,44 @@ void ParseManifest(NSLocationType aType,
  1676 @@ -448,39 +450,44 @@ void ParseManifest(NSLocationType aType,
  1677          CopyUTF8toUTF16(s, abi);
  1677          CopyUTF8toUTF16(s, abi);
  1678          abi.Insert(char16_t('_'), 0);
  1678          abi.Insert(char16_t('_'), 0);
  1679          abi.Insert(osTarget, 0);
  1679          abi.Insert(osTarget, 0);
  1680        }
  1680        }
  1681      }
  1681      }
  1716      process = kContent;
  1716      process = kContent;
  1717    } else {
  1717    } else {
  1718      process = kMain;
  1718      process = kMain;
  1719    }
  1719    }
  1720  
  1720  
  1721 @@ -583,25 +590,27 @@ void ParseManifest(NSLocationType aType,
  1721 @@ -571,25 +578,27 @@ void ParseManifest(NSLocationType aType,
  1722      // When in background task mode, default to not registering
  1722      // When in background task mode, default to not registering
  1723      // category directivies unless backgroundtask=1 is specified.
  1723      // category directivies unless backgroundtask=1 is specified.
  1724      TriState stBackgroundTask = (BackgroundTasks::IsBackgroundTaskMode() &&
  1724      TriState stBackgroundTask = (BackgroundTasks::IsBackgroundTaskMode() &&
  1725                                   strcmp("category", directive->directive) == 0)
  1725                                   strcmp("category", directive->directive) == 0)
  1726                                      ? eBad
  1726                                      ? eBad
  1744            CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion,
  1744            CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion,
  1745                             stGeckoVersion)) {
  1745                             stGeckoVersion)) {
  1746          continue;
  1746          continue;
  1747        }
  1747        }
  1748  
  1748  
  1749 @@ -650,17 +659,17 @@ void ParseManifest(NSLocationType aType,
  1749 @@ -638,17 +647,17 @@ void ParseManifest(NSLocationType aType,
  1750        }
  1750        }
  1751  
  1751  
  1752        LogMessageWithContext(
  1752        LogMessageWithContext(
  1753            aFile, line, "Unrecognized chrome manifest modifier '%s'.", token);
  1753            aFile, line, "Unrecognized chrome manifest modifier '%s'.", token);
  1754        ok = false;
  1754        ok = false;