Bug 554704: Rename "aCanCache" param (for nsISMILAttr::ValueFromString), r=dholbert, r=jwatt
authorFelipe Corrêa da Silva Sanches <felipe.sanches@gmail.com>
Wed, 23 Jun 2010 17:30:55 -0700
changeset 46136 683467d7a222f0a17c59c20b0acadbaa1efbf557
parent 46135 e7d06d7d284b8881ddc8f0b521adbef4f5b6f90e
child 46137 33bc7661cc131818eb4f454aac75e8422ca1a7a6
push idunknown
push userunknown
push dateunknown
reviewersdholbert, jwatt
bugs554704
milestone1.9.3a6pre
Bug 554704: Rename "aCanCache" param (for nsISMILAttr::ValueFromString), r=dholbert, r=jwatt
content/smil/nsISMILAttr.h
content/smil/nsSMILAnimationFunction.cpp
content/smil/nsSMILAnimationFunction.h
content/smil/nsSMILCSSProperty.cpp
content/smil/nsSMILCSSProperty.h
content/smil/nsSMILMappedAttribute.cpp
content/smil/nsSMILMappedAttribute.h
content/smil/nsSMILParserUtils.cpp
content/smil/nsSMILParserUtils.h
content/svg/content/src/SVGMotionSMILAttr.cpp
content/svg/content/src/SVGMotionSMILAttr.h
content/svg/content/src/nsSVGAngle.cpp
content/svg/content/src/nsSVGAngle.h
content/svg/content/src/nsSVGBoolean.cpp
content/svg/content/src/nsSVGBoolean.h
content/svg/content/src/nsSVGEnum.cpp
content/svg/content/src/nsSVGEnum.h
content/svg/content/src/nsSVGInteger.cpp
content/svg/content/src/nsSVGInteger.h
content/svg/content/src/nsSVGLength2.cpp
content/svg/content/src/nsSVGLength2.h
content/svg/content/src/nsSVGNumber2.cpp
content/svg/content/src/nsSVGNumber2.h
content/svg/content/src/nsSVGPreserveAspectRatio.cpp
content/svg/content/src/nsSVGPreserveAspectRatio.h
content/svg/content/src/nsSVGTransformSMILAttr.cpp
content/svg/content/src/nsSVGTransformSMILAttr.h
content/svg/content/src/nsSVGViewBox.cpp
content/svg/content/src/nsSVGViewBox.h
--- a/content/smil/nsISMILAttr.h
+++ b/content/smil/nsISMILAttr.h
@@ -64,26 +64,27 @@ public:
    * animation (including interpolation etc.).
    *
    * @param aStr        A string defining the new value to be created.
    * @param aSrcElement The source animation element. This may be needed to
    *                    provided additional context data such as for
    *                    animateTransform where the 'type' attribute is needed to
    *                    parse the value.
    * @param[out] aValue Outparam for storing the parsed value.
-   * @param[out] aCanCache Outparam for indicating whether the parsed value
-   *                       can be reused in future samples -- i.e. whether the
-   *                       given string is always guaranteed to compute
-   *                       to the same nsSMILValue.
+   * @param[out] aPreventCachingOfSandwich
+   *                    Outparam to indicate whether the attribute contains
+   *                    dependencies on its context that should prevent the
+   *                    result of the animation sandwich from being cached and
+   *                    reused in future samples.
    * @return NS_OK on success or an error code if creation failed.
    */
   virtual nsresult ValueFromString(const nsAString& aStr,
                                    const nsISMILAnimationElement* aSrcElement,
                                    nsSMILValue& aValue,
-                                   PRBool& aCanCache) const = 0;
+                                   PRBool& aPreventCachingOfSandwich) const = 0;
 
   /**
    * Gets the underlying value of this attribute.
    *
    * @return an nsSMILValue object. returned_object.IsNull() will be true if an
    * error occurred.
    */
   virtual nsSMILValue GetBaseValue() const = 0;
--- a/content/smil/nsSMILAnimationFunction.cpp
+++ b/content/smil/nsSMILAnimationFunction.cpp
@@ -689,39 +689,41 @@ nsSMILAnimationFunction::GetAttr(nsIAtom
 
 /*
  * A utility function to make querying an attribute that corresponds to an
  * nsSMILValue a little neater.
  *
  * @param aAttName    The attribute name (in the global namespace).
  * @param aSMILAttr   The SMIL attribute to perform the parsing.
  * @param[out] aResult        The resulting nsSMILValue.
- * @param[out] aCanCacheSoFar If |aResult| cannot be cached (as reported by
- *                            nsISMILAttr::ValueFromString), then this outparam
- *                            will be set to PR_FALSE. Otherwise, this outparam
- *                            won't be modified.
+ * @param[out] aPreventCachingOfSandwich
+ *                    If |aResult| contains dependencies on its context that
+ *                    should prevent the result of the animation sandwich from
+ *                    being cached and reused in future samples (as reported
+ *                    by nsISMILAttr::ValueFromString), then this outparam
+ *                    will be set to PR_TRUE. Otherwise it is left unmodified.
  *
  * Returns PR_FALSE if a parse error occurred, otherwise returns PR_TRUE.
  */
 PRBool
 nsSMILAnimationFunction::ParseAttr(nsIAtom* aAttName,
                                    const nsISMILAttr& aSMILAttr,
                                    nsSMILValue& aResult,
-                                   PRBool& aCanCacheSoFar) const
+                                   PRBool& aPreventCachingOfSandwich) const
 {
   nsAutoString attValue;
   if (GetAttr(aAttName, attValue)) {
-    PRBool canCache;
+    PRBool preventCachingOfSandwich;
     nsresult rv = aSMILAttr.ValueFromString(attValue, mAnimationElement,
-                                            aResult, canCache);
+                                            aResult, preventCachingOfSandwich);
     if (NS_FAILED(rv))
       return PR_FALSE;
 
-    if (!canCache) {
-      aCanCacheSoFar = PR_FALSE;
+    if (preventCachingOfSandwich) {
+      aPreventCachingOfSandwich = PR_TRUE;
     }
   }
   return PR_TRUE;
 }
 
 /*
  * SMILANIM specifies the following rules for animation function values:
  *
@@ -745,35 +747,39 @@ nsSMILAnimationFunction::GetValues(const
 
   mValueNeedsReparsingEverySample = PR_FALSE;
   nsSMILValueArray result;
 
   // If "values" is set, use it
   if (HasAttr(nsGkAtoms::values)) {
     nsAutoString attValue;
     GetAttr(nsGkAtoms::values, attValue);
-    PRBool canCache;
+    PRBool preventCachingOfSandwich;
     nsresult rv = nsSMILParserUtils::ParseValues(attValue, mAnimationElement,
-                                                 aSMILAttr, result, canCache);
+                                                 aSMILAttr, result,
+                                                 preventCachingOfSandwich);
     if (NS_FAILED(rv))
       return rv;
 
-    if (!canCache) {
+    if (preventCachingOfSandwich) {
       mValueNeedsReparsingEverySample = PR_TRUE;
     }
   // Else try to/from/by
   } else {
-    PRBool canCacheSoFar = PR_TRUE;
+    PRBool preventCachingOfSandwich = PR_FALSE;
     PRBool parseOk = PR_TRUE;
     nsSMILValue to, from, by;
-    parseOk &= ParseAttr(nsGkAtoms::to,   aSMILAttr, to,   canCacheSoFar);
-    parseOk &= ParseAttr(nsGkAtoms::from, aSMILAttr, from, canCacheSoFar);
-    parseOk &= ParseAttr(nsGkAtoms::by,   aSMILAttr, by,   canCacheSoFar);
+    parseOk &= ParseAttr(nsGkAtoms::to,   aSMILAttr, to,
+                         preventCachingOfSandwich);
+    parseOk &= ParseAttr(nsGkAtoms::from, aSMILAttr, from,
+                         preventCachingOfSandwich);
+    parseOk &= ParseAttr(nsGkAtoms::by,   aSMILAttr, by,
+                         preventCachingOfSandwich);
     
-    if (!canCacheSoFar) {
+    if (preventCachingOfSandwich) {
       mValueNeedsReparsingEverySample = PR_TRUE;
     }
 
     if (!parseOk)
       return NS_ERROR_FAILURE;
 
     result.SetCapacity(2);
     if (!to.IsNull()) {
--- a/content/smil/nsSMILAnimationFunction.h
+++ b/content/smil/nsSMILAnimationFunction.h
@@ -316,17 +316,18 @@ protected:
   // Convenience attribute getters -- use these instead of querying
   // mAnimationElement as these may need to be overridden by subclasses
   virtual PRBool             HasAttr(nsIAtom* aAttName) const;
   virtual const nsAttrValue* GetAttr(nsIAtom* aAttName) const;
   virtual PRBool             GetAttr(nsIAtom* aAttName,
                                      nsAString& aResult) const;
 
   PRBool   ParseAttr(nsIAtom* aAttName, const nsISMILAttr& aSMILAttr,
-                     nsSMILValue& aResult, PRBool& aCanCacheSoFar) const;
+                     nsSMILValue& aResult,
+                     PRBool& aPreventCachingOfSandwich) const;
 
   virtual nsresult GetValues(const nsISMILAttr& aSMILAttr,
                              nsSMILValueArray& aResult);
 
   virtual void CheckValueListDependentAttrs(PRUint32 aNumValues);
   void         CheckKeyTimes(PRUint32 aNumValues);
   void         CheckKeySplines(PRUint32 aNumValues);
 
--- a/content/smil/nsSMILCSSProperty.cpp
+++ b/content/smil/nsSMILCSSProperty.cpp
@@ -150,34 +150,35 @@ nsSMILCSSProperty::GetBaseValue() const
   }
   return baseValue;
 }
 
 nsresult
 nsSMILCSSProperty::ValueFromString(const nsAString& aStr,
                                    const nsISMILAnimationElement* aSrcElement,
                                    nsSMILValue& aValue,
-                                   PRBool& aCanCache) const
+                                   PRBool& aPreventCachingOfSandwich) const
 {
   NS_ENSURE_TRUE(IsPropertyAnimatable(mPropID), NS_ERROR_FAILURE);
 
   nsSMILCSSValueType::ValueFromString(mPropID, mElement, aStr, aValue);
   if (aValue.IsNull()) {
     return NS_ERROR_FAILURE;
   }
 
   // XXXdholbert: For simplicity, just assume that all CSS values have to
   // reparsed every sample. This prevents us from doing the "nothing's changed
   // so don't recompose" optimization (bug 533291) for CSS properties & mapped
   // attributes.  If it ends up being expensive to always recompose those, we
-  // can be a little smarter here.  We really only need to disable aCanCache
-  // for "inherit" & "currentColor" (whose values could change at any time), as
-  // well as for length-valued types (particularly those with em/ex/percent
-  // units, since their conversion ratios can change at any time).
-  aCanCache = PR_FALSE;
+  // can be a little smarter here.  We really only need to set
+  // aPreventCachingOfSandwich to true for "inherit" & "currentColor" (whose
+  // values could change at any time), for length-valued types (particularly
+  // those with em/ex/percent units, since their conversion ratios can change
+  // at any time), and for any value for 'font-family'.
+  aPreventCachingOfSandwich = PR_TRUE;
   return NS_OK;
 }
 
 nsresult
 nsSMILCSSProperty::SetAnimValue(const nsSMILValue& aValue)
 {
   NS_ENSURE_TRUE(IsPropertyAnimatable(mPropID), NS_ERROR_FAILURE);
 
--- a/content/smil/nsSMILCSSProperty.h
+++ b/content/smil/nsSMILCSSProperty.h
@@ -68,17 +68,17 @@ public:
    * @param  aElement  The element whose CSS property is being animated.
    */
   nsSMILCSSProperty(nsCSSProperty aPropID, mozilla::dom::Element* aElement);
 
   // nsISMILAttr methods
   virtual nsresult ValueFromString(const nsAString& aStr,
                                    const nsISMILAnimationElement* aSrcElement,
                                    nsSMILValue& aValue,
-                                   PRBool& aCanCache) const;
+                                   PRBool& aPreventCachingOfSandwich) const;
   virtual nsSMILValue GetBaseValue() const;
   virtual nsresult    SetAnimValue(const nsSMILValue& aValue);
   virtual void        ClearAnimValue();
 
   /**
    * Utility method - returns PR_TRUE if the given property is supported for
    * SMIL animation.
    *
--- a/content/smil/nsSMILMappedAttribute.cpp
+++ b/content/smil/nsSMILMappedAttribute.cpp
@@ -57,28 +57,28 @@ ReleaseStringBufferPropertyValue(void*  
   buf->Release();
 }
 
 
 nsresult
 nsSMILMappedAttribute::ValueFromString(const nsAString& aStr,
                                        const nsISMILAnimationElement* aSrcElement,
                                        nsSMILValue& aValue,
-                                       PRBool& aCanCache) const
+                                       PRBool& aPreventCachingOfSandwich) const
 {
   NS_ENSURE_TRUE(IsPropertyAnimatable(mPropID), NS_ERROR_FAILURE);
 
   nsSMILCSSValueType::ValueFromString(mPropID, mElement, aStr, aValue);
   if (aValue.IsNull()) {
     return NS_ERROR_FAILURE;
   }
 
   // XXXdholbert: For simplicity, just assume that all CSS values have to
   // reparsed every sample. See note in nsSMILCSSProperty::ValueFromString.
-  aCanCache = PR_FALSE;
+  aPreventCachingOfSandwich = PR_TRUE;
   return NS_OK;
 }
 
 nsSMILValue
 nsSMILMappedAttribute::GetBaseValue() const
 {
   nsAutoString baseStringValue;
   nsRefPtr<nsIAtom> attrName = GetAttrNameAtom();
--- a/content/smil/nsSMILMappedAttribute.h
+++ b/content/smil/nsSMILMappedAttribute.h
@@ -68,17 +68,17 @@ public:
    */
   nsSMILMappedAttribute(nsCSSProperty aPropID, mozilla::dom::Element* aElement) :
     nsSMILCSSProperty(aPropID, aElement) {}
 
   // nsISMILAttr methods
   virtual nsresult ValueFromString(const nsAString& aStr,
                                    const nsISMILAnimationElement* aSrcElement,
                                    nsSMILValue& aValue,
-                                   PRBool& aCanCache) const;
+                                   PRBool& aPreventCachingOfSandwich) const;
   virtual nsSMILValue GetBaseValue() const;
   virtual nsresult    SetAnimValue(const nsSMILValue& aValue);
   virtual void        ClearAnimValue();
 
 protected:
   // Helper Methods
   void FlushChangesToTargetAttr() const;
   already_AddRefed<nsIAtom> GetAttrNameAtom() const;
--- a/content/smil/nsSMILParserUtils.cpp
+++ b/content/smil/nsSMILParserUtils.cpp
@@ -543,57 +543,57 @@ nsSMILParserUtils::ParseSemicolonDelimit
 
 // Helper class for ParseValues
 class SMILValueParser : public nsSMILParserUtils::GenericValueParser
 {
 public:
   SMILValueParser(const nsISMILAnimationElement* aSrcElement,
                   const nsISMILAttr* aSMILAttr,
                   nsTArray<nsSMILValue>* aValuesArray,
-                  PRBool* aCanCache) :
+                  PRBool* aPreventCachingOfSandwich) :
     mSrcElement(aSrcElement),
     mSMILAttr(aSMILAttr),
     mValuesArray(aValuesArray),
-    mCanCache(aCanCache)
+    mPreventCachingOfSandwich(aPreventCachingOfSandwich)
   {}
 
   virtual nsresult Parse(const nsAString& aValueStr) {
     nsSMILValue newValue;
-    PRBool tmpCanCache;
-    nsresult rv = mSMILAttr->ValueFromString(aValueStr, mSrcElement,
-                                             newValue, tmpCanCache);
+    PRBool tmpPreventCachingOfSandwich;
+    nsresult rv = mSMILAttr->ValueFromString(aValueStr, mSrcElement, newValue,
+                                             tmpPreventCachingOfSandwich);
     if (NS_FAILED(rv))
       return rv;
 
     if (!mValuesArray->AppendElement(newValue)) {
       return NS_ERROR_OUT_OF_MEMORY;
     }
-    if (!tmpCanCache) {
-      *mCanCache = PR_FALSE;
+    if (tmpPreventCachingOfSandwich) {
+      *mPreventCachingOfSandwich = PR_TRUE;
     }
     return NS_OK;
   }
 protected:
   const nsISMILAnimationElement* mSrcElement;
   const nsISMILAttr* mSMILAttr;
   nsTArray<nsSMILValue>* mValuesArray;
-  PRBool* mCanCache;
+  PRBool* mPreventCachingOfSandwich;
 };
 
 nsresult
 nsSMILParserUtils::ParseValues(const nsAString& aSpec,
                                const nsISMILAnimationElement* aSrcElement,
                                const nsISMILAttr& aAttribute,
                                nsTArray<nsSMILValue>& aValuesArray,
-                               PRBool& aCanCache)
+                               PRBool& aPreventCachingOfSandwich)
 {
   // Assume all results can be cached, until we find one that can't.
-  aCanCache = PR_TRUE;
+  aPreventCachingOfSandwich = PR_FALSE;
   SMILValueParser valueParser(aSrcElement, &aAttribute,
-                              &aValuesArray, &aCanCache);
+                              &aValuesArray, &aPreventCachingOfSandwich);
   return ParseValuesGeneric(aSpec, valueParser);
 }
 
 nsresult
 nsSMILParserUtils::ParseValuesGeneric(const nsAString& aSpec,
                                       GenericValueParser& aParser)
 {
   nsCharSeparatedTokenizer tokenizer(aSpec, ';');
--- a/content/smil/nsSMILParserUtils.h
+++ b/content/smil/nsSMILParserUtils.h
@@ -70,17 +70,17 @@ public:
   static nsresult ParseSemicolonDelimitedProgressList(const nsAString& aSpec,
                                                       PRBool aNonDecreasing,
                                                       nsTArray<double>& aArray);
 
   static nsresult ParseValues(const nsAString& aSpec,
                               const nsISMILAnimationElement* aSrcElement,
                               const nsISMILAttr& aAttribute,
                               nsTArray<nsSMILValue>& aValuesArray,
-                              PRBool& aCanCache);
+                              PRBool& aPreventCachingOfSandwich);
 
   // Generic method that will run some code on each sub-section of an animation
   // element's "values" list.
   static nsresult ParseValuesGeneric(const nsAString& aSpec,
                                      GenericValueParser& aParser);
 
   static nsresult ParseRepeatCount(const nsAString& aSpec,
                                    nsSMILRepeatCount& aResult);
--- a/content/svg/content/src/SVGMotionSMILAttr.cpp
+++ b/content/svg/content/src/SVGMotionSMILAttr.cpp
@@ -49,17 +49,17 @@
 #include "nsSMILParserUtils.h"
 
 namespace mozilla {
 
 nsresult
 SVGMotionSMILAttr::ValueFromString(const nsAString& aStr,
                                    const nsISMILAnimationElement* aSrcElement,
                                    nsSMILValue& aValue,
-                                   PRBool& aCanCache) const
+                                   PRBool& aPreventCachingOfSandwich) const
 {
   NS_NOTREACHED("Shouldn't using nsISMILAttr::ValueFromString for parsing "
                 "animateMotion's SMIL values.");
   return NS_ERROR_FAILURE;
 }
 
 nsSMILValue
 SVGMotionSMILAttr::GetBaseValue() const
--- a/content/svg/content/src/SVGMotionSMILAttr.h
+++ b/content/svg/content/src/SVGMotionSMILAttr.h
@@ -57,17 +57,17 @@ class SVGMotionSMILAttr : public nsISMIL
 public:
   SVGMotionSMILAttr(nsSVGElement* aSVGElement)
     : mSVGElement(aSVGElement) {}
 
   // nsISMILAttr methods
   virtual nsresult ValueFromString(const nsAString& aStr,
                                    const nsISMILAnimationElement* aSrcElement,
                                    nsSMILValue& aValue,
-                                   PRBool& aCanCache) const;
+                                   PRBool& aPreventCachingOfSandwich) const;
   virtual nsSMILValue GetBaseValue() const;
   virtual nsresult    SetAnimValue(const nsSMILValue& aValue);
   virtual void        ClearAnimValue();
   virtual const nsIContent* GetTargetNode() const;
 
 protected:
   // Raw pointers are OK here because this SVGMotionSMILAttr is both
   // created & destroyed during a SMIL sample-step, during which time the DOM
--- a/content/svg/content/src/nsSVGAngle.cpp
+++ b/content/svg/content/src/nsSVGAngle.cpp
@@ -435,34 +435,34 @@ nsSVGAngle::ToSMILAttr(nsSVGElement *aSV
   NS_NOTREACHED("Trying to animate unknown angle attribute.");
   return nsnull;
 }
 
 nsresult
 nsSVGAngle::SMILOrient::ValueFromString(const nsAString& aStr,
                                         const nsISMILAnimationElement* /*aSrcElement*/,
                                         nsSMILValue& aValue,
-                                        PRBool& aCanCache) const
+                                        PRBool& aPreventCachingOfSandwich) const
 {
   nsSMILValue val(&SVGOrientSMILType::sSingleton);
   if (aStr.EqualsLiteral("auto")) {
     val.mU.mOrient.mOrientType = nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_AUTO;
   } else {
     float value;
     PRUint16 unitType;
     nsresult rv = GetValueFromString(aStr, &value, &unitType);
     if (NS_FAILED(rv)) {
       return rv;
     }
     val.mU.mOrient.mAngle = value;
     val.mU.mOrient.mUnit = unitType;
     val.mU.mOrient.mOrientType = nsIDOMSVGMarkerElement::SVG_MARKER_ORIENT_ANGLE;
   }
   aValue.Swap(val);
-  aCanCache = PR_TRUE;
+  aPreventCachingOfSandwich = PR_FALSE;
 
   return NS_OK;
 }
 
 nsSMILValue
 nsSVGAngle::SMILOrient::GetBaseValue() const
 {
   nsSMILValue val(&SVGOrientSMILType::sSingleton);
--- a/content/svg/content/src/nsSVGAngle.h
+++ b/content/svg/content/src/nsSVGAngle.h
@@ -221,17 +221,17 @@ public:
     nsSVGOrientType* mOrientType;
     nsSVGAngle* mAngle;
     nsSVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* aSrcElement,
                                      nsSMILValue& aValue,
-                                     PRBool& aCanCache) const;
+                                     PRBool& aPreventCachingOfSandwich) const;
     virtual nsSMILValue GetBaseValue() const;
     virtual void ClearAnimValue();
     virtual nsresult SetAnimValue(const nsSMILValue& aValue);
   };
 #endif // MOZ_SMIL
 };
 
 nsresult
--- a/content/svg/content/src/nsSVGBoolean.cpp
+++ b/content/svg/content/src/nsSVGBoolean.cpp
@@ -141,29 +141,29 @@ nsSVGBoolean::ToSMILAttr(nsSVGElement *a
 {
   return new SMILBool(this, aSVGElement);
 }
 
 nsresult
 nsSVGBoolean::SMILBool::ValueFromString(const nsAString& aStr,
                                         const nsISMILAnimationElement* /*aSrcElement*/,
                                         nsSMILValue& aValue,
-                                        PRBool& aCanCache) const
+                                        PRBool& aPreventCachingOfSandwich) const
 {
   nsSMILValue val(&SMILBoolType::sSingleton);
 
   if (aStr.EqualsLiteral("true"))
     val.mU.mBool = PR_TRUE;
   else if (aStr.EqualsLiteral("false"))
     val.mU.mBool = PR_FALSE;
   else
     return NS_ERROR_FAILURE;
 
   aValue = val;
-  aCanCache = PR_TRUE;
+  aPreventCachingOfSandwich = PR_FALSE;
   return NS_OK;
 }
 
 nsSMILValue
 nsSVGBoolean::SMILBool::GetBaseValue() const
 {
   nsSMILValue val(&SMILBoolType::sSingleton);
   val.mU.mBool = mVal->mBaseVal;
--- a/content/svg/content/src/nsSVGBoolean.h
+++ b/content/svg/content/src/nsSVGBoolean.h
@@ -119,16 +119,16 @@ public:
     // die during that.
     nsSVGBoolean* mVal;
     nsSVGElement* mSVGElement;
     
     // nsISMILAttr methods
     virtual nsresult ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* aSrcElement,
                                      nsSMILValue& aValue,
-                                     PRBool& aCanCache) const;
+                                     PRBool& aPreventCachingOfSandwich) const;
     virtual nsSMILValue GetBaseValue() const;
     virtual void ClearAnimValue();
     virtual nsresult SetAnimValue(const nsSMILValue& aValue);
   };
 #endif // MOZ_SMIL
 };
 #endif //__NS_SVGBOOLEAN_H__
--- a/content/svg/content/src/nsSVGEnum.cpp
+++ b/content/svg/content/src/nsSVGEnum.cpp
@@ -172,27 +172,27 @@ nsSVGEnum::ToSMILAttr(nsSVGElement *aSVG
 {
   return new SMILEnum(this, aSVGElement);
 }
 
 nsresult
 nsSVGEnum::SMILEnum::ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* /*aSrcElement*/,
                                      nsSMILValue& aValue,
-                                     PRBool& aCanCache) const
+                                     PRBool& aPreventCachingOfSandwich) const
 {
   nsCOMPtr<nsIAtom> valAtom = do_GetAtom(aStr);
   nsSVGEnumMapping *mapping = mVal->GetMapping(mSVGElement);
 
   while (mapping && mapping->mKey) {
     if (valAtom == *(mapping->mKey)) {
       nsSMILValue val(&SMILEnumType::sSingleton);
       val.mU.mUint = mapping->mVal;
       aValue = val;
-      aCanCache = PR_TRUE;
+      aPreventCachingOfSandwich = PR_FALSE;
       return NS_OK;
     }
     mapping++;
   }
   
   // only a warning since authors may mistype attribute values
   NS_WARNING("unknown enumeration key");
   return NS_ERROR_FAILURE;
--- a/content/svg/content/src/nsSVGEnum.h
+++ b/content/svg/content/src/nsSVGEnum.h
@@ -129,17 +129,17 @@ public:
     // die during that.
     nsSVGEnum* mVal;
     nsSVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* aSrcElement,
                                      nsSMILValue& aValue,
-                                     PRBool& aCanCache) const;
+                                     PRBool& aPreventCachingOfSandwich) const;
     virtual nsSMILValue GetBaseValue() const;
     virtual void ClearAnimValue();
     virtual nsresult SetAnimValue(const nsSMILValue& aValue);
   };
 #endif // MOZ_SMIL
 };
 
 #endif //__NS_SVGENUM_H__
--- a/content/svg/content/src/nsSVGInteger.cpp
+++ b/content/svg/content/src/nsSVGInteger.cpp
@@ -135,34 +135,34 @@ nsSVGInteger::ToSMILAttr(nsSVGElement *a
 {
   return new SMILInteger(this, aSVGElement);
 }
 
 nsresult
 nsSVGInteger::SMILInteger::ValueFromString(const nsAString& aStr,
                                            const nsISMILAnimationElement* /*aSrcElement*/,
                                            nsSMILValue& aValue,
-                                           PRBool& aCanCache) const
+                                           PRBool& aPreventCachingOfSandwich) const
 {
   NS_ConvertUTF16toUTF8 value(aStr);
   const char *str = value.get();
 
   if (NS_IsAsciiWhitespace(*str))
     return NS_ERROR_FAILURE;
 
   char *rest;
   PRInt32 val = strtol(str, &rest, 10);
   if (rest == str || *rest != '\0') {
     return NS_ERROR_FAILURE;
   }
 
   nsSMILValue smilVal(&SMILIntegerType::sSingleton);
   smilVal.mU.mInt = val;
   aValue = smilVal;
-  aCanCache = PR_TRUE;
+  aPreventCachingOfSandwich = PR_FALSE;
   return NS_OK;
 }
 
 nsSMILValue
 nsSVGInteger::SMILInteger::GetBaseValue() const
 {
   nsSMILValue val(&SMILIntegerType::sSingleton);
   val.mU.mInt = mVal->mBaseVal;
--- a/content/svg/content/src/nsSVGInteger.h
+++ b/content/svg/content/src/nsSVGInteger.h
@@ -119,17 +119,17 @@ public:
     // die during that.
     nsSVGInteger* mVal;
     nsSVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* aSrcElement,
                                      nsSMILValue& aValue,
-                                     PRBool& aCanCache) const;
+                                     PRBool& aPreventCachingOfSandwich) const;
     virtual nsSMILValue GetBaseValue() const;
     virtual void ClearAnimValue();
     virtual nsresult SetAnimValue(const nsSMILValue& aValue);
   };
 #endif // MOZ_SMIL
 };
 
 #endif //__NS_SVGINTEGER_H__
--- a/content/svg/content/src/nsSVGLength2.cpp
+++ b/content/svg/content/src/nsSVGLength2.cpp
@@ -517,32 +517,33 @@ nsSVGLength2::ToSMILAttr(nsSVGElement *a
 {
   return new SMILLength(this, aSVGElement);
 }
 
 nsresult
 nsSVGLength2::SMILLength::ValueFromString(const nsAString& aStr,
                                  const nsISMILAnimationElement* /*aSrcElement*/,
                                  nsSMILValue& aValue,
-                                 PRBool& aCanCache) const
+                                 PRBool& aPreventCachingOfSandwich) const
 {
   float value;
   PRUint16 unitType;
   
   nsresult rv = GetValueFromString(aStr, &value, &unitType);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   nsSMILValue val(&nsSMILFloatType::sSingleton);
   val.mU.mDouble = value / mVal->GetUnitScaleFactor(mSVGElement, unitType);
   aValue = val;
-  aCanCache = (unitType != nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE &&
-               unitType != nsIDOMSVGLength::SVG_LENGTHTYPE_EMS &&
-               unitType != nsIDOMSVGLength::SVG_LENGTHTYPE_EXS);
+  aPreventCachingOfSandwich =
+              (unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE ||
+               unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_EMS ||
+               unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_EXS);
 
   return NS_OK;
 }
 
 nsSMILValue
 nsSVGLength2::SMILLength::GetBaseValue() const
 {
   nsSMILValue val(&nsSMILFloatType::sSingleton);
--- a/content/svg/content/src/nsSVGLength2.h
+++ b/content/svg/content/src/nsSVGLength2.h
@@ -277,17 +277,17 @@ public:
     // die during that.
     nsSVGLength2* mVal;
     nsSVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* aSrcElement,
                                      nsSMILValue &aValue,
-                                     PRBool& aCanCache) const;
+                                     PRBool& aPreventCachingOfSandwich) const;
     virtual nsSMILValue GetBaseValue() const;
     virtual void ClearAnimValue();
     virtual nsresult SetAnimValue(const nsSMILValue& aValue);
   };
 #endif // MOZ_SMIL
 };
 
 #endif //  __NS_SVGLENGTH2_H__
--- a/content/svg/content/src/nsSVGNumber2.cpp
+++ b/content/svg/content/src/nsSVGNumber2.cpp
@@ -170,29 +170,29 @@ nsSVGNumber2::ToSMILAttr(nsSVGElement *a
 {
   return new SMILNumber(this, aSVGElement);
 }
 
 nsresult
 nsSVGNumber2::SMILNumber::ValueFromString(const nsAString& aStr,
                                           const nsISMILAnimationElement* /*aSrcElement*/,
                                           nsSMILValue& aValue,
-                                          PRBool& aCanCache) const
+                                          PRBool& aPreventCachingOfSandwich) const
 {
   float value;
 
   PRBool ok = nsSVGUtils::NumberFromString(aStr, &value);
   if (!ok) {
     return NS_ERROR_FAILURE;
   }
 
   nsSMILValue val(&nsSMILFloatType::sSingleton);
   val.mU.mDouble = value;
   aValue = val;
-  aCanCache = PR_TRUE;
+  aPreventCachingOfSandwich = PR_FALSE;
 
   return NS_OK;
 }
 
 nsSMILValue
 nsSVGNumber2::SMILNumber::GetBaseValue() const
 {
   nsSMILValue val(&nsSMILFloatType::sSingleton);
--- a/content/svg/content/src/nsSVGNumber2.h
+++ b/content/svg/content/src/nsSVGNumber2.h
@@ -129,17 +129,17 @@ public:
     // die during that.
     nsSVGNumber2* mVal;
     nsSVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* aSrcElement,
                                      nsSMILValue& aValue,
-                                     PRBool& aCanCache) const;
+                                     PRBool& aPreventCachingOfSandwich) const;
     virtual nsSMILValue GetBaseValue() const;
     virtual void ClearAnimValue();
     virtual nsresult SetAnimValue(const nsSMILValue& aValue);
   };
 #endif // MOZ_SMIL
 };
 
 #endif //__NS_SVGNUMBER2_H__
--- a/content/svg/content/src/nsSVGPreserveAspectRatio.cpp
+++ b/content/svg/content/src/nsSVGPreserveAspectRatio.cpp
@@ -345,26 +345,26 @@ PackPreserveAspectRatio(const nsSVGPrese
   return packed;
 }
 
 nsresult
 nsSVGPreserveAspectRatio::SMILPreserveAspectRatio
                         ::ValueFromString(const nsAString& aStr,
                                           const nsISMILAnimationElement* /*aSrcElement*/,
                                           nsSMILValue& aValue,
-                                          PRBool& aCanCache) const
+                                          PRBool& aPreventCachingOfSandwich) const
 {
   PreserveAspectRatio par;
   nsresult res = ToPreserveAspectRatio(aStr, &par);
   NS_ENSURE_SUCCESS(res, res);
 
   nsSMILValue val(&SMILEnumType::sSingleton);
   val.mU.mUint = PackPreserveAspectRatio(par);
   aValue = val;
-  aCanCache = PR_TRUE;
+  aPreventCachingOfSandwich = PR_FALSE;
   return NS_OK;
 }
 
 nsSMILValue
 nsSVGPreserveAspectRatio::SMILPreserveAspectRatio::GetBaseValue() const
 {
   nsSMILValue val(&SMILEnumType::sSingleton);
   val.mU.mUint = PackPreserveAspectRatio(mVal->GetBaseValue());
--- a/content/svg/content/src/nsSVGPreserveAspectRatio.h
+++ b/content/svg/content/src/nsSVGPreserveAspectRatio.h
@@ -220,17 +220,17 @@ public:
     // die during that.
     nsSVGPreserveAspectRatio* mVal;
     nsSVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* aSrcElement,
                                      nsSMILValue& aValue,
-                                     PRBool& aCanCache) const;
+                                     PRBool& aPreventCachingOfSandwich) const;
     virtual nsSMILValue GetBaseValue() const;
     virtual void ClearAnimValue();
     virtual nsresult SetAnimValue(const nsSMILValue& aValue);
   };
 #endif // MOZ_SMIL
 };
 
 #endif //__NS_SVGPRESERVEASPECTRATIO_H__
--- a/content/svg/content/src/nsSVGTransformSMILAttr.cpp
+++ b/content/svg/content/src/nsSVGTransformSMILAttr.cpp
@@ -50,29 +50,29 @@
 #include "nsISVGValue.h"
 #include "prdtoa.h"
 #include "prlog.h"
 
 nsresult
 nsSVGTransformSMILAttr::ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* aSrcElement,
                                      nsSMILValue& aValue,
-                                     PRBool& aCanCache) const
+                                     PRBool& aPreventCachingOfSandwich) const
 {
   NS_ENSURE_TRUE(aSrcElement, NS_ERROR_FAILURE);
   NS_ASSERTION(aValue.IsNull(),
     "aValue should have been cleared before calling ValueFromString");
 
   const nsAttrValue* typeAttr = aSrcElement->GetAnimAttr(nsGkAtoms::type);
   const nsIAtom* transformType = typeAttr
                                ? typeAttr->GetAtomValue()
                                : nsGkAtoms::translate;
 
   ParseValue(aStr, transformType, aValue);
-  aCanCache = PR_TRUE;
+  aPreventCachingOfSandwich = PR_FALSE;
   return aValue.IsNull() ? NS_ERROR_FAILURE : NS_OK;
 }
 
 nsSMILValue
 nsSVGTransformSMILAttr::GetBaseValue() const
 {
   // To benefit from Return Value Optimization and avoid copy constructor calls
   // due to our use of return-by-value, we must return the exact same object
--- a/content/svg/content/src/nsSVGTransformSMILAttr.h
+++ b/content/svg/content/src/nsSVGTransformSMILAttr.h
@@ -55,17 +55,17 @@ public:
   nsSVGTransformSMILAttr(nsSVGAnimatedTransformList* aTransform,
                          nsSVGElement* aSVGElement)
     : mVal(aTransform), mSVGElement(aSVGElement) {}
 
   // nsISMILAttr methods
   virtual nsresult ValueFromString(const nsAString& aStr,
                                    const nsISMILAnimationElement* aSrcElement,
                                    nsSMILValue& aValue,
-                                   PRBool& aCanCache) const;
+                                   PRBool& aPreventCachingOfSandwich) const;
   virtual nsSMILValue  GetBaseValue() const;
   virtual void         ClearAnimValue();
   virtual nsresult     SetAnimValue(const nsSMILValue& aValue);
 
 protected:
   static void ParseValue(const nsAString& aSpec,
                          const nsIAtom* aTransformType,
                          nsSMILValue& aResult);
--- a/content/svg/content/src/nsSVGViewBox.cpp
+++ b/content/svg/content/src/nsSVGViewBox.cpp
@@ -277,27 +277,27 @@ nsSVGViewBox::ToSMILAttr(nsSVGElement *a
   return new SMILViewBox(this, aSVGElement);
 }
 
 nsresult
 nsSVGViewBox::SMILViewBox
             ::ValueFromString(const nsAString& aStr,
                               const nsISMILAnimationElement* /*aSrcElement*/,
                               nsSMILValue& aValue,
-                              PRBool& aCanCache) const
+                              PRBool& aPreventCachingOfSandwich) const
 {
   nsSVGViewBoxRect viewBox;
   nsresult res = ToSVGViewBoxRect(aStr, &viewBox);
   if (NS_FAILED(res)) {
     return res;
   }
   nsSMILValue val(&SVGViewBoxSMILType::sSingleton);
   *static_cast<nsSVGViewBoxRect*>(val.mU.mPtr) = viewBox;
   aValue.Swap(val);
-  aCanCache = PR_TRUE;
+  aPreventCachingOfSandwich = PR_FALSE;
   
   return NS_OK;
 }
 
 nsSMILValue
 nsSVGViewBox::SMILViewBox::GetBaseValue() const
 {
   nsSMILValue val(&SVGViewBoxSMILType::sSingleton);
--- a/content/svg/content/src/nsSVGViewBox.h
+++ b/content/svg/content/src/nsSVGViewBox.h
@@ -206,17 +206,17 @@ public:
     // die during that.
     nsSVGViewBox* mVal;
     nsSVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(const nsAString& aStr,
                                      const nsISMILAnimationElement* aSrcElement,
                                      nsSMILValue& aValue,
-                                     PRBool& aCanCache) const;
+                                     PRBool& aPreventCachingOfSandwich) const;
     virtual nsSMILValue GetBaseValue() const;
     virtual void ClearAnimValue();
     virtual nsresult SetAnimValue(const nsSMILValue& aValue);
   };
 #endif // MOZ_SMIL
 };
 
 #endif // __NS_SVGVIEWBOX_H__