diff -r 9483ff78d5a0 -r 354c672efefa mozilla-kde.patch --- a/mozilla-kde.patch Thu Oct 16 21:20:22 2014 +0200 +++ b/mozilla-kde.patch Thu Oct 16 23:09:58 2014 +0200 @@ -4,9 +4,9 @@ Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 https://bugzilla.novell.com/show_bug.cgi?id=170055 -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 +diff --git a/modules/libpref/Makefile.in b/modules/libpref/Makefile.in +--- a/modules/libpref/Makefile.in ++++ b/modules/libpref/Makefile.in @@ -21,13 +21,15 @@ endif ifdef MOZ_SERVICES_HEALTHREPORT ifneq (android,$(MOZ_WIDGET_TOOLKIT)) @@ -23,9 +23,9 @@ libs:: greprefs.js $(INSTALL) $^ $(DIST)/bin/ -diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp ---- a/modules/libpref/src/Preferences.cpp -+++ b/modules/libpref/src/Preferences.cpp +diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp +--- a/modules/libpref/Preferences.cpp ++++ b/modules/libpref/Preferences.cpp @@ -27,16 +27,17 @@ #include "nsIZipReader.h" #include "nsPrefBranch.h" @@ -179,20 +179,26 @@ ''' self.base = base self.flags = Flags(*flags) -diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in ---- a/toolkit/components/downloads/Makefile.in -+++ b/toolkit/components/downloads/Makefile.in -@@ -1,9 +1,9 @@ - # - # 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/. +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 +@@ -52,14 +52,15 @@ if not CONFIG['MOZ_SUITE']: + ] + + FAIL_ON_WARNINGS = True + + FINAL_LIBRARY = 'xul' - include $(topsrcdir)/config/rules.mk + LOCAL_INCLUDES += [ + '../protobuf', +- '/ipc/chromium/src' ++ '/ipc/chromium/src', ++ '/toolkit/xre' + ] - CXXFLAGS += $(TK_CFLAGS) -- -+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre + DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True + + CXXFLAGS += CONFIG['TK_CFLAGS'] diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp --- a/toolkit/components/downloads/nsDownloadManager.cpp +++ b/toolkit/components/downloads/nsDownloadManager.cpp @@ -217,7 +223,7 @@ #include "AndroidBridge.h" using namespace mozilla::widget::android; #endif -@@ -2729,16 +2733,25 @@ nsDownload::SetState(DownloadState aStat +@@ -2711,16 +2715,25 @@ nsDownload::SetState(DownloadState aStat nsCOMPtr pref(do_GetService(NS_PREFSERVICE_CONTRACTID)); // Master pref to control this function. @@ -243,17 +249,13 @@ int64_t goat = PR_Now() - mStartTime; showTaskbarAlert = goat > alertIntervalUSec; -@@ -2766,19 +2779,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( +@@ -2751,16 +2764,17 @@ nsDownload::SetState(DownloadState aStat 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(), nullptr); -- } -+ } + EmptyString(), EmptyString(), nullptr); + } } } + } @@ -268,7 +270,7 @@ diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn -@@ -54,29 +54,33 @@ toolkit.jar: +@@ -55,29 +55,33 @@ toolkit.jar: content/global/viewZoomOverlay.js (viewZoomOverlay.js) *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) content/global/bindings/browser.xml (widgets/browser.xml) @@ -2131,7 +2133,7 @@ NS_DECL_NSISYSTEMPROXYSETTINGS nsUnixSystemProxySettings() - : mSchemeProxySettings(5) + : mSchemeProxySettings(4) @@ -38,16 +40,17 @@ private: nsCOMPtr mGSettings; nsCOMPtr mProxySettings; @@ -2625,20 +2627,6 @@ + }; + +#endif // nsKDEUtils -diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in ---- a/uriloader/exthandler/Makefile.in -+++ b/uriloader/exthandler/Makefile.in -@@ -6,9 +6,10 @@ - ifdef MOZ_ENABLE_DBUS - OS_INCLUDES += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) - endif - - include $(topsrcdir)/config/rules.mk - - ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT))) - CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS) -+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre - endif diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build --- a/uriloader/exthandler/moz.build +++ b/uriloader/exthandler/moz.build @@ -2662,6 +2650,24 @@ 'android/nsExternalSharingAppService.cpp', 'android/nsExternalURLHandlerService.cpp', 'android/nsMIMEInfoAndroid.cpp', +@@ -129,16 +131,17 @@ include('/ipc/chromium/chromium-config.m + FINAL_LIBRARY = 'xul' + + LOCAL_INCLUDES += [ + '/content/base/src', + '/dom/base', + '/dom/ipc', + '/netwerk/base/src', + '/netwerk/protocol/http', ++ '/toolkit/xre' + ] + + if CONFIG['MOZ_ENABLE_DBUS']: + CXXFLAGS += CONFIG['TK_CFLAGS'] + CXXFLAGS += CONFIG['MOZ_DBUS_CFLAGS'] + + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'gtk3'): + CXXFLAGS += CONFIG['TK_CFLAGS'] diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp new file mode 100644 --- /dev/null @@ -3095,26 +3101,27 @@ #endif // Now look up our extensions -diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in ---- a/widget/gtk/Makefile.in -+++ b/widget/gtk/Makefile.in -@@ -3,14 +3,16 @@ - # 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 $(topsrcdir)/config/rules.mk +diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build +--- a/widget/gtk/moz.build ++++ b/widget/gtk/moz.build +@@ -88,16 +88,17 @@ include('/ipc/chromium/chromium-config.m + FINAL_LIBRARY = 'xul' - CFLAGS += $(MOZ_STARTUP_NOTIFICATION_CFLAGS) - CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS) + LOCAL_INCLUDES += [ + '../shared', + '../xpwidgets', + '/layout/generic', + '/layout/xul', + '/other-licenses/atk-1.0', ++ '/toolkit/xre' + ] -+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre -+ - CFLAGS += $(TK_CFLAGS) - CXXFLAGS += $(TK_CFLAGS) + if CONFIG['MOZ_X11']: + LOCAL_INCLUDES += [ + '../shared/x11', + ] - ifdef MOZ_ENABLE_DBUS - CXXFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) - endif + DEFINES['CAIRO_GFX'] = True diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp --- a/widget/gtk/nsFilePicker.cpp +++ b/widget/gtk/nsFilePicker.cpp @@ -3464,42 +3471,28 @@ }; #endif -diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in ---- a/xpcom/components/Makefile.in -+++ b/xpcom/components/Makefile.in -@@ -2,9 +2,10 @@ - # 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/. - - include $(topsrcdir)/config/rules.mk - - ifdef MOZ_WIDGET_GTK - CXXFLAGS += $(TK_CFLAGS) -+LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre - endif diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp --- a/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp -@@ -31,16 +31,17 @@ - #include "nsTextFormatter.h" - #include "nsVersionComparator.h" - #include "nsXPCOMCIDInternal.h" +@@ -34,16 +34,17 @@ #include "nsIConsoleService.h" #include "nsIScriptError.h" #include "nsIXULAppInfo.h" #include "nsIXULRuntime.h" + #ifdef MOZ_B2G_LOADER + #include "mozilla/XPTInterfaceInfoManager.h" + #endif +#include "nsKDEUtils.h" - using namespace mozilla; - - struct ManifestDirective - { - const char* directive; - int argc; - -@@ -398,16 +399,17 @@ ParseManifest(NSLocationType type, FileL + #ifdef MOZ_B2G_LOADER + #define XPTONLY_MANIFEST &nsComponentManagerImpl::XPTOnlyManifestManifest + #define XPTONLY_XPT &nsComponentManagerImpl::XPTOnlyManifestXPT + #else + #define XPTONLY_MANIFEST nullptr + #define XPTONLY_XPT nullptr + #endif +@@ -488,16 +489,17 @@ ParseManifest(NSLocationType aType, File NS_NAMED_LITERAL_STRING(kPlatform, "platform"); NS_NAMED_LITERAL_STRING(kContentAccessible, "contentaccessible"); NS_NAMED_LITERAL_STRING(kApplication, "application"); @@ -3517,7 +3510,7 @@ NS_NAMED_LITERAL_STRING(kXPCNativeWrappers, "xpcnativewrappers"); nsAutoString appID; -@@ -445,42 +447,47 @@ ParseManifest(NSLocationType type, FileL +@@ -543,44 +545,49 @@ ParseManifest(NSLocationType aType, File CopyUTF8toUTF16(s, abi); abi.Insert(char16_t('_'), 0); abi.Insert(osTarget, 0); @@ -3533,8 +3526,8 @@ OSVERSIONINFO info = { sizeof(OSVERSIONINFO) }; if (GetVersionEx(&info)) { nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"), - info.dwMajorVersion, - info.dwMinorVersion); + info.dwMajorVersion, + info.dwMinorVersion); } + desktop = NS_LITERAL_STRING("win"); #pragma warning(pop) @@ -3542,18 +3535,20 @@ SInt32 majorVersion = nsCocoaFeatures::OSXVersionMajor(); SInt32 minorVersion = nsCocoaFeatures::OSXVersionMinor(); nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), - majorVersion, - minorVersion); + majorVersion, + minorVersion); + desktop = NS_LITERAL_STRING("macosx"); #elif defined(MOZ_WIDGET_GTK) nsTextFormatter::ssprintf(osVersion, MOZ_UTF16("%ld.%ld"), - gtk_major_version, - gtk_minor_version); + gtk_major_version, + gtk_minor_version); + desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); #elif defined(MOZ_WIDGET_ANDROID) bool isTablet = false; if (mozilla::AndroidBridge::Bridge()) { - mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion); + mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", + "RELEASE", + osVersion); isTablet = mozilla::widget::android::GeckoAppShell::IsTablet(); } + desktop = NS_LITERAL_STRING("android"); @@ -3563,9 +3558,9 @@ // at the end. nsTArray contracts; - char *token; - char *newline = buf; -@@ -562,24 +569,26 @@ ParseManifest(NSLocationType type, FileL + char* token; + char* newline = aBuf; +@@ -669,25 +676,27 @@ ParseManifest(NSLocationType aType, File TriState stOsVersion = eUnspecified; TriState stOs = eUnspecified; TriState stABI = eUnspecified; @@ -3576,7 +3571,8 @@ bool contentAccessible = false; + TriState stDesktop = eUnspecified; - while (nullptr != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) { + while ((token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && + ok) { ToLowerCase(token); NS_ConvertASCIItoUTF16 wtoken(token); @@ -3586,13 +3582,13 @@ + CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) || CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) || CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) || - CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) + CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) { continue; + } #if defined(MOZ_WIDGET_ANDROID) bool tablet = false; - if (CheckFlag(kTablet, wtoken, tablet)) { -@@ -608,16 +617,17 @@ ParseManifest(NSLocationType type, FileL +@@ -718,16 +727,17 @@ ParseManifest(NSLocationType aType, File } if (!ok || @@ -3605,11 +3601,28 @@ #ifdef MOZ_WIDGET_ANDROID stTablet == eBad || #endif - stABI == eBad) + stABI == eBad) { continue; + } - if (directive->regfunc) { - if (GeckoProcessType_Default != XRE_GetProcessType()) + #ifdef MOZ_B2G_LOADER +diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build +--- a/xpcom/components/moz.build ++++ b/xpcom/components/moz.build +@@ -47,12 +47,13 @@ FINAL_LIBRARY = 'xul' + GENERATED_INCLUDES += ['..'] + LOCAL_INCLUDES += [ + '../base', + '../build', + '../ds', + '../reflect/xptinfo', + '/chrome', + '/modules/libjar', ++ '/toolkit/xre' + ] + + if CONFIG['MOZ_WIDGET_GTK']: + CXXFLAGS += CONFIG['TK_CFLAGS'] diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -3631,7 +3644,7 @@ #include "prmem.h" #include "plbase64.h" -@@ -1962,53 +1963,55 @@ nsLocalFile::SetPersistentDescriptor(con +@@ -1965,55 +1966,57 @@ nsLocalFile::SetPersistentDescriptor(con return InitWithNativePath(aPersistentDescriptor); #endif } @@ -3641,11 +3654,13 @@ { #ifdef MOZ_WIDGET_GTK - nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); -- nsCOMPtr gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); +- nsCOMPtr gnomevfs = +- do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); - if (!giovfs && !gnomevfs) { - return NS_ERROR_FAILURE; - } - ++ + nsAutoCString url; bool isDirectory; if (NS_FAILED(IsDirectory(&isDirectory))) { @@ -3662,7 +3677,8 @@ - return gnomevfs->ShowURIForInput(mPath); - } + url = mPath; - } else if (giovfs && NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) { + } else if (giovfs && + NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) { return NS_OK; } else { nsCOMPtr parentDir; @@ -3705,7 +3721,7 @@ return rv; } return NS_ERROR_FAILURE; -@@ -2016,16 +2019,22 @@ nsLocalFile::Reveal() +@@ -2021,16 +2024,22 @@ nsLocalFile::Reveal() return NS_ERROR_FAILURE; #endif } @@ -3721,10 +3737,10 @@ + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; + } nsCOMPtr giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); - nsCOMPtr gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); + nsCOMPtr gnomevfs = + do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID); if (giovfs) { return giovfs->ShowURIForInput(mPath); } else if (gnomevfs) { /* GnomeVFS fallback */ return gnomevfs->ShowURIForInput(mPath); - }