diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 9e3f1c37360f..60bfd61fc88b 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -479,9 +479,7 @@ ; svg @BINPATH@/res/svg.css @BINPATH@/components/dom_svg.xpt -#ifdef MOZ_SMIL @BINPATH@/components/dom_smil.xpt -#endif ; [Personal Security Manager] ; diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index dd64d098d4b8..2dc0bad69e40 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -253,7 +253,6 @@ MOZ_PERMISSIONS = @MOZ_PERMISSIONS@ MOZ_XTF = @MOZ_XTF@ MOZ_SVG_DLISTS = @MOZ_SVG_DLISTS@ MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@ -MOZ_SMIL = @MOZ_SMIL@ MOZ_PREF_EXTENSIONS = @MOZ_PREF_EXTENSIONS@ diff --git a/configure.in b/configure.in index 154af03b5181..d7d353c02310 100644 --- a/configure.in +++ b/configure.in @@ -6189,18 +6189,6 @@ if test -n "$MOZ_SVG_DLISTS"; then AC_DEFINE(MOZ_SVG_DLISTS) fi -dnl ======================================================== -dnl SMIL -dnl ======================================================== -MOZ_SMIL=1 -MOZ_ARG_DISABLE_BOOL(smil, -[ --disable-smil Disable SMIL animation support], - MOZ_SMIL=, - MOZ_SMIL=1 ) -if test -n "$MOZ_SMIL"; then - AC_DEFINE(MOZ_SMIL) -fi - dnl ======================================================== dnl Build Freetype in the tree dnl ======================================================== @@ -8293,7 +8281,6 @@ AC_SUBST(MOZ_AUTH_EXTENSION) AC_SUBST(MOZ_PERMISSIONS) AC_SUBST(MOZ_XTF) AC_SUBST(MOZ_PREF_EXTENSIONS) -AC_SUBST(MOZ_SMIL) AC_SUBST(MOZ_JS_LIBS) AC_SUBST(MOZ_PSM) AC_SUBST(MOZ_DEBUG) diff --git a/content/base/public/nsIContent.h b/content/base/public/nsIContent.h index 911c5394efb4..dae882c92d6d 100644 --- a/content/base/public/nsIContent.h +++ b/content/base/public/nsIContent.h @@ -57,10 +57,8 @@ class nsAttrName; class nsTextFragment; class nsIDocShell; class nsIFrame; -#ifdef MOZ_SMIL class nsISMILAttr; class nsIDOMCSSStyleDeclaration; -#endif // MOZ_SMIL namespace mozilla { namespace css { @@ -891,7 +889,6 @@ public: mPrimaryFrame = aFrame; } -#ifdef MOZ_SMIL /* * Returns a new nsISMILAttr that allows the caller to animate the given * attribute on this element. @@ -924,7 +921,6 @@ public: */ virtual nsresult SetSMILOverrideStyleRule(mozilla::css::StyleRule* aStyleRule, bool aNotify) = 0; -#endif // MOZ_SMIL nsresult LookupNamespaceURI(const nsAString& aNamespacePrefix, nsAString& aNamespaceURI) const; diff --git a/content/base/public/nsIDocument.h b/content/base/public/nsIDocument.h index 18b5e397993b..70925c18b71b 100644 --- a/content/base/public/nsIDocument.h +++ b/content/base/public/nsIDocument.h @@ -61,9 +61,7 @@ #include "nsGkAtoms.h" #include "nsAutoPtr.h" #include "nsPIDOMWindow.h" -#ifdef MOZ_SMIL #include "nsSMILAnimationController.h" -#endif // MOZ_SMIL #include "nsIScriptGlobalObject.h" #include "nsIDocumentEncoder.h" #include "nsIAnimationFrameListener.h" @@ -1326,7 +1324,6 @@ public: void EnumerateFreezableElements(FreezableElementEnumerator aEnumerator, void* aData); -#ifdef MOZ_SMIL // Indicates whether mAnimationController has been (lazily) initialized. // If this returns true, we're promising that GetAnimationController() // will have a non-null return value. @@ -1336,7 +1333,6 @@ public: // initialization, if this document supports animation and if // mAnimationController isn't yet initialized. virtual nsSMILAnimationController* GetAnimationController() = 0; -#endif // MOZ_SMIL // Makes the images on this document capable of having their animation // active or suspended. An Image will animate as long as at least one of its @@ -1649,10 +1645,8 @@ protected: // themselves when they go away. nsAutoPtr > > mFreezableElements; -#ifdef MOZ_SMIL // SMIL Animation Controller, lazily-initialized in GetAnimationController nsRefPtr mAnimationController; -#endif // MOZ_SMIL // Table of element properties for this document. nsPropertyTable mPropertyTable; diff --git a/content/base/public/nsINode.h b/content/base/public/nsINode.h index 354c787320a4..80e157922f8f 100644 --- a/content/base/public/nsINode.h +++ b/content/base/public/nsINode.h @@ -284,9 +284,7 @@ private: // 0 is global. #define DOM_USER_DATA 1 #define DOM_USER_DATA_HANDLER 2 -#ifdef MOZ_SMIL #define SMIL_MAPPED_ATTR_ANIMVAL 3 -#endif // MOZ_SMIL // IID for the nsINode interface #define NS_INODE_IID \ diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index e58277f46a5d..f41896c918d4 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -185,11 +185,9 @@ #include "nsDOMNavigationTiming.h" #include "nsEventStateManager.h" -#ifdef MOZ_SMIL #include "nsSMILAnimationController.h" #include "imgIContainer.h" #include "nsSVGUtils.h" -#endif // MOZ_SMIL #include "nsRefreshDriver.h" @@ -1591,11 +1589,9 @@ nsDocument::~nsDocument() mStyleSheetSetList->Disconnect(); } -#ifdef MOZ_SMIL if (mAnimationController) { mAnimationController->Disconnect(); } -#endif // MOZ_SMIL mParentDocument = nsnull; @@ -1878,12 +1874,10 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsDocument) cb.NoteXPCOMChild(tmp->mAnimationFrameListeners[i]); } -#ifdef MOZ_SMIL // Traverse animation components if (tmp->mAnimationController) { tmp->mAnimationController->Traverse(&cb); } -#endif // MOZ_SMIL if (tmp->mSubDocuments && tmp->mSubDocuments->ops) { PL_DHashTableEnumerate(tmp->mSubDocuments, SubDocTraverser, &cb); @@ -1955,11 +1949,9 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDocument) tmp->mIdentifierMap.Clear(); -#ifdef MOZ_SMIL if (tmp->mAnimationController) { tmp->mAnimationController->Unlink(); } -#endif // MOZ_SMIL tmp->mInUnlinkOrDeletion = false; NS_IMPL_CYCLE_COLLECTION_UNLINK_END @@ -3768,13 +3760,11 @@ nsDocument::SetScriptGlobalObject(nsIScriptGlobalObject *aScriptGlobalObject) "Script global object must be an inner window!"); } #endif -#ifdef MOZ_SMIL NS_ABORT_IF_FALSE(aScriptGlobalObject || !mAnimationController || mAnimationController->IsPausedByType( nsSMILTimeContainer::PAUSE_PAGEHIDE | nsSMILTimeContainer::PAUSE_BEGIN), "Clearing window pointer while animations are unpaused"); -#endif // MOZ_SMIL if (mScriptGlobalObject && !aScriptGlobalObject) { // We're detaching from the window. We need to grab a pointer to @@ -5535,7 +5525,6 @@ nsDocument::EnumerateExternalResources(nsSubDocEnumFunc aCallback, void* aData) mExternalResourceMap.EnumerateResources(aCallback, aData); } -#ifdef MOZ_SMIL nsSMILAnimationController* nsDocument::GetAnimationController() { @@ -5570,7 +5559,6 @@ nsDocument::GetAnimationController() return mAnimationController; } -#endif // MOZ_SMIL struct DirTable { const char* mName; @@ -7279,11 +7267,9 @@ nsDocument::OnPageShow(bool aPersisted, mIsShowing = true; } -#ifdef MOZ_SMIL if (mAnimationController) { mAnimationController->OnPageShow(); } -#endif if (aPersisted) { SetImagesNeedAnimating(true); @@ -7349,11 +7335,9 @@ nsDocument::OnPageHide(bool aPersisted, mIsShowing = false; } -#ifdef MOZ_SMIL if (mAnimationController) { mAnimationController->OnPageHide(); } -#endif if (aPersisted) { SetImagesNeedAnimating(false); @@ -8544,18 +8528,18 @@ GetCommonAncestor(nsIDocument* aDoc1, nsIDocument* aDoc2) return parent; } -// Returns the root document in a document hierarchy. -static nsIDocument* -GetRootDocument(nsIDocument* aDoc) -{ - if (!aDoc) - return nsnull; - nsIDocument* doc = aDoc; - while (doc->GetParentDocument()) { - doc = doc->GetParentDocument(); - } - return doc; -} +// Returns the root document in a document hierarchy. +static nsIDocument* +GetRootDocument(nsIDocument* aDoc) +{ + if (!aDoc) + return nsnull; + nsIDocument* doc = aDoc; + while (doc->GetParentDocument()) { + doc = doc->GetParentDocument(); + } + return doc; +} class nsCallRequestFullScreen : public nsRunnable { @@ -8588,7 +8572,7 @@ nsDocument::AsyncRequestFullScreen(Element* aElement) // Request full-screen asynchronously. nsCOMPtr event(new nsCallRequestFullScreen(aElement)); NS_DispatchToCurrentThread(event); -} +} void nsDocument::RequestFullScreen(Element* aElement, bool aWasCallerChrome) diff --git a/content/base/src/nsDocument.h b/content/base/src/nsDocument.h index bd541def4d95..b0a60ae7522d 100644 --- a/content/base/src/nsDocument.h +++ b/content/base/src/nsDocument.h @@ -865,11 +865,9 @@ public: nsTArray mFileDataUris; -#ifdef MOZ_SMIL // Returns our (lazily-initialized) animation controller. // If HasAnimationController is true, this is guaranteed to return non-null. nsSMILAnimationController* GetAnimationController(); -#endif // MOZ_SMIL void SetImagesNeedAnimating(bool aAnimating); diff --git a/content/base/src/nsGenericDOMDataNode.cpp b/content/base/src/nsGenericDOMDataNode.cpp index e08c2950dc8c..d3fbc413fbc5 100644 --- a/content/base/src/nsGenericDOMDataNode.cpp +++ b/content/base/src/nsGenericDOMDataNode.cpp @@ -928,7 +928,6 @@ nsGenericDOMDataNode::WalkContentStyleRules(nsRuleWalker* aRuleWalker) return NS_OK; } -#ifdef MOZ_SMIL nsIDOMCSSStyleDeclaration* nsGenericDOMDataNode::GetSMILOverrideStyle() { @@ -948,7 +947,6 @@ nsGenericDOMDataNode::SetSMILOverrideStyleRule(css::StyleRule* aStyleRule, NS_NOTREACHED("How come we're setting SMILOverrideStyle on a non-element?"); return NS_ERROR_UNEXPECTED; } -#endif // MOZ_SMIL css::StyleRule* nsGenericDOMDataNode::GetInlineStyleRule() diff --git a/content/base/src/nsGenericDOMDataNode.h b/content/base/src/nsGenericDOMDataNode.h index 1034b26fe54a..d656aed38a67 100644 --- a/content/base/src/nsGenericDOMDataNode.h +++ b/content/base/src/nsGenericDOMDataNode.h @@ -52,9 +52,7 @@ #include "nsCycleCollectionParticipant.h" #include "nsDOMMemoryReporter.h" -#ifdef MOZ_SMIL #include "nsISMILAttr.h" -#endif // MOZ_SMIL // This bit is set to indicate that if the text node changes to // non-whitespace, we may need to create a frame for it. This bit must @@ -228,7 +226,6 @@ public: virtual void DestroyContent(); virtual void SaveSubtreeState(); -#ifdef MOZ_SMIL virtual nsISMILAttr* GetAnimatedAttr(PRInt32 /*aNamespaceID*/, nsIAtom* /*aName*/) { return nsnull; @@ -237,7 +234,6 @@ public: virtual mozilla::css::StyleRule* GetSMILOverrideStyleRule(); virtual nsresult SetSMILOverrideStyleRule(mozilla::css::StyleRule* aStyleRule, bool aNotify); -#endif // MOZ_SMIL #ifdef DEBUG virtual void List(FILE* out, PRInt32 aIndent) const; diff --git a/content/base/src/nsGenericElement.cpp b/content/base/src/nsGenericElement.cpp index 7a37d3750945..975662ac6898 100644 --- a/content/base/src/nsGenericElement.cpp +++ b/content/base/src/nsGenericElement.cpp @@ -2293,10 +2293,8 @@ nsGenericElement::nsDOMSlots::Traverse(nsCycleCollectionTraversalCallback &cb, b NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mSlots->mStyle"); cb.NoteXPCOMChild(mStyle.get()); -#ifdef MOZ_SMIL NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mSlots->mSMILOverrideStyle"); cb.NoteXPCOMChild(mSMILOverrideStyle.get()); -#endif // MOZ_SMIL NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mSlots->mAttributeMap"); cb.NoteXPCOMChild(mAttributeMap.get()); @@ -2314,9 +2312,7 @@ void nsGenericElement::nsDOMSlots::Unlink(bool aIsXUL) { mStyle = nsnull; -#ifdef MOZ_SMIL mSMILOverrideStyle = nsnull; -#endif // MOZ_SMIL if (mAttributeMap) { mAttributeMap->DropReference(); mAttributeMap = nsnull; @@ -2456,13 +2452,11 @@ nsGenericElement::InternalIsSupported(nsISupports* aObject, *aReturn = true; } } -#ifdef MOZ_SMIL else if (NS_SMILEnabled() && PL_strcasecmp(f, "TimeControl") == 0) { if (aVersion.IsEmpty() || PL_strcmp(v, "1.0") == 0) { *aReturn = true; } } -#endif /* MOZ_SMIL */ return NS_OK; } @@ -3355,7 +3349,6 @@ nsGenericElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker) return NS_OK; } -#ifdef MOZ_SMIL nsIDOMCSSStyleDeclaration* nsGenericElement::GetSMILOverrideStyle() { @@ -3398,7 +3391,6 @@ nsGenericElement::SetSMILOverrideStyleRule(css::StyleRule* aStyleRule, return NS_OK; } -#endif // MOZ_SMIL css::StyleRule* nsGenericElement::GetInlineStyleRule() diff --git a/content/base/src/nsGenericElement.h b/content/base/src/nsGenericElement.h index 6ab843b020cf..0098db61e74b 100644 --- a/content/base/src/nsGenericElement.h +++ b/content/base/src/nsGenericElement.h @@ -67,9 +67,7 @@ #include "nsIDOMTouchEvent.h" #include "nsIInlineEventHandlers.h" -#ifdef MOZ_SMIL #include "nsISMILAttr.h" -#endif // MOZ_SMIL class nsIDOMAttr; class nsIDOMEventListener; @@ -349,7 +347,6 @@ public: virtual void DestroyContent(); virtual void SaveSubtreeState(); -#ifdef MOZ_SMIL virtual nsISMILAttr* GetAnimatedAttr(PRInt32 /*aNamespaceID*/, nsIAtom* /*aName*/) { return nsnull; @@ -358,7 +355,6 @@ public: virtual mozilla::css::StyleRule* GetSMILOverrideStyleRule(); virtual nsresult SetSMILOverrideStyleRule(mozilla::css::StyleRule* aStyleRule, bool aNotify); -#endif // MOZ_SMIL #ifdef DEBUG virtual void List(FILE* out, PRInt32 aIndent) const diff --git a/content/base/src/nsGkAtomList.h b/content/base/src/nsGkAtomList.h index 39171d5b71e8..1742fb571b92 100644 --- a/content/base/src/nsGkAtomList.h +++ b/content/base/src/nsGkAtomList.h @@ -1368,7 +1368,6 @@ GK_ATOM(yChannelSelector, "yChannelSelector") GK_ATOM(z, "z") GK_ATOM(zoomAndPan, "zoomAndPan") -#ifdef MOZ_SMIL GK_ATOM(accumulate, "accumulate") GK_ATOM(additive, "additive") GK_ATOM(attributeName, "attributeName") @@ -1395,7 +1394,6 @@ GK_ATOM(repeatEvent, "repeatEvent") GK_ATOM(restart, "restart") GK_ATOM(to, "to") GK_ATOM(XML, "XML") -#endif // internal MathML attributes: different from columnalign_, columnlines_, // fontstyle_, rowalign_ and rowlines_ diff --git a/content/base/src/nsStyledElement.cpp b/content/base/src/nsStyledElement.cpp index 8af63ed9deeb..e4f000fd412b 100644 --- a/content/base/src/nsStyledElement.cpp +++ b/content/base/src/nsStyledElement.cpp @@ -271,11 +271,7 @@ nsStyledElementNotElementCSSInlineStyle::GetStyle(nsresult* retval) // Just in case... ReparseStyleAttribute(true); - slots->mStyle = new nsDOMCSSAttributeDeclaration(this -#ifdef MOZ_SMIL - , false -#endif // MOZ_SMIL - ); + slots->mStyle = new nsDOMCSSAttributeDeclaration(this, false); SetMayHaveStyle(); } diff --git a/content/base/src/nsTreeSanitizer.cpp b/content/base/src/nsTreeSanitizer.cpp index f922b6ad5466..1222d732f76d 100644 --- a/content/base/src/nsTreeSanitizer.cpp +++ b/content/base/src/nsTreeSanitizer.cpp @@ -323,7 +323,6 @@ nsIAtom** const kURLAttributesHTML[] = { }; nsIAtom** const kElementsSVG[] = { -#ifdef MOZ_SVG &nsGkAtoms::a, // a &nsGkAtoms::altGlyph, // altGlyph &nsGkAtoms::altGlyphDef, // altGlyphDef @@ -407,39 +406,29 @@ nsIAtom** const kElementsSVG[] = { &nsGkAtoms::use, // use &nsGkAtoms::view, // view &nsGkAtoms::vkern, // vkern -#endif nsnull }; nsIAtom** const kAttributesSVG[] = { -#ifdef MOZ_SVG // accent-height -#ifdef MOZ_SMIL &nsGkAtoms::accumulate, // accumulate &nsGkAtoms::additive, // additive -#endif &nsGkAtoms::alignment_baseline, // alignment-baseline // alphabetic &nsGkAtoms::amplitude, // amplitude // arabic-form // ascent -#ifdef MOZ_SMIL &nsGkAtoms::attributeName, // attributeName &nsGkAtoms::attributeType, // attributeType -#endif &nsGkAtoms::azimuth, // azimuth &nsGkAtoms::baseFrequency, // baseFrequency &nsGkAtoms::baseline_shift, // baseline-shift // baseProfile // bbox -#ifdef MOZ_SMIL &nsGkAtoms::begin, // begin -#endif &nsGkAtoms::bias, // bias -#ifdef MOZ_SMIL &nsGkAtoms::by, // by &nsGkAtoms::calcMode, // calcMode -#endif // cap-height &nsGkAtoms::_class, // class &nsGkAtoms::clip_path, // clip-path @@ -460,17 +449,13 @@ nsIAtom** const kAttributesSVG[] = { &nsGkAtoms::display, // display &nsGkAtoms::divisor, // divisor &nsGkAtoms::dominant_baseline, // dominant-baseline -#ifdef MOZ_SMIL &nsGkAtoms::dur, // dur -#endif &nsGkAtoms::dx, // dx &nsGkAtoms::dy, // dy &nsGkAtoms::edgeMode, // edgeMode &nsGkAtoms::elevation, // elevation // enable-background -#ifdef MOZ_SMIL &nsGkAtoms::end, // end -#endif &nsGkAtoms::fill, // fill &nsGkAtoms::fill_opacity, // fill-opacity &nsGkAtoms::fill_rule, // fill-rule @@ -518,11 +503,9 @@ nsIAtom** const kAttributesSVG[] = { &nsGkAtoms::kerning, // kerning &nsGkAtoms::kernelMatrix, // kernelMatrix &nsGkAtoms::kernelUnitLength, // kernelUnitLength -#ifdef MOZ_SMIL &nsGkAtoms::keyPoints, // keyPoints &nsGkAtoms::keySplines, // keySplines &nsGkAtoms::keyTimes, // keyTimes -#endif &nsGkAtoms::lang, // lang // lengthAdjust &nsGkAtoms::letter_spacing, // letter-spacing @@ -575,15 +558,11 @@ nsIAtom** const kAttributesSVG[] = { &nsGkAtoms::radius, // radius &nsGkAtoms::refX, // refX &nsGkAtoms::refY, // refY -#ifdef MOZ_SMIL &nsGkAtoms::repeatCount, // repeatCount &nsGkAtoms::repeatDur, // repeatDur -#endif &nsGkAtoms::requiredExtensions, // requiredExtensions &nsGkAtoms::requiredFeatures, // requiredFeatures -#ifdef MOZ_SMIL &nsGkAtoms::restart, // restart -#endif &nsGkAtoms::result, // result &nsGkAtoms::rotate, // rotate &nsGkAtoms::rx, // rx @@ -625,9 +604,7 @@ nsIAtom** const kAttributesSVG[] = { // textLength &nsGkAtoms::text_rendering, // text-rendering &nsGkAtoms::title, // title -#ifdef MOZ_SMIL &nsGkAtoms::to, // to -#endif &nsGkAtoms::transform, // transform &nsGkAtoms::type, // type // u1 @@ -664,7 +641,6 @@ nsIAtom** const kAttributesSVG[] = { &nsGkAtoms::yChannelSelector, // yChannelSelector &nsGkAtoms::z, // z &nsGkAtoms::zoomAndPan, // zoomAndPan -#endif nsnull }; diff --git a/content/events/public/nsEventNameList.h b/content/events/public/nsEventNameList.h index a202dbc68ffa..7b6e5fe88f76 100644 --- a/content/events/public/nsEventNameList.h +++ b/content/events/public/nsEventNameList.h @@ -648,7 +648,6 @@ NON_IDL_EVENT(zoom, NS_SVG_ZOOM, EventNameType_SVGSVG, NS_EVENT_NULL) -#ifdef MOZ_SMIL NON_IDL_EVENT(begin, NS_SMIL_BEGIN, EventNameType_SMIL, @@ -673,7 +672,6 @@ NON_IDL_EVENT(repeatEvent, NS_SMIL_REPEAT, EventNameType_None, NS_SMIL_TIME_EVENT) -#endif // MOZ_SMIL NON_IDL_EVENT(MozAudioAvailable, NS_MOZAUDIOAVAILABLE, diff --git a/content/events/public/nsIPrivateDOMEvent.h b/content/events/public/nsIPrivateDOMEvent.h index a0cb1e7d8523..0a4c447c21fb 100644 --- a/content/events/public/nsIPrivateDOMEvent.h +++ b/content/events/public/nsIPrivateDOMEvent.h @@ -105,10 +105,8 @@ nsresult NS_NewDOMSVGEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, class nsEvent* aEvent); nsresult NS_NewDOMSVGZoomEvent(nsIDOMEvent** aResult, nsPresContext* aPresContext, class nsGUIEvent* aEvent); -#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 diff --git a/content/events/src/nsDOMEvent.cpp b/content/events/src/nsDOMEvent.cpp index 6252eee1fb4e..059b6e747c17 100644 --- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -85,9 +85,7 @@ static const char* const sEventNames[] = { "offline", "online", "copy", "cut", "paste", "open", "message", "show", "SVGLoad", "SVGUnload", "SVGAbort", "SVGError", "SVGResize", "SVGScroll", "SVGZoom", -#ifdef MOZ_SMIL "beginEvent", "endEvent", "repeatEvent", -#endif // MOZ_SMIL #ifdef MOZ_MEDIA "loadstart", "progress", "suspend", "emptied", "stalled", "play", "pause", "loadedmetadata", "loadeddata", "waiting", "playing", "canplay", @@ -804,7 +802,6 @@ NS_METHOD nsDOMEvent::DuplicatePrivateData() newEvent->eventStructType = NS_SVGZOOM_EVENT; break; } -#ifdef MOZ_SMIL case NS_SMIL_TIME_EVENT: { newEvent = new nsUIEvent(false, msg, 0); @@ -812,7 +809,6 @@ NS_METHOD nsDOMEvent::DuplicatePrivateData() newEvent->eventStructType = NS_SMIL_TIME_EVENT; break; } -#endif // MOZ_SMIL case NS_SIMPLE_GESTURE_EVENT: { nsSimpleGestureEvent* oldSimpleGestureEvent = static_cast(mEvent); @@ -1295,14 +1291,12 @@ const char* nsDOMEvent::GetEventName(PRUint32 aEventType) return sEventNames[eDOMEvents_SVGScroll]; case NS_SVG_ZOOM: return sEventNames[eDOMEvents_SVGZoom]; -#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 #ifdef MOZ_MEDIA case NS_LOADSTART: return sEventNames[eDOMEvents_loadstart]; diff --git a/content/events/src/nsDOMEvent.h b/content/events/src/nsDOMEvent.h index 4455a088b264..dd6c63d4db4a 100644 --- a/content/events/src/nsDOMEvent.h +++ b/content/events/src/nsDOMEvent.h @@ -149,11 +149,9 @@ public: eDOMEvents_SVGResize, eDOMEvents_SVGScroll, eDOMEvents_SVGZoom, -#ifdef MOZ_SMIL eDOMEvents_beginEvent, eDOMEvents_endEvent, eDOMEvents_repeatEvent, -#endif // MOZ_SMIL #ifdef MOZ_MEDIA eDOMEvents_loadstart, eDOMEvents_progress, diff --git a/content/events/src/nsEventDispatcher.cpp b/content/events/src/nsEventDispatcher.cpp index 69e7154e393c..00f1188c894c 100644 --- a/content/events/src/nsEventDispatcher.cpp +++ b/content/events/src/nsEventDispatcher.cpp @@ -792,10 +792,8 @@ nsEventDispatcher::CreateEvent(nsPresContext* aPresContext, case NS_SVGZOOM_EVENT: return NS_NewDOMSVGZoomEvent(aDOMEvent, aPresContext, static_cast(aEvent)); -#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, @@ -859,11 +857,9 @@ nsEventDispatcher::CreateEvent(nsPresContext* aPresContext, if (aEventType.LowerCaseEqualsLiteral("svgzoomevent") || aEventType.LowerCaseEqualsLiteral("svgzoomevents")) return NS_NewDOMSVGZoomEvent(aDOMEvent, aPresContext, nsnull); -#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); diff --git a/content/events/src/nsEventListenerManager.cpp b/content/events/src/nsEventListenerManager.cpp index 84f509bad0ff..0d9a752e1a85 100644 --- a/content/events/src/nsEventListenerManager.cpp +++ b/content/events/src/nsEventListenerManager.cpp @@ -624,14 +624,12 @@ nsEventListenerManager::CompileEventHandlerInternal(nsListenerStruct *aListenerS attrName = nsGkAtoms::onscroll; else if (aListenerStruct->mTypeAtom == nsGkAtoms::onSVGZoom) attrName = nsGkAtoms::onzoom; -#ifdef MOZ_SMIL else if (aListenerStruct->mTypeAtom == nsGkAtoms::onbeginEvent) attrName = nsGkAtoms::onbegin; else if (aListenerStruct->mTypeAtom == nsGkAtoms::onrepeatEvent) attrName = nsGkAtoms::onrepeat; else if (aListenerStruct->mTypeAtom == nsGkAtoms::onendEvent) attrName = nsGkAtoms::onend; -#endif // MOZ_SMIL content->GetAttr(kNameSpaceID_None, attrName, handlerBody); body = &handlerBody; diff --git a/content/smil/Makefile.in b/content/smil/Makefile.in index a9de7ba95721..232791b4943b 100644 --- a/content/smil/Makefile.in +++ b/content/smil/Makefile.in @@ -46,14 +46,21 @@ MODULE = content LIBRARY_NAME = gkconsmil_s LIBXUL_LIBRARY = 1 +EXPORTS = \ + nsISMILAnimationElement.h \ + nsISMILAttr.h \ + nsISMILType.h \ + nsSMILAnimationController.h \ + nsSMILCompositorTable.h \ + nsSMILCSSProperty.h \ + nsSMILKeySpline.h \ + nsSMILMappedAttribute.h \ + nsSMILMilestone.h \ + nsSMILTimeContainer.h \ + nsSMILTypes.h \ + $(NULL) -# nsSMILKeySpline is used by CSS transitions -- need to build it regardless -# of whether SMIL is enabled. -CPPSRCS = nsSMILKeySpline.cpp -EXPORTS = nsSMILKeySpline.h - -ifdef MOZ_SMIL -CPPSRCS += \ +CPPSRCS = \ nsDOMTimeEvent.cpp \ nsSMILAnimationController.cpp \ nsSMILAnimationFunction.cpp \ @@ -63,6 +70,7 @@ CPPSRCS += \ nsSMILFloatType.cpp \ nsSMILInstanceTime.cpp \ nsSMILInterval.cpp \ + nsSMILKeySpline.cpp \ nsSMILMappedAttribute.cpp \ nsSMILNullType.cpp \ nsSMILParserUtils.cpp \ @@ -77,39 +85,22 @@ CPPSRCS += \ SMILEnumType.cpp \ SMILIntegerType.cpp \ SMILStringType.cpp \ - $(NULL) -endif + $(NULL) include $(topsrcdir)/config/config.mk # we don't want the shared lib, but we want to force the creation of a static lib. FORCE_STATIC_LIB = 1 -ifdef MOZ_SMIL ifdef ENABLE_TESTS TOOL_DIRS += test endif # ENABLE_TESTS -EXPORTS += \ - nsISMILAnimationElement.h \ - nsISMILAttr.h \ - nsISMILType.h \ - nsSMILAnimationController.h \ - nsSMILCompositorTable.h \ - nsSMILCSSProperty.h \ - nsSMILKeySpline.h \ - nsSMILMappedAttribute.h \ - nsSMILMilestone.h \ - nsSMILTimeContainer.h \ - nsSMILTypes.h \ - $(NULL) - INCLUDES += \ -I$(srcdir)/../base/src \ -I$(srcdir)/../../layout/style \ -I$(srcdir)/../events/src \ $(NULL) -endif # MOZ_SMIL include $(topsrcdir)/config/rules.mk diff --git a/content/svg/content/src/DOMSVGLength.cpp b/content/svg/content/src/DOMSVGLength.cpp index 1c1092ea58d2..8e0de116e52d 100644 --- a/content/svg/content/src/DOMSVGLength.cpp +++ b/content/svg/content/src/DOMSVGLength.cpp @@ -111,11 +111,9 @@ DOMSVGLength::DOMSVGLength() NS_IMETHODIMP DOMSVGLength::GetUnitType(PRUint16* aUnit) { -#ifdef MOZ_SMIL if (mIsAnimValItem && HasOwner()) { Element()->FlushAnimations(); // May make HasOwner() == false } -#endif *aUnit = HasOwner() ? InternalItem().GetUnit() : mUnit; return NS_OK; } @@ -123,11 +121,9 @@ DOMSVGLength::GetUnitType(PRUint16* aUnit) NS_IMETHODIMP DOMSVGLength::GetValue(float* aValue) { -#ifdef MOZ_SMIL if (mIsAnimValItem && HasOwner()) { Element()->FlushAnimations(); // May make HasOwner() == false } -#endif if (HasOwner()) { *aValue = InternalItem().GetValueInUserUnits(Element(), Axis()); if (NS_finite(*aValue)) { @@ -162,11 +158,9 @@ DOMSVGLength::SetValue(float aUserUnitValue) if (HasOwner()) { if (InternalItem().SetFromUserUnitValue(aUserUnitValue, Element(), Axis())) { Element()->DidChangeLengthList(mAttrEnum, true); -#ifdef MOZ_SMIL if (mList->mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } } else if (mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER || @@ -182,11 +176,9 @@ DOMSVGLength::SetValue(float aUserUnitValue) NS_IMETHODIMP DOMSVGLength::GetValueInSpecifiedUnits(float* aValue) { -#ifdef MOZ_SMIL if (mIsAnimValItem && HasOwner()) { Element()->FlushAnimations(); // May make HasOwner() == false } -#endif *aValue = HasOwner() ? InternalItem().GetValueInCurrentUnits() : mValue; return NS_OK; } @@ -205,11 +197,9 @@ DOMSVGLength::SetValueInSpecifiedUnits(float aValue) if (HasOwner()) { InternalItem().SetValueInCurrentUnits(aValue); Element()->DidChangeLengthList(mAttrEnum, true); -#ifdef MOZ_SMIL if (mList->mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } mValue = aValue; @@ -230,11 +220,9 @@ DOMSVGLength::SetValueAsString(const nsAString& aValue) if (HasOwner()) { InternalItem() = value; Element()->DidChangeLengthList(mAttrEnum, true); -#ifdef MOZ_SMIL if (mList->mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } mValue = value.GetValueInCurrentUnits(); @@ -245,11 +233,9 @@ DOMSVGLength::SetValueAsString(const nsAString& aValue) NS_IMETHODIMP DOMSVGLength::GetValueAsString(nsAString& aValue) { -#ifdef MOZ_SMIL if (mIsAnimValItem && HasOwner()) { Element()->FlushAnimations(); // May make HasOwner() == false } -#endif if (HasOwner()) { InternalItem().GetValueAsString(aValue); return NS_OK; @@ -275,11 +261,9 @@ DOMSVGLength::NewValueSpecifiedUnits(PRUint16 aUnit, float aValue) if (HasOwner()) { InternalItem().SetValueAndUnit(aValue, PRUint8(aUnit)); Element()->DidChangeLengthList(mAttrEnum, true); -#ifdef MOZ_SMIL if (mList->mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } mUnit = PRUint8(aUnit); diff --git a/content/svg/content/src/DOMSVGLengthList.cpp b/content/svg/content/src/DOMSVGLengthList.cpp index 883bea785813..0fa07eba22ba 100644 --- a/content/svg/content/src/DOMSVGLengthList.cpp +++ b/content/svg/content/src/DOMSVGLengthList.cpp @@ -95,11 +95,9 @@ NS_INTERFACE_MAP_END nsIDOMSVGLength* DOMSVGLengthList::GetItemWithoutAddRef(PRUint32 aIndex) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif if (aIndex < Length()) { EnsureItemAt(aIndex); return mItems[aIndex]; @@ -158,11 +156,9 @@ DOMSVGLengthList::InternalList() NS_IMETHODIMP DOMSVGLengthList::GetNumberOfItems(PRUint32 *aNumberOfItems) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif *aNumberOfItems = Length(); return NS_OK; } @@ -183,11 +179,9 @@ DOMSVGLengthList::Clear() mItems.Clear(); InternalList().Clear(); Element()->DidChangeLengthList(AttrEnum(), true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif } return NS_OK; } @@ -276,11 +270,9 @@ DOMSVGLengthList::InsertItemBefore(nsIDOMSVGLength *newItem, UpdateListIndicesFromIndex(mItems, index + 1); Element()->DidChangeLengthList(AttrEnum(), true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif *_retval = domItem.forget().get(); return NS_OK; } @@ -320,11 +312,9 @@ DOMSVGLengthList::ReplaceItem(nsIDOMSVGLength *newItem, domItem->InsertingIntoList(this, AttrEnum(), index, IsAnimValList()); Element()->DidChangeLengthList(AttrEnum(), true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif NS_ADDREF(*_retval = domItem.get()); return NS_OK; } @@ -361,11 +351,9 @@ DOMSVGLengthList::RemoveItem(PRUint32 index, UpdateListIndicesFromIndex(mItems, index); Element()->DidChangeLengthList(AttrEnum(), true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } diff --git a/content/svg/content/src/DOMSVGNumber.cpp b/content/svg/content/src/DOMSVGNumber.cpp index 25c8d6f3a24c..2648f32b1d4b 100644 --- a/content/svg/content/src/DOMSVGNumber.cpp +++ b/content/svg/content/src/DOMSVGNumber.cpp @@ -106,11 +106,9 @@ DOMSVGNumber::DOMSVGNumber() NS_IMETHODIMP DOMSVGNumber::GetValue(float* aValue) { -#ifdef MOZ_SMIL if (mIsAnimValItem && HasOwner()) { Element()->FlushAnimations(); // May make HasOwner() == false } -#endif *aValue = HasOwner() ? InternalItem() : mValue; return NS_OK; } @@ -127,11 +125,9 @@ DOMSVGNumber::SetValue(float aValue) if (HasOwner()) { InternalItem() = aValue; Element()->DidChangeNumberList(mAttrEnum, true); -#ifdef MOZ_SMIL if (mList->mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } mValue = aValue; diff --git a/content/svg/content/src/DOMSVGNumberList.cpp b/content/svg/content/src/DOMSVGNumberList.cpp index 9abfb1d59c35..ca3a73c90e2a 100644 --- a/content/svg/content/src/DOMSVGNumberList.cpp +++ b/content/svg/content/src/DOMSVGNumberList.cpp @@ -95,11 +95,9 @@ NS_INTERFACE_MAP_END nsIDOMSVGNumber* DOMSVGNumberList::GetItemWithoutAddRef(PRUint32 aIndex) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif if (aIndex < Length()) { EnsureItemAt(aIndex); return mItems[aIndex]; @@ -158,11 +156,9 @@ DOMSVGNumberList::InternalList() NS_IMETHODIMP DOMSVGNumberList::GetNumberOfItems(PRUint32 *aNumberOfItems) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif *aNumberOfItems = Length(); return NS_OK; } @@ -183,11 +179,9 @@ DOMSVGNumberList::Clear() mItems.Clear(); InternalList().Clear(); Element()->DidChangeNumberList(AttrEnum(), true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif } return NS_OK; } @@ -276,11 +270,9 @@ DOMSVGNumberList::InsertItemBefore(nsIDOMSVGNumber *newItem, UpdateListIndicesFromIndex(mItems, index + 1); Element()->DidChangeNumberList(AttrEnum(), true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif *_retval = domItem.forget().get(); return NS_OK; } @@ -320,11 +312,9 @@ DOMSVGNumberList::ReplaceItem(nsIDOMSVGNumber *newItem, domItem->InsertingIntoList(this, AttrEnum(), index, IsAnimValList()); Element()->DidChangeNumberList(AttrEnum(), true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif NS_ADDREF(*_retval = domItem.get()); return NS_OK; } @@ -361,11 +351,9 @@ DOMSVGNumberList::RemoveItem(PRUint32 index, UpdateListIndicesFromIndex(mItems, index); Element()->DidChangeNumberList(AttrEnum(), true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } diff --git a/content/svg/content/src/DOMSVGPathSegList.cpp b/content/svg/content/src/DOMSVGPathSegList.cpp index a38c99264c02..f8aa5f14db6e 100644 --- a/content/svg/content/src/DOMSVGPathSegList.cpp +++ b/content/svg/content/src/DOMSVGPathSegList.cpp @@ -99,11 +99,9 @@ DOMSVGPathSegList::~DOMSVGPathSegList() nsIDOMSVGPathSeg* DOMSVGPathSegList::GetItemWithoutAddRef(PRUint32 aIndex) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif if (aIndex < Length()) { EnsureItemAt(aIndex); return ItemAt(aIndex); @@ -255,11 +253,9 @@ DOMSVGPathSegList::InternalAList() NS_IMETHODIMP DOMSVGPathSegList::GetNumberOfItems(PRUint32 *aNumberOfItems) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif *aNumberOfItems = Length(); return NS_OK; } @@ -289,11 +285,9 @@ DOMSVGPathSegList::Clear() InternalList().Clear(); Element()->DidChangePathSegList(true); -#ifdef MOZ_SMIL if (AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif } return NS_OK; } @@ -393,11 +387,9 @@ DOMSVGPathSegList::InsertItemBefore(nsIDOMSVGPathSeg *aNewItem, UpdateListIndicesFromIndex(aIndex + 1, argCount + 1); Element()->DidChangePathSegList(true); -#ifdef MOZ_SMIL if (AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif *_retval = domItem.forget().get(); return NS_OK; } @@ -459,11 +451,9 @@ DOMSVGPathSegList::ReplaceItem(nsIDOMSVGPathSeg *aNewItem, } Element()->DidChangePathSegList(true); -#ifdef MOZ_SMIL if (AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif NS_ADDREF(*_retval = domItem.get()); return NS_OK; } @@ -503,11 +493,9 @@ DOMSVGPathSegList::RemoveItem(PRUint32 aIndex, UpdateListIndicesFromIndex(aIndex, -(argCount + 1)); Element()->DidChangePathSegList(true); -#ifdef MOZ_SMIL if (AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } diff --git a/content/svg/content/src/DOMSVGPoint.cpp b/content/svg/content/src/DOMSVGPoint.cpp index 3f783016902f..ba3d6ef946b9 100644 --- a/content/svg/content/src/DOMSVGPoint.cpp +++ b/content/svg/content/src/DOMSVGPoint.cpp @@ -81,11 +81,9 @@ NS_INTERFACE_MAP_END NS_IMETHODIMP DOMSVGPoint::GetX(float* aX) { -#ifdef MOZ_SMIL if (mIsAnimValItem && HasOwner()) { Element()->FlushAnimations(); // May make HasOwner() == false } -#endif *aX = HasOwner() ? InternalItem().mX : mPt.mX; return NS_OK; } @@ -102,11 +100,9 @@ DOMSVGPoint::SetX(float aX) if (HasOwner()) { InternalItem().mX = aX; Element()->DidChangePointList(true); -#ifdef MOZ_SMIL if (mList->AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } mPt.mX = aX; @@ -116,11 +112,9 @@ DOMSVGPoint::SetX(float aX) NS_IMETHODIMP DOMSVGPoint::GetY(float* aY) { -#ifdef MOZ_SMIL if (mIsAnimValItem && HasOwner()) { Element()->FlushAnimations(); // May make HasOwner() == false } -#endif *aY = HasOwner() ? InternalItem().mY : mPt.mY; return NS_OK; } @@ -137,11 +131,9 @@ DOMSVGPoint::SetY(float aY) if (HasOwner()) { InternalItem().mY = aY; Element()->DidChangePointList(true); -#ifdef MOZ_SMIL if (mList->AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } mPt.mY = aY; diff --git a/content/svg/content/src/DOMSVGPointList.cpp b/content/svg/content/src/DOMSVGPointList.cpp index 3b8b569aab96..d4b139ae8673 100644 --- a/content/svg/content/src/DOMSVGPointList.cpp +++ b/content/svg/content/src/DOMSVGPointList.cpp @@ -119,11 +119,9 @@ DOMSVGPointList::~DOMSVGPointList() nsIDOMSVGPoint* DOMSVGPointList::GetItemWithoutAddRef(PRUint32 aIndex) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif if (aIndex < Length()) { EnsureItemAt(aIndex); return mItems[aIndex]; @@ -200,11 +198,9 @@ DOMSVGPointList::InternalAList() NS_IMETHODIMP DOMSVGPointList::GetNumberOfItems(PRUint32 *aNumberOfItems) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif *aNumberOfItems = Length(); return NS_OK; } @@ -234,11 +230,9 @@ DOMSVGPointList::Clear() InternalList().Clear(); Element()->DidChangePointList(true); -#ifdef MOZ_SMIL if (AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif } return NS_OK; } @@ -327,11 +321,9 @@ DOMSVGPointList::InsertItemBefore(nsIDOMSVGPoint *aNewItem, UpdateListIndicesFromIndex(mItems, aIndex + 1); Element()->DidChangePointList(true); -#ifdef MOZ_SMIL if (AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif *_retval = domItem.forget().get(); return NS_OK; } @@ -371,11 +363,9 @@ DOMSVGPointList::ReplaceItem(nsIDOMSVGPoint *aNewItem, domItem->InsertingIntoList(this, aIndex, IsAnimValList()); Element()->DidChangePointList(true); -#ifdef MOZ_SMIL if (AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif NS_ADDREF(*_retval = domItem.get()); return NS_OK; } @@ -412,11 +402,9 @@ DOMSVGPointList::RemoveItem(PRUint32 aIndex, UpdateListIndicesFromIndex(mItems, aIndex); Element()->DidChangePointList(true); -#ifdef MOZ_SMIL if (AttrIsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } diff --git a/content/svg/content/src/DOMSVGTransform.cpp b/content/svg/content/src/DOMSVGTransform.cpp index 67c85001c592..94d36007c250 100644 --- a/content/svg/content/src/DOMSVGTransform.cpp +++ b/content/svg/content/src/DOMSVGTransform.cpp @@ -345,11 +345,9 @@ DOMSVGTransform::NotifyElementOfChange() { if (HasOwner()) { Element()->DidChangeTransformList(true); -#ifdef MOZ_SMIL if (mList->mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif // MOZ_SMIL } } diff --git a/content/svg/content/src/DOMSVGTransformList.cpp b/content/svg/content/src/DOMSVGTransformList.cpp index c47a6a7f7f6c..b95a0f277ab1 100644 --- a/content/svg/content/src/DOMSVGTransformList.cpp +++ b/content/svg/content/src/DOMSVGTransformList.cpp @@ -97,11 +97,9 @@ NS_INTERFACE_MAP_END nsIDOMSVGTransform* DOMSVGTransformList::GetItemWithoutAddRef(PRUint32 aIndex) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif if (aIndex < Length()) { EnsureItemAt(aIndex); return mItems[aIndex]; @@ -163,11 +161,9 @@ DOMSVGTransformList::InternalList() NS_IMETHODIMP DOMSVGTransformList::GetNumberOfItems(PRUint32 *aNumberOfItems) { -#ifdef MOZ_SMIL if (IsAnimValList()) { Element()->FlushAnimations(); } -#endif *aNumberOfItems = Length(); return NS_OK; } @@ -196,11 +192,9 @@ DOMSVGTransformList::Clear() mItems.Clear(); InternalList().Clear(); Element()->DidChangeTransformList(true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif } return NS_OK; } @@ -292,11 +286,9 @@ DOMSVGTransformList::InsertItemBefore(nsIDOMSVGTransform *newItem, UpdateListIndicesFromIndex(mItems, index + 1); Element()->DidChangeTransformList(true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif *_retval = domItem.forget().get(); return NS_OK; } @@ -338,11 +330,9 @@ DOMSVGTransformList::ReplaceItem(nsIDOMSVGTransform *newItem, domItem->InsertingIntoList(this, index, IsAnimValList()); Element()->DidChangeTransformList(true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif NS_ADDREF(*_retval = domItem.get()); return NS_OK; } @@ -379,11 +369,9 @@ DOMSVGTransformList::RemoveItem(PRUint32 index, nsIDOMSVGTransform **_retval) UpdateListIndicesFromIndex(mItems, index); Element()->DidChangeTransformList(true); -#ifdef MOZ_SMIL if (mAList->IsAnimating()) { Element()->AnimationNeedsResample(); } -#endif return NS_OK; } diff --git a/content/svg/content/src/Makefile.in b/content/svg/content/src/Makefile.in index e65ecaee909d..57d5902e1e77 100644 --- a/content/svg/content/src/Makefile.in +++ b/content/svg/content/src/Makefile.in @@ -136,31 +136,27 @@ CPPSRCS = \ SVGTransform.cpp \ SVGTransformList.cpp \ SVGTransformListParser.cpp \ + nsSVGAnimateElement.cpp \ + nsSVGAnimateTransformElement.cpp \ + nsSVGAnimateMotionElement.cpp \ + nsSVGAnimationElement.cpp \ + nsSVGMpathElement.cpp \ + nsSVGSetElement.cpp \ + SVGIntegerPairSMILType.cpp \ + SVGLengthListSMILType.cpp \ + SVGMotionSMILType.cpp \ + SVGMotionSMILAttr.cpp \ + SVGMotionSMILAnimationFunction.cpp \ + SVGMotionSMILPathUtils.cpp \ + SVGNumberListSMILType.cpp \ + SVGNumberPairSMILType.cpp \ + SVGOrientSMILType.cpp \ + SVGPathSegListSMILType.cpp \ + SVGPointListSMILType.cpp \ + SVGTransformListSMILType.cpp \ + SVGViewBoxSMILType.cpp \ $(NULL) -ifdef MOZ_SMIL -CPPSRCS += nsSVGAnimateElement.cpp \ - nsSVGAnimateTransformElement.cpp \ - nsSVGAnimateMotionElement.cpp \ - nsSVGAnimationElement.cpp \ - nsSVGMpathElement.cpp \ - nsSVGSetElement.cpp \ - SVGIntegerPairSMILType.cpp \ - SVGLengthListSMILType.cpp \ - SVGMotionSMILType.cpp \ - SVGMotionSMILAttr.cpp \ - SVGMotionSMILAnimationFunction.cpp \ - SVGMotionSMILPathUtils.cpp \ - SVGNumberListSMILType.cpp \ - SVGNumberPairSMILType.cpp \ - SVGOrientSMILType.cpp \ - SVGPathSegListSMILType.cpp \ - SVGPointListSMILType.cpp \ - SVGTransformListSMILType.cpp \ - SVGViewBoxSMILType.cpp \ - $(NULL) -endif - include $(topsrcdir)/config/config.mk # we don't want the shared lib, but we want to force the creation of a static lib. @@ -186,12 +182,7 @@ INCLUDES += \ -I$(srcdir)/../../../events/src \ -I$(srcdir)/../../../html/content/src \ -I$(topsrcdir)/content/xbl/src \ - $(NULL) - -ifdef MOZ_SMIL -INCLUDES += \ -I$(srcdir)/../../../smil \ $(NULL) -endif DEFINES += -D_IMPL_NS_LAYOUT diff --git a/content/svg/content/src/SVGAnimatedLengthList.cpp b/content/svg/content/src/SVGAnimatedLengthList.cpp index 4027a4d509cf..717efceadf49 100644 --- a/content/svg/content/src/SVGAnimatedLengthList.cpp +++ b/content/svg/content/src/SVGAnimatedLengthList.cpp @@ -38,10 +38,8 @@ #include "DOMSVGAnimatedLengthList.h" #include "nsSVGElement.h" #include "nsSVGAttrTearoffTable.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SVGLengthListSMILType.h" -#endif // MOZ_SMIL namespace mozilla { @@ -149,7 +147,6 @@ SVGAnimatedLengthList::ClearAnimValue(nsSVGElement *aElement, aElement->DidAnimateLengthList(aAttrEnum); } -#ifdef MOZ_SMIL nsISMILAttr* SVGAnimatedLengthList::ToSMILAttr(nsSVGElement *aSVGElement, PRUint8 aAttrEnum, @@ -239,6 +236,5 @@ SVGAnimatedLengthList::SMILAnimatedLengthList::ClearAnimValue() mVal->ClearAnimValue(mElement, mAttrEnum); } } -#endif // MOZ_SMIL } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedLengthList.h b/content/svg/content/src/SVGAnimatedLengthList.h index 566177a75f4f..7d1121adfa89 100644 --- a/content/svg/content/src/SVGAnimatedLengthList.h +++ b/content/svg/content/src/SVGAnimatedLengthList.h @@ -41,9 +41,7 @@ class nsSVGElement; -#ifdef MOZ_SMIL #include "nsISMILAttr.h" -#endif // MOZ_SMIL namespace mozilla { @@ -100,11 +98,9 @@ public: return !!mAnimVal; } -#ifdef MOZ_SMIL /// Callers own the returned nsISMILAttr nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement, PRUint8 aAttrEnum, PRUint8 aAxis, bool aCanZeroPadList); -#endif // MOZ_SMIL private: @@ -116,7 +112,6 @@ private: SVGLengthList mBaseVal; nsAutoPtr mAnimVal; -#ifdef MOZ_SMIL struct SMILAnimatedLengthList : public nsISMILAttr { public: @@ -150,7 +145,6 @@ private: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedNumberList.cpp b/content/svg/content/src/SVGAnimatedNumberList.cpp index 23fcc09694de..7148c31402bd 100644 --- a/content/svg/content/src/SVGAnimatedNumberList.cpp +++ b/content/svg/content/src/SVGAnimatedNumberList.cpp @@ -38,10 +38,8 @@ #include "DOMSVGAnimatedNumberList.h" #include "nsSVGElement.h" #include "nsSVGAttrTearoffTable.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SVGNumberListSMILType.h" -#endif // MOZ_SMIL namespace mozilla { @@ -151,7 +149,6 @@ SVGAnimatedNumberList::ClearAnimValue(nsSVGElement *aElement, aElement->DidAnimateNumberList(aAttrEnum); } -#ifdef MOZ_SMIL nsISMILAttr* SVGAnimatedNumberList::ToSMILAttr(nsSVGElement *aSVGElement, PRUint8 aAttrEnum) @@ -215,6 +212,5 @@ SVGAnimatedNumberList::SMILAnimatedNumberList::ClearAnimValue() mVal->ClearAnimValue(mElement, mAttrEnum); } } -#endif // MOZ_SMIL } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedNumberList.h b/content/svg/content/src/SVGAnimatedNumberList.h index e807e7034218..5ddbb148366a 100644 --- a/content/svg/content/src/SVGAnimatedNumberList.h +++ b/content/svg/content/src/SVGAnimatedNumberList.h @@ -41,9 +41,7 @@ class nsSVGElement; -#ifdef MOZ_SMIL #include "nsISMILAttr.h" -#endif // MOZ_SMIL namespace mozilla { @@ -108,10 +106,8 @@ public: return !!mAnimVal; } -#ifdef MOZ_SMIL /// Callers own the returned nsISMILAttr nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement, PRUint8 aAttrEnum); -#endif // MOZ_SMIL private: @@ -124,7 +120,6 @@ private: nsAutoPtr mAnimVal; bool mIsBaseSet; -#ifdef MOZ_SMIL struct SMILAnimatedNumberList : public nsISMILAttr { public: @@ -152,7 +147,6 @@ private: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedPathSegList.cpp b/content/svg/content/src/SVGAnimatedPathSegList.cpp index a5956d91cb52..85db998e8a82 100644 --- a/content/svg/content/src/SVGAnimatedPathSegList.cpp +++ b/content/svg/content/src/SVGAnimatedPathSegList.cpp @@ -38,10 +38,8 @@ #include "DOMSVGPathSegList.h" #include "nsSVGElement.h" #include "nsSVGAttrTearoffTable.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SVGPathSegListSMILType.h" -#endif // MOZ_SMIL // See the comments in this file's header! @@ -174,7 +172,6 @@ SVGAnimatedPathSegList::ClearAnimValue(nsSVGElement *aElement) aElement->DidAnimatePathSegList(); } -#ifdef MOZ_SMIL nsISMILAttr* SVGAnimatedPathSegList::ToSMILAttr(nsSVGElement *aElement) { @@ -236,6 +233,5 @@ SVGAnimatedPathSegList::SMILAnimatedPathSegList::ClearAnimValue() mVal->ClearAnimValue(mElement); } } -#endif // MOZ_SMIL } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedPathSegList.h b/content/svg/content/src/SVGAnimatedPathSegList.h index 924518ebbca0..8c514a714d39 100644 --- a/content/svg/content/src/SVGAnimatedPathSegList.h +++ b/content/svg/content/src/SVGAnimatedPathSegList.h @@ -41,9 +41,7 @@ class nsSVGElement; -#ifdef MOZ_SMIL #include "nsISMILAttr.h" -#endif // MOZ_SMIL namespace mozilla { @@ -112,10 +110,8 @@ public: return !!mAnimVal; } -#ifdef MOZ_SMIL /// Callers own the returned nsISMILAttr nsISMILAttr* ToSMILAttr(nsSVGElement* aElement); -#endif // MOZ_SMIL private: @@ -127,7 +123,6 @@ private: SVGPathData mBaseVal; nsAutoPtr mAnimVal; -#ifdef MOZ_SMIL struct SMILAnimatedPathSegList : public nsISMILAttr { public: @@ -152,7 +147,6 @@ private: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedPointList.cpp b/content/svg/content/src/SVGAnimatedPointList.cpp index 3012610891cf..ece9f62f2600 100644 --- a/content/svg/content/src/SVGAnimatedPointList.cpp +++ b/content/svg/content/src/SVGAnimatedPointList.cpp @@ -38,10 +38,8 @@ #include "DOMSVGPointList.h" #include "nsSVGElement.h" #include "nsSVGAttrTearoffTable.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SVGPointListSMILType.h" -#endif // MOZ_SMIL // See the comments in this file's header! @@ -177,7 +175,6 @@ SVGAnimatedPointList::ClearAnimValue(nsSVGElement *aElement) aElement->DidAnimatePointList(); } -#ifdef MOZ_SMIL nsISMILAttr* SVGAnimatedPointList::ToSMILAttr(nsSVGElement *aElement) { @@ -239,6 +236,5 @@ SVGAnimatedPointList::SMILAnimatedPointList::ClearAnimValue() mVal->ClearAnimValue(mElement); } } -#endif // MOZ_SMIL } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedPointList.h b/content/svg/content/src/SVGAnimatedPointList.h index c5c6e24f77e0..2589547b294f 100644 --- a/content/svg/content/src/SVGAnimatedPointList.h +++ b/content/svg/content/src/SVGAnimatedPointList.h @@ -41,9 +41,7 @@ class nsSVGElement; -#ifdef MOZ_SMIL #include "nsISMILAttr.h" -#endif // MOZ_SMIL namespace mozilla { @@ -112,10 +110,8 @@ public: return !!mAnimVal; } -#ifdef MOZ_SMIL /// Callers own the returned nsISMILAttr nsISMILAttr* ToSMILAttr(nsSVGElement* aElement); -#endif // MOZ_SMIL private: @@ -127,7 +123,6 @@ private: SVGPointList mBaseVal; nsAutoPtr mAnimVal; -#ifdef MOZ_SMIL struct SMILAnimatedPointList : public nsISMILAttr { public: @@ -152,7 +147,6 @@ private: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp index bdc189529b76..9905e3a4831b 100644 --- a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp +++ b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp @@ -40,10 +40,8 @@ #include "SVGAnimatedPreserveAspectRatio.h" #include "nsWhitespaceTokenizer.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SMILEnumType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -241,11 +239,9 @@ SVGAnimatedPreserveAspectRatio::SetBaseValueString( if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif // We don't need to call DidChange* here - we're only called by // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr, @@ -286,11 +282,9 @@ SVGAnimatedPreserveAspectRatio::SetBaseAlign(PRUint16 aAlign, mAnimVal.mAlign = mBaseVal.mAlign; aSVGElement->DidChangePreserveAspectRatio(true); -#ifdef MOZ_SMIL if (mIsAnimated) { aSVGElement->AnimationNeedsResample(); } -#endif return NS_OK; } @@ -305,11 +299,9 @@ SVGAnimatedPreserveAspectRatio::SetBaseMeetOrSlice(PRUint16 aMeetOrSlice, mAnimVal.mMeetOrSlice = mBaseVal.mMeetOrSlice; aSVGElement->DidChangePreserveAspectRatio(true); -#ifdef MOZ_SMIL if (mIsAnimated) { aSVGElement->AnimationNeedsResample(); } -#endif return NS_OK; } @@ -338,7 +330,6 @@ SVGAnimatedPreserveAspectRatio::ToDOMAnimatedPreserveAspectRatio( return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* SVGAnimatedPreserveAspectRatio::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -406,4 +397,3 @@ SMILPreserveAspectRatio::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h index e58b56d8c038..995cc67e60cb 100644 --- a/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h +++ b/content/svg/content/src/SVGAnimatedPreserveAspectRatio.h @@ -129,10 +129,8 @@ public: nsresult ToDOMAnimatedPreserveAspectRatio( nsIDOMSVGAnimatedPreserveAspectRatio **aResult, nsSVGElement* aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: @@ -184,9 +182,7 @@ public: // need to flush any resample requests to reflect these modifications. NS_IMETHOD GetAlign(PRUint16* aAlign) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aAlign = mVal->GetAnimValue().GetAlign(); return NS_OK; } @@ -195,9 +191,7 @@ public: NS_IMETHOD GetMeetOrSlice(PRUint16* aMeetOrSlice) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aMeetOrSlice = mVal->GetAnimValue().GetMeetOrSlice(); return NS_OK; } @@ -226,7 +220,6 @@ public: { return mVal->ToDOMAnimVal(aAnimVal, mSVGElement); } }; -#ifdef MOZ_SMIL struct SMILPreserveAspectRatio : public nsISMILAttr { public: @@ -249,7 +242,6 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedTransformList.cpp b/content/svg/content/src/SVGAnimatedTransformList.cpp index a8c276c21a7b..7d8a1b3f604c 100644 --- a/content/svg/content/src/SVGAnimatedTransformList.cpp +++ b/content/svg/content/src/SVGAnimatedTransformList.cpp @@ -37,13 +37,11 @@ #include "SVGAnimatedTransformList.h" #include "DOMSVGAnimatedTransformList.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SVGTransform.h" #include "SVGTransformListSMILType.h" #include "nsSVGUtils.h" #include "prdtoa.h" -#endif // MOZ_SMIL namespace mozilla { @@ -169,7 +167,6 @@ SVGAnimatedTransformList::IsExplicitlySet() const return mIsAttrSet || !mBaseVal.IsEmpty() || mAnimVal; } -#ifdef MOZ_SMIL nsISMILAttr* SVGAnimatedTransformList::ToSMILAttr(nsSVGElement* aSVGElement) { @@ -350,6 +347,4 @@ SVGAnimatedTransformList::SMILAnimatedTransformList::ClearAnimValue() } } -#endif // MOZ_SMIL - } // namespace mozilla diff --git a/content/svg/content/src/SVGAnimatedTransformList.h b/content/svg/content/src/SVGAnimatedTransformList.h index 98961299efda..576e1b481a69 100644 --- a/content/svg/content/src/SVGAnimatedTransformList.h +++ b/content/svg/content/src/SVGAnimatedTransformList.h @@ -43,9 +43,7 @@ class nsSVGElement; -#ifdef MOZ_SMIL #include "nsISMILAttr.h" -#endif // MOZ_SMIL namespace mozilla { @@ -102,10 +100,8 @@ public: return !!mAnimVal; } -#ifdef MOZ_SMIL /// Callers own the returned nsISMILAttr nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: @@ -118,7 +114,6 @@ private: nsAutoPtr mAnimVal; bool mIsAttrSet; -#ifdef MOZ_SMIL struct SMILAnimatedTransformList : public nsISMILAttr { public: @@ -150,7 +145,6 @@ private: SVGAnimatedTransformList* mVal; nsSVGElement* mElement; }; -#endif // MOZ_SMIL }; } // namespace mozilla diff --git a/content/svg/content/src/nsSVGAngle.cpp b/content/svg/content/src/nsSVGAngle.cpp index 2f9e0167da80..087d00f2ee85 100644 --- a/content/svg/content/src/nsSVGAngle.cpp +++ b/content/svg/content/src/nsSVGAngle.cpp @@ -43,10 +43,8 @@ #include "nsSVGMarkerElement.h" #include "nsMathUtils.h" #include "nsContentUtils.h" // NS_ENSURE_FINITE -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SVGOrientSMILType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -264,11 +262,9 @@ nsSVGAngle::SetBaseValueInSpecifiedUnits(float aValue, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeAngle(mAttrEnum, true); } @@ -301,11 +297,9 @@ nsSVGAngle::NewValueSpecifiedUnits(PRUint16 unitType, mAnimVal = mBaseVal; mAnimValUnit = mBaseValUnit; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif if (aSVGElement) { aSVGElement->DidChangeAngle(mAttrEnum, true); } @@ -355,11 +349,9 @@ nsSVGAngle::SetBaseValueString(const nsAString &aValueAsString, mAnimVal = mBaseVal; mAnimValUnit = mBaseValUnit; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif // We don't need to call DidChange* here - we're only called by // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr, @@ -386,11 +378,9 @@ nsSVGAngle::SetBaseValue(float aValue, nsSVGElement *aSVGElement) if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif if (aSVGElement) { aSVGElement->DidChangeAngle(mAttrEnum, true); } @@ -428,7 +418,6 @@ NS_NewDOMSVGAngle(nsIDOMSVGAngle** aResult) return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGAngle::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -504,4 +493,3 @@ nsSVGAngle::SMILOrient::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGAngle.h b/content/svg/content/src/nsSVGAngle.h index fe63a52d3213..4c51f8877aeb 100644 --- a/content/svg/content/src/nsSVGAngle.h +++ b/content/svg/content/src/nsSVGAngle.h @@ -80,10 +80,8 @@ public: static nsresult ToDOMSVGAngle(nsIDOMSVGAngle **aResult); nsresult ToDOMAnimatedAngle(nsIDOMSVGAnimatedAngle **aResult, nsSVGElement* aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL static float GetDegreesPerUnit(PRUint8 aUnit); @@ -198,7 +196,6 @@ public: { return mVal->ToDOMAnimVal(aAnimVal, mSVGElement); } }; -#ifdef MOZ_SMIL // We do not currently implemente a SMILAngle struct because in SVG 1.1 the // only *animatable* attribute that takes an is 'orient', on the // 'marker' element, and 'orient' must be special cased since it can also @@ -231,7 +228,6 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; nsresult diff --git a/content/svg/content/src/nsSVGBoolean.cpp b/content/svg/content/src/nsSVGBoolean.cpp index 7a7596c7ff18..2b7db25d2215 100644 --- a/content/svg/content/src/nsSVGBoolean.cpp +++ b/content/svg/content/src/nsSVGBoolean.cpp @@ -35,10 +35,8 @@ * ***** END LICENSE BLOCK ***** */ #include "nsSVGBoolean.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SMILBoolType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -87,11 +85,9 @@ nsSVGBoolean::SetBaseValueString(const nsAString &aValueAsString, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif // We don't need to call DidChange* here - we're only called by // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr, @@ -118,11 +114,9 @@ nsSVGBoolean::SetBaseValue(bool aValue, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeBoolean(mAttrEnum, true); } } @@ -147,7 +141,6 @@ nsSVGBoolean::ToDOMAnimatedBoolean(nsIDOMSVGAnimatedBoolean **aResult, return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGBoolean::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -201,4 +194,3 @@ nsSVGBoolean::SMILBool::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGBoolean.h b/content/svg/content/src/nsSVGBoolean.h index 44933f4dd73e..79428b748ddc 100644 --- a/content/svg/content/src/nsSVGBoolean.h +++ b/content/svg/content/src/nsSVGBoolean.h @@ -65,10 +65,8 @@ public: nsresult ToDOMAnimatedBoolean(nsIDOMSVGAnimatedBoolean **aResult, nsSVGElement* aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: @@ -98,15 +96,12 @@ public: // need to flush any resample requests to reflect these modifications. NS_IMETHOD GetAnimVal(bool* aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aResult = mVal->GetAnimValue(); return NS_OK; } }; -#ifdef MOZ_SMIL struct SMILBool : public nsISMILAttr { public: @@ -128,6 +123,5 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif //__NS_SVGBOOLEAN_H__ diff --git a/content/svg/content/src/nsSVGClass.cpp b/content/svg/content/src/nsSVGClass.cpp index f8a4b5078bbf..db5597a43e30 100644 --- a/content/svg/content/src/nsSVGClass.cpp +++ b/content/svg/content/src/nsSVGClass.cpp @@ -36,10 +36,8 @@ #include "nsSVGClass.h" #include "nsSVGStylableElement.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SMILStringType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -69,11 +67,9 @@ nsSVGClass::SetBaseValue(const nsAString& aValue, if (aDoSetAttr) { aSVGElement->SetAttr(kNameSpaceID_None, nsGkAtoms::_class, aValue, true); } -#ifdef MOZ_SMIL if (mAnimVal) { aSVGElement->AnimationNeedsResample(); } -#endif } void @@ -116,14 +112,11 @@ nsSVGClass::ToDOMAnimatedString(nsIDOMSVGAnimatedString **aResult, NS_IMETHODIMP nsSVGClass::DOMAnimatedString::GetAnimVal(nsAString& aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif mVal->GetAnimValue(aResult, mSVGElement); return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGClass::ToSMILAttr(nsSVGStylableElement *aSVGElement) { @@ -172,4 +165,3 @@ nsSVGClass::SMILString::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGClass.h b/content/svg/content/src/nsSVGClass.h index 154075d6de3a..4b414f16dc37 100644 --- a/content/svg/content/src/nsSVGClass.h +++ b/content/svg/content/src/nsSVGClass.h @@ -43,9 +43,7 @@ #include "nsString.h" #include "nsDOMError.h" -#ifdef MOZ_SMIL #include "nsISMILAttr.h" -#endif // MOZ_SMIL class nsSVGStylableElement; @@ -69,10 +67,8 @@ public: nsresult ToDOMAnimatedString(nsIDOMSVGAnimatedString **aResult, nsSVGStylableElement *aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGStylableElement *aSVGElement); -#endif // MOZ_SMIL private: @@ -97,7 +93,6 @@ public: NS_IMETHOD GetAnimVal(nsAString& aResult); }; -#ifdef MOZ_SMIL struct SMILString : public nsISMILAttr { public: @@ -119,6 +114,5 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif //__NS_SVGCLASS_H__ diff --git a/content/svg/content/src/nsSVGElement.cpp b/content/svg/content/src/nsSVGElement.cpp index af8bc1450c4a..14e6a572161e 100644 --- a/content/svg/content/src/nsSVGElement.cpp +++ b/content/svg/content/src/nsSVGElement.cpp @@ -86,10 +86,8 @@ #include "nsIFrame.h" #include "prdtoa.h" #include -#ifdef MOZ_SMIL #include "nsSMILMappedAttribute.h" #include "SVGMotionSMILAttr.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -787,7 +785,6 @@ nsSVGElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker) aRuleWalker->Forward(mContentStyleRule); } -#ifdef MOZ_SMIL // Update & walk the animated content style rule, to include style from // animated mapped attributes. But first, get nsPresContext to check // whether this is a "no-animation restyle". (This should match the check @@ -816,7 +813,6 @@ nsSVGElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker) aRuleWalker->Forward(animContentStyleRule); } } -#endif // MOZ_SMIL return NS_OK; } @@ -1123,7 +1119,6 @@ nsSVGElement::UpdateContentStyleRule() mContentStyleRule = mappedAttrParser.CreateStyleRule(); } -#ifdef MOZ_SMIL static void ParseMappedAttrAnimValueCallback(void* aObject, nsIAtom* aPropertyName, @@ -1202,7 +1197,6 @@ nsSVGElement::GetAnimatedContentStyleRule() SMIL_MAPPED_ATTR_STYLERULE_ATOM, nsnull)); } -#endif // MOZ_SMIL /* static */ nsIAtom* nsSVGElement::GetEventNameForAttr(nsIAtom* aAttr) @@ -1221,14 +1215,12 @@ nsIAtom* nsSVGElement::GetEventNameForAttr(nsIAtom* aAttr) return nsGkAtoms::onSVGScroll; if (aAttr == nsGkAtoms::onzoom) return nsGkAtoms::onSVGZoom; -#ifdef MOZ_SMIL if (aAttr == nsGkAtoms::onbegin) return nsGkAtoms::onbeginEvent; if (aAttr == nsGkAtoms::onrepeat) return nsGkAtoms::onrepeatEvent; if (aAttr == nsGkAtoms::onend) return nsGkAtoms::onendEvent; -#endif // MOZ_SMIL return aAttr; } @@ -2130,7 +2122,6 @@ nsSVGElement::RecompileScriptEventListeners() } } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGElement::GetAnimatedAttr(PRInt32 aNamespaceID, nsIAtom* aName) { @@ -2327,4 +2318,3 @@ nsSVGElement::FlushAnimations() doc->GetAnimationController()->FlushResampleRequests(); } } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGElement.h b/content/svg/content/src/nsSVGElement.h index 60d0f9a76e17..1965e4348ddb 100644 --- a/content/svg/content/src/nsSVGElement.h +++ b/content/svg/content/src/nsSVGElement.h @@ -51,10 +51,8 @@ #include "nsStyledElement.h" #include "mozilla/css/StyleRule.h" -#ifdef MOZ_SMIL #include "nsISMILAttr.h" #include "nsSMILAnimationController.h" -#endif class nsSVGSVGElement; class nsSVGLength2; @@ -220,14 +218,9 @@ public: return nsnull; } -#ifdef MOZ_SMIL virtual nsISMILAttr* GetAnimatedAttr(PRInt32 aNamespaceID, nsIAtom* aName); void AnimationNeedsResample(); void FlushAnimations(); -#else - void AnimationNeedsResample() { /* do nothing */ } - void FlushAnimations() { /* do nothing */ } -#endif virtual void RecompileScriptEventListeners(); @@ -257,10 +250,8 @@ protected: virtual bool IsEventName(nsIAtom* aName); void UpdateContentStyleRule(); -#ifdef MOZ_SMIL void UpdateAnimatedContentStyleRule(); mozilla::css::StyleRule* GetAnimatedContentStyleRule(); -#endif // MOZ_SMIL static nsIAtom* GetEventNameForAttr(nsIAtom* aAttr); diff --git a/content/svg/content/src/nsSVGElementFactory.cpp b/content/svg/content/src/nsSVGElementFactory.cpp index 4567d509696e..e1861db5475d 100644 --- a/content/svg/content/src/nsSVGElementFactory.cpp +++ b/content/svg/content/src/nsSVGElementFactory.cpp @@ -223,7 +223,6 @@ nsresult NS_NewSVGFEDisplacementMapElement(nsIContent **aResult, already_AddRefed aNodeInfo); -#ifdef MOZ_SMIL nsresult NS_NewSVGAnimateElement(nsIContent **aResult, already_AddRefed aNodeInfo); @@ -239,7 +238,6 @@ NS_NewSVGMpathElement(nsIContent **aResult, nsresult NS_NewSVGSetElement(nsIContent **aResult, already_AddRefed aNodeInfo); -#endif // MOZ_SMIL nsresult NS_NewSVGElement(nsIContent** aResult, already_AddRefed aNodeInfo, @@ -368,7 +366,6 @@ NS_NewSVGElement(nsIContent** aResult, already_AddRefed aNodeInfo, return NS_NewSVGMaskElement(aResult, aNodeInfo); if (name == nsGkAtoms::svgSwitch) return NS_NewSVGSwitchElement(aResult, aNodeInfo); -#ifdef MOZ_SMIL if (NS_SMILEnabled()) { if (name == nsGkAtoms::animate) return NS_NewSVGAnimateElement(aResult, aNodeInfo); @@ -381,7 +378,6 @@ NS_NewSVGElement(nsIContent** aResult, already_AddRefed aNodeInfo, if (name == nsGkAtoms::set) return NS_NewSVGSetElement(aResult, aNodeInfo); } -#endif // MOZ_SMIL // if we don't know what to create, just create a standard xml element: return NS_NewXMLElement(aResult, aNodeInfo); diff --git a/content/svg/content/src/nsSVGEnum.cpp b/content/svg/content/src/nsSVGEnum.cpp index 3ab46beabfe0..696c436b3f84 100644 --- a/content/svg/content/src/nsSVGEnum.cpp +++ b/content/svg/content/src/nsSVGEnum.cpp @@ -37,10 +37,8 @@ #include "nsSVGEnum.h" #include "nsIAtom.h" #include "nsSVGElement.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SMILEnumType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -84,11 +82,9 @@ nsSVGEnum::SetBaseValueString(const nsAString& aValue, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif // We don't need to call DidChange* here - we're only called by // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr, // which takes care of notifying. @@ -132,11 +128,9 @@ nsSVGEnum::SetBaseValue(PRUint16 aValue, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeEnum(mAttrEnum, true); } return NS_OK; @@ -166,7 +160,6 @@ nsSVGEnum::ToDOMAnimatedEnum(nsIDOMSVGAnimatedEnumeration **aResult, return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGEnum::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -227,4 +220,3 @@ nsSVGEnum::SMILEnum::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGEnum.h b/content/svg/content/src/nsSVGEnum.h index c867bfac0214..8650f2d302da 100644 --- a/content/svg/content/src/nsSVGEnum.h +++ b/content/svg/content/src/nsSVGEnum.h @@ -76,10 +76,8 @@ public: nsresult ToDOMAnimatedEnum(nsIDOMSVGAnimatedEnumeration **aResult, nsSVGElement* aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: nsSVGEnumValue mAnimVal; @@ -111,15 +109,12 @@ public: // need to flush any resample requests to reflect these modifications. NS_IMETHOD GetAnimVal(PRUint16* aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aResult = mVal->GetAnimValue(); return NS_OK; } }; -#ifdef MOZ_SMIL struct SMILEnum : public nsISMILAttr { public: @@ -141,7 +136,6 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif //__NS_SVGENUM_H__ diff --git a/content/svg/content/src/nsSVGInteger.cpp b/content/svg/content/src/nsSVGInteger.cpp index 32b2e67196a5..dced1e93840c 100644 --- a/content/svg/content/src/nsSVGInteger.cpp +++ b/content/svg/content/src/nsSVGInteger.cpp @@ -35,10 +35,8 @@ * ***** END LICENSE BLOCK ***** */ #include "nsSVGInteger.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SMILIntegerType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -94,11 +92,9 @@ nsSVGInteger::SetBaseValueString(const nsAString &aValueAsString, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif return NS_OK; } @@ -118,11 +114,9 @@ nsSVGInteger::SetBaseValue(int aValue, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeInteger(mAttrEnum, true); } @@ -146,7 +140,6 @@ nsSVGInteger::ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult, return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGInteger::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -200,4 +193,3 @@ nsSVGInteger::SMILInteger::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGInteger.h b/content/svg/content/src/nsSVGInteger.h index f084e2625f23..e2748b9c988f 100644 --- a/content/svg/content/src/nsSVGInteger.h +++ b/content/svg/content/src/nsSVGInteger.h @@ -74,10 +74,8 @@ public: nsresult ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult, nsSVGElement* aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: @@ -108,15 +106,12 @@ public: // need to flush any resample requests to reflect these modifications. NS_IMETHOD GetAnimVal(PRInt32* aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aResult = mVal->GetAnimValue(); return NS_OK; } }; -#ifdef MOZ_SMIL struct SMILInteger : public nsISMILAttr { public: @@ -138,7 +133,6 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif //__NS_SVGINTEGER_H__ diff --git a/content/svg/content/src/nsSVGIntegerPair.cpp b/content/svg/content/src/nsSVGIntegerPair.cpp index 05825e0be3be..b5f5d8b85960 100644 --- a/content/svg/content/src/nsSVGIntegerPair.cpp +++ b/content/svg/content/src/nsSVGIntegerPair.cpp @@ -39,10 +39,8 @@ #include "nsCharSeparatedTokenizer.h" #include "nsDOMError.h" #include "nsMathUtils.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SVGIntegerPairSMILType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -119,11 +117,9 @@ nsSVGIntegerPair::SetBaseValueString(const nsAString &aValueAsString, mAnimVal[0] = mBaseVal[0]; mAnimVal[1] = mBaseVal[1]; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif // We don't need to call DidChange* here - we're only called by // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr, @@ -152,11 +148,9 @@ nsSVGIntegerPair::SetBaseValue(PRInt32 aValue, PairIndex aPairIndex, if (!mIsAnimated) { mAnimVal[index] = aValue; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeIntegerPair(mAttrEnum, true); } @@ -171,11 +165,9 @@ nsSVGIntegerPair::SetBaseValues(PRInt32 aValue1, PRInt32 aValue2, mAnimVal[0] = aValue1; mAnimVal[1] = aValue2; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeIntegerPair(mAttrEnum, true); } @@ -198,7 +190,6 @@ nsSVGIntegerPair::ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult, return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGIntegerPair::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -255,4 +246,3 @@ nsSVGIntegerPair::SMILIntegerPair::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGIntegerPair.h b/content/svg/content/src/nsSVGIntegerPair.h index 4e1d8f53ce6b..cf27d3ea5674 100644 --- a/content/svg/content/src/nsSVGIntegerPair.h +++ b/content/svg/content/src/nsSVGIntegerPair.h @@ -41,11 +41,9 @@ #include "nsSVGElement.h" #include "nsDOMError.h" -#ifdef MOZ_SMIL #include "nsISMILAttr.h" class nsSMILValue; class nsISMILType; -#endif // MOZ_SMIL class nsSVGIntegerPair { @@ -87,10 +85,8 @@ public: nsresult ToDOMAnimatedInteger(nsIDOMSVGAnimatedInteger **aResult, PairIndex aIndex, nsSVGElement* aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: @@ -125,15 +121,12 @@ public: // need to flush any resample requests to reflect these modifications. NS_IMETHOD GetAnimVal(PRInt32* aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aResult = mVal->GetAnimValue(mIndex); return NS_OK; } }; -#ifdef MOZ_SMIL struct SMILIntegerPair : public nsISMILAttr { public: @@ -155,7 +148,6 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif //__NS_SVGINTEGERPAIR_H__ diff --git a/content/svg/content/src/nsSVGLength2.cpp b/content/svg/content/src/nsSVGLength2.cpp index f3fda92db44c..4709ae0e8ba0 100644 --- a/content/svg/content/src/nsSVGLength2.cpp +++ b/content/svg/content/src/nsSVGLength2.cpp @@ -46,10 +46,8 @@ #include "nsSVGIntegrationUtils.h" #include "nsSVGAttrTearoffTable.h" #include "nsContentUtils.h" // NS_ENSURE_FINITE -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "nsSMILFloatType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -316,11 +314,9 @@ nsSVGLength2::SetBaseValueInSpecifiedUnits(float aValue, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeLength(mAttrEnum, true); } @@ -355,11 +351,9 @@ nsSVGLength2::NewValueSpecifiedUnits(PRUint16 unitType, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeLength(mAttrEnum, true); return NS_OK; } @@ -425,11 +419,9 @@ nsSVGLength2::SetBaseValueString(const nsAString &aValueAsString, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeLength(mAttrEnum, aDoSetAttr); return NS_OK; @@ -493,7 +485,6 @@ nsSVGLength2::DOMAnimatedLength::~DOMAnimatedLength() sSVGAnimatedLengthTearoffTable.RemoveTearoff(mVal); } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGLength2::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -552,4 +543,3 @@ nsSVGLength2::SMILLength::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGLength2.h b/content/svg/content/src/nsSVGLength2.h index 78e1bf327eba..a2e557463e6c 100644 --- a/content/svg/content/src/nsSVGLength2.h +++ b/content/svg/content/src/nsSVGLength2.h @@ -44,11 +44,9 @@ #include "nsDOMError.h" #include "nsMathUtils.h" -#ifdef MOZ_SMIL #include "nsISMILAttr.h" class nsSMILValue; class nsISMILType; -#endif // MOZ_SMIL class nsIFrame; @@ -112,10 +110,8 @@ public: nsresult ToDOMAnimatedLength(nsIDOMSVGAnimatedLength **aResult, nsSVGElement* aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: @@ -223,18 +219,14 @@ private: // need to flush any resample requests to reflect these modifications. NS_IMETHOD GetUnitType(PRUint16* aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aResult = mVal->mSpecifiedUnitType; return NS_OK; } NS_IMETHOD GetValue(float* aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aResult = mVal->GetAnimValue(mSVGElement); return NS_OK; } @@ -243,9 +235,7 @@ private: NS_IMETHOD GetValueInSpecifiedUnits(float* aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aResult = mVal->mAnimVal; return NS_OK; } @@ -256,9 +246,7 @@ private: { return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR; } NS_IMETHOD GetValueAsString(nsAString& aValue) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif mVal->GetAnimValueString(aValue); return NS_OK; } @@ -291,7 +279,6 @@ public: { return mVal->ToDOMAnimVal(aAnimVal, mSVGElement); } }; -#ifdef MOZ_SMIL struct SMILLength : public nsISMILAttr { public: @@ -313,7 +300,6 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif // __NS_SVGLENGTH2_H__ diff --git a/content/svg/content/src/nsSVGNumber2.cpp b/content/svg/content/src/nsSVGNumber2.cpp index 8b09bada7b49..db015bafc787 100644 --- a/content/svg/content/src/nsSVGNumber2.cpp +++ b/content/svg/content/src/nsSVGNumber2.cpp @@ -40,10 +40,8 @@ #include "prdtoa.h" #include "nsMathUtils.h" #include "nsContentUtils.h" // NS_ENSURE_FINITE -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "nsSMILFloatType.h" -#endif // MOZ_SMIL class DOMSVGNumber : public nsIDOMSVGNumber { @@ -132,11 +130,9 @@ nsSVGNumber2::SetBaseValueString(const nsAString &aValueAsString, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif // We don't need to call DidChange* here - we're only called by // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr, @@ -160,11 +156,9 @@ nsSVGNumber2::SetBaseValue(float aValue, if (!mIsAnimated) { mAnimVal = mBaseVal; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeNumber(mAttrEnum, true); } @@ -188,7 +182,6 @@ nsSVGNumber2::ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult, return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGNumber2::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -245,4 +238,3 @@ nsSVGNumber2::SMILNumber::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGNumber2.h b/content/svg/content/src/nsSVGNumber2.h index a171d8a5116c..81bce3cfffd3 100644 --- a/content/svg/content/src/nsSVGNumber2.h +++ b/content/svg/content/src/nsSVGNumber2.h @@ -43,11 +43,9 @@ #include "nsDOMError.h" #include "nsMathUtils.h" -#ifdef MOZ_SMIL #include "nsISMILAttr.h" class nsSMILValue; class nsISMILType; -#endif // MOZ_SMIL class nsSVGNumber2 { @@ -81,10 +79,8 @@ public: nsresult ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult, nsSVGElement* aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: @@ -121,15 +117,12 @@ public: // need to flush any resample requests to reflect these modifications. NS_IMETHOD GetAnimVal(float* aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aResult = mVal->GetAnimValue(); return NS_OK; } }; -#ifdef MOZ_SMIL struct SMILNumber : public nsISMILAttr { public: @@ -151,7 +144,6 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif //__NS_SVGNUMBER2_H__ diff --git a/content/svg/content/src/nsSVGNumberPair.cpp b/content/svg/content/src/nsSVGNumberPair.cpp index 6bf74dc6d08c..38254fbfcd0c 100644 --- a/content/svg/content/src/nsSVGNumberPair.cpp +++ b/content/svg/content/src/nsSVGNumberPair.cpp @@ -40,10 +40,8 @@ #include "prdtoa.h" #include "nsDOMError.h" #include "nsMathUtils.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SVGNumberPairSMILType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -119,11 +117,9 @@ nsSVGNumberPair::SetBaseValueString(const nsAString &aValueAsString, mAnimVal[0] = mBaseVal[0]; mAnimVal[1] = mBaseVal[1]; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif // We don't need to call DidChange* here - we're only called by // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr, @@ -152,11 +148,9 @@ nsSVGNumberPair::SetBaseValue(float aValue, PairIndex aPairIndex, if (!mIsAnimated) { mAnimVal[index] = aValue; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeNumberPair(mAttrEnum, true); } @@ -171,11 +165,9 @@ nsSVGNumberPair::SetBaseValues(float aValue1, float aValue2, mAnimVal[0] = aValue1; mAnimVal[1] = aValue2; } -#ifdef MOZ_SMIL else { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeNumberPair(mAttrEnum, true); } @@ -198,7 +190,6 @@ nsSVGNumberPair::ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult, return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGNumberPair::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -255,4 +246,3 @@ nsSVGNumberPair::SMILNumberPair::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGNumberPair.h b/content/svg/content/src/nsSVGNumberPair.h index 182deb135d54..60f723564cba 100644 --- a/content/svg/content/src/nsSVGNumberPair.h +++ b/content/svg/content/src/nsSVGNumberPair.h @@ -43,11 +43,9 @@ #include "nsDOMError.h" #include "nsMathUtils.h" -#ifdef MOZ_SMIL #include "nsISMILAttr.h" class nsSMILValue; class nsISMILType; -#endif // MOZ_SMIL class nsSVGNumberPair { @@ -89,10 +87,8 @@ public: nsresult ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult, PairIndex aIndex, nsSVGElement* aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: @@ -130,15 +126,12 @@ public: // need to flush any resample requests to reflect these modifications. NS_IMETHOD GetAnimVal(float* aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aResult = mVal->GetAnimValue(mIndex); return NS_OK; } }; -#ifdef MOZ_SMIL struct SMILNumberPair : public nsISMILAttr { public: @@ -160,7 +153,6 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif //__NS_SVGNUMBERPAIR_H__ diff --git a/content/svg/content/src/nsSVGSVGElement.cpp b/content/svg/content/src/nsSVGSVGElement.cpp index cd9622ecb224..bda06d508a54 100644 --- a/content/svg/content/src/nsSVGSVGElement.cpp +++ b/content/svg/content/src/nsSVGSVGElement.cpp @@ -63,7 +63,6 @@ #include "nsContentErrors.h" // For NS_PROPTABLE_PROP_OVERWRITTEN #include "nsContentUtils.h" -#ifdef MOZ_SMIL #include "nsEventDispatcher.h" #include "nsSMILTimeContainer.h" #include "nsSMILAnimationController.h" @@ -71,7 +70,6 @@ #include "nsIContentIterator.h" nsresult NS_NewContentIterator(nsIContentIterator** aInstancePtrResult); -#endif // MOZ_SMIL using namespace mozilla; using namespace mozilla::dom; @@ -163,7 +161,6 @@ NS_IMPL_NS_NEW_SVG_ELEMENT_CHECK_PARSER(SVG) //---------------------------------------------------------------------- // nsISupports methods -#ifdef MOZ_SMIL NS_IMPL_CYCLE_COLLECTION_CLASS(nsSVGSVGElement) NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsSVGSVGElement, nsSVGSVGElementBase) @@ -177,18 +174,13 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsSVGSVGElement, tmp->mTimedDocumentRoot->Traverse(&cb); } NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END -#endif // MOZ_SMIL NS_IMPL_ADDREF_INHERITED(nsSVGSVGElement,nsSVGSVGElementBase) NS_IMPL_RELEASE_INHERITED(nsSVGSVGElement,nsSVGSVGElementBase) DOMCI_NODE_DATA(SVGSVGElement, nsSVGSVGElement) -#ifdef MOZ_SMIL NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(nsSVGSVGElement) -#else -NS_INTERFACE_TABLE_HEAD(nsSVGSVGElement) -#endif NS_NODE_INTERFACE_TABLE7(nsSVGSVGElement, nsIDOMNode, nsIDOMElement, nsIDOMSVGElement, nsIDOMSVGSVGElement, nsIDOMSVGFitToViewBox, nsIDOMSVGLocatable, @@ -209,12 +201,10 @@ nsSVGSVGElement::nsSVGSVGElement(already_AddRefed aNodeInfo, mCurrentScale(1.0f), mPreviousTranslate(0.0f, 0.0f), mPreviousScale(1.0f), - mRedrawSuspendCount(0) -#ifdef MOZ_SMIL - , mStartAnimationOnBindToTree(!aFromParser) -#endif // MOZ_SMIL - , mImageNeedsTransformInvalidation(false) - , mIsPaintingSVGImageElement(false) + mRedrawSuspendCount(0), + mStartAnimationOnBindToTree(!aFromParser), + mImageNeedsTransformInvalidation(false), + mIsPaintingSVGImageElement(false) { } @@ -454,7 +444,6 @@ nsSVGSVGElement::ForceRedraw() NS_IMETHODIMP nsSVGSVGElement::PauseAnimations() { -#ifdef MOZ_SMIL if (NS_SMILEnabled()) { if (mTimedDocumentRoot) { mTimedDocumentRoot->Pause(nsSMILTimeContainer::PAUSE_SCRIPT); @@ -462,7 +451,6 @@ nsSVGSVGElement::PauseAnimations() // else we're not the outermost or not bound to a tree, so silently fail return NS_OK; } -#endif // MOZ_SMIL NS_NOTYETIMPLEMENTED("nsSVGSVGElement::PauseAnimations"); return NS_ERROR_NOT_IMPLEMENTED; } @@ -471,7 +459,6 @@ nsSVGSVGElement::PauseAnimations() NS_IMETHODIMP nsSVGSVGElement::UnpauseAnimations() { -#ifdef MOZ_SMIL if (NS_SMILEnabled()) { if (mTimedDocumentRoot) { mTimedDocumentRoot->Resume(nsSMILTimeContainer::PAUSE_SCRIPT); @@ -479,7 +466,6 @@ nsSVGSVGElement::UnpauseAnimations() // else we're not the outermost or not bound to a tree, so silently fail return NS_OK; } -#endif // MOZ_SMIL NS_NOTYETIMPLEMENTED("nsSVGSVGElement::UnpauseAnimations"); return NS_ERROR_NOT_IMPLEMENTED; } @@ -488,13 +474,11 @@ nsSVGSVGElement::UnpauseAnimations() NS_IMETHODIMP nsSVGSVGElement::AnimationsPaused(bool *_retval) { -#ifdef MOZ_SMIL if (NS_SMILEnabled()) { nsSMILTimeContainer* root = GetTimedDocumentRoot(); *_retval = root && root->IsPausedByType(nsSMILTimeContainer::PAUSE_SCRIPT); return NS_OK; } -#endif // MOZ_SMIL NS_NOTYETIMPLEMENTED("nsSVGSVGElement::AnimationsPaused"); return NS_ERROR_NOT_IMPLEMENTED; } @@ -503,7 +487,6 @@ nsSVGSVGElement::AnimationsPaused(bool *_retval) NS_IMETHODIMP nsSVGSVGElement::GetCurrentTime(float *_retval) { -#ifdef MOZ_SMIL if (NS_SMILEnabled()) { nsSMILTimeContainer* root = GetTimedDocumentRoot(); if (root) { @@ -514,7 +497,6 @@ nsSVGSVGElement::GetCurrentTime(float *_retval) } return NS_OK; } -#endif // MOZ_SMIL NS_NOTYETIMPLEMENTED("nsSVGSVGElement::GetCurrentTime"); return NS_ERROR_NOT_IMPLEMENTED; } @@ -524,7 +506,6 @@ NS_IMETHODIMP nsSVGSVGElement::SetCurrentTime(float seconds) { NS_ENSURE_FINITE(seconds, NS_ERROR_ILLEGAL_VALUE); -#ifdef MOZ_SMIL if (NS_SMILEnabled()) { if (mTimedDocumentRoot) { // Make sure the timegraph is up-to-date @@ -545,7 +526,6 @@ nsSVGSVGElement::SetCurrentTime(float seconds) // fail return NS_OK; } -#endif // MOZ_SMIL NS_NOTYETIMPLEMENTED("nsSVGSVGElement::SetCurrentTime"); return NS_ERROR_NOT_IMPLEMENTED; } @@ -868,7 +848,6 @@ nsSVGSVGElement::SetCurrentTranslate(float x, float y) return SetCurrentScaleTranslate(mCurrentScale, x, y); } -#ifdef MOZ_SMIL nsSMILTimeContainer* nsSVGSVGElement::GetTimedDocumentRoot() { @@ -886,7 +865,6 @@ nsSVGSVGElement::GetTimedDocumentRoot() // invalid structure return nsnull; } -#endif // MOZ_SMIL //---------------------------------------------------------------------- // nsIContent methods @@ -915,7 +893,6 @@ nsSVGSVGElement::IsAttributeMapped(const nsIAtom* name) const //---------------------------------------------------------------------- // nsIContent methods: -#ifdef MOZ_SMIL nsresult nsSVGSVGElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor) { @@ -930,7 +907,6 @@ nsSVGSVGElement::PreHandleEvent(nsEventChainPreVisitor& aVisitor) } return nsSVGSVGElementBase::PreHandleEvent(aVisitor); } -#endif // MOZ_SMIL //---------------------------------------------------------------------- // nsSVGElement overrides @@ -1036,7 +1012,6 @@ nsSVGSVGElement::GetViewBoxTransform() const mPreserveAspectRatio.GetAnimValue()); } -#ifdef MOZ_SMIL nsresult nsSVGSVGElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent, @@ -1090,12 +1065,10 @@ nsSVGSVGElement::UnbindFromTree(bool aDeep, bool aNullParent) nsSVGSVGElementBase::UnbindFromTree(aDeep, aNullParent); } -#endif // MOZ_SMIL //---------------------------------------------------------------------- // implementation helpers -#ifdef MOZ_SMIL bool nsSVGSVGElement::WillBeOutermostSVG(nsIContent* aParent, nsIContent* aBindingParent) const @@ -1116,7 +1089,6 @@ nsSVGSVGElement::WillBeOutermostSVG(nsIContent* aParent, return true; } -#endif // MOZ_SMIL void nsSVGSVGElement::InvalidateTransformNotifyFrame() diff --git a/content/svg/content/src/nsSVGSVGElement.h b/content/svg/content/src/nsSVGSVGElement.h index ca207fe86a1e..67154446824c 100644 --- a/content/svg/content/src/nsSVGSVGElement.h +++ b/content/svg/content/src/nsSVGSVGElement.h @@ -53,9 +53,7 @@ #include "SVGAnimatedPreserveAspectRatio.h" #include "mozilla/dom/FromParser.h" -#ifdef MOZ_SMIL class nsSMILTimeContainer; -#endif // MOZ_SMIL typedef nsSVGStylableElement nsSVGSVGElementBase; @@ -141,9 +139,7 @@ public: // interfaces: NS_DECL_ISUPPORTS_INHERITED -#ifdef MOZ_SMIL NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsSVGSVGElement, nsSVGSVGElementBase) -#endif // MOZ_SMIL NS_DECL_NSIDOMSVGSVGELEMENT NS_DECL_NSIDOMSVGFITTOVIEWBOX NS_DECL_NSIDOMSVGLOCATABLE @@ -181,15 +177,11 @@ public: const nsSVGTranslatePoint& GetPreviousTranslate() { return mPreviousTranslate; } float GetPreviousScale() { return mPreviousScale; } -#ifdef MOZ_SMIL nsSMILTimeContainer* GetTimedDocumentRoot(); -#endif // MOZ_SMIL // nsIContent interface NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const; -#ifdef MOZ_SMIL virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor); -#endif // MOZ_SMIL // nsSVGElement specializations: virtual gfxMatrix PrependLocalTransformTo(const gfxMatrix &aMatrix) const; @@ -237,12 +229,10 @@ protected: // nsSVGElement overrides bool IsEventName(nsIAtom* aName); -#ifdef MOZ_SMIL virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent, nsIContent* aBindingParent, bool aCompileEventHandlers); virtual void UnbindFromTree(bool aDeep, bool aNullParent); -#endif // MOZ_SMIL // implementation helpers: @@ -263,7 +253,6 @@ protected: parent->Tag() != nsGkAtoms::foreignObject; } -#ifdef MOZ_SMIL /* * While binding to the tree we need to determine if we will be the outermost * element _before_ the children are bound (as they want to know what @@ -275,7 +264,6 @@ protected: */ bool WillBeOutermostSVG(nsIContent* aParent, nsIContent* aBindingParent) const; -#endif // MOZ_SMIL // invalidate viewbox -> viewport xform & inform frames void InvalidateTransformNotifyFrame(); @@ -316,11 +304,9 @@ protected: // XXXjwatt our frame should probably reset these when it's destroyed. float mViewportWidth, mViewportHeight; -#ifdef MOZ_SMIL // The time container for animations within this SVG document fragment. Set // for all outermost elements (not nested elements). nsAutoPtr mTimedDocumentRoot; -#endif // MOZ_SMIL // zoom and pan // IMPORTANT: see the comment in RecordCurrentScaleTranslate before writing @@ -331,13 +317,11 @@ protected: float mPreviousScale; PRInt32 mRedrawSuspendCount; -#ifdef MOZ_SMIL // For outermost elements created from parsing, animation is started by // the onload event in accordance with the SVG spec, but for elements // created by script or promoted from inner to outermost we need // to manually kick off animation when they are bound to the tree. bool mStartAnimationOnBindToTree; -#endif // MOZ_SMIL bool mImageNeedsTransformInvalidation; bool mIsPaintingSVGImageElement; }; diff --git a/content/svg/content/src/nsSVGString.cpp b/content/svg/content/src/nsSVGString.cpp index bd03566bfa4d..703d572a33cd 100644 --- a/content/svg/content/src/nsSVGString.cpp +++ b/content/svg/content/src/nsSVGString.cpp @@ -35,10 +35,8 @@ * ***** END LICENSE BLOCK ***** */ #include "nsSVGString.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SMILStringType.h" -#endif // MOZ_SMIL using namespace mozilla; @@ -68,11 +66,9 @@ nsSVGString::SetBaseValue(const nsAString& aValue, if (aDoSetAttr) { aSVGElement->SetStringBaseValue(mAttrEnum, aValue); } -#ifdef MOZ_SMIL if (mAnimVal) { aSVGElement->AnimationNeedsResample(); } -#endif aSVGElement->DidChangeString(mAttrEnum); } @@ -112,7 +108,6 @@ nsSVGString::ToDOMAnimatedString(nsIDOMSVGAnimatedString **aResult, return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGString::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -160,4 +155,3 @@ nsSVGString::SMILString::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGString.h b/content/svg/content/src/nsSVGString.h index fdc0c1a3247b..597dd5fd0c23 100644 --- a/content/svg/content/src/nsSVGString.h +++ b/content/svg/content/src/nsSVGString.h @@ -70,10 +70,8 @@ public: nsresult ToDOMAnimatedString(nsIDOMSVGAnimatedString **aResult, nsSVGElement *aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement *aSVGElement); -#endif // MOZ_SMIL private: @@ -100,14 +98,11 @@ public: NS_IMETHOD GetAnimVal(nsAString & aResult) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif mVal->GetAnimValue(aResult, mSVGElement); return NS_OK; } }; -#ifdef MOZ_SMIL struct SMILString : public nsISMILAttr { public: @@ -129,6 +124,5 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif //__NS_SVGSTRING_H__ diff --git a/content/svg/content/src/nsSVGStylableElement.cpp b/content/svg/content/src/nsSVGStylableElement.cpp index 346cb1dcf152..f15859547ef1 100644 --- a/content/svg/content/src/nsSVGStylableElement.cpp +++ b/content/svg/content/src/nsSVGStylableElement.cpp @@ -149,7 +149,6 @@ nsSVGStylableElement::DidAnimateClass() } } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGStylableElement::GetAnimatedAttr(PRInt32 aNamespaceID, nsIAtom* aName) { @@ -159,4 +158,3 @@ nsSVGStylableElement::GetAnimatedAttr(PRInt32 aNamespaceID, nsIAtom* aName) } return nsSVGStylableElementBase::GetAnimatedAttr(aNamespaceID, aName); } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGStylableElement.h b/content/svg/content/src/nsSVGStylableElement.h index 61735c5cdb77..1e61a518af92 100644 --- a/content/svg/content/src/nsSVGStylableElement.h +++ b/content/svg/content/src/nsSVGStylableElement.h @@ -69,9 +69,7 @@ public: virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute, bool aNotify); -#ifdef MOZ_SMIL virtual nsISMILAttr* GetAnimatedAttr(PRInt32 aNamespaceID, nsIAtom* aName); -#endif void DidAnimateClass(); diff --git a/content/svg/content/src/nsSVGViewBox.cpp b/content/svg/content/src/nsSVGViewBox.cpp index 3a45c6f76d47..3c34bb5fa417 100644 --- a/content/svg/content/src/nsSVGViewBox.cpp +++ b/content/svg/content/src/nsSVGViewBox.cpp @@ -42,10 +42,8 @@ #include "nsTextFormatter.h" #include "nsCharSeparatedTokenizer.h" #include "nsMathUtils.h" -#ifdef MOZ_SMIL #include "nsSMILValue.h" #include "SVGViewBoxSMILType.h" -#endif // MOZ_SMIL #define NUM_VIEWBOX_COMPONENTS 4 using namespace mozilla; @@ -133,11 +131,9 @@ nsSVGViewBox::SetBaseValue(float aX, float aY, float aWidth, float aHeight, mHasBaseVal = true; aSVGElement->DidChangeViewBox(true); -#ifdef MOZ_SMIL if (mAnimVal) { aSVGElement->AnimationNeedsResample(); } -#endif } static nsresult @@ -186,11 +182,9 @@ nsSVGViewBox::SetBaseValueString(const nsAString& aValue, mBaseVal = nsSVGViewBoxRect(viewBox.x, viewBox.y, viewBox.width, viewBox.height); mHasBaseVal = true; -#ifdef MOZ_SMIL if (mAnimVal) { aSVGElement->AnimationNeedsResample(); } -#endif // We don't need to call DidChange* here - we're only called by // nsSVGElement::ParseAttribute under nsGenericElement::SetAttr, // which takes care of notifying. @@ -280,7 +274,6 @@ nsSVGViewBox::DOMBaseVal::SetHeight(float aHeight) return NS_OK; } -#ifdef MOZ_SMIL nsISMILAttr* nsSVGViewBox::ToSMILAttr(nsSVGElement *aSVGElement) { @@ -335,4 +328,3 @@ nsSVGViewBox::SMILViewBox::SetAnimValue(const nsSMILValue& aValue) } return NS_OK; } -#endif // MOZ_SMIL diff --git a/content/svg/content/src/nsSVGViewBox.h b/content/svg/content/src/nsSVGViewBox.h index 2e41e4039e07..c2bf45e766a2 100644 --- a/content/svg/content/src/nsSVGViewBox.h +++ b/content/svg/content/src/nsSVGViewBox.h @@ -84,10 +84,8 @@ public: nsresult ToDOMAnimatedRect(nsIDOMSVGAnimatedRect **aResult, nsSVGElement *aSVGElement); -#ifdef MOZ_SMIL // Returns a new nsISMILAttr object that the caller must delete nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement); -#endif // MOZ_SMIL private: @@ -136,33 +134,25 @@ private: // need to flush any resample requests to reflect these modifications. NS_IMETHOD GetX(float *aX) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aX = mVal->GetAnimValue().x; return NS_OK; } NS_IMETHOD GetY(float *aY) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aY = mVal->GetAnimValue().y; return NS_OK; } NS_IMETHOD GetWidth(float *aWidth) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aWidth = mVal->GetAnimValue().width; return NS_OK; } NS_IMETHOD GetHeight(float *aHeight) { -#ifdef MOZ_SMIL mSVGElement->FlushAnimations(); -#endif *aHeight = mVal->GetAnimValue().height; return NS_OK; } @@ -193,7 +183,6 @@ public: NS_IMETHOD GetAnimVal(nsIDOMSVGRect **aResult); }; -#ifdef MOZ_SMIL struct SMILViewBox : public nsISMILAttr { public: @@ -215,7 +204,6 @@ public: virtual void ClearAnimValue(); virtual nsresult SetAnimValue(const nsSMILValue& aValue); }; -#endif // MOZ_SMIL }; #endif // __NS_SVGVIEWBOX_H__ diff --git a/dom/Makefile.in b/dom/Makefile.in index 16eeefd828ad..af0fdabdba0b 100644 --- a/dom/Makefile.in +++ b/dom/Makefile.in @@ -43,6 +43,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = dom + DIRS = \ interfaces/base \ interfaces/canvas \ @@ -64,12 +65,9 @@ DIRS = \ interfaces/geolocation \ interfaces/notification \ interfaces/svg \ + interfaces/smil \ $(NULL) -ifdef MOZ_SMIL -DIRS += interfaces/smil -endif - DIRS += \ base \ battery \ @@ -95,4 +93,3 @@ endif endif include $(topsrcdir)/config/rules.mk - diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index cb445ec68fab..4c2a077f525f 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -372,7 +372,6 @@ #include "nsIDOMSVGAnimatedRect.h" #include "nsIDOMSVGAnimatedString.h" #include "nsIDOMSVGAnimPresAspRatio.h" -#ifdef MOZ_SMIL #include "nsIDOMSVGAnimateElement.h" #include "nsIDOMSVGAnimateTransformElement.h" #include "nsIDOMSVGAnimateMotionElement.h" @@ -381,7 +380,6 @@ #include "nsIDOMSVGAnimationElement.h" #include "nsIDOMElementTimeControl.h" #include "nsIDOMTimeEvent.h" -#endif // MOZ_SMIL #include "nsIDOMSVGAnimTransformList.h" #include "nsIDOMSVGCircleElement.h" #include "nsIDOMSVGClipPathElement.h" @@ -1032,7 +1030,6 @@ static nsDOMClassInfoData sClassInfoData[] = { ELEMENT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(SVGAltGlyphElement, nsElementSH, ELEMENT_SCRIPTABLE_FLAGS) -#ifdef MOZ_SMIL NS_DEFINE_CLASSINFO_DATA(SVGAnimateElement, nsElementSH, ELEMENT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(SVGAnimateTransformElement, nsElementSH, @@ -1045,7 +1042,6 @@ static nsDOMClassInfoData sClassInfoData[] = { ELEMENT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(TimeEvent, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) -#endif // MOZ_SMIL NS_DEFINE_CLASSINFO_DATA(SVGCircleElement, nsElementSH, ELEMENT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(SVGClipPathElement, nsElementSH, @@ -3063,7 +3059,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES DOM_CLASSINFO_MAP_END -#ifdef MOZ_SMIL DOM_CLASSINFO_MAP_BEGIN(SVGAnimateElement, nsIDOMSVGAnimateElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimationElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimateElement) @@ -3104,7 +3099,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMTimeEvent) DOM_CLASSINFO_EVENT_MAP_ENTRIES DOM_CLASSINFO_MAP_END -#endif // MOZ_SMIL DOM_CLASSINFO_MAP_BEGIN(SVGCircleElement, nsIDOMSVGCircleElement) DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGCircleElement) diff --git a/dom/base/nsDOMClassInfoClasses.h b/dom/base/nsDOMClassInfoClasses.h index 506f5a173ce5..893228bac28e 100644 --- a/dom/base/nsDOMClassInfoClasses.h +++ b/dom/base/nsDOMClassInfoClasses.h @@ -234,14 +234,12 @@ DOMCI_CLASS(SVGDocument) // SVG element classes DOMCI_CLASS(SVGAElement) DOMCI_CLASS(SVGAltGlyphElement) -#ifdef MOZ_SMIL DOMCI_CLASS(SVGAnimateElement) DOMCI_CLASS(SVGAnimateTransformElement) DOMCI_CLASS(SVGAnimateMotionElement) DOMCI_CLASS(SVGMpathElement) DOMCI_CLASS(SVGSetElement) DOMCI_CLASS(TimeEvent) -#endif // MOZ_SMIL DOMCI_CLASS(SVGCircleElement) DOMCI_CLASS(SVGClipPathElement) DOMCI_CLASS(SVGDefsElement) diff --git a/dom/interfaces/svg/Makefile.in b/dom/interfaces/svg/Makefile.in index c5d91f836c94..7e625ffd448c 100644 --- a/dom/interfaces/svg/Makefile.in +++ b/dom/interfaces/svg/Makefile.in @@ -48,7 +48,6 @@ include $(DEPTH)/config/autoconf.mk MODULE = dom XPIDL_MODULE = dom_svg - XPIDLSRCS = \ nsIDOMGetSVGDocument.idl \ nsIDOMSVGAElement.idl \ @@ -66,6 +65,10 @@ XPIDLSRCS = \ nsIDOMSVGAnimatedPoints.idl \ nsIDOMSVGAnimatedRect.idl \ nsIDOMSVGAnimatedString.idl \ + nsIDOMSVGAnimateElement.idl \ + nsIDOMSVGAnimateMotionElement.idl \ + nsIDOMSVGAnimateTransformElement.idl \ + nsIDOMSVGAnimationElement.idl \ nsIDOMSVGAnimPresAspRatio.idl \ nsIDOMSVGAnimTransformList.idl \ nsIDOMSVGCircleElement.idl \ @@ -92,6 +95,7 @@ XPIDLSRCS = \ nsIDOMSVGMaskElement.idl \ nsIDOMSVGMatrix.idl \ nsIDOMSVGMetadataElement.idl \ + nsIDOMSVGMpathElement.idl \ nsIDOMSVGNumber.idl \ nsIDOMSVGNumberList.idl \ nsIDOMSVGPathElement.idl \ @@ -106,6 +110,7 @@ XPIDLSRCS = \ nsIDOMSVGRect.idl \ nsIDOMSVGRectElement.idl \ nsIDOMSVGScriptElement.idl \ + nsIDOMSVGSetElement.idl \ nsIDOMSVGSVGElement.idl \ nsIDOMSVGStopElement.idl \ nsIDOMSVGStylable.idl \ @@ -129,15 +134,4 @@ XPIDLSRCS = \ nsIDOMSVGZoomEvent.idl \ $(NULL) -ifdef MOZ_SMIL -XPIDLSRCS += \ - nsIDOMSVGAnimateElement.idl \ - nsIDOMSVGAnimateTransformElement.idl \ - nsIDOMSVGAnimateMotionElement.idl \ - nsIDOMSVGAnimationElement.idl \ - nsIDOMSVGMpathElement.idl \ - nsIDOMSVGSetElement.idl \ - $(NULL) -endif - include $(topsrcdir)/config/rules.mk diff --git a/image/src/SVGDocumentWrapper.cpp b/image/src/SVGDocumentWrapper.cpp index e9f84d39b82c..e2eabf2ca8d1 100644 --- a/image/src/SVGDocumentWrapper.cpp +++ b/image/src/SVGDocumentWrapper.cpp @@ -185,13 +185,9 @@ SVGDocumentWrapper::FlushImageTransformInvalidation() bool SVGDocumentWrapper::IsAnimated() { -#ifdef MOZ_SMIL nsIDocument* doc = mViewer->GetDocument(); return doc && doc->HasAnimationController() && doc->GetAnimationController()->HasRegisteredAnimations(); -#else - return false; -#endif // MOZ_SMIL } void @@ -204,12 +200,10 @@ SVGDocumentWrapper::StartAnimation() nsIDocument* doc = mViewer->GetDocument(); if (doc) { -#ifdef MOZ_SMIL nsSMILAnimationController* controller = doc->GetAnimationController(); if (controller) { controller->Resume(nsSMILTimeContainer::PAUSE_IMAGE); } -#endif // MOZ_SMIL doc->SetImagesNeedAnimating(true); } } @@ -224,12 +218,10 @@ SVGDocumentWrapper::StopAnimation() nsIDocument* doc = mViewer->GetDocument(); if (doc) { -#ifdef MOZ_SMIL nsSMILAnimationController* controller = doc->GetAnimationController(); if (controller) { controller->Pause(nsSMILTimeContainer::PAUSE_IMAGE); } -#endif // MOZ_SMIL doc->SetImagesNeedAnimating(false); } } diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index 60f370d2c198..e1587dbbcc19 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -97,10 +97,7 @@ #include "nsIFrameMessageManager.h" #include "FrameLayerBuilder.h" #include "nsDOMMediaQueryList.h" - -#ifdef MOZ_SMIL #include "nsSMILAnimationController.h" -#endif // MOZ_SMIL #ifdef IBMBIDI #include "nsBidiPresUtils.h" @@ -1208,7 +1205,6 @@ void nsPresContext::SetImgAnimations(nsIContent *aParent, PRUint16 aMode) } } -#ifdef MOZ_SMIL void nsPresContext::SetSMILAnimations(nsIDocument *aDoc, PRUint16 aNewMode, PRUint16 aOldMode) @@ -1230,7 +1226,6 @@ nsPresContext::SetSMILAnimations(nsIDocument *aDoc, PRUint16 aNewMode, } } } -#endif // MOZ_SMIL void nsPresContext::SetImageAnimationModeInternal(PRUint16 aMode) @@ -1256,10 +1251,7 @@ nsPresContext::SetImageAnimationModeInternal(PRUint16 aMode) if (rootElement) { SetImgAnimations(rootElement, aMode); } - -#ifdef MOZ_SMIL SetSMILAnimations(doc, aMode, mImageAnimationMode); -#endif // MOZ_SMIL } } diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h index fa089302b1b2..ecd01d831b3b 100644 --- a/layout/base/nsPresContext.h +++ b/layout/base/nsPresContext.h @@ -992,10 +992,8 @@ protected: NS_HIDDEN_(void) SysColorChangedInternal(); NS_HIDDEN_(void) SetImgAnimations(nsIContent *aParent, PRUint16 aMode); -#ifdef MOZ_SMIL NS_HIDDEN_(void) SetSMILAnimations(nsIDocument *aDoc, PRUint16 aNewMode, PRUint16 aOldMode); -#endif // MOZ_SMIL NS_HIDDEN_(void) GetDocumentColorPreferences(); NS_HIDDEN_(void) PreferenceChanged(const char* aPrefName); diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index d09cef111450..86be91783759 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -149,9 +149,7 @@ #ifdef MOZ_MEDIA #include "nsHTMLMediaElement.h" #endif -#ifdef MOZ_SMIL #include "nsSMILAnimationController.h" -#endif #include "nsRefreshDriver.h" @@ -1124,12 +1122,10 @@ PresShell::Init(nsIDocument* aDocument, } #endif -#ifdef MOZ_SMIL if (mDocument->HasAnimationController()) { nsSMILAnimationController* animCtrl = mDocument->GetAnimationController(); animCtrl->NotifyRefreshDriverCreated(GetPresContext()->RefreshDriver()); } -#endif // MOZ_SMIL // Get our activeness from the docShell. QueryIsActive(); @@ -1254,11 +1250,9 @@ PresShell::Destroy() NS_ASSERTION(mDocument->GetShell() == this, "Wrong shell?"); mDocument->DeleteShell(); -#ifdef MOZ_SMIL if (mDocument->HasAnimationController()) { mDocument->GetAnimationController()->NotifyRefreshDriverDestroying(rd); } -#endif // MOZ_SMIL } // Revoke any pending events. We need to do this and cancel pending reflows @@ -4044,12 +4038,10 @@ PresShell::FlushPendingNotifications(mozFlushType aType) // reflow). mPresContext->FlushUserFontSet(); -#ifdef MOZ_SMIL // Flush any requested SMIL samples. if (mDocument->HasAnimationController()) { mDocument->GetAnimationController()->FlushResampleRequests(); } -#endif // MOZ_SMIL nsAutoScriptBlocker scriptBlocker; mFrameConstructor->CreateNeededFrames(); diff --git a/layout/style/nsDOMCSSAttrDeclaration.cpp b/layout/style/nsDOMCSSAttrDeclaration.cpp index 70f44d54d966..ac9a50ee8511 100644 --- a/layout/style/nsDOMCSSAttrDeclaration.cpp +++ b/layout/style/nsDOMCSSAttrDeclaration.cpp @@ -53,15 +53,10 @@ namespace css = mozilla::css; namespace dom = mozilla::dom; -nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(dom::Element* aElement -#ifdef MOZ_SMIL - , bool aIsSMILOverride -#endif // MOZ_SMIL - ) +nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(dom::Element* aElement, + bool aIsSMILOverride) : mElement(aElement) -#ifdef MOZ_SMIL , mIsSMILOverride(aIsSMILOverride) -#endif // MOZ_SMIL { MOZ_COUNT_CTOR(nsDOMCSSAttributeDeclaration); @@ -88,9 +83,7 @@ nsDOMCSSAttributeDeclaration::SetCSSDeclaration(css::Declaration* aDecl) { NS_ASSERTION(mElement, "Must have Element to set the declaration!"); css::StyleRule* oldRule = -#ifdef MOZ_SMIL mIsSMILOverride ? mElement->GetSMILOverrideStyleRule() : -#endif // MOZ_SMIL mElement->GetInlineStyleRule(); NS_ASSERTION(oldRule, "Element must have rule"); @@ -101,9 +94,7 @@ nsDOMCSSAttributeDeclaration::SetCSSDeclaration(css::Declaration* aDecl) } return -#ifdef MOZ_SMIL mIsSMILOverride ? mElement->SetSMILOverrideStyleRule(newRule, true) : -#endif // MOZ_SMIL mElement->SetInlineStyleRule(newRule, true); } @@ -114,10 +105,7 @@ nsDOMCSSAttributeDeclaration::DocToUpdate() // BeginUpdate(), but this is a good chokepoint where we know we // plan to modify the CSSDeclaration, so need to notify // AttributeWillChange if this is inline style. -#ifdef MOZ_SMIL - if (!mIsSMILOverride) -#endif - { + if (!mIsSMILOverride) { nsNodeUtils::AttributeWillChange(mElement, kNameSpaceID_None, nsGkAtoms::style, nsIDOMMutationEvent::MODIFICATION); @@ -135,11 +123,9 @@ nsDOMCSSAttributeDeclaration::GetCSSDeclaration(bool aAllocate) return nsnull; css::StyleRule* cssRule; -#ifdef MOZ_SMIL if (mIsSMILOverride) cssRule = mElement->GetSMILOverrideStyleRule(); else -#endif // MOZ_SMIL cssRule = mElement->GetInlineStyleRule(); if (cssRule) { @@ -156,11 +142,9 @@ nsDOMCSSAttributeDeclaration::GetCSSDeclaration(bool aAllocate) // this *can* fail (inside SetAttrAndNotify, at least). nsresult rv; -#ifdef MOZ_SMIL if (mIsSMILOverride) rv = mElement->SetSMILOverrideStyleRule(newRule, false); else -#endif // MOZ_SMIL rv = mElement->SetInlineStyleRule(newRule, false); if (NS_FAILED(rv)) { diff --git a/layout/style/nsDOMCSSAttrDeclaration.h b/layout/style/nsDOMCSSAttrDeclaration.h index fb692839fc45..fbe96390ad97 100644 --- a/layout/style/nsDOMCSSAttrDeclaration.h +++ b/layout/style/nsDOMCSSAttrDeclaration.h @@ -62,11 +62,7 @@ class nsDOMCSSAttributeDeclaration : public nsDOMCSSDeclaration, { public: typedef mozilla::dom::Element Element; - nsDOMCSSAttributeDeclaration(Element* aContent -#ifdef MOZ_SMIL - , bool aIsSMILOverride -#endif // MOZ_SMIL - ); + nsDOMCSSAttributeDeclaration(Element* aContent, bool aIsSMILOverride); ~nsDOMCSSAttributeDeclaration(); NS_DECL_CYCLE_COLLECTING_ISUPPORTS @@ -87,13 +83,11 @@ protected: nsRefPtr mElement; -#ifdef MOZ_SMIL /* If true, this indicates that this nsDOMCSSAttributeDeclaration * should interact with mContent's SMIL override style rule (rather * than the inline style rule). */ const bool mIsSMILOverride; -#endif // MOZ_SMIL }; #endif /* nsDOMCSSAttributeDeclaration_h */ diff --git a/layout/style/nsHTMLCSSStyleSheet.cpp b/layout/style/nsHTMLCSSStyleSheet.cpp index a96475b7addd..8877e5383ec3 100644 --- a/layout/style/nsHTMLCSSStyleSheet.cpp +++ b/layout/style/nsHTMLCSSStyleSheet.cpp @@ -81,7 +81,6 @@ nsHTMLCSSStyleSheet::RulesMatching(ElementRuleProcessorData* aData) aData->mRuleWalker->Forward(rule); } -#ifdef MOZ_SMIL rule = element->GetSMILOverrideStyleRule(); if (rule) { if (aData->mPresContext->IsProcessingRestyles() && @@ -98,7 +97,6 @@ nsHTMLCSSStyleSheet::RulesMatching(ElementRuleProcessorData* aData) aData->mRuleWalker->Forward(rule); } } -#endif // MOZ_SMIL } /* virtual */ void diff --git a/layout/svg/base/src/nsSVGUtils.cpp b/layout/svg/base/src/nsSVGUtils.cpp index 40f4f659a78c..4e94208dfc9c 100644 --- a/layout/svg/base/src/nsSVGUtils.cpp +++ b/layout/svg/base/src/nsSVGUtils.cpp @@ -166,12 +166,9 @@ static const PRUint8 gsRGBToLinearRGBMap[256] = { 239, 242, 244, 246, 248, 250, 253, 255 }; -#ifdef MOZ_SMIL static bool gSMILEnabled; static const char SMIL_PREF_STR[] = "svg.smil.enabled"; -#endif // MOZ_SMIL -#ifdef MOZ_SMIL static int SMILPrefChanged(const char *aPref, void *aClosure) { @@ -195,7 +192,6 @@ NS_SMILEnabled() return gSMILEnabled; } -#endif // MOZ_SMIL nsSVGSVGElement* nsSVGUtils::GetOuterSVGElement(nsSVGElement *aSVGElement) diff --git a/layout/svg/base/src/nsSVGUtils.h b/layout/svg/base/src/nsSVGUtils.h index 7e7f621a912e..9dafbd628b52 100644 --- a/layout/svg/base/src/nsSVGUtils.h +++ b/layout/svg/base/src/nsSVGUtils.h @@ -139,13 +139,11 @@ IsSVGWhitespace(PRUnichar aChar) aChar == PRUnichar('\xD') || aChar == PRUnichar('\xA'); } -#ifdef MOZ_SMIL /* * Checks the smil enabled preference. Declared as a function to match * NS_SVGEnabled(). */ bool NS_SMILEnabled(); -#endif // MOZ_SMIL // GRRR WINDOWS HATE HATE HATE #undef CLIP_MASK diff --git a/mobile/installer/package-manifest.in b/mobile/installer/package-manifest.in index 30facf3bee11..36f73ddf081e 100644 --- a/mobile/installer/package-manifest.in +++ b/mobile/installer/package-manifest.in @@ -508,9 +508,7 @@ ; svg @BINPATH@/res/svg.css @BINPATH@/components/dom_svg.xpt -#ifdef MOZ_SMIL @BINPATH@/components/dom_smil.xpt -#endif ; [Personal Security Manager] ; diff --git a/toolkit/toolkit-makefiles.sh b/toolkit/toolkit-makefiles.sh index 6583ec6d16e9..6fc32d87acb6 100644 --- a/toolkit/toolkit-makefiles.sh +++ b/toolkit/toolkit-makefiles.sh @@ -266,6 +266,11 @@ MAKEFILES_content=" content/xslt/src/xslt/Makefile " +MAKEFILES_smil=" + content/smil/Makefile + dom/interfaces/smil/Makefile +" + MAKEFILES_layout=" layout/Makefile layout/base/Makefile @@ -740,6 +745,7 @@ add_makefiles " $MAKEFILES_jsreflect $MAKEFILES_jsductwork $MAKEFILES_content + $MAKEFILES_smil $MAKEFILES_layout $MAKEFILES_libjar $MAKEFILES_libreg @@ -1082,13 +1088,6 @@ if [ "$MOZ_MAPINFO" ]; then " fi -if [ "$MOZ_SMIL" ]; then - add_makefiles " - content/smil/Makefile - dom/interfaces/smil/Makefile - " -fi - if [ "$MOZ_XTF" ]; then add_makefiles " content/xtf/Makefile diff --git a/widget/public/nsGUIEvent.h b/widget/public/nsGUIEvent.h index d622a09df203..da76932b2e53 100644 --- a/widget/public/nsGUIEvent.h +++ b/widget/public/nsGUIEvent.h @@ -111,9 +111,7 @@ class nsHashKey; #define NS_UI_EVENT 28 #define NS_SVG_EVENT 30 #define NS_SVGZOOM_EVENT 31 -#ifdef MOZ_SMIL #define NS_SMIL_TIME_EVENT 32 -#endif // MOZ_SMIL #define NS_QUERY_CONTENT_EVENT 33 @@ -510,12 +508,10 @@ class nsHashKey; #define NS_ANIMATION_END (NS_ANIMATION_EVENT_START + 1) #define NS_ANIMATION_ITERATION (NS_ANIMATION_EVENT_START + 2) -#ifdef MOZ_SMIL #define NS_SMIL_TIME_EVENT_START 4300 #define NS_SMIL_BEGIN (NS_SMIL_TIME_EVENT_START) #define NS_SMIL_END (NS_SMIL_TIME_EVENT_START + 1) #define NS_SMIL_REPEAT (NS_SMIL_TIME_EVENT_START + 2) -#endif // MOZ_SMIL #define NS_MOZTOUCH_EVENT_START 4400 #define NS_MOZTOUCH_DOWN (NS_MOZTOUCH_EVENT_START)