diff -r b0c883afdffa -r d2c159cb9bf2 mozilla-kde.patch --- 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 Author: Lubos Lunak @@ -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 dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv)); - if (NS_FAILED(rv)) + nsCOMPtr 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 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 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 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 @@ + +