equal
deleted
inserted
replaced
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 b517aa8dfa37d729db9590fe699caa38f899dfba |
6 # Parent aa58e8c70d1448a08407c6c191ea8b76d61e8bf6 |
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 |
173 with Files('**'): |
173 with Files('**'): |
174 BUG_COMPONENT = ('Toolkit', 'Downloads API') |
174 BUG_COMPONENT = ('Toolkit', 'Downloads API') |
175 diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm |
175 diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm |
176 --- a/toolkit/mozapps/downloads/HelperAppDlg.jsm |
176 --- a/toolkit/mozapps/downloads/HelperAppDlg.jsm |
177 +++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm |
177 +++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm |
178 @@ -1205,36 +1205,66 @@ nsUnknownContentTypeDialog.prototype = { |
178 @@ -1203,36 +1203,66 @@ nsUnknownContentTypeDialog.prototype = { |
179 params.handlerApp && |
179 params.handlerApp && |
180 params.handlerApp.executable && |
180 params.handlerApp.executable && |
181 params.handlerApp.executable.isFile() |
181 params.handlerApp.executable.isFile() |
182 ) { |
182 ) { |
183 // Remember the file they chose to run. |
183 // Remember the file they chose to run. |
798 using mozilla::dom::HandlerApp; |
798 using mozilla::dom::HandlerApp; |
799 using mozilla::dom::HandlerInfo; |
799 using mozilla::dom::HandlerInfo; |
800 using mozilla::dom::RemoteHandlerApp; |
800 using mozilla::dom::RemoteHandlerApp; |
801 |
801 |
802 namespace { |
802 namespace { |
803 @@ -294,17 +294,17 @@ mozilla::ipc::IPCResult HandlerServicePa |
803 @@ -299,17 +299,17 @@ mozilla::ipc::IPCResult HandlerServicePa |
804 mozilla::ipc::IPCResult HandlerServiceParent::RecvExistsForProtocolOS( |
804 mozilla::ipc::IPCResult HandlerServiceParent::RecvExistsForProtocolOS( |
805 const nsCString& aProtocolScheme, bool* aHandlerExists) { |
805 const nsCString& aProtocolScheme, bool* aHandlerExists) { |
806 if (aProtocolScheme.Length() > MAX_SCHEME_LENGTH) { |
806 if (aProtocolScheme.Length() > MAX_SCHEME_LENGTH) { |
807 *aHandlerExists = false; |
807 *aHandlerExists = false; |
808 return IPC_OK(); |
808 return IPC_OK(); |
817 return IPC_OK(); |
817 return IPC_OK(); |
818 } |
818 } |
819 |
819 |
820 /* |
820 /* |
821 * Check if a handler exists for the provided protocol. Check the datastore |
821 * Check if a handler exists for the provided protocol. Check the datastore |
822 @@ -323,17 +323,17 @@ mozilla::ipc::IPCResult HandlerServicePa |
822 @@ -328,17 +328,17 @@ mozilla::ipc::IPCResult HandlerServicePa |
823 nsCOMPtr<nsIExternalProtocolService> protoSvc = |
823 nsCOMPtr<nsIExternalProtocolService> protoSvc = |
824 do_GetService(NS_EXTERNALPROTOCOLSERVICE_CONTRACTID, &rv); |
824 do_GetService(NS_EXTERNALPROTOCOLSERVICE_CONTRACTID, &rv); |
825 if (NS_WARN_IF(NS_FAILED(rv))) { |
825 if (NS_WARN_IF(NS_FAILED(rv))) { |
826 *aHandlerExists = false; |
826 *aHandlerExists = false; |
827 return IPC_OK(); |
827 return IPC_OK(); |
1212 #include "nsReadableUtils.h" |
1212 #include "nsReadableUtils.h" |
1213 #include "nsUnicharUtils.h" |
1213 #include "nsUnicharUtils.h" |
1214 #include "nsIFileStreams.h" |
1214 #include "nsIFileStreams.h" |
1215 #include "nsILineInputStream.h" |
1215 #include "nsILineInputStream.h" |
1216 #include "nsIFile.h" |
1216 #include "nsIFile.h" |
1217 @@ -1023,17 +1023,17 @@ nsresult nsOSHelperAppService::GetHandle |
1217 @@ -1022,17 +1022,17 @@ nsresult nsOSHelperAppService::GetHandle |
1218 |
1218 |
1219 nsresult nsOSHelperAppService::OSProtocolHandlerExists( |
1219 nsresult nsOSHelperAppService::OSProtocolHandlerExists( |
1220 const char* aProtocolScheme, bool* aHandlerExists) { |
1220 const char* aProtocolScheme, bool* aHandlerExists) { |
1221 nsresult rv = NS_OK; |
1221 nsresult rv = NS_OK; |
1222 |
1222 |
1231 } else { |
1231 } else { |
1232 *aHandlerExists = false; |
1232 *aHandlerExists = false; |
1233 nsCOMPtr<nsIHandlerService> handlerSvc = |
1233 nsCOMPtr<nsIHandlerService> handlerSvc = |
1234 do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv); |
1234 do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv); |
1235 if (NS_SUCCEEDED(rv) && handlerSvc) { |
1235 if (NS_SUCCEEDED(rv) && handlerSvc) { |
1236 @@ -1043,17 +1043,17 @@ nsresult nsOSHelperAppService::OSProtoco |
1236 @@ -1042,17 +1042,17 @@ nsresult nsOSHelperAppService::OSProtoco |
1237 } |
1237 } |
1238 |
1238 |
1239 return rv; |
1239 return rv; |
1240 } |
1240 } |
1241 |
1241 |
1250 #endif |
1250 #endif |
1251 } |
1251 } |
1252 |
1252 |
1253 NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol( |
1253 NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol( |
1254 const nsACString& aScheme, bool* _retval) { |
1254 const nsACString& aScheme, bool* _retval) { |
1255 @@ -1140,17 +1140,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1255 @@ -1139,17 +1139,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1256 nsresult rv = |
1256 nsresult rv = |
1257 LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
1257 LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
1258 minorType, mime_types_description, true); |
1258 minorType, mime_types_description, true); |
1259 |
1259 |
1260 if (NS_FAILED(rv) || majorType.IsEmpty()) { |
1260 if (NS_FAILED(rv) || majorType.IsEmpty()) { |
1269 } |
1269 } |
1270 #endif |
1270 #endif |
1271 |
1271 |
1272 rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
1272 rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
1273 minorType, mime_types_description, false); |
1273 minorType, mime_types_description, false); |
1274 @@ -1252,17 +1252,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1274 @@ -1251,17 +1251,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1275 |
1275 |
1276 // Now look up our extensions |
1276 // Now look up our extensions |
1277 nsAutoString extensions, mime_types_description; |
1277 nsAutoString extensions, mime_types_description; |
1278 LookUpExtensionsAndDescription(majorType, minorType, extensions, |
1278 LookUpExtensionsAndDescription(majorType, minorType, extensions, |
1279 mime_types_description); |
1279 mime_types_description); |
1291 NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?"); |
1291 NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?"); |
1292 gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions)); |
1292 gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions)); |
1293 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build |
1293 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build |
1294 --- a/widget/gtk/moz.build |
1294 --- a/widget/gtk/moz.build |
1295 +++ b/widget/gtk/moz.build |
1295 +++ b/widget/gtk/moz.build |
1296 @@ -129,16 +129,17 @@ include('/ipc/chromium/chromium-config.m |
1296 @@ -131,16 +131,17 @@ include('/ipc/chromium/chromium-config.m |
1297 |
1297 |
1298 FINAL_LIBRARY = 'xul' |
1298 FINAL_LIBRARY = 'xul' |
1299 |
1299 |
1300 LOCAL_INCLUDES += [ |
1300 LOCAL_INCLUDES += [ |
1301 '/layout/base', |
1301 '/layout/base', |
1329 |
1329 |
1330 #include "mozilla/Types.h" |
1330 #include "mozilla/Types.h" |
1331 #include "nsGtkUtils.h" |
1331 #include "nsGtkUtils.h" |
1332 #include "nsIFileURL.h" |
1332 #include "nsIFileURL.h" |
1333 #include "nsIGIOService.h" |
1333 #include "nsIGIOService.h" |
1334 @@ -20,16 +21,18 @@ |
1334 @@ -22,16 +23,18 @@ |
1335 #include "nsArrayEnumerator.h" |
|
1336 #include "nsMemory.h" |
1335 #include "nsMemory.h" |
1337 #include "nsEnumeratorUtils.h" |
1336 #include "nsEnumeratorUtils.h" |
1338 #include "nsNetUtil.h" |
1337 #include "nsNetUtil.h" |
1339 #include "nsReadableUtils.h" |
1338 #include "nsReadableUtils.h" |
1340 #include "mozcontainer.h" |
1339 #include "MozContainer.h" |
|
1340 #include "gfxPlatformGtk.h" |
1341 |
1341 |
1342 #include "nsFilePicker.h" |
1342 #include "nsFilePicker.h" |
1343 +#include "nsKDEUtils.h" |
1343 +#include "nsKDEUtils.h" |
1344 +#include "nsURLHelper.h" |
1344 +#include "nsURLHelper.h" |
1345 |
1345 |
1348 #define MAX_PREVIEW_SIZE 180 |
1348 #define MAX_PREVIEW_SIZE 180 |
1349 // bug 1184009 |
1349 // bug 1184009 |
1350 #define MAX_PREVIEW_SOURCE_SIZE 4096 |
1350 #define MAX_PREVIEW_SOURCE_SIZE 4096 |
1351 |
1351 |
1352 nsIFile* nsFilePicker::mPrevDisplayDirectory = nullptr; |
1352 nsIFile* nsFilePicker::mPrevDisplayDirectory = nullptr; |
1353 @@ -223,17 +226,19 @@ nsFilePicker::AppendFilters(int32_t aFil |
1353 @@ -231,17 +234,19 @@ nsFilePicker::AppendFilters(int32_t aFil |
1354 mAllowURLs = !!(aFilterMask & filterAllowURLs); |
1354 mAllowURLs = !!(aFilterMask & filterAllowURLs); |
1355 return nsBaseFilePicker::AppendFilters(aFilterMask); |
1355 return nsBaseFilePicker::AppendFilters(aFilterMask); |
1356 } |
1356 } |
1357 |
1357 |
1358 NS_IMETHODIMP |
1358 NS_IMETHODIMP |
1369 CopyUTF16toUTF8(aFilter, filter); |
1369 CopyUTF16toUTF8(aFilter, filter); |
1370 CopyUTF16toUTF8(aTitle, name); |
1370 CopyUTF16toUTF8(aTitle, name); |
1371 |
1371 |
1372 mFilters.AppendElement(filter); |
1372 mFilters.AppendElement(filter); |
1373 mFilterNames.AppendElement(name); |
1373 mFilterNames.AppendElement(name); |
1374 @@ -333,16 +338,39 @@ nsresult nsFilePicker::Show(int16_t* aRe |
1374 @@ -341,16 +346,39 @@ nsresult nsFilePicker::Show(int16_t* aRe |
1375 return NS_OK; |
1375 return NS_OK; |
1376 } |
1376 } |
1377 |
1377 |
1378 NS_IMETHODIMP |
1378 NS_IMETHODIMP |
1379 nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { |
1379 nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { |
1409 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
1409 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
1410 |
1410 |
1411 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
1411 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
1412 |
1412 |
1413 const gchar* accept_button; |
1413 const gchar* accept_button; |
1414 @@ -562,16 +590,244 @@ void nsFilePicker::Done(void* file_choos |
1414 @@ -570,16 +598,244 @@ void nsFilePicker::Done(void* file_choos |
1415 mCallback->Done(result); |
1415 mCallback->Done(result); |
1416 mCallback = nullptr; |
1416 mCallback = nullptr; |
1417 } else { |
1417 } else { |
1418 mResult = result; |
1418 mResult = result; |
1419 } |
1419 } |
1683 gboolean modal); |
1683 gboolean modal); |
1684 |
1684 |
1685 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp |
1685 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp |
1686 --- a/xpcom/components/ManifestParser.cpp |
1686 --- a/xpcom/components/ManifestParser.cpp |
1687 +++ b/xpcom/components/ManifestParser.cpp |
1687 +++ b/xpcom/components/ManifestParser.cpp |
1688 @@ -33,16 +33,17 @@ |
1688 @@ -34,16 +34,17 @@ |
1689 #include "nsTextFormatter.h" |
1689 #include "nsTextFormatter.h" |
1690 #include "nsVersionComparator.h" |
1690 #include "nsVersionComparator.h" |
1691 #include "nsXPCOMCIDInternal.h" |
1691 #include "nsXPCOMCIDInternal.h" |
1692 |
1692 |
1693 #include "nsIConsoleService.h" |
1693 #include "nsIConsoleService.h" |
1701 struct ManifestDirective { |
1701 struct ManifestDirective { |
1702 const char* directive; |
1702 const char* directive; |
1703 int argc; |
1703 int argc; |
1704 |
1704 |
1705 bool ischrome; |
1705 bool ischrome; |
1706 @@ -393,16 +394,17 @@ void ParseManifest(NSLocationType aType, |
1706 @@ -394,16 +395,17 @@ void ParseManifest(NSLocationType aType, |
1707 NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled"); |
1707 NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled"); |
1708 NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired"); |
1708 NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired"); |
1709 NS_NAMED_LITERAL_STRING(kApplication, "application"); |
1709 NS_NAMED_LITERAL_STRING(kApplication, "application"); |
1710 NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); |
1710 NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); |
1711 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
1711 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
1719 #endif |
1719 #endif |
1720 |
1720 |
1721 NS_NAMED_LITERAL_STRING(kMain, "main"); |
1721 NS_NAMED_LITERAL_STRING(kMain, "main"); |
1722 NS_NAMED_LITERAL_STRING(kContent, "content"); |
1722 NS_NAMED_LITERAL_STRING(kContent, "content"); |
1723 |
1723 |
1724 @@ -448,39 +450,44 @@ void ParseManifest(NSLocationType aType, |
1724 @@ -449,39 +451,44 @@ void ParseManifest(NSLocationType aType, |
1725 CopyUTF8toUTF16(s, abi); |
1725 CopyUTF8toUTF16(s, abi); |
1726 abi.Insert(char16_t('_'), 0); |
1726 abi.Insert(char16_t('_'), 0); |
1727 abi.Insert(osTarget, 0); |
1727 abi.Insert(osTarget, 0); |
1728 } |
1728 } |
1729 } |
1729 } |
1740 info.dwMinorVersion); |
1740 info.dwMinorVersion); |
1741 } |
1741 } |
1742 + desktop = NS_LITERAL_STRING("win"); |
1742 + desktop = NS_LITERAL_STRING("win"); |
1743 # pragma warning(pop) |
1743 # pragma warning(pop) |
1744 #elif defined(MOZ_WIDGET_COCOA) |
1744 #elif defined(MOZ_WIDGET_COCOA) |
1745 SInt32 majorVersion = nsCocoaFeatures::OSXVersionMajor(); |
1745 SInt32 majorVersion = nsCocoaFeatures::macOSVersionMajor(); |
1746 SInt32 minorVersion = nsCocoaFeatures::OSXVersionMinor(); |
1746 SInt32 minorVersion = nsCocoaFeatures::macOSVersionMinor(); |
1747 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", majorVersion, minorVersion); |
1747 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", majorVersion, minorVersion); |
1748 + desktop = NS_LITERAL_STRING("macosx"); |
1748 + desktop = NS_LITERAL_STRING("macosx"); |
1749 #elif defined(MOZ_WIDGET_GTK) |
1749 #elif defined(MOZ_WIDGET_GTK) |
1750 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", gtk_major_version, |
1750 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", gtk_major_version, |
1751 gtk_minor_version); |
1751 gtk_minor_version); |
1764 process = kContent; |
1764 process = kContent; |
1765 } else { |
1765 } else { |
1766 process = kMain; |
1766 process = kMain; |
1767 } |
1767 } |
1768 |
1768 |
1769 @@ -567,25 +574,27 @@ void ParseManifest(NSLocationType aType, |
1769 @@ -568,25 +575,27 @@ void ParseManifest(NSLocationType aType, |
1770 TriState stOsVersion = eUnspecified; |
1770 TriState stOsVersion = eUnspecified; |
1771 TriState stOs = eUnspecified; |
1771 TriState stOs = eUnspecified; |
1772 TriState stABI = eUnspecified; |
1772 TriState stABI = eUnspecified; |
1773 TriState stProcess = eUnspecified; |
1773 TriState stProcess = eUnspecified; |
1774 #if defined(MOZ_WIDGET_ANDROID) |
1774 #if defined(MOZ_WIDGET_ANDROID) |
1792 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, |
1792 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, |
1793 stGeckoVersion)) { |
1793 stGeckoVersion)) { |
1794 continue; |
1794 continue; |
1795 } |
1795 } |
1796 |
1796 |
1797 @@ -622,17 +631,17 @@ void ParseManifest(NSLocationType aType, |
1797 @@ -623,17 +632,17 @@ void ParseManifest(NSLocationType aType, |
1798 } |
1798 } |
1799 |
1799 |
1800 LogMessageWithContext( |
1800 LogMessageWithContext( |
1801 aFile, line, "Unrecognized chrome manifest modifier '%s'.", token); |
1801 aFile, line, "Unrecognized chrome manifest modifier '%s'.", token); |
1802 ok = false; |
1802 ok = false; |
1831 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': |
1831 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk': |
1832 CXXFLAGS += CONFIG['TK_CFLAGS'] |
1832 CXXFLAGS += CONFIG['TK_CFLAGS'] |
1833 if CONFIG['MOZ_ENABLE_DBUS']: |
1833 if CONFIG['MOZ_ENABLE_DBUS']: |
1834 CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS'] |
1834 CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS'] |
1835 |
1835 |
1836 if CONFIG['MOZ_LAYOUT_DEBUGGER']: |
1836 include('/ipc/chromium/chromium-config.mozbuild') |
1837 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp |
1837 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp |
1838 --- a/xpcom/io/nsLocalFileUnix.cpp |
1838 --- a/xpcom/io/nsLocalFileUnix.cpp |
1839 +++ b/xpcom/io/nsLocalFileUnix.cpp |
1839 +++ b/xpcom/io/nsLocalFileUnix.cpp |
1840 @@ -46,16 +46,17 @@ |
1840 @@ -46,16 +46,17 @@ |
1841 #include "prproces.h" |
1841 #include "prproces.h" |
1853 # include <Carbon/Carbon.h> |
1853 # include <Carbon/Carbon.h> |
1854 # include "CocoaFileUtils.h" |
1854 # include "CocoaFileUtils.h" |
1855 # include "prmem.h" |
1855 # include "prmem.h" |
1856 # include "plbase64.h" |
1856 # include "plbase64.h" |
1857 |
1857 |
1858 @@ -1907,62 +1908,77 @@ nsLocalFile::SetPersistentDescriptor(con |
1858 @@ -1898,62 +1899,77 @@ nsLocalFile::SetPersistentDescriptor(con |
1859 |
1859 |
1860 NS_IMETHODIMP |
1860 NS_IMETHODIMP |
1861 nsLocalFile::Reveal() { |
1861 nsLocalFile::Reveal() { |
1862 if (!FilePreferences::IsAllowedPath(mPath)) { |
1862 if (!FilePreferences::IsAllowedPath(mPath)) { |
1863 return NS_ERROR_FILE_ACCESS_DENIED; |
1863 return NS_ERROR_FILE_ACCESS_DENIED; |