fix bitrot
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 28 Jan 2010 02:28:29 -0800
changeset 1073 acc29eb11c65e5ecb656dd832b15ba5295335b27
parent 1072 b00890d0c9e354b3c7964b1f758fada7eb5e3d2c
child 1074 50bc0a4c6fe9c61f8924d04fb9ba895308c1922e
push id881
push userdholbert@mozilla.com
push dateThu, 28 Jan 2010 10:28:35 +0000
fix bitrot
birtles_bsRefactorIntervals
smil_addEqualityMethodSpecializations
--- a/birtles_bsRefactorIntervals
+++ b/birtles_bsRefactorIntervals
@@ -1494,17 +1494,17 @@ diff --git a/content/smil/nsSMILTimedEle
    nsSMILTimeValue beginAfter;
    PRBool prevIntervalWasZeroDur = PR_FALSE;
 -  if (aPrevInterval && aPrevInterval->IsSet()) {
 +  if (aPrevInterval) {
      beginAfter = aPrevInterval->End()->Time();
      prevIntervalWasZeroDur
        = aPrevInterval->End()->Time() == aPrevInterval->Begin()->Time();
      if (aFixedBeginTime) {
-       prevIntervalWasZeroDur &= 
+       prevIntervalWasZeroDur &=
          aPrevInterval->Begin()->Time() == aFixedBeginTime->Time();
      }
    } else {
 @@ -1035,17 +1099,17 @@ nsSMILTimedElement::GetNextInterval(cons
    while (PR_TRUE) {
      // Calculate begin time
      if (aFixedBeginTime) {
        if (aFixedBeginTime->Time() < beginAfter)
--- a/smil_addEqualityMethodSpecializations
+++ b/smil_addEqualityMethodSpecializations
@@ -2,18 +2,18 @@ From: Daniel Holbert <dholbert@cs.stanfo
 Bug 542670 Patch B: Add specialized implementations for nsISMILType::IsEqual. r=roc
 
 diff --git a/content/smil/SMILBoolType.cpp b/content/smil/SMILBoolType.cpp
 --- a/content/smil/SMILBoolType.cpp
 +++ b/content/smil/SMILBoolType.cpp
 @@ -65,16 +65,26 @@ nsresult
  SMILBoolType::Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const
  {
-   NS_PRECONDITION(aDest.mType == aSrc.mType, "Incompatible SMIL types.");
-   NS_PRECONDITION(aDest.mType == this, "Unexpected SMIL value.");
+   NS_PRECONDITION(aDest.mType == aSrc.mType, "Incompatible SMIL types");
+   NS_PRECONDITION(aDest.mType == this, "Unexpected SMIL value");
    aDest.mU.mBool = aSrc.mU.mBool;
    return NS_OK;
  }
  
 +PRBool
 +SMILBoolType::IsEqual(const nsSMILValue& aLeft,
 +                      const nsSMILValue& aRight) const
 +{
@@ -54,18 +54,18 @@ diff --git a/content/smil/SMILBoolType.h
                                 nsSMILValue& aResult) const;
  
 diff --git a/content/smil/SMILEnumType.cpp b/content/smil/SMILEnumType.cpp
 --- a/content/smil/SMILEnumType.cpp
 +++ b/content/smil/SMILEnumType.cpp
 @@ -65,16 +65,26 @@ nsresult
  SMILEnumType::Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const
  {
-   NS_PRECONDITION(aDest.mType == aSrc.mType, "Incompatible SMIL types.");
-   NS_PRECONDITION(aDest.mType == this, "Unexpected SMIL value.");
+   NS_PRECONDITION(aDest.mType == aSrc.mType, "Incompatible SMIL types");
+   NS_PRECONDITION(aDest.mType == this, "Unexpected SMIL value");
    aDest.mU.mUint = aSrc.mU.mUint;
    return NS_OK;
  }
  
 +PRBool
 +SMILEnumType::IsEqual(const nsSMILValue& aLeft,
 +                      const nsSMILValue& aRight) const
 +{
@@ -200,18 +200,18 @@ diff --git a/content/smil/nsSMILCSSValue
    NS_OVERRIDE virtual nsresult Interpolate(const nsSMILValue& aStartVal,
                                             const nsSMILValue& aEndVal,
 diff --git a/content/smil/nsSMILFloatType.cpp b/content/smil/nsSMILFloatType.cpp
 --- a/content/smil/nsSMILFloatType.cpp
 +++ b/content/smil/nsSMILFloatType.cpp
 @@ -65,16 +65,26 @@ nsresult
  nsSMILFloatType::Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const
  {
-   NS_PRECONDITION(aDest.mType == aSrc.mType, "Incompatible SMIL types.");
-   NS_PRECONDITION(aDest.mType == this, "Unexpected SMIL value.");
+   NS_PRECONDITION(aDest.mType == aSrc.mType, "Incompatible SMIL types");
+   NS_PRECONDITION(aDest.mType == this, "Unexpected SMIL value");
    aDest.mU.mDouble = aSrc.mU.mDouble;
    return NS_OK;
  }
  
 +PRBool
 +nsSMILFloatType::IsEqual(const nsSMILValue& aLeft,
 +                         const nsSMILValue& aRight) const
 +{
@@ -251,17 +251,17 @@ diff --git a/content/smil/nsSMILFloatTyp
    virtual nsresult Interpolate(const nsSMILValue& aStartVal,
                                 const nsSMILValue& aEndVal,
                                 double aUnitDistance,
 diff --git a/content/smil/nsSMILNullType.cpp b/content/smil/nsSMILNullType.cpp
 --- a/content/smil/nsSMILNullType.cpp
 +++ b/content/smil/nsSMILNullType.cpp
 @@ -47,16 +47,26 @@ nsSMILNullType::Assign(nsSMILValue& aDes
  {
-   NS_PRECONDITION(aDest.mType == aSrc.mType, "Incompatible SMIL types.");
+   NS_PRECONDITION(aDest.mType == aSrc.mType, "Incompatible SMIL types");
    NS_PRECONDITION(aSrc.mType == this, "Unexpected source type");
    aDest.mU    = aSrc.mU;
    aDest.mType = &sSingleton;
    return NS_OK;
  }
  
 +PRBool
 +nsSMILNullType::IsEqual(const nsSMILValue& aLeft,
@@ -272,17 +272,17 @@ diff --git a/content/smil/nsSMILNullType
 +
 +  return PR_TRUE;  // All null-typed values are equivalent.
 +}
 +
  nsresult
  nsSMILNullType::Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
                      PRUint32 aCount) const
  {
-   NS_NOTREACHED("Adding NULL type.");
+   NS_NOTREACHED("Adding NULL type");
    return NS_ERROR_FAILURE;
  }
  
 diff --git a/content/smil/nsSMILNullType.h b/content/smil/nsSMILNullType.h
 --- a/content/smil/nsSMILNullType.h
 +++ b/content/smil/nsSMILNullType.h
 @@ -45,16 +45,18 @@ class nsSMILNullType : public nsISMILTyp
  {
@@ -408,17 +408,17 @@ diff --git a/content/svg/content/src/nsS
  nsresult
  nsSVGTransformSMILAttr::ParseValue(const nsAString& aSpec,
                                     const nsIAtom* aTransformType,
                                     nsSMILValue& aResult) const
  {
    nsSVGTransformSMILType* type = &nsSVGTransformSMILType::sSingleton;
    NS_ASSERTION(
        type == static_cast<nsSVGTransformSMILType const *>(aResult.mType),
--      "Unexpected type for SMIL value result.");
+-      "Unexpected type for SMIL value result");
 +      "Unexpected type for SMIL value");
  
    // Reset the result so we can just append to it
    nsresult rv = type->Init(aResult);
    NS_ENSURE_SUCCESS(rv,rv);
  
 +  // nsSVGSMILTransform constructor should be expecting array with 3 params
 +  PR_STATIC_ASSERT(nsSVGSMILTransform::NUM_SIMPLE_PARAMS == 3);
@@ -457,17 +457,17 @@ diff --git a/content/svg/content/src/nsS
    float params[3] = { 0.f };
    nsSVGSMILTransform::TransformType transformType;
  
    switch (svgTransformType)
    {
      case nsIDOMSVGTransform::SVG_TRANSFORM_TRANSLATE:
        {
          matrix->GetE(&params[0]);
-@@ -316,43 +325,43 @@ nsSVGTransformSMILAttr::AppendSVGTransfo
+@@ -316,43 +325,44 @@ nsSVGTransformSMILAttr::AppendSVGTransfo
        {
          aTransform->GetAngle(&params[0]);
          transformType = nsSVGSMILTransform::TRANSFORM_SKEWY;
        }
        break;
  
      case nsIDOMSVGTransform::SVG_TRANSFORM_MATRIX:
        {
@@ -481,35 +481,35 @@ diff --git a/content/svg/content/src/nsS
          matrix->GetD(&mx[3]);
          matrix->GetE(&mx[4]);
          matrix->GetF(&mx[5]);
 -        rv = type->AppendTransform(nsSVGSMILTransform(mx), aValue);
 -        transformType = nsSVGSMILTransform::TRANSFORM_MATRIX;
 +
 +        return type->AppendTransform(nsSVGSMILTransform(mx), aValue);
        }
--      break;
+       break;
  
      case nsIDOMSVGTransform::SVG_TRANSFORM_UNKNOWN:
        // If it's 'unknown', it's probably not initialised, so just skip it.
        return NS_OK;
  
      default:
-       NS_WARNING("Trying to convert unrecognised SVG transform type.");
+       NS_WARNING("Trying to convert unrecognised SVG transform type");
        return NS_ERROR_FAILURE;
    }
  
 -  if (transformType != nsSVGSMILTransform::TRANSFORM_MATRIX) {
 -    rv =
 -      type->AppendTransform(nsSVGSMILTransform(transformType, params), aValue);
 -  }
 -
 -  return rv;
 +  NS_ABORT_IF_FALSE(transformType != nsSVGSMILTransform::TRANSFORM_MATRIX,
-+                    "Shouldn't get here with a TRANSFORM_MATRIX.");
++                    "Shouldn't get here with a TRANSFORM_MATRIX");
 +  return
 +    type->AppendTransform(nsSVGSMILTransform(transformType, params), aValue);
  }
  
  nsresult
  nsSVGTransformSMILAttr::UpdateFromSMILValue(
    nsIDOMSVGTransformList* aTransformList, const nsSMILValue& aValue)
  {
@@ -555,18 +555,18 @@ diff --git a/content/svg/content/src/nsS
 +  // Found no differences.
 +  return PR_TRUE;
 +}
 +
  nsresult
  nsSVGTransformSMILType::Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
                              PRUint32 aCount) const
  {
-   NS_PRECONDITION(aDest.mType == this, "Unexpected SMIL type.");
-   NS_PRECONDITION(aDest.mType == aValueToAdd.mType, "Incompatible SMIL types.");
+   NS_PRECONDITION(aDest.mType == this, "Unexpected SMIL type");
+   NS_PRECONDITION(aDest.mType == aValueToAdd.mType, "Incompatible SMIL types");
  
    TransformArray& dstTransforms(*static_cast<TransformArray*>(aDest.mU.mPtr));
 diff --git a/content/svg/content/src/nsSVGTransformSMILType.h b/content/svg/content/src/nsSVGTransformSMILType.h
 --- a/content/svg/content/src/nsSVGTransformSMILType.h
 +++ b/content/svg/content/src/nsSVGTransformSMILType.h
 @@ -105,16 +105,18 @@ class nsSMILValue;
  //
  class nsSVGTransformSMILType : public nsISMILType