author | Ed Morley <bmo@edmorley.co.uk> |
Mon, 30 May 2011 09:34:50 +0200 | |
changeset 70818 | d105fc895d91da4af6ca011c5cd4c69db5660c2c |
parent 70817 | 8d18f803e86610c282fd211d323798f2531f0e70 |
child 70819 | e8ee43fcbce8282ae6fdf2c48bbfed22ac87bef7 |
push id | 159 |
push user | eakhgari@mozilla.com |
push date | Tue, 16 Aug 2011 17:53:11 +0000 |
treeherder | mozilla-beta@8786e3e49240 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | roc |
bugs | 614515 |
milestone | 7.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -2959,21 +2959,16 @@ function FillInHTMLTooltip(tipElement) return retVal; const XLinkNS = "http://www.w3.org/1999/xlink"; var titleText = null; var XLinkTitleText = null; var SVGTitleText = null; -#ifdef MOZ_SVG - var lookingForSVGTitle = true; -#else - var lookingForSVGTitle = false; -#endif // MOZ_SVG var direction = tipElement.ownerDocument.dir; // If the element is invalid per HTML5 Forms specifications and has no title, // show the constraint validation error message. if ((tipElement instanceof HTMLInputElement || tipElement instanceof HTMLTextAreaElement || tipElement instanceof HTMLSelectElement || tipElement instanceof HTMLButtonElement) && @@ -2984,30 +2979,24 @@ function FillInHTMLTooltip(tipElement) titleText = tipElement.validationMessage; } while (!titleText && !XLinkTitleText && !SVGTitleText && tipElement) { if (tipElement.nodeType == Node.ELEMENT_NODE) { titleText = tipElement.getAttribute("title"); if ((tipElement instanceof HTMLAnchorElement && tipElement.href) || (tipElement instanceof HTMLAreaElement && tipElement.href) || - (tipElement instanceof HTMLLinkElement && tipElement.href) -#ifdef MOZ_SVG - || (tipElement instanceof SVGAElement && tipElement.hasAttributeNS(XLinkNS, "href")) -#endif // MOZ_SVG - ) { + (tipElement instanceof HTMLLinkElement && tipElement.href) || + (tipElement instanceof SVGAElement && tipElement.hasAttributeNS(XLinkNS, "href"))) { XLinkTitleText = tipElement.getAttributeNS(XLinkNS, "title"); } - if (lookingForSVGTitle && - !(tipElement instanceof SVGElement && - tipElement.parentNode instanceof SVGElement && - !(tipElement.parentNode instanceof SVGForeignObjectElement))) { - lookingForSVGTitle = false; - } - if (lookingForSVGTitle) { + if (tipElement instanceof SVGElement && + tipElement.parentNode instanceof SVGElement && + !(tipElement.parentNode instanceof SVGForeignObjectElement)) { + // Looking for SVG title let length = tipElement.childNodes.length; for (let i = 0; i < length; i++) { let childNode = tipElement.childNodes[i]; if (childNode instanceof SVGTitleElement) { SVGTitleText = childNode.textContent; break; } }
--- a/browser/base/content/pageinfo/pageInfo.js +++ b/browser/base/content/pageinfo/pageInfo.js @@ -621,26 +621,24 @@ function grabAll(elem) addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true); }); } // one swi^H^H^Hif-else to rule them all if (elem instanceof HTMLImageElement) addImage(elem.src, gStrings.mediaImg, (elem.hasAttribute("alt")) ? elem.alt : gStrings.notSet, elem, false); -#ifdef MOZ_SVG else if (elem instanceof SVGImageElement) { try { // Note: makeURLAbsolute will throw if either the baseURI is not a valid URI // or the URI formed from the baseURI and the URL is not a valid URI var href = makeURLAbsolute(elem.baseURI, elem.href.baseVal); addImage(href, gStrings.mediaImg, "", elem, false); } catch (e) { } } -#endif #ifdef MOZ_MEDIA else if (elem instanceof HTMLVideoElement) { addImage(elem.currentSrc, gStrings.mediaVideo, "", elem, false); } else if (elem instanceof HTMLAudioElement) { addImage(elem.currentSrc, gStrings.mediaAudio, "", elem, false); } #endif @@ -836,19 +834,17 @@ function makePreview(row) var url = gImageView.data[row][COL_IMAGE_ADDRESS]; var isBG = gImageView.data[row][COL_IMAGE_BG]; var isAudio = false; setItemValue("imageurltext", url); var imageText; if (!isBG && -#ifdef MOZ_SVG !(item instanceof SVGImageElement) && -#endif !(gDocument instanceof ImageDocument)) { imageText = item.title || item.alt; if (!imageText && !(item instanceof HTMLImageElement)) imageText = getValueText(item); } setItemValue("imagetext", imageText); @@ -936,19 +932,17 @@ function makePreview(row) var newImage = new Image; newImage.id = "thepreviewimage"; var physWidth = 0, physHeight = 0; var width = 0, height = 0; if ((item instanceof HTMLLinkElement || item instanceof HTMLInputElement || item instanceof HTMLImageElement || -#ifdef MOZ_SVG item instanceof SVGImageElement || -#endif (item instanceof HTMLObjectElement && /^image\//.test(mimeType)) || isBG) && isProtocolAllowed) { newImage.setAttribute("src", url); physWidth = newImage.width || 0; physHeight = newImage.height || 0; // "width" and "height" attributes must be set to newImage, // even if there is no "width" or "height attribute in item; // otherwise, the preview image cannot be displayed correctly. @@ -958,22 +952,20 @@ function makePreview(row) } else { // the Width and Height of an HTML tag should not be used for its background image // (for example, "table" can have "width" or "height" attributes) newImage.width = newImage.naturalWidth; newImage.height = newImage.naturalHeight; } -#ifdef MOZ_SVG if (item instanceof SVGImageElement) { newImage.width = item.width.baseVal.value; newImage.height = item.height.baseVal.value; } -#endif width = newImage.width; height = newImage.height; document.getElementById("theimagecontainer").collapsed = false document.getElementById("brokenimagecontainer").collapsed = true; } #ifdef MOZ_MEDIA
--- a/browser/components/BrowserComponents.manifest +++ b/browser/components/BrowserComponents.manifest @@ -1,18 +1,16 @@ # nsBrowserContentHandler.js component {5d0ce354-df01-421a-83fb-7ead0990c24e} nsBrowserContentHandler.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/browser/clh;1 {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} component {47cd0651-b1be-4a0f-b5c4-10e5a573ef71} nsBrowserContentHandler.js application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/browser/final-clh;1 {47cd0651-b1be-4a0f-b5c4-10e5a573ef71} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/uriloader/content-handler;1?type=text/html {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/uriloader/content-handler;1?type=application/vnd.mozilla.xul+xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} -#ifdef MOZ_SVG contract @mozilla.org/uriloader/content-handler;1?type=image/svg+xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} -#endif contract @mozilla.org/uriloader/content-handler;1?type=text/rdf {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/uriloader/content-handler;1?type=text/xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/uriloader/content-handler;1?type=application/xhtml+xml {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/uriloader/content-handler;1?type=text/css {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/uriloader/content-handler;1?type=text/plain {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/uriloader/content-handler;1?type=image/gif {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/uriloader/content-handler;1?type=image/jpeg {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} contract @mozilla.org/uriloader/content-handler;1?type=image/jpg {5d0ce354-df01-421a-83fb-7ead0990c24e} application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
--- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -252,17 +252,16 @@ MOZ_NATIVE_PNG = @SYSTEM_PNG@ MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@ MOZ_TREE_PIXMAN = @MOZ_TREE_PIXMAN@ MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@ MOZ_MATHML = @MOZ_MATHML@ MOZ_CSS_ANIMATIONS = @MOZ_CSS_ANIMATIONS@ MOZ_PERMISSIONS = @MOZ_PERMISSIONS@ MOZ_XTF = @MOZ_XTF@ -MOZ_SVG = @MOZ_SVG@ MOZ_SVG_DLISTS = @MOZ_SVG_DLISTS@ MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@ MOZ_SMIL = @MOZ_SMIL@ MOZ_XSLT_STANDALONE = @MOZ_XSLT_STANDALONE@ MOZ_PREF_EXTENSIONS = @MOZ_PREF_EXTENSIONS@ MOZ_CAIRO_LIBS = @MOZ_CAIRO_LIBS@
--- a/configure.in +++ b/configure.in @@ -4836,17 +4836,16 @@ MOZ_PROFILELOCKING=1 MOZ_PSM=1 MOZ_RDF=1 MOZ_REFLOW_PERF= MOZ_SAFE_BROWSING= MOZ_HELP_VIEWER= MOZ_SPELLCHECK=1 MOZ_SPLASHSCREEN= MOZ_STORAGE=1 -MOZ_SVG=1 MOZ_SVG_DLISTS= MOZ_THUMB2= MOZ_TIMELINE= MOZ_TOOLKIT_SEARCH=1 MOZ_UI_LOCALE=en-US MOZ_UNIVERSALCHARDET=1 MOZ_URL_CLASSIFIER= MOZ_XSLT_STANDALONE= @@ -6418,21 +6417,16 @@ MOZ_ARG_DISABLE_BOOL(mathml, MOZ_MATHML=1 ) if test "$MOZ_MATHML"; then AC_DEFINE(MOZ_MATHML) fi AC_DEFINE(MOZ_CSS_ANIMATIONS) dnl ======================================================== -dnl Keeping AC_DEFINE(MOZ_SVG) for the moment in case of something needs it. -dnl ======================================================== -AC_DEFINE(MOZ_SVG) - -dnl ======================================================== dnl SVG Display Lists dnl ======================================================== if test -n "$MOZ_SVG_DLISTS"; then AC_DEFINE(MOZ_SVG_DLISTS) fi dnl ======================================================== dnl SMIL @@ -8755,17 +8749,16 @@ AC_SUBST(MOZ_UPDATE_XTERM) AC_SUBST(MINIMO) AC_SUBST(MOZ_PLATFORM_MAEMO) AC_SUBST(MOZ_AUTH_EXTENSION) AC_SUBST(MOZ_MATHML) AC_SUBST(MOZ_CSS_ANIMATIONS) AC_SUBST(MOZ_PERMISSIONS) AC_SUBST(MOZ_XTF) AC_SUBST(MOZ_PREF_EXTENSIONS) -AC_SUBST(MOZ_SVG) AC_SUBST(MOZ_SMIL) AC_SUBST(MOZ_XSLT_STANDALONE) AC_SUBST(MOZ_JS_LIBS) AC_SUBST(MOZ_PSM) AC_SUBST(MOZ_DEBUG) AC_SUBST(MOZ_DEBUG_SYMBOLS) AC_SUBST(MOZ_DEBUG_ENABLE_DEFS) AC_SUBST(MOZ_DEBUG_DISABLE_DEFS)
--- a/content/Makefile.in +++ b/content/Makefile.in @@ -38,26 +38,22 @@ DEPTH = .. topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = content -PARALLEL_DIRS = base canvas events html smil xml xul xbl xslt +PARALLEL_DIRS = base canvas events html smil svg xml xul xbl xslt ifdef MOZ_MEDIA PARALLEL_DIRS += media endif -ifdef MOZ_SVG -PARALLEL_DIRS += svg -endif - ifdef MOZ_XTF PARALLEL_DIRS += xtf endif ifdef MOZ_MATHML PARALLEL_DIRS += mathml endif
--- a/content/base/public/nsContentCID.h +++ b/content/base/public/nsContentCID.h @@ -209,25 +209,21 @@ // {3A0A0FC1-8349-11d3-BE47-00104BDE6048} #define NS_XULPROTOTYPECACHE_CID \ { 0x3a0a0fc1, 0x8349, 0x11d3, { 0xbe, 0x47, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } } // {a6cf9126-15b3-11d2-932e-00805f8add32} #define NS_RANGEUTILS_CID \ { 0xa6cf9126, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } -#ifdef MOZ_SVG - #define NS_SVGDOCUMENT_CID \ { /* b7f44954-1dd1-11b2-8c2e-c2feab4186bc */ \ 0xb7f44954, 0x11d1, 0x11b2, \ {0x8c, 0x2e, 0xc2, 0xfe, 0xab, 0x41, 0x86, 0xbc}} -#endif // MOZ_SVG - #ifdef MOZ_MEDIA // {d899a152-9412-46b2-b651-2e71c5c2f05f} #define NS_VIDEODOCUMENT_CID \ { 0xd899a152, 0x9412, 0x46b2, \ { 0xb6, 0x51, 0x2e, 0x71, 0xc5, 0xc2, 0xf0, 0x5f } } #endif
--- a/content/base/public/nsContentCreatorFunctions.h +++ b/content/base/public/nsContentCreatorFunctions.h @@ -120,21 +120,19 @@ NS_NewMathMLElement(nsIContent** aResult #ifdef MOZ_XUL nsresult NS_NewXULElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo); void NS_TrustedNewXULElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo); #endif -#ifdef MOZ_SVG nsresult NS_NewSVGElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo, mozilla::dom::FromParser aFromParser); -#endif nsresult NS_NewGenConImageContent(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo, imgIRequest* aImageRequest); nsresult NS_NewXMLEventsElement(nsIContent** aResult,
--- a/content/base/public/nsContentUtils.h +++ b/content/base/public/nsContentUtils.h @@ -746,19 +746,17 @@ public: enum PropertiesFile { eCSS_PROPERTIES, eXBL_PROPERTIES, eXUL_PROPERTIES, eLAYOUT_PROPERTIES, eFORMS_PROPERTIES, ePRINTING_PROPERTIES, eDOM_PROPERTIES, -#ifdef MOZ_SVG eSVG_PROPERTIES, -#endif eBRAND_PROPERTIES, eCOMMON_DIALOG_PROPERTIES, PropertiesFile_COUNT }; static nsresult ReportToConsole(PropertiesFile aFile, const char *aMessageName, const PRUnichar **aParams, PRUint32 aParamsLength,
--- a/content/base/public/nsIDocument.h +++ b/content/base/public/nsIDocument.h @@ -1791,20 +1791,18 @@ private: // XXX These belong somewhere else nsresult NS_NewHTMLDocument(nsIDocument** aInstancePtrResult); nsresult NS_NewXMLDocument(nsIDocument** aInstancePtrResult); -#ifdef MOZ_SVG nsresult NS_NewSVGDocument(nsIDocument** aInstancePtrResult); -#endif nsresult NS_NewImageDocument(nsIDocument** aInstancePtrResult); #ifdef MOZ_MEDIA nsresult NS_NewVideoDocument(nsIDocument** aInstancePtrResult); #endif
--- a/content/base/src/nsAttrValue.cpp +++ b/content/base/src/nsAttrValue.cpp @@ -47,19 +47,17 @@ #include "mozilla/css/StyleRule.h" #include "mozilla/css/Declaration.h" #include "nsIHTMLDocument.h" #include "nsIDocument.h" #include "nsTPtrArray.h" #include "nsContentUtils.h" #include "nsReadableUtils.h" #include "prprf.h" -#ifdef MOZ_SVG #include "nsISVGValue.h" -#endif namespace css = mozilla::css; #define MISC_STR_PTR(_cont) \ reinterpret_cast<void*>((_cont)->mStringBits & NS_ATTRVALUE_POINTERVALUE_MASK) nsTPtrArray<const nsAttrValue::EnumTable>* nsAttrValue::sEnumTableArray = nsnull; @@ -81,23 +79,21 @@ nsAttrValue::nsAttrValue(const nsAString } nsAttrValue::nsAttrValue(css::StyleRule* aValue, const nsAString* aSerialized) : mBits(0) { SetTo(aValue, aSerialized); } -#ifdef MOZ_SVG nsAttrValue::nsAttrValue(nsISVGValue* aValue) : mBits(0) { SetTo(aValue); } -#endif nsAttrValue::nsAttrValue(const nsIntMargin& aValue) : mBits(0) { SetTo(aValue); } nsAttrValue::~nsAttrValue() @@ -250,23 +246,21 @@ nsAttrValue::SetTo(const nsAttrValue& aO { if (!EnsureEmptyAtomArray() || !GetAtomArrayValue()->AppendElements(*otherCont->mAtomArray)) { Reset(); return; } break; } -#ifdef MOZ_SVG case eSVGValue: { NS_ADDREF(cont->mSVGValue = otherCont->mSVGValue); break; } -#endif case eDoubleValue: { cont->mDoubleValue = otherCont->mDoubleValue; break; } case eIntMarginValue: { if (otherCont->mIntMargin) @@ -318,27 +312,25 @@ nsAttrValue::SetTo(css::StyleRule* aValu if (EnsureEmptyMiscContainer()) { MiscContainer* cont = GetMiscContainer(); NS_ADDREF(cont->mCSSStyleRule = aValue); cont->mType = eCSSStyleRule; SetMiscAtomOrString(aSerialized); } } -#ifdef MOZ_SVG void nsAttrValue::SetTo(nsISVGValue* aValue) { if (EnsureEmptyMiscContainer()) { MiscContainer* cont = GetMiscContainer(); NS_ADDREF(cont->mSVGValue = aValue); cont->mType = eSVGValue; } } -#endif void nsAttrValue::SetTo(const nsIntMargin& aValue) { if (EnsureEmptyMiscContainer()) { MiscContainer* cont = GetMiscContainer(); cont->mIntMargin = new nsIntMargin(aValue); cont->mType = eIntMarginValue; @@ -431,23 +423,21 @@ nsAttrValue::ToString(nsAString& aResult css::Declaration *decl = container->mCSSStyleRule->GetDeclaration(); if (decl) { decl->ToString(aResult); } const_cast<nsAttrValue*>(this)->SetMiscAtomOrString(&aResult); break; } -#ifdef MOZ_SVG case eSVGValue: { GetMiscContainer()->mSVGValue->GetValueString(aResult); break; } -#endif case eDoubleValue: { aResult.Truncate(); aResult.AppendFloat(GetDoubleValue()); break; } default: { @@ -596,22 +586,20 @@ nsAttrValue::HashValue() const PRUint32 count = cont->mAtomArray->Length(); for (nsCOMPtr<nsIAtom> *cur = cont->mAtomArray->Elements(), *end = cur + count; cur != end; ++cur) { retval ^= NS_PTR_TO_INT32(cur->get()); } return retval; } -#ifdef MOZ_SVG case eSVGValue: { return NS_PTR_TO_INT32(cont->mSVGValue); } -#endif case eDoubleValue: { // XXX this is crappy, but oh well return cont->mDoubleValue; } case eIntMarginValue: { return NS_PTR_TO_INT32(cont->mIntMargin); @@ -695,22 +683,20 @@ nsAttrValue::Equals(const nsAttrValue& a if (!(*thisCont->mAtomArray == *otherCont->mAtomArray)) { return PR_FALSE; } needsStringComparison = PR_TRUE; break; } -#ifdef MOZ_SVG case eSVGValue: { return thisCont->mSVGValue == otherCont->mSVGValue; } -#endif case eDoubleValue: { return thisCont->mDoubleValue == otherCont->mDoubleValue; } case eIntMarginValue: { return thisCont->mIntMargin == otherCont->mIntMargin; } @@ -1304,23 +1290,21 @@ nsAttrValue::EnsureEmptyMiscContainer() NS_RELEASE(cont->mCSSStyleRule); break; } case eAtomArray: { delete cont->mAtomArray; break; } -#ifdef MOZ_SVG case eSVGValue: { NS_RELEASE(cont->mSVGValue); break; } -#endif case eIntMarginValue: { delete cont->mIntMargin; break; } default: { break;
--- a/content/base/src/nsAttrValue.h +++ b/content/base/src/nsAttrValue.h @@ -100,19 +100,17 @@ public: class nsAttrValue { public: typedef nsTArray< nsCOMPtr<nsIAtom> > AtomArray; nsAttrValue(); nsAttrValue(const nsAttrValue& aOther); explicit nsAttrValue(const nsAString& aValue); nsAttrValue(mozilla::css::StyleRule* aValue, const nsAString* aSerialized); -#ifdef MOZ_SVG explicit nsAttrValue(nsISVGValue* aValue); -#endif explicit nsAttrValue(const nsIntMargin& aValue); ~nsAttrValue(); static nsresult Init(); static void Shutdown(); // This has to be the same as in ValueBaseType enum ValueType { @@ -122,34 +120,30 @@ public: eInteger = 0x03, // 0011 eColor = 0x07, // 0111 eEnum = 0x0B, // 1011 This should eventually die ePercent = 0x0F, // 1111 // Values below here won't matter, they'll be always stored in the 'misc' // struct. eCSSStyleRule = 0x10, eAtomArray = 0x11 -#ifdef MOZ_SVG ,eSVGValue = 0x12 -#endif ,eDoubleValue = 0x13 ,eIntMarginValue = 0x14 }; ValueType Type() const; void Reset(); void SetTo(const nsAttrValue& aOther); void SetTo(const nsAString& aValue); void SetTo(PRInt16 aInt); void SetTo(mozilla::css::StyleRule* aValue, const nsAString* aSerialized); -#ifdef MOZ_SVG void SetTo(nsISVGValue* aValue); -#endif void SetTo(const nsIntMargin& aValue); void SwapValueWith(nsAttrValue& aOther); void ToString(nsAString& aResult) const; // Methods to get value. These methods do not convert so only use them // to retrieve the datatype that this nsAttrValue has. @@ -157,19 +151,17 @@ public: const nsCheapString GetStringValue() const; inline nsIAtom* GetAtomValue() const; inline PRInt32 GetIntegerValue() const; PRBool GetColorValue(nscolor& aColor) const; inline PRInt16 GetEnumValue() const; inline float GetPercentValue() const; inline AtomArray* GetAtomArrayValue() const; inline mozilla::css::StyleRule* GetCSSStyleRuleValue() const; -#ifdef MOZ_SVG inline nsISVGValue* GetSVGValue() const; -#endif inline double GetDoubleValue() const; PRBool GetIntMarginValue(nsIntMargin& aMargin) const; /** * Returns the string corresponding to the stored enum value. * * @param aResult the string representing the enum tag * @param aRealTag wheter we want to have the real tag or the saved one @@ -338,19 +330,17 @@ private: PtrBits mStringBits; union { PRInt32 mInteger; nscolor mColor; PRUint32 mEnumValue; PRInt32 mPercent; mozilla::css::StyleRule* mCSSStyleRule; AtomArray* mAtomArray; -#ifdef MOZ_SVG nsISVGValue* mSVGValue; -#endif double mDoubleValue; nsIntMargin* mIntMargin; }; }; inline ValueBaseType BaseType() const; /** @@ -444,24 +434,22 @@ nsAttrValue::GetAtomArrayValue() const inline mozilla::css::StyleRule* nsAttrValue::GetCSSStyleRuleValue() const { NS_PRECONDITION(Type() == eCSSStyleRule, "wrong type"); return GetMiscContainer()->mCSSStyleRule; } -#ifdef MOZ_SVG inline nsISVGValue* nsAttrValue::GetSVGValue() const { NS_PRECONDITION(Type() == eSVGValue, "wrong type"); return GetMiscContainer()->mSVGValue; } -#endif inline double nsAttrValue::GetDoubleValue() const { NS_PRECONDITION(Type() == eDoubleValue, "wrong type"); return GetMiscContainer()->mDoubleValue; }
--- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -502,29 +502,27 @@ nsContentUtils::InitializeEventTable() { { nsGkAtoms::ondrag, NS_DRAGDROP_DRAG, EventNameType_HTMLXUL, NS_DRAG_EVENT }, { nsGkAtoms::ondragend, NS_DRAGDROP_END, EventNameType_HTMLXUL, NS_DRAG_EVENT }, { nsGkAtoms::ondragstart, NS_DRAGDROP_START, EventNameType_HTMLXUL, NS_DRAG_EVENT }, { nsGkAtoms::ondragleave, NS_DRAGDROP_LEAVE_SYNTH, EventNameType_HTMLXUL, NS_DRAG_EVENT }, { nsGkAtoms::ondrop, NS_DRAGDROP_DROP, EventNameType_HTMLXUL, NS_DRAG_EVENT }, { nsGkAtoms::onoverflow, NS_SCROLLPORT_OVERFLOW, EventNameType_XUL, NS_EVENT_NULL}, { nsGkAtoms::onunderflow, NS_SCROLLPORT_UNDERFLOW, EventNameType_XUL, NS_EVENT_NULL}, -#ifdef MOZ_SVG { nsGkAtoms::onSVGLoad, NS_SVG_LOAD, EventNameType_None, NS_SVG_EVENT }, { nsGkAtoms::onSVGUnload, NS_SVG_UNLOAD, EventNameType_None, NS_SVG_EVENT }, { nsGkAtoms::onSVGAbort, NS_SVG_ABORT, EventNameType_None, NS_SVG_EVENT }, { nsGkAtoms::onSVGError, NS_SVG_ERROR, EventNameType_None, NS_SVG_EVENT }, { nsGkAtoms::onSVGResize, NS_SVG_RESIZE, EventNameType_None, NS_SVG_EVENT }, { nsGkAtoms::onSVGScroll, NS_SVG_SCROLL, EventNameType_None, NS_SVG_EVENT }, { nsGkAtoms::onSVGZoom, NS_SVG_ZOOM, EventNameType_None, NS_SVGZOOM_EVENT }, // This is a bit hackish, but SVG's event names are weird. { nsGkAtoms::onzoom, NS_SVG_ZOOM, EventNameType_SVGSVG, NS_EVENT_NULL }, -#endif // MOZ_SVG #ifdef MOZ_SMIL { nsGkAtoms::onbegin, NS_SMIL_BEGIN, EventNameType_SMIL, NS_EVENT_NULL }, { nsGkAtoms::onbeginEvent, NS_SMIL_BEGIN, EventNameType_None, NS_SMIL_TIME_EVENT }, { nsGkAtoms::onend, NS_SMIL_END, EventNameType_SMIL, NS_EVENT_NULL }, { nsGkAtoms::onendEvent, NS_SMIL_END, EventNameType_None, NS_SMIL_TIME_EVENT }, { nsGkAtoms::onrepeat, NS_SMIL_REPEAT, EventNameType_SMIL, NS_EVENT_NULL }, { nsGkAtoms::onrepeatEvent, NS_SMIL_REPEAT, EventNameType_None, NS_SMIL_TIME_EVENT }, #endif // MOZ_SMIL @@ -2708,19 +2706,17 @@ static const char gPropertiesFiles[nsCon // Must line up with the enum values in |PropertiesFile| enum. "chrome://global/locale/css.properties", "chrome://global/locale/xbl.properties", "chrome://global/locale/xul.properties", "chrome://global/locale/layout_errors.properties", "chrome://global/locale/layout/HtmlForm.properties", "chrome://global/locale/printing.properties", "chrome://global/locale/dom/dom.properties", -#ifdef MOZ_SVG "chrome://global/locale/svg/svg.properties", -#endif "chrome://branding/locale/brand.properties", "chrome://global/locale/commonDialogs.properties" }; /* static */ nsresult nsContentUtils::EnsureStringBundle(PropertiesFile aFile) { if (!sStringBundles[aFile]) {
--- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -5133,23 +5133,21 @@ nsDocument::GetTitle(nsAString& aTitle) nsAutoString tmp; switch (rootElement->GetNameSpaceID()) { #ifdef MOZ_XUL case kNameSpaceID_XUL: rootElement->GetAttr(kNameSpaceID_None, nsGkAtoms::title, tmp); break; #endif -#ifdef MOZ_SVG case kNameSpaceID_SVG: if (rootElement->Tag() == nsGkAtoms::svg) { GetTitleFromElement(kNameSpaceID_SVG, tmp); break; } // else fall through -#endif default: GetTitleFromElement(kNameSpaceID_XHTML, tmp); break; } tmp.CompressWhitespace(); aTitle = tmp; return NS_OK; @@ -5158,20 +5156,18 @@ nsDocument::GetTitle(nsAString& aTitle) NS_IMETHODIMP nsDocument::SetTitle(const nsAString& aTitle) { Element *rootElement = GetRootElement(); if (!rootElement) return NS_OK; switch (rootElement->GetNameSpaceID()) { -#ifdef MOZ_SVG case kNameSpaceID_SVG: return NS_OK; // SVG doesn't support setting a title -#endif #ifdef MOZ_XUL case kNameSpaceID_XUL: return rootElement->SetAttr(kNameSpaceID_None, nsGkAtoms::title, aTitle, PR_TRUE); #endif } // Batch updates so that mutation events don't change "the title
--- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -92,19 +92,17 @@ #include "nsBindingManager.h" #include "nsXBLBinding.h" #include "nsIXBLService.h" #include "nsPIDOMWindow.h" #include "nsPIBoxObject.h" #include "nsIDOMNSElement.h" #include "nsClientRect.h" -#ifdef MOZ_SVG #include "nsSVGUtils.h" -#endif #include "nsLayoutUtils.h" #include "nsGkAtoms.h" #include "nsContentUtils.h" #include "nsIJSContextStack.h" #include "nsIServiceManager.h" #include "nsIDOMEventListener.h" #include "nsIWebNavigation.h" @@ -142,19 +140,17 @@ #include "nsCCUncollectableMarker.h" #include "mozAutoDocUpdate.h" #include "nsCSSParser.h" #include "nsTPtrArray.h" #include "prprf.h" -#ifdef MOZ_SVG #include "nsSVGFeatures.h" -#endif /* MOZ_SVG */ using namespace mozilla::dom; namespace css = mozilla::css; NS_DEFINE_IID(kThisPtrOffsetsSID, NS_THISPTROFFSETS_SID); PRInt32 nsIContent::sTabFocusModel = eTabFocus_any; PRBool nsIContent::sTabFocusModelAppliesToXUL = PR_FALSE;
--- a/content/base/src/nsGkAtomList.h +++ b/content/base/src/nsGkAtomList.h @@ -1092,17 +1092,16 @@ GK_ATOM(xml, "xml") GK_ATOM(xmlns, "xmlns") GK_ATOM(xmp, "xmp") GK_ATOM(xulcontentsgenerated, "xulcontentsgenerated") GK_ATOM(yes, "yes") GK_ATOM(z_index, "z-index") GK_ATOM(zeroDigit, "zero-digit") -#ifdef MOZ_SVG GK_ATOM(percentage, "%") GK_ATOM(A, "A") GK_ATOM(alignment_baseline, "alignment-baseline") GK_ATOM(allowReorder, "allowReorder") GK_ATOM(altGlyph, "altGlyph") GK_ATOM(altGlyphDef, "altGlyphDef") GK_ATOM(altGlyphItem, "altGlyphItem") GK_ATOM(amplitude, "amplitude") @@ -1342,23 +1341,23 @@ GK_ATOM(userSpaceOnUse, "userSpaceOnUse" GK_ATOM(view, "view") GK_ATOM(viewBox, "viewBox") GK_ATOM(vkern, "vkern") GK_ATOM(word_spacing, "word-spacing") GK_ATOM(x, "x") GK_ATOM(x1, "x1") GK_ATOM(x2, "x2") GK_ATOM(xChannelSelector, "xChannelSelector") +GK_ATOM(xor_, "xor") GK_ATOM(y, "y") GK_ATOM(y1, "y1") GK_ATOM(y2, "y2") GK_ATOM(yChannelSelector, "yChannelSelector") GK_ATOM(z, "z") GK_ATOM(zoomAndPan, "zoomAndPan") -#endif #ifdef MOZ_SMIL GK_ATOM(accumulate, "accumulate") GK_ATOM(additive, "additive") GK_ATOM(attributeName, "attributeName") GK_ATOM(attributeType, "attributeType") GK_ATOM(auto_reverse, "auto-reverse") GK_ATOM(begin, "begin") @@ -1665,20 +1664,16 @@ GK_ATOM(verythickmathspace_, "verythickm GK_ATOM(verythinmathspace_, "verythinmathspace") GK_ATOM(veryverythickmathspace_, "veryverythickmathspace") GK_ATOM(veryverythinmathspace_, "veryverythinmathspace") GK_ATOM(voffset_, "voffset") GK_ATOM(xref_, "xref") GK_ATOM(math, "math") // the only one without an underscore #endif -#if defined(MOZ_SVG) || defined(MOZ_MATHML) -GK_ATOM(xor_, "xor") -#endif - #ifndef DISABLE_XFORMS_HOOKS GK_ATOM(avg, "avg") GK_ATOM(booleanFromString, "boolean-from-string") GK_ATOM(countNonEmpty, "count-non-empty") GK_ATOM(daysFromDate, "days-from-date") GK_ATOM(init, "init") GK_ATOM(instance, "instance") GK_ATOM(months, "months") @@ -1769,17 +1764,16 @@ GK_ATOM(tableOuterFrame, "TableOuterFram GK_ATOM(tableRowGroupFrame, "TableRowGroupFrame") GK_ATOM(tableRowFrame, "TableRowFrame") GK_ATOM(textInputFrame,"TextInputFrame") GK_ATOM(textFrame, "TextFrame") GK_ATOM(viewportFrame, "ViewportFrame") #ifdef MOZ_XUL GK_ATOM(XULLabelFrame, "XULLabelFrame") #endif -#ifdef MOZ_SVG GK_ATOM(svgAFrame, "SVGAFrame") GK_ATOM(svgClipPathFrame, "SVGClipPathFrame") GK_ATOM(svgDefsFrame, "SVGDefsFrame") GK_ATOM(svgFilterFrame, "SVGFilterFrame") GK_ATOM(svgForeignObjectFrame, "SVGForeignObjectFrame") GK_ATOM(svgGenericContainerFrame, "SVGGenericContainerFrame") GK_ATOM(svgGFrame, "SVGGFrame") GK_ATOM(svgGlyphFrame, "SVGGlyphFrame") @@ -1794,17 +1788,16 @@ GK_ATOM(svgPathGeometryFrame, "SVGPathGe GK_ATOM(svgPatternFrame, "SVGPatternFrame") GK_ATOM(svgRadialGradientFrame, "SVGRadialGradientFrame") GK_ATOM(svgStopFrame, "SVGStopFrame") GK_ATOM(svgSwitchFrame, "SVGSwitchFrame") GK_ATOM(svgTextFrame, "SVGTextFrame") GK_ATOM(svgTextPathFrame, "SVGTextPathFrame") GK_ATOM(svgTSpanFrame, "SVGTSpanFrame") GK_ATOM(svgUseFrame, "SVGUseFrame") -#endif #ifdef MOZ_MEDIA GK_ATOM(HTMLVideoFrame, "VideoFrame") GK_ATOM(onloadstart, "onloadstart") GK_ATOM(onprogress, "onprogress") GK_ATOM(onsuspend, "onsuspend") GK_ATOM(onemptied, "onemptied") GK_ATOM(onstalled, "onstalled") GK_ATOM(onplay, "onplay")
--- a/content/base/src/nsImageLoadingContent.cpp +++ b/content/base/src/nsImageLoadingContent.cpp @@ -71,19 +71,17 @@ #include "nsIFrame.h" #include "nsIDOMNode.h" #include "nsContentUtils.h" #include "nsIContentPolicy.h" #include "nsContentPolicyUtils.h" #include "nsEventDispatcher.h" #include "nsDOMClassInfo.h" -#ifdef MOZ_SVG #include "nsSVGEffects.h" -#endif #include "mozAutoDocUpdate.h" #ifdef DEBUG_chb static void PrintReqURL(imgIRequest* req) { if (!req) { printf("(null req)\n"); return; @@ -353,20 +351,18 @@ nsImageLoadingContent::OnStopDecode(imgI // Fire the appropriate DOM event. if (NS_SUCCEEDED(aStatus)) { FireEvent(NS_LITERAL_STRING("load")); } else { FireEvent(NS_LITERAL_STRING("error")); } -#ifdef MOZ_SVG nsCOMPtr<nsINode> thisNode = do_QueryInterface(this); nsSVGEffects::InvalidateDirectRenderingObservers(thisNode->AsElement()); -#endif return NS_OK; } NS_IMETHODIMP nsImageLoadingContent::OnStopRequest(imgIRequest* aRequest, PRBool aLastPart) { NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_NOT_AVAILABLE);
--- a/content/base/src/nsNameSpaceManager.cpp +++ b/content/base/src/nsNameSpaceManager.cpp @@ -263,19 +263,17 @@ NameSpaceManagerImpl::HasElementCreator( { return aNameSpaceID == kNameSpaceID_XHTML || #ifdef MOZ_XUL aNameSpaceID == kNameSpaceID_XUL || #endif #ifdef MOZ_MATHML aNameSpaceID == kNameSpaceID_MathML || #endif -#ifdef MOZ_SVG aNameSpaceID == kNameSpaceID_SVG || -#endif aNameSpaceID == kNameSpaceID_XMLEvents || PR_FALSE; } nsresult NameSpaceManagerImpl::AddNameSpace(const nsAString& aURI, const PRInt32 aNameSpaceID) { if (aNameSpaceID < 0) {
--- a/content/base/src/nsObjectLoadingContent.cpp +++ b/content/base/src/nsObjectLoadingContent.cpp @@ -1492,21 +1492,18 @@ nsObjectLoadingContent::LoadObject(nsIUR return NS_OK; } PRUint32 nsObjectLoadingContent::GetCapabilities() const { return eSupportImages | eSupportPlugins | - eSupportDocuments -#ifdef MOZ_SVG - | eSupportSVG -#endif - ; + eSupportDocuments | + eSupportSVG; } void nsObjectLoadingContent::Fallback(PRBool aNotify) { LOG(("OBJLC [%p]: Falling back (Notify=%i)\n", this, aNotify)); AutoNotifier notifier(this, aNotify); @@ -1701,22 +1698,18 @@ nsObjectLoadingContent::ObjectType nsObjectLoadingContent::GetTypeOfContent(const nsCString& aMIMEType) { PRUint32 caps = GetCapabilities(); if ((caps & eSupportImages) && IsSupportedImage(aMIMEType)) { return eType_Image; } -#ifdef MOZ_SVG PRBool isSVG = aMIMEType.LowerCaseEqualsLiteral("image/svg+xml"); PRBool supportedSVG = isSVG && (caps & eSupportSVG); -#else - PRBool supportedSVG = PR_FALSE; -#endif if (((caps & eSupportDocuments) || supportedSVG) && IsSupportedDocument(aMIMEType)) { return eType_Document; } if ((caps & eSupportPlugins) && IsSupportedPlugin(aMIMEType)) { return eType_Plugin; }
--- a/content/base/src/nsObjectLoadingContent.h +++ b/content/base/src/nsObjectLoadingContent.h @@ -190,19 +190,17 @@ class nsObjectLoadingContent : public ns PRBool aForceLoad = PR_FALSE); enum Capabilities { eSupportImages = PR_BIT(0), // Images are supported (imgILoader) eSupportPlugins = PR_BIT(1), // Plugins are supported (nsIPluginHost) eSupportDocuments = PR_BIT(2), // Documents are supported // (nsIDocumentLoaderFactory) // This flag always includes SVG -#ifdef MOZ_SVG eSupportSVG = PR_BIT(3), // SVG is supported (image/svg+xml) -#endif eSupportClassID = PR_BIT(4), // The classid attribute is supported eOverrideServerType = PR_BIT(5) // The server-sent MIME type is ignored // (ignored if no type is specified) }; /** * Returns the list of capabilities this content node supports. This is a * bitmask consisting of flags from the Capabilities enum.
--- a/content/base/src/nsStyledElement.cpp +++ b/content/base/src/nsStyledElement.cpp @@ -47,20 +47,17 @@ #include "nsDOMCSSAttrDeclaration.h" #include "nsServiceManagerUtils.h" #include "nsIDocument.h" #include "mozilla/css/StyleRule.h" #include "nsCSSParser.h" #include "mozilla/css/Loader.h" #include "nsIDOMMutationEvent.h" #include "nsXULElement.h" - -#ifdef MOZ_SVG #include "nsIDOMSVGStylable.h" -#endif namespace css = mozilla::css; //---------------------------------------------------------------------- // nsIContent methods nsIAtom* nsStyledElementNotElementCSSInlineStyle::GetClassAttributeName() const
--- a/content/canvas/src/WebGLContext.cpp +++ b/content/canvas/src/WebGLContext.cpp @@ -59,19 +59,17 @@ #include "CanvasUtils.h" #include "nsDisplayList.h" #include "GLContextProvider.h" #include "gfxCrashReporterUtils.h" -#ifdef MOZ_SVG #include "nsSVGEffects.h" -#endif #include "prenv.h" using namespace mozilla; using namespace mozilla::gl; using namespace mozilla::layers; nsresult NS_NewCanvasRenderingContextWebGL(nsIDOMWebGLRenderingContext** aResult); @@ -272,19 +270,17 @@ void WebGLContext::Invalidate() { if (mInvalidated) return; if (!mCanvasElement) return; -#ifdef MOZ_SVG nsSVGEffects::InvalidateDirectRenderingObservers(HTMLCanvasElement()); -#endif mInvalidated = PR_TRUE; HTMLCanvasElement()->InvalidateCanvasContent(nsnull); } /* readonly attribute nsIDOMHTMLCanvasElement canvas; */ NS_IMETHODIMP WebGLContext::GetCanvas(nsIDOMHTMLCanvasElement **canvas)
--- a/content/canvas/src/nsCanvasRenderingContext2D.cpp +++ b/content/canvas/src/nsCanvasRenderingContext2D.cpp @@ -1032,19 +1032,17 @@ nsCanvasRenderingContext2D::Redraw() return NS_OK; mIsEntireFrameInvalid = PR_TRUE; if (!mCanvasElement) { NS_ASSERTION(mDocShell, "Redraw with no canvas element or docshell!"); return NS_OK; } -#ifdef MOZ_SVG nsSVGEffects::InvalidateDirectRenderingObservers(HTMLCanvasElement()); -#endif HTMLCanvasElement()->InvalidateCanvasContent(nsnull); return NS_OK; } NS_IMETHODIMP nsCanvasRenderingContext2D::Redraw(const gfxRect& r) @@ -1059,19 +1057,17 @@ nsCanvasRenderingContext2D::Redraw(const return Redraw(); } if (!mCanvasElement) { NS_ASSERTION(mDocShell, "Redraw with no canvas element or docshell!"); return NS_OK; } -#ifdef MOZ_SVG nsSVGEffects::InvalidateDirectRenderingObservers(HTMLCanvasElement()); -#endif HTMLCanvasElement()->InvalidateCanvasContent(&r); return NS_OK; } NS_IMETHODIMP nsCanvasRenderingContext2D::RedrawUser(const gfxRect& r)
--- a/content/events/public/nsIPrivateDOMEvent.h +++ b/content/events/public/nsIPrivateDOMEvent.h @@ -92,22 +92,20 @@ NS_NewDOMPopupBlockedEvent(nsIDOMEvent** nsresult NS_NewDOMDeviceOrientationEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, nsEvent* aEvent); nsresult NS_NewDOMTextEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, class nsTextEvent* aEvent); nsresult NS_NewDOMBeforeUnloadEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, nsEvent* aEvent); nsresult NS_NewDOMPageTransitionEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, nsEvent* aEvent); -#ifdef MOZ_SVG nsresult NS_NewDOMSVGEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, class nsEvent* aEvent); nsresult NS_NewDOMSVGZoomEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, class nsGUIEvent* aEvent); -#endif // MOZ_SVG #ifdef MOZ_SMIL nsresult NS_NewDOMTimeEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, class nsEvent* aEvent); #endif // MOZ_SMIL nsresult NS_NewDOMXULCommandEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, class nsInputEvent* aEvent); nsresult NS_NewDOMCommandEvent(nsIDOMEvent** aInstancePtrResult, nsPresContext* aPresContext, nsCommandEvent* aEvent);
--- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -74,20 +74,18 @@ static const char* const sEventNames[] = "drag", "dragend", "dragstart", "dragleave", "drop", "resize", "scroll", "overflow", "underflow", "overflowchanged", "DOMSubtreeModified", "DOMNodeInserted", "DOMNodeRemoved", "DOMNodeRemovedFromDocument", "DOMNodeInsertedIntoDocument", "DOMAttrModified", "DOMCharacterDataModified", "DOMActivate", "DOMFocusIn", "DOMFocusOut", "pageshow", "pagehide", "DOMMouseScroll", "MozMousePixelScroll", "offline", "online", "copy", "cut", "paste", "open", "message", -#ifdef MOZ_SVG "SVGLoad", "SVGUnload", "SVGAbort", "SVGError", "SVGResize", "SVGScroll", "SVGZoom", -#endif // MOZ_SVG #ifdef MOZ_SMIL "beginEvent", "endEvent", "repeatEvent", #endif // MOZ_SMIL #ifdef MOZ_MEDIA "loadstart", "progress", "suspend", "emptied", "stalled", "play", "pause", "loadedmetadata", "loadeddata", "waiting", "playing", "canplay", "canplaythrough", "seeking", "seeked", "timeupdate", "ended", "ratechange", "durationchange", "volumechange", "MozAudioAvailable", @@ -772,32 +770,30 @@ NS_METHOD nsDOMEvent::DuplicatePrivateDa break; } case NS_UI_EVENT: { newEvent = new nsUIEvent(PR_FALSE, msg, static_cast<nsUIEvent*>(mEvent)->detail); break; } -#ifdef MOZ_SVG case NS_SVG_EVENT: { newEvent = new nsEvent(PR_FALSE, msg); NS_ENSURE_TRUE(newEvent, NS_ERROR_OUT_OF_MEMORY); newEvent->eventStructType = NS_SVG_EVENT; break; } case NS_SVGZOOM_EVENT: { newEvent = new nsGUIEvent(PR_FALSE, msg, nsnull); NS_ENSURE_TRUE(newEvent, NS_ERROR_OUT_OF_MEMORY); newEvent->eventStructType = NS_SVGZOOM_EVENT; break; } -#endif // MOZ_SVG #ifdef MOZ_SMIL case NS_SMIL_TIME_EVENT: { newEvent = new nsUIEvent(PR_FALSE, msg, 0); NS_ENSURE_TRUE(newEvent, NS_ERROR_OUT_OF_MEMORY); newEvent->eventStructType = NS_SMIL_TIME_EVENT; break; } @@ -1262,32 +1258,30 @@ const char* nsDOMEvent::GetEventName(PRU case NS_CUT: return sEventNames[eDOMEvents_cut]; case NS_PASTE: return sEventNames[eDOMEvents_paste]; case NS_OPEN: return sEventNames[eDOMEvents_open]; case NS_MESSAGE: return sEventNames[eDOMEvents_message]; -#ifdef MOZ_SVG case NS_SVG_LOAD: return sEventNames[eDOMEvents_SVGLoad]; case NS_SVG_UNLOAD: return sEventNames[eDOMEvents_SVGUnload]; case NS_SVG_ABORT: return sEventNames[eDOMEvents_SVGAbort]; case NS_SVG_ERROR: return sEventNames[eDOMEvents_SVGError]; case NS_SVG_RESIZE: return sEventNames[eDOMEvents_SVGResize]; case NS_SVG_SCROLL: return sEventNames[eDOMEvents_SVGScroll]; case NS_SVG_ZOOM: return sEventNames[eDOMEvents_SVGZoom]; -#endif // MOZ_SVG #ifdef MOZ_SMIL case NS_SMIL_BEGIN: return sEventNames[eDOMEvents_beginEvent]; case NS_SMIL_END: return sEventNames[eDOMEvents_endEvent]; case NS_SMIL_REPEAT: return sEventNames[eDOMEvents_repeatEvent]; #endif // MOZ_SMIL
--- a/content/events/src/nsDOMEvent.h +++ b/content/events/src/nsDOMEvent.h @@ -133,25 +133,23 @@ public: eDOMEvents_MozMousePixelScroll, eDOMEvents_offline, eDOMEvents_online, eDOMEvents_copy, eDOMEvents_cut, eDOMEvents_paste, eDOMEvents_open, eDOMEvents_message, -#ifdef MOZ_SVG eDOMEvents_SVGLoad, eDOMEvents_SVGUnload, eDOMEvents_SVGAbort, eDOMEvents_SVGError, eDOMEvents_SVGResize, eDOMEvents_SVGScroll, eDOMEvents_SVGZoom, -#endif // MOZ_SVG #ifdef MOZ_SMIL eDOMEvents_beginEvent, eDOMEvents_endEvent, eDOMEvents_repeatEvent, #endif // MOZ_SMIL #ifdef MOZ_MEDIA eDOMEvents_loadstart, eDOMEvents_progress,
--- a/content/events/src/nsEventDispatcher.cpp +++ b/content/events/src/nsEventDispatcher.cpp @@ -750,24 +750,22 @@ nsEventDispatcher::CreateEvent(nsPresCon return NS_NewDOMMouseScrollEvent(aDOMEvent, aPresContext, static_cast<nsInputEvent*>(aEvent)); case NS_DRAG_EVENT: return NS_NewDOMDragEvent(aDOMEvent, aPresContext, static_cast<nsDragEvent*>(aEvent)); case NS_TEXT_EVENT: return NS_NewDOMTextEvent(aDOMEvent, aPresContext, static_cast<nsTextEvent*>(aEvent)); -#ifdef MOZ_SVG case NS_SVG_EVENT: return NS_NewDOMSVGEvent(aDOMEvent, aPresContext, aEvent); case NS_SVGZOOM_EVENT: return NS_NewDOMSVGZoomEvent(aDOMEvent, aPresContext, static_cast<nsGUIEvent*>(aEvent)); -#endif // MOZ_SVG #ifdef MOZ_SMIL case NS_SMIL_TIME_EVENT: return NS_NewDOMTimeEvent(aDOMEvent, aPresContext, aEvent); #endif // MOZ_SMIL case NS_COMMAND_EVENT: return NS_NewDOMCommandEvent(aDOMEvent, aPresContext, static_cast<nsCommandEvent*>(aEvent)); @@ -817,24 +815,22 @@ nsEventDispatcher::CreateEvent(nsPresCon return NS_NewDOMDeviceOrientationEvent(aDOMEvent, aPresContext, nsnull); if (aEventType.LowerCaseEqualsLiteral("uievent") || aEventType.LowerCaseEqualsLiteral("uievents")) return NS_NewDOMUIEvent(aDOMEvent, aPresContext, nsnull); if (aEventType.LowerCaseEqualsLiteral("event") || aEventType.LowerCaseEqualsLiteral("events") || aEventType.LowerCaseEqualsLiteral("htmlevents")) return NS_NewDOMEvent(aDOMEvent, aPresContext, nsnull); -#ifdef MOZ_SVG if (aEventType.LowerCaseEqualsLiteral("svgevent") || aEventType.LowerCaseEqualsLiteral("svgevents")) return NS_NewDOMSVGEvent(aDOMEvent, aPresContext, nsnull); if (aEventType.LowerCaseEqualsLiteral("svgzoomevent") || aEventType.LowerCaseEqualsLiteral("svgzoomevents")) return NS_NewDOMSVGZoomEvent(aDOMEvent, aPresContext, nsnull); -#endif // MOZ_SVG #ifdef MOZ_SMIL if (aEventType.LowerCaseEqualsLiteral("timeevent") || aEventType.LowerCaseEqualsLiteral("timeevents")) return NS_NewDOMTimeEvent(aDOMEvent, aPresContext, nsnull); #endif // MOZ_SMIL if (aEventType.LowerCaseEqualsLiteral("xulcommandevent") || aEventType.LowerCaseEqualsLiteral("xulcommandevents")) return NS_NewDOMXULCommandEvent(aDOMEvent, aPresContext, nsnull);
--- a/content/events/src/nsEventListenerManager.cpp +++ b/content/events/src/nsEventListenerManager.cpp @@ -48,19 +48,17 @@ #include "nsIDOMKeyListener.h" #include "nsIDOMFocusListener.h" #include "nsIDOMFormListener.h" #include "nsIDOMLoadListener.h" #include "nsIDOMTextListener.h" #include "nsIDOMCompositionListener.h" #include "nsIDOMUIListener.h" #include "nsITextControlFrame.h" -#ifdef MOZ_SVG #include "nsGkAtoms.h" -#endif // MOZ_SVG #include "nsPIDOMWindow.h" #include "nsIPrivateDOMEvent.h" #include "nsIJSEventListener.h" #include "prmem.h" #include "nsIScriptGlobalObject.h" #include "nsIScriptRuntime.h" #include "nsLayoutUtils.h" #include "nsINameSpaceManager.h" @@ -1000,32 +998,30 @@ nsEventListenerManager::CompileEventHand // XXX I don't like that we have to reference content // from here. The alternative is to store the event handler // string on the JS object itself. nsCOMPtr<nsIContent> content = do_QueryInterface(aObject); NS_ASSERTION(content, "only content should have event handler attributes"); if (content) { nsAutoString handlerBody; nsIAtom* attrName = aName; -#ifdef MOZ_SVG if (aName == nsGkAtoms::onSVGLoad) attrName = nsGkAtoms::onload; else if (aName == nsGkAtoms::onSVGUnload) attrName = nsGkAtoms::onunload; else if (aName == nsGkAtoms::onSVGAbort) attrName = nsGkAtoms::onabort; else if (aName == nsGkAtoms::onSVGError) attrName = nsGkAtoms::onerror; else if (aName == nsGkAtoms::onSVGResize) attrName = nsGkAtoms::onresize; else if (aName == nsGkAtoms::onSVGScroll) attrName = nsGkAtoms::onscroll; else if (aName == nsGkAtoms::onSVGZoom) attrName = nsGkAtoms::onzoom; -#endif // MOZ_SVG #ifdef MOZ_SMIL else if (aName == nsGkAtoms::onbeginEvent) attrName = nsGkAtoms::onbegin; else if (aName == nsGkAtoms::onrepeatEvent) attrName = nsGkAtoms::onrepeat; else if (aName == nsGkAtoms::onendEvent) attrName = nsGkAtoms::onend; #endif // MOZ_SMIL
--- a/content/html/content/src/nsHTMLIFrameElement.cpp +++ b/content/html/content/src/nsHTMLIFrameElement.cpp @@ -32,34 +32,30 @@ * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #include "nsIDOMHTMLIFrameElement.h" #include "nsGenericHTMLElement.h" #include "nsIDOMDocument.h" -#ifdef MOZ_SVG #include "nsIDOMGetSVGDocument.h" #include "nsIDOMSVGDocument.h" -#endif #include "nsGkAtoms.h" #include "nsIDocument.h" #include "nsMappedAttributes.h" #include "nsDOMError.h" #include "nsRuleData.h" #include "nsStyleConsts.h" using namespace mozilla::dom; class nsHTMLIFrameElement : public nsGenericHTMLFrameElement , public nsIDOMHTMLIFrameElement -#ifdef MOZ_SVG , public nsIDOMGetSVGDocument -#endif { public: nsHTMLIFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo, mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER); virtual ~nsHTMLIFrameElement(); // nsISupports NS_DECL_ISUPPORTS_INHERITED @@ -71,20 +67,18 @@ public: NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLFrameElement::) // nsIDOMHTMLElement NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLFrameElement::) // nsIDOMHTMLIFrameElement NS_DECL_NSIDOMHTMLIFRAMEELEMENT -#ifdef MOZ_SVG // nsIDOMGetSVGDocument NS_DECL_NSIDOMGETSVGDOCUMENT -#endif // nsIContent virtual PRBool ParseAttribute(PRInt32 aNamespaceID, nsIAtom* aAttribute, const nsAString& aValue, nsAttrValue& aResult); NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* aAttribute) const; virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const; @@ -112,19 +106,17 @@ NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameEle NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameElement,nsGenericElement) DOMCI_NODE_DATA(HTMLIFrameElement, nsHTMLIFrameElement) // QueryInterface implementation for nsHTMLIFrameElement NS_INTERFACE_TABLE_HEAD(nsHTMLIFrameElement) NS_HTML_CONTENT_INTERFACE_TABLE_BEGIN(nsHTMLIFrameElement) NS_INTERFACE_TABLE_ENTRY(nsHTMLIFrameElement, nsIDOMHTMLIFrameElement) -#ifdef MOZ_SVG NS_INTERFACE_TABLE_ENTRY(nsHTMLIFrameElement, nsIDOMGetSVGDocument) -#endif NS_OFFSET_AND_INTERFACE_TABLE_END NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLIFrameElement, nsGenericHTMLFrameElement) NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLIFrameElement) NS_IMPL_ELEMENT_CLONE(nsHTMLIFrameElement) @@ -141,23 +133,21 @@ NS_IMPL_URI_ATTR(nsHTMLIFrameElement, Sr NS_IMPL_STRING_ATTR(nsHTMLIFrameElement, Width, width) NS_IMETHODIMP nsHTMLIFrameElement::GetContentDocument(nsIDOMDocument** aContentDocument) { return nsGenericHTMLFrameElement::GetContentDocument(aContentDocument); } -#ifdef MOZ_SVG NS_IMETHODIMP nsHTMLIFrameElement::GetSVGDocument(nsIDOMDocument **aResult) { return GetContentDocument(aResult); } -#endif PRBool nsHTMLIFrameElement::ParseAttribute(PRInt32 aNamespaceID, nsIAtom* aAttribute, const nsAString& aValue, nsAttrValue& aResult) { if (aNamespaceID == kNameSpaceID_None) {
--- a/content/html/content/src/nsHTMLObjectElement.cpp +++ b/content/html/content/src/nsHTMLObjectElement.cpp @@ -38,35 +38,31 @@ #include "nsAutoPtr.h" #include "nsGenericHTMLElement.h" #include "nsObjectLoadingContent.h" #include "nsGkAtoms.h" #include "nsDOMError.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" -#ifdef MOZ_SVG #include "nsIDOMSVGDocument.h" #include "nsIDOMGetSVGDocument.h" -#endif #include "nsIDOMHTMLObjectElement.h" #include "nsFormSubmission.h" #include "nsIObjectFrame.h" #include "nsNPAPIPluginInstance.h" #include "nsIConstraintValidation.h" using namespace mozilla::dom; class nsHTMLObjectElement : public nsGenericHTMLFormElement , public nsObjectLoadingContent , public nsIDOMHTMLObjectElement , public nsIConstraintValidation -#ifdef MOZ_SVG , public nsIDOMGetSVGDocument -#endif { public: using nsIConstraintValidation::GetValidationMessage; nsHTMLObjectElement(already_AddRefed<nsINodeInfo> aNodeInfo, mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER); virtual ~nsHTMLObjectElement(); @@ -80,20 +76,18 @@ public: NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLFormElement::) // nsIDOMHTMLElement NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLFormElement::) // nsIDOMHTMLObjectElement NS_DECL_NSIDOMHTMLOBJECTELEMENT -#ifdef MOZ_SVG // nsIDOMGetSVGDocument NS_DECL_NSIDOMGETSVGDOCUMENT -#endif virtual nsresult BindToTree(nsIDocument *aDocument, nsIContent *aParent, nsIContent *aBindingParent, PRBool aCompileEventHandlers); virtual void UnbindFromTree(PRBool aDeep = PR_TRUE, PRBool aNullParent = PR_TRUE); virtual nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom *aName, nsIAtom *aPrefix, const nsAString &aValue, @@ -215,19 +209,17 @@ NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION NS_INTERFACE_TABLE_ENTRY(nsHTMLObjectElement, nsIStreamListener) NS_INTERFACE_TABLE_ENTRY(nsHTMLObjectElement, nsIFrameLoaderOwner) NS_INTERFACE_TABLE_ENTRY(nsHTMLObjectElement, nsIObjectLoadingContent) NS_INTERFACE_TABLE_ENTRY(nsHTMLObjectElement, nsIImageLoadingContent) NS_INTERFACE_TABLE_ENTRY(nsHTMLObjectElement, imgIContainerObserver) NS_INTERFACE_TABLE_ENTRY(nsHTMLObjectElement, nsIInterfaceRequestor) NS_INTERFACE_TABLE_ENTRY(nsHTMLObjectElement, nsIChannelEventSink) NS_INTERFACE_TABLE_ENTRY(nsHTMLObjectElement, nsIConstraintValidation) -#ifdef MOZ_SVG NS_INTERFACE_TABLE_ENTRY(nsHTMLObjectElement, nsIDOMGetSVGDocument) -#endif NS_OFFSET_AND_INTERFACE_TABLE_END NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(nsHTMLObjectElement, nsGenericHTMLFormElement) NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLObjectElement) NS_IMPL_ELEMENT_CLONE(nsHTMLObjectElement) // nsIConstraintValidation @@ -443,23 +435,21 @@ nsHTMLObjectElement::GetContentDocument( nsIDocument *sub_doc = GetOwnerDoc()->GetSubDocumentFor(this); if (!sub_doc) { return NS_OK; } return CallQueryInterface(sub_doc, aContentDocument); } -#ifdef MOZ_SVG NS_IMETHODIMP nsHTMLObjectElement::GetSVGDocument(nsIDOMDocument **aResult) { return GetContentDocument(aResult); } -#endif PRBool nsHTMLObjectElement::ParseAttribute(PRInt32 aNamespaceID, nsIAtom *aAttribute, const nsAString &aValue, nsAttrValue &aResult) { if (aNamespaceID == kNameSpaceID_None) {
--- a/content/html/content/src/nsHTMLSharedObjectElement.cpp +++ b/content/html/content/src/nsHTMLSharedObjectElement.cpp @@ -40,37 +40,33 @@ #include "nsObjectLoadingContent.h" #include "nsGkAtoms.h" #include "nsDOMError.h" #include "nsIDocument.h" #include "nsIDOMDocument.h" #include "nsIDOMHTMLAppletElement.h" #include "nsIDOMHTMLEmbedElement.h" #include "nsThreadUtils.h" -#ifdef MOZ_SVG #include "nsIDOMGetSVGDocument.h" #include "nsIDOMSVGDocument.h" -#endif // XXX this is to get around conflicts with windows.h defines // introduced through jni.h #ifdef XP_WIN #undef GetClassName #undef GetObject #endif using namespace mozilla::dom; class nsHTMLSharedObjectElement : public nsGenericHTMLElement , public nsObjectLoadingContent , public nsIDOMHTMLAppletElement , public nsIDOMHTMLEmbedElement -#ifdef MOZ_SVG , public nsIDOMGetSVGDocument -#endif { public: nsHTMLSharedObjectElement(already_AddRefed<nsINodeInfo> aNodeInfo, mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER); virtual ~nsHTMLSharedObjectElement(); // nsISupports NS_DECL_ISUPPORTS_INHERITED @@ -91,20 +87,18 @@ public: // NS_DECL_NSIDOMHTMLAPPLETELEMENT. // nsIDOMHTMLEmbedElement NS_IMETHOD GetSrc(nsAString &aSrc); NS_IMETHOD SetSrc(const nsAString &aSrc); NS_IMETHOD GetType(nsAString &aType); NS_IMETHOD SetType(const nsAString &aType); -#ifdef MOZ_SVG // nsIDOMGetSVGDocument NS_DECL_NSIDOMGETSVGDOCUMENT -#endif virtual nsresult BindToTree(nsIDocument *aDocument, nsIContent *aParent, nsIContent *aBindingParent, PRBool aCompileEventHandlers); virtual void UnbindFromTree(PRBool aDeep = PR_TRUE, PRBool aNullParent = PR_TRUE); virtual nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom *aName, nsIAtom *aPrefix, const nsAString &aValue, @@ -253,19 +247,17 @@ NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION NS_INTERFACE_TABLE_ENTRY(nsHTMLSharedObjectElement, nsIInterfaceRequestor) NS_INTERFACE_TABLE_ENTRY(nsHTMLSharedObjectElement, nsIChannelEventSink) NS_OFFSET_AND_INTERFACE_TABLE_END NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE_AMBIGUOUS(nsHTMLSharedObjectElement, nsGenericHTMLElement, nsIDOMHTMLAppletElement) NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLAppletElement, applet) NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMHTMLEmbedElement, embed) -#ifdef MOZ_SVG NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIDOMGetSVGDocument, embed) -#endif NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO_GETTER(GetClassInfoInternal) NS_HTML_CONTENT_INTERFACE_MAP_END NS_IMPL_ELEMENT_CLONE(nsHTMLSharedObjectElement) nsresult nsHTMLSharedObjectElement::BindToTree(nsIDocument *aDocument, nsIContent *aParent, @@ -363,17 +355,16 @@ NS_IMPL_INT_ATTR(nsHTMLSharedObjectEleme NS_IMPL_STRING_ATTR(nsHTMLSharedObjectElement, Name, name) NS_IMPL_URI_ATTR_WITH_BASE(nsHTMLSharedObjectElement, Object, object, codebase) NS_IMPL_URI_ATTR(nsHTMLSharedObjectElement, Src, src) NS_IMPL_INT_ATTR_DEFAULT_VALUE(nsHTMLSharedObjectElement, TabIndex, tabindex, -1) NS_IMPL_STRING_ATTR(nsHTMLSharedObjectElement, Type, type) NS_IMPL_INT_ATTR(nsHTMLSharedObjectElement, Vspace, vspace) NS_IMPL_STRING_ATTR(nsHTMLSharedObjectElement, Width, width) -#ifdef MOZ_SVG NS_IMETHODIMP nsHTMLSharedObjectElement::GetSVGDocument(nsIDOMDocument **aResult) { NS_ENSURE_ARG_POINTER(aResult); *aResult = nsnull; if (!IsInDoc()) { @@ -383,17 +374,16 @@ nsHTMLSharedObjectElement::GetSVGDocumen // XXXbz should this use GetCurrentDoc()? sXBL/XBL2 issue! nsIDocument *sub_doc = GetOwnerDoc()->GetSubDocumentFor(this); if (!sub_doc) { return NS_OK; } return CallQueryInterface(sub_doc, aResult); } -#endif PRBool nsHTMLSharedObjectElement::ParseAttribute(PRInt32 aNamespaceID, nsIAtom *aAttribute, const nsAString &aValue, nsAttrValue &aResult) { if (aNamespaceID == kNameSpaceID_None) { @@ -484,21 +474,17 @@ nsHTMLSharedObjectElement::IntrinsicStat return nsGenericHTMLElement::IntrinsicState() | ObjectState(); } PRUint32 nsHTMLSharedObjectElement::GetCapabilities() const { PRUint32 capabilities = eSupportPlugins | eOverrideServerType; if (mNodeInfo->Equals(nsGkAtoms::embed)) { - capabilities |= -#ifdef MOZ_SVG - eSupportSVG | -#endif - eSupportImages; + capabilities |= eSupportSVG | eSupportImages; } return capabilities; } void nsHTMLSharedObjectElement::DestroyContent() {
--- a/content/media/nsMediaDecoder.cpp +++ b/content/media/nsMediaDecoder.cpp @@ -46,19 +46,17 @@ #include "nsThreadUtils.h" #include "nsIDOMHTMLMediaElement.h" #include "nsNetUtil.h" #include "nsHTMLMediaElement.h" #include "gfxContext.h" #include "nsPresContext.h" #include "nsDOMError.h" #include "nsDisplayList.h" -#ifdef MOZ_SVG #include "nsSVGEffects.h" -#endif using namespace mozilla; // Number of milliseconds between progress events as defined by spec #define PROGRESS_MS 350 // Number of milliseconds of no data before a stall event is fired as defined by spec #define STALL_MS 3000 @@ -172,19 +170,17 @@ void nsMediaDecoder::Invalidate() nsRect contentRect = frame->GetContentRect() - frame->GetPosition(); if (invalidateFrame) { frame->Invalidate(contentRect); } else { frame->InvalidateLayer(contentRect, nsDisplayItem::TYPE_VIDEO); } } -#ifdef MOZ_SVG nsSVGEffects::InvalidateDirectRenderingObservers(mElement); -#endif } static void ProgressCallback(nsITimer* aTimer, void* aClosure) { nsMediaDecoder* decoder = static_cast<nsMediaDecoder*>(aClosure); decoder->Progress(PR_TRUE); }
--- a/content/xbl/src/nsXBLService.cpp +++ b/content/xbl/src/nsXBLService.cpp @@ -160,22 +160,20 @@ PRBool CheckTagNameWhiteList(PRInt32 aNa PRUint32 i; if (aNameSpaceID == kNameSpaceID_XUL) { for (i = 0; kValidXULTagNames[i]; ++i) { if (aTagName == *(kValidXULTagNames[i])) { return PR_TRUE; } } } -#ifdef MOZ_SVG else if (aNameSpaceID == kNameSpaceID_SVG && aTagName == nsGkAtoms::generic) { return PR_TRUE; } -#endif return PR_FALSE; } // Individual binding requests. class nsXBLBindingRequest { public:
--- a/content/xml/document/src/nsXMLContentSink.cpp +++ b/content/xml/document/src/nsXMLContentSink.cpp @@ -91,20 +91,17 @@ #include "nsContentPolicyUtils.h" #include "nsContentErrors.h" #include "nsIDOMProcessingInstruction.h" #include "nsNodeUtils.h" #include "nsIScriptGlobalObject.h" #include "nsIHTMLDocument.h" #include "mozAutoDocUpdate.h" #include "nsMimeTypes.h" - -#ifdef MOZ_SVG #include "nsHtml5SVGLoadDispatcher.h" -#endif using namespace mozilla::dom; // XXX Open Issues: // 1) what's not allowed - We need to figure out which HTML tags // (prefixed with a HTML namespace qualifier) are explicitly not // allowed (if any). // 2) factoring code with nsHTMLContentSink - There's some amount of @@ -502,19 +499,17 @@ nsXMLContentSink::CreateElement(const PR nsCOMPtr<nsINodeInfo> ni = aNodeInfo; nsCOMPtr<nsIContent> content; rv = NS_NewElement(getter_AddRefs(content), aNodeInfo->NamespaceID(), ni.forget(), aFromParser); NS_ENSURE_SUCCESS(rv, rv); if (aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XHTML) -#ifdef MOZ_SVG || aNodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_SVG) -#endif ) { nsCOMPtr<nsIScriptElement> sele = do_QueryInterface(content); sele->SetScriptLineNumber(aLineNumber); sele->SetCreatorParser(mParser); mConstrainSize = PR_FALSE; } // XHTML needs some special attention @@ -591,19 +586,17 @@ nsXMLContentSink::CloseElement(nsIConten if (!nodeInfo->NamespaceEquals(kNameSpaceID_XHTML) && !nodeInfo->NamespaceEquals(kNameSpaceID_SVG)) { return NS_OK; } nsresult rv = NS_OK; if (nodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_XHTML) -#ifdef MOZ_SVG || nodeInfo->Equals(nsGkAtoms::script, kNameSpaceID_SVG) -#endif ) { mConstrainSize = PR_TRUE; // Now tell the script that it's ready to go. This may execute the script // or return NS_ERROR_HTMLPARSER_BLOCK. Or neither if the script doesn't // need executing. rv = aContent->DoneAddingChildren(PR_TRUE); @@ -1153,26 +1146,24 @@ nsXMLContentSink::HandleEndElement(const if (mNotifyLevel >= stackLen) { if (numFlushed < content->GetChildCount()) { NotifyAppend(content, numFlushed); } mNotifyLevel = stackLen - 1; } DidAddContent(); -#ifdef MOZ_SVG if (content->GetNameSpaceID() == kNameSpaceID_SVG && content->Tag() == nsGkAtoms::svg) { FlushTags(); nsCOMPtr<nsIRunnable> event = new nsHtml5SVGLoadDispatcher(content); if (NS_FAILED(NS_DispatchToMainThread(event))) { NS_WARNING("failed to dispatch svg load dispatcher"); } } -#endif return aInterruptable && NS_SUCCEEDED(result) ? DidProcessATokenImpl() : result; } NS_IMETHODIMP nsXMLContentSink::HandleComment(const PRUnichar *aName) {
--- a/content/xml/document/src/nsXMLDocument.cpp +++ b/content/xml/document/src/nsXMLDocument.cpp @@ -135,21 +135,19 @@ NS_NewDOMDocument(nsIDOMDocument** aInst isHTML = PR_TRUE; } else if (publicId.EqualsLiteral("-//W3C//DTD XHTML 1.0 Strict//EN") || publicId.EqualsLiteral("-//W3C//DTD XHTML 1.0 Transitional//EN") || publicId.EqualsLiteral("-//W3C//DTD XHTML 1.0 Frameset//EN")) { rv = NS_NewHTMLDocument(getter_AddRefs(d)); isHTML = PR_TRUE; isXHTML = PR_TRUE; } -#ifdef MOZ_SVG else if (publicId.EqualsLiteral("-//W3C//DTD SVG 1.1//EN")) { rv = NS_NewSVGDocument(getter_AddRefs(d)); } -#endif // XXX Add support for XUL documents. else { rv = NS_NewXMLDocument(getter_AddRefs(d)); } } else { rv = NS_NewXMLDocument(getter_AddRefs(d)); }
--- a/dom/Makefile.in +++ b/dom/Makefile.in @@ -59,22 +59,19 @@ DIRS = \ interfaces/load-save \ interfaces/xul \ interfaces/storage \ interfaces/json \ interfaces/offline \ interfaces/geolocation \ interfaces/threads \ interfaces/notification \ + interfaces/svg \ $(NULL) -ifdef MOZ_SVG -DIRS += interfaces/svg -endif - ifdef MOZ_SMIL DIRS += interfaces/smil endif DIRS += \ public/coreEvents \ base \ src \
--- a/dom/base/domerr.msg +++ b/dom/base/domerr.msg @@ -66,21 +66,19 @@ DOM_MSG_DEF(NS_ERROR_DOM_RANGE_INVALID_N /* DOM error codes from http://www.w3.org/TR/DOM-Level-3/ */ DOM_MSG_DEF(NS_ERROR_DOM_VALIDATION_ERR, "A call to a method would make the Node invalid with respect to \"partial validity\", so the operation was not done") DOM_MSG_DEF(NS_ERROR_DOM_TYPE_MISMATCH_ERR, "The type of an object is incompatible with the expected type of the parameter associated to the object") /* SVG DOM error codes from http://www.w3.org/TR/SVG11/svgdom.html */ -#ifdef MOZ_SVG DOM_MSG_DEF(NS_ERROR_DOM_SVG_WRONG_TYPE_ERR, "Unknown or invalid type") DOM_MSG_DEF(NS_ERROR_DOM_SVG_INVALID_VALUE_ERR, "One of the parameters has an invalid value") DOM_MSG_DEF(NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE, "The matrix could not be computed") -#endif /* DOM error codes from http://www.w3.org/TR/DOM-Level-3-XPath/ */ DOM_MSG_DEF(NS_ERROR_DOM_INVALID_EXPRESSION_ERR, "The expression is not a legal expression.") DOM_MSG_DEF(NS_ERROR_DOM_TYPE_ERR, "The expression cannot be converted to return the specified type.") /* HTML5 error codes http://dev.w3.org/html5/spec/Overview.html */
--- a/dom/base/nsDOMClassInfoClasses.h +++ b/dom/base/nsDOMClassInfoClasses.h @@ -220,17 +220,16 @@ DOMCI_CLASS(NameList) DOMCI_CLASS(TreeColumn) DOMCI_CLASS(TreeColumns) #endif DOMCI_CLASS(CSSMozDocumentRule) DOMCI_CLASS(BeforeUnloadEvent) -#ifdef MOZ_SVG // The SVG document DOMCI_CLASS(SVGDocument) // SVG element classes DOMCI_CLASS(SVGAElement) DOMCI_CLASS(SVGAltGlyphElement) #ifdef MOZ_SMIL DOMCI_CLASS(SVGAnimateElement) @@ -338,17 +337,16 @@ DOMCI_CLASS(SVGPathSegMovetoAbs) DOMCI_CLASS(SVGPathSegMovetoRel) DOMCI_CLASS(SVGPoint) DOMCI_CLASS(SVGPointList) DOMCI_CLASS(SVGPreserveAspectRatio) DOMCI_CLASS(SVGRect) DOMCI_CLASS(SVGTransform) DOMCI_CLASS(SVGTransformList) DOMCI_CLASS(SVGZoomEvent) -#endif // MOZ_SVG // Canvas DOMCI_CLASS(HTMLCanvasElement) DOMCI_CLASS(CanvasRenderingContext2D) DOMCI_CLASS(CanvasGradient) DOMCI_CLASS(CanvasPattern) DOMCI_CLASS(TextMetrics) @@ -388,19 +386,17 @@ DOMCI_CLASS(XMLHttpProgressEvent) DOMCI_CLASS(XMLHttpRequest) // Server-sent events DOMCI_CLASS(EventSource) DOMCI_CLASS(ClientRect) DOMCI_CLASS(ClientRectList) -#ifdef MOZ_SVG DOMCI_CLASS(SVGForeignObjectElement) -#endif DOMCI_CLASS(XULCommandEvent) DOMCI_CLASS(CommandEvent) DOMCI_CLASS(OfflineResourceList) DOMCI_CLASS(FileList) DOMCI_CLASS(Blob) DOMCI_CLASS(File)
--- a/dom/base/nsDOMError.h +++ b/dom/base/nsDOMError.h @@ -74,21 +74,19 @@ /* DOM error codes from http://www.w3.org/TR/DOM-Level-2/range.html */ #define NS_ERROR_DOM_RANGE_BAD_BOUNDARYPOINTS_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_RANGE, 1) #define NS_ERROR_DOM_RANGE_INVALID_NODE_TYPE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_RANGE, 2) /* SVG DOM error codes from http://www.w3.org/TR/SVG11/svgdom.html */ -#ifdef MOZ_SVG #define NS_ERROR_DOM_SVG_WRONG_TYPE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SVG,0) #define NS_ERROR_DOM_SVG_INVALID_VALUE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SVG,1) #define NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SVG,2) -#endif /* DOM error codes from http://www.w3.org/TR/DOM-Level-3-XPath/ */ #define NS_ERROR_DOM_INVALID_EXPRESSION_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_XPATH, 51) #define NS_ERROR_DOM_TYPE_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_XPATH, 52) /* IndexedDB error codes http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html */
--- a/dom/base/nsDOMException.cpp +++ b/dom/base/nsDOMException.cpp @@ -39,19 +39,17 @@ #include "nsCOMPtr.h" #include "nsCRTGlue.h" #include "nsDOMClassInfo.h" #include "nsDOMError.h" #include "nsDOMException.h" #include "nsIDOMDOMException.h" #include "nsIDOMRangeException.h" #include "nsIDOMFileException.h" -#ifdef MOZ_SVG #include "nsIDOMSVGException.h" -#endif #include "nsIDOMXPathException.h" #include "nsIIDBDatabaseException.h" #include "nsString.h" #include "prprf.h" #include "nsIDOMEventException.h" #define DOM_MSG_DEF(val, message) {(val), #val, message}, @@ -180,34 +178,32 @@ nsRangeException::GetCode(PRUint16* aCod NS_ENSURE_ARG_POINTER(aCode); nsresult result; GetResult(&result); *aCode = NS_ERROR_GET_CODE(result); return NS_OK; } -#ifdef MOZ_SVG IMPL_INTERNAL_DOM_EXCEPTION_HEAD(nsSVGException, nsIDOMSVGException) NS_DECL_NSIDOMSVGEXCEPTION IMPL_INTERNAL_DOM_EXCEPTION_TAIL(nsSVGException, nsIDOMSVGException, SVGException, NS_ERROR_MODULE_SVG, NSResultToNameAndMessage) NS_IMETHODIMP nsSVGException::GetCode(PRUint16* aCode) { NS_ENSURE_ARG_POINTER(aCode); nsresult result; GetResult(&result); *aCode = NS_ERROR_GET_CODE(result); return NS_OK; } -#endif // MOZ_SVG IMPL_INTERNAL_DOM_EXCEPTION_HEAD(nsXPathException, nsIDOMXPathException) NS_DECL_NSIDOMXPATHEXCEPTION IMPL_INTERNAL_DOM_EXCEPTION_TAIL(nsXPathException, nsIDOMXPathException, XPathException, NS_ERROR_MODULE_DOM_XPATH, NSResultToNameAndMessage) NS_IMETHODIMP
--- a/dom/base/nsDOMException.h +++ b/dom/base/nsDOMException.h @@ -68,15 +68,13 @@ NS_GetNameAndMessageForDOMNSResult(nsres #define DECL_INTERNAL_DOM_EXCEPTION(domname) \ nsresult \ NS_New##domname(nsresult aNSResult, nsIException* aDefaultException, \ nsIException** aException); DECL_INTERNAL_DOM_EXCEPTION(DOMException) DECL_INTERNAL_DOM_EXCEPTION(RangeException) -#ifdef MOZ_SVG DECL_INTERNAL_DOM_EXCEPTION(SVGException) -#endif DECL_INTERNAL_DOM_EXCEPTION(XPathException) DECL_INTERNAL_DOM_EXCEPTION(FileException) DECL_INTERNAL_DOM_EXCEPTION(EventException) DECL_INTERNAL_DOM_EXCEPTION(IDBDatabaseException)
--- a/dom/base/nsDOMScriptObjectFactory.cpp +++ b/dom/base/nsDOMScriptObjectFactory.cpp @@ -83,19 +83,17 @@ nsDOMScriptObjectFactory::nsDOMScriptObj nsCOMPtr<nsIExceptionProvider> provider(new nsDOMExceptionProvider()); if (provider) { nsCOMPtr<nsIExceptionService> xs = do_GetService(NS_EXCEPTIONSERVICE_CONTRACTID); if (xs) { xs->RegisterExceptionProvider(provider, NS_ERROR_MODULE_DOM); xs->RegisterExceptionProvider(provider, NS_ERROR_MODULE_DOM_RANGE); -#ifdef MOZ_SVG xs->RegisterExceptionProvider(provider, NS_ERROR_MODULE_SVG); -#endif xs->RegisterExceptionProvider(provider, NS_ERROR_MODULE_DOM_XPATH); xs->RegisterExceptionProvider(provider, NS_ERROR_MODULE_DOM_INDEXEDDB); xs->RegisterExceptionProvider(provider, NS_ERROR_MODULE_XPCONNECT); xs->RegisterExceptionProvider(provider, NS_ERROR_MODULE_DOM_EVENTS); } NS_ASSERTION(!gExceptionProvider, "Registered twice?!"); provider.swap(gExceptionProvider); @@ -286,20 +284,18 @@ nsDOMScriptObjectFactory::Observe(nsISup nsCOMPtr<nsIExceptionService> xs = do_GetService(NS_EXCEPTIONSERVICE_CONTRACTID); if (xs) { xs->UnregisterExceptionProvider(gExceptionProvider, NS_ERROR_MODULE_DOM); xs->UnregisterExceptionProvider(gExceptionProvider, NS_ERROR_MODULE_DOM_RANGE); -#ifdef MOZ_SVG xs->UnregisterExceptionProvider(gExceptionProvider, NS_ERROR_MODULE_SVG); -#endif xs->UnregisterExceptionProvider(gExceptionProvider, NS_ERROR_MODULE_DOM_XPATH); xs->UnregisterExceptionProvider(gExceptionProvider, NS_ERROR_MODULE_XPCONNECT); xs->UnregisterExceptionProvider(gExceptionProvider, NS_ERROR_MODULE_DOM_EVENTS); } @@ -387,20 +383,18 @@ nsDOMExceptionProvider::GetException(nsr if (!NS_IsMainThread()) { return NS_ERROR_NOT_IMPLEMENTED; } switch (NS_ERROR_GET_MODULE(result)) { case NS_ERROR_MODULE_DOM_RANGE: return NS_NewRangeException(result, aDefaultException, _retval); -#ifdef MOZ_SVG case NS_ERROR_MODULE_SVG: return NS_NewSVGException(result, aDefaultException, _retval); -#endif case NS_ERROR_MODULE_DOM_XPATH: return NS_NewXPathException(result, aDefaultException, _retval); case NS_ERROR_MODULE_XPCONNECT: return CreateXPConnectException(result, aDefaultException, _retval); case NS_ERROR_MODULE_DOM_FILE: return NS_NewFileException(result, aDefaultException, _retval); case NS_ERROR_MODULE_DOM_INDEXEDDB: return NS_NewIDBDatabaseException(result, aDefaultException, _retval);
--- a/dom/locales/jar.mn +++ b/dom/locales/jar.mn @@ -11,19 +11,17 @@ locale/@AB_CD@/global/global.dtd (%chrome/global.dtd) locale/@AB_CD@/global/appstrings.properties (%chrome/appstrings.properties) locale/@AB_CD@/global/charsetTitles.properties (%chrome/charsetTitles.properties) locale/@AB_CD@/global/global-strres.properties (%chrome/global-strres.properties) locale/@AB_CD@/global/plugins.properties (%chrome/plugins.properties) locale/@AB_CD@/global/nsWebBrowserPersist.properties (%chrome/nsWebBrowserPersist.properties) locale/@AB_CD@/global/xslt/xslt.properties (%chrome/xslt/xslt.properties) locale/@AB_CD@/global/dom/dom.properties (%chrome/dom/dom.properties) -#ifdef MOZ_SVG locale/@AB_CD@/global/svg/svg.properties (%chrome/svg/svg.properties) -#endif locale/@AB_CD@/global/layout/MediaDocument.properties (%chrome/layout/MediaDocument.properties) locale/@AB_CD@/global/layout/xmlparser.properties (%chrome/layout/xmlparser.properties) locale/@AB_CD@/global/layout/HtmlForm.properties (%chrome/layout/HtmlForm.properties) locale/@AB_CD@/global/security/caps.properties (%chrome/security/caps.properties) locale/@AB_CD@/global/xml/prettyprint.dtd (%chrome/xml/prettyprint.dtd) locale/@AB_CD@/global-platform/win/accessible.properties (%chrome/accessibility/win/accessible.properties) locale/@AB_CD@/global-platform/mac/accessible.properties (%chrome/accessibility/mac/accessible.properties) locale/@AB_CD@/global-platform/unix/accessible.properties (%chrome/accessibility/unix/accessible.properties)
--- a/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp +++ b/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp @@ -63,21 +63,19 @@ #include "nsITooltipListener.h" #include "nsIPrivateDOMEvent.h" #include "nsIDOMNode.h" #include "nsIDOMNodeList.h" #include "nsIDOMDocument.h" #include "nsIDOMDocumentType.h" #include "nsIDOMElement.h" #include "Link.h" -#ifdef MOZ_SVG #include "nsIDOMSVGElement.h" #include "nsIDOMSVGTitleElement.h" #include "nsIDOMSVGForeignObjectElem.h" -#endif #include "nsIDOMEvent.h" #include "nsIDOMMouseEvent.h" #include "nsIDOMNSUIEvent.h" #include "nsIDOMEventTarget.h" #include "nsIDOMNamedNodeMap.h" #include "nsIFormControl.h" #include "nsIDOMHTMLInputElement.h" #include "nsIDOMHTMLTextAreaElement.h" @@ -1050,17 +1048,16 @@ DefaultTooltipTextProvider::DefaultToolt { // There are certain element types which we don't want to use // as tool tip text. mTag_dialog = do_GetAtom("dialog"); mTag_dialogheader = do_GetAtom("dialogheader"); mTag_window = do_GetAtom("window"); } -#ifdef MOZ_SVG // // UseSVGTitle // // A helper routine that determines whether we're still interested // in SVG titles. We need to stop at the SVG root element; that // either has no parent, has a non-SVG parent or has an SVG ForeignObject // parent. // @@ -1079,17 +1076,16 @@ UseSVGTitle(nsIDOMElement *currElement) nsCOMPtr<nsIDOMSVGForeignObjectElement> parentFOContent(do_QueryInterface(parent)); if (parentFOContent) return PR_FALSE; nsCOMPtr<nsIDOMSVGElement> parentSVGContent(do_QueryInterface(parent)); return (parentSVGContent != nsnull); } -#endif /* void getNodeText (in nsIDOMNode aNode, out wstring aText); */ NS_IMETHODIMP DefaultTooltipTextProvider::GetNodeText(nsIDOMNode *aNode, PRUnichar **aText, PRBool *_retval) { NS_ENSURE_ARG_POINTER(aNode); NS_ENSURE_ARG_POINTER(aText); @@ -1141,17 +1137,16 @@ DefaultTooltipTextProvider::GetNodeText( if (linkContent) { nsCOMPtr<nsIURI> uri(linkContent->GetURIExternal()); if (uri) { currElement->GetAttributeNS(NS_LITERAL_STRING("http://www.w3.org/1999/xlink"), NS_LITERAL_STRING("title"), outText); if ( outText.Length() ) found = PR_TRUE; } } -#ifdef MOZ_SVG else { if (lookingForSVGTitle) { lookingForSVGTitle = UseSVGTitle(currElement); } if (lookingForSVGTitle) { nsCOMPtr<nsIDOMNodeList>childNodes; aNode->GetChildNodes(getter_AddRefs(childNodes)); PRUint32 childNodeCount; @@ -1165,17 +1160,16 @@ DefaultTooltipTextProvider::GetNodeText( titleContent->GetTextContent(outText); if ( outText.Length() ) found = PR_TRUE; break; } } } } -#endif } } } } // not found here, walk up to the parent and keep trying if ( !found ) { nsCOMPtr<nsIDOMNode> temp ( current );
--- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -102,20 +102,18 @@ #include "nsIDOMHTMLInputElement.h" #include "nsIDOMHTMLEmbedElement.h" #include "nsIDOMHTMLObjectElement.h" #include "nsIDOMHTMLAppletElement.h" #include "nsIDOMHTMLOptionElement.h" #include "nsIDOMHTMLTextAreaElement.h" #include "nsIDOMHTMLDocument.h" #include "nsIDOMText.h" -#ifdef MOZ_SVG #include "nsIDOMSVGImageElement.h" #include "nsIDOMSVGScriptElement.h" -#endif // MOZ_SVG #ifdef MOZ_MEDIA #include "nsIDOMHTMLSourceElement.h" #include "nsIDOMHTMLMediaElement.h" #endif // MOZ_MEDIA #include "nsIImageLoadingContent.h" #include "ftpCore.h" @@ -2764,24 +2762,22 @@ nsresult nsWebBrowserPersist::OnWalkDOMN // Test the node to see if it's an image, frame, iframe, css, js nsCOMPtr<nsIDOMHTMLImageElement> nodeAsImage = do_QueryInterface(aNode); if (nodeAsImage) { StoreURIAttribute(aNode, "src"); return NS_OK; } -#ifdef MOZ_SVG nsCOMPtr<nsIDOMSVGImageElement> nodeAsSVGImage = do_QueryInterface(aNode); if (nodeAsSVGImage) { StoreURIAttributeNS(aNode, "http://www.w3.org/1999/xlink", "href"); return NS_OK; } -#endif // MOZ_SVG #ifdef MOZ_MEDIA nsCOMPtr<nsIDOMHTMLMediaElement> nodeAsMedia = do_QueryInterface(aNode); if (nodeAsMedia) { StoreURIAttribute(aNode, "src"); return NS_OK; } @@ -2823,24 +2819,22 @@ nsresult nsWebBrowserPersist::OnWalkDOMN nsCOMPtr<nsIDOMHTMLScriptElement> nodeAsScript = do_QueryInterface(aNode); if (nodeAsScript) { StoreURIAttribute(aNode, "src"); return NS_OK; } -#ifdef MOZ_SVG nsCOMPtr<nsIDOMSVGScriptElement> nodeAsSVGScript = do_QueryInterface(aNode); if (nodeAsSVGScript) { StoreURIAttributeNS(aNode, "http://www.w3.org/1999/xlink", "href"); return NS_OK; } -#endif // MOZ_SVG nsCOMPtr<nsIDOMHTMLEmbedElement> nodeAsEmbed = do_QueryInterface(aNode); if (nodeAsEmbed) { StoreURIAttribute(aNode, "src"); return NS_OK; } @@ -3163,17 +3157,16 @@ nsWebBrowserPersist::CloneNodeWithFixedU { FixupNodeAttribute(*aNodeOut, "src"); } return rv; } #endif // MOZ_MEDIA -#ifdef MOZ_SVG nsCOMPtr<nsIDOMSVGImageElement> nodeAsSVGImage = do_QueryInterface(aNodeIn); if (nodeAsSVGImage) { rv = GetNodeToFixup(aNodeIn, aNodeOut); if (NS_SUCCEEDED(rv) && *aNodeOut) { // Disable image loads nsCOMPtr<nsIImageLoadingContent> imgCon = @@ -3181,41 +3174,38 @@ nsWebBrowserPersist::CloneNodeWithFixedU if (imgCon) imgCon->SetLoadingEnabled(PR_FALSE); // FixupAnchor(*aNodeOut); // XXXjwatt: is this line needed? FixupNodeAttributeNS(*aNodeOut, "http://www.w3.org/1999/xlink", "href"); } return rv; } -#endif // MOZ_SVG nsCOMPtr<nsIDOMHTMLScriptElement> nodeAsScript = do_QueryInterface(aNodeIn); if (nodeAsScript) { rv = GetNodeToFixup(aNodeIn, aNodeOut); if (NS_SUCCEEDED(rv) && *aNodeOut) { FixupNodeAttribute(*aNodeOut, "src"); } return rv; } -#ifdef MOZ_SVG nsCOMPtr<nsIDOMSVGScriptElement> nodeAsSVGScript = do_QueryInterface(aNodeIn); if (nodeAsSVGScript) { rv = GetNodeToFixup(aNodeIn, aNodeOut); if (NS_SUCCEEDED(rv) && *aNodeOut) { FixupNodeAttributeNS(*aNodeOut, "http://www.w3.org/1999/xlink", "href"); } return rv; } -#endif // MOZ_SVG nsCOMPtr<nsIDOMHTMLEmbedElement> nodeAsEmbed = do_QueryInterface(aNodeIn); if (nodeAsEmbed) { rv = GetNodeToFixup(aNodeIn, aNodeOut); if (NS_SUCCEEDED(rv) && *aNodeOut) { FixupNodeAttribute(*aNodeOut, "src");
--- a/layout/Makefile.in +++ b/layout/Makefile.in @@ -45,35 +45,32 @@ include $(DEPTH)/config/autoconf.mk MODULE = layout PARALLEL_DIRS = \ style \ base \ generic \ forms \ tables \ + svg/base/src \ xul/base/public \ xul/base/src \ ipc \ $(NULL) ifdef NS_PRINTING PARALLEL_DIRS += printing endif ifdef MOZ_MATHML PARALLEL_DIRS += \ mathml \ $(NULL) endif -ifdef MOZ_SVG -PARALLEL_DIRS += svg/base/src -endif - PARALLEL_DIRS += inspector/public inspector/src ifdef ENABLE_TESTS PARALLEL_DIRS += inspector/tests endif DIRS += build ifdef ENABLE_TESTS
--- a/layout/base/Makefile.in +++ b/layout/base/Makefile.in @@ -160,28 +160,24 @@ LOCAL_INCLUDES += \ -I$(srcdir)/../xul/base/src/tree/src \ -I$(srcdir)/../../content/base/src \ -I$(srcdir)/../../content/events/src \ -I$(srcdir)/../../content/xbl/src \ -I$(srcdir)/../../view/src \ -I$(srcdir)/../../dom/base \ -I$(srcdir)/../../content/html/content/src \ -I$(srcdir)/../../content/svg/content/src \ + -I$(srcdir)/../svg/base/src \ $(NULL) ifdef MOZ_MATHML LOCAL_INCLUDES += \ -I$(srcdir)/../mathml endif -ifdef MOZ_SVG -LOCAL_INCLUDES += \ - -I$(srcdir)/../svg/base/src -endif - CXXFLAGS += $(MOZ_CAIRO_CFLAGS) DEFINES += -D_IMPL_NS_LAYOUT ifndef MOZ_XUL nsIBoxObject.idl: %: $(topsrcdir)/layout/xul/base/public/% $(INSTALL) $^ . nsPIBoxObject.h: %: $(topsrcdir)/layout/xul/base/public/%
--- a/layout/base/nsCSSFrameConstructor.h +++ b/layout/base/nsCSSFrameConstructor.h @@ -1323,30 +1323,28 @@ private: // we know for sure that the content is not something that should get a frame // constructed by tag. static const FrameConstructionData* FindXULDisplayData(const nsStyleDisplay* aDisplay, Element* aElement, nsStyleContext* aStyleContext); // SVG - rods -#ifdef MOZ_SVG static const FrameConstructionData* FindSVGData(Element* aElement, nsIAtom* aTag, PRInt32 aNameSpaceID, nsIFrame* aParentFrame, nsStyleContext* aStyleContext); nsresult ConstructSVGForeignObjectFrame(nsFrameConstructorState& aState, FrameConstructionItem& aItem, nsIFrame* aParentFrame, const nsStyleDisplay* aStyleDisplay, nsFrameItems& aFrameItems, nsIFrame** aNewFrame); -#endif /* Not static because it does PropagateScrollToViewport. If this changes, make this static */ const FrameConstructionData* FindDisplayData(const nsStyleDisplay* aDisplay, Element* aElement, nsStyleContext* aStyleContext); /**
--- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -74,21 +74,19 @@ #include "gfxContext.h" #include "nsIInterfaceRequestorUtils.h" #include "gfxPlatform.h" #include "gfxImageSurface.h" #include "nsStyleStructInlines.h" #include "nsCSSFrameConstructor.h" #include "nsCSSProps.h" #include "nsContentUtils.h" -#ifdef MOZ_SVG #include "nsSVGEffects.h" #include "nsSVGIntegrationUtils.h" #include "gfxDrawable.h" -#endif #include "nsCSSRenderingBorders.h" /** * This is a small wrapper class to encapsulate image drawing that can draw an * nsStyleImage image, which may internally be a real image, a sub image, or a * CSS gradient. * @@ -125,20 +123,18 @@ public: const nsRect& aDirty); private: nsIFrame* mForFrame; const nsStyleImage* mImage; nsStyleImageType mType; nsCOMPtr<imgIContainer> mImageContainer; nsRefPtr<nsStyleGradient> mGradientData; -#ifdef MOZ_SVG nsIFrame* mPaintServerFrame; nsLayoutUtils::SurfaceFromElementResult mImageElementSurface; -#endif PRBool mIsReady; nsSize mSize; PRUint32 mFlags; }; // To avoid storing this data on nsInlineFrame (bloat) and to avoid // recalculating this for each frame in a continuation (perf), hold // a cache of various coordinate information that we need in order @@ -3741,19 +3737,17 @@ nsCSSRendering::GetTextDecorationRectInt ImageRenderer::ImageRenderer(nsIFrame* aForFrame, const nsStyleImage* aImage, PRUint32 aFlags) : mForFrame(aForFrame) , mImage(aImage) , mType(aImage->GetType()) , mImageContainer(nsnull) , mGradientData(nsnull) -#ifdef MOZ_SVG , mPaintServerFrame(nsnull) -#endif , mIsReady(PR_FALSE) , mSize(0, 0) , mFlags(aFlags) { } ImageRenderer::~ImageRenderer() { @@ -3818,17 +3812,16 @@ ImageRenderer::PrepareImage() } mIsReady = PR_TRUE; break; } case eStyleImageType_Gradient: mGradientData = mImage->GetGradientData(); mIsReady = PR_TRUE; break; -#ifdef MOZ_SVG case eStyleImageType_Element: { nsAutoString elementId = NS_LITERAL_STRING("#") + nsDependentString(mImage->GetElementId()); nsCOMPtr<nsIURI> targetURI; nsCOMPtr<nsIURI> base = mForFrame->GetContent()->GetBaseURI(); nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(targetURI), elementId, mForFrame->GetContent()->GetCurrentDoc(), base); @@ -3846,17 +3839,16 @@ ImageRenderer::PrepareImage() do_QueryInterface(property->GetReferencedElement()); mImageElementSurface = nsLayoutUtils::SurfaceFromElement(imageElement); if (!mImageElementSurface.mSurface) return PR_FALSE; } mIsReady = PR_TRUE; break; } -#endif case eStyleImageType_Null: default: break; } return mIsReady; } @@ -3882,17 +3874,16 @@ ImageRenderer::ComputeSize(const nsSize& nsPresContext::CSSPixelsToAppUnits(imageIntSize.height) : aDefault.height; break; } case eStyleImageType_Gradient: mSize = aDefault; break; -#ifdef MOZ_SVG case eStyleImageType_Element: { if (mPaintServerFrame) { if (mPaintServerFrame->IsFrameOfType(nsIFrame::eSVG)) { mSize = aDefault; } else { // The intrinsic image size for a generic nsIFrame paint server is // the frame's bbox size rounded to device pixels. @@ -3907,17 +3898,16 @@ ImageRenderer::ComputeSize(const nsSize& } else { NS_ASSERTION(mImageElementSurface.mSurface, "Surface should be ready."); gfxIntSize size = mImageElementSurface.mSize; mSize.width = nsPresContext::CSSPixelsToAppUnits(size.width); mSize.height = nsPresContext::CSSPixelsToAppUnits(size.height); } break; } -#endif case eStyleImageType_Null: default: mSize.SizeTo(0, 0); break; } return mSize; } @@ -3952,33 +3942,31 @@ ImageRenderer::Draw(nsPresContext* graphicsFilter, aDest, aFill, aAnchor, aDirty, drawFlags); break; } case eStyleImageType_Gradient: nsCSSRendering::PaintGradient(aPresContext, aRenderingContext, mGradientData, aDirty, aDest, aFill); break; -#ifdef MOZ_SVG case eStyleImageType_Element: if (mPaintServerFrame) { nsSVGIntegrationUtils::DrawPaintServer( &aRenderingContext, mForFrame, mPaintServerFrame, graphicsFilter, aDest, aFill, aAnchor, aDirty, mSize); } else { NS_ASSERTION(mImageElementSurface.mSurface, "Surface should be ready."); nsRefPtr<gfxDrawable> surfaceDrawable = new gfxSurfaceDrawable(mImageElementSurface.mSurface, mImageElementSurface.mSize); nsLayoutUtils::DrawPixelSnapped( &aRenderingContext, surfaceDrawable, graphicsFilter, aDest, aFill, aAnchor, aDirty); } break; -#endif case eStyleImageType_Null: default: break; } } #define MAX_BLUR_RADIUS 300 #define MAX_SPREAD_RADIUS 50
--- a/layout/base/nsDisplayItemTypes.h +++ b/layout/base/nsDisplayItemTypes.h @@ -82,16 +82,18 @@ enum Type { TYPE_PRINT_PREVIEW_BACKGROUND, TYPE_PRINT_PLUGIN, TYPE_REMOTE, TYPE_REMOTE_SHADOW, TYPE_SCROLL_LAYER, TYPE_SCROLL_INFO_LAYER, TYPE_SELECTION_OVERLAY, TYPE_SOLID_COLOR, + TYPE_SVG_EFFECTS, + TYPE_SVG_EVENT_RECEIVER, TYPE_TABLE_CELL_BACKGROUND, TYPE_TABLE_CELL_SELECTION, TYPE_TABLE_ROW_BACKGROUND, TYPE_TABLE_ROW_GROUP_BACKGROUND, TYPE_TABLE_BORDER_BACKGROUND, TYPE_TEXT, TYPE_TEXT_DECORATION, TYPE_TEXT_SHADOW, @@ -100,21 +102,16 @@ enum Type { TYPE_WRAP_LIST, TYPE_ZOOM, TYPE_EXCLUDE_GLASS_FRAME, #if defined(MOZ_REFLOW_PERF_DSP) && defined(MOZ_REFLOW_PERF) TYPE_REFLOW_COUNT, #endif -#ifdef MOZ_SVG - TYPE_SVG_EFFECTS, - TYPE_SVG_EVENT_RECEIVER, -#endif - #ifdef MOZ_XUL TYPE_XUL_EVENT_REDIRECTOR, TYPE_XUL_GROUP_BACKGROUND, TYPE_XUL_IMAGE, TYPE_XUL_TEXT_BOX, TYPE_XUL_TREE_BODY, TYPE_XUL_TREE_COL_SPLITTER_TARGET, #ifdef DEBUG_LAYOUT
--- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -49,19 +49,17 @@ #include "nsISelectionController.h" #include "nsIPresShell.h" #include "nsRegion.h" #include "nsFrameManager.h" #include "gfxContext.h" #include "nsStyleStructInlines.h" #include "nsStyleTransformMatrix.h" #include "gfxMatrix.h" -#ifdef MOZ_SVG #include "nsSVGIntegrationUtils.h" -#endif #include "nsLayoutUtils.h" #include "nsIScrollableFrame.h" #include "nsThemeConstants.h" #include "imgIContainer.h" #include "nsIInterfaceRequestorUtils.h" #include "BasicLayers.h" #include "nsBoxFrame.h" @@ -2659,17 +2657,16 @@ nsRect nsDisplayTransform::UntransformRe /* We want to untransform the matrix, so invert the transformation first! */ matrix.Invert(); return nsLayoutUtils::MatrixTransformRect(aUntransformedBounds, matrix, factor); } -#ifdef MOZ_SVG nsDisplaySVGEffects::nsDisplaySVGEffects(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame, nsDisplayList* aList) : nsDisplayWrapList(aBuilder, aFrame, aList), mEffectsFrame(aFrame), mBounds(aFrame->GetVisualOverflowRectRelativeToSelf()) { MOZ_COUNT_CTOR(nsDisplaySVGEffects); } @@ -2735,9 +2732,8 @@ PRBool nsDisplaySVGEffects::TryMerge(nsD if (aItem->GetUnderlyingFrame()->GetContent() != mFrame->GetContent()) return PR_FALSE; nsDisplaySVGEffects* other = static_cast<nsDisplaySVGEffects*>(aItem); mList.AppendToBottom(&other->mList); mBounds.UnionRect(mBounds, other->mBounds + other->mEffectsFrame->GetOffsetTo(mEffectsFrame)); return PR_TRUE; } -#endif
--- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -2005,17 +2005,16 @@ public: PRInt32 GetChildAppUnitsPerDevPixel() { return mAPD; } // Get the app units per dev pixel ratio of the parent document. PRInt32 GetParentAppUnitsPerDevPixel() { return mParentAPD; } private: PRInt32 mAPD, mParentAPD; }; -#ifdef MOZ_SVG /** * A display item to paint a stacking context with effects * set by the stacking context root frame's style. */ class nsDisplaySVGEffects : public nsDisplayWrapList { public: nsDisplaySVGEffects(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame, nsDisplayList* aList); @@ -2039,17 +2038,16 @@ public: nsIFrame* GetEffectsFrame() { return mEffectsFrame; } private: nsIFrame* mEffectsFrame; // relative to mEffectsFrame nsRect mBounds; }; -#endif /* A display item that applies a transformation to all of its descendant * elements. This wrapper should only be used if there is a transform applied * to the root element. * * The reason that a "bounds" rect is involved in transform calculations is * because CSS-transforms allow percentage values for the x and y components * of <translation-value>s, where percentages are percentages of the element's
--- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -94,22 +94,20 @@ #include "ImageLayers.h" #include "mozilla/arm.h" #include "mozilla/dom/Element.h" #include "nsCanvasFrame.h" #include "gfxDrawable.h" #include "gfxUtils.h" #include "nsDataHashtable.h" -#ifdef MOZ_SVG #include "nsSVGUtils.h" #include "nsSVGIntegrationUtils.h" #include "nsSVGForeignObjectFrame.h" #include "nsSVGOuterSVGFrame.h" -#endif #ifdef MOZ_XUL #include "nsXULPopupManager.h" #endif using namespace mozilla::layers; using namespace mozilla::dom; namespace css = mozilla::css; @@ -1773,23 +1771,21 @@ nsLayoutUtils::GetAllInFlowBoxes(nsIFram struct BoxToBorderRect : public nsLayoutUtils::BoxCallback { nsIFrame* mRelativeTo; nsLayoutUtils::RectCallback* mCallback; BoxToBorderRect(nsIFrame* aRelativeTo, nsLayoutUtils::RectCallback* aCallback) : mRelativeTo(aRelativeTo), mCallback(aCallback) {} virtual void AddBox(nsIFrame* aFrame) { -#ifdef MOZ_SVG nsRect r; nsIFrame* outer = nsSVGUtils::GetOuterSVGFrameAndCoveredRegion(aFrame, &r); if (outer) { mCallback->AddRect(r + outer->GetOffsetTo(mRelativeTo)); } else -#endif mCallback->AddRect(nsRect(aFrame->GetOffsetTo(mRelativeTo), aFrame->GetSize())); } }; void nsLayoutUtils::GetAllInFlowRects(nsIFrame* aFrame, nsIFrame* aRelativeTo, RectCallback* aCallback) { @@ -3063,33 +3059,29 @@ GraphicsFilter nsLayoutUtils::GetGraphicsFilterForFrame(nsIFrame* aForFrame) { GraphicsFilter defaultFilter = gfxPattern::FILTER_GOOD; #ifdef MOZ_GFX_OPTIMIZE_MOBILE if (!mozilla::supports_neon()) { defaultFilter = gfxPattern::FILTER_NEAREST; } #endif -#ifdef MOZ_SVG nsIFrame *frame = nsCSSRendering::IsCanvasFrame(aForFrame) ? nsCSSRendering::FindBackgroundStyleFrame(aForFrame) : aForFrame; switch (frame->GetStyleSVG()->mImageRendering) { case NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED: return gfxPattern::FILTER_FAST; case NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY: return gfxPattern::FILTER_BEST; case NS_STYLE_IMAGE_RENDERING_CRISPEDGES: return gfxPattern::FILTER_NEAREST; default: return defaultFilter; } -#else - return defaultFilter; -#endif } /** * Given an image being drawn into an appunit coordinate system, and * a point in that coordinate system, map the point back into image * pixel space. * @param aSize the size of the image, in pixels * @param aDest the rectangle that the image is being mapped into @@ -3651,31 +3643,29 @@ IsNonzeroCoord(const nsStyleCoord& aCoor nsLayoutUtils::GetTextRunFlagsForStyle(nsStyleContext* aStyleContext, const nsStyleText* aStyleText, const nsStyleFont* aStyleFont) { PRUint32 result = 0; if (IsNonzeroCoord(aStyleText->mLetterSpacing)) { result |= gfxTextRunFactory::TEXT_DISABLE_OPTIONAL_LIGATURES; } -#ifdef MOZ_SVG switch (aStyleContext->GetStyleSVG()->mTextRendering) { case NS_STYLE_TEXT_RENDERING_OPTIMIZESPEED: result |= gfxTextRunFactory::TEXT_OPTIMIZE_SPEED; break; case NS_STYLE_TEXT_RENDERING_AUTO: if (aStyleFont->mFont.size < aStyleContext->PresContext()->GetAutoQualityMinFontSize()) { result |= gfxTextRunFactory::TEXT_OPTIMIZE_SPEED; } break; default: break; } -#endif return result; } /* static */ void nsLayoutUtils::GetRectDifferenceStrips(const nsRect& aR1, const nsRect& aR2, nsRect* aHStrip, nsRect* aVStrip) { NS_ASSERTION(aR1.TopLeft() == aR2.TopLeft(), "expected rects at the same position");
--- a/layout/build/Makefile.in +++ b/layout/build/Makefile.in @@ -228,25 +228,20 @@ SHARED_LIBRARY_LIBS += \ endif ifdef MOZ_XTF SHARED_LIBRARY_LIBS += \ $(DEPTH)/content/xtf/src/$(LIB_PREFIX)gkcontentxtf_s.$(LIB_SUFFIX) \ $(NULL) endif -ifdef MOZ_SVG SHARED_LIBRARY_LIBS += \ ../svg/base/src/$(LIB_PREFIX)gksvgbase_s.$(LIB_SUFFIX) \ $(DEPTH)/content/svg/document/src/$(LIB_PREFIX)gkconsvgdoc_s.$(LIB_SUFFIX) \ $(DEPTH)/content/svg/content/src/$(LIB_PREFIX)gkcontentsvg_s.$(LIB_SUFFIX) \ - $(NULL) -endif - -SHARED_LIBRARY_LIBS += \ $(DEPTH)/content/smil/$(LIB_PREFIX)gkconsmil_s.$(LIB_SUFFIX) \ $(NULL) ifdef ENABLE_EDITOR_API_LOG DEFINES += -DENABLE_EDITOR_API_LOG endif SHARED_LIBRARY_LIBS += \ @@ -331,26 +326,23 @@ LOCAL_INCLUDES += -I$(srcdir)/../base \ -I$(topsrcdir)/editor/libeditor/base \ -I$(topsrcdir)/editor/libeditor/text \ -I$(topsrcdir)/editor/libeditor/html \ -I$(topsrcdir)/editor/txtsvc/src \ -I$(topsrcdir)/editor/composer/src \ -I$(topsrcdir)/js/src/xpconnect/src \ -I$(topsrcdir)/js/src/xpconnect/loader \ -I$(topsrcdir)/caps/include \ - -I$(topsrcdir)/netwerk/base/src \ + -I$(topsrcdir)/netwerk/base/src \ + -I$(topsrcdir)/content/svg/content/src \ $(NULL) ifdef MOZ_MATHML LOCAL_INCLUDES += -I$(srcdir)/../mathml endif -ifdef MOZ_SVG -LOCAL_INCLUDES += -I$(topsrcdir)/content/svg/content/src -endif - DEFINES += -D_IMPL_NS_LAYOUT ifeq ($(OS_ARCH),IRIX) ifeq ($(GNU_CXX),1) LDFLAGS += -Wl,-LD_LAYOUT:lgot_buffer=50 endif endif
--- a/layout/build/nsContentDLF.h +++ b/layout/build/nsContentDLF.h @@ -92,23 +92,16 @@ NS_NewContentDocumentLoaderFactory(nsIDo #ifdef MOZ_MATHML #define CONTENTDLF_MATHML_CATEGORIES \ { "Gecko-Content-Viewers", APPLICATION_MATHML_XML, "@mozilla.org/content/document-loader-factory;1" }, #else #define CONTENTDLF_MATHML_CATEGORIES #endif -#ifdef MOZ_SVG -#define CONTENTDLF_SVG_CATEGORIES \ - { "Gecko-Content-Viewers", IMAGE_SVG_XML, "@mozilla.org/content/document-loader-factory;1" }, -#else -#define CONTENTDLF_SVG_CATEGORIES -#endif - #ifdef MOZ_WEBM #define CONTENTDLF_WEBM_CATEGORIES \ { "Gecko-Content-Viewers", VIDEO_WEBM, "@mozilla.org/content/document-loader-factory;1" }, \ { "Gecko-Content-Viewers", AUDIO_WEBM, "@mozilla.org/content/document-loader-factory;1" }, #else #define CONTENTDLF_WEBM_CATEGORIES #endif @@ -124,14 +117,14 @@ NS_NewContentDocumentLoaderFactory(nsIDo { "Gecko-Content-Viewers", APPLICATION_XHTML_XML, "@mozilla.org/content/document-loader-factory;1" }, \ { "Gecko-Content-Viewers", TEXT_XML, "@mozilla.org/content/document-loader-factory;1" }, \ { "Gecko-Content-Viewers", APPLICATION_XML, "@mozilla.org/content/document-loader-factory;1" }, \ { "Gecko-Content-Viewers", APPLICATION_RDF_XML, "@mozilla.org/content/document-loader-factory;1" }, \ { "Gecko-Content-Viewers", TEXT_RDF, "@mozilla.org/content/document-loader-factory;1" }, \ { "Gecko-Content-Viewers", TEXT_XUL, "@mozilla.org/content/document-loader-factory;1" }, \ { "Gecko-Content-Viewers", APPLICATION_CACHED_XUL, "@mozilla.org/content/document-loader-factory;1" }, \ { "Gecko-Content-Viewers", VIEWSOURCE_CONTENT_TYPE, "@mozilla.org/content/document-loader-factory;1" }, \ + { "Gecko-Content-Viewers", IMAGE_SVG_XML, "@mozilla.org/content/document-loader-factory;1" }, \ CONTENTDLF_MATHML_CATEGORIES \ - CONTENTDLF_SVG_CATEGORIES \ CONTENTDLF_WEBM_CATEGORIES #endif
--- a/layout/build/nsLayoutModule.cpp +++ b/layout/build/nsLayoutModule.cpp @@ -515,19 +515,17 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtil MAKE_CTOR(CreateNameSpaceManager, nsINameSpaceManager, NS_GetNameSpaceManager) MAKE_CTOR(CreateEventListenerManager, nsIEventListenerManager, NS_NewEventListenerManager) MAKE_CTOR(CreateDOMEventGroup, nsIDOMEventGroup, NS_NewDOMEventGroup) MAKE_CTOR(CreateDocumentViewer, nsIDocumentViewer, NS_NewDocumentViewer) MAKE_CTOR(CreateHTMLDocument, nsIDocument, NS_NewHTMLDocument) MAKE_CTOR(CreateDOMImplementation, nsIDOMDOMImplementation, NS_NewDOMImplementation) MAKE_CTOR(CreateXMLDocument, nsIDocument, NS_NewXMLDocument) -#ifdef MOZ_SVG MAKE_CTOR(CreateSVGDocument, nsIDocument, NS_NewSVGDocument) -#endif MAKE_CTOR(CreateImageDocument, nsIDocument, NS_NewImageDocument) MAKE_CTOR(CreateDOMSelection, nsISelection, NS_NewDomSelection) MAKE_CTOR(CreateRange, nsIDOMRange, NS_NewRange) MAKE_CTOR(CreateRangeUtils, nsIRangeUtils, NS_NewRangeUtils) MAKE_CTOR(CreateContentIterator, nsIContentIterator, NS_NewContentIterator) MAKE_CTOR(CreatePreContentIterator, nsIContentIterator, NS_NewPreContentIterator) MAKE_CTOR(CreateSubtreeIterator, nsIContentIterator, NS_NewContentSubtreeIterator) // CreateHTMLImgElement, see below @@ -764,19 +762,17 @@ NS_DEFINE_NAMED_CID(IN_CSSVALUESEARCH_CI NS_DEFINE_NAMED_CID(IN_DOMUTILS_CID); NS_DEFINE_NAMED_CID(NS_NAMESPACEMANAGER_CID); NS_DEFINE_NAMED_CID(NS_EVENTLISTENERMANAGER_CID); NS_DEFINE_NAMED_CID(NS_DOMEVENTGROUP_CID); NS_DEFINE_NAMED_CID(NS_DOCUMENT_VIEWER_CID); NS_DEFINE_NAMED_CID(NS_HTMLDOCUMENT_CID); NS_DEFINE_NAMED_CID(NS_DOM_IMPLEMENTATION_CID); NS_DEFINE_NAMED_CID(NS_XMLDOCUMENT_CID); -#ifdef MOZ_SVG NS_DEFINE_NAMED_CID(NS_SVGDOCUMENT_CID); -#endif NS_DEFINE_NAMED_CID(NS_IMAGEDOCUMENT_CID); NS_DEFINE_NAMED_CID(NS_DOMSELECTION_CID); NS_DEFINE_NAMED_CID(NS_RANGE_CID); NS_DEFINE_NAMED_CID(NS_RANGEUTILS_CID); NS_DEFINE_NAMED_CID(NS_CONTENTITERATOR_CID); NS_DEFINE_NAMED_CID(NS_PRECONTENTITERATOR_CID); NS_DEFINE_NAMED_CID(NS_SUBTREEITERATOR_CID); NS_DEFINE_NAMED_CID(NS_HTMLIMAGEELEMENT_CID); @@ -912,19 +908,17 @@ static const mozilla::Module::CIDEntry k { &kIN_DOMUTILS_CID, false, NULL, inDOMUtilsConstructor }, { &kNS_NAMESPACEMANAGER_CID, false, NULL, CreateNameSpaceManager }, { &kNS_EVENTLISTENERMANAGER_CID, false, NULL, CreateEventListenerManager }, { &kNS_DOMEVENTGROUP_CID, false, NULL, CreateDOMEventGroup }, { &kNS_DOCUMENT_VIEWER_CID, false, NULL, CreateDocumentViewer }, { &kNS_HTMLDOCUMENT_CID, false, NULL, CreateHTMLDocument }, { &kNS_DOM_IMPLEMENTATION_CID, false, NULL, CreateDOMImplementation }, { &kNS_XMLDOCUMENT_CID, false, NULL, CreateXMLDocument }, -#ifdef MOZ_SVG { &kNS_SVGDOCUMENT_CID, false, NULL, CreateSVGDocument }, -#endif { &kNS_IMAGEDOCUMENT_CID, false, NULL, CreateImageDocument }, { &kNS_DOMSELECTION_CID, false, NULL, CreateDOMSelection }, { &kNS_RANGE_CID, false, NULL, CreateRange }, { &kNS_RANGEUTILS_CID, false, NULL, CreateRangeUtils }, { &kNS_CONTENTITERATOR_CID, false, NULL, CreateContentIterator }, { &kNS_PRECONTENTITERATOR_CID, false, NULL, CreatePreContentIterator }, { &kNS_SUBTREEITERATOR_CID, false, NULL, CreateSubtreeIterator }, { &kNS_HTMLIMAGEELEMENT_CID, false, NULL, CreateHTMLImgElement }, @@ -1050,19 +1044,17 @@ static const mozilla::Module::ContractID { "@mozilla.org/inspector/dom-view;1", &kIN_DOMVIEW_CID }, #endif { "@mozilla.org/inspector/deep-tree-walker;1", &kIN_DEEPTREEWALKER_CID }, { "@mozilla.org/inspector/flasher;1", &kIN_FLASHER_CID }, { "@mozilla.org/inspector/search;1?type=cssvalue", &kIN_CSSVALUESEARCH_CID }, { "@mozilla.org/inspector/dom-utils;1", &kIN_DOMUTILS_CID }, { NS_NAMESPACEMANAGER_CONTRACTID, &kNS_NAMESPACEMANAGER_CID }, { "@mozilla.org/xml/xml-document;1", &kNS_XMLDOCUMENT_CID }, -#ifdef MOZ_SVG { "@mozilla.org/svg/svg-document;1", &kNS_SVGDOCUMENT_CID }, -#endif { "@mozilla.org/content/dom-selection;1", &kNS_DOMSELECTION_CID }, { "@mozilla.org/content/range;1", &kNS_RANGE_CID }, { "@mozilla.org/content/range-utils;1", &kNS_RANGEUTILS_CID }, { "@mozilla.org/content/post-content-iterator;1", &kNS_CONTENTITERATOR_CID }, { "@mozilla.org/content/pre-content-iterator;1", &kNS_PRECONTENTITERATOR_CID }, { "@mozilla.org/content/subtree-content-iterator;1", &kNS_SUBTREEITERATOR_CID }, { NS_HTMLIMGELEMENT_CONTRACTID, &kNS_HTMLIMAGEELEMENT_CID }, { NS_HTMLOPTIONELEMENT_CONTRACTID, &kNS_HTMLOPTIONELEMENT_CID }, @@ -1070,28 +1062,24 @@ static const mozilla::Module::ContractID { NS_HTMLAUDIOELEMENT_CONTRACTID, &kNS_HTMLAUDIOELEMENT_CID }, #endif { "@mozilla.org/content/canvas-rendering-context;1?id=2d", &kNS_CANVASRENDERINGCONTEXT2D_CID }, { "@mozilla.org/content/canvas-rendering-context;1?id=moz-webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID }, { "@mozilla.org/content/canvas-rendering-context;1?id=experimental-webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID }, { NS_DOC_ENCODER_CONTRACTID_BASE "text/xml", &kNS_TEXT_ENCODER_CID }, { NS_DOC_ENCODER_CONTRACTID_BASE "application/xml", &kNS_TEXT_ENCODER_CID }, { NS_DOC_ENCODER_CONTRACTID_BASE "application/xhtml+xml", &kNS_TEXT_ENCODER_CID }, -#ifdef MOZ_SVG { NS_DOC_ENCODER_CONTRACTID_BASE "image/svg+xml", &kNS_TEXT_ENCODER_CID }, -#endif { NS_DOC_ENCODER_CONTRACTID_BASE "text/html", &kNS_TEXT_ENCODER_CID }, { NS_DOC_ENCODER_CONTRACTID_BASE "text/plain", &kNS_TEXT_ENCODER_CID }, { NS_HTMLCOPY_ENCODER_CONTRACTID, &kNS_HTMLCOPY_TEXT_ENCODER_CID }, { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/xml", &kNS_XMLCONTENTSERIALIZER_CID }, { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xml", &kNS_XMLCONTENTSERIALIZER_CID }, { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xhtml+xml", &kNS_XHTMLCONTENTSERIALIZER_CID }, -#ifdef MOZ_SVG { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "image/svg+xml", &kNS_XMLCONTENTSERIALIZER_CID }, -#endif { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/html", &kNS_HTMLCONTENTSERIALIZER_CID }, { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/vnd.mozilla.xul+xml", &kNS_XMLCONTENTSERIALIZER_CID }, { NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/plain", &kNS_PLAINTEXTSERIALIZER_CID }, { NS_PLAINTEXTSINK_CONTRACTID, &kNS_PLAINTEXTSERIALIZER_CID }, { NS_HTMLFRAGMENTSINK_CONTRACTID, &kNS_HTMLFRAGMENTSINK_CID }, { NS_HTMLFRAGMENTSINK2_CONTRACTID, &kNS_HTMLFRAGMENTSINK2_CID }, { NS_HTMLPARANOIDFRAGMENTSINK_CONTRACTID, &kNS_HTMLPARANOIDFRAGMENTSINK_CID }, { NS_HTMLPARANOIDFRAGMENTSINK2_CONTRACTID, &kNS_HTMLPARANOIDFRAGMENTSINK2_CID },
--- a/layout/build/nsLayoutStatics.cpp +++ b/layout/build/nsLayoutStatics.cpp @@ -83,19 +83,17 @@ #include "nsDOMThreadService.h" #include "nsHTMLDNSPrefetch.h" #include "nsHtml5Module.h" #include "nsCrossSiteListenerProxy.h" #include "nsFocusManager.h" #include "nsFrameList.h" #include "nsListControlFrame.h" #include "nsHTMLInputElement.h" -#ifdef MOZ_SVG #include "nsSVGUtils.h" -#endif #ifdef MOZ_XUL #include "nsXULPopupManager.h" #include "nsXULContentUtils.h" #include "nsXULElement.h" #include "nsXULPrototypeCache.h" #include "nsXULTooltipListener.h"
--- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -111,20 +111,18 @@ #include "nsLayoutErrors.h" #include "nsContentErrors.h" #include "nsHTMLContainerFrame.h" #include "nsBoxLayoutState.h" #include "nsBlockFrame.h" #include "nsDisplayList.h" #include "nsIObjectLoadingContent.h" #include "nsExpirationTracker.h" -#ifdef MOZ_SVG #include "nsSVGIntegrationUtils.h" #include "nsSVGEffects.h" -#endif #include "gfxContext.h" #include "CSSCalc.h" #include "nsAbsoluteContainingBlock.h" #include "mozilla/Preferences.h" using namespace mozilla; @@ -443,19 +441,17 @@ void nsFrame::DestroyFrom(nsIFrame* aDestructRoot) { NS_ASSERTION(!nsContentUtils::IsSafeToRunScript(), "destroy called on frame while scripts not blocked"); NS_ASSERTION(!GetNextSibling() && !GetPrevSibling(), "Frames should be removed before destruction."); NS_ASSERTION(aDestructRoot, "Must specify destruct root"); -#ifdef MOZ_SVG nsSVGEffects::InvalidateDirectRenderingObservers(this); -#endif // Get the view pointer now before the frame properties disappear // when we call NotifyDestroyingFrame() nsIView* view = GetView(); nsPresContext* presContext = PresContext(); nsIPresShell *shell = presContext->GetPresShell(); if (mState & NS_FRAME_OUT_OF_FLOW) { @@ -1481,23 +1477,21 @@ nsIFrame::BuildDisplayListForStackingCon inTransform = PR_TRUE; } if (applyAbsPosClipping) { dirtyRect.IntersectRect(dirtyRect, absPosClip - aBuilder->ToReferenceFrame(this)); } -#ifdef MOZ_SVG PRBool usingSVGEffects = nsSVGIntegrationUtils::UsingEffectsForFrame(this); if (usingSVGEffects) { dirtyRect = nsSVGIntegrationUtils::GetRequiredSourceForInvalidArea(this, dirtyRect); } -#endif // Mark the display list items for absolutely positioned children MarkAbsoluteFramesForDisplayList(aBuilder, dirtyRect); nsDisplayListCollection set; nsresult rv; { nsDisplayListBuilder::AutoIsRootSetter rootSetter(aBuilder, PR_TRUE); @@ -1577,26 +1571,24 @@ nsIFrame::BuildDisplayListForStackingCon nsAbsPosClipWrapper wrapper(absPosClip); nsDisplayItem* item = wrapper.WrapList(aBuilder, this, &resultList); if (!item) return NS_ERROR_OUT_OF_MEMORY; // resultList was emptied resultList.AppendToTop(item); } -#ifdef MOZ_SVG /* If there are any SVG effects, wrap up the list in an effects list. */ if (usingSVGEffects) { /* List now emptied, so add the new list to the top. */ rv = resultList.AppendNewToTop( new (aBuilder) nsDisplaySVGEffects(aBuilder, this, &resultList)); if (NS_FAILED(rv)) return rv; } else -#endif /* If there is any opacity, wrap it up in an opacity list. * If there's nothing in the list, don't add anything. */ if (disp->mOpacity < 1.0f && !resultList.IsEmpty()) { rv = resultList.AppendNewToTop( new (aBuilder) nsDisplayOpacity(aBuilder, this, &resultList)); if (NS_FAILED(rv)) @@ -1720,20 +1712,18 @@ nsIFrame::BuildDisplayListForChild(nsDis // Don't paint our children if the theme object is a leaf. if (IsThemed(ourDisp) && !PresContext()->GetTheme()->WidgetIsContainer(ourDisp->mAppearance)) return NS_OK; // Child is composited if it's transformed, partially transparent, or has // SVG effects. PRBool isComposited = disp->mOpacity != 1.0f || aChild->IsTransformed() -#ifdef MOZ_SVG - || nsSVGIntegrationUtils::UsingEffectsForFrame(aChild) -#endif - ; + || nsSVGIntegrationUtils::UsingEffectsForFrame(aChild); + PRBool isPositioned = disp->IsPositioned(); if (isComposited || isPositioned || disp->IsFloating() || (aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT)) { // If you change this, also change IsPseudoStackingContextFromStyle() pseudoStackingContext = PR_TRUE; } nsRect overflowClip; @@ -4262,29 +4252,27 @@ nsIFrame::InvalidateInternalAfterResize( GetParent()-> InvalidateInternal(aDamageRect, aX + mRect.x, aY + mRect.y, this, aFlags); } void nsIFrame::InvalidateInternal(const nsRect& aDamageRect, nscoord aX, nscoord aY, nsIFrame* aForChild, PRUint32 aFlags) { -#ifdef MOZ_SVG nsSVGEffects::InvalidateDirectRenderingObservers(this); if (nsSVGIntegrationUtils::UsingEffectsForFrame(this)) { nsRect r = nsSVGIntegrationUtils::GetInvalidAreaForChangedSource(this, aDamageRect + nsPoint(aX, aY)); /* Rectangle is now in our own local space, so aX and aY are effectively * zero. Thus we'll pretend that the entire time this was in our own * local coordinate space and do any remaining processing. */ InvalidateInternalAfterResize(r, 0, 0, aFlags); return; } -#endif InvalidateInternalAfterResize(aDamageRect, aX, aY, aFlags); } gfxMatrix nsIFrame::GetTransformMatrix(nsIFrame **aOutAncestor) { NS_PRECONDITION(aOutAncestor, "Need a place to put the ancestor!"); @@ -4496,26 +4484,24 @@ ComputeOutlineAndEffectsRect(nsIFrame* a // Note that we don't remove the outlineInnerRect if a frame loses outline // style. That would require an extra property lookup for every frame, // or a new frame state bit to track whether a property had been stored, // or something like that. It's not worth doing that here. At most it's // only one heap-allocated rect per frame and it will be cleaned up when // the frame dies. -#ifdef MOZ_SVG if (nsSVGIntegrationUtils::UsingEffectsForFrame(aFrame)) { *aAnyOutlineOrEffects = PR_TRUE; if (aStoreRectProperties) { aFrame->Properties(). Set(nsIFrame::PreEffectsBBoxProperty(), new nsRect(r)); } r = nsSVGIntegrationUtils::ComputeFrameEffectsRect(aFrame, r); } -#endif return r; } nsPoint nsIFrame::GetRelativeOffset(const nsStyleDisplay* aDisplay) const { if (!aDisplay || NS_STYLE_POSITION_RELATIVE == aDisplay->mPosition) {
--- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -1640,22 +1640,20 @@ static void AdjustViews(nsIFrame* aFrame static PRBool CanScrollWithBlitting(nsIFrame* aFrame) { for (nsIFrame* f = aFrame; f; f = nsLayoutUtils::GetCrossDocParentFrame(f)) { if (f->GetStyleDisplay()->HasTransform()) { return PR_FALSE; } -#ifdef MOZ_SVG if (nsSVGIntegrationUtils::UsingEffectsForFrame(f) || f->IsFrameOfType(nsIFrame::eSVG)) { return PR_FALSE; } -#endif nsIScrollableFrame* sf = do_QueryFrame(f); if (sf && nsLayoutUtils::HasNonZeroCorner(f->GetStyleBorder()->mBorderRadius)) return PR_FALSE; if (nsLayoutUtils::IsPopup(f)) break; } return PR_TRUE; }
--- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -47,19 +47,17 @@ #include "nsIScrollableFrame.h" #include "nsIScrollPositionListener.h" #include "nsIStatefulFrame.h" #include "nsThreadUtils.h" #include "nsIReflowCallback.h" #include "nsBoxLayoutState.h" #include "nsQueryFrame.h" #include "nsCOMArray.h" -#ifdef MOZ_SVG #include "nsSVGIntegrationUtils.h" -#endif #include "nsExpirationTracker.h" class nsPresContext; class nsIPresShell; class nsIContent; class nsIAtom; class nsIDocument; class nsIScrollFrameInternal;
--- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -699,20 +699,18 @@ IsPercentageAware(const nsIFrame* aFrame fType == nsGkAtoms::gfxButtonControlFrame || fType == nsGkAtoms::fieldSetFrame || fType == nsGkAtoms::comboboxDisplayFrame) { return PR_TRUE; } // Handle SVG, which doesn't map width/height into style if (( -#ifdef MOZ_SVG fType == nsGkAtoms::svgOuterSVGFrame || fType == nsGkAtoms::imageFrame || -#endif fType == nsGkAtoms::subDocumentFrame) && const_cast<nsIFrame*>(aFrame)->GetIntrinsicSize().width.GetUnit() == eStyleUnit_Percent) { return PR_TRUE; } } return PR_FALSE;
--- a/layout/generic/nsSubDocumentFrame.cpp +++ b/layout/generic/nsSubDocumentFrame.cpp @@ -1069,17 +1069,15 @@ nsSubDocumentFrame::ObtainIntrinsicSizeF nsIFrame* scrolled = scrollable->GetScrolledFrame(); if (scrolled) { subDocRoot = scrolled->GetFirstChild(nsnull); } } } } -#ifdef MOZ_SVG if (subDocRoot && subDocRoot->GetContent() && subDocRoot->GetContent()->NodeInfo()->Equals(nsGkAtoms::svg, kNameSpaceID_SVG)) { return subDocRoot; // SVG documents have an intrinsic size } -#endif } return nsnull; }
--- a/layout/style/nsCSSAnonBoxList.h +++ b/layout/style/nsCSSAnonBoxList.h @@ -104,11 +104,9 @@ CSS_ANON_BOX(moztreeline, ":-moz-tree-li CSS_ANON_BOX(moztreetwisty, ":-moz-tree-twisty") CSS_ANON_BOX(moztreeimage, ":-moz-tree-image") CSS_ANON_BOX(moztreecelltext, ":-moz-tree-cell-text") CSS_ANON_BOX(moztreecheckbox, ":-moz-tree-checkbox") CSS_ANON_BOX(moztreeprogressmeter, ":-moz-tree-progressmeter") CSS_ANON_BOX(moztreedropfeedback, ":-moz-tree-drop-feedback") #endif -#ifdef MOZ_SVG CSS_ANON_BOX(mozSVGForeignContent, ":-moz-svg-foreign-content") -#endif
--- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -188,19 +188,17 @@ class CSSParserImpl { public: CSSParserImpl(); ~CSSParserImpl(); nsresult SetStyleSheet(nsCSSStyleSheet* aSheet); nsresult SetQuirkMode(PRBool aQuirkMode); -#ifdef MOZ_SVG nsresult SetSVGMode(PRBool aSVGMode); -#endif nsresult SetChildLoader(mozilla::css::Loader* aChildLoader); // Clears everything set by the above Set*() functions. void Reset(); nsresult ParseSheet(const nsAString& aInput, nsIURI* aSheetURI, @@ -294,21 +292,19 @@ protected: CSSParserImpl* mParser; }; // the caller must hold on to aString until parsing is done void InitScanner(const nsSubstring& aString, nsIURI* aSheetURI, PRUint32 aLineNumber, nsIURI* aBaseURI, nsIPrincipal* aSheetPrincipal); void ReleaseScanner(void); -#ifdef MOZ_SVG PRBool IsSVGMode() const { return mScanner.IsSVGMode(); } -#endif PRBool GetToken(PRBool aSkipWS); void UngetToken(); // get the part in paretheses of the url() function, which is really a // part of a token in the CSS grammar, but we're using a combination // of the parser and the scanner to do it to handle the backtracking // required by the error handling of the tokenization (since if we @@ -539,21 +535,19 @@ protected: const nsCSSValue* aInitialValues, nsCSSValue* aValues, size_t aNumProperties); PRBool ParseTransition(); #ifdef MOZ_CSS_ANIMATIONS PRBool ParseAnimation(); #endif -#ifdef MOZ_SVG PRBool ParsePaint(nsCSSProperty aPropID); PRBool ParseDasharray(); PRBool ParseMarker(); -#endif // Reused utility parsing routines void AppendValue(nsCSSProperty aPropID, const nsCSSValue& aValue); PRBool ParseBoxProperties(const nsCSSProperty aPropIDs[]); PRBool ParseDirectionalBoxProperty(nsCSSProperty aProperty, PRInt32 aSourceType); PRBool ParseBoxCornerRadius(const nsCSSProperty aPropID); PRBool ParseBoxCornerRadii(const nsCSSProperty aPropIDs[]); @@ -796,43 +790,39 @@ CSSParserImpl::SetStyleSheet(nsCSSStyleS nsresult CSSParserImpl::SetQuirkMode(PRBool aQuirkMode) { NS_ASSERTION(aQuirkMode == PR_TRUE || aQuirkMode == PR_FALSE, "bad PRBool value"); mNavQuirkMode = aQuirkMode; return NS_OK; } -#ifdef MOZ_SVG nsresult CSSParserImpl::SetSVGMode(PRBool aSVGMode) { NS_ASSERTION(aSVGMode == PR_TRUE || aSVGMode == PR_FALSE, "bad PRBool value"); mScanner.SetSVGMode(aSVGMode); return NS_OK; } -#endif nsresult CSSParserImpl::SetChildLoader(mozilla::css::Loader* aChildLoader) { mChildLoader = aChildLoader; // not ref counted, it owns us return NS_OK; } void CSSParserImpl::Reset() { NS_ASSERTION(! mScannerInited, "resetting with scanner active"); SetStyleSheet(nsnull); SetQuirkMode(PR_FALSE); -#ifdef MOZ_SVG SetSVGMode(PR_FALSE); -#endif // MOZ_SVG SetChildLoader(nsnull); } void CSSParserImpl::InitScanner(const nsSubstring& aString, nsIURI* aSheetURI, PRUint32 aLineNumber, nsIURI* aBaseURI, nsIPrincipal* aSheetPrincipal) { @@ -4582,27 +4572,25 @@ CSSParserImpl::ParseVariant(nsCSSValue& if (mNavQuirkMode && !IsParsingCompoundProperty()) { // NONSTANDARD: Nav interprets unitless numbers as px if (((aVariantMask & VARIANT_LENGTH) != 0) && (eCSSToken_Number == tk->mType)) { aValue.SetFloatValue(tk->mNumber, eCSSUnit_Pixel); return PR_TRUE; } } -#ifdef MOZ_SVG if (IsSVGMode() && !IsParsingCompoundProperty()) { // STANDARD: SVG Spec states that lengths and coordinates can be unitless // in which case they default to user-units (1 px = 1 user unit) if (((aVariantMask & VARIANT_LENGTH) != 0) && (eCSSToken_Number == tk->mType)) { aValue.SetFloatValue(tk->mNumber, eCSSUnit_Pixel); return PR_TRUE; } } -#endif if (((aVariantMask & VARIANT_URL) != 0) && eCSSToken_URL == tk->mType) { SetValueToURL(aValue, tk->mIdent); return PR_TRUE; } if ((aVariantMask & VARIANT_GRADIENT) != 0 && eCSSToken_Function == tk->mType) { @@ -5570,27 +5558,23 @@ CSSParserImpl::ParsePropertyByFunction(n case eCSSProperty_transition: return ParseTransition(); #ifdef MOZ_CSS_ANIMATIONS case eCSSProperty_animation: return ParseAnimation(); #endif case eCSSProperty_transition_property: return ParseTransitionProperty(); - -#ifdef MOZ_SVG case eCSSProperty_fill: case eCSSProperty_stroke: return ParsePaint(aPropID); case eCSSProperty_stroke_dasharray: return ParseDasharray(); case eCSSProperty_marker: return ParseMarker(); -#endif - default: NS_ABORT_IF_FALSE(PR_FALSE, "should not be called"); return PR_FALSE; } } // Bits used in determining which background position info we have #define BG_CENTER NS_STYLE_BG_POSITION_CENTER @@ -8577,17 +8561,16 @@ CSSParserImpl::SetDefaultNamespaceOnSele { if (mNameSpaceMap) { aSelector.SetNameSpace(mNameSpaceMap->FindNameSpaceID(nsnull)); } else { aSelector.SetNameSpace(kNameSpaceID_Unknown); // wildcard } } -#ifdef MOZ_SVG PRBool CSSParserImpl::ParsePaint(nsCSSProperty aPropID) { nsCSSValue x, y; if (!ParseVariant(x, VARIANT_HC | VARIANT_NONE | VARIANT_URL, nsnull)) return PR_FALSE; if (x.GetUnit() == eCSSUnit_URL) { if (!ParseVariant(y, VARIANT_COLOR | VARIANT_NONE, nsnull)) @@ -8644,17 +8627,16 @@ CSSParserImpl::ParseMarker() AppendValue(eCSSProperty_marker_end, marker); AppendValue(eCSSProperty_marker_mid, marker); AppendValue(eCSSProperty_marker_start, marker); return PR_TRUE; } } return PR_FALSE; } -#endif } // anonymous namespace // Recycling of parser implementation objects static CSSParserImpl* gFreeList = nsnull; nsCSSParser::nsCSSParser(mozilla::css::Loader* aLoader, @@ -8712,24 +8694,22 @@ nsCSSParser::SetStyleSheet(nsCSSStyleShe nsresult nsCSSParser::SetQuirkMode(PRBool aQuirkMode) { return static_cast<CSSParserImpl*>(mImpl)-> SetQuirkMode(aQuirkMode); } -#ifdef MOZ_SVG nsresult nsCSSParser::SetSVGMode(PRBool aSVGMode) { return static_cast<CSSParserImpl*>(mImpl)-> SetSVGMode(aSVGMode); } -#endif nsresult nsCSSParser::SetChildLoader(mozilla::css::Loader* aChildLoader) { return static_cast<CSSParserImpl*>(mImpl)-> SetChildLoader(aChildLoader); }
--- a/layout/style/nsCSSParser.h +++ b/layout/style/nsCSSParser.h @@ -83,20 +83,18 @@ public: // Set a style sheet for the parser to fill in. The style sheet must // implement the nsCSSStyleSheet interface. Null can be passed in to clear // out an existing stylesheet reference. nsresult SetStyleSheet(nsCSSStyleSheet* aSheet); // Set whether or not to emulate Nav quirks nsresult SetQuirkMode(PRBool aQuirkMode); -#ifdef MOZ_SVG // Set whether or not we are in an SVG element nsresult SetSVGMode(PRBool aSVGMode); -#endif // Set loader to use for child sheets nsresult SetChildLoader(mozilla::css::Loader* aChildLoader); /** * Parse aInput into the stylesheet that was previously set by calling * SetStyleSheet. Calling this method without calling SetStyleSheet first is * an error.
--- a/layout/style/nsStyleAnimation.cpp +++ b/layout/style/nsStyleAnimation.cpp @@ -1845,21 +1845,17 @@ BuildStyleRule(nsCSSProperty aProperty, declaration->InitializeEmpty(); PRBool changed; // ignored, but needed as outparam for ParseProperty nsIDocument* doc = aTargetElement->GetOwnerDoc(); nsCOMPtr<nsIURI> baseURI = aTargetElement->GetBaseURI(); nsCSSParser parser(doc->CSSLoader()); if (aUseSVGMode) { -#ifdef MOZ_SVG parser.SetSVGMode(PR_TRUE); -#else - NS_NOTREACHED("aUseSVGMode should not be set"); -#endif } nsCSSProperty propertyToCheck = nsCSSProps::IsShorthand(aProperty) ? nsCSSProps::SubpropertyEntryFor(aProperty)[0] : aProperty; // Get a parser, parse the property, and check for CSS parsing errors. // If any of these steps fails, we bail out and delete the declaration. if (NS_FAILED(parser.ParseProperty(aProperty, aSpecifiedValue,
--- a/layout/style/test/Makefile.in +++ b/layout/style/test/Makefile.in @@ -43,24 +43,16 @@ relativesrcdir = layout/style/test include $(DEPTH)/config/autoconf.mk MODULE = layout DIRS += chrome \ $(NULL) -# XXX Yuck. We can't transfer everything from autoconf to HOST_CFLAGS, -# but it would be nice to pick up anything affecting nsCSSPropList.h -# automatically. -ifdef MOZ_SVG -HOST_CFLAGS += -DMOZ_SVG=1 -HOST_CXXFLAGS += -DMOZ_SVG=1 -endif - HOST_CPPSRCS = \ ListCSSProperties.cpp \ $(NULL) HOST_SIMPLE_PROGRAMS = $(addprefix host_, $(HOST_CPPSRCS:.cpp=$(HOST_BIN_SUFFIX))) # ParseCSS.cpp used to be built as a test program, but it was not # being used for anything, and recent changes to the CSS loader have
--- a/parser/html/Makefile.in +++ b/parser/html/Makefile.in @@ -44,23 +44,18 @@ include $(DEPTH)/config/autoconf.mk MODULE = html5 LIBRARY_NAME = html5p_s LIBXUL_LIBRARY = 1 EXPORTS = \ nsHtml5Module.h \ nsAHtml5FragmentParser.h \ - $(NULL) - -ifdef MOZ_SVG -EXPORTS += \ nsHtml5SVGLoadDispatcher.h \ $(NULL) -endif CPPSRCS = \ nsHtml5Atoms.cpp \ nsHtml5Atom.cpp \ nsHtml5AtomTable.cpp \ nsHtml5Parser.cpp \ nsHtml5AttributeName.cpp \ nsHtml5ElementName.cpp \ @@ -78,23 +73,18 @@ CPPSRCS = \ nsHtml5MetaScanner.cpp \ nsHtml5TreeOperation.cpp \ nsHtml5TreeOpStage.cpp \ nsHtml5StateSnapshot.cpp \ nsHtml5TreeOpExecutor.cpp \ nsHtml5StreamParser.cpp \ nsHtml5Speculation.cpp \ nsHtml5SpeculativeLoad.cpp \ - $(NULL) - -ifdef MOZ_SVG -CPPSRCS += \ nsHtml5SVGLoadDispatcher.cpp \ $(NULL) -endif FORCE_STATIC_LIB = 1 include $(topsrcdir)/config/rules.mk INCLUDES += \ -I$(srcdir)/../../content/base/src \ $(NULL)
--- a/parser/html/nsHtml5TreeBuilderCppSupplement.h +++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h @@ -499,23 +499,21 @@ nsHtml5TreeBuilder::elementPopped(PRInt3 } if (aName == nsHtml5Atoms::style || (aNamespace == kNameSpaceID_XHTML && aName == nsHtml5Atoms::link)) { nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement(); NS_ASSERTION(treeOp, "Tree op allocation failed."); treeOp->Init(eTreeOpUpdateStyleSheet, aElement); return; } if (aNamespace == kNameSpaceID_SVG) { -#ifdef MOZ_SVG if (aName == nsHtml5Atoms::svg) { nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement(); NS_ASSERTION(treeOp, "Tree op allocation failed."); treeOp->Init(eTreeOpSvgLoad, aElement); } -#endif return; } // we now have only HTML // Some HTML nodes need DoneAddingChildren() called to initialize // properly (e.g. form state restoration). // XXX expose ElementName group here and do switch if (aName == nsHtml5Atoms::object || aName == nsHtml5Atoms::applet) {
--- a/parser/html/nsHtml5TreeOperation.cpp +++ b/parser/html/nsHtml5TreeOperation.cpp @@ -59,20 +59,17 @@ #include "nsIDOMDocumentType.h" #include "nsIObserverService.h" #include "mozilla/Services.h" #include "nsIMutationObserver.h" #include "nsIFormProcessor.h" #include "nsIServiceManager.h" #include "nsEscape.h" #include "mozilla/dom/Element.h" - -#ifdef MOZ_SVG #include "nsHtml5SVGLoadDispatcher.h" -#endif namespace dom = mozilla::dom; static NS_DEFINE_CID(kFormProcessorCID, NS_FORMPROCESSOR_CID); /** * Helper class that opens a notification batch if the current doc * is different from the executor doc. @@ -691,24 +688,22 @@ nsHtml5TreeOperation::Perform(nsHtml5Tre case eTreeOpSetScriptLineNumberAndFreeze: { nsIContent* node = *(mOne.node); nsCOMPtr<nsIScriptElement> sele = do_QueryInterface(node); NS_ASSERTION(sele, "Node didn't QI to script."); sele->SetScriptLineNumber(mInt); sele->FreezeUriAsyncDefer(); return rv; } -#ifdef MOZ_SVG case eTreeOpSvgLoad: { nsIContent* node = *(mOne.node); nsCOMPtr<nsIRunnable> event = new nsHtml5SVGLoadDispatcher(node); if (NS_FAILED(NS_DispatchToMainThread(event))) { NS_WARNING("failed to dispatch svg load dispatcher"); } return rv; } -#endif default: { NS_NOTREACHED("Bogus tree op"); } } return rv; // keep compiler happy }
--- a/parser/html/nsHtml5TreeOperation.h +++ b/parser/html/nsHtml5TreeOperation.h @@ -77,19 +77,17 @@ enum eHtml5TreeOperation { eTreeOpNeedsCharsetSwitchTo, eTreeOpUpdateStyleSheet, eTreeOpProcessMeta, eTreeOpProcessOfflineManifest, eTreeOpMarkMalformedIfScript, eTreeOpStreamEnded, eTreeOpSetStyleLineNumber, eTreeOpSetScriptLineNumberAndFreeze, -#ifdef MOZ_SVG eTreeOpSvgLoad, -#endif eTreeOpStartLayout }; class nsHtml5TreeOperationStringPair { private: nsString mPublicId; nsString mSystemId; public:
--- a/parser/htmlparser/src/CParserContext.cpp +++ b/parser/htmlparser/src/CParserContext.cpp @@ -82,19 +82,17 @@ CParserContext::SetMimeType(const nsACSt mDocType = ePlainText; if (mMimeType.EqualsLiteral(TEXT_HTML)) mDocType = eHTML_Strict; else if (mMimeType.EqualsLiteral(TEXT_XML) || mMimeType.EqualsLiteral(APPLICATION_XML) || mMimeType.EqualsLiteral(APPLICATION_XHTML_XML) || mMimeType.EqualsLiteral(TEXT_XUL) || -#ifdef MOZ_SVG mMimeType.EqualsLiteral(IMAGE_SVG_XML) || -#endif #ifdef MOZ_MATHML mMimeType.EqualsLiteral(APPLICATION_MATHML_XML) || #endif mMimeType.EqualsLiteral(APPLICATION_RDF_XML) || mMimeType.EqualsLiteral(TEXT_RDF)) mDocType = eXML; }
--- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -75,11 +75,9 @@ toolkit.jar: *+ content/global/bindings/toolbarbutton.xml (widgets/toolbarbutton.xml) *+ content/global/bindings/tree.xml (widgets/tree.xml) *+ content/global/bindings/videocontrols.xml (widgets/videocontrols.xml) *+ content/global/bindings/videocontrols.css (widgets/videocontrols.css) *+ content/global/bindings/wizard.xml (widgets/wizard.xml) #ifdef XP_MACOSX * content/global/macWindowMenu.js (macWindowMenu.js) #endif -#ifdef MOZ_SVG content/global/svg/svgBindings.xml (/layout/svg/base/src/resources/content/svgBindings.xml) -#endif
--- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -63,16 +63,17 @@ MAKEFILES_dom=" dom/interfaces/html/Makefile dom/interfaces/json/Makefile dom/interfaces/load-save/Makefile dom/interfaces/offline/Makefile dom/interfaces/range/Makefile dom/interfaces/sidebar/Makefile dom/interfaces/storage/Makefile dom/interfaces/stylesheets/Makefile + dom/interfaces/svg/Makefile dom/interfaces/threads/Makefile dom/interfaces/traversal/Makefile dom/interfaces/xbl/Makefile dom/interfaces/xpath/Makefile dom/interfaces/xul/Makefile dom/base/Makefile dom/src/Makefile dom/src/events/Makefile @@ -231,16 +232,21 @@ MAKEFILES_content=" content/events/src/Makefile content/html/Makefile content/html/content/Makefile content/html/content/public/Makefile content/html/content/src/Makefile content/html/document/Makefile content/html/document/public/Makefile content/html/document/src/Makefile + content/svg/Makefile + content/svg/document/Makefile + content/svg/document/src/Makefile + content/svg/content/Makefile + content/svg/content/src/Makefile content/xml/Makefile content/xml/content/Makefile content/xml/content/src/Makefile content/xml/document/Makefile content/xml/document/public/Makefile content/xml/document/resources/Makefile content/xml/document/src/Makefile content/xul/Makefile @@ -279,16 +285,17 @@ MAKEFILES_layout=" layout/forms/Makefile layout/generic/Makefile layout/inspector/public/Makefile layout/inspector/src/Makefile layout/printing/Makefile layout/style/Makefile layout/style/xbl-marquee/Makefile layout/tables/Makefile + layout/svg/base/src/Makefile layout/xul/base/public/Makefile layout/xul/base/src/Makefile layout/xul/base/src/grid/Makefile layout/xul/base/src/tree/src/Makefile layout/xul/base/src/tree/public/Makefile " MAKEFILES_libimg=" @@ -1099,28 +1106,16 @@ if [ "$MOZ_MATHML" ]; then add_makefiles " content/mathml/Makefile content/mathml/content/Makefile content/mathml/content/src/Makefile layout/mathml/Makefile " fi -if [ "$MOZ_SVG" ]; then - add_makefiles " - content/svg/Makefile - content/svg/document/Makefile - content/svg/document/src/Makefile - content/svg/content/Makefile - content/svg/content/src/Makefile - dom/interfaces/svg/Makefile - layout/svg/base/src/Makefile - " -fi - if [ "$MOZ_SMIL" ]; then add_makefiles " content/smil/Makefile dom/interfaces/smil/Makefile " fi if [ "$MOZ_XTF" ]; then
--- a/widget/public/nsGUIEvent.h +++ b/widget/public/nsGUIEvent.h @@ -103,20 +103,18 @@ class nsHashKey; #define NS_COMMAND_EVENT 24 #define NS_SCROLLAREA_EVENT 25 #define NS_TRANSITION_EVENT 26 #ifdef MOZ_CSS_ANIMATIONS #define NS_ANIMATION_EVENT 27 #endif #define NS_UI_EVENT 28 -#ifdef MOZ_SVG #define NS_SVG_EVENT 30 #define NS_SVGZOOM_EVENT 31 -#endif // MOZ_SVG #ifdef MOZ_SMIL #define NS_SMIL_TIME_EVENT 32 #endif // MOZ_SMIL #define NS_QUERY_CONTENT_EVENT 33 #define NS_DRAG_EVENT 35 #define NS_NOTIFYPAINT_EVENT 36 @@ -355,30 +353,28 @@ class nsHashKey; #define NS_UI_FOCUSIN (NS_UI_EVENT_START + 1) #define NS_UI_FOCUSOUT (NS_UI_EVENT_START + 2) // pagetransition events #define NS_PAGETRANSITION_START 2700 #define NS_PAGE_SHOW (NS_PAGETRANSITION_START + 1) #define NS_PAGE_HIDE (NS_PAGETRANSITION_START + 2) -#ifdef MOZ_SVG // SVG events #define NS_SVG_EVENT_START 2800 #define NS_SVG_LOAD (NS_SVG_EVENT_START) #define NS_SVG_UNLOAD (NS_SVG_EVENT_START + 1) #define NS_SVG_ABORT (NS_SVG_EVENT_START + 2) #define NS_SVG_ERROR (NS_SVG_EVENT_START + 3) #define NS_SVG_RESIZE (NS_SVG_EVENT_START + 4) #define NS_SVG_SCROLL (NS_SVG_EVENT_START + 5) // SVG Zoom events #define NS_SVGZOOM_EVENT_START 2900 #define NS_SVG_ZOOM (NS_SVGZOOM_EVENT_START) -#endif // MOZ_SVG // XUL command events #define NS_XULCOMMAND_EVENT_START 3000 #define NS_XUL_COMMAND (NS_XULCOMMAND_EVENT_START) // Cut, copy, paste events #define NS_CUTCOPYPASTE_EVENT_START 3100 #define NS_COPY (NS_CUTCOPYPASTE_EVENT_START)