Bug 698534 - Fix build bustage when smil is disabled. r=dholbert
authorMounir Lamouri <mounir.lamouri@gmail.com>
Tue, 01 Nov 2011 20:22:30 +0100
changeset 79537 b2c58afeead0db264b38028a379ff66caaf0f5c5
parent 79536 8d6bdc1a656fe52a021ca5cb23498123a65bc337
child 79538 86b1bbf9421638f4ded347692cfa1d065fddc6d5
push id3040
push usermlamouri@mozilla.com
push dateTue, 01 Nov 2011 19:25:37 +0000
treeherdermozilla-inbound@86b1bbf94216 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs698534
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 698534 - Fix build bustage when smil is disabled. r=dholbert
content/svg/content/src/nsSVGClass.cpp
content/svg/content/src/nsSVGClass.h
content/svg/content/src/nsSVGStylableElement.cpp
--- a/content/svg/content/src/nsSVGClass.cpp
+++ b/content/svg/content/src/nsSVGClass.cpp
@@ -108,33 +108,33 @@ nsresult
 nsSVGClass::ToDOMAnimatedString(nsIDOMSVGAnimatedString **aResult,
                                 nsSVGStylableElement *aSVGElement)
 {
   *aResult = new DOMAnimatedString(this, aSVGElement);
   NS_ADDREF(*aResult);
   return NS_OK;
 }
 
-#ifdef MOZ_SMIL
-nsISMILAttr*
-nsSVGClass::ToSMILAttr(nsSVGStylableElement *aSVGElement)
-{
-  return new SMILString(this, aSVGElement);
-}
-
 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)
+{
+  return new SMILString(this, aSVGElement);
+}
+
 nsresult
 nsSVGClass::SMILString::ValueFromString(const nsAString& aStr,
                                         const nsISMILAnimationElement* /*aSrcElement*/,
                                         nsSMILValue& aValue,
                                         bool& aPreventCachingOfSandwich) const
 {
   nsSMILValue val(&SMILStringType::sSingleton);
 
--- a/content/svg/content/src/nsSVGClass.h
+++ b/content/svg/content/src/nsSVGClass.h
@@ -36,18 +36,21 @@
 
 #ifndef __NS_SVGCLASS_H__
 #define __NS_SVGCLASS_H__
 
 #include "nsIDOMSVGAnimatedString.h"
 #include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsString.h"
+#include "nsDOMError.h"
+
+#ifdef MOZ_SMIL
 #include "nsISMILAttr.h"
-#include "nsDOMError.h"
+#endif // MOZ_SMIL
 
 class nsSVGStylableElement;
 
 class nsSVGClass
 {
 
 public:
   void Init() {
--- a/content/svg/content/src/nsSVGStylableElement.cpp
+++ b/content/svg/content/src/nsSVGStylableElement.cpp
@@ -144,17 +144,19 @@ nsSVGStylableElement::DidAnimateClass()
   mClassAnimAttr->ParseAtomArray(src);
 
   nsIPresShell* shell = OwnerDoc()->GetShell();
   if (shell) {
     shell->RestyleForAnimation(this, eRestyle_Self);
   }
 }
 
+#ifdef MOZ_SMIL
 nsISMILAttr*
 nsSVGStylableElement::GetAnimatedAttr(PRInt32 aNamespaceID, nsIAtom* aName)
 {
   if (aNamespaceID == kNameSpaceID_None && 
       aName == nsGkAtoms::_class) {
     return mClassAttribute.ToSMILAttr(this);
   }
   return nsSVGStylableElementBase::GetAnimatedAttr(aNamespaceID, aName);
 }
+#endif // MOZ_SMIL