diff -r 52284fd63667 -r c4aab80e472f mozilla-kde.patch --- a/mozilla-kde.patch Wed Feb 05 07:13:27 2014 +0100 +++ b/mozilla-kde.patch Fri Feb 07 22:10:42 2014 +0100 @@ -7,19 +7,19 @@ diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in --- a/modules/libpref/src/Makefile.in +++ b/modules/libpref/src/Makefile.in -@@ -33,14 +33,15 @@ endif - # Optimizer bug with GCC 3.2.2 on OS/2 - ifeq ($(OS_ARCH), OS2) - nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp - $(REPORT_BUILD) - @$(MAKE_DEPS_AUTO_CXX) - $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:-O2=-O1) $(_VPATH_SRCS) +@@ -21,13 +21,15 @@ endif + ifdef MOZ_SERVICES_HEALTHREPORT + ifneq (android,$(MOZ_WIDGET_TOOLKIT)) + grepref_files += $(topsrcdir)/services/healthreport/healthreport-prefs.js + else + grepref_files += $(topsrcdir)/mobile/android/chrome/content/healthreport-prefs.js + endif endif +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre - ++ greprefs.js: $(grepref_files) - $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ > $@ + $(call py_action,preprocessor,$(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ -o $@) libs:: greprefs.js $(INSTALL) $^ $(DIST)/bin/ @@ -44,7 +44,7 @@ #include "prefread.h" #include "prefapi_private_data.h" -@@ -1100,16 +1101,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char +@@ -1115,16 +1116,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char static nsresult pref_LoadPrefsInDirList(const char *listId) { @@ -79,7 +79,7 @@ return NS_OK; bool hasMore; -@@ -1125,17 +1144,17 @@ static nsresult pref_LoadPrefsInDirList( +@@ -1140,17 +1159,17 @@ static nsresult pref_LoadPrefsInDirList( nsAutoCString leaf; path->GetNativeLeafName(leaf); @@ -98,7 +98,7 @@ { nsZipItemPtr manifest(jarReader, name, true); NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE); -@@ -1229,28 +1248,40 @@ static nsresult pref_InitInitialObjects( +@@ -1244,28 +1263,40 @@ 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) @@ -217,9 +217,9 @@ #ifdef MOZ_WIDGET_ANDROID #include "AndroidBridge.h" + using namespace mozilla::widget::android; #endif - -@@ -2686,16 +2690,25 @@ nsDownload::SetState(DownloadState aStat +@@ -2687,16 +2691,25 @@ nsDownload::SetState(DownloadState aStat nsCOMPtr pref(do_GetService(NS_PREFSERVICE_CONTRACTID)); // Master pref to control this function. @@ -245,15 +245,15 @@ int64_t goat = PR_Now() - mStartTime; showTaskbarAlert = goat > alertIntervalUSec; -@@ -2722,19 +2735,20 @@ nsDownload::SetState(DownloadState aStat - // retention policy, there's no reason to make the text clickable +@@ -2724,19 +2737,20 @@ nsDownload::SetState(DownloadState aStat // because if it is, they'll click open the download manager and // the items they downloaded will have been removed. alerts->ShowAlertNotification( NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title, message, !removeWhenDone, mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"), - mDownloadManager, EmptyString(), NS_LITERAL_STRING("auto"), EmptyString()); + mDownloadManager, EmptyString(), NS_LITERAL_STRING("auto"), + EmptyString(), nullptr); - } + } } @@ -2195,7 +2195,7 @@ diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build -@@ -43,18 +43,20 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt +@@ -45,17 +45,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt 'nsNativeAppSupportQt.cpp', 'nsQAppInstance.cpp', ] @@ -2205,18 +2205,16 @@ ] elif CONFIG['MOZ_ENABLE_GTK']: + EXPORTS += ['nsKDEUtils.h'] - SOURCES += [ -- 'nsNativeAppSupportUnix.cpp', + UNIFIED_SOURCES += [ + 'nsKDEUtils.cpp', -+ 'nsNativeAppSupportUnix.cpp' + 'nsNativeAppSupportUnix.cpp', ] else: - SOURCES += [ + UNIFIED_SOURCES += [ 'nsNativeAppSupportDefault.cpp', ] if CONFIG['MOZ_X11']: - SOURCES += [ diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp new file mode 100644 --- /dev/null @@ -2617,7 +2615,7 @@ diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in --- a/uriloader/exthandler/Makefile.in +++ b/uriloader/exthandler/Makefile.in -@@ -44,9 +44,10 @@ endif +@@ -19,9 +19,10 @@ endif ifdef MOZ_ENABLE_DBUS LOCAL_INCLUDES += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) endif @@ -2631,22 +2629,22 @@ diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build --- a/uriloader/exthandler/moz.build +++ b/uriloader/exthandler/moz.build -@@ -73,17 +73,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco - ] +@@ -81,17 +81,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco else: + # These files can't be built in unified mode because they force NSPR logging. SOURCES += [ osdir + '/nsOSHelperAppService.cpp', ] if CONFIG['MOZ_ENABLE_GTK']: - SOURCES += [ + UNIFIED_SOURCES += [ + 'unix/nsCommonRegistry.cpp', 'unix/nsGNOMERegistry.cpp', -+ 'unix/nsKDERegistry.cpp', ++ 'unix/nsKDERegistry.cpp', 'unix/nsMIMEInfoUnix.cpp', ] elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - SOURCES += [ + UNIFIED_SOURCES += [ 'android/nsAndroidHandlerApp.cpp', 'android/nsExternalSharingAppService.cpp', 'android/nsExternalURLHandlerService.cpp', @@ -3074,21 +3072,20 @@ diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in --- a/widget/gtk/Makefile.in +++ b/widget/gtk/Makefile.in -@@ -26,11 +26,14 @@ DEFINES += -DCAIRO_GFX -DMOZ_APP_NAME=' +@@ -4,11 +4,13 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + include $(topsrcdir)/config/rules.mk - INCLUDES += \ - -I$(srcdir)/../xpwidgets \ - -I$(srcdir)/../shared \ - -I$(topsrcdir)/layout/generic \ - -I$(topsrcdir)/layout/xul/base/src \ - -I$(topsrcdir)/other-licenses/atk-1.0 \ - $(NULL) -+ + CFLAGS += $(MOZ_STARTUP_NOTIFICATION_CFLAGS) + CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) \ + $(MOZ_STARTUP_NOTIFICATION_CFLAGS) + +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre + - ifdef MOZ_X11 - INCLUDES += -I$(srcdir)/../shared/x11 - endif + CFLAGS += $(TK_CFLAGS) + CXXFLAGS += $(TK_CFLAGS) + diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp --- a/widget/gtk/nsFilePicker.cpp +++ b/widget/gtk/nsFilePicker.cpp @@ -3098,7 +3095,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "mozilla/Util.h" + #include "mozilla/Types.h" #include +#include @@ -3527,7 +3524,7 @@ bool isTablet = false; if (mozilla::AndroidBridge::Bridge()) { mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion); - isTablet = mozilla::AndroidBridge::Bridge()->IsTablet(); + isTablet = mozilla::widget::android::GeckoAppShell::IsTablet(); } + desktop = NS_LITERAL_STRING("android"); #endif @@ -3586,14 +3583,13 @@ diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in --- a/xpcom/io/Makefile.in +++ b/xpcom/io/Makefile.in -@@ -6,9 +6,9 @@ MOZILLA_INTERNAL_API = 1 - include $(topsrcdir)/config/rules.mk +@@ -1,8 +1,8 @@ + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. - ifeq ($(OS_ARCH),Linux) - ifneq (,$(findstring lib64,$(libdir))) - DEFINES += -DHAVE_USR_LIB64_DIR - endif - endif + MOZILLA_INTERNAL_API = 1 + include $(topsrcdir)/config/rules.mk -LOCAL_INCLUDES += -I.. +LOCAL_INCLUDES += -I.. -I$(topsrcdir)/toolkit/xre @@ -3618,7 +3614,7 @@ #include "prmem.h" #include "plbase64.h" -@@ -1728,44 +1729,51 @@ nsLocalFile::SetPersistentDescriptor(con +@@ -1811,46 +1812,52 @@ nsLocalFile::SetPersistentDescriptor(con return InitWithNativePath(aPersistentDescriptor); #endif } @@ -3637,6 +3633,7 @@ if (NS_FAILED(IsDirectory(&isDirectory))) return NS_ERROR_FAILURE; ++ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); if (isDirectory) { - if (giovfs) - return giovfs->ShowURIForInput(mPath); @@ -3644,6 +3641,8 @@ - /* Fallback to GnomeVFS */ - return gnomevfs->ShowURIForInput(mPath); + url = mPath; + } else if (giovfs && NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) { + return NS_OK; } else { nsCOMPtr parentDir; nsAutoCString dirPath; @@ -3666,7 +3665,6 @@ + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; + } + -+ nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); + nsCOMPtr gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); + if (!giovfs && !gnomevfs) + return NS_ERROR_FAILURE; @@ -3675,7 +3673,6 @@ + return giovfs->ShowURIForInput(url); + else + return gnomevfs->ShowURIForInput(url); -+ #elif defined(MOZ_WIDGET_COCOA) CFURLRef url; if (NS_SUCCEEDED(GetCFURL(&url))) { @@ -3684,7 +3681,7 @@ return rv; } return NS_ERROR_FAILURE; -@@ -1773,16 +1781,23 @@ nsLocalFile::Reveal() +@@ -1858,16 +1865,23 @@ nsLocalFile::Reveal() return NS_ERROR_FAILURE; #endif }