diff --git a/mozilla/Makefile.in b/mozilla/Makefile.in index f52bb2210ea..6f77f577d64 100644 --- a/mozilla/Makefile.in +++ b/mozilla/Makefile.in @@ -262,7 +262,7 @@ endif ifdef MOZ_PHOENIX tier_99_dirs += browser else -ifdef MOZ_XPFE_COMPONENTS +ifneq (,$(MOZ_XPFE_COMPONENTS)$(MOZ_XUL)) tier_99_dirs += xpfe/bootstrap endif endif diff --git a/mozilla/accessible/src/base/nsAccessibilityService.cpp b/mozilla/accessible/src/base/nsAccessibilityService.cpp index 09b81d4896d..7921c116130 100644 --- a/mozilla/accessible/src/base/nsAccessibilityService.cpp +++ b/mozilla/accessible/src/base/nsAccessibilityService.cpp @@ -76,6 +76,7 @@ #include "nsRootAccessible.h" #include "nsString.h" #include "nsTextFragment.h" +#ifdef MOZ_XUL #include "nsXULColorPickerAccessible.h" #include "nsXULFormControlAccessible.h" #include "nsXULMenuAccessible.h" @@ -83,6 +84,7 @@ #include "nsXULTabAccessible.h" #include "nsXULTextAccessible.h" #include "nsXULTreeAccessible.h" +#endif #include "nsRootAccessibleWrap.h" #include "nsCaretAccessible.h" #include "nsIAccessibleCaret.h" diff --git a/mozilla/accessible/src/base/nsDocAccessible.cpp b/mozilla/accessible/src/base/nsDocAccessible.cpp index e4ef31fdde7..181124c016e 100644 --- a/mozilla/accessible/src/base/nsDocAccessible.cpp +++ b/mozilla/accessible/src/base/nsDocAccessible.cpp @@ -44,7 +44,9 @@ #include "nsIDOMNSDocument.h" #include "nsIDOMDocument.h" #include "nsIDOMDocumentType.h" +#ifdef MOZ_XUL #include "nsIXULDocument.h" +#endif #include "nsINameSpaceManager.h" #include "nsIWebNavigation.h" #include "nsIURI.h" @@ -153,15 +155,17 @@ NS_IMETHODIMP nsDocAccessible::GetMimeType(nsAString& aMimeType) NS_IMETHODIMP nsDocAccessible::GetDocType(nsAString& aDocType) { - nsCOMPtr xulDoc(do_QueryInterface(mDocument)); nsCOMPtr domDoc(do_QueryInterface(mDocument)); nsCOMPtr docType; +#ifdef MOZ_XUL + nsCOMPtr xulDoc(do_QueryInterface(mDocument)); if (xulDoc) { aDocType = NS_LITERAL_STRING("window"); // doctype not implemented for XUL at time of writing - causes assertion return NS_OK; - } - else if (domDoc && NS_SUCCEEDED(domDoc->GetDoctype(getter_AddRefs(docType))) && docType) { + } else +#endif + if (domDoc && NS_SUCCEEDED(domDoc->GetDoctype(getter_AddRefs(docType))) && docType) { return docType->GetName(aDocType); } diff --git a/mozilla/accessible/src/base/nsRootAccessible.cpp b/mozilla/accessible/src/base/nsRootAccessible.cpp index afd0887bd63..7544d79acb4 100644 --- a/mozilla/accessible/src/base/nsRootAccessible.cpp +++ b/mozilla/accessible/src/base/nsRootAccessible.cpp @@ -59,12 +59,21 @@ #include "nsIScriptGlobalObject.h" #include "nsIScrollableView.h" #include "nsIServiceManager.h" -#include "nsITreeSelection.h" #include "nsIViewManager.h" #include "nsLayoutAtoms.h" #include "nsReadableUtils.h" #include "nsRootAccessible.h" +#ifdef MOZ_XUL #include "nsXULTreeAccessible.h" +#include "nsITreeSelection.h" +#include "nsIXULDocument.h" +#endif +#include "nsAccessibilityService.h" +#include "nsISelectionPrivate.h" +#include "nsICaret.h" +#include "nsIAccessibleCaret.h" +#include "nsIDOMHTMLInputElement.h" +#include "nsAccessibleEventData.h" NS_INTERFACE_MAP_BEGIN(nsRootAccessible) NS_INTERFACE_MAP_ENTRY(nsIAccessibleEventReceiver) @@ -413,6 +422,7 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) else if (NS_FAILED(mAccService->GetAccessibleFor(targetNode, getter_AddRefs(accessible)))) return NS_OK; +#ifdef MOZ_XUL // If it's a tree element, need the currently selected item PRInt32 treeIndex = -1; nsCOMPtr treeBox; @@ -432,17 +442,20 @@ NS_IMETHODIMP nsRootAccessible::HandleEvent(nsIDOMEvent* aEvent) } } } +#endif nsAutoString eventType; aEvent->GetType(eventType); #ifndef MOZ_ACCESSIBILITY_ATK +#ifdef MOZ_XUL // tree event if (treeItemAccessible && (eventType.EqualsIgnoreCase("DOMMenuItemActive") || eventType.EqualsIgnoreCase("select"))) { HandleEvent(nsIAccessibleEventListener::EVENT_FOCUS, treeItemAccessible, nsnull); return NS_OK; } +#endif if (eventType.EqualsIgnoreCase("focus") || eventType.EqualsIgnoreCase("DOMMenuItemActive")) { if (optionTargetNode && diff --git a/mozilla/chrome/src/nsChromeProtocolHandler.cpp b/mozilla/chrome/src/nsChromeProtocolHandler.cpp index 7358875ab48..b562377260e 100644 --- a/mozilla/chrome/src/nsChromeProtocolHandler.cpp +++ b/mozilla/chrome/src/nsChromeProtocolHandler.cpp @@ -63,8 +63,10 @@ #include "nsIServiceManager.h" #include "nsIStandardURL.h" #include "nsIStreamListener.h" +#ifdef MOZ_XUL #include "nsIXULPrototypeCache.h" #include "nsIXULPrototypeDocument.h" +#endif #include "nsNetCID.h" #include "nsXPIDLString.h" #include "nsString.h" @@ -75,7 +77,9 @@ static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID); +#ifdef MOZ_XUL static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID); +#endif // This comes from nsChromeRegistry.cpp extern nsIChromeRegistry* gChromeRegistry; @@ -644,6 +648,7 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI, nsresult rv; nsCOMPtr result; +#ifdef MOZ_XUL // Check the prototype cache to see if we've already got the // document in the cache. nsCOMPtr cache = @@ -675,7 +680,9 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI, rv = nsCachedChromeChannel::Create(aURI, getter_AddRefs(result)); if (NS_FAILED(rv)) return rv; } - else { + else +#endif + { // Miss. Resolve the chrome URL using the registry and do a // normal necko load. //nsXPIDLCString oldSpec; @@ -777,8 +784,10 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI, if (file) { rv = fastLoadServ->AddDependency(file); +#ifdef MOZ_XUL if (NS_FAILED(rv)) cache->AbortFastLoads(); +#endif } } } diff --git a/mozilla/chrome/src/nsChromeRegistry.cpp b/mozilla/chrome/src/nsChromeRegistry.cpp index 5f79bff8c92..71ae93c27a7 100644 --- a/mozilla/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/chrome/src/nsChromeRegistry.cpp @@ -76,7 +76,6 @@ #include "nsIWindowMediator.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" -#include "nsIXULPrototypeCache.h" #include "nsIStyleSheet.h" #include "nsIHTMLCSSStyleSheet.h" #include "nsIHTMLStyleSheet.h" @@ -86,7 +85,10 @@ #include "nsIStyleSet.h" #include "nsISupportsArray.h" #include "nsIDocumentObserver.h" +#ifdef MOZ_XUL #include "nsIXULDocument.h" +#include "nsIXULPrototypeCache.h" +#endif #include "nsIIOService.h" #include "nsIResProtocolHandler.h" #include "nsLayoutCID.h" @@ -1415,11 +1417,13 @@ nsresult nsChromeRegistry::FlushCaches() { nsresult rv; +#ifdef MOZ_XUL // Flush the style sheet cache completely. nsCOMPtr xulCache = do_GetService("@mozilla.org/xul/xul-prototype-cache;1", &rv); if (NS_SUCCEEDED(rv) && xulCache) xulCache->FlushSkinFiles(); +#endif // Flush the new imagelib image chrome cache. nsCOMPtr imageCache(do_GetService("@mozilla.org/image/cache;1", &rv)); @@ -2926,6 +2930,7 @@ nsChromeRegistry::ReloadChrome() // Do a reload of all top level windows. nsresult rv = NS_OK; +#ifdef MOZ_XUL // Flush the cache completely. nsCOMPtr xulCache = do_GetService("@mozilla.org/xul/xul-prototype-cache;1", &rv); @@ -2933,6 +2938,7 @@ nsChromeRegistry::ReloadChrome() rv = xulCache->Flush(); if (NS_FAILED(rv)) return rv; } +#endif nsCOMPtr bundleService = do_GetService(kStringBundleServiceCID, &rv); diff --git a/mozilla/config/config.mak b/mozilla/config/config.mak index a17123d0a2f..0957716769c 100644 --- a/mozilla/config/config.mak +++ b/mozilla/config/config.mak @@ -343,7 +343,7 @@ CFLAGS = $(CFLAGS) -DUSE_STRING2 #!ifdef MOZ_XUL MOZ_XUL=1 -CFLAGS=$(CFLAGS) -DINCLUDE_XUL -DMOZ_XUL +CFLAGS=$(CFLAGS) -DMOZ_XUL #!endif !ifndef DISABLE_MATHML diff --git a/mozilla/configure b/mozilla/configure index 9c8a897291f..37469596dfc 100755 --- a/mozilla/configure +++ b/mozilla/configure @@ -280,7 +280,7 @@ ac_help="$ac_help ac_help="$ac_help --disable-glibtest Do not try to compile and run a test GLIB program" ac_help="$ac_help - --disable-xul Disable XUL (standalone modules only)" + --disable-xul Disable XUL" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -3045,7 +3045,7 @@ else echo "$ac_t""no" 1>&6 fi -for ac_prog in gawk mawk nawk awk +for ac_prog in mawk gawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -14444,13 +14444,12 @@ if test "$MOZ_XUL"; then #define MOZ_XUL 1 EOF - cat >> confdefs.h <<\EOF -#define INCLUDE_XUL 1 -EOF - +else + MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e 's/venkman//' -e 's/irc//'` fi + if test "$OS_ARCH" = "WINNT" -a -z "$GNU_CC"; then XPCOM_GLUE_LIBS='$(DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX) $(DIST)/lib/$(LIB_PREFIX)string_s.$(LIB_SUFFIX) $(DIST)/lib/$(LIB_PREFIX)string_obsolete_s.$(LIB_SUFFIX)' else @@ -14488,14 +14487,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext < int main() { int x = 1; x++; ; return 0; } EOF -if { (eval echo configure:14499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 diff --git a/mozilla/configure.in b/mozilla/configure.in index aa9ed096ba1..88e37728759 100644 --- a/mozilla/configure.in +++ b/mozilla/configure.in @@ -4792,12 +4792,15 @@ dnl disable xul dnl ======================================================== MOZ_XUL=1 MOZ_ARG_DISABLE_BOOL(xul, -[ --disable-xul Disable XUL (standalone modules only)], +[ --disable-xul Disable XUL], MOZ_XUL= ) if test "$MOZ_XUL"; then AC_DEFINE(MOZ_XUL) - AC_DEFINE(INCLUDE_XUL) +else + dnl remove extensions that require XUL + MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e 's/venkman//' -e 's/irc//'` fi + AC_SUBST(MOZ_XUL) dnl ======================================================== diff --git a/mozilla/content/base/src/nsDocumentViewer.cpp b/mozilla/content/base/src/nsDocumentViewer.cpp index fe54d2026bb..4f4575d9236 100644 --- a/mozilla/content/base/src/nsDocumentViewer.cpp +++ b/mozilla/content/base/src/nsDocumentViewer.cpp @@ -109,7 +109,9 @@ #include "nsIDOMHTMLLinkElement.h" #include "nsIDOMHTMLImageElement.h" #include "nsIDOMHTMLFrameSetElement.h" +#ifdef MOZ_XUL #include "nsIXULDocument.h" // Temporary code for Bug 136185 +#endif #include "nsIChromeRegistry.h" #include "nsIClipboardHelper.h" @@ -1499,11 +1501,13 @@ DocumentViewerImpl::Hide(void) selPrivate->RemoveSelectionListener(mSelectionListener); } +#ifdef MOZ_XUL nsCOMPtr xul_doc(do_QueryInterface(mDocument)); if (xul_doc) { xul_doc->OnHide(); } +#endif mPresShell->Destroy(); @@ -1848,10 +1852,11 @@ DocumentViewerImpl::MakeWindow(nsIWidget* aParentWidget, treeItem->GetItemType(&itemType); if (itemType == nsIDocShellTreeItem::typeContent || itemType == nsIDocShellTreeItem::typeContentWrapper) { +#ifdef MOZ_XUL nsCOMPtr xulDoc(do_QueryInterface(mDocument)); - if (!xulDoc) { + if (!xulDoc) +#endif contentType = eContentTypeContent; - } } // pass in a native widget to be the parent widget ONLY if the view hierarchy will stand alone. diff --git a/mozilla/content/base/src/nsPrintEngine.cpp b/mozilla/content/base/src/nsPrintEngine.cpp index a54ab26b094..483612dd82b 100644 --- a/mozilla/content/base/src/nsPrintEngine.cpp +++ b/mozilla/content/base/src/nsPrintEngine.cpp @@ -169,7 +169,6 @@ static const char* kPrintingPromptService = "@mozilla.org/embedcomp/printingprom #include "nsIDOMHTMLAreaElement.h" #include "nsIDOMHTMLLinkElement.h" #include "nsIDOMHTMLImageElement.h" -#include "nsIXULDocument.h" // Temporary code for Bug 136185 #include "nsIContentViewerContainer.h" #include "nsIContentViewer.h" diff --git a/mozilla/content/base/src/nsRuleNode.cpp b/mozilla/content/base/src/nsRuleNode.cpp index 063722bc61a..9d896cb4c5b 100644 --- a/mozilla/content/base/src/nsRuleNode.cpp +++ b/mozilla/content/base/src/nsRuleNode.cpp @@ -957,7 +957,6 @@ static const PropertyCheckData UIResetCheckProperties[] = { CHECKDATA_PROP(nsRuleDataUserInterface, mForceBrokenImageIcon, CHECKDATA_VALUE, PR_FALSE) }; -#ifdef INCLUDE_XUL static const PropertyCheckData XULCheckProperties[] = { CHECKDATA_PROP(nsRuleDataXUL, mBoxAlign, CHECKDATA_VALUE, PR_FALSE), CHECKDATA_PROP(nsRuleDataXUL, mBoxDirection, CHECKDATA_VALUE, PR_FALSE), @@ -966,7 +965,6 @@ static const PropertyCheckData XULCheckProperties[] = { CHECKDATA_PROP(nsRuleDataXUL, mBoxPack, CHECKDATA_VALUE, PR_FALSE), CHECKDATA_PROP(nsRuleDataXUL, mBoxOrdinal, CHECKDATA_VALUE, PR_FALSE) }; -#endif #ifdef MOZ_SVG static const PropertyCheckData SVGCheckProperties[] = { @@ -1447,7 +1445,6 @@ nsRuleNode::GetQuotesData(nsStyleContext* aContext, PRBool aComputeData) return res; } -#ifdef INCLUDE_XUL const nsStyleStruct* nsRuleNode::GetXULData(nsStyleContext* aContext, PRBool aComputeData) { @@ -1457,7 +1454,6 @@ nsRuleNode::GetXULData(nsStyleContext* aContext, PRBool aComputeData) return WalkRuleTree(eStyleStruct_XUL, aContext, &ruleData, &xulData, aComputeData); } -#endif #ifdef MOZ_SVG const nsStyleStruct* @@ -1761,14 +1757,12 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex return ui; } -#ifdef INCLUDE_XUL case eStyleStruct_XUL: { nsStyleXUL* xul = new (mPresContext) nsStyleXUL(); aContext->SetStyle(eStyleStruct_XUL, xul); return xul; } -#endif #ifdef MOZ_SVG case eStyleStruct_SVG: @@ -4351,7 +4345,6 @@ nsRuleNode::ComputeQuotesData(nsStyleStruct* aStartStruct, return quotes; } -#ifdef INCLUDE_XUL const nsStyleStruct* nsRuleNode::ComputeXULData(nsStyleStruct* aStartStruct, const nsRuleDataStruct& aData, @@ -4446,7 +4439,6 @@ nsRuleNode::ComputeXULData(nsStyleStruct* aStartStruct, return xul; } -#endif #ifdef MOZ_SVG static void diff --git a/mozilla/content/base/src/nsStyleContext.cpp b/mozilla/content/base/src/nsStyleContext.cpp index 757100f2529..67946d0af49 100644 --- a/mozilla/content/base/src/nsStyleContext.cpp +++ b/mozilla/content/base/src/nsStyleContext.cpp @@ -473,9 +473,7 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aOther) // FRAMECHANGE Structs: Display, XUL, Content, UserInterface, // Visibility, Quotes DO_STRUCT_DIFFERENCE(Display); -#ifdef INCLUDE_XUL DO_STRUCT_DIFFERENCE(XUL); -#endif DO_STRUCT_DIFFERENCE(Content); DO_STRUCT_DIFFERENCE(UserInterface); DO_STRUCT_DIFFERENCE(Visibility); @@ -805,7 +803,6 @@ void nsStyleContext::DumpRegressionData(nsIPresContext* aPresContext, FILE* out, (int)uiReset->mResizer); // XUL -#ifdef INCLUDE_XUL IndentBy(out,aIndent); const nsStyleXUL* xul = (const nsStyleXUL*)GetStyleData(eStyleStruct_XUL); fprintf(out, "mBoxPack, (int)xul->mBoxOrdinal); fprintf(out, "\" />\n"); -#endif // SVG #ifdef MOZ_SVG diff --git a/mozilla/content/html/style/src/nsCSSDeclaration.cpp b/mozilla/content/html/style/src/nsCSSDeclaration.cpp index 01d369d0655..9f188744f12 100644 --- a/mozilla/content/html/style/src/nsCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsCSSDeclaration.cpp @@ -68,9 +68,7 @@ static NS_DEFINE_IID(kCSSPageSID, NS_CSS_PAGE_SID); static NS_DEFINE_IID(kCSSContentSID, NS_CSS_CONTENT_SID); static NS_DEFINE_IID(kCSSUserInterfaceSID, NS_CSS_USER_INTERFACE_SID); static NS_DEFINE_IID(kCSSAuralSID, NS_CSS_AURAL_SID); -#ifdef INCLUDE_XUL static NS_DEFINE_IID(kCSSXULSID, NS_CSS_XUL_SID); -#endif #ifdef MOZ_SVG static NS_DEFINE_IID(kCSSSVGSID, NS_CSS_SVG_SID); @@ -1076,7 +1074,6 @@ void nsCSSAural::List(FILE* out, PRInt32 aIndent) const } #endif -#ifdef INCLUDE_XUL // --- nsCSSXUL ----------------- nsCSSXUL::nsCSSXUL(void) @@ -1119,8 +1116,6 @@ void nsCSSXUL::List(FILE* out, PRInt32 aIndent) const } #endif -#endif // INCLUDE_XUL - #ifdef MOZ_SVG // --- nsCSSSVG ----------------- @@ -1250,9 +1245,7 @@ nsCSSDeclaration::nsCSSDeclaration(const nsCSSDeclaration& aCopy) DECL_IF_COPY(Content); DECL_IF_COPY(UserInterface); DECL_IF_COPY(Aural); -#ifdef INCLUDE_XUL DECL_IF_COPY(XUL); -#endif #ifdef MOZ_SVG DECL_IF_COPY(SVG); @@ -1299,9 +1292,7 @@ nsCSSDeclaration::~nsCSSDeclaration(void) CSS_HAS_DELETE(Content); CSS_HAS_DELETE(UserInterface); CSS_HAS_DELETE(Aural); -#ifdef INCLUDE_XUL CSS_HAS_DELETE(XUL); -#endif #ifdef MOZ_SVG CSS_HAS_DELETE(SVG); @@ -1338,9 +1329,7 @@ nsCSSDeclaration::GetData(const nsID& aSID) CSS_IF_GET_ELSE(aSID, Content) CSS_IF_GET_ELSE(aSID, UserInterface) CSS_IF_GET_ELSE(aSID, Aural) -#ifdef INCLUDE_XUL CSS_IF_GET_ELSE(aSID, XUL) -#endif #ifdef MOZ_SVG CSS_IF_GET_ELSE(aSID, SVG) #endif @@ -1963,7 +1952,6 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -1984,7 +1972,6 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -2968,7 +2955,6 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -2992,7 +2978,6 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -3763,7 +3748,6 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -3784,7 +3768,6 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -4644,7 +4627,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -4669,7 +4651,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG diff --git a/mozilla/content/html/style/src/nsCSSDeclaration.h b/mozilla/content/html/style/src/nsCSSDeclaration.h index f28529555a6..3c63f7f3436 100644 --- a/mozilla/content/html/style/src/nsCSSDeclaration.h +++ b/mozilla/content/html/style/src/nsCSSDeclaration.h @@ -115,11 +115,9 @@ typedef nsCSSStruct nsRuleDataStruct; #define NS_CSS_AURAL_SID \ {0x166d2bb0, 0x5a3b, 0x11d2, {0x80, 0x3b, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a}} -#ifdef INCLUDE_XUL // {FC075D62-B1CF-47a1-AF4E-CB40E11A4314} #define NS_CSS_XUL_SID \ { 0xfc075d62, 0xb1cf, 0x47a1, { 0xaf, 0x4e, 0xcb, 0x40, 0xe1, 0x1a, 0x43, 0x14 } } -#endif #ifdef MOZ_SVG // {9A41A036-027B-45ef-89C9-6E32797839E7} @@ -502,7 +500,6 @@ struct nsCSSAural : public nsCSSStruct { // NEW struct nsRuleDataAural : public nsCSSAural { }; -#ifdef INCLUDE_XUL struct nsCSSXUL : public nsCSSStruct { nsCSSXUL(void); nsCSSXUL(const nsCSSXUL& aCopy); @@ -523,7 +520,6 @@ struct nsCSSXUL : public nsCSSStruct { struct nsRuleDataXUL : public nsCSSXUL { }; -#endif #ifdef MOZ_SVG struct nsCSSSVG : public nsCSSStruct { @@ -570,9 +566,7 @@ struct nsCSSDeclContains nsCSSBitField mHasUserInterface:1; // 8 nsCSSBitField mHasTable:1; // 9 nsCSSBitField mHasContent:1; // 10 -#if defined(INCLUDE_XUL) nsCSSBitField mHasXUL:1; // 11 -#endif nsCSSBitField mHasBreaks:1; // 12 nsCSSBitField mHasPage:1; // 13 nsCSSBitField mHasAural:1; // 14 @@ -600,14 +594,8 @@ struct nsCSSDeclContains #define CSSDECLIDX_UserInterface(decl) ((decl).mContains.mHasUserInterface + CSSDECLIDX_Position(decl)) #define CSSDECLIDX_Table(decl) ((decl).mContains.mHasTable + CSSDECLIDX_UserInterface(decl)) #define CSSDECLIDX_Content(decl) ((decl).mContains.mHasContent + CSSDECLIDX_Table(decl)) -#if defined(INCLUDE_XUL) #define CSSDECLIDX_XUL(decl) ((decl).mContains.mHasXUL + CSSDECLIDX_Content(decl)) -#endif -#if !defined(INCLUDE_XUL) -#define CSSDECLIDX_Breaks(decl) ((decl).mContains.mHasBreaks + CSSDECLIDX_Content(decl)) -#else #define CSSDECLIDX_Breaks(decl) ((decl).mContains.mHasBreaks + CSSDECLIDX_XUL(decl)) -#endif #define CSSDECLIDX_Page(decl) ((decl).mContains.mHasPage + CSSDECLIDX_Breaks(decl)) #define CSSDECLIDX_Aural(decl) ((decl).mContains.mHasAural + CSSDECLIDX_Page(decl)) #if defined(MOZ_SVG) diff --git a/mozilla/content/html/style/src/nsCSSLoader.cpp b/mozilla/content/html/style/src/nsCSSLoader.cpp index ff50e35429a..0359f9cbe4b 100644 --- a/mozilla/content/html/style/src/nsCSSLoader.cpp +++ b/mozilla/content/html/style/src/nsCSSLoader.cpp @@ -55,7 +55,7 @@ #include "nsIAtom.h" #include "nsCSSLoader.h" -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL #include "nsIXULPrototypeCache.h" #endif @@ -807,7 +807,7 @@ SheetLoadData::OnStreamComplete(nsIUnicharStreamLoader* aLoader, return mLoader->ParseSheet(aDataStream, this, completed); } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL static PRBool IsChromeURI(nsIURI* aURI) { NS_ASSERTION(aURI, "Have to pass in a URI"); @@ -990,7 +990,7 @@ CSSLoaderImpl::CreateSheet(nsIURI* aURI, nsCOMPtr sheet; // First, the XUL cache -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (IsChromeURI(aURI)) { nsCOMPtr cache(do_GetService("@mozilla.org/xul/xul-prototype-cache;1")); if (cache) { @@ -1542,7 +1542,7 @@ CSSLoaderImpl::SheetComplete(SheetLoadData* aLoadData, PRBool aSucceeded) // Now that it's marked complete, put the sheet in our cache if (aSucceeded && aLoadData->mURI) { -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (IsChromeURI(aLoadData->mURI)) { nsCOMPtr cache(do_GetService("@mozilla.org/xul/xul-prototype-cache;1")); if (cache) { @@ -1562,7 +1562,7 @@ CSSLoaderImpl::SheetComplete(SheetLoadData* aLoadData, PRBool aSucceeded) #endif URLKey key(aLoadData->mURI); mCompleteSheets.Put(&key, aLoadData->mSheet); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL } #endif } diff --git a/mozilla/content/html/style/src/nsCSSParser.cpp b/mozilla/content/html/style/src/nsCSSParser.cpp index 8cc1e78c2b6..c3b83069dff 100644 --- a/mozilla/content/html/style/src/nsCSSParser.cpp +++ b/mozilla/content/html/style/src/nsCSSParser.cpp @@ -252,7 +252,7 @@ protected: PRBool ParseSingleValueProperty(PRInt32& aErrorCode, nsCSSValue& aValue, nsCSSProperty aPropID); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL PRBool ParseTreePseudoElement(PRInt32& aErrorCode, nsCSSSelector& aSelector); #endif @@ -1561,7 +1561,7 @@ static PRBool IsSinglePseudoClass(const nsCSSSelector& aSelector) (aSelector.mPseudoClassList->mNext == nsnull)); } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL static PRBool IsTreePseudoElement(const nsString& aPseudo) { return Substring(aPseudo, 0, 10).Equals(NS_LITERAL_STRING("-moz-tree-")); @@ -1619,7 +1619,7 @@ PRBool CSSParserImpl::ParseSelectorGroup(PRInt32& aErrorCode, else { // append new pseudo element selector selector.Reset(); selector.mTag = pseudoClassList->mAtom; // steal ref count -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (IsTreePseudoElement(selector.mTag)) { // Take the remaining "pseudoclasses" that we parsed // inside the tree pseudoelement's ()-list, and @@ -2167,7 +2167,7 @@ void CSSParserImpl::ParsePseudoSelector(PRInt32& aDataMask, if (eCSSToken_Ident != mToken.mType) { // malformed selector if (eCSSToken_Function != mToken.mType || !( -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL // -moz-tree is a pseudo-element and therefore cannot be negated (!aIsNegated && IsTreePseudoElement(mToken.mIdent)) || #endif @@ -2217,7 +2217,7 @@ void CSSParserImpl::ParsePseudoSelector(PRInt32& aDataMask, aDataMask |= SEL_MASK_PELEM; aSelector.AddPseudoClass(pseudo); // store it here, it gets pulled later -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (eCSSToken_Function == mToken.mType && IsTreePseudoElement(mToken.mIdent)) { // We have encountered a pseudoelement of the form @@ -2784,7 +2784,7 @@ PRBool CSSParserImpl::ParseColorOpacity(PRInt32& aErrorCode, PRUint8& aOpacity) return PR_TRUE; } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL PRBool CSSParserImpl::ParseTreePseudoElement(PRInt32& aErrorCode, nsCSSSelector& aSelector) { @@ -3916,7 +3916,6 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_left: case eCSSProperty_right: return ParseVariant(aErrorCode, aValue, VARIANT_AHLP, nsnull); -#ifdef INCLUDE_XUL case eCSSProperty_box_align: return ParseVariant(aErrorCode, aValue, VARIANT_HK, nsCSSProps::kBoxAlignKTable); @@ -3933,7 +3932,6 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, nsCSSProps::kBoxPackKTable); case eCSSProperty_box_ordinal_group: return ParseVariant(aErrorCode, aValue, VARIANT_INTEGER, nsnull); -#endif #ifdef MOZ_SVG case eCSSProperty_fill: return ParseVariant(aErrorCode, aValue, VARIANT_HC | VARIANT_NONE, diff --git a/mozilla/content/html/style/src/nsCSSStruct.cpp b/mozilla/content/html/style/src/nsCSSStruct.cpp index 01d369d0655..9f188744f12 100644 --- a/mozilla/content/html/style/src/nsCSSStruct.cpp +++ b/mozilla/content/html/style/src/nsCSSStruct.cpp @@ -68,9 +68,7 @@ static NS_DEFINE_IID(kCSSPageSID, NS_CSS_PAGE_SID); static NS_DEFINE_IID(kCSSContentSID, NS_CSS_CONTENT_SID); static NS_DEFINE_IID(kCSSUserInterfaceSID, NS_CSS_USER_INTERFACE_SID); static NS_DEFINE_IID(kCSSAuralSID, NS_CSS_AURAL_SID); -#ifdef INCLUDE_XUL static NS_DEFINE_IID(kCSSXULSID, NS_CSS_XUL_SID); -#endif #ifdef MOZ_SVG static NS_DEFINE_IID(kCSSSVGSID, NS_CSS_SVG_SID); @@ -1076,7 +1074,6 @@ void nsCSSAural::List(FILE* out, PRInt32 aIndent) const } #endif -#ifdef INCLUDE_XUL // --- nsCSSXUL ----------------- nsCSSXUL::nsCSSXUL(void) @@ -1119,8 +1116,6 @@ void nsCSSXUL::List(FILE* out, PRInt32 aIndent) const } #endif -#endif // INCLUDE_XUL - #ifdef MOZ_SVG // --- nsCSSSVG ----------------- @@ -1250,9 +1245,7 @@ nsCSSDeclaration::nsCSSDeclaration(const nsCSSDeclaration& aCopy) DECL_IF_COPY(Content); DECL_IF_COPY(UserInterface); DECL_IF_COPY(Aural); -#ifdef INCLUDE_XUL DECL_IF_COPY(XUL); -#endif #ifdef MOZ_SVG DECL_IF_COPY(SVG); @@ -1299,9 +1292,7 @@ nsCSSDeclaration::~nsCSSDeclaration(void) CSS_HAS_DELETE(Content); CSS_HAS_DELETE(UserInterface); CSS_HAS_DELETE(Aural); -#ifdef INCLUDE_XUL CSS_HAS_DELETE(XUL); -#endif #ifdef MOZ_SVG CSS_HAS_DELETE(SVG); @@ -1338,9 +1329,7 @@ nsCSSDeclaration::GetData(const nsID& aSID) CSS_IF_GET_ELSE(aSID, Content) CSS_IF_GET_ELSE(aSID, UserInterface) CSS_IF_GET_ELSE(aSID, Aural) -#ifdef INCLUDE_XUL CSS_IF_GET_ELSE(aSID, XUL) -#endif #ifdef MOZ_SVG CSS_IF_GET_ELSE(aSID, SVG) #endif @@ -1963,7 +1952,6 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -1984,7 +1972,6 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -2968,7 +2955,6 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -2992,7 +2978,6 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -3763,7 +3748,6 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -3784,7 +3768,6 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -4644,7 +4627,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -4669,7 +4651,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG diff --git a/mozilla/content/html/style/src/nsCSSStruct.h b/mozilla/content/html/style/src/nsCSSStruct.h index f28529555a6..3c63f7f3436 100644 --- a/mozilla/content/html/style/src/nsCSSStruct.h +++ b/mozilla/content/html/style/src/nsCSSStruct.h @@ -115,11 +115,9 @@ typedef nsCSSStruct nsRuleDataStruct; #define NS_CSS_AURAL_SID \ {0x166d2bb0, 0x5a3b, 0x11d2, {0x80, 0x3b, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a}} -#ifdef INCLUDE_XUL // {FC075D62-B1CF-47a1-AF4E-CB40E11A4314} #define NS_CSS_XUL_SID \ { 0xfc075d62, 0xb1cf, 0x47a1, { 0xaf, 0x4e, 0xcb, 0x40, 0xe1, 0x1a, 0x43, 0x14 } } -#endif #ifdef MOZ_SVG // {9A41A036-027B-45ef-89C9-6E32797839E7} @@ -502,7 +500,6 @@ struct nsCSSAural : public nsCSSStruct { // NEW struct nsRuleDataAural : public nsCSSAural { }; -#ifdef INCLUDE_XUL struct nsCSSXUL : public nsCSSStruct { nsCSSXUL(void); nsCSSXUL(const nsCSSXUL& aCopy); @@ -523,7 +520,6 @@ struct nsCSSXUL : public nsCSSStruct { struct nsRuleDataXUL : public nsCSSXUL { }; -#endif #ifdef MOZ_SVG struct nsCSSSVG : public nsCSSStruct { @@ -570,9 +566,7 @@ struct nsCSSDeclContains nsCSSBitField mHasUserInterface:1; // 8 nsCSSBitField mHasTable:1; // 9 nsCSSBitField mHasContent:1; // 10 -#if defined(INCLUDE_XUL) nsCSSBitField mHasXUL:1; // 11 -#endif nsCSSBitField mHasBreaks:1; // 12 nsCSSBitField mHasPage:1; // 13 nsCSSBitField mHasAural:1; // 14 @@ -600,14 +594,8 @@ struct nsCSSDeclContains #define CSSDECLIDX_UserInterface(decl) ((decl).mContains.mHasUserInterface + CSSDECLIDX_Position(decl)) #define CSSDECLIDX_Table(decl) ((decl).mContains.mHasTable + CSSDECLIDX_UserInterface(decl)) #define CSSDECLIDX_Content(decl) ((decl).mContains.mHasContent + CSSDECLIDX_Table(decl)) -#if defined(INCLUDE_XUL) #define CSSDECLIDX_XUL(decl) ((decl).mContains.mHasXUL + CSSDECLIDX_Content(decl)) -#endif -#if !defined(INCLUDE_XUL) -#define CSSDECLIDX_Breaks(decl) ((decl).mContains.mHasBreaks + CSSDECLIDX_Content(decl)) -#else #define CSSDECLIDX_Breaks(decl) ((decl).mContains.mHasBreaks + CSSDECLIDX_XUL(decl)) -#endif #define CSSDECLIDX_Page(decl) ((decl).mContains.mHasPage + CSSDECLIDX_Breaks(decl)) #define CSSDECLIDX_Aural(decl) ((decl).mContains.mHasAural + CSSDECLIDX_Page(decl)) #if defined(MOZ_SVG) diff --git a/mozilla/content/html/style/src/nsCSSStyleRule.cpp b/mozilla/content/html/style/src/nsCSSStyleRule.cpp index 5a398221890..bb97ece1a82 100644 --- a/mozilla/content/html/style/src/nsCSSStyleRule.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleRule.cpp @@ -88,9 +88,7 @@ static NS_DEFINE_IID(kCSSDisplaySID, NS_CSS_DISPLAY_SID); static NS_DEFINE_IID(kCSSTableSID, NS_CSS_TABLE_SID); static NS_DEFINE_IID(kCSSContentSID, NS_CSS_CONTENT_SID); static NS_DEFINE_IID(kCSSUserInterfaceSID, NS_CSS_USER_INTERFACE_SID); -#ifdef INCLUDE_XUL static NS_DEFINE_IID(kCSSXULSID, NS_CSS_XUL_SID); -#endif #ifdef MOZ_SVG static NS_DEFINE_IID(kCSSSVGSID, NS_CSS_SVG_SID); #endif @@ -775,9 +773,7 @@ static nsresult MapContentForDeclaration(nsCSSDeclaration* aDecl, const nsStyleS static nsresult MapTextForDeclaration(nsCSSDeclaration* aDecl, const nsStyleStructID& aID, nsRuleDataText& aContent); static nsresult MapUIForDeclaration(nsCSSDeclaration* aDecl, const nsStyleStructID& aID, nsRuleDataUserInterface& aContent); -#ifdef INCLUDE_XUL static nsresult MapXULForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataXUL& aXUL); -#endif #ifdef MOZ_SVG static nsresult MapSVGForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataSVG& aSVG); @@ -856,10 +852,8 @@ CSSImportantRule::MapRuleInfoInto(nsRuleData* aRuleData) return MapTextForDeclaration(mDeclaration, aRuleData->mSID, *aRuleData->mTextData); else if (aRuleData->mUIData) return MapUIForDeclaration(mDeclaration, aRuleData->mSID, *aRuleData->mUIData); -#ifdef INCLUDE_XUL else if (aRuleData->mXULData) return MapXULForDeclaration(mDeclaration, *aRuleData->mXULData); -#endif #ifdef MOZ_SVG else if (aRuleData->mSVGData) return MapSVGForDeclaration(mDeclaration, *aRuleData->mSVGData); @@ -1513,10 +1507,8 @@ CSSStyleRuleImpl::MapRuleInfoInto(nsRuleData* aRuleData) return MapTextForDeclaration(mDeclaration, aRuleData->mSID, *aRuleData->mTextData); else if (aRuleData->mUIData) return MapUIForDeclaration(mDeclaration, aRuleData->mSID, *aRuleData->mUIData); -#ifdef INCLUDE_XUL else if (aRuleData->mXULData) return MapXULForDeclaration(mDeclaration, *aRuleData->mXULData); -#endif #ifdef MOZ_SVG else if (aRuleData->mSVGData) return MapSVGForDeclaration(mDeclaration, *aRuleData->mSVGData); @@ -1558,7 +1550,6 @@ MapFontForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataFont& aFont) return NS_OK; } -#ifdef INCLUDE_XUL static nsresult MapXULForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataXUL& aXUL) { @@ -1595,7 +1586,6 @@ MapXULForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataXUL& aXUL) return NS_OK; } -#endif #ifdef MOZ_SVG static nsresult diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp index cc89987cebd..dd194a3ba72 100644 --- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp @@ -100,10 +100,6 @@ #include "nsIStyleSet.h" #include "nsStyleUtil.h" #include "nsQuickSort.h" -#ifdef MOZ_XUL -#include "nsIXULContent.h" -#endif - #include "nsContentUtils.h" #include "nsIJSContextStack.h" #include "nsIScriptSecurityManager.h" diff --git a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp index 685367036d5..fd2cb6c2a53 100644 --- a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp +++ b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp @@ -1827,7 +1827,6 @@ nsComputedDOMStyle::GetAppearance(nsIFrame *aFrame, } -#ifdef INCLUDE_XUL nsresult nsComputedDOMStyle::GetBoxAlign(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -1960,8 +1959,6 @@ nsComputedDOMStyle::GetBoxPack(nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#endif // INCLUDE_XUL - nsresult nsComputedDOMStyle::GetBoxSizing(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -3628,14 +3625,12 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength) COMPUTED_STYLE_MAP_ENTRY(_moz_border_radius_bottomRight,BorderRadiusBottomRight), COMPUTED_STYLE_MAP_ENTRY(_moz_border_radius_topLeft, BorderRadiusTopLeft), COMPUTED_STYLE_MAP_ENTRY(_moz_border_radius_topRight, BorderRadiusTopRight), -#ifdef INCLUDE_XUL COMPUTED_STYLE_MAP_ENTRY(box_align, BoxAlign), COMPUTED_STYLE_MAP_ENTRY(box_direction, BoxDirection), COMPUTED_STYLE_MAP_ENTRY(box_flex, BoxFlex), COMPUTED_STYLE_MAP_ENTRY(box_ordinal_group, BoxOrdinalGroup), COMPUTED_STYLE_MAP_ENTRY(box_orient, BoxOrient), COMPUTED_STYLE_MAP_ENTRY(box_pack, BoxPack), -#endif COMPUTED_STYLE_MAP_ENTRY(box_sizing, BoxSizing), COMPUTED_STYLE_MAP_ENTRY(float_edge, FloatEdge), COMPUTED_STYLE_MAP_ENTRY(opacity, Opacity), diff --git a/mozilla/content/html/style/src/nsComputedDOMStyle.h b/mozilla/content/html/style/src/nsComputedDOMStyle.h index e51d29ee2f4..09dede074b1 100644 --- a/mozilla/content/html/style/src/nsComputedDOMStyle.h +++ b/mozilla/content/html/style/src/nsComputedDOMStyle.h @@ -142,14 +142,12 @@ private: nsresult GetAppearance(nsIFrame *aFrame, nsIDOMCSSValue** aValue); /* Box properties */ -#ifdef INCLUDE_XUL nsresult GetBoxAlign(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxDirection(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxFlex(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxOrdinalGroup(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxOrient(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxPack(nsIFrame *aFrame, nsIDOMCSSValue** aValue); -#endif // INCLUDE_XUL nsresult GetBoxSizing(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetWidth(nsIFrame *aFrame, nsIDOMCSSValue** aValue); diff --git a/mozilla/content/macbuild/contentSharedPrefix.h b/mozilla/content/macbuild/contentSharedPrefix.h index 588ec324d33..22068b76446 100644 --- a/mozilla/content/macbuild/contentSharedPrefix.h +++ b/mozilla/content/macbuild/contentSharedPrefix.h @@ -21,6 +21,5 @@ */ #define MOZ_XUL 1 -#define INCLUDE_XUL 1 #include "MacSharedPrefix.h" diff --git a/mozilla/content/macbuild/contentSharedPrefix_debug.h b/mozilla/content/macbuild/contentSharedPrefix_debug.h index b25f8e62d32..aa3fb711786 100644 --- a/mozilla/content/macbuild/contentSharedPrefix_debug.h +++ b/mozilla/content/macbuild/contentSharedPrefix_debug.h @@ -21,6 +21,5 @@ */ #define MOZ_XUL 1 -#define INCLUDE_XUL 1 #include "MacSharedPrefix_debug.h" diff --git a/mozilla/content/shared/public/nsCSSAnonBoxList.h b/mozilla/content/shared/public/nsCSSAnonBoxList.h index 2e3a92d1d76..e74c3ae672d 100644 --- a/mozilla/content/shared/public/nsCSSAnonBoxList.h +++ b/mozilla/content/shared/public/nsCSSAnonBoxList.h @@ -90,7 +90,7 @@ CSS_ANON_BOX(viewport, ":-moz-viewport") CSS_ANON_BOX(viewportScroll, ":-moz-viewport-scroll") CSS_ANON_BOX(selectScrolledContent, ":-moz-select-scrolled-content") -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL CSS_ANON_BOX(moztreerow, ":-moz-tree-row") CSS_ANON_BOX(moztreecell, ":-moz-tree-cell") CSS_ANON_BOX(moztreecolumn, ":-moz-tree-column") diff --git a/mozilla/content/shared/public/nsCSSProps.h b/mozilla/content/shared/public/nsCSSProps.h index 1508a903d42..bdf9d229a99 100644 --- a/mozilla/content/shared/public/nsCSSProps.h +++ b/mozilla/content/shared/public/nsCSSProps.h @@ -96,12 +96,10 @@ public: static const PRInt32 kBorderColorKTable[]; static const PRInt32 kBorderStyleKTable[]; static const PRInt32 kBorderWidthKTable[]; -#ifdef INCLUDE_XUL static const PRInt32 kBoxAlignKTable[]; static const PRInt32 kBoxDirectionKTable[]; static const PRInt32 kBoxOrientKTable[]; static const PRInt32 kBoxPackKTable[]; -#endif #ifdef MOZ_SVG static const PRInt32 kFillRuleKTable[]; static const PRInt32 kStrokeLinecapKTable[]; diff --git a/mozilla/content/shared/public/nsRuleNode.h b/mozilla/content/shared/public/nsRuleNode.h index 1ffe935fef0..70bf0c97e7d 100644 --- a/mozilla/content/shared/public/nsRuleNode.h +++ b/mozilla/content/shared/public/nsRuleNode.h @@ -257,10 +257,7 @@ struct nsRuleData nsRuleDataContent* mContentData; nsRuleDataText* mTextData; nsRuleDataUserInterface* mUIData; - -#ifdef INCLUDE_XUL nsRuleDataXUL* mXULData; -#endif #ifdef MOZ_SVG nsRuleDataSVG* mSVGData; @@ -273,10 +270,7 @@ struct nsRuleData mUIData(nsnull) { mCanStoreInRuleTree = PR_TRUE; - -#ifdef INCLUDE_XUL mXULData = nsnull; -#endif #ifdef MOZ_SVG mSVGData = nsnull; #endif @@ -485,12 +479,10 @@ protected: nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail& aRuleDetail, PRBool aInherited); -#ifdef INCLUDE_XUL const nsStyleStruct* ComputeXULData(nsStyleStruct* aStartXUL, const nsRuleDataStruct& aXULData, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail& aRuleDetail, PRBool aInherited); -#endif #ifdef MOZ_SVG const nsStyleStruct* ComputeSVGData(nsStyleStruct* aStartSVG, const nsRuleDataStruct& aSVGData, @@ -531,9 +523,7 @@ protected: const nsStyleStruct* GetTextResetData(nsStyleContext* aContext, PRBool aComputeData); const nsStyleStruct* GetUserInterfaceData(nsStyleContext* aContext, PRBool aComputeData); const nsStyleStruct* GetUIResetData(nsStyleContext* aContext, PRBool aComputeData); -#ifdef INCLUDE_XUL const nsStyleStruct* GetXULData(nsStyleContext* aContext, PRBool aComputeData); -#endif #ifdef MOZ_SVG const nsStyleStruct* GetSVGData(nsStyleContext* aContext, PRBool aComputeData); #endif diff --git a/mozilla/content/shared/public/nsStyleStruct.h b/mozilla/content/shared/public/nsStyleStruct.h index b220be319f5..dce80cbc57d 100644 --- a/mozilla/content/shared/public/nsStyleStruct.h +++ b/mozilla/content/shared/public/nsStyleStruct.h @@ -1097,7 +1097,6 @@ struct nsStyleUserInterface: public nsStyleStruct { nsString mCursorImage; // [inherited] url string }; -#ifdef INCLUDE_XUL struct nsStyleXUL : public nsStyleStruct { nsStyleXUL(); nsStyleXUL(const nsStyleXUL& aSource); @@ -1124,7 +1123,6 @@ struct nsStyleXUL : public nsStyleStruct { PRUint8 mBoxOrient; // [reset] see nsStyleConsts.h PRUint8 mBoxPack; // [reset] see nsStyleConsts.h }; -#endif #ifdef MOZ_SVG enum nsStyleSVGPaintType { diff --git a/mozilla/content/shared/public/nsStyleStructList.h b/mozilla/content/shared/public/nsStyleStructList.h index a16ab996ee2..16248ba2878 100644 --- a/mozilla/content/shared/public/nsStyleStructList.h +++ b/mozilla/content/shared/public/nsStyleStructList.h @@ -74,9 +74,7 @@ STYLE_STRUCT_RESET(Margin, nsnull, ()) STYLE_STRUCT_RESET(Padding, nsnull, ()) STYLE_STRUCT_RESET(Border, nsnull, ()) STYLE_STRUCT_RESET(Outline, nsnull, (SSARG_PRESCONTEXT)) -#ifdef INCLUDE_XUL STYLE_STRUCT_RESET(XUL, nsnull, ()) -#endif #ifdef MOZ_SVG STYLE_STRUCT_INHERITED(SVG, nsnull, ()) #endif diff --git a/mozilla/content/shared/src/nsCSSProps.cpp b/mozilla/content/shared/src/nsCSSProps.cpp index 0e96f785d7f..e0aa6e0ad8f 100644 --- a/mozilla/content/shared/src/nsCSSProps.cpp +++ b/mozilla/content/shared/src/nsCSSProps.cpp @@ -821,7 +821,6 @@ const PRInt32 nsCSSProps::kWhitespaceKTable[] = { -1,-1 }; -#ifdef INCLUDE_XUL // Specific keyword tables for XUL.properties const PRInt32 nsCSSProps::kBoxAlignKTable[] = { eCSSKeyword_stretch, NS_STYLE_BOX_ALIGN_STRETCH, @@ -853,7 +852,6 @@ const PRInt32 nsCSSProps::kBoxPackKTable[] = { eCSSKeyword_justify, NS_STYLE_BOX_PACK_JUSTIFY, -1,-1 }; -#endif #ifdef MOZ_SVG // keyword tables for SVG properties @@ -976,7 +974,6 @@ static const PRInt32 kBackgroundYPositionKTable[] = { case eCSSProperty_border_collapse: return SearchKeywordTable(aValue, kBorderCollapseKTable); -#ifdef INCLUDE_XUL case eCSSProperty_box_align: return SearchKeywordTable(aValue, kBoxAlignKTable); case eCSSProperty_box_direction: @@ -985,7 +982,6 @@ static const PRInt32 kBackgroundYPositionKTable[] = { return SearchKeywordTable(aValue, kBoxOrientKTable); case eCSSProperty_box_pack: return SearchKeywordTable(aValue, kBoxPackKTable); -#endif #ifdef MOZ_SVG case eCSSProperty_fill: diff --git a/mozilla/content/shared/src/nsStyleStruct.cpp b/mozilla/content/shared/src/nsStyleStruct.cpp index 83f06dbdac1..360964f63d5 100644 --- a/mozilla/content/shared/src/nsStyleStruct.cpp +++ b/mozilla/content/shared/src/nsStyleStruct.cpp @@ -745,7 +745,6 @@ nsChangeHint nsStyleList::CalcDifference(const nsStyleList& aOther) const return NS_STYLE_HINT_REFLOW; } -#ifdef INCLUDE_XUL // -------------------- // nsStyleXUL // @@ -782,8 +781,6 @@ nsChangeHint nsStyleXUL::CalcDifference(const nsStyleXUL& aOther) const return NS_STYLE_HINT_REFLOW; } -#endif // INCLUDE_XUL - #ifdef MOZ_SVG // -------------------- // nsStyleSVG diff --git a/mozilla/content/xbl/src/nsXBLBinding.cpp b/mozilla/content/xbl/src/nsXBLBinding.cpp index 3c61deda241..0c8ce2c47e9 100644 --- a/mozilla/content/xbl/src/nsXBLBinding.cpp +++ b/mozilla/content/xbl/src/nsXBLBinding.cpp @@ -60,8 +60,10 @@ #include "nsIContent.h" #include "nsIDocument.h" #include "nsIXMLContent.h" +#ifdef MOZ_XUL #include "nsIXULContent.h" #include "nsIXULDocument.h" +#endif #include "nsIXMLContentSink.h" #include "nsContentCID.h" #include "nsXMLDocument.h" @@ -315,8 +317,6 @@ nsXBLBinding::InstallAnonymousContent(nsIContent* aAnonParent, nsIContent* aElem aAnonParent->SetDocument(doc, PR_TRUE, AllowScripts()); - nsCOMPtr xuldoc(do_QueryInterface(doc)); - // (2) The children's parent back pointer should not be to this synthetic root // but should instead point to the enclosing parent element. PRInt32 childCount; @@ -327,11 +327,14 @@ nsXBLBinding::InstallAnonymousContent(nsIContent* aAnonParent, nsIContent* aElem child->SetParent(aElement); child->SetBindingParent(mBoundElement); +#ifdef MOZ_XUL // To make XUL templates work (and other goodies that happen when // an element is added to a XUL document), we need to notify the // XUL document using its special API. + nsCOMPtr xuldoc(do_QueryInterface(doc)); if (xuldoc) xuldoc->AddSubtreeToDocument(child); +#endif } } @@ -1166,14 +1169,19 @@ nsXBLBinding::ChangeDocument(nsIDocument* aOldDocument, nsIDocument* aNewDocumen mInsertionPointTable->Enumerate(ChangeDocumentForDefaultContent, nsnull); +#ifdef MOZ_XUL + nsCOMPtr xuldoc(do_QueryInterface(aOldDocument)); +#endif + + anonymous->SetDocument(nsnull, PR_TRUE, PR_TRUE); // Kill it. + +#ifdef MOZ_XUL // To make XUL templates work (and other XUL-specific stuff), // we'll need to notify it using its add & remove APIs. Grab the // interface now... - nsCOMPtr xuldoc(do_QueryInterface(aOldDocument)); - - anonymous->SetDocument(nsnull, PR_TRUE, PR_TRUE); // Kill it. if (xuldoc) xuldoc->RemoveSubtreeFromDocument(anonymous); +#endif } } diff --git a/mozilla/content/xbl/src/nsXBLContentSink.cpp b/mozilla/content/xbl/src/nsXBLContentSink.cpp index 38904b56461..0294a3f54b0 100644 --- a/mozilla/content/xbl/src/nsXBLContentSink.cpp +++ b/mozilla/content/xbl/src/nsXBLContentSink.cpp @@ -49,7 +49,9 @@ #include "nsHTMLTokens.h" #include "nsIURI.h" #include "nsTextFragment.h" +#ifdef MOZ_XUL #include "nsXULElement.h" +#endif #include "nsXULAtoms.h" #include "nsXBLProtoImplProperty.h" #include "nsXBLProtoImplMethod.h" @@ -727,10 +729,13 @@ nsXBLContentSink::CreateElement(const PRUnichar** aAtts, PRUint32 aAttsCount, nsINodeInfo* aNodeInfo, PRUint32 aLineNumber, nsIContent** aResult, PRBool* aAppendContent) { +#ifdef MOZ_XUL if (!aNodeInfo->NamespaceEquals(kNameSpaceID_XUL)) { +#endif return nsXMLContentSink::CreateElement(aAtts, aAttsCount, aNodeInfo, aLineNumber, aResult, aAppendContent); +#ifdef MOZ_XUL } *aAppendContent = PR_TRUE; @@ -750,6 +755,7 @@ nsXBLContentSink::CreateElement(const PRUnichar** aAtts, PRUint32 aAttsCount, // Following this function call, the prototype's ref count will be 1. return nsXULElement::Create(prototype, mDocument, PR_FALSE, aResult); +#endif } nsresult @@ -762,6 +768,7 @@ nsXBLContentSink::AddAttributes(const PRUnichar** aAtts, return nsXMLContentSink::AddAttributes(aAtts, aContent); } +#ifdef MOZ_XUL nsresult nsXBLContentSink::AddAttributesToXULPrototype(const PRUnichar **aAtts, PRUint32 aAttsCount, @@ -848,3 +855,4 @@ nsXBLContentSink::AddAttributesToXULPrototype(const PRUnichar **aAtts, return NS_OK; } +#endif diff --git a/mozilla/content/xbl/src/nsXBLContentSink.h b/mozilla/content/xbl/src/nsXBLContentSink.h index 75c10297c62..e2ba5226263 100644 --- a/mozilla/content/xbl/src/nsXBLContentSink.h +++ b/mozilla/content/xbl/src/nsXBLContentSink.h @@ -112,11 +112,13 @@ protected: nsresult AddAttributes(const PRUnichar** aAtts, nsIContent* aContent); - + +#ifdef MOZ_XUL nsresult AddAttributesToXULPrototype(const PRUnichar **aAtts, PRUint32 aAttsCount, nsXULPrototypeElement* aElement); - +#endif + // Our own helpers for constructing XBL prototype objects. void ConstructBinding(); void ConstructHandler(const PRUnichar **aAtts); diff --git a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp index ef9e4ad57fe..45389258b85 100644 --- a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -55,7 +55,6 @@ #include "nsIContent.h" #include "nsIDocument.h" #include "nsIXMLContent.h" -#include "nsIXULContent.h" #include "nsIXMLContentSink.h" #include "nsContentCID.h" #include "nsXMLDocument.h" diff --git a/mozilla/content/xbl/src/nsXBLService.cpp b/mozilla/content/xbl/src/nsXBLService.cpp index e0d98051958..7580f21af4e 100644 --- a/mozilla/content/xbl/src/nsXBLService.cpp +++ b/mozilla/content/xbl/src/nsXBLService.cpp @@ -87,7 +87,9 @@ #include "nsIFrameManager.h" #include "nsStyleContext.h" +#ifdef MOZ_XUL #include "nsIXULPrototypeCache.h" +#endif #include "nsIDOMLoadListener.h" #include "nsIDOMEventGroup.h" @@ -237,8 +239,10 @@ public: NS_IMETHOD Error(nsIDOMEvent* aEvent) { return NS_OK; }; NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent) { return NS_OK; }; +#ifdef MOZ_XUL static nsIXULPrototypeCache* gXULCache; static PRInt32 gRefCnt; +#endif nsXBLStreamListener(nsXBLService* aXBLService, nsIStreamListener* aInner, nsIDocument* aDocument, nsIDocument* aBindingDocument); virtual ~nsXBLStreamListener(); @@ -256,8 +260,10 @@ private: nsCOMPtr mBindingDocument; }; +#ifdef MOZ_XUL nsIXULPrototypeCache* nsXBLStreamListener::gXULCache = nsnull; PRInt32 nsXBLStreamListener::gRefCnt = 0; +#endif /* Implementation file */ NS_IMPL_ISUPPORTS4(nsXBLStreamListener, nsIStreamListener, nsIRequestObserver, nsIDOMLoadListener, nsIDOMEventListener) @@ -271,21 +277,25 @@ nsXBLStreamListener::nsXBLStreamListener(nsXBLService* aXBLService, mInner = aInner; mDocument = getter_AddRefs(NS_GetWeakReference(aDocument)); mBindingDocument = aBindingDocument; +#ifdef MOZ_XUL gRefCnt++; if (gRefCnt == 1) { nsresult rv = CallGetService("@mozilla.org/xul/xul-prototype-cache;1", &gXULCache); if (NS_FAILED(rv)) return; } +#endif } nsXBLStreamListener::~nsXBLStreamListener() { +#ifdef MOZ_XUL /* destructor code */ gRefCnt--; if (gRefCnt == 0) { NS_IF_RELEASE(gXULCache); } +#endif } NS_IMETHODIMP @@ -410,6 +420,7 @@ nsXBLStreamListener::Load(nsIDOMEvent* aEvent) // If the doc is a chrome URI, then we put it into the XUL cache. PRBool cached = PR_FALSE; +#ifdef MOZ_XUL if (IsChromeOrResourceURI(uri)) { PRBool useXULCache; gXULCache->GetEnabled(&useXULCache); @@ -418,6 +429,7 @@ nsXBLStreamListener::Load(nsIDOMEvent* aEvent) gXULCache->PutXBLDocumentInfo(info); } } +#endif if (!cached) bindingManager->PutXBLDocumentInfo(info); @@ -460,7 +472,9 @@ nsXBLStreamListener::Load(nsIDOMEvent* aEvent) // Static member variable initialization PRUint32 nsXBLService::gRefCnt = 0; +#ifdef MOZ_XUL nsIXULPrototypeCache* nsXBLService::gXULCache = nsnull; +#endif nsHashtable* nsXBLService::gClassTable = nsnull; @@ -482,14 +496,16 @@ nsXBLService::nsXBLService(void) gRefCnt++; if (gRefCnt == 1) { + gClassTable = new nsHashtable(); + +#ifdef MOZ_XUL // Find out if the XUL cache is on or off nsCOMPtr prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID)); if (prefBranch) prefBranch->GetBoolPref(kDisableChromeCachePref, &gDisableChromeCache); - gClassTable = new nsHashtable(); - CallGetService("@mozilla.org/xul/xul-prototype-cache;1", &gXULCache); +#endif } } @@ -510,7 +526,9 @@ nsXBLService::~nsXBLService(void) delete gClassTable; gClassTable = nsnull; +#ifdef MOZ_XUL NS_IF_RELEASE(gXULCache); +#endif } } @@ -682,6 +700,7 @@ nsXBLService::GetXBLDocumentInfo(const nsCString& aURLStr, nsIContent* aBoundEle { *aResult = nsnull; +#ifdef MOZ_XUL PRBool useXULCache; gXULCache->GetEnabled(&useXULCache); if (useXULCache) { @@ -690,6 +709,7 @@ nsXBLService::GetXBLDocumentInfo(const nsCString& aURLStr, nsIContent* aBoundEle // part of chrome will be reused across all XUL documents. gXULCache->GetXBLDocumentInfo(aURLStr, aResult); } +#endif if (!*aResult) { // The second line of defense is the binding manager's document table. @@ -1001,18 +1021,20 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB nsresult rv = NS_OK; *aResult = nsnull; + nsCOMPtr info; +#ifdef MOZ_XUL // We've got a file. Check our XBL document cache. PRBool useXULCache; gXULCache->GetEnabled(&useXULCache); - nsCOMPtr info; if (useXULCache) { // The first line of defense is the chrome cache. // This cache crosses the entire product, so that any XBL bindings that are // part of chrome will be reused across all XUL documents. gXULCache->GetXBLDocumentInfo(aURLStr, getter_AddRefs(info)); } +#endif if (!info) { // The second line of defense is the binding manager's document table. @@ -1075,12 +1097,14 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB // If the doc is a chrome URI, then we put it into the XUL cache. PRBool cached = PR_FALSE; +#ifdef MOZ_XUL if (IsChromeOrResourceURI(uri)) { if (useXULCache) { cached = PR_TRUE; gXULCache->PutXBLDocumentInfo(info); } } +#endif if (!cached && bindingManager) { // Otherwise we put it in our binding manager's document table. diff --git a/mozilla/content/xbl/src/nsXBLService.h b/mozilla/content/xbl/src/nsXBLService.h index dddd39133a4..e719e9f629b 100644 --- a/mozilla/content/xbl/src/nsXBLService.h +++ b/mozilla/content/xbl/src/nsXBLService.h @@ -114,7 +114,9 @@ public: // MEMBER VARIABLES public: +#ifdef MOZ_XUL static nsIXULPrototypeCache* gXULCache; +#endif static PRUint32 gRefCnt; // A count of XBLservice instances. diff --git a/mozilla/content/xbl/src/nsXBLWindowHandler.cpp b/mozilla/content/xbl/src/nsXBLWindowHandler.cpp index bfd4ff22779..eb37a20f525 100644 --- a/mozilla/content/xbl/src/nsXBLWindowHandler.cpp +++ b/mozilla/content/xbl/src/nsXBLWindowHandler.cpp @@ -65,10 +65,7 @@ #include "nsIServiceManager.h" #include "nsIDOMDocument.h" #include "nsISelectionController.h" - -#ifdef INCLUDE_XUL #include "nsXULAtoms.h" -#endif class nsXBLSpecialDocInfo { diff --git a/mozilla/content/xul/Makefile.in b/mozilla/content/xul/Makefile.in index bca53a580a4..3367da28498 100644 --- a/mozilla/content/xul/Makefile.in +++ b/mozilla/content/xul/Makefile.in @@ -26,7 +26,14 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = content document templates +# We need to build document even if XUL is disabled, for the nsIController[s] +# interfaces and implementations. + +DIRS = document + +ifdef MOZ_XUL +DIRS += content templates +endif include $(topsrcdir)/config/rules.mk diff --git a/mozilla/content/xul/document/public/Makefile.in b/mozilla/content/xul/document/public/Makefile.in index e8c06417625..7e789e2909e 100644 --- a/mozilla/content/xul/document/public/Makefile.in +++ b/mozilla/content/xul/document/public/Makefile.in @@ -34,12 +34,14 @@ XPIDLSRCS = \ nsIControllers.idl \ $(NULL) +ifdef MOZ_XUL EXPORTS = \ nsIXULContentSink.h \ nsIXULDocument.h \ nsIXULPrototypeCache.h \ nsIXULPrototypeDocument.h \ $(NULL) +endif include $(topsrcdir)/config/rules.mk diff --git a/mozilla/content/xul/document/src/Makefile.in b/mozilla/content/xul/document/src/Makefile.in index ffd130f1abb..8551f1c03db 100644 --- a/mozilla/content/xul/document/src/Makefile.in +++ b/mozilla/content/xul/document/src/Makefile.in @@ -56,15 +56,18 @@ REQUIRES = xpcom \ unicharutil \ $(NULL) -CPPSRCS = \ +CPPSRCS = nsXULControllers.cpp + +ifdef MOZ_XUL +CPPSRCS += \ nsElementMap.cpp \ nsXULCommandDispatcher.cpp \ nsXULContentSink.cpp \ - nsXULControllers.cpp \ nsXULDocument.cpp \ nsXULPrototypeCache.cpp \ nsXULPrototypeDocument.cpp \ $(NULL) +endif # we don't want the shared lib, but we want to force the creation of a # static lib. diff --git a/mozilla/dom/macbuild/domSharedPrefix.h b/mozilla/dom/macbuild/domSharedPrefix.h index 588ec324d33..22068b76446 100644 --- a/mozilla/dom/macbuild/domSharedPrefix.h +++ b/mozilla/dom/macbuild/domSharedPrefix.h @@ -21,6 +21,5 @@ */ #define MOZ_XUL 1 -#define INCLUDE_XUL 1 #include "MacSharedPrefix.h" diff --git a/mozilla/dom/macbuild/domSharedPrefix_debug.h b/mozilla/dom/macbuild/domSharedPrefix_debug.h index b25f8e62d32..aa3fb711786 100644 --- a/mozilla/dom/macbuild/domSharedPrefix_debug.h +++ b/mozilla/dom/macbuild/domSharedPrefix_debug.h @@ -21,6 +21,5 @@ */ #define MOZ_XUL 1 -#define INCLUDE_XUL 1 #include "MacSharedPrefix_debug.h" diff --git a/mozilla/dom/public/nsIDOMClassInfo.h b/mozilla/dom/public/nsIDOMClassInfo.h index bc7add558c2..50c1e1a983c 100644 --- a/mozilla/dom/public/nsIDOMClassInfo.h +++ b/mozilla/dom/public/nsIDOMClassInfo.h @@ -170,16 +170,20 @@ enum nsDOMClassInfoID { eDOMClassInfo_Selection_id, // XUL classes +#ifdef MOZ_XUL eDOMClassInfo_XULDocument_id, eDOMClassInfo_XULElement_id, eDOMClassInfo_XULCommandDispatcher_id, eDOMClassInfo_XULNodeList_id, eDOMClassInfo_XULNamedNodeMap_id, eDOMClassInfo_XULAttr_id, +#endif eDOMClassInfo_XULControllers_id, +#ifdef MOZ_XUL eDOMClassInfo_BoxObject_id, eDOMClassInfo_TreeSelection_id, eDOMClassInfo_TreeContentView_id, +#endif // Crypto classes eDOMClassInfo_Crypto_id, diff --git a/mozilla/dom/src/base/nsDOMClassInfo.cpp b/mozilla/dom/src/base/nsDOMClassInfo.cpp index 73b1eb2dfe9..cb0c5c12ff6 100644 --- a/mozilla/dom/src/base/nsDOMClassInfo.cpp +++ b/mozilla/dom/src/base/nsDOMClassInfo.cpp @@ -276,9 +276,11 @@ #include "nsIControllers.h" #include "nsISelection.h" #include "nsIBoxObject.h" +#ifdef MOZ_XUL #include "nsITreeSelection.h" #include "nsITreeContentView.h" #include "nsITreeView.h" +#endif #include "nsIDOMXPathEvaluator.h" #ifdef MOZ_SVG @@ -650,6 +652,7 @@ static nsDOMClassInfoData sClassInfoData[] = { DEFAULT_SCRIPTABLE_FLAGS) // XUL classes +#ifdef MOZ_XUL NS_DEFINE_CLASSINFO_DATA(XULDocument, nsDocumentSH, DOCUMENT_SCRIPTABLE_FLAGS | nsIXPCScriptable::WANT_ENUMERATE) @@ -663,14 +666,17 @@ static nsDOMClassInfoData sClassInfoData[] = { nsNamedNodeMapSH, ARRAY_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA_WITH_NAME(XULAttr, Attr, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) +#endif NS_DEFINE_CLASSINFO_DATA(XULControllers, nsDOMGenericSH, DEFAULT_SCRIPTABLE_FLAGS) +#ifdef MOZ_XUL NS_DEFINE_CLASSINFO_DATA(BoxObject, nsDOMGenericSH, DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(TreeSelection, nsDOMGenericSH, DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(TreeContentView, nsDOMGenericSH, DEFAULT_SCRIPTABLE_FLAGS) +#endif // Crypto classes NS_DEFINE_CLASSINFO_DATA(Crypto, nsDOMGenericSH, @@ -1891,6 +1897,7 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsISelection) DOM_CLASSINFO_MAP_END +#ifdef MOZ_XUL DOM_CLASSINFO_MAP_BEGIN(XULDocument, nsIDOMXULDocument) DOM_CLASSINFO_MAP_ENTRY(nsIDOMDocument) DOM_CLASSINFO_MAP_ENTRY(nsIDOMXULDocument) @@ -1925,11 +1932,13 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XULAttr, nsIDOMAttr) DOM_CLASSINFO_MAP_ENTRY(nsIDOMAttr) DOM_CLASSINFO_MAP_END +#endif DOM_CLASSINFO_MAP_BEGIN_NO_CLASS_IF(XULControllers, nsIControllers) DOM_CLASSINFO_MAP_ENTRY(nsIControllers) DOM_CLASSINFO_MAP_END +#ifdef MOZ_XUL DOM_CLASSINFO_MAP_BEGIN(BoxObject, nsIBoxObject) DOM_CLASSINFO_MAP_ENTRY(nsIBoxObject) DOM_CLASSINFO_MAP_END @@ -1942,6 +1951,7 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsITreeContentView) DOM_CLASSINFO_MAP_ENTRY(nsITreeView) DOM_CLASSINFO_MAP_END +#endif DOM_CLASSINFO_MAP_BEGIN(Crypto, nsIDOMCrypto) DOM_CLASSINFO_MAP_ENTRY(nsIDOMCrypto) diff --git a/mozilla/dom/src/base/nsFocusController.cpp b/mozilla/dom/src/base/nsFocusController.cpp index e252050db28..723a4deeac4 100644 --- a/mozilla/dom/src/base/nsFocusController.cpp +++ b/mozilla/dom/src/base/nsFocusController.cpp @@ -48,7 +48,7 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsIServiceManagerUtils.h" -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL #include "nsIDOMXULDocument.h" #include "nsIDOMXULElement.h" #endif @@ -186,7 +186,7 @@ nsFocusController::GetControllers(nsIControllers** aResult) // so this code would have no special knowledge of what object might have controllers. if (mCurrentElement) { -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL nsCOMPtr xulElement(do_QueryInterface(mCurrentElement)); if (xulElement) return xulElement->GetControllers(aResult); diff --git a/mozilla/dom/src/build/nsDOMFactory.cpp b/mozilla/dom/src/build/nsDOMFactory.cpp index bf7de6ebf1f..05625caf48e 100644 --- a/mozilla/dom/src/build/nsDOMFactory.cpp +++ b/mozilla/dom/src/build/nsDOMFactory.cpp @@ -47,7 +47,9 @@ #include "nsIObserverService.h" #include "nsIJSContextStack.h" #include "nsIExceptionService.h" +#ifdef MOZ_XUL #include "nsIXULPrototypeCache.h" +#endif #include "nsCRT.h" #include "nsScriptNameSpaceManager.h" @@ -215,6 +217,7 @@ nsDOMSOFactory::Observe(nsISupports *aSubject, const PRUnichar *someData) { if (!nsCRT::strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { +#ifdef MOZ_XUL // Flush the XUL cache since it holds JS roots, and we're about to // start the final GC. static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID); @@ -222,6 +225,7 @@ nsDOMSOFactory::Observe(nsISupports *aSubject, if (cache) cache->Flush(); +#endif nsCOMPtr stack = do_GetService("@mozilla.org/js/xpc/ContextStack;1"); diff --git a/mozilla/embedding/components/Makefile.in b/mozilla/embedding/components/Makefile.in index 9a63d017085..eb705a8b930 100644 --- a/mozilla/embedding/components/Makefile.in +++ b/mozilla/embedding/components/Makefile.in @@ -24,6 +24,15 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = windowwatcher appstartup find ui printingui jsconsole webbrowserpersist commandhandler build +# You'd think we could skip building ui and jsconsole if XUL is disabled, +# but we need to export interface headers from those directories. + +DIRS = windowwatcher appstartup find webbrowserpersist commandhandler ui jsconsole + +ifdef MOZ_XUL +DIRS += printingui +endif + +DIRS += build include $(topsrcdir)/config/rules.mk diff --git a/mozilla/embedding/components/build/Makefile.in b/mozilla/embedding/components/build/Makefile.in index 1abd6abd7cf..ca2a5ac4ace 100644 --- a/mozilla/embedding/components/build/Makefile.in +++ b/mozilla/embedding/components/build/Makefile.in @@ -63,14 +63,19 @@ CPPSRCS = nsModule.cpp SHARED_LIBRARY_LIBS = \ $(DIST)/lib/$(LIB_PREFIX)windowwatcher_s.$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)printingui_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)appstartupnotifier_s.$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)jsconsole_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)find_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)webbrowserpersist_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)commandhandler_s.$(LIB_SUFFIX) \ $(NULL) +ifdef MOZ_XUL +SHARED_LIBRARY_LIBS += \ + $(DIST)/lib/$(LIB_PREFIX)printingui_s.$(LIB_SUFFIX) \ + $(DIST)/lib/$(LIB_PREFIX)jsconsole_s.$(LIB_SUFFIX) \ + $(NULL) +endif + LOCAL_INCLUDES = \ -I$(srcdir)/../windowwatcher/src \ -I$(srcdir)/../appstartup/src \ diff --git a/mozilla/embedding/components/build/nsModule.cpp b/mozilla/embedding/components/build/nsModule.cpp index 8658d0abc60..5fba2c0ac32 100644 --- a/mozilla/embedding/components/build/nsModule.cpp +++ b/mozilla/embedding/components/build/nsModule.cpp @@ -52,11 +52,8 @@ #include "nsPrintingPromptService.h" #include "nsBaseCommandController.h" -NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPromptService, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowWatcher, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppStartupNotifier) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsJSConsoleService) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFind) NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserFind) NS_GENERIC_FACTORY_CONSTRUCTOR(nsWebBrowserPersist) @@ -64,14 +61,23 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandTable) NS_GENERIC_FACTORY_CONSTRUCTOR(nsCommandManager) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCommandParams, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsControllerCommandGroup) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseCommandController) + +#ifdef MOZ_XUL +NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPromptService, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsJSConsoleService) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init) +#endif static const nsModuleComponentInfo gComponents[] = { +#ifdef MOZ_XUL { "Dialog ParamBlock", NS_DIALOGPARAMBLOCK_CID, NS_DIALOGPARAMBLOCK_CONTRACTID, nsDialogParamBlockConstructor }, { "Prompt Service", NS_PROMPTSERVICE_CID, NS_PROMPTSERVICE_CONTRACTID, nsPromptServiceConstructor }, { "JS Console Service", NS_JSCONSOLESERVICE_CID, NS_JSCONSOLESERVICE_CONTRACTID, nsJSConsoleServiceConstructor }, + { "Printing Prompt Service", NS_PRINTINGPROMPTSERVICE_CID, NS_PRINTINGPROMPTSERVICE_CONTRACTID, nsPrintingPromptServiceConstructor }, +#endif { "Window Watcher", NS_WINDOWWATCHER_CID, NS_WINDOWWATCHER_CONTRACTID, nsWindowWatcherConstructor }, { "Find", NS_FIND_CID, NS_FIND_CONTRACTID, nsFindConstructor }, { "WebBrowserFind", NS_WEB_BROWSER_FIND_CID, NS_WEB_BROWSER_FIND_CONTRACTID, nsWebBrowserFindConstructor }, @@ -81,8 +87,7 @@ static const nsModuleComponentInfo gComponents[] = { { "Command Manager", NS_COMMAND_MANAGER_CID, NS_COMMAND_MANAGER_CONTRACTID, nsCommandManagerConstructor }, { "Command Params", NS_COMMAND_PARAMS_CID, NS_COMMAND_PARAMS_CONTRACTID, nsCommandParamsConstructor }, { "Command Group", NS_CONTROLLER_COMMAND_GROUP_CID, NS_CONTROLLER_COMMAND_GROUP_CONTRACTID, nsControllerCommandGroupConstructor }, - { "Base Command Controller", NS_BASECOMMANDCONTROLLER_CID, NS_BASECOMMANDCONTROLLER_CONTRACTID, nsBaseCommandControllerConstructor }, - { "Printing Prompt Service", NS_PRINTINGPROMPTSERVICE_CID, NS_PRINTINGPROMPTSERVICE_CONTRACTID, nsPrintingPromptServiceConstructor } + { "Base Command Controller", NS_BASECOMMANDCONTROLLER_CID, NS_BASECOMMANDCONTROLLER_CONTRACTID, nsBaseCommandControllerConstructor } }; NS_IMPL_NSGETMODULE(embedcomponents, gComponents) diff --git a/mozilla/embedding/components/jsconsole/Makefile.in b/mozilla/embedding/components/jsconsole/Makefile.in index fb4382806d9..85aed1ddd64 100644 --- a/mozilla/embedding/components/jsconsole/Makefile.in +++ b/mozilla/embedding/components/jsconsole/Makefile.in @@ -24,6 +24,10 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -DIRS = public src +DIRS = public + +ifdef MOZ_XUL +DIRS += src +endif include $(topsrcdir)/config/rules.mk diff --git a/mozilla/embedding/components/windowwatcher/src/Makefile.in b/mozilla/embedding/components/windowwatcher/src/Makefile.in index 453672f5b72..386b1ea5526 100644 --- a/mozilla/embedding/components/windowwatcher/src/Makefile.in +++ b/mozilla/embedding/components/windowwatcher/src/Makefile.in @@ -45,13 +45,17 @@ REQUIRES = xpcom \ intl \ $(NULL) -CPPSRCS = nsDialogParamBlock.cpp \ - nsPrompt.cpp \ - nsPromptService.cpp \ +CPPSRCS = nsPrompt.cpp \ nsWWJSUtils.cpp \ nsWindowWatcher.cpp \ $(NULL) +ifdef MOZ_XUL +CPPSRCS += nsDialogParamBlock.cpp \ + nsPromptService.cpp \ + $(NULL) +endif + # we don't want the shared lib, but we want to force the creation of a # static lib. FORCE_STATIC_LIB = 1 diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 16030e35552..459b4799221 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -107,7 +107,6 @@ #include "nsFormControlHelper.h" #include "nsObjectFrame.h" #include "nsRuleNode.h" -#include "nsIXULDocument.h" #include "nsIPrintPreviewContext.h" #include "nsIDOMMutationEvent.h" #include "nsChildIterator.h" @@ -117,6 +116,7 @@ #include "nsAutoPtr.h" #include "nsScrollPortFrame.h" #include "nsXULAtoms.h" +#include "nsBoxFrame.h" static NS_DEFINE_CID(kTextNodeCID, NS_TEXTNODE_CID); static NS_DEFINE_CID(kHTMLElementFactoryCID, NS_HTML_ELEMENT_FACTORY_CID); @@ -128,10 +128,11 @@ static NS_DEFINE_CID(kAttributeContentCID, NS_ATTRIBUTECONTENT_CID); #include "nsBox.h" -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL #include "nsIRootBox.h" #include "nsIDOMXULCommandDispatcher.h" #include "nsIDOMXULDocument.h" +#include "nsIXULDocument.h" #endif #include "nsInlineFrame.h" @@ -217,9 +218,7 @@ static FrameCtorDebugFlags gFlags[] = { #endif -#ifdef INCLUDE_XUL -#include "nsXULAtoms.h" - +#ifdef MOZ_XUL #include "nsMenuFrame.h" #include "nsPopupSetFrame.h" #include "nsTreeColFrame.h" @@ -249,12 +248,6 @@ NS_NewDocElementBoxFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame); nsresult NS_NewThumbFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); -nsresult -NS_NewScrollPortFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewGfxScrollFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, nsIDocument* aDocument, PRBool aIsRoot); - nsresult NS_NewDeckFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, nsIBoxLayout* aLayoutManager = nsnull); @@ -279,21 +272,6 @@ NS_NewGroupBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); nsresult NS_NewButtonBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame); -nsresult -NS_NewSliderFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewScrollbarButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewNativeScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - nsresult NS_NewGrippyFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); @@ -347,6 +325,25 @@ NS_NewResizerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame); #endif +nsresult +NS_NewScrollPortFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + +nsresult +NS_NewGfxScrollFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, nsIDocument* aDocument, PRBool aIsRoot); + +nsresult +NS_NewSliderFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + +nsresult +NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + +nsresult +NS_NewScrollbarButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + +nsresult +NS_NewNativeScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + + #ifdef NOISY_FINDFRAME static PRInt32 FFWC_totalCount=0; static PRInt32 FFWC_doLoop=0; @@ -3472,7 +3469,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell, #if defined(MOZ_SVG) PRInt32 nameSpaceID; #endif -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aDocElement->IsContentOfType(nsIContent::eXUL)) { rv = NS_NewDocElementBoxFrame(aPresShell, &contentFrame); if (NS_FAILED(rv)) { @@ -3691,7 +3688,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell, nsIAtom* rootPseudo; if (!isPaginated) { -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aDocElement->IsContentOfType(nsIContent::eXUL)) { NS_NewRootBoxFrame(aPresShell, &rootFrame); @@ -3740,7 +3737,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell, } // Never create scrollbars for XUL documents -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (isXUL) { isScrollable = PR_FALSE; } else @@ -4234,25 +4231,7 @@ nsCSSFrameConstructor::ConstructTextControlFrame(nsIPresShell* aPresShell, PRBool nsCSSFrameConstructor::HasGfxScrollbars() { -#ifndef INCLUDE_XUL - return PR_FALSE; -#endif - // Get the Prefs - if (!mGotGfxPrefs) { - nsCOMPtr prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (prefBranch) { - PRBool hasGfxScroll = PR_FALSE; // use a temp since we have a PRPackedBool - prefBranch->GetBoolPref("nglayout.widget.gfxscrollbars", &hasGfxScroll); - mHasGfxScrollbars = hasGfxScroll; - mGotGfxPrefs = PR_TRUE; - } else { - mHasGfxScrollbars = PR_FALSE; - } - } - - // while we don't support native scrollbars for Seamonkey, some embedding - // clients demand them (but may still want XUL). Give them that option. - return mHasGfxScrollbars; + return PR_TRUE; } PRBool @@ -5263,10 +5242,8 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell aTag != nsHTMLAtoms::input && aTag != nsHTMLAtoms::textarea && aTag != nsHTMLAtoms::combobox && - aTag != nsHTMLAtoms::isindex -#ifdef INCLUDE_XUL - && aTag != nsXULAtoms::scrollbar -#endif + aTag != nsHTMLAtoms::isindex && + aTag != nsXULAtoms::scrollbar ) return NS_OK; @@ -5335,7 +5312,7 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell content->SetParent(aParent); content->SetDocument(aDocument, PR_TRUE, PR_TRUE); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL // Only cut XUL scrollbars off if they're not in a XUL document. This allows // scrollbars to be styled from XUL (although not from XML or HTML). nsCOMPtr tag; @@ -5365,7 +5342,6 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell return NS_OK; } -#ifdef INCLUDE_XUL static PRBool IsXULDisplayType(const nsStyleDisplay* aDisplay) { @@ -5431,6 +5407,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, if (isXULNS) { // First try creating a frame based on the tag +#ifdef MOZ_XUL // BUTTON CONSTRUCTION if (aTag == nsXULAtoms::button || aTag == nsXULAtoms::checkbox || aTag == nsXULAtoms::radio) { processChildren = PR_TRUE; @@ -5619,8 +5596,10 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, rv = NS_NewProgressMeterFrame(aPresShell, &newFrame); } // End of PROGRESS METER CONSTRUCTION logic + else +#endif // SLIDER CONSTRUCTION - else if (aTag == nsXULAtoms::slider) { + if (aTag == nsXULAtoms::slider) { processChildren = PR_TRUE; isReplaced = PR_TRUE; rv = NS_NewSliderFrame(aPresShell, &newFrame); @@ -5648,6 +5627,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, } // End of SCROLLBUTTON CONSTRUCTION logic +#ifdef MOZ_XUL // SPLITTER CONSTRUCTION else if (aTag == nsXULAtoms::splitter) { processChildren = PR_TRUE; @@ -5663,6 +5643,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, rv = NS_NewGrippyFrame(aPresShell, &newFrame); } // End of GRIPPY CONSTRUCTION logic +#endif } // Display types for XUL start here @@ -5692,7 +5673,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, } } // End of BOX CONSTRUCTION logic - +#ifdef MOZ_XUL // ------- Begin Grid --------- else if ((!aXBLBaseTag && (display->mDisplay == NS_STYLE_DISPLAY_INLINE_GRID || display->mDisplay == NS_STYLE_DISPLAY_GRID)) || @@ -5884,6 +5865,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, if (!menuFrame) isPopup = PR_TRUE; } +#endif } } @@ -5973,7 +5955,9 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, aState.mAbsoluteItems.AddChild(newFrame); } else if (isFixedPositioned) { aState.mFixedItems.AddChild(newFrame); - } else if (isPopup) { + } +#ifdef MOZ_XUL + else if (isPopup) { // Locate the root popup set and add ourselves to the popup set's list // of popup frames. nsIFrame* rootFrame; @@ -5994,6 +5978,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, } } } +#endif // Add the placeholder frame to the flow aFrameItems.AddChild(placeholderFrame); @@ -6003,7 +5988,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, aFrameItems.AddChild(topFrame); } - +#ifdef MOZ_XUL // register tooltip support if needed nsAutoString value; if (aTag == nsXULAtoms::treechildren || // trees always need titletips @@ -6020,6 +6005,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, if (rootBox) rootBox->AddTooltipSupport(aContent); } +#endif // addToHashTable: @@ -6036,7 +6022,6 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, return rv; } -#endif already_AddRefed nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresShell* aPresShell, @@ -6328,7 +6313,6 @@ nsCSSFrameConstructor::InitGfxScrollFrame(nsIPresShell* aPresShell, nsFrameItems& aAnonymousFrames, nsIFrame* aScrollPortFrame) { -#ifdef INCLUDE_XUL if (!aScrollPortFrame) NS_NewScrollPortFrame(aPresShell, &aScrollPortFrame); @@ -6339,8 +6323,6 @@ nsCSSFrameConstructor::InitGfxScrollFrame(nsIPresShell* aPresShell, PR_FALSE, aAnonymousFrames); return NS_OK; -#endif - return NS_ERROR_FAILURE; } nsresult @@ -7479,7 +7461,6 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe aContent, aParentFrame, aTag, aNameSpaceID, styleContext, aFrameItems); -#ifdef INCLUDE_XUL // Failing to find a matching HTML frame, try creating a specialized // XUL frame. This is temporary, pending planned factoring of this // whole process into separate, pluggable steps. @@ -7492,7 +7473,6 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe return rv; } } -#endif // MathML Mod - RBS #ifdef MOZ_MATHML @@ -7609,6 +7589,7 @@ nsCSSFrameConstructor::ReconstructDocElementHierarchy(nsIPresContext* aPresConte nsIFrame* docParentFrame; docElementFrame->GetParent(&docParentFrame); +#ifdef MOZ_XUL // If we're in a XUL document, then we need to crawl up to the // RootBoxFrame and remove _its_ child. nsCOMPtr xuldoc = do_QueryInterface(mDocument); @@ -7619,6 +7600,7 @@ nsCSSFrameConstructor::ReconstructDocElementHierarchy(nsIPresContext* aPresConte docParentFrame->GetParent(&docParentFrame); } } +#endif NS_ASSERTION(docParentFrame, "should have a parent frame"); if (docParentFrame) { @@ -8375,7 +8357,7 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, nsCOMPtr shell; aPresContext->GetShell(getter_AddRefs(shell)); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aContainer) { nsCOMPtr bindingManager; mDocument->GetBindingManager(getter_AddRefs(bindingManager)); @@ -8392,7 +8374,7 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, return NS_OK; } -#endif // INCLUDE_XUL +#endif // MOZ_XUL // Get the frame associated with the content nsIFrame* parentFrame = GetFrameFor(shell, aPresContext, aContainer); @@ -9003,7 +8985,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, aPresContext->GetShell(getter_AddRefs(shell)); nsresult rv = NS_OK; -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aContainer) { nsCOMPtr bindingManager; mDocument->GetBindingManager(getter_AddRefs(bindingManager)); @@ -9043,7 +9025,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, return NS_OK; } -#endif // INCLUDE_XUL +#endif // MOZ_XUL // If we have a null parent, then this must be the document element // being inserted @@ -9603,6 +9585,7 @@ DeletingFrameSubtree(nsIPresContext* aPresContext, for (PRInt32 i = destroyQueue.Count() - 1; i >= 0; --i) { nsIFrame* outOfFlowFrame = NS_STATIC_CAST(nsIFrame*, destroyQueue[i]); +#ifdef MOZ_XUL const nsStyleDisplay* display; outOfFlowFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)display); @@ -9626,8 +9609,9 @@ DeletingFrameSubtree(nsIPresContext* aPresContext, popupSet->RemovePopupFrame(outOfFlowFrame); } } - } - else { + } else +#endif + { // Get the out-of-flow frame's parent nsIFrame* parentFrame; outOfFlowFrame->GetParent(&parentFrame); @@ -9738,7 +9722,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, } } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aContainer) { nsCOMPtr bindingManager; mDocument->GetBindingManager(getter_AddRefs(bindingManager)); @@ -9789,7 +9773,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, return NS_OK; } -#endif // INCLUDE_XUL +#endif // MOZ_XUL if (childFrame) { // If the frame we are manipulating is a special frame then do @@ -9912,6 +9896,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, frameManager->GetRootFrame(&rootFrame); if (rootFrame) rootFrame->FirstChild(aPresContext, nsnull, &rootFrame); +#ifdef MOZ_XUL nsCOMPtr rootBox(do_QueryInterface(rootFrame)); if (rootBox) { nsIFrame* popupSetFrame; @@ -9922,6 +9907,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, popupSet->RemovePopupFrame(childFrame); } } +#endif // Remove the placeholder frame first (XXX second for now) (so // that it doesn't retain a dangling pointer to memory) @@ -10661,7 +10647,7 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext, PRBool reframe = (aHint & (nsChangeHint_ReconstructDoc | nsChangeHint_ReconstructFrame)) != 0; PRBool restyle = (aHint & ~(nsChangeHint_AttrChange)) != 0; -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL // The following listbox widget trap prevents offscreen listbox widget // content from being removed and re-inserted (which is what would // happen otherwise). @@ -10693,7 +10679,7 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext, } } -#endif // INCLUDE_XUL +#endif // MOZ_XUL // See if we have appearance information for a theme. if (primaryFrame) { @@ -13286,7 +13272,7 @@ nsCSSFrameConstructor::CreateListBoxContent(nsIPresContext* aPresContext, PRBool aIsScrollbar, nsILayoutHistoryState* aFrameState) { -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL nsCOMPtr shell; aPresContext->GetShell(getter_AddRefs(shell)); nsresult rv = NS_OK; diff --git a/mozilla/layout/base/nsCSSFrameConstructor.h b/mozilla/layout/base/nsCSSFrameConstructor.h index 11474eca27e..3486cd0f851 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.h +++ b/mozilla/layout/base/nsCSSFrameConstructor.h @@ -607,7 +607,6 @@ protected: nsFrameItems& aFrameItems); #endif -#ifdef INCLUDE_XUL nsresult ConstructXULFrame(nsIPresShell* aPresShell, nsIPresContext* aPresContext, nsFrameConstructorState& aState, @@ -620,7 +619,6 @@ protected: PRBool aXBLBaseTag, PRBool& aHaltProcessing); -#endif // SVG - rods #ifdef MOZ_SVG diff --git a/mozilla/layout/base/nsDocumentViewer.cpp b/mozilla/layout/base/nsDocumentViewer.cpp index fe54d2026bb..4f4575d9236 100644 --- a/mozilla/layout/base/nsDocumentViewer.cpp +++ b/mozilla/layout/base/nsDocumentViewer.cpp @@ -109,7 +109,9 @@ #include "nsIDOMHTMLLinkElement.h" #include "nsIDOMHTMLImageElement.h" #include "nsIDOMHTMLFrameSetElement.h" +#ifdef MOZ_XUL #include "nsIXULDocument.h" // Temporary code for Bug 136185 +#endif #include "nsIChromeRegistry.h" #include "nsIClipboardHelper.h" @@ -1499,11 +1501,13 @@ DocumentViewerImpl::Hide(void) selPrivate->RemoveSelectionListener(mSelectionListener); } +#ifdef MOZ_XUL nsCOMPtr xul_doc(do_QueryInterface(mDocument)); if (xul_doc) { xul_doc->OnHide(); } +#endif mPresShell->Destroy(); @@ -1848,10 +1852,11 @@ DocumentViewerImpl::MakeWindow(nsIWidget* aParentWidget, treeItem->GetItemType(&itemType); if (itemType == nsIDocShellTreeItem::typeContent || itemType == nsIDocShellTreeItem::typeContentWrapper) { +#ifdef MOZ_XUL nsCOMPtr xulDoc(do_QueryInterface(mDocument)); - if (!xulDoc) { + if (!xulDoc) +#endif contentType = eContentTypeContent; - } } // pass in a native widget to be the parent widget ONLY if the view hierarchy will stand alone. diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index bf7bce093be..b46987b2f68 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -162,8 +162,10 @@ #include "nsStyleChangeList.h" #include "nsIStyleFrameConstruction.h" #include "nsIBindingManager.h" +#ifdef MOZ_XUL #include "nsIMenuFrame.h" #include "nsITreeBoxObject.h" +#endif #include "nsIXBLBinding.h" #include "nsPlaceholderFrame.h" @@ -5403,6 +5405,7 @@ BuildFramechangeList(nsIFrame *aFrame, void *aClosure) return PR_TRUE; } +#ifdef MOZ_XUL PR_STATIC_CALLBACK(PRBool) ReResolveMenusAndTrees(nsIFrame *aFrame, void *aClosure) { @@ -5423,6 +5426,7 @@ ReResolveMenusAndTrees(nsIFrame *aFrame, void *aClosure) } return PR_TRUE; } +#endif static void WalkFramesThroughPlaceholders(nsIPresContext *aPresContext, nsIFrame *aFrame, @@ -5509,11 +5513,13 @@ PresShell::ReconstructStyleData(PRBool aRebuildRuleTree) set->ReconstructDocElementHierarchy(mPresContext); else { cssFrameConstructor->ProcessRestyledFrames(changeList, mPresContext); +#ifdef MOZ_XUL if (aRebuildRuleTree) { GetRootFrame(&rootFrame); WalkFramesThroughPlaceholders(mPresContext, rootFrame, &ReResolveMenusAndTrees, nsnull); } +#endif } if (aRebuildRuleTree) diff --git a/mozilla/layout/build/nsContentDLF.cpp b/mozilla/layout/build/nsContentDLF.cpp index e3f87b09b99..6f4fba7bf80 100644 --- a/mozilla/layout/build/nsContentDLF.cpp +++ b/mozilla/layout/build/nsContentDLF.cpp @@ -61,7 +61,6 @@ #include "nsRDFCID.h" #include "nsIRDFResource.h" -#include "nsIXULContentSink.h" #include "nsIDocStreamLoaderFactory.h" #include "imgILoader.h" diff --git a/mozilla/layout/build/nsLayoutModule.cpp b/mozilla/layout/build/nsLayoutModule.cpp index c49459f6a99..6cf1a41d4d4 100644 --- a/mozilla/layout/build/nsLayoutModule.cpp +++ b/mozilla/layout/build/nsLayoutModule.cpp @@ -328,6 +328,7 @@ nsresult NS_NewFrameUtil(nsIFrameUtil** aResult); nsresult NS_NewLayoutDebugger(nsILayoutDebugger** aResult); #endif +#ifdef MOZ_XUL nsresult NS_NewBoxObject(nsIBoxObject** aResult); nsresult NS_NewListBoxObject(nsIBoxObject** aResult); nsresult NS_NewScrollBoxObject(nsIBoxObject** aResult); @@ -337,6 +338,9 @@ nsresult NS_NewPopupBoxObject(nsIBoxObject** aResult); nsresult NS_NewBrowserBoxObject(nsIBoxObject** aResult); nsresult NS_NewIFrameBoxObject(nsIBoxObject** aResult); nsresult NS_NewTreeBoxObject(nsIBoxObject** aResult); +nsresult NS_NewXULElementFactory(nsIElementFactory** aResult); +#endif + nsresult NS_CreateFrameTraversal(nsIFrameTraversal** aResult); nsresult NS_CreateCSSFrameConstructor(nsICSSFrameConstructor** aResult); nsresult NS_NewLayoutHistoryState(nsILayoutHistoryState** aResult); @@ -367,10 +371,7 @@ nsresult NS_NewSyncLoadDOMService(nsISyncLoadDOMService** aResult); nsresult NS_NewDOMEventGroup(nsIDOMEventGroup** aResult); nsresult NS_NewXPointerResult(nsIXPointerResult **aResult); -#ifdef MOZ_XUL -nsresult NS_NewXULElementFactory(nsIElementFactory** aResult); NS_IMETHODIMP NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult); -#endif #ifdef MOZ_MATHML nsresult NS_NewMathMLElementFactory(nsIElementFactory** aResult); diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index 40fb579e769..b692ba37cbd 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -88,7 +88,9 @@ static NS_DEFINE_CID(kTextNodeCID, NS_TEXTNODE_CID); static NS_DEFINE_CID(kHTMLElementFactoryCID, NS_HTML_ELEMENT_FACTORY_CID); +#ifdef MOZ_XUL #include "nsIXULDocument.h" // Temporary fix for Bug 36558 +#endif #ifdef DO_NEW_REFLOW #include "nsIFontMetrics.h" @@ -392,8 +394,12 @@ nsComboboxControlFrame::Init(nsIPresContext* aPresContext, nsCOMPtr document; nsresult rv = aContent->GetDocument(*getter_AddRefs(document)); if (NS_SUCCEEDED(rv) && document) { +#ifdef MOZ_XUL nsCOMPtr xulDoc(do_QueryInterface(document)); mGoodToGo = xulDoc?PR_FALSE:PR_TRUE; +#else + mGoodToGo = PR_TRUE; +#endif } //------------------------------- // Done - Temporary fix for Bug 36558 diff --git a/mozilla/layout/generic/nsAreaFrame.cpp b/mozilla/layout/generic/nsAreaFrame.cpp index 9af669c6aa3..394f978d25e 100644 --- a/mozilla/layout/generic/nsAreaFrame.cpp +++ b/mozilla/layout/generic/nsAreaFrame.cpp @@ -46,7 +46,7 @@ #include "nsHTMLParts.h" #include "nsLayoutAtoms.h" -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL #include "nsINameSpaceManager.h" #include "nsXULAtoms.h" #include "nsIEventStateManager.h" @@ -75,7 +75,7 @@ nsAreaFrame::nsAreaFrame() { } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL // If you make changes to this function, check its counterparts // in nsBoxFrame and nsTextBoxFrame @@ -137,7 +137,7 @@ nsAreaFrame::RegUnregAccessKey(nsIPresContext* aPresContext, ///////////////////////////////////////////////////////////////////////////// // nsIFrame -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL NS_IMETHODIMP nsAreaFrame::Init(nsIPresContext* aPresContext, nsIContent* aContent, diff --git a/mozilla/layout/generic/nsAreaFrame.h b/mozilla/layout/generic/nsAreaFrame.h index 701e0df2849..b1299366dcb 100644 --- a/mozilla/layout/generic/nsAreaFrame.h +++ b/mozilla/layout/generic/nsAreaFrame.h @@ -58,7 +58,7 @@ public: // nsIFrame -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL NS_IMETHOD Init(nsIPresContext* aPresContext, nsIContent* aContent, nsIFrame* aParent, @@ -89,7 +89,7 @@ public: protected: nsAreaFrame(); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL nsresult RegUnregAccessKey(nsIPresContext* aPresContext, PRBool aDoReg); #endif diff --git a/mozilla/layout/html/base/src/nsAreaFrame.cpp b/mozilla/layout/html/base/src/nsAreaFrame.cpp index 9af669c6aa3..394f978d25e 100644 --- a/mozilla/layout/html/base/src/nsAreaFrame.cpp +++ b/mozilla/layout/html/base/src/nsAreaFrame.cpp @@ -46,7 +46,7 @@ #include "nsHTMLParts.h" #include "nsLayoutAtoms.h" -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL #include "nsINameSpaceManager.h" #include "nsXULAtoms.h" #include "nsIEventStateManager.h" @@ -75,7 +75,7 @@ nsAreaFrame::nsAreaFrame() { } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL // If you make changes to this function, check its counterparts // in nsBoxFrame and nsTextBoxFrame @@ -137,7 +137,7 @@ nsAreaFrame::RegUnregAccessKey(nsIPresContext* aPresContext, ///////////////////////////////////////////////////////////////////////////// // nsIFrame -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL NS_IMETHODIMP nsAreaFrame::Init(nsIPresContext* aPresContext, nsIContent* aContent, diff --git a/mozilla/layout/html/base/src/nsAreaFrame.h b/mozilla/layout/html/base/src/nsAreaFrame.h index 701e0df2849..b1299366dcb 100644 --- a/mozilla/layout/html/base/src/nsAreaFrame.h +++ b/mozilla/layout/html/base/src/nsAreaFrame.h @@ -58,7 +58,7 @@ public: // nsIFrame -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL NS_IMETHOD Init(nsIPresContext* aPresContext, nsIContent* aContent, nsIFrame* aParent, @@ -89,7 +89,7 @@ public: protected: nsAreaFrame(); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL nsresult RegUnregAccessKey(nsIPresContext* aPresContext, PRBool aDoReg); #endif diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index bf7bce093be..b46987b2f68 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -162,8 +162,10 @@ #include "nsStyleChangeList.h" #include "nsIStyleFrameConstruction.h" #include "nsIBindingManager.h" +#ifdef MOZ_XUL #include "nsIMenuFrame.h" #include "nsITreeBoxObject.h" +#endif #include "nsIXBLBinding.h" #include "nsPlaceholderFrame.h" @@ -5403,6 +5405,7 @@ BuildFramechangeList(nsIFrame *aFrame, void *aClosure) return PR_TRUE; } +#ifdef MOZ_XUL PR_STATIC_CALLBACK(PRBool) ReResolveMenusAndTrees(nsIFrame *aFrame, void *aClosure) { @@ -5423,6 +5426,7 @@ ReResolveMenusAndTrees(nsIFrame *aFrame, void *aClosure) } return PR_TRUE; } +#endif static void WalkFramesThroughPlaceholders(nsIPresContext *aPresContext, nsIFrame *aFrame, @@ -5509,11 +5513,13 @@ PresShell::ReconstructStyleData(PRBool aRebuildRuleTree) set->ReconstructDocElementHierarchy(mPresContext); else { cssFrameConstructor->ProcessRestyledFrames(changeList, mPresContext); +#ifdef MOZ_XUL if (aRebuildRuleTree) { GetRootFrame(&rootFrame); WalkFramesThroughPlaceholders(mPresContext, rootFrame, &ReResolveMenusAndTrees, nsnull); } +#endif } if (aRebuildRuleTree) diff --git a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp index 40fb579e769..b692ba37cbd 100644 --- a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -88,7 +88,9 @@ static NS_DEFINE_CID(kTextNodeCID, NS_TEXTNODE_CID); static NS_DEFINE_CID(kHTMLElementFactoryCID, NS_HTML_ELEMENT_FACTORY_CID); +#ifdef MOZ_XUL #include "nsIXULDocument.h" // Temporary fix for Bug 36558 +#endif #ifdef DO_NEW_REFLOW #include "nsIFontMetrics.h" @@ -392,8 +394,12 @@ nsComboboxControlFrame::Init(nsIPresContext* aPresContext, nsCOMPtr document; nsresult rv = aContent->GetDocument(*getter_AddRefs(document)); if (NS_SUCCEEDED(rv) && document) { +#ifdef MOZ_XUL nsCOMPtr xulDoc(do_QueryInterface(document)); mGoodToGo = xulDoc?PR_FALSE:PR_TRUE; +#else + mGoodToGo = PR_TRUE; +#endif } //------------------------------- // Done - Temporary fix for Bug 36558 diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp index 16030e35552..459b4799221 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp @@ -107,7 +107,6 @@ #include "nsFormControlHelper.h" #include "nsObjectFrame.h" #include "nsRuleNode.h" -#include "nsIXULDocument.h" #include "nsIPrintPreviewContext.h" #include "nsIDOMMutationEvent.h" #include "nsChildIterator.h" @@ -117,6 +116,7 @@ #include "nsAutoPtr.h" #include "nsScrollPortFrame.h" #include "nsXULAtoms.h" +#include "nsBoxFrame.h" static NS_DEFINE_CID(kTextNodeCID, NS_TEXTNODE_CID); static NS_DEFINE_CID(kHTMLElementFactoryCID, NS_HTML_ELEMENT_FACTORY_CID); @@ -128,10 +128,11 @@ static NS_DEFINE_CID(kAttributeContentCID, NS_ATTRIBUTECONTENT_CID); #include "nsBox.h" -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL #include "nsIRootBox.h" #include "nsIDOMXULCommandDispatcher.h" #include "nsIDOMXULDocument.h" +#include "nsIXULDocument.h" #endif #include "nsInlineFrame.h" @@ -217,9 +218,7 @@ static FrameCtorDebugFlags gFlags[] = { #endif -#ifdef INCLUDE_XUL -#include "nsXULAtoms.h" - +#ifdef MOZ_XUL #include "nsMenuFrame.h" #include "nsPopupSetFrame.h" #include "nsTreeColFrame.h" @@ -249,12 +248,6 @@ NS_NewDocElementBoxFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame); nsresult NS_NewThumbFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); -nsresult -NS_NewScrollPortFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewGfxScrollFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, nsIDocument* aDocument, PRBool aIsRoot); - nsresult NS_NewDeckFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, nsIBoxLayout* aLayoutManager = nsnull); @@ -279,21 +272,6 @@ NS_NewGroupBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); nsresult NS_NewButtonBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame); -nsresult -NS_NewSliderFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewScrollbarButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - -nsresult -NS_NewNativeScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); - nsresult NS_NewGrippyFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); @@ -347,6 +325,25 @@ NS_NewResizerFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame); #endif +nsresult +NS_NewScrollPortFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + +nsresult +NS_NewGfxScrollFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame, nsIDocument* aDocument, PRBool aIsRoot); + +nsresult +NS_NewSliderFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + +nsresult +NS_NewScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + +nsresult +NS_NewScrollbarButtonFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + +nsresult +NS_NewNativeScrollbarFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ); + + #ifdef NOISY_FINDFRAME static PRInt32 FFWC_totalCount=0; static PRInt32 FFWC_doLoop=0; @@ -3472,7 +3469,7 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell, #if defined(MOZ_SVG) PRInt32 nameSpaceID; #endif -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aDocElement->IsContentOfType(nsIContent::eXUL)) { rv = NS_NewDocElementBoxFrame(aPresShell, &contentFrame); if (NS_FAILED(rv)) { @@ -3691,7 +3688,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell, nsIAtom* rootPseudo; if (!isPaginated) { -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aDocElement->IsContentOfType(nsIContent::eXUL)) { NS_NewRootBoxFrame(aPresShell, &rootFrame); @@ -3740,7 +3737,7 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIPresShell* aPresShell, } // Never create scrollbars for XUL documents -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (isXUL) { isScrollable = PR_FALSE; } else @@ -4234,25 +4231,7 @@ nsCSSFrameConstructor::ConstructTextControlFrame(nsIPresShell* aPresShell, PRBool nsCSSFrameConstructor::HasGfxScrollbars() { -#ifndef INCLUDE_XUL - return PR_FALSE; -#endif - // Get the Prefs - if (!mGotGfxPrefs) { - nsCOMPtr prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID)); - if (prefBranch) { - PRBool hasGfxScroll = PR_FALSE; // use a temp since we have a PRPackedBool - prefBranch->GetBoolPref("nglayout.widget.gfxscrollbars", &hasGfxScroll); - mHasGfxScrollbars = hasGfxScroll; - mGotGfxPrefs = PR_TRUE; - } else { - mHasGfxScrollbars = PR_FALSE; - } - } - - // while we don't support native scrollbars for Seamonkey, some embedding - // clients demand them (but may still want XUL). Give them that option. - return mHasGfxScrollbars; + return PR_TRUE; } PRBool @@ -5263,10 +5242,8 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell aTag != nsHTMLAtoms::input && aTag != nsHTMLAtoms::textarea && aTag != nsHTMLAtoms::combobox && - aTag != nsHTMLAtoms::isindex -#ifdef INCLUDE_XUL - && aTag != nsXULAtoms::scrollbar -#endif + aTag != nsHTMLAtoms::isindex && + aTag != nsXULAtoms::scrollbar ) return NS_OK; @@ -5335,7 +5312,7 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell content->SetParent(aParent); content->SetDocument(aDocument, PR_TRUE, PR_TRUE); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL // Only cut XUL scrollbars off if they're not in a XUL document. This allows // scrollbars to be styled from XUL (although not from XML or HTML). nsCOMPtr tag; @@ -5365,7 +5342,6 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell return NS_OK; } -#ifdef INCLUDE_XUL static PRBool IsXULDisplayType(const nsStyleDisplay* aDisplay) { @@ -5431,6 +5407,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, if (isXULNS) { // First try creating a frame based on the tag +#ifdef MOZ_XUL // BUTTON CONSTRUCTION if (aTag == nsXULAtoms::button || aTag == nsXULAtoms::checkbox || aTag == nsXULAtoms::radio) { processChildren = PR_TRUE; @@ -5619,8 +5596,10 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, rv = NS_NewProgressMeterFrame(aPresShell, &newFrame); } // End of PROGRESS METER CONSTRUCTION logic + else +#endif // SLIDER CONSTRUCTION - else if (aTag == nsXULAtoms::slider) { + if (aTag == nsXULAtoms::slider) { processChildren = PR_TRUE; isReplaced = PR_TRUE; rv = NS_NewSliderFrame(aPresShell, &newFrame); @@ -5648,6 +5627,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, } // End of SCROLLBUTTON CONSTRUCTION logic +#ifdef MOZ_XUL // SPLITTER CONSTRUCTION else if (aTag == nsXULAtoms::splitter) { processChildren = PR_TRUE; @@ -5663,6 +5643,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, rv = NS_NewGrippyFrame(aPresShell, &newFrame); } // End of GRIPPY CONSTRUCTION logic +#endif } // Display types for XUL start here @@ -5692,7 +5673,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, } } // End of BOX CONSTRUCTION logic - +#ifdef MOZ_XUL // ------- Begin Grid --------- else if ((!aXBLBaseTag && (display->mDisplay == NS_STYLE_DISPLAY_INLINE_GRID || display->mDisplay == NS_STYLE_DISPLAY_GRID)) || @@ -5884,6 +5865,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, if (!menuFrame) isPopup = PR_TRUE; } +#endif } } @@ -5973,7 +5955,9 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, aState.mAbsoluteItems.AddChild(newFrame); } else if (isFixedPositioned) { aState.mFixedItems.AddChild(newFrame); - } else if (isPopup) { + } +#ifdef MOZ_XUL + else if (isPopup) { // Locate the root popup set and add ourselves to the popup set's list // of popup frames. nsIFrame* rootFrame; @@ -5994,6 +5978,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, } } } +#endif // Add the placeholder frame to the flow aFrameItems.AddChild(placeholderFrame); @@ -6003,7 +5988,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, aFrameItems.AddChild(topFrame); } - +#ifdef MOZ_XUL // register tooltip support if needed nsAutoString value; if (aTag == nsXULAtoms::treechildren || // trees always need titletips @@ -6020,6 +6005,7 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, if (rootBox) rootBox->AddTooltipSupport(aContent); } +#endif // addToHashTable: @@ -6036,7 +6022,6 @@ nsCSSFrameConstructor::ConstructXULFrame(nsIPresShell* aPresShell, return rv; } -#endif already_AddRefed nsCSSFrameConstructor::BeginBuildingScrollFrame(nsIPresShell* aPresShell, @@ -6328,7 +6313,6 @@ nsCSSFrameConstructor::InitGfxScrollFrame(nsIPresShell* aPresShell, nsFrameItems& aAnonymousFrames, nsIFrame* aScrollPortFrame) { -#ifdef INCLUDE_XUL if (!aScrollPortFrame) NS_NewScrollPortFrame(aPresShell, &aScrollPortFrame); @@ -6339,8 +6323,6 @@ nsCSSFrameConstructor::InitGfxScrollFrame(nsIPresShell* aPresShell, PR_FALSE, aAnonymousFrames); return NS_OK; -#endif - return NS_ERROR_FAILURE; } nsresult @@ -7479,7 +7461,6 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe aContent, aParentFrame, aTag, aNameSpaceID, styleContext, aFrameItems); -#ifdef INCLUDE_XUL // Failing to find a matching HTML frame, try creating a specialized // XUL frame. This is temporary, pending planned factoring of this // whole process into separate, pluggable steps. @@ -7492,7 +7473,6 @@ nsCSSFrameConstructor::ConstructFrameInternal( nsIPresShell* aPresShe return rv; } } -#endif // MathML Mod - RBS #ifdef MOZ_MATHML @@ -7609,6 +7589,7 @@ nsCSSFrameConstructor::ReconstructDocElementHierarchy(nsIPresContext* aPresConte nsIFrame* docParentFrame; docElementFrame->GetParent(&docParentFrame); +#ifdef MOZ_XUL // If we're in a XUL document, then we need to crawl up to the // RootBoxFrame and remove _its_ child. nsCOMPtr xuldoc = do_QueryInterface(mDocument); @@ -7619,6 +7600,7 @@ nsCSSFrameConstructor::ReconstructDocElementHierarchy(nsIPresContext* aPresConte docParentFrame->GetParent(&docParentFrame); } } +#endif NS_ASSERTION(docParentFrame, "should have a parent frame"); if (docParentFrame) { @@ -8375,7 +8357,7 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, nsCOMPtr shell; aPresContext->GetShell(getter_AddRefs(shell)); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aContainer) { nsCOMPtr bindingManager; mDocument->GetBindingManager(getter_AddRefs(bindingManager)); @@ -8392,7 +8374,7 @@ nsCSSFrameConstructor::ContentAppended(nsIPresContext* aPresContext, return NS_OK; } -#endif // INCLUDE_XUL +#endif // MOZ_XUL // Get the frame associated with the content nsIFrame* parentFrame = GetFrameFor(shell, aPresContext, aContainer); @@ -9003,7 +8985,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, aPresContext->GetShell(getter_AddRefs(shell)); nsresult rv = NS_OK; -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aContainer) { nsCOMPtr bindingManager; mDocument->GetBindingManager(getter_AddRefs(bindingManager)); @@ -9043,7 +9025,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext, return NS_OK; } -#endif // INCLUDE_XUL +#endif // MOZ_XUL // If we have a null parent, then this must be the document element // being inserted @@ -9603,6 +9585,7 @@ DeletingFrameSubtree(nsIPresContext* aPresContext, for (PRInt32 i = destroyQueue.Count() - 1; i >= 0; --i) { nsIFrame* outOfFlowFrame = NS_STATIC_CAST(nsIFrame*, destroyQueue[i]); +#ifdef MOZ_XUL const nsStyleDisplay* display; outOfFlowFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)display); @@ -9626,8 +9609,9 @@ DeletingFrameSubtree(nsIPresContext* aPresContext, popupSet->RemovePopupFrame(outOfFlowFrame); } } - } - else { + } else +#endif + { // Get the out-of-flow frame's parent nsIFrame* parentFrame; outOfFlowFrame->GetParent(&parentFrame); @@ -9738,7 +9722,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, } } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (aContainer) { nsCOMPtr bindingManager; mDocument->GetBindingManager(getter_AddRefs(bindingManager)); @@ -9789,7 +9773,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, return NS_OK; } -#endif // INCLUDE_XUL +#endif // MOZ_XUL if (childFrame) { // If the frame we are manipulating is a special frame then do @@ -9912,6 +9896,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, frameManager->GetRootFrame(&rootFrame); if (rootFrame) rootFrame->FirstChild(aPresContext, nsnull, &rootFrame); +#ifdef MOZ_XUL nsCOMPtr rootBox(do_QueryInterface(rootFrame)); if (rootBox) { nsIFrame* popupSetFrame; @@ -9922,6 +9907,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIPresContext* aPresContext, popupSet->RemovePopupFrame(childFrame); } } +#endif // Remove the placeholder frame first (XXX second for now) (so // that it doesn't retain a dangling pointer to memory) @@ -10661,7 +10647,7 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext, PRBool reframe = (aHint & (nsChangeHint_ReconstructDoc | nsChangeHint_ReconstructFrame)) != 0; PRBool restyle = (aHint & ~(nsChangeHint_AttrChange)) != 0; -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL // The following listbox widget trap prevents offscreen listbox widget // content from being removed and re-inserted (which is what would // happen otherwise). @@ -10693,7 +10679,7 @@ nsCSSFrameConstructor::AttributeChanged(nsIPresContext* aPresContext, } } -#endif // INCLUDE_XUL +#endif // MOZ_XUL // See if we have appearance information for a theme. if (primaryFrame) { @@ -13286,7 +13272,7 @@ nsCSSFrameConstructor::CreateListBoxContent(nsIPresContext* aPresContext, PRBool aIsScrollbar, nsILayoutHistoryState* aFrameState) { -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL nsCOMPtr shell; aPresContext->GetShell(getter_AddRefs(shell)); nsresult rv = NS_OK; diff --git a/mozilla/layout/html/style/src/nsCSSFrameConstructor.h b/mozilla/layout/html/style/src/nsCSSFrameConstructor.h index 11474eca27e..3486cd0f851 100644 --- a/mozilla/layout/html/style/src/nsCSSFrameConstructor.h +++ b/mozilla/layout/html/style/src/nsCSSFrameConstructor.h @@ -607,7 +607,6 @@ protected: nsFrameItems& aFrameItems); #endif -#ifdef INCLUDE_XUL nsresult ConstructXULFrame(nsIPresShell* aPresShell, nsIPresContext* aPresContext, nsFrameConstructorState& aState, @@ -620,7 +619,6 @@ protected: PRBool aXBLBaseTag, PRBool& aHaltProcessing); -#endif // SVG - rods #ifdef MOZ_SVG diff --git a/mozilla/layout/macbuild/layoutSharedPrefix.h b/mozilla/layout/macbuild/layoutSharedPrefix.h index d7be2edd443..c3bd22079b6 100644 --- a/mozilla/layout/macbuild/layoutSharedPrefix.h +++ b/mozilla/layout/macbuild/layoutSharedPrefix.h @@ -21,7 +21,6 @@ */ #define MOZ_XUL 1 -#define INCLUDE_XUL 1 #define _IMPL_NS_LAYOUT 1 #include "MacSharedPrefix.h" diff --git a/mozilla/layout/macbuild/layoutSharedPrefix_debug.h b/mozilla/layout/macbuild/layoutSharedPrefix_debug.h index fbd054f382d..457e9af7454 100644 --- a/mozilla/layout/macbuild/layoutSharedPrefix_debug.h +++ b/mozilla/layout/macbuild/layoutSharedPrefix_debug.h @@ -21,7 +21,6 @@ */ #define MOZ_XUL 1 -#define INCLUDE_XUL 1 #define _IMPL_NS_LAYOUT 1 #include "MacSharedPrefix_debug.h" diff --git a/mozilla/layout/printing/nsPrintEngine.cpp b/mozilla/layout/printing/nsPrintEngine.cpp index a54ab26b094..483612dd82b 100644 --- a/mozilla/layout/printing/nsPrintEngine.cpp +++ b/mozilla/layout/printing/nsPrintEngine.cpp @@ -169,7 +169,6 @@ static const char* kPrintingPromptService = "@mozilla.org/embedcomp/printingprom #include "nsIDOMHTMLAreaElement.h" #include "nsIDOMHTMLLinkElement.h" #include "nsIDOMHTMLImageElement.h" -#include "nsIXULDocument.h" // Temporary code for Bug 136185 #include "nsIContentViewerContainer.h" #include "nsIContentViewer.h" diff --git a/mozilla/layout/style/nsCSSAnonBoxList.h b/mozilla/layout/style/nsCSSAnonBoxList.h index 2e3a92d1d76..e74c3ae672d 100644 --- a/mozilla/layout/style/nsCSSAnonBoxList.h +++ b/mozilla/layout/style/nsCSSAnonBoxList.h @@ -90,7 +90,7 @@ CSS_ANON_BOX(viewport, ":-moz-viewport") CSS_ANON_BOX(viewportScroll, ":-moz-viewport-scroll") CSS_ANON_BOX(selectScrolledContent, ":-moz-select-scrolled-content") -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL CSS_ANON_BOX(moztreerow, ":-moz-tree-row") CSS_ANON_BOX(moztreecell, ":-moz-tree-cell") CSS_ANON_BOX(moztreecolumn, ":-moz-tree-column") diff --git a/mozilla/layout/style/nsCSSDeclaration.cpp b/mozilla/layout/style/nsCSSDeclaration.cpp index 01d369d0655..9f188744f12 100644 --- a/mozilla/layout/style/nsCSSDeclaration.cpp +++ b/mozilla/layout/style/nsCSSDeclaration.cpp @@ -68,9 +68,7 @@ static NS_DEFINE_IID(kCSSPageSID, NS_CSS_PAGE_SID); static NS_DEFINE_IID(kCSSContentSID, NS_CSS_CONTENT_SID); static NS_DEFINE_IID(kCSSUserInterfaceSID, NS_CSS_USER_INTERFACE_SID); static NS_DEFINE_IID(kCSSAuralSID, NS_CSS_AURAL_SID); -#ifdef INCLUDE_XUL static NS_DEFINE_IID(kCSSXULSID, NS_CSS_XUL_SID); -#endif #ifdef MOZ_SVG static NS_DEFINE_IID(kCSSSVGSID, NS_CSS_SVG_SID); @@ -1076,7 +1074,6 @@ void nsCSSAural::List(FILE* out, PRInt32 aIndent) const } #endif -#ifdef INCLUDE_XUL // --- nsCSSXUL ----------------- nsCSSXUL::nsCSSXUL(void) @@ -1119,8 +1116,6 @@ void nsCSSXUL::List(FILE* out, PRInt32 aIndent) const } #endif -#endif // INCLUDE_XUL - #ifdef MOZ_SVG // --- nsCSSSVG ----------------- @@ -1250,9 +1245,7 @@ nsCSSDeclaration::nsCSSDeclaration(const nsCSSDeclaration& aCopy) DECL_IF_COPY(Content); DECL_IF_COPY(UserInterface); DECL_IF_COPY(Aural); -#ifdef INCLUDE_XUL DECL_IF_COPY(XUL); -#endif #ifdef MOZ_SVG DECL_IF_COPY(SVG); @@ -1299,9 +1292,7 @@ nsCSSDeclaration::~nsCSSDeclaration(void) CSS_HAS_DELETE(Content); CSS_HAS_DELETE(UserInterface); CSS_HAS_DELETE(Aural); -#ifdef INCLUDE_XUL CSS_HAS_DELETE(XUL); -#endif #ifdef MOZ_SVG CSS_HAS_DELETE(SVG); @@ -1338,9 +1329,7 @@ nsCSSDeclaration::GetData(const nsID& aSID) CSS_IF_GET_ELSE(aSID, Content) CSS_IF_GET_ELSE(aSID, UserInterface) CSS_IF_GET_ELSE(aSID, Aural) -#ifdef INCLUDE_XUL CSS_IF_GET_ELSE(aSID, XUL) -#endif #ifdef MOZ_SVG CSS_IF_GET_ELSE(aSID, SVG) #endif @@ -1963,7 +1952,6 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -1984,7 +1972,6 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -2968,7 +2955,6 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -2992,7 +2978,6 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -3763,7 +3748,6 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -3784,7 +3768,6 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -4644,7 +4627,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -4669,7 +4651,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG diff --git a/mozilla/layout/style/nsCSSDeclaration.h b/mozilla/layout/style/nsCSSDeclaration.h index f28529555a6..3c63f7f3436 100644 --- a/mozilla/layout/style/nsCSSDeclaration.h +++ b/mozilla/layout/style/nsCSSDeclaration.h @@ -115,11 +115,9 @@ typedef nsCSSStruct nsRuleDataStruct; #define NS_CSS_AURAL_SID \ {0x166d2bb0, 0x5a3b, 0x11d2, {0x80, 0x3b, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a}} -#ifdef INCLUDE_XUL // {FC075D62-B1CF-47a1-AF4E-CB40E11A4314} #define NS_CSS_XUL_SID \ { 0xfc075d62, 0xb1cf, 0x47a1, { 0xaf, 0x4e, 0xcb, 0x40, 0xe1, 0x1a, 0x43, 0x14 } } -#endif #ifdef MOZ_SVG // {9A41A036-027B-45ef-89C9-6E32797839E7} @@ -502,7 +500,6 @@ struct nsCSSAural : public nsCSSStruct { // NEW struct nsRuleDataAural : public nsCSSAural { }; -#ifdef INCLUDE_XUL struct nsCSSXUL : public nsCSSStruct { nsCSSXUL(void); nsCSSXUL(const nsCSSXUL& aCopy); @@ -523,7 +520,6 @@ struct nsCSSXUL : public nsCSSStruct { struct nsRuleDataXUL : public nsCSSXUL { }; -#endif #ifdef MOZ_SVG struct nsCSSSVG : public nsCSSStruct { @@ -570,9 +566,7 @@ struct nsCSSDeclContains nsCSSBitField mHasUserInterface:1; // 8 nsCSSBitField mHasTable:1; // 9 nsCSSBitField mHasContent:1; // 10 -#if defined(INCLUDE_XUL) nsCSSBitField mHasXUL:1; // 11 -#endif nsCSSBitField mHasBreaks:1; // 12 nsCSSBitField mHasPage:1; // 13 nsCSSBitField mHasAural:1; // 14 @@ -600,14 +594,8 @@ struct nsCSSDeclContains #define CSSDECLIDX_UserInterface(decl) ((decl).mContains.mHasUserInterface + CSSDECLIDX_Position(decl)) #define CSSDECLIDX_Table(decl) ((decl).mContains.mHasTable + CSSDECLIDX_UserInterface(decl)) #define CSSDECLIDX_Content(decl) ((decl).mContains.mHasContent + CSSDECLIDX_Table(decl)) -#if defined(INCLUDE_XUL) #define CSSDECLIDX_XUL(decl) ((decl).mContains.mHasXUL + CSSDECLIDX_Content(decl)) -#endif -#if !defined(INCLUDE_XUL) -#define CSSDECLIDX_Breaks(decl) ((decl).mContains.mHasBreaks + CSSDECLIDX_Content(decl)) -#else #define CSSDECLIDX_Breaks(decl) ((decl).mContains.mHasBreaks + CSSDECLIDX_XUL(decl)) -#endif #define CSSDECLIDX_Page(decl) ((decl).mContains.mHasPage + CSSDECLIDX_Breaks(decl)) #define CSSDECLIDX_Aural(decl) ((decl).mContains.mHasAural + CSSDECLIDX_Page(decl)) #if defined(MOZ_SVG) diff --git a/mozilla/layout/style/nsCSSLoader.cpp b/mozilla/layout/style/nsCSSLoader.cpp index ff50e35429a..0359f9cbe4b 100644 --- a/mozilla/layout/style/nsCSSLoader.cpp +++ b/mozilla/layout/style/nsCSSLoader.cpp @@ -55,7 +55,7 @@ #include "nsIAtom.h" #include "nsCSSLoader.h" -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL #include "nsIXULPrototypeCache.h" #endif @@ -807,7 +807,7 @@ SheetLoadData::OnStreamComplete(nsIUnicharStreamLoader* aLoader, return mLoader->ParseSheet(aDataStream, this, completed); } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL static PRBool IsChromeURI(nsIURI* aURI) { NS_ASSERTION(aURI, "Have to pass in a URI"); @@ -990,7 +990,7 @@ CSSLoaderImpl::CreateSheet(nsIURI* aURI, nsCOMPtr sheet; // First, the XUL cache -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (IsChromeURI(aURI)) { nsCOMPtr cache(do_GetService("@mozilla.org/xul/xul-prototype-cache;1")); if (cache) { @@ -1542,7 +1542,7 @@ CSSLoaderImpl::SheetComplete(SheetLoadData* aLoadData, PRBool aSucceeded) // Now that it's marked complete, put the sheet in our cache if (aSucceeded && aLoadData->mURI) { -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (IsChromeURI(aLoadData->mURI)) { nsCOMPtr cache(do_GetService("@mozilla.org/xul/xul-prototype-cache;1")); if (cache) { @@ -1562,7 +1562,7 @@ CSSLoaderImpl::SheetComplete(SheetLoadData* aLoadData, PRBool aSucceeded) #endif URLKey key(aLoadData->mURI); mCompleteSheets.Put(&key, aLoadData->mSheet); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL } #endif } diff --git a/mozilla/layout/style/nsCSSParser.cpp b/mozilla/layout/style/nsCSSParser.cpp index 8cc1e78c2b6..c3b83069dff 100644 --- a/mozilla/layout/style/nsCSSParser.cpp +++ b/mozilla/layout/style/nsCSSParser.cpp @@ -252,7 +252,7 @@ protected: PRBool ParseSingleValueProperty(PRInt32& aErrorCode, nsCSSValue& aValue, nsCSSProperty aPropID); -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL PRBool ParseTreePseudoElement(PRInt32& aErrorCode, nsCSSSelector& aSelector); #endif @@ -1561,7 +1561,7 @@ static PRBool IsSinglePseudoClass(const nsCSSSelector& aSelector) (aSelector.mPseudoClassList->mNext == nsnull)); } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL static PRBool IsTreePseudoElement(const nsString& aPseudo) { return Substring(aPseudo, 0, 10).Equals(NS_LITERAL_STRING("-moz-tree-")); @@ -1619,7 +1619,7 @@ PRBool CSSParserImpl::ParseSelectorGroup(PRInt32& aErrorCode, else { // append new pseudo element selector selector.Reset(); selector.mTag = pseudoClassList->mAtom; // steal ref count -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (IsTreePseudoElement(selector.mTag)) { // Take the remaining "pseudoclasses" that we parsed // inside the tree pseudoelement's ()-list, and @@ -2167,7 +2167,7 @@ void CSSParserImpl::ParsePseudoSelector(PRInt32& aDataMask, if (eCSSToken_Ident != mToken.mType) { // malformed selector if (eCSSToken_Function != mToken.mType || !( -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL // -moz-tree is a pseudo-element and therefore cannot be negated (!aIsNegated && IsTreePseudoElement(mToken.mIdent)) || #endif @@ -2217,7 +2217,7 @@ void CSSParserImpl::ParsePseudoSelector(PRInt32& aDataMask, aDataMask |= SEL_MASK_PELEM; aSelector.AddPseudoClass(pseudo); // store it here, it gets pulled later -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL if (eCSSToken_Function == mToken.mType && IsTreePseudoElement(mToken.mIdent)) { // We have encountered a pseudoelement of the form @@ -2784,7 +2784,7 @@ PRBool CSSParserImpl::ParseColorOpacity(PRInt32& aErrorCode, PRUint8& aOpacity) return PR_TRUE; } -#ifdef INCLUDE_XUL +#ifdef MOZ_XUL PRBool CSSParserImpl::ParseTreePseudoElement(PRInt32& aErrorCode, nsCSSSelector& aSelector) { @@ -3916,7 +3916,6 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, case eCSSProperty_left: case eCSSProperty_right: return ParseVariant(aErrorCode, aValue, VARIANT_AHLP, nsnull); -#ifdef INCLUDE_XUL case eCSSProperty_box_align: return ParseVariant(aErrorCode, aValue, VARIANT_HK, nsCSSProps::kBoxAlignKTable); @@ -3933,7 +3932,6 @@ PRBool CSSParserImpl::ParseSingleValueProperty(PRInt32& aErrorCode, nsCSSProps::kBoxPackKTable); case eCSSProperty_box_ordinal_group: return ParseVariant(aErrorCode, aValue, VARIANT_INTEGER, nsnull); -#endif #ifdef MOZ_SVG case eCSSProperty_fill: return ParseVariant(aErrorCode, aValue, VARIANT_HC | VARIANT_NONE, diff --git a/mozilla/layout/style/nsCSSProps.cpp b/mozilla/layout/style/nsCSSProps.cpp index 0e96f785d7f..e0aa6e0ad8f 100644 --- a/mozilla/layout/style/nsCSSProps.cpp +++ b/mozilla/layout/style/nsCSSProps.cpp @@ -821,7 +821,6 @@ const PRInt32 nsCSSProps::kWhitespaceKTable[] = { -1,-1 }; -#ifdef INCLUDE_XUL // Specific keyword tables for XUL.properties const PRInt32 nsCSSProps::kBoxAlignKTable[] = { eCSSKeyword_stretch, NS_STYLE_BOX_ALIGN_STRETCH, @@ -853,7 +852,6 @@ const PRInt32 nsCSSProps::kBoxPackKTable[] = { eCSSKeyword_justify, NS_STYLE_BOX_PACK_JUSTIFY, -1,-1 }; -#endif #ifdef MOZ_SVG // keyword tables for SVG properties @@ -976,7 +974,6 @@ static const PRInt32 kBackgroundYPositionKTable[] = { case eCSSProperty_border_collapse: return SearchKeywordTable(aValue, kBorderCollapseKTable); -#ifdef INCLUDE_XUL case eCSSProperty_box_align: return SearchKeywordTable(aValue, kBoxAlignKTable); case eCSSProperty_box_direction: @@ -985,7 +982,6 @@ static const PRInt32 kBackgroundYPositionKTable[] = { return SearchKeywordTable(aValue, kBoxOrientKTable); case eCSSProperty_box_pack: return SearchKeywordTable(aValue, kBoxPackKTable); -#endif #ifdef MOZ_SVG case eCSSProperty_fill: diff --git a/mozilla/layout/style/nsCSSProps.h b/mozilla/layout/style/nsCSSProps.h index 1508a903d42..bdf9d229a99 100644 --- a/mozilla/layout/style/nsCSSProps.h +++ b/mozilla/layout/style/nsCSSProps.h @@ -96,12 +96,10 @@ public: static const PRInt32 kBorderColorKTable[]; static const PRInt32 kBorderStyleKTable[]; static const PRInt32 kBorderWidthKTable[]; -#ifdef INCLUDE_XUL static const PRInt32 kBoxAlignKTable[]; static const PRInt32 kBoxDirectionKTable[]; static const PRInt32 kBoxOrientKTable[]; static const PRInt32 kBoxPackKTable[]; -#endif #ifdef MOZ_SVG static const PRInt32 kFillRuleKTable[]; static const PRInt32 kStrokeLinecapKTable[]; diff --git a/mozilla/layout/style/nsCSSStruct.cpp b/mozilla/layout/style/nsCSSStruct.cpp index 01d369d0655..9f188744f12 100644 --- a/mozilla/layout/style/nsCSSStruct.cpp +++ b/mozilla/layout/style/nsCSSStruct.cpp @@ -68,9 +68,7 @@ static NS_DEFINE_IID(kCSSPageSID, NS_CSS_PAGE_SID); static NS_DEFINE_IID(kCSSContentSID, NS_CSS_CONTENT_SID); static NS_DEFINE_IID(kCSSUserInterfaceSID, NS_CSS_USER_INTERFACE_SID); static NS_DEFINE_IID(kCSSAuralSID, NS_CSS_AURAL_SID); -#ifdef INCLUDE_XUL static NS_DEFINE_IID(kCSSXULSID, NS_CSS_XUL_SID); -#endif #ifdef MOZ_SVG static NS_DEFINE_IID(kCSSSVGSID, NS_CSS_SVG_SID); @@ -1076,7 +1074,6 @@ void nsCSSAural::List(FILE* out, PRInt32 aIndent) const } #endif -#ifdef INCLUDE_XUL // --- nsCSSXUL ----------------- nsCSSXUL::nsCSSXUL(void) @@ -1119,8 +1116,6 @@ void nsCSSXUL::List(FILE* out, PRInt32 aIndent) const } #endif -#endif // INCLUDE_XUL - #ifdef MOZ_SVG // --- nsCSSSVG ----------------- @@ -1250,9 +1245,7 @@ nsCSSDeclaration::nsCSSDeclaration(const nsCSSDeclaration& aCopy) DECL_IF_COPY(Content); DECL_IF_COPY(UserInterface); DECL_IF_COPY(Aural); -#ifdef INCLUDE_XUL DECL_IF_COPY(XUL); -#endif #ifdef MOZ_SVG DECL_IF_COPY(SVG); @@ -1299,9 +1292,7 @@ nsCSSDeclaration::~nsCSSDeclaration(void) CSS_HAS_DELETE(Content); CSS_HAS_DELETE(UserInterface); CSS_HAS_DELETE(Aural); -#ifdef INCLUDE_XUL CSS_HAS_DELETE(XUL); -#endif #ifdef MOZ_SVG CSS_HAS_DELETE(SVG); @@ -1338,9 +1329,7 @@ nsCSSDeclaration::GetData(const nsID& aSID) CSS_IF_GET_ELSE(aSID, Content) CSS_IF_GET_ELSE(aSID, UserInterface) CSS_IF_GET_ELSE(aSID, Aural) -#ifdef INCLUDE_XUL CSS_IF_GET_ELSE(aSID, XUL) -#endif #ifdef MOZ_SVG CSS_IF_GET_ELSE(aSID, SVG) #endif @@ -1963,7 +1952,6 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -1984,7 +1972,6 @@ nsCSSDeclaration::AppendValue(nsCSSProperty aProperty, const nsCSSValue& aValue) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -2968,7 +2955,6 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -2992,7 +2978,6 @@ nsCSSDeclaration::SetValueImportant(nsCSSProperty aProperty) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -3763,7 +3748,6 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -3784,7 +3768,6 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG @@ -4644,7 +4627,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) break; } -#ifdef INCLUDE_XUL // nsCSSXUL case eCSSProperty_box_align: case eCSSProperty_box_direction: @@ -4669,7 +4651,6 @@ nsCSSDeclaration::GetValue(nsCSSProperty aProperty, nsCSSValue& aValue) } break; } -#endif #ifdef MOZ_SVG // nsCSSSVG diff --git a/mozilla/layout/style/nsCSSStruct.h b/mozilla/layout/style/nsCSSStruct.h index f28529555a6..3c63f7f3436 100644 --- a/mozilla/layout/style/nsCSSStruct.h +++ b/mozilla/layout/style/nsCSSStruct.h @@ -115,11 +115,9 @@ typedef nsCSSStruct nsRuleDataStruct; #define NS_CSS_AURAL_SID \ {0x166d2bb0, 0x5a3b, 0x11d2, {0x80, 0x3b, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x5a}} -#ifdef INCLUDE_XUL // {FC075D62-B1CF-47a1-AF4E-CB40E11A4314} #define NS_CSS_XUL_SID \ { 0xfc075d62, 0xb1cf, 0x47a1, { 0xaf, 0x4e, 0xcb, 0x40, 0xe1, 0x1a, 0x43, 0x14 } } -#endif #ifdef MOZ_SVG // {9A41A036-027B-45ef-89C9-6E32797839E7} @@ -502,7 +500,6 @@ struct nsCSSAural : public nsCSSStruct { // NEW struct nsRuleDataAural : public nsCSSAural { }; -#ifdef INCLUDE_XUL struct nsCSSXUL : public nsCSSStruct { nsCSSXUL(void); nsCSSXUL(const nsCSSXUL& aCopy); @@ -523,7 +520,6 @@ struct nsCSSXUL : public nsCSSStruct { struct nsRuleDataXUL : public nsCSSXUL { }; -#endif #ifdef MOZ_SVG struct nsCSSSVG : public nsCSSStruct { @@ -570,9 +566,7 @@ struct nsCSSDeclContains nsCSSBitField mHasUserInterface:1; // 8 nsCSSBitField mHasTable:1; // 9 nsCSSBitField mHasContent:1; // 10 -#if defined(INCLUDE_XUL) nsCSSBitField mHasXUL:1; // 11 -#endif nsCSSBitField mHasBreaks:1; // 12 nsCSSBitField mHasPage:1; // 13 nsCSSBitField mHasAural:1; // 14 @@ -600,14 +594,8 @@ struct nsCSSDeclContains #define CSSDECLIDX_UserInterface(decl) ((decl).mContains.mHasUserInterface + CSSDECLIDX_Position(decl)) #define CSSDECLIDX_Table(decl) ((decl).mContains.mHasTable + CSSDECLIDX_UserInterface(decl)) #define CSSDECLIDX_Content(decl) ((decl).mContains.mHasContent + CSSDECLIDX_Table(decl)) -#if defined(INCLUDE_XUL) #define CSSDECLIDX_XUL(decl) ((decl).mContains.mHasXUL + CSSDECLIDX_Content(decl)) -#endif -#if !defined(INCLUDE_XUL) -#define CSSDECLIDX_Breaks(decl) ((decl).mContains.mHasBreaks + CSSDECLIDX_Content(decl)) -#else #define CSSDECLIDX_Breaks(decl) ((decl).mContains.mHasBreaks + CSSDECLIDX_XUL(decl)) -#endif #define CSSDECLIDX_Page(decl) ((decl).mContains.mHasPage + CSSDECLIDX_Breaks(decl)) #define CSSDECLIDX_Aural(decl) ((decl).mContains.mHasAural + CSSDECLIDX_Page(decl)) #if defined(MOZ_SVG) diff --git a/mozilla/layout/style/nsCSSStyleRule.cpp b/mozilla/layout/style/nsCSSStyleRule.cpp index 5a398221890..bb97ece1a82 100644 --- a/mozilla/layout/style/nsCSSStyleRule.cpp +++ b/mozilla/layout/style/nsCSSStyleRule.cpp @@ -88,9 +88,7 @@ static NS_DEFINE_IID(kCSSDisplaySID, NS_CSS_DISPLAY_SID); static NS_DEFINE_IID(kCSSTableSID, NS_CSS_TABLE_SID); static NS_DEFINE_IID(kCSSContentSID, NS_CSS_CONTENT_SID); static NS_DEFINE_IID(kCSSUserInterfaceSID, NS_CSS_USER_INTERFACE_SID); -#ifdef INCLUDE_XUL static NS_DEFINE_IID(kCSSXULSID, NS_CSS_XUL_SID); -#endif #ifdef MOZ_SVG static NS_DEFINE_IID(kCSSSVGSID, NS_CSS_SVG_SID); #endif @@ -775,9 +773,7 @@ static nsresult MapContentForDeclaration(nsCSSDeclaration* aDecl, const nsStyleS static nsresult MapTextForDeclaration(nsCSSDeclaration* aDecl, const nsStyleStructID& aID, nsRuleDataText& aContent); static nsresult MapUIForDeclaration(nsCSSDeclaration* aDecl, const nsStyleStructID& aID, nsRuleDataUserInterface& aContent); -#ifdef INCLUDE_XUL static nsresult MapXULForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataXUL& aXUL); -#endif #ifdef MOZ_SVG static nsresult MapSVGForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataSVG& aSVG); @@ -856,10 +852,8 @@ CSSImportantRule::MapRuleInfoInto(nsRuleData* aRuleData) return MapTextForDeclaration(mDeclaration, aRuleData->mSID, *aRuleData->mTextData); else if (aRuleData->mUIData) return MapUIForDeclaration(mDeclaration, aRuleData->mSID, *aRuleData->mUIData); -#ifdef INCLUDE_XUL else if (aRuleData->mXULData) return MapXULForDeclaration(mDeclaration, *aRuleData->mXULData); -#endif #ifdef MOZ_SVG else if (aRuleData->mSVGData) return MapSVGForDeclaration(mDeclaration, *aRuleData->mSVGData); @@ -1513,10 +1507,8 @@ CSSStyleRuleImpl::MapRuleInfoInto(nsRuleData* aRuleData) return MapTextForDeclaration(mDeclaration, aRuleData->mSID, *aRuleData->mTextData); else if (aRuleData->mUIData) return MapUIForDeclaration(mDeclaration, aRuleData->mSID, *aRuleData->mUIData); -#ifdef INCLUDE_XUL else if (aRuleData->mXULData) return MapXULForDeclaration(mDeclaration, *aRuleData->mXULData); -#endif #ifdef MOZ_SVG else if (aRuleData->mSVGData) return MapSVGForDeclaration(mDeclaration, *aRuleData->mSVGData); @@ -1558,7 +1550,6 @@ MapFontForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataFont& aFont) return NS_OK; } -#ifdef INCLUDE_XUL static nsresult MapXULForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataXUL& aXUL) { @@ -1595,7 +1586,6 @@ MapXULForDeclaration(nsCSSDeclaration* aDecl, nsRuleDataXUL& aXUL) return NS_OK; } -#endif #ifdef MOZ_SVG static nsresult diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp index cc89987cebd..dd194a3ba72 100644 --- a/mozilla/layout/style/nsCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsCSSStyleSheet.cpp @@ -100,10 +100,6 @@ #include "nsIStyleSet.h" #include "nsStyleUtil.h" #include "nsQuickSort.h" -#ifdef MOZ_XUL -#include "nsIXULContent.h" -#endif - #include "nsContentUtils.h" #include "nsIJSContextStack.h" #include "nsIScriptSecurityManager.h" diff --git a/mozilla/layout/style/nsComputedDOMStyle.cpp b/mozilla/layout/style/nsComputedDOMStyle.cpp index 685367036d5..fd2cb6c2a53 100644 --- a/mozilla/layout/style/nsComputedDOMStyle.cpp +++ b/mozilla/layout/style/nsComputedDOMStyle.cpp @@ -1827,7 +1827,6 @@ nsComputedDOMStyle::GetAppearance(nsIFrame *aFrame, } -#ifdef INCLUDE_XUL nsresult nsComputedDOMStyle::GetBoxAlign(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -1960,8 +1959,6 @@ nsComputedDOMStyle::GetBoxPack(nsIFrame *aFrame, return CallQueryInterface(val, aValue); } -#endif // INCLUDE_XUL - nsresult nsComputedDOMStyle::GetBoxSizing(nsIFrame *aFrame, nsIDOMCSSValue** aValue) @@ -3628,14 +3625,12 @@ nsComputedDOMStyle::GetQueryablePropertyMap(PRUint32* aLength) COMPUTED_STYLE_MAP_ENTRY(_moz_border_radius_bottomRight,BorderRadiusBottomRight), COMPUTED_STYLE_MAP_ENTRY(_moz_border_radius_topLeft, BorderRadiusTopLeft), COMPUTED_STYLE_MAP_ENTRY(_moz_border_radius_topRight, BorderRadiusTopRight), -#ifdef INCLUDE_XUL COMPUTED_STYLE_MAP_ENTRY(box_align, BoxAlign), COMPUTED_STYLE_MAP_ENTRY(box_direction, BoxDirection), COMPUTED_STYLE_MAP_ENTRY(box_flex, BoxFlex), COMPUTED_STYLE_MAP_ENTRY(box_ordinal_group, BoxOrdinalGroup), COMPUTED_STYLE_MAP_ENTRY(box_orient, BoxOrient), COMPUTED_STYLE_MAP_ENTRY(box_pack, BoxPack), -#endif COMPUTED_STYLE_MAP_ENTRY(box_sizing, BoxSizing), COMPUTED_STYLE_MAP_ENTRY(float_edge, FloatEdge), COMPUTED_STYLE_MAP_ENTRY(opacity, Opacity), diff --git a/mozilla/layout/style/nsComputedDOMStyle.h b/mozilla/layout/style/nsComputedDOMStyle.h index e51d29ee2f4..09dede074b1 100644 --- a/mozilla/layout/style/nsComputedDOMStyle.h +++ b/mozilla/layout/style/nsComputedDOMStyle.h @@ -142,14 +142,12 @@ private: nsresult GetAppearance(nsIFrame *aFrame, nsIDOMCSSValue** aValue); /* Box properties */ -#ifdef INCLUDE_XUL nsresult GetBoxAlign(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxDirection(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxFlex(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxOrdinalGroup(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxOrient(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetBoxPack(nsIFrame *aFrame, nsIDOMCSSValue** aValue); -#endif // INCLUDE_XUL nsresult GetBoxSizing(nsIFrame *aFrame, nsIDOMCSSValue** aValue); nsresult GetWidth(nsIFrame *aFrame, nsIDOMCSSValue** aValue); diff --git a/mozilla/layout/style/nsRuleNode.cpp b/mozilla/layout/style/nsRuleNode.cpp index 063722bc61a..9d896cb4c5b 100644 --- a/mozilla/layout/style/nsRuleNode.cpp +++ b/mozilla/layout/style/nsRuleNode.cpp @@ -957,7 +957,6 @@ static const PropertyCheckData UIResetCheckProperties[] = { CHECKDATA_PROP(nsRuleDataUserInterface, mForceBrokenImageIcon, CHECKDATA_VALUE, PR_FALSE) }; -#ifdef INCLUDE_XUL static const PropertyCheckData XULCheckProperties[] = { CHECKDATA_PROP(nsRuleDataXUL, mBoxAlign, CHECKDATA_VALUE, PR_FALSE), CHECKDATA_PROP(nsRuleDataXUL, mBoxDirection, CHECKDATA_VALUE, PR_FALSE), @@ -966,7 +965,6 @@ static const PropertyCheckData XULCheckProperties[] = { CHECKDATA_PROP(nsRuleDataXUL, mBoxPack, CHECKDATA_VALUE, PR_FALSE), CHECKDATA_PROP(nsRuleDataXUL, mBoxOrdinal, CHECKDATA_VALUE, PR_FALSE) }; -#endif #ifdef MOZ_SVG static const PropertyCheckData SVGCheckProperties[] = { @@ -1447,7 +1445,6 @@ nsRuleNode::GetQuotesData(nsStyleContext* aContext, PRBool aComputeData) return res; } -#ifdef INCLUDE_XUL const nsStyleStruct* nsRuleNode::GetXULData(nsStyleContext* aContext, PRBool aComputeData) { @@ -1457,7 +1454,6 @@ nsRuleNode::GetXULData(nsStyleContext* aContext, PRBool aComputeData) return WalkRuleTree(eStyleStruct_XUL, aContext, &ruleData, &xulData, aComputeData); } -#endif #ifdef MOZ_SVG const nsStyleStruct* @@ -1761,14 +1757,12 @@ nsRuleNode::SetDefaultOnRoot(const nsStyleStructID aSID, nsStyleContext* aContex return ui; } -#ifdef INCLUDE_XUL case eStyleStruct_XUL: { nsStyleXUL* xul = new (mPresContext) nsStyleXUL(); aContext->SetStyle(eStyleStruct_XUL, xul); return xul; } -#endif #ifdef MOZ_SVG case eStyleStruct_SVG: @@ -4351,7 +4345,6 @@ nsRuleNode::ComputeQuotesData(nsStyleStruct* aStartStruct, return quotes; } -#ifdef INCLUDE_XUL const nsStyleStruct* nsRuleNode::ComputeXULData(nsStyleStruct* aStartStruct, const nsRuleDataStruct& aData, @@ -4446,7 +4439,6 @@ nsRuleNode::ComputeXULData(nsStyleStruct* aStartStruct, return xul; } -#endif #ifdef MOZ_SVG static void diff --git a/mozilla/layout/style/nsRuleNode.h b/mozilla/layout/style/nsRuleNode.h index 1ffe935fef0..70bf0c97e7d 100644 --- a/mozilla/layout/style/nsRuleNode.h +++ b/mozilla/layout/style/nsRuleNode.h @@ -257,10 +257,7 @@ struct nsRuleData nsRuleDataContent* mContentData; nsRuleDataText* mTextData; nsRuleDataUserInterface* mUIData; - -#ifdef INCLUDE_XUL nsRuleDataXUL* mXULData; -#endif #ifdef MOZ_SVG nsRuleDataSVG* mSVGData; @@ -273,10 +270,7 @@ struct nsRuleData mUIData(nsnull) { mCanStoreInRuleTree = PR_TRUE; - -#ifdef INCLUDE_XUL mXULData = nsnull; -#endif #ifdef MOZ_SVG mSVGData = nsnull; #endif @@ -485,12 +479,10 @@ protected: nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail& aRuleDetail, PRBool aInherited); -#ifdef INCLUDE_XUL const nsStyleStruct* ComputeXULData(nsStyleStruct* aStartXUL, const nsRuleDataStruct& aXULData, nsStyleContext* aContext, nsRuleNode* aHighestNode, const RuleDetail& aRuleDetail, PRBool aInherited); -#endif #ifdef MOZ_SVG const nsStyleStruct* ComputeSVGData(nsStyleStruct* aStartSVG, const nsRuleDataStruct& aSVGData, @@ -531,9 +523,7 @@ protected: const nsStyleStruct* GetTextResetData(nsStyleContext* aContext, PRBool aComputeData); const nsStyleStruct* GetUserInterfaceData(nsStyleContext* aContext, PRBool aComputeData); const nsStyleStruct* GetUIResetData(nsStyleContext* aContext, PRBool aComputeData); -#ifdef INCLUDE_XUL const nsStyleStruct* GetXULData(nsStyleContext* aContext, PRBool aComputeData); -#endif #ifdef MOZ_SVG const nsStyleStruct* GetSVGData(nsStyleContext* aContext, PRBool aComputeData); #endif diff --git a/mozilla/layout/style/nsStyleContext.cpp b/mozilla/layout/style/nsStyleContext.cpp index 757100f2529..67946d0af49 100644 --- a/mozilla/layout/style/nsStyleContext.cpp +++ b/mozilla/layout/style/nsStyleContext.cpp @@ -473,9 +473,7 @@ nsStyleContext::CalcStyleDifference(nsStyleContext* aOther) // FRAMECHANGE Structs: Display, XUL, Content, UserInterface, // Visibility, Quotes DO_STRUCT_DIFFERENCE(Display); -#ifdef INCLUDE_XUL DO_STRUCT_DIFFERENCE(XUL); -#endif DO_STRUCT_DIFFERENCE(Content); DO_STRUCT_DIFFERENCE(UserInterface); DO_STRUCT_DIFFERENCE(Visibility); @@ -805,7 +803,6 @@ void nsStyleContext::DumpRegressionData(nsIPresContext* aPresContext, FILE* out, (int)uiReset->mResizer); // XUL -#ifdef INCLUDE_XUL IndentBy(out,aIndent); const nsStyleXUL* xul = (const nsStyleXUL*)GetStyleData(eStyleStruct_XUL); fprintf(out, "mBoxPack, (int)xul->mBoxOrdinal); fprintf(out, "\" />\n"); -#endif // SVG #ifdef MOZ_SVG diff --git a/mozilla/layout/style/nsStyleStruct.cpp b/mozilla/layout/style/nsStyleStruct.cpp index 83f06dbdac1..360964f63d5 100644 --- a/mozilla/layout/style/nsStyleStruct.cpp +++ b/mozilla/layout/style/nsStyleStruct.cpp @@ -745,7 +745,6 @@ nsChangeHint nsStyleList::CalcDifference(const nsStyleList& aOther) const return NS_STYLE_HINT_REFLOW; } -#ifdef INCLUDE_XUL // -------------------- // nsStyleXUL // @@ -782,8 +781,6 @@ nsChangeHint nsStyleXUL::CalcDifference(const nsStyleXUL& aOther) const return NS_STYLE_HINT_REFLOW; } -#endif // INCLUDE_XUL - #ifdef MOZ_SVG // -------------------- // nsStyleSVG diff --git a/mozilla/layout/style/nsStyleStruct.h b/mozilla/layout/style/nsStyleStruct.h index b220be319f5..dce80cbc57d 100644 --- a/mozilla/layout/style/nsStyleStruct.h +++ b/mozilla/layout/style/nsStyleStruct.h @@ -1097,7 +1097,6 @@ struct nsStyleUserInterface: public nsStyleStruct { nsString mCursorImage; // [inherited] url string }; -#ifdef INCLUDE_XUL struct nsStyleXUL : public nsStyleStruct { nsStyleXUL(); nsStyleXUL(const nsStyleXUL& aSource); @@ -1124,7 +1123,6 @@ struct nsStyleXUL : public nsStyleStruct { PRUint8 mBoxOrient; // [reset] see nsStyleConsts.h PRUint8 mBoxPack; // [reset] see nsStyleConsts.h }; -#endif #ifdef MOZ_SVG enum nsStyleSVGPaintType { diff --git a/mozilla/layout/style/nsStyleStructList.h b/mozilla/layout/style/nsStyleStructList.h index a16ab996ee2..16248ba2878 100644 --- a/mozilla/layout/style/nsStyleStructList.h +++ b/mozilla/layout/style/nsStyleStructList.h @@ -74,9 +74,7 @@ STYLE_STRUCT_RESET(Margin, nsnull, ()) STYLE_STRUCT_RESET(Padding, nsnull, ()) STYLE_STRUCT_RESET(Border, nsnull, ()) STYLE_STRUCT_RESET(Outline, nsnull, (SSARG_PRESCONTEXT)) -#ifdef INCLUDE_XUL STYLE_STRUCT_RESET(XUL, nsnull, ()) -#endif #ifdef MOZ_SVG STYLE_STRUCT_INHERITED(SVG, nsnull, ()) #endif diff --git a/mozilla/layout/xul/base/src/Makefile.in b/mozilla/layout/xul/base/src/Makefile.in index c6d785e4c74..8814bd9003b 100644 --- a/mozilla/layout/xul/base/src/Makefile.in +++ b/mozilla/layout/xul/base/src/Makefile.in @@ -24,9 +24,6 @@ topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ -DIRS = tree \ - grid - include $(DEPTH)/config/autoconf.mk MODULE = layout @@ -52,9 +49,34 @@ REQUIRES = xpcom \ js \ $(NULL) +ifdef MOZ_XUL +DIRS = tree grid +endif + CPPSRCS = \ - nsScrollBoxObject.cpp \ nsScrollBoxFrame.cpp \ + nsRootBoxFrame.cpp \ + nsBox.cpp \ + nsBoxFrame.cpp \ + nsBoxLayoutState.cpp \ + nsBoxToBlockAdaptor.cpp \ + nsContainerBox.cpp \ + nsSprocketLayout.cpp \ + nsStackFrame.cpp \ + nsStackLayout.cpp \ + nsBoxLayout.cpp \ + nsScrollbarFrame.cpp \ + nsScrollbarButtonFrame.cpp \ + nsButtonBoxFrame.cpp \ + nsSliderFrame.cpp \ + nsNativeScrollbarFrame.cpp \ + nsRepeatService.cpp \ + nsXULTooltipListener.cpp \ + $(NULL) + +ifdef MOZ_XUL +CPPSRCS += \ + nsScrollBoxObject.cpp \ nsBrowserBoxObject.cpp \ nsIFrameBoxObject.cpp \ nsEditorBoxObject.cpp \ @@ -63,30 +85,16 @@ CPPSRCS = \ nsListBoxObject.cpp \ nsBoxObject.cpp \ nsImageBoxFrame.cpp \ - nsRootBoxFrame.cpp \ nsDocElementBoxFrame.cpp \ - nsBox.cpp \ - nsBoxLayoutState.cpp \ - nsBoxToBlockAdaptor.cpp \ - nsButtonBoxFrame.cpp \ - nsContainerBox.cpp \ nsLeafBoxFrame.cpp \ - nsSprocketLayout.cpp \ - nsBoxLayout.cpp \ - nsStackLayout.cpp \ nsTextBoxFrame.cpp \ - nsStackFrame.cpp \ nsSpringFrame.cpp \ nsGroupBoxFrame.cpp \ nsFrameNavigator.cpp \ nsSplitterFrame.cpp \ nsGrippyFrame.cpp \ nsDeckFrame.cpp \ - nsBoxFrame.cpp \ nsProgressMeterFrame.cpp \ - nsScrollbarFrame.cpp \ - nsScrollbarButtonFrame.cpp \ - nsSliderFrame.cpp \ nsMenuPopupFrame.cpp \ nsMenuFrame.cpp \ nsMenuBarFrame.cpp \ @@ -94,16 +102,13 @@ CPPSRCS = \ nsMenuListener.cpp \ nsMenuDismissalListener.cpp \ nsPopupSetFrame.cpp \ - nsRepeatService.cpp \ nsTitleBarFrame.cpp \ nsResizerFrame.cpp \ - nsXULTooltipListener.cpp \ nsListBoxBodyFrame.cpp \ nsListItemFrame.cpp \ nsListBoxLayout.cpp \ - nsNativeScrollbarFrame.cpp \ $(NULL) - +endif include $(topsrcdir)/config/config.mk diff --git a/mozilla/layout/xul/base/src/nsXULTooltipListener.cpp b/mozilla/layout/xul/base/src/nsXULTooltipListener.cpp index 699165d5f66..32db4e922bc 100644 --- a/mozilla/layout/xul/base/src/nsXULTooltipListener.cpp +++ b/mozilla/layout/xul/base/src/nsXULTooltipListener.cpp @@ -51,7 +51,9 @@ #include "nsIPrefBranchInternal.h" #include "nsIPrefService.h" #include "nsIServiceManager.h" +#ifdef MOZ_XUL #include "nsITreeView.h" +#endif #include "nsGUIEvent.h" #include "nsIPrivateDOMEvent.h" #include "nsIPresContext.h" @@ -63,11 +65,16 @@ //// nsISupports nsXULTooltipListener::nsXULTooltipListener() - : mSourceNode(nsnull), mTargetNode(nsnull), - mCurrentTooltip(nsnull), - mMouseClientX(0), mMouseClientY(0), - mIsSourceTree(PR_FALSE), mNeedTitletip(PR_FALSE), - mLastTreeRow(-1) + : mSourceNode(nsnull) + , mTargetNode(nsnull) + , mCurrentTooltip(nsnull) + , mMouseClientX(0) + , mMouseClientY(0) +#ifdef MOZ_XUL + , mIsSourceTree(PR_FALSE) + , mNeedTitletip(PR_FALSE) + , mLastTreeRow(-1) +#endif { } @@ -144,12 +151,13 @@ nsXULTooltipListener::MouseOut(nsIDOMEvent* aMouseEvent) // close the tooltip. if (tooltipNode == targetNode) { HideTooltip(); - +#ifdef MOZ_XUL // reset special tree tracking if (mIsSourceTree) { mLastTreeRow = -1; mLastTreeCol.Truncate(); } +#endif } } @@ -178,8 +186,10 @@ nsXULTooltipListener::MouseMove(nsIDOMEvent* aMouseEvent) mMouseClientX = newMouseX; mMouseClientY = newMouseY; +#ifdef MOZ_XUL if (mIsSourceTree) CheckTreeBodyMove(mouseEvent); +#endif // as the mouse moves, we want to make sure we reset the timer to show it, // so that the delay is from when the mouse stops moving, not when it enters @@ -276,11 +286,13 @@ nsXULTooltipListener::Init(nsIContent* aSourceNode, nsIRootBox* aRootBox) mSourceNode = aSourceNode; AddTooltipSupport(aSourceNode); +#ifdef MOZ_XUL // if the target is an treechildren, we may have some special // case handling to do nsCOMPtr tag; mSourceNode->GetTag(*getter_AddRefs(tag)); mIsSourceTree = tag == nsXULAtoms::treechildren; +#endif static PRBool prefChangeRegistered = PR_FALSE; @@ -329,6 +341,7 @@ nsXULTooltipListener::RemoveTooltipSupport(nsIContent* aNode) return NS_OK; } +#ifdef MOZ_XUL void nsXULTooltipListener::CheckTreeBodyMove(nsIDOMMouseEvent* aMouseEvent) { @@ -363,6 +376,7 @@ nsXULTooltipListener::CheckTreeBodyMove(nsIDOMMouseEvent* aMouseEvent) mLastTreeCol.Assign(colId); } } +#endif nsresult nsXULTooltipListener::ShowTooltip() @@ -382,10 +396,12 @@ nsXULTooltipListener::ShowTooltip() nsCOMPtr targetDoc; mSourceNode->GetDocument(*getter_AddRefs(targetDoc)); if (targetDoc) { +#ifdef MOZ_XUL if (!mIsSourceTree) { mLastTreeRow = -1; mLastTreeCol.Truncate(); } +#endif nsCOMPtr targetNode(do_QueryInterface(mTargetNode)); xulDoc->SetTooltipNode(targetNode); @@ -427,6 +443,7 @@ nsXULTooltipListener::ShowTooltip() return NS_OK; } +#ifdef MOZ_XUL static void GetTreeCellCoords(nsITreeBoxObject* aTreeBox, nsIContent* aSourceNode, PRInt32 aRow, nsAutoString aCol, PRInt32* aX, PRInt32* aY) @@ -456,6 +473,7 @@ SetTitletipLabel(nsITreeBoxObject* aTreeBox, nsIContent* aTooltip, aTooltip->SetAttr(nsnull, nsXULAtoms::label, label, PR_TRUE); } +#endif nsresult nsXULTooltipListener::LaunchTooltip(nsIContent* aTarget, PRInt32 aX, PRInt32 aY) @@ -475,6 +493,7 @@ nsXULTooltipListener::LaunchTooltip(nsIContent* aTarget, PRInt32 aX, PRInt32 aY) if (popupBoxObject) { PRInt32 x = aX; PRInt32 y = aY; +#ifdef MOZ_XUL if (mNeedTitletip) { nsCOMPtr obx; GetSourceTreeBoxObject(getter_AddRefs(obx)); @@ -487,6 +506,7 @@ nsXULTooltipListener::LaunchTooltip(nsIContent* aTarget, PRInt32 aX, PRInt32 aY) mCurrentTooltip->SetAttr(nsnull, nsXULAtoms::titletip, NS_LITERAL_STRING("true"), PR_TRUE); } else mCurrentTooltip->UnsetAttr(nsnull, nsXULAtoms::titletip, PR_TRUE); +#endif nsCOMPtr targetEl(do_QueryInterface(aTarget)); popupBoxObject->ShowPopup(targetEl, xulTooltipEl, x, y, @@ -591,7 +611,9 @@ nsXULTooltipListener::GetTooltipFor(nsIContent* aTarget, nsIContent** aTooltip) getter_AddRefs(tooltipEl)); if (tooltipEl) { +#ifdef MOZ_XUL mNeedTitletip = PR_FALSE; +#endif nsCOMPtr tooltipContent(do_QueryInterface(tooltipEl)); *aTooltip = tooltipContent; @@ -603,12 +625,14 @@ nsXULTooltipListener::GetTooltipFor(nsIContent* aTarget, nsIContent** aTooltip) } } +#ifdef MOZ_XUL // titletips should just use the default tooltip if (mIsSourceTree && mNeedTitletip) { mRootBox->GetDefaultTooltip(aTooltip); NS_IF_ADDREF(*aTooltip); return NS_OK; } +#endif } } } @@ -695,6 +719,7 @@ nsXULTooltipListener::sAutoHideCallback(nsITimer *aTimer, void* aListener) self->HideTooltip(); } +#ifdef MOZ_XUL nsresult nsXULTooltipListener::GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject) { @@ -717,3 +742,4 @@ nsXULTooltipListener::GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject) } return NS_ERROR_FAILURE; } +#endif diff --git a/mozilla/layout/xul/base/src/nsXULTooltipListener.h b/mozilla/layout/xul/base/src/nsXULTooltipListener.h index c33712aa6be..ba94d9d2a40 100644 --- a/mozilla/layout/xul/base/src/nsXULTooltipListener.h +++ b/mozilla/layout/xul/base/src/nsXULTooltipListener.h @@ -48,9 +48,11 @@ #include "nsIDOMElement.h" #include "nsITimer.h" #include "nsIRootBox.h" -#include "nsITreeBoxObject.h" #include "nsCOMPtr.h" #include "nsString.h" +#ifdef MOZ_XUL +#include "nsITreeBoxObject.h" +#endif class nsXULTooltipListener : public nsIDOMMouseListener, public nsIDOMMouseMotionListener, @@ -113,8 +115,10 @@ protected: void KillTooltipTimer(); void CreateAutoHideTimer(); +#ifdef MOZ_XUL void CheckTreeBodyMove(nsIDOMMouseEvent* aMouseEvent); nsresult GetSourceTreeBoxObject(nsITreeBoxObject** aBoxObject); +#endif nsresult ShowTooltip(); nsresult LaunchTooltip(nsIContent* aTarget, PRInt32 aX, PRInt32 aY); @@ -142,11 +146,13 @@ protected: kTooltipShowTime = 500 // 500ms = 0.5 seconds }; +#ifdef MOZ_XUL // special members for handling trees PRBool mIsSourceTree; PRBool mNeedTitletip; PRInt32 mLastTreeRow; nsAutoString mLastTreeCol; +#endif }; #endif // nsXULTooltipListener diff --git a/mozilla/rdf/chrome/src/nsChromeProtocolHandler.cpp b/mozilla/rdf/chrome/src/nsChromeProtocolHandler.cpp index 7358875ab48..b562377260e 100644 --- a/mozilla/rdf/chrome/src/nsChromeProtocolHandler.cpp +++ b/mozilla/rdf/chrome/src/nsChromeProtocolHandler.cpp @@ -63,8 +63,10 @@ #include "nsIServiceManager.h" #include "nsIStandardURL.h" #include "nsIStreamListener.h" +#ifdef MOZ_XUL #include "nsIXULPrototypeCache.h" #include "nsIXULPrototypeDocument.h" +#endif #include "nsNetCID.h" #include "nsXPIDLString.h" #include "nsString.h" @@ -75,7 +77,9 @@ static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID); static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID); static NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID); +#ifdef MOZ_XUL static NS_DEFINE_CID(kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID); +#endif // This comes from nsChromeRegistry.cpp extern nsIChromeRegistry* gChromeRegistry; @@ -644,6 +648,7 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI, nsresult rv; nsCOMPtr result; +#ifdef MOZ_XUL // Check the prototype cache to see if we've already got the // document in the cache. nsCOMPtr cache = @@ -675,7 +680,9 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI, rv = nsCachedChromeChannel::Create(aURI, getter_AddRefs(result)); if (NS_FAILED(rv)) return rv; } - else { + else +#endif + { // Miss. Resolve the chrome URL using the registry and do a // normal necko load. //nsXPIDLCString oldSpec; @@ -777,8 +784,10 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI, if (file) { rv = fastLoadServ->AddDependency(file); +#ifdef MOZ_XUL if (NS_FAILED(rv)) cache->AbortFastLoads(); +#endif } } } diff --git a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp index 5f79bff8c92..71ae93c27a7 100644 --- a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp @@ -76,7 +76,6 @@ #include "nsIWindowMediator.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" -#include "nsIXULPrototypeCache.h" #include "nsIStyleSheet.h" #include "nsIHTMLCSSStyleSheet.h" #include "nsIHTMLStyleSheet.h" @@ -86,7 +85,10 @@ #include "nsIStyleSet.h" #include "nsISupportsArray.h" #include "nsIDocumentObserver.h" +#ifdef MOZ_XUL #include "nsIXULDocument.h" +#include "nsIXULPrototypeCache.h" +#endif #include "nsIIOService.h" #include "nsIResProtocolHandler.h" #include "nsLayoutCID.h" @@ -1415,11 +1417,13 @@ nsresult nsChromeRegistry::FlushCaches() { nsresult rv; +#ifdef MOZ_XUL // Flush the style sheet cache completely. nsCOMPtr xulCache = do_GetService("@mozilla.org/xul/xul-prototype-cache;1", &rv); if (NS_SUCCEEDED(rv) && xulCache) xulCache->FlushSkinFiles(); +#endif // Flush the new imagelib image chrome cache. nsCOMPtr imageCache(do_GetService("@mozilla.org/image/cache;1", &rv)); @@ -2926,6 +2930,7 @@ nsChromeRegistry::ReloadChrome() // Do a reload of all top level windows. nsresult rv = NS_OK; +#ifdef MOZ_XUL // Flush the cache completely. nsCOMPtr xulCache = do_GetService("@mozilla.org/xul/xul-prototype-cache;1", &rv); @@ -2933,6 +2938,7 @@ nsChromeRegistry::ReloadChrome() rv = xulCache->Flush(); if (NS_FAILED(rv)) return rv; } +#endif nsCOMPtr bundleService = do_GetService(kStringBundleServiceCID, &rv); diff --git a/mozilla/security/manager/Makefile.in b/mozilla/security/manager/Makefile.in index 121d7793fda..d97c5ad6910 100644 --- a/mozilla/security/manager/Makefile.in +++ b/mozilla/security/manager/Makefile.in @@ -105,7 +105,9 @@ export:: dependclean export:: $(MAKE) -C boot $@ $(MAKE) -C ssl $@ +ifdef MOZ_XUL $(MAKE) -C pki $@ +endif libs:: $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) @@ -147,7 +149,9 @@ endif endif $(MAKE) -C boot $@ $(MAKE) -C ssl $@ +ifdef MOZ_XUL $(MAKE) -C pki $@ +endif install:: $(SYSINSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DESTDIR)$(mozappdir) @@ -164,12 +168,16 @@ ifdef HAVE_FREEBL_MODULES endif $(MAKE) -C boot $@ $(MAKE) -C ssl $@ +ifdef MOZ_XUL $(MAKE) -C pki $@ +endif clean clobber clobber_all realclean distclean depend:: $(MAKE) -C boot $@ $(MAKE) -C ssl $@ +ifdef MOZ_XUL $(MAKE) -C pki $@ +endif $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) clean diff --git a/mozilla/security/manager/ssl/public/Makefile.in b/mozilla/security/manager/ssl/public/Makefile.in index 2de63b41c80..9ce74ddab7b 100644 --- a/mozilla/security/manager/ssl/public/Makefile.in +++ b/mozilla/security/manager/ssl/public/Makefile.in @@ -59,7 +59,6 @@ XPIDLSRCS = \ nsITokenDialogs.idl \ nsITokenPasswordDialogs.idl \ nsISSLStatus.idl \ - nsICertTree.idl \ nsIKeygenThread.idl \ nsICMSSecureMessage.idl \ nsIUserCertPicker.idl \ @@ -83,4 +82,8 @@ XPIDLSRCS = \ nsICipherInfo.idl \ $(NULL) +ifdef MOZ_XUL +XPIDLSRCS += nsICertTree.idl +endif + include $(topsrcdir)/config/rules.mk diff --git a/mozilla/security/manager/ssl/src/Makefile.in b/mozilla/security/manager/ssl/src/Makefile.in index 5819a101388..a59604d8212 100644 --- a/mozilla/security/manager/ssl/src/Makefile.in +++ b/mozilla/security/manager/ssl/src/Makefile.in @@ -62,7 +62,6 @@ CPPSRCS = \ nsNSSCertificate.cpp \ nsPKCS12Blob.cpp \ nsNSSASN1Object.cpp \ - nsCertTree.cpp \ nsKeygenHandler.cpp \ nsCrypto.cpp \ nsPKCS11Slot.cpp \ @@ -82,6 +81,10 @@ CPPSRCS = \ nsNSSShutDown.cpp \ $(NULL) +ifdef MOZ_XUL +CPPSRCS += nsCertTree.cpp +endif + REQUIRES = nspr \ xpcom \ string \ diff --git a/mozilla/security/manager/ssl/src/nsNSSASN1Object.h b/mozilla/security/manager/ssl/src/nsNSSASN1Object.h index 38ebf69578e..5e922afb3a6 100644 --- a/mozilla/security/manager/ssl/src/nsNSSASN1Object.h +++ b/mozilla/security/manager/ssl/src/nsNSSASN1Object.h @@ -36,9 +36,6 @@ #include "nscore.h" #include "nsIX509Cert.h" -#include "nsIASN1Tree.h" -#include "nsITreeView.h" -#include "nsITreeSelection.h" #include "nsCOMPtr.h" #include "nsString.h" #include "nsIASN1Sequence.h" diff --git a/mozilla/security/manager/ssl/src/nsNSSModule.cpp b/mozilla/security/manager/ssl/src/nsNSSModule.cpp index 784b0e2cf59..8e5b03f40f3 100644 --- a/mozilla/security/manager/ssl/src/nsNSSModule.cpp +++ b/mozilla/security/manager/ssl/src/nsNSSModule.cpp @@ -39,7 +39,9 @@ #include "nsNSSCertificateDB.h" #include "nsNSSCertCache.h" #include "nsCMS.h" +#ifdef MOZ_XUL #include "nsCertTree.h" +#endif #include "nsCrypto.h" //For the NS_CRYPTO_CONTRACTID define #include "nsDOMCID.h" @@ -151,7 +153,9 @@ NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(PR_FALSE, nsPKCS11ModuleDB) NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_INIT(PR_FALSE, PSMContentListener, init) NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(PR_FALSE, nsNSSCertificateDB) NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(PR_FALSE, nsNSSCertCache) +#ifdef MOZ_XUL NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(PR_FALSE, nsCertTree) +#endif NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(PR_FALSE, nsCrypto) NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(PR_FALSE, nsPkcs11) NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(PR_FALSE, nsCMSSecureMessage) @@ -284,14 +288,14 @@ static const nsModuleComponentInfo components[] = NS_FORMPROCESSOR_CONTRACTID, nsKeygenFormProcessor::Create }, - +#ifdef MOZ_XUL { "Certificate Tree", NS_CERTTREE_CID, NS_CERTTREE_CONTRACTID, nsCertTreeConstructor }, - +#endif { NS_PKCS11_CLASSNAME, NS_PKCS11_CID, diff --git a/mozilla/widget/src/mac/nsDragService.cpp b/mozilla/widget/src/mac/nsDragService.cpp index 60ea7dec736..eb20f8866dc 100644 --- a/mozilla/widget/src/mac/nsDragService.cpp +++ b/mozilla/widget/src/mac/nsDragService.cpp @@ -75,7 +75,9 @@ #include "nsIWidget.h" #include "nsCarbonHelpers.h" +#ifdef MOZ_XUL #include "nsIXULContent.h" +#endif #include "nsIDOMElement.h" #include "nsIImageMac.h" #include "nsIImage.h" @@ -128,7 +130,7 @@ nsDragService :: ComputeGlobalRectFromFrame ( nsIDOMNode* aDOMNode, Rect & outSc // this isn't so much of an issue as long as we're just dragging around outlines, // but it is when we are showing the text being drawn. Comment it out for now // but leave it around when we turn this all back on (pinkerton). -#if USE_TRANSLUCENT_DRAGGING +#if USE_TRANSLUCENT_DRAGGING && defined(MOZ_XUL) // until bug 41237 is fixed, only do translucent dragging if the drag is in // the chrome or it's a link. nsCOMPtr xulContent ( do_QueryInterface(aDOMNode) ); diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index b60b1b3ce5c..bbbbab3a721 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -64,7 +64,6 @@ #include "nsIWebNavigation.h" #include "nsIWindowWatcher.h" -#include "nsIXULPopupListener.h" #include "nsIDOMXULElement.h" #include "nsGUIEvent.h" diff --git a/mozilla/xpfe/components/filepicker/Makefile.in b/mozilla/xpfe/components/filepicker/Makefile.in index 853830a6e6e..3b1e9d5f992 100644 --- a/mozilla/xpfe/components/filepicker/Makefile.in +++ b/mozilla/xpfe/components/filepicker/Makefile.in @@ -28,9 +28,11 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk +ifdef MOZ_XUL ifeq (,$(filter beos os2 mac photon cocoa windows,$(MOZ_WIDGET_TOOLKIT))) DIRS = public src endif +endif include $(topsrcdir)/config/rules.mk