Bug 520710 followup: move nsSMILAnimationFunction's inline methods IsToAnimation/IsAdditive to header, to fix link error on some OSX systems. r=smaug
authorDaniel Holbert <dholbert@cs.stanford.edu>
Sun, 25 Oct 2009 12:22:29 -0700
changeset 34175 8e2bef3d55e823610e2bfca6f8ad7f9d3ef96fc0
parent 34174 52d8ca3f76af7f3eed6be8bc3b2355e7fa93c7f7
child 34176 ca5ef12ec28f206a0d90a875bc3a6d2593755d9c
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs520710
milestone1.9.3a1pre
Bug 520710 followup: move nsSMILAnimationFunction's inline methods IsToAnimation/IsAdditive to header, to fix link error on some OSX systems. r=smaug
content/smil/nsSMILAnimationFunction.cpp
content/smil/nsSMILAnimationFunction.h
--- a/content/smil/nsSMILAnimationFunction.cpp
+++ b/content/smil/nsSMILAnimationFunction.cpp
@@ -762,41 +762,16 @@ nsSMILAnimationFunction::GetValues(const
   CheckKeyTimes(result.Length());
   CheckKeySplines(result.Length());
 
   result.SwapElements(aResult);
 
   return NS_OK;
 }
 
-inline PRBool
-nsSMILAnimationFunction::IsToAnimation() const
-{
-  return !HasAttr(nsGkAtoms::values) &&
-         HasAttr(nsGkAtoms::to) &&
-         !HasAttr(nsGkAtoms::from);
-}
-
-inline PRBool
-nsSMILAnimationFunction::IsAdditive() const
-{
-  /*
-   * Animation is additive if:
-   *
-   * (1) additive = "sum" (GetAdditive() == true), or
-   * (2) it is 'by animation' (by is set, from and values are not)
-   *
-   * Although animation is not additive if it is 'to animation'
-   */
-  PRBool isByAnimation = (!HasAttr(nsGkAtoms::values)
-                       &&  HasAttr(nsGkAtoms::by)
-                       && !HasAttr(nsGkAtoms::from));
-  return !IsToAnimation() && (GetAdditive() || isByAnimation);
-}
-
 /**
  * Performs checks for the keyTimes attribute required by the SMIL spec but
  * which depend on other attributes and therefore needs to be updated as
  * dependent attributes are set.
  */
 void
 nsSMILAnimationFunction::CheckKeyTimes(PRUint32 aNumValues)
 {
--- a/content/smil/nsSMILAnimationFunction.h
+++ b/content/smil/nsSMILAnimationFunction.h
@@ -287,21 +287,39 @@ protected:
   virtual PRBool             GetAttr(nsIAtom* aAttName,
                                      nsAString& aResult) const;
 
   PRBool   ParseAttr(nsIAtom* aAttName, const nsISMILAttr& aSMILAttr,
                      nsSMILValue& aResult) const;
   nsresult GetValues(const nsISMILAttr& aSMILAttr,
                      nsSMILValueArray& aResult);
   void     UpdateValuesArray();
-  PRBool   IsToAnimation() const;
-  PRBool   IsAdditive() const;
   void     CheckKeyTimes(PRUint32 aNumValues);
   void     CheckKeySplines(PRUint32 aNumValues);
 
+  inline PRBool IsToAnimation() const {
+    return !HasAttr(nsGkAtoms::values) &&
+            HasAttr(nsGkAtoms::to) &&
+           !HasAttr(nsGkAtoms::from);
+  }
+
+  inline PRBool IsAdditive() const {
+    /*
+     * Animation is additive if:
+     *
+     * (1) additive = "sum" (GetAdditive() == true), or
+     * (2) it is 'by animation' (by is set, from and values are not)
+     *
+     * Although animation is not additive if it is 'to animation'
+     */
+    PRBool isByAnimation = (!HasAttr(nsGkAtoms::values) &&
+                             HasAttr(nsGkAtoms::by) &&
+                            !HasAttr(nsGkAtoms::from));
+    return !IsToAnimation() && (GetAdditive() || isByAnimation);
+  }
 
   // Members
   // -------
 
   static nsAttrValue::EnumTable sAdditiveTable[];
   static nsAttrValue::EnumTable sCalcModeTable[];
   static nsAttrValue::EnumTable sAccumulateTable[];