From 2b2fcd0d14eec7630a7d8450838592d1fe99789b Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Tue, 2 Sep 2008 10:45:14 +0100 Subject: [PATCH] Bug 451909 kill MOZ_XUL_APP now that all apps set it. docshell/toolkit cleanup r=benjamin, makefile cleanups r=ted --- docshell/base/nsAboutRedirector.cpp | 4 -- embedding/Makefile.in | 4 -- embedding/browser/Makefile.in | 3 -- embedding/tests/Makefile.in | 2 - embedding/tests/os2Embed/Makefile.in | 2 - extensions/layout-debug/src/Makefile.in | 4 -- extensions/pref/autoconfig/Makefile.in | 2 +- .../spellcheck/hunspell/src/Makefile.in | 5 +-- extensions/widgetutils/Makefile.in | 2 - netwerk/Makefile.in | 1 - security/manager/ssl/Makefile.in | 2 +- toolkit/components/Makefile.in | 3 -- .../components/remote/nsGTKRemoteService.cpp | 37 ------------------- .../components/remote/nsGTKRemoteService.h | 2 - .../components/remote/nsPhRemoteService.cpp | 4 -- .../components/remote/nsQtRemoteService.cpp | 8 ---- .../mozapps/update/src/nsUpdateService.js.in | 10 ----- toolkit/toolkit-makefiles.sh | 3 -- toolkit/toolkit-tiers.mk | 14 +------ .../download-manager/src/Makefile.in | 6 +-- xpfe/components/winhooks/Makefile.in | 2 - 21 files changed, 6 insertions(+), 114 deletions(-) diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp index 74e0fd41cd9..98520df466e 100644 --- a/docshell/base/nsAboutRedirector.cpp +++ b/docshell/base/nsAboutRedirector.cpp @@ -73,11 +73,7 @@ static RedirEntry kRedirMap[] = { #ifdef MOZ_CRASHREPORTER { "crashes", "chrome://global/content/crashes.xhtml", 0 }, #endif -#ifdef MOZ_XUL_APP { "logo", "chrome://branding/content/about.png", -#else - { "logo", "chrome://global/content/logo.gif", -#endif nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT}, { "buildconfig", "chrome://global/content/buildconfig.html", nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, diff --git a/embedding/Makefile.in b/embedding/Makefile.in index f5440ddaa09..9e88839660a 100644 --- a/embedding/Makefile.in +++ b/embedding/Makefile.in @@ -48,10 +48,6 @@ PACKAGE_FILE = embed.pkg DIRS = base components browser -ifndef MOZ_XUL_APP -DIRS += lite -endif - ifdef ENABLE_TESTS XPCSHELL_TESTS = tests/unit endif diff --git a/embedding/browser/Makefile.in b/embedding/browser/Makefile.in index 723aff87be5..72130b61e64 100644 --- a/embedding/browser/Makefile.in +++ b/embedding/browser/Makefile.in @@ -44,9 +44,6 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk DIRS = webBrowser build -ifndef MOZ_XUL_APP -DIRS += chrome -endif ifeq ($(OS_ARCH),WINNT) ifndef MOZ_NO_ACTIVEX_SUPPORT diff --git a/embedding/tests/Makefile.in b/embedding/tests/Makefile.in index 55db97b048f..c5415d6e2ec 100644 --- a/embedding/tests/Makefile.in +++ b/embedding/tests/Makefile.in @@ -42,10 +42,8 @@ endif ifeq ($(OS_ARCH),WINNT) # disable winembed in non-libxul ifndef BUILD_STATIC_LIBS -ifdef MOZ_XUL_APP DIRS = winEmbed endif -endif endif diff --git a/embedding/tests/os2Embed/Makefile.in b/embedding/tests/os2Embed/Makefile.in index 9e7f3617aac..b2390d4e79f 100644 --- a/embedding/tests/os2Embed/Makefile.in +++ b/embedding/tests/os2Embed/Makefile.in @@ -102,9 +102,7 @@ EXTRA_DEPS += $(STATIC_EXTRA_DEPS) EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS) EXTRA_LIBS += -L$(DEPTH)/dist/lib/components EXTRA_LIBS += $(EXTRA_DSO_LIBS) $(STATIC_EXTRA_LIBS) -ifdef MOZ_XUL_APP EXTRA_LIBS += $(DIST)/lib/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX) -endif # MOZ_XUL_APP DEFINES += $(STATIC_DEFINES) CPPSRCS += $(STATIC_CPPSRCS) diff --git a/extensions/layout-debug/src/Makefile.in b/extensions/layout-debug/src/Makefile.in index d2bb4122af4..54e967a5cf7 100644 --- a/extensions/layout-debug/src/Makefile.in +++ b/extensions/layout-debug/src/Makefile.in @@ -66,10 +66,6 @@ REQUIRES = xpcom \ toolkitcomps \ $(NULL) -ifndef MOZ_XUL_APP -REQUIRES += appcomps -endif - XPIDLSRCS = \ nsILayoutRegressionTester.idl \ nsILayoutDebuggingTools.idl \ diff --git a/extensions/pref/autoconfig/Makefile.in b/extensions/pref/autoconfig/Makefile.in index b20f686172e..6949e4c3629 100644 --- a/extensions/pref/autoconfig/Makefile.in +++ b/extensions/pref/autoconfig/Makefile.in @@ -43,7 +43,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = autoconfig -DIRS = public resources src +DIRS = public src include $(topsrcdir)/config/rules.mk diff --git a/extensions/spellcheck/hunspell/src/Makefile.in b/extensions/spellcheck/hunspell/src/Makefile.in index ecb827e7101..b1d0de2de29 100644 --- a/extensions/spellcheck/hunspell/src/Makefile.in +++ b/extensions/spellcheck/hunspell/src/Makefile.in @@ -54,6 +54,7 @@ REQUIRES = xpcom \ $(NULL) CPPSRCS = mozHunspell.cpp \ + mozHunspellDirProvider.cpp \ $(NULL) ifndef MOZ_NATIVE_HUNSPELL @@ -67,10 +68,6 @@ CPPSRCS += affentry.cpp \ $(NULL) endif -ifdef MOZ_XUL_APP -CPPSRCS += mozHunspellDirProvider.cpp -endif - EXTRA_DSO_LDOPTS = \ $(LIBS_DIR) \ $(XPCOM_LIBS) \ diff --git a/extensions/widgetutils/Makefile.in b/extensions/widgetutils/Makefile.in index 94e64d07a3a..a701d738476 100644 --- a/extensions/widgetutils/Makefile.in +++ b/extensions/widgetutils/Makefile.in @@ -9,7 +9,6 @@ include $(DEPTH)/config/autoconf.mk MODULE = widgetutils XPI_NAME = widgetutils -ifdef MOZ_XUL_APP INSTALL_EXTENSION_ID = widgetutils@extensions.mozilla.org DIST_FILES = install.rdf NO_JAR_AUTO_REG = 1 @@ -25,7 +24,6 @@ XULAPP_DEFINES = \ ifdef TARGET_XPCOM_ABI XULAPP_DEFINES += -DEM_ABI=$(OS_TARGET)_$(TARGET_XPCOM_ABI) endif -endif DIRS = src #DIRS += public diff --git a/netwerk/Makefile.in b/netwerk/Makefile.in index 14b6c9b3f08..8054ecda3ed 100644 --- a/netwerk/Makefile.in +++ b/netwerk/Makefile.in @@ -55,7 +55,6 @@ DIRS = \ protocol \ system \ build \ - resources \ locales \ $(NULL) diff --git a/security/manager/ssl/Makefile.in b/security/manager/ssl/Makefile.in index 26322be155c..71f765e9642 100644 --- a/security/manager/ssl/Makefile.in +++ b/security/manager/ssl/Makefile.in @@ -42,7 +42,7 @@ srcdir = @srcdir@ VPATH = @srcdir@ MODULE = pipnss -DIRS = resources src public +DIRS = src public XPCSHELL_TESTS = tests diff --git a/toolkit/components/Makefile.in b/toolkit/components/Makefile.in index 7a253ef5404..cecb41f585f 100644 --- a/toolkit/components/Makefile.in +++ b/toolkit/components/Makefile.in @@ -57,7 +57,6 @@ DIRS += \ # These component dirs are built only for XUL apps -ifdef MOZ_XUL_APP DIRS += \ apppicker \ filepicker \ @@ -133,8 +132,6 @@ DIRS += \ EXTRA_PP_COMPONENTS = nsDefaultCLH.js -endif # MOZ_XUL_APP - ifeq ($(MOZ_BUILD_APP),camino) DIRS += autocomplete/public DIRS += downloads/public diff --git a/toolkit/components/remote/nsGTKRemoteService.cpp b/toolkit/components/remote/nsGTKRemoteService.cpp index 50dae38fc92..887d3e9f746 100644 --- a/toolkit/components/remote/nsGTKRemoteService.cpp +++ b/toolkit/components/remote/nsGTKRemoteService.cpp @@ -70,12 +70,8 @@ #include "nsGTKToolkit.h" #endif -#ifdef MOZ_XUL_APP #include "nsICommandLineRunner.h" #include "nsXULAppAPI.h" -#else -#include "nsISuiteRemoteService.h" -#endif #define MOZILLA_VERSION_PROP "_MOZILLA_VERSION" #define MOZILLA_LOCK_PROP "_MOZILLA_LOCK" @@ -94,11 +90,7 @@ #define TO_LITTLE_ENDIAN32(x) (x) #endif -#ifdef MOZ_XUL_APP const unsigned char kRemoteVersion[] = "5.1"; -#else -const unsigned char kRemoteVersion[] = "5.0"; -#endif NS_IMPL_ISUPPORTS2(nsGTKRemoteService, nsIRemoteService, @@ -274,32 +266,6 @@ nsGTKRemoteService::EnsureAtoms(void) sMozCommandLineAtom = XAtoms[i++]; } -#ifndef MOZ_XUL_APP -const char* -nsGTKRemoteService::HandleCommand(char* aCommand, nsIDOMWindow* aWindow, PRUint32 aTimestamp) -{ - nsresult rv; - - nsCOMPtr remote - (do_GetService("@mozilla.org/browser/xremoteservice;2")); - if (!remote) - return "509 internal error"; - - rv = remote->ParseCommand(aCommand, aWindow); - if (NS_SUCCEEDED(rv)) - return "200 executed command"; - - if (NS_ERROR_INVALID_ARG == rv) - return "500 command not parseable"; - - if (NS_ERROR_NOT_IMPLEMENTED == rv) - return "501 unrecognized command"; - - return "509 internal error"; -} - -#else //MOZ_XUL_APP - // Set desktop startup ID to the passed ID, if there is one, so that any created // windows get created with the right window manager metadata, and any windows // that get new tabs and are activated also get the right WM metadata. @@ -483,7 +449,6 @@ nsGTKRemoteService::HandleCommandLine(char* aBuffer, nsIDOMWindow* aWindow, return "200 executed command"; } -#endif // MOZ_XUL_APP void nsGTKRemoteService::HandleCommandsFor(GtkWidget* widget, @@ -584,7 +549,6 @@ nsGTKRemoteService::HandlePropertyChange(GtkWidget *aWidget, return TRUE; } -#ifdef MOZ_XUL_APP if (pevent->state == GDK_PROPERTY_NEW_VALUE && CMP_GATOM_XATOM(pevent->atom, sMozCommandLineAtom)) { @@ -628,7 +592,6 @@ nsGTKRemoteService::HandlePropertyChange(GtkWidget *aWidget, XFree(data); return TRUE; } -#endif //MOZ_XUL_APP if (pevent->state == GDK_PROPERTY_NEW_VALUE && CMP_GATOM_XATOM(pevent->atom, sMozResponseAtom)) { diff --git a/toolkit/components/remote/nsGTKRemoteService.h b/toolkit/components/remote/nsGTKRemoteService.h index 362613e2492..4b26d1e3d06 100644 --- a/toolkit/components/remote/nsGTKRemoteService.h +++ b/toolkit/components/remote/nsGTKRemoteService.h @@ -83,10 +83,8 @@ private: static const char* HandleCommand(char* aCommand, nsIDOMWindow* aWindow, PRUint32 aTimestamp); -#ifdef MOZ_XUL_APP static const char* HandleCommandLine(char* aBuffer, nsIDOMWindow* aWindow, PRUint32 aTimestamp); -#endif static gboolean HandlePropertyChange(GtkWidget *widget, GdkEventProperty *event, diff --git a/toolkit/components/remote/nsPhRemoteService.cpp b/toolkit/components/remote/nsPhRemoteService.cpp index d62ee298d48..e38aba4b3f0 100644 --- a/toolkit/components/remote/nsPhRemoteService.cpp +++ b/toolkit/components/remote/nsPhRemoteService.cpp @@ -28,12 +28,8 @@ #include "nsIServiceManager.h" #include "nsCRT.h" -#ifdef MOZ_XUL_APP #include "nsICommandLineRunner.h" #include "nsXULAppAPI.h" -#else -#include "nsISuiteRemoteService.h" -#endif #include diff --git a/toolkit/components/remote/nsQtRemoteService.cpp b/toolkit/components/remote/nsQtRemoteService.cpp index 39546e168a1..edfb4271905 100644 --- a/toolkit/components/remote/nsQtRemoteService.cpp +++ b/toolkit/components/remote/nsQtRemoteService.cpp @@ -66,12 +66,8 @@ //#include "nsGTKToolkit.h" #endif -#ifdef MOZ_XUL_APP #include "nsICommandLineRunner.h" #include "nsXULAppAPI.h" -#else -#include "nsISuiteRemoteService.h" -#endif #define MOZILLA_VERSION_PROP "_MOZILLA_VERSION" #define MOZILLA_LOCK_PROP "_MOZILLA_LOCK" @@ -90,11 +86,7 @@ #define TO_LITTLE_ENDIAN32(x) (x) #endif -#ifdef MOZ_XUL_APP const unsigned char kRemoteVersion[] = "5.1"; -#else -const unsigned char kRemoteVersion[] = "5.0"; -#endif NS_IMPL_ISUPPORTS2(nsQtRemoteService, nsIRemoteService, diff --git a/toolkit/mozapps/update/src/nsUpdateService.js.in b/toolkit/mozapps/update/src/nsUpdateService.js.in index 88782c95106..6e77727f799 100644 --- a/toolkit/mozapps/update/src/nsUpdateService.js.in +++ b/toolkit/mozapps/update/src/nsUpdateService.js.in @@ -2806,7 +2806,6 @@ TimerManager.prototype = { } }; -#ifdef MOZ_XUL_APP /** * UpdatePrompt * An object which can prompt the user with information about updates, request @@ -3084,7 +3083,6 @@ UpdatePrompt.prototype = { return this; } }; -#endif var gModule = { registerSelf: function(componentManager, fileSpec, location, type) { @@ -3127,13 +3125,11 @@ var gModule = { className : "Update Checker", factory : makeFactory(Checker) }, -#ifdef MOZ_XUL_APP prompt: { CID : Components.ID("{27ABA825-35B5-4018-9FDD-F99250A0E722}"), contractID : "@mozilla.org/updates/update-prompt;1", className : "Update Prompt", factory : makeFactory(UpdatePrompt) }, -#endif timers: { CID : Components.ID("{B322A5C0-A419-484E-96BA-D7182163899F}"), contractID : "@mozilla.org/updates/timer-manager;1", className : "Timer Manager", @@ -3177,16 +3173,12 @@ function NSGetModule(compMgr, fileSpec) { * the specified update, false otherwise. */ function isCompatible(update) { -#ifdef MOZ_XUL_APP var em = Components.classes["@mozilla.org/extensions/manager;1"]. getService(nsIExtensionManager); var items = em.getIncompatibleItemList("", update.extensionVersion, update.platformVersion, nsIUpdateItem.TYPE_ANY, false, { }); return items.length == 0; -#else - return true; -#endif } /** @@ -3205,7 +3197,6 @@ function showPromptIfNoIncompatibilities(update) { prompter.showUpdateAvailable(update); } -#ifdef MOZ_XUL_APP /** * Determines if an addon is compatible with a particular update. * @param addon @@ -3314,6 +3305,5 @@ function showPromptIfNoIncompatibilities(update) { em.update([], 0, mode, listener); } else -#endif showPrompt(update); } diff --git a/toolkit/toolkit-makefiles.sh b/toolkit/toolkit-makefiles.sh index 353adb22411..02806951ee5 100644 --- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -400,7 +400,6 @@ MAKEFILES_netwerk=" netwerk/streamconv/test/Makefile netwerk/test/Makefile netwerk/testserver/Makefile - netwerk/resources/Makefile netwerk/locales/Makefile netwerk/system/Makefile netwerk/system/win32/Makefile @@ -608,7 +607,6 @@ MAKEFILES_embedding=" embedding/browser/activex/src/control/Makefile embedding/browser/activex/src/control_kicker/Makefile embedding/browser/build/Makefile - embedding/browser/chrome/Makefile embedding/browser/webBrowser/Makefile embedding/browser/gtk/Makefile embedding/browser/gtk/src/Makefile @@ -890,7 +888,6 @@ if test -n "$MOZ_PSM"; then security/manager/boot/public/Makefile security/manager/ssl/Makefile security/manager/ssl/src/Makefile - security/manager/ssl/resources/Makefile security/manager/ssl/public/Makefile security/manager/pki/Makefile security/manager/pki/resources/Makefile diff --git a/toolkit/toolkit-tiers.mk b/toolkit/toolkit-tiers.mk index 110c5bedf22..6f4c1606292 100644 --- a/toolkit/toolkit-tiers.mk +++ b/toolkit/toolkit-tiers.mk @@ -189,9 +189,7 @@ endif # "toolkit" was. # -tier_toolkit_dirs += chrome - -tier_toolkit_dirs += profile +tier_toolkit_dirs += chrome profile # This must preceed xpfe ifdef MOZ_JPROF @@ -207,10 +205,6 @@ tier_toolkit_dirs += \ toolkit/components \ $(NULL) -ifndef MOZ_XUL_APP -tier_toolkit_dirs += themes -endif - ifdef MOZ_ENABLE_XREMOTE tier_toolkit_dirs += widget/src/xremoteclient endif @@ -219,9 +213,7 @@ ifdef MOZ_SPELLCHECK tier_toolkit_dirs += extensions/spellcheck endif -ifdef MOZ_XUL_APP tier_toolkit_dirs += toolkit -endif ifdef MOZ_XPINSTALL tier_toolkit_dirs += xpinstall @@ -243,18 +235,14 @@ tier_toolkit_dirs += extensions/java/xpcom/src endif ifndef BUILD_STATIC_LIBS -ifdef MOZ_XUL_APP ifneq (,$(MOZ_ENABLE_GTK2)) tier_toolkit_dirs += embedding/browser/gtk endif endif -endif -ifdef MOZ_XUL_APP ifndef BUILD_STATIC_LIBS tier_toolkit_dirs += toolkit/library endif -endif ifdef MOZ_ENABLE_LIBXUL tier_toolkit_dirs += xpcom/stub diff --git a/xpfe/components/download-manager/src/Makefile.in b/xpfe/components/download-manager/src/Makefile.in index efe637326ab..c70d6d87057 100644 --- a/xpfe/components/download-manager/src/Makefile.in +++ b/xpfe/components/download-manager/src/Makefile.in @@ -63,12 +63,10 @@ REQUIRES = xpcom \ widget \ pref \ embed_base \ + alerts \ + toolkitcomps \ $(NULL) -ifdef MOZ_XUL_APP -REQUIRES += alerts toolkitcomps -endif - CPPSRCS = \ nsDownloadManager.cpp \ $(NULL) diff --git a/xpfe/components/winhooks/Makefile.in b/xpfe/components/winhooks/Makefile.in index fce2de10893..4ccaf970bfe 100644 --- a/xpfe/components/winhooks/Makefile.in +++ b/xpfe/components/winhooks/Makefile.in @@ -72,9 +72,7 @@ REQUIRES = \ FORCE_STATIC_LIB = 1 -ifdef MOZ_XUL_APP LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre -endif include $(topsrcdir)/config/rules.mk