diff --git a/mozilla/Makefile.in b/mozilla/Makefile.in index 16fdc748ce8..c40429cf06a 100644 --- a/mozilla/Makefile.in +++ b/mozilla/Makefile.in @@ -44,7 +44,7 @@ include $(DEPTH)/config/autoconf.mk include $(topsrcdir)/build/unix/modules.mk -ifeq ($(BUILD_MODULES),all) +ifeq (,$(filter-out all,$(BUILD_MODULES))$(MOZ_XSLT_STANDALONE)) # # And now for something completely different... # Divide the default build into tiers. @@ -420,10 +420,20 @@ tier_99_dirs += \ $(NULL) endif -else +else # BUILD_MODULES # Standalone build +ifdef MOZ_XSLT_STANDALONE +DIRS = \ + xpcom/typelib \ + xpcom \ + parser/expat \ + content/xslt/src \ + $(NULL) + +SUBMAKEFILES = xpcom/typelib/Makefile +else DIRS = $(BUILD_MODULE_DIRS) # Hack to generate xpidl Makefile @@ -433,12 +443,13 @@ DIRS := xpcom/typelib $(DIRS) SUBMAKEFILES := xpcom/typelib/Makefile endif endif +endif default:: $(SUBMAKEFILES) $(MAKE) export $(MAKE) libs -endif # BUILD_MODULES == all +endif # BUILD_MODULES == all or MOZ_XSLT_STANDALONE STATIC_MAKEFILES := nsprpub directory/c-sdk security/nss diff --git a/mozilla/config/autoconf.mk.in b/mozilla/config/autoconf.mk.in index 695d045f142..15fdcd2cef5 100644 --- a/mozilla/config/autoconf.mk.in +++ b/mozilla/config/autoconf.mk.in @@ -196,7 +196,7 @@ MOZ_SVG_RENDERER_CAIRO = @MOZ_SVG_RENDERER_CAIRO@ MOZ_LIBART_CFLAGS = @MOZ_LIBART_CFLAGS@ MOZ_ENABLE_CANVAS = @MOZ_ENABLE_CANVAS@ MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@ -TX_EXE = @TX_EXE@ +MOZ_XSLT_STANDALONE = @MOZ_XSLT_STANDALONE@ # Mac's don't like / in a #include, so we include the libart # headers locally if we're using the external library diff --git a/mozilla/configure.in b/mozilla/configure.in index 67d32454fc4..ed666e85fd4 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -4041,12 +4041,13 @@ MOZ_BRANDING_DIRECTORY= MOZ_CALENDAR= MOZ_DBGRINFO_MODULES= MOZ_ENABLE_LIBXUL= -MOZ_EXTENSIONS_ALL=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming xmlterm datetime finger cview layout-debug tasks sql xforms permissions schema-validation reporter" +MOZ_EXTENSIONS_ALL=" cookie wallet content-packs xml-rpc xmlextras help p3p pref venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming xmlterm datetime finger cview layout-debug tasks sql xforms permissions schema-validation reporter" MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp xbm" MOZ_IMG_ENCODERS_DEFAULT="png" MOZ_IPCD= MOZ_JSDEBUGGER=1 MOZ_JSLOADER=1 +MOZ_LDAP_XPCOM= MOZ_LIBART_CFLAGS= MOZ_LIBART_LIBS= MOZ_MAIL_NEWS= @@ -4078,6 +4079,7 @@ MOZ_V1_STRING_ABI=1 MOZ_VIEW_SOURCE=1 MOZ_XPFE_COMPONENTS=1 MOZ_XPINSTALL=1 +MOZ_XSLT_STANDALONE= MOZ_XTF=1 MOZ_XUL=1 NS_PRINTING=1 @@ -4107,6 +4109,7 @@ MOZ_ARG_ENABLE_STRING(application, calendar xulrunner macbrowser (Camino) + content/xslt (Standalone Transformiix XSLT) standalone (use this for standalone xpcom/xpconnect or to manually drive a build)], [ MOZ_BUILD_APP=$enableval ] ) @@ -4121,7 +4124,7 @@ suite) MOZ_SUITE=1 MOZ_PROFILESHARING= MOZ_APP_VERSION=$SEAMONKEY_VERSION - MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help p3p pref transformiix venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming permissions reporter" + MOZ_EXTENSIONS_DEFAULT=" cookie wallet content-packs xml-rpc xmlextras help p3p pref venkman inspector irc universalchardet typeaheadfind webservices spellcheck gnomevfs auth sroaming permissions reporter" AC_DEFINE(MOZ_SUITE) ;; @@ -4132,7 +4135,7 @@ browser) MOZ_UPDATER=1 MOZ_PHOENIX=1 MOZ_APP_VERSION=$FIREFOX_VERSION - MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref transformiix universalchardet webservices inspector gnomevfs auth permissions reporter" + MOZ_EXTENSIONS_DEFAULT=" cookie xml-rpc xmlextras pref universalchardet webservices inspector gnomevfs auth permissions reporter" AC_DEFINE(MOZ_PHOENIX) ;; @@ -4147,7 +4150,7 @@ minimo) MOZ_APP_VERSION=`cat $topsrcdir/minimo/config/version.txt` MOZ_COMPOSER= MOZ_ENABLE_POSTSCRIPT= - MOZ_EXTENSIONS_DEFAULT="xml-rpc xmlextras transformiix webservices spatialnavigation" + MOZ_EXTENSIONS_DEFAULT="xml-rpc xmlextras webservices spatialnavigation" MOZ_IMG_DECODERS_DEFAULT="png gif jpeg" MOZ_IMG_ENCODERS_DEFAULT= MOZ_IMG_ENCODERS= @@ -4220,7 +4223,7 @@ calendar) MOZ_SUNBIRD=1 MOZ_CALENDAR=1 MOZ_APP_VERSION=`cat $topsrcdir/calendar/sunbird/config/version.txt` - MOZ_EXTENSIONS_DEFAULT=" pref xmlextras transformiix" + MOZ_EXTENSIONS_DEFAULT=" pref xmlextras" AC_DEFINE(MOZ_SUNBIRD) ;; @@ -4232,7 +4235,7 @@ xulrunner) MOZ_XULRUNNER=1 MOZ_ENABLE_LIBXUL=1 MOZ_APP_VERSION=$MOZILLA_VERSION - MOZ_EXTENSIONS_DEFAULT=" xml-rpc xmlextras pref transformiix universalchardet webservices gnomevfs auth" + MOZ_EXTENSIONS_DEFAULT=" xml-rpc xmlextras pref universalchardet webservices gnomevfs auth" AC_DEFINE(MOZ_XULRUNNER) ;; @@ -4240,10 +4243,18 @@ macbrowser) MOZ_APP_NAME=mozilla MOZ_APP_DISPLAYNAME=Mozilla MOZ_APP_VERSION=$MOZILLA_VERSION - MOZ_EXTENSIONS_DEFAULT=" cookie xmlextras universalchardet typeaheadfind transformiix permissions" + MOZ_EXTENSIONS_DEFAULT=" cookie xmlextras universalchardet typeaheadfind permissions" AC_DEFINE(MOZ_MACBROWSER) ;; +content/xslt) + MOZ_APP_NAME=mozilla + MOZ_EXTENSIONS_DEFAULT="" + AC_DEFINE(TX_EXE) + MOZ_XSLT_STANDALONE=1 + MOZ_APP_VERSION=$MOZILLA_VERSION + ;; + standalone) MOZ_APP_NAME=mozilla MOZ_APP_DISPLAYNAME=Mozilla @@ -5109,15 +5120,6 @@ dnl if test -n "$MOZ_SVG_FOREIGNOBJECT"; then dnl AC_DEFINE(MOZ_SVG_FOREIGNOBJECT) dnl fi -dnl ======================================================== -dnl Transformiix -dnl ======================================================== - -dnl To build transformiix standalone, set TX_EXE while configuring -if test "$TX_EXE"; then - AC_DEFINE(TX_EXE) -fi - dnl ======================================================== dnl Installer dnl ======================================================== @@ -6718,7 +6720,7 @@ AC_SUBST(MOZ_SVG_FOREIGNOBJECT) AC_SUBST(MOZ_SVG_RENDERER_GDIPLUS) AC_SUBST(MOZ_SVG_RENDERER_LIBART) AC_SUBST(MOZ_SVG_RENDERER_CAIRO) -AC_SUBST(TX_EXE) +AC_SUBST(MOZ_XSLT_STANDALONE) AC_SUBST(MOZ_JS_LIBS) AC_SUBST(MOZ_PSM) AC_SUBST(BUILD_MODULES) diff --git a/mozilla/content/Makefile.in b/mozilla/content/Makefile.in index 569bc3d3523..3bf86857605 100644 --- a/mozilla/content/Makefile.in +++ b/mozilla/content/Makefile.in @@ -43,7 +43,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = content -DIRS = base canvas html xml xul xbl xsl +DIRS = base canvas html xml xul xbl xslt ifdef MOZ_SVG DIRS += svg diff --git a/mozilla/content/xslt/Makefile.in b/mozilla/content/xslt/Makefile.in index 8b7c0fe5e54..5809bd07c60 100755 --- a/mozilla/content/xslt/Makefile.in +++ b/mozilla/content/xslt/Makefile.in @@ -42,8 +42,6 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = public - -include $(topsrcdir)/config/config.mk +DIRS = public src include $(topsrcdir)/config/rules.mk diff --git a/mozilla/content/xslt/src/Makefile.in b/mozilla/content/xslt/src/Makefile.in index 36cf10eb355..7eceb5fac62 100644 --- a/mozilla/content/xslt/src/Makefile.in +++ b/mozilla/content/xslt/src/Makefile.in @@ -44,8 +44,8 @@ include $(DEPTH)/config/autoconf.mk DIRS = base xml xpath xslt -ifdef TX_EXE -DIRS += lib main +ifdef MOZ_XSLT_STANDALONE +DIRS += main endif include $(topsrcdir)/config/rules.mk diff --git a/mozilla/content/xslt/src/base/Makefile.in b/mozilla/content/xslt/src/base/Makefile.in index 703aaed0508..cf9529f9aff 100644 --- a/mozilla/content/xslt/src/base/Makefile.in +++ b/mozilla/content/xslt/src/base/Makefile.in @@ -50,11 +50,12 @@ REQUIRES = string \ xpcom \ $(NULL) -ifndef TX_EXE +ifndef MOZ_XSLT_STANDALONE REQUIRES += unicharutil \ dom \ content \ layout \ + pref \ widget \ necko \ caps \ @@ -64,15 +65,15 @@ REQUIRES += unicharutil \ $(NULL) endif -CPPSRCS = Double.cpp \ - List.cpp \ +CPPSRCS = txDouble.cpp \ + txList.cpp \ txAtoms.cpp \ txExpandedNameMap.cpp \ txNamespaceMap.cpp \ txURIUtils.cpp -ifdef TX_EXE -CPPSRCS += SimpleErrorObserver.cpp \ +ifdef MOZ_XSLT_STANDALONE +CPPSRCS += txSimpleErrorObserver.cpp \ txStringUtils.cpp endif @@ -82,5 +83,9 @@ FORCE_STATIC_LIB = 1 include $(topsrcdir)/config/rules.mk -INCLUDES += -I$(srcdir)/../xpath -I$(srcdir)/../xslt -I$(srcdir)/../xml \ - -I$(srcdir)/../xml/dom -I$(srcdir) +INCLUDES += \ + -I$(srcdir) \ + -I$(srcdir)/../xml \ + -I$(srcdir)/../xpath \ + -I$(srcdir)/../xslt \ + $(NULL) diff --git a/mozilla/content/xslt/src/base/txDouble.cpp b/mozilla/content/xslt/src/base/txDouble.cpp index 8fd9e0c4cd4..b20cba5be73 100644 --- a/mozilla/content/xslt/src/base/txDouble.cpp +++ b/mozilla/content/xslt/src/base/txDouble.cpp @@ -37,7 +37,7 @@ #include "nsString.h" #include "txCore.h" -#include "XMLUtils.h" +#include "txXMLUtils.h" #include #include #ifdef WIN32 diff --git a/mozilla/content/xslt/src/base/txExpandedNameMap.h b/mozilla/content/xslt/src/base/txExpandedNameMap.h index 497c6bf4c92..c68b1a21708 100644 --- a/mozilla/content/xslt/src/base/txExpandedNameMap.h +++ b/mozilla/content/xslt/src/base/txExpandedNameMap.h @@ -40,7 +40,7 @@ #define TRANSFRMX_EXPANDEDNAMEMAP_H #include "txError.h" -#include "XMLUtils.h" +#include "txXMLUtils.h" class TxObject; diff --git a/mozilla/content/xslt/src/base/txList.cpp b/mozilla/content/xslt/src/base/txList.cpp index f4952e38d29..fb965582945 100644 --- a/mozilla/content/xslt/src/base/txList.cpp +++ b/mozilla/content/xslt/src/base/txList.cpp @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "List.h" +#include "txList.h" //----------------------------/ //- Implementation of txList -/ diff --git a/mozilla/content/xslt/src/base/txLog.h b/mozilla/content/xslt/src/base/txLog.h index a9b2c2491af..e6b4233b977 100644 --- a/mozilla/content/xslt/src/base/txLog.h +++ b/mozilla/content/xslt/src/base/txLog.h @@ -36,8 +36,8 @@ * * ***** END LICENSE BLOCK ***** */ -#ifndef TxLog_h__ -#define TxLog_h__ +#ifndef txLog_h__ +#define txLog_h__ #include "prlog.h" #include "prmem.h" diff --git a/mozilla/content/xslt/src/base/txSimpleErrorObserver.cpp b/mozilla/content/xslt/src/base/txSimpleErrorObserver.cpp index d12daecf5db..190bc1b4f88 100644 --- a/mozilla/content/xslt/src/base/txSimpleErrorObserver.cpp +++ b/mozilla/content/xslt/src/base/txSimpleErrorObserver.cpp @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "ErrorObserver.h" +#include "txErrorObserver.h" #include "nsString.h" /** diff --git a/mozilla/content/xslt/src/base/txTokenizer.h b/mozilla/content/xslt/src/base/txTokenizer.h index 287516037a1..07859f3ce57 100644 --- a/mozilla/content/xslt/src/base/txTokenizer.h +++ b/mozilla/content/xslt/src/base/txTokenizer.h @@ -40,7 +40,7 @@ #define txTokenizer_h___ #include "nsDependentSubstring.h" -#include "XMLUtils.h" +#include "txXMLUtils.h" class txTokenizer { diff --git a/mozilla/content/xslt/src/base/txURIUtils.cpp b/mozilla/content/xslt/src/base/txURIUtils.cpp index 83342470a4f..cd9e0b7335d 100644 --- a/mozilla/content/xslt/src/base/txURIUtils.cpp +++ b/mozilla/content/xslt/src/base/txURIUtils.cpp @@ -202,113 +202,6 @@ void URIUtils::resolveHref(const nsAString& href, const nsAString& base, #ifndef TX_EXE -nsIScriptSecurityManager *gTxSecurityManager = 0; - -// static -PRBool URIUtils::CanCallerAccess(nsIDOMNode *aNode) -{ - if (!gTxSecurityManager) { - // No security manager available, let any calls go through... - - return PR_TRUE; - } - - nsCOMPtr subjectPrincipal; - gTxSecurityManager->GetSubjectPrincipal(getter_AddRefs(subjectPrincipal)); - - if (!subjectPrincipal) { - // we're running as system, grant access to the node. - - return PR_TRUE; - } - - // Check whether the subject principal is the system principal. - // For performance, we will avoid calling SubjectPrincipalIsChrome() - // since it calls GetSubjectPrincipal() which causes us to walk - // the JS frame stack. We already did that above, so just get the - // system principal from the security manager, and do a raw comparison. - nsCOMPtr systemPrincipal; - gTxSecurityManager->GetSystemPrincipal(getter_AddRefs(systemPrincipal)); - - if (subjectPrincipal == systemPrincipal) { - // we're running as system, grant access to the node. - - return PR_TRUE; - } - - // Ask the securitymanager if we have "UniversalBrowserRead" - PRBool caps = PR_FALSE; - nsresult rv = - gTxSecurityManager->IsCapabilityEnabled("UniversalBrowserRead", - &caps); - NS_ENSURE_SUCCESS(rv, PR_FALSE); - if (caps) { - return PR_TRUE; - } - - // Make sure that this is a real node. We do this by first QI'ing to - // nsIContent (which is important performance wise) and if that QI - // fails we QI to nsIDocument. If both those QI's fail we won't let - // the caller access this unknown node. - nsIPrincipal *principal = nsnull; - nsCOMPtr content = do_QueryInterface(aNode); - nsCOMPtr attr; - nsCOMPtr doc; - - if (!content) { - doc = do_QueryInterface(aNode); - - if (!doc) { - attr = do_QueryInterface(aNode); - if (!attr) { - // aNode is not a nsIContent, a nsIAttribute or a nsIDocument, - // something weird is going on... - - NS_ERROR("aNode is not a nsIContent, a nsIAttribute or a nsIDocument!"); - - return PR_FALSE; - } - } - } - - if (!doc) { - nsCOMPtr domDoc; - aNode->GetOwnerDocument(getter_AddRefs(domDoc)); - if (!domDoc) { - nsINodeInfo *ni = content ? content->NodeInfo() : attr->NodeInfo(); - - principal = ni->GetDocumentPrincipal(); - if (!principal) { - // we can't get to the principal so we'll give up and give the - // caller access - - return PR_TRUE; - } - } - else { - doc = do_QueryInterface(domDoc); - NS_ASSERTION(doc, "QI to nsIDocument failed"); - } - } - - if (!principal) { - principal = doc->GetPrincipal(); - } - - if (!principal) { - // We can't get hold of the principal for this node. This should happen - // very rarely, like for textnodes out of the tree and