diff -r 349bcaa18df4 -r 1268ddc9dc16 mozilla-kde.patch --- a/mozilla-kde.patch Sat Aug 22 09:17:03 2015 +0200 +++ b/mozilla-kde.patch Sun Aug 23 15:29:44 2015 +0200 @@ -1,5 +1,5 @@ # HG changeset patch -# Parent 5f8cbb078ab0d5696255c2f514c6333666b47da9 +# Parent 3f3d1e5db92a45cf3758ee5ba77c577fcfb364c9 Description: Add KDE integration to Firefox (toolkit parts) Author: Wolfgang Rosenauer Author: Lubos Lunak @@ -46,7 +46,7 @@ #include "prefread.h" #include "prefapi_private_data.h" -@@ -1154,16 +1155,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char +@@ -1153,16 +1154,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char static nsresult pref_LoadPrefsInDirList(const char *listId) { @@ -81,7 +81,7 @@ return NS_OK; bool hasMore; -@@ -1179,17 +1198,17 @@ static nsresult pref_LoadPrefsInDirList( +@@ -1178,17 +1197,17 @@ static nsresult pref_LoadPrefsInDirList( nsAutoCString leaf; path->GetNativeLeafName(leaf); @@ -100,7 +100,7 @@ { nsZipItemPtr manifest(jarReader, name, true); NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE); -@@ -1283,26 +1302,38 @@ static nsresult pref_InitInitialObjects( +@@ -1282,26 +1301,38 @@ static nsresult pref_InitInitialObjects( /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ static const char* specialFiles[] = { #if defined(XP_MACOSX) @@ -142,7 +142,7 @@ diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py --- a/python/mozbuild/mozpack/chrome/flags.py +++ b/python/mozbuild/mozpack/chrome/flags.py -@@ -209,16 +209,17 @@ class Flags(OrderedDict): +@@ -211,16 +211,17 @@ class Flags(OrderedDict): 'contentaccessible': Flag, 'os': StringFlag, 'osversion': VersionFlag, @@ -163,7 +163,7 @@ diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py --- a/python/mozbuild/mozpack/chrome/manifest.py +++ b/python/mozbuild/mozpack/chrome/manifest.py -@@ -31,16 +31,17 @@ class ManifestEntry(object): +@@ -33,16 +33,17 @@ class ManifestEntry(object): 'application', 'platformversion', 'os', @@ -184,7 +184,7 @@ 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 -@@ -67,14 +67,15 @@ if not CONFIG['MOZ_SUITE']: +@@ -67,15 +67,16 @@ if not CONFIG['MOZ_SUITE']: ] FAIL_ON_WARNINGS = True @@ -199,6 +199,7 @@ ] DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True + DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True CXXFLAGS += CONFIG['TK_CFLAGS'] diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp @@ -775,7 +776,7 @@ new file mode 100644 --- /dev/null +++ b/toolkit/content/widgets/preferences-kde.xml -@@ -0,0 +1,1357 @@ +@@ -0,0 +1,1403 @@ + + + + + + ++ ++ let targetObj = {}; ++ Components.utils.import("resource://gre/modules/DeferredTask.jsm", targetObj); ++ targetObj.DeferredTask; ++ ++ ++ ++ ++ ++ ++ ++ ++ new Set(); ++ ++ ++ ++ ++ ++ + + + + + @@ -2230,11 +2277,11 @@ diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build -@@ -45,17 +45,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt - GENERATED_SOURCES += [ - 'moc_nsNativeAppSupportQt.cpp', - ] +@@ -43,17 +43,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co + elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt': + EXPORTS += ['nsQAppInstance.h'] SOURCES += [ + '!moc_nsNativeAppSupportQt.cpp', 'nsNativeAppSupportQt.cpp', 'nsQAppInstance.cpp', ] @@ -3106,7 +3153,7 @@ diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -79,16 +79,17 @@ else: +@@ -80,16 +80,17 @@ else: include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' @@ -3158,11 +3205,11 @@ using namespace mozilla; #define MAX_PREVIEW_SIZE 180 + // bug 1184009 + #define MAX_PREVIEW_SOURCE_SIZE 4096 nsIFile *nsFilePicker::mPrevDisplayDirectory = nullptr; - - void -@@ -238,17 +240,19 @@ nsFilePicker::AppendFilters(int32_t aFil +@@ -246,17 +248,19 @@ nsFilePicker::AppendFilters(int32_t aFil return nsBaseFilePicker::AppendFilters(aFilterMask); } @@ -3183,7 +3230,7 @@ mFilters.AppendElement(filter); mFilterNames.AppendElement(name); -@@ -363,16 +367,32 @@ nsFilePicker::Show(int16_t *aReturn) +@@ -371,16 +375,32 @@ nsFilePicker::Show(int16_t *aReturn) NS_IMETHODIMP nsFilePicker::Open(nsIFilePickerShownCallback *aCallback) @@ -3216,7 +3263,7 @@ GtkFileChooserAction action = GetGtkFileChooserAction(mMode); const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) -@@ -551,8 +571,235 @@ nsFilePicker::Done(GtkWidget* file_choos +@@ -595,8 +615,235 @@ nsFilePicker::Done(GtkWidget* file_choos if (mCallback) { mCallback->Done(result); mCallback = nullptr; @@ -3455,8 +3502,7 @@ diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h --- a/widget/gtk/nsFilePicker.h +++ b/widget/gtk/nsFilePicker.h -@@ -68,11 +68,17 @@ protected: - nsString mDefault; +@@ -69,14 +69,20 @@ protected: nsString mDefaultExtension; nsTArray mFilters; @@ -3464,12 +3510,16 @@ private: static nsIFile *mPrevDisplayDirectory; -+ + + bool kdeRunning(); + bool getKdeRunning(); + NS_IMETHODIMP kdeFileDialog(PRInt16 *aReturn); + NS_IMETHODIMP kdeAppsDialog(PRInt16 *aReturn); + nsCString kdeMakeFilter( int index ); ++ + #if (MOZ_WIDGET_GTK == 3) + GtkFileChooserWidget *mFileChooserDelegate; + #endif }; #endif @@ -3628,7 +3678,7 @@ diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp -@@ -44,16 +44,17 @@ +@@ -47,16 +47,17 @@ #include "prproces.h" #include "nsIDirectoryEnumerator.h" #include "nsISimpleEnumerator.h" @@ -3646,7 +3696,7 @@ #include "prmem.h" #include "plbase64.h" -@@ -1960,42 +1961,52 @@ nsLocalFile::SetPersistentDescriptor(con +@@ -1963,42 +1964,52 @@ nsLocalFile::SetPersistentDescriptor(con return InitWithNativePath(aPersistentDescriptor); #endif } @@ -3705,7 +3755,7 @@ return rv; } return NS_ERROR_FAILURE; -@@ -2003,16 +2014,22 @@ nsLocalFile::Reveal() +@@ -2006,16 +2017,22 @@ nsLocalFile::Reveal() return NS_ERROR_FAILURE; #endif }