cleanup: remove trailing whitespace in SMIL code. (whitespace changes only)
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 15 Jul 2009 11:33:31 -0700
changeset 30341 6ae1d076f5ab00191336cea9868fe7e3e6eafe2a
parent 30340 585d2a1d511c866fbf4cb8aa7a50b5493a83eba3
child 30342 d190d9b6ccd1d3d31a83d5bef4dc7667eff43227
push id8040
push userdholbert@mozilla.com
push dateWed, 15 Jul 2009 18:34:13 +0000
treeherdermozilla-central@6ae1d076f5ab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.2a1pre
cleanup: remove trailing whitespace in SMIL code. (whitespace changes only)
content/smil/Makefile.in
content/smil/nsSMILAnimationController.cpp
content/smil/nsSMILAnimationController.h
content/smil/nsSMILAnimationFunction.cpp
content/smil/nsSMILAnimationFunction.h
content/smil/nsSMILCompositor.cpp
content/smil/nsSMILCompositor.h
content/smil/nsSMILFloatType.cpp
content/smil/nsSMILInterval.h
content/smil/nsSMILKeySpline.cpp
content/smil/nsSMILKeySpline.h
content/smil/nsSMILParserUtils.cpp
content/smil/nsSMILParserUtils.h
content/smil/nsSMILTimeContainer.h
content/smil/nsSMILTimeValueSpec.cpp
content/smil/nsSMILTimedElement.cpp
content/smil/nsSMILTimedElement.h
content/svg/content/src/nsSVGAnimationElement.cpp
content/svg/content/src/nsSVGAnimationElement.h
content/svg/content/src/nsSVGSMILTransform.h
content/svg/content/src/nsSVGTransformSMILAttr.cpp
content/svg/content/src/nsSVGTransformSMILType.cpp
--- a/content/smil/Makefile.in
+++ b/content/smil/Makefile.in
@@ -1,9 +1,9 @@
-# 
+#
 # ***** BEGIN LICENSE BLOCK *****
 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
 #
 # The contents of this file are subject to the Mozilla Public License Version
 # 1.1 (the "License"); you may not use this file except in compliance with
 # the License. You may obtain a copy of the License at
 # http://www.mozilla.org/MPL/
 #
--- a/content/smil/nsSMILAnimationController.cpp
+++ b/content/smil/nsSMILAnimationController.cpp
@@ -80,17 +80,17 @@ nsSMILAnimationController::~nsSMILAnimat
 
   NS_ASSERTION(mAnimationElementTable.Count() == 0,
                "Animation controller shouldn't be tracking any animation"
                " elements when it dies.");
 }
 
 nsSMILAnimationController* NS_NewSMILAnimationController(nsIDocument* aDoc)
 {
-  nsSMILAnimationController* animationController = 
+  nsSMILAnimationController* animationController =
     new nsSMILAnimationController();
   NS_ENSURE_TRUE(animationController, nsnull);
 
   nsresult rv = animationController->Init(aDoc);
   if (NS_FAILED(rv)) {
     delete animationController;
     animationController = nsnull;
   }
@@ -236,17 +236,17 @@ nsresult
 nsSMILAnimationController::StartTimer()
 {
   NS_ENSURE_TRUE(mTimer, NS_ERROR_FAILURE);
   NS_ASSERTION(mPauseState == 0, "Starting timer but controller is paused.");
 
   // Run the first sample manually
   Sample();
 
-  // 
+  //
   // XXX Make this self-tuning. Sounds like control theory to me and not
   // something I'm familiar with.
   //
   return mTimer->InitWithFuncCallback(nsSMILAnimationController::Notify,
                                       this,
                                       kTimerInterval,
                                       nsITimer::TYPE_REPEATING_SLACK);
 }
@@ -262,17 +262,17 @@ nsSMILAnimationController::StopTimer()
 //----------------------------------------------------------------------
 // Sample-related methods and callbacks
 
 PR_CALLBACK PLDHashOperator
 RemoveCompositorFromTable(nsSMILCompositor* aCompositor,
                           void* aData)
 {
   nsSMILCompositorTable* lastCompositorTable =
-    static_cast<nsSMILCompositorTable*>(aData); 
+    static_cast<nsSMILCompositorTable*>(aData);
   lastCompositorTable->RemoveEntry(aCompositor->GetKey());
   return PL_DHASH_NEXT;
 }
 
 PR_CALLBACK PLDHashOperator
 DoClearAnimationEffects(nsSMILCompositor* aCompositor,
                         void* /*aData*/)
 {
@@ -307,17 +307,17 @@ nsSMILAnimationController::DoSample(PRBo
   TimeContainerHashtable activeContainers;
   activeContainers.Init(mChildContainerTable.Count());
   SampleTimeContainerParams tcParams = { &activeContainers,
                                          aSkipUnchangedContainers };
   mChildContainerTable.EnumerateEntries(SampleTimeContainer, &tcParams);
 
   // STEP 2: (i)  Sample the timed elements AND
   //         (ii) Create a table of compositors
-  // 
+  //
   // (i) Here we sample the timed elements (fetched from the
   // nsISMILAnimationElements) which determine from the active time if the
   // element is active and what its simple time etc. is. This information is
   // then passed to its time client (nsSMILAnimationFunction).
   //
   // (ii) During the same loop we also build up a table that contains one
   // compositor for each animated attribute and which maps animated elements to
   // the corresponding compositor for their target attribute.
@@ -326,17 +326,17 @@ nsSMILAnimationController::DoSample(PRBo
   // store it until the next sample. This lets us find out which elements were
   // animated in sample 'n-1' but not in sample 'n' (and hence need to have
   // their animation effects removed in sample 'n').
   //
   // Parts (i) and (ii) are not functionally related but we combine them here to
   // save iterating over the animation elements twice.
 
   // Create the compositor table
-  nsAutoPtr<nsSMILCompositorTable> 
+  nsAutoPtr<nsSMILCompositorTable>
     currentCompositorTable(new nsSMILCompositorTable());
   if (!currentCompositorTable)
     return;
   currentCompositorTable->Init(0);
 
   SampleAnimationParams saParams = { &activeContainers,
                                      currentCompositorTable };
   nsresult rv = mAnimationElementTable.EnumerateEntries(SampleAnimation,
@@ -366,22 +366,22 @@ nsSMILAnimationController::DoSample(PRBo
   mLastCompositorTable = currentCompositorTable.forget();
 
   NS_ASSERTION(!mResampleNeeded, "Resample dirty flag set during sample!");
 }
 
 /*static*/ PR_CALLBACK PLDHashOperator
 nsSMILAnimationController::SampleTimeContainer(TimeContainerPtrKey* aKey,
                                                void* aData)
-{ 
+{
   NS_ENSURE_TRUE(aKey, PL_DHASH_NEXT);
   NS_ENSURE_TRUE(aKey->GetKey(), PL_DHASH_NEXT);
   NS_ENSURE_TRUE(aData, PL_DHASH_NEXT);
 
-  SampleTimeContainerParams* params = 
+  SampleTimeContainerParams* params =
     static_cast<SampleTimeContainerParams*>(aData);
 
   nsSMILTimeContainer* container = aKey->GetKey();
   if (container->NeedsSample() || !params->mSkipUnchangedContainers) {
     container->Sample();
     params->mActiveContainers->PutEntry(container);
   }
 
@@ -436,17 +436,17 @@ nsSMILAnimationController::AddAnimationT
 {
   // Add a compositor to the hash table if there's not already one there
   nsSMILCompositorKey key;
   if (!GetCompositorKeyForAnimation(aElement, key))
     // Something's wrong/missing about animation's target; skip this animation
     return;
 
   nsSMILCompositor* result = aCompositorTable->PutEntry(key);
-  
+
   // Add this animationElement's animation function to the compositor's list of
   // animation functions.
   result->AddAnimationFunction(&aElement->AnimationFunction());
 }
 
 // Helper function that, given a nsISMILAnimationElement, looks up its target
 // element & target attribute and returns a newly-constructed nsSMILCompositor
 // for this target.
@@ -501,17 +501,17 @@ nsresult
 nsSMILAnimationController::AddChild(nsSMILTimeContainer& aChild)
 {
   TimeContainerPtrKey* key = mChildContainerTable.PutEntry(&aChild);
   NS_ENSURE_TRUE(key,NS_ERROR_OUT_OF_MEMORY);
 
   if (!mPauseState && mChildContainerTable.Count() == 1) {
     StartTimer();
   }
-    
+
   return NS_OK;
 }
 
 void
 nsSMILAnimationController::RemoveChild(nsSMILTimeContainer& aChild)
 {
   mChildContainerTable.RemoveEntry(&aChild);
 
--- a/content/smil/nsSMILAnimationController.h
+++ b/content/smil/nsSMILAnimationController.h
@@ -48,17 +48,17 @@
 #include "nsSMILTimeContainer.h"
 #include "nsSMILCompositorTable.h"
 
 class nsISMILAnimationElement;
 class nsIDocument;
 
 //----------------------------------------------------------------------
 // nsSMILAnimationController
-// 
+//
 // The animation controller maintains the animation timer and determines the
 // sample times and sample rate for all SMIL animations in a document. There is
 // at most one animation controller per nsDocument so that frame-rate tuning can
 // be performed at a document-level.
 //
 // The animation controller can contain many child time containers (timed
 // document root objects) which may correspond to SVG document fragments within
 // a compound document. These time containers can be paused individually or
@@ -69,17 +69,17 @@ class nsSMILAnimationController : public
 public:
   nsSMILAnimationController();
   ~nsSMILAnimationController();
 
   // nsSMILContainer
   virtual void Pause(PRUint32 aType);
   virtual void Resume(PRUint32 aType);
   virtual nsSMILTime GetParentTime() const;
-  
+
   // Methods for registering and enumerating animation elements
   void RegisterAnimationElement(nsISMILAnimationElement* aAnimationElement);
   void UnregisterAnimationElement(nsISMILAnimationElement* aAnimationElement);
 
   // Methods for resampling all animations
   // (A resample performs the same operations as a sample but doesn't advance
   // the current time and doesn't check if the container is paused)
   void Resample();
@@ -113,17 +113,17 @@ protected:
     PRBool                  mSkipUnchangedContainers;
   };
 
   struct SampleAnimationParams
   {
     TimeContainerHashtable* mActiveContainers;
     nsSMILCompositorTable*  mCompositorTable;
   };
-  
+
   // Factory methods
   friend nsSMILAnimationController*
   NS_NewSMILAnimationController(nsIDocument* aDoc);
   nsresult    Init(nsIDocument* aDoc);
 
   // Cycle-collection implementation helpers
   PR_STATIC_CALLBACK(PLDHashOperator) CompositorTableEntryTraverse(
       nsSMILCompositor* aCompositor, void* aArg);
@@ -154,23 +154,23 @@ protected:
   virtual void     RemoveChild(nsSMILTimeContainer& aChild);
 
   // Members
   static const PRUint32      kTimerInterval;
   nsCOMPtr<nsITimer>         mTimer;
   AnimationElementHashtable  mAnimationElementTable;
   TimeContainerHashtable     mChildContainerTable;
   PRPackedBool               mResampleNeeded;
-  
+
   // Store raw ptr to mDocument.  It owns the controller, so controller
   // shouldn't outlive it
   nsIDocument* mDocument;
 
   // Contains compositors used in our last sample.  We keep this around
   // so we can detect when an element/attribute used to be animated,
-  // but isn't anymore for some reason. (e.g. if its <animate> element is 
+  // but isn't anymore for some reason. (e.g. if its <animate> element is
   // removed or retargeted)
   nsAutoPtr<nsSMILCompositorTable> mLastCompositorTable;
 };
 
 nsSMILAnimationController* NS_NewSMILAnimationController(nsIDocument *doc);
 
 #endif // NS_SMILANIMATIONCONTROLLER_H_
--- a/content/smil/nsSMILAnimationFunction.cpp
+++ b/content/smil/nsSMILAnimationFunction.cpp
@@ -183,18 +183,18 @@ nsSMILAnimationFunction::UnsetAttr(nsIAt
   return foundMatch;
 }
 
 void
 nsSMILAnimationFunction::SampleAt(nsSMILTime aSampleTime,
                                   const nsSMILTimeValue& aSimpleDuration,
                                   PRUint32 aRepeatIteration)
 {
-  if (mHasChanged || mLastValue || mSampleTime != aSampleTime || 
-      mSimpleDuration.CompareTo(aSimpleDuration) || 
+  if (mHasChanged || mLastValue || mSampleTime != aSampleTime ||
+      mSimpleDuration.CompareTo(aSimpleDuration) ||
       mRepeatIteration != aRepeatIteration) {
     mHasChanged = PR_TRUE;
   }
 
   mSampleTime       = aSampleTime;
   mSimpleDuration   = aSimpleDuration;
   mRepeatIteration  = aRepeatIteration;
   mLastValue        = PR_FALSE;
@@ -245,22 +245,22 @@ nsSMILAnimationFunction::ComposeResult(c
   if (NS_FAILED(rv))
     return;
 
   // If this interval is active, we must have a non-negative
   // mSampleTime and a resolved or indefinite mSimpleDuration.
   // (Otherwise, we're probably just frozen.)
   if (mIsActive) {
     NS_ENSURE_TRUE(mSampleTime >= 0,);
-    NS_ENSURE_TRUE(mSimpleDuration.IsResolved() || 
+    NS_ENSURE_TRUE(mSimpleDuration.IsResolved() ||
                    mSimpleDuration.IsIndefinite(),);
   }
 
   nsSMILValue result(aResult.mType);
-  
+
   if (mSimpleDuration.IsIndefinite() ||
       (HasAttr(nsGkAtoms::values) && values.Length() == 1)) {
 
     // Indefinite duration or only one value set: Always set the first value
     result = values[0];
 
   } else if (mLastValue) {
 
@@ -334,17 +334,17 @@ PRBool
 nsSMILAnimationFunction::WillReplace() const
 {
   /*
    * In IsAdditive() we don't consider to-animation to be additive as it is
    * a special case that is dealt with differently in the compositing method but
    * here we return false for to animation as it builds on the underlying value
    * unless its a frozen to animation.
    */
-  return !(IsAdditive() || IsToAnimation()) || 
+  return !(IsAdditive() || IsToAnimation()) ||
     (IsToAnimation() && mIsFrozen && !mHasChanged);
 }
 
 PRBool
 nsSMILAnimationFunction::HasChanged() const
 {
   return mHasChanged;
 }
@@ -366,17 +366,17 @@ nsSMILAnimationFunction::InterpolateResu
   NS_ASSERTION(mSampleTime >= 0.0f, "Sample time should not be negative...");
   NS_ASSERTION(dur  >= 0.0f, "Simple duration should not be negative...");
 
   if (mSampleTime >= dur || mSampleTime < 0) {
     NS_ERROR("Animation sampled outside interval.");
     return NS_ERROR_FAILURE;
   }
 
-  if ((!IsToAnimation() && aValues.Length() < 2) || 
+  if ((!IsToAnimation() && aValues.Length() < 2) ||
       (IsToAnimation()  && aValues.Length() != 1)) {
     NS_ERROR("Unexpected number of values.");
     return NS_ERROR_FAILURE;
   }
   // End Sanity Checks
 
   double fTime = double(mSampleTime);
   double fDur = double(dur);
@@ -406,29 +406,29 @@ nsSMILAnimationFunction::InterpolateResu
   ScaleSimpleProgress(simpleProgress);
 
   // Handle CALC_DISCRETE separately, because it's simple.
   if (GetCalcMode() == CALC_DISCRETE) {
     PRUint32 index = IsToAnimation() ? 0 :
       (PRUint32) floor(simpleProgress * (aValues.Length()));
     aResult = aValues[index];
     return NS_OK;
-  } 
+  }
 
   // Get the normalised progress between adjacent values
   double intervalProgress;
   if (IsToAnimation()) {
     // Note: Don't need to do any special-casing for CALC_PACED here,
     // because To-Animation doesn't use a values list, by definition.
     from = &aBaseValue;
     to = &aValues[0];
     intervalProgress = simpleProgress;
     ScaleIntervalProgress(intervalProgress, 0, 1);
   } else {
-    if (GetCalcMode() == CALC_PACED) { 
+    if (GetCalcMode() == CALC_PACED) {
       rv = ComputePacedPosition(aValues, simpleProgress, intervalProgress,
                                 from, to);
       NS_ENSURE_SUCCESS(rv,rv);
     } else { // GetCalcMode() == CALC_LINEAR or GetCalcMode() == CALC_SPLINE
       PRUint32 index = (PRUint32)floor(simpleProgress * (aValues.Length() - 1));
       from = &aValues[index];
       to = &aValues[index + 1];
       intervalProgress = simpleProgress * (aValues.Length() - 1) - index;
@@ -583,17 +583,17 @@ nsSMILAnimationFunction::ScaleSimpleProg
   double& intervalEnd   = mKeyTimes[i+1];
 
   double intervalLength = intervalEnd - intervalStart;
   if (intervalLength <= 0.0) {
     aProgress = intervalStart;
     return;
   }
 
-  aProgress = (i + (aProgress - intervalStart) / intervalLength) * 
+  aProgress = (i + (aProgress - intervalStart) / intervalLength) *
          1.0 / double(numTimes - 1);
 }
 
 /*
  * Scale the interval progress, taking into account any keySplines
  * or discrete methods.
  */
 void
@@ -602,17 +602,17 @@ nsSMILAnimationFunction::ScaleIntervalPr
                                                PRUint32   aNumIntervals)
 {
   if (GetCalcMode() != CALC_SPLINE)
     return;
 
   if (!HasAttr(nsGkAtoms::keySplines))
     return;
 
-  NS_ASSERTION(aIntervalIndex >= 0 && 
+  NS_ASSERTION(aIntervalIndex >= 0 &&
                aIntervalIndex < (PRUint32)mKeySplines.Length(),
                "Invalid interval index.");
   NS_ASSERTION(aNumIntervals >= 1, "Invalid number of intervals.");
 
   if (aIntervalIndex < 0 ||
       aIntervalIndex >= (PRUint32)mKeySplines.Length() ||
       aNumIntervals < 1)
     return;
@@ -651,17 +651,17 @@ nsSMILAnimationFunction::GetAttr(nsIAtom
  */
 PRBool
 nsSMILAnimationFunction::ParseAttr(nsIAtom* aAttName,
                                    const nsISMILAttr& aSMILAttr,
                                    nsSMILValue& aResult) const
 {
   nsAutoString attValue;
   if (GetAttr(aAttName, attValue)) {
-    nsresult rv = 
+    nsresult rv =
       aSMILAttr.ValueFromString(attValue, mAnimationElement, aResult);
     if (NS_FAILED(rv))
       return PR_FALSE;
   }
   return PR_TRUE;
 }
 
 /*
@@ -735,24 +735,24 @@ nsSMILAnimationFunction::GetValues(const
     }
   }
 
   // Check that we have the right number of keySplines and keyTimes
   CheckKeyTimes(result.Length());
   CheckKeySplines(result.Length());
 
   result.SwapElements(aResult);
-  
+
   return NS_OK;
 }
 
 inline PRBool
 nsSMILAnimationFunction::IsToAnimation() const
 {
-  return !HasAttr(nsGkAtoms::values) && 
+  return !HasAttr(nsGkAtoms::values) &&
          HasAttr(nsGkAtoms::to) &&
          !HasAttr(nsGkAtoms::from);
 }
 
 inline PRBool
 nsSMILAnimationFunction::IsAdditive() const
 {
   /*
@@ -889,17 +889,17 @@ nsSMILAnimationFunction::GetCalcMode() c
 //----------------------------------------------------------------------
 // Property setters / un-setters:
 
 nsresult
 nsSMILAnimationFunction::SetAccumulate(const nsAString& aAccumulate,
                                        nsAttrValue& aResult)
 {
   mHasChanged = PR_TRUE;
-  PRBool parseResult = 
+  PRBool parseResult =
     aResult.ParseEnumValue(aAccumulate, sAccumulateTable, PR_TRUE);
   SET_FLAG(mErrorFlags, BF_ACCUMULATE, !parseResult);
   return parseResult ? NS_OK : NS_ERROR_FAILURE;
 }
 
 void
 nsSMILAnimationFunction::UnsetAccumulate()
 {
@@ -907,17 +907,17 @@ nsSMILAnimationFunction::UnsetAccumulate
   mHasChanged = PR_TRUE;
 }
 
 nsresult
 nsSMILAnimationFunction::SetAdditive(const nsAString& aAdditive,
                                      nsAttrValue& aResult)
 {
   mHasChanged = PR_TRUE;
-  PRBool parseResult 
+  PRBool parseResult
     = aResult.ParseEnumValue(aAdditive, sAdditiveTable, PR_TRUE);
   SET_FLAG(mErrorFlags, BF_ADDITIVE, !parseResult);
   return parseResult ? NS_OK : NS_ERROR_FAILURE;
 }
 
 void
 nsSMILAnimationFunction::UnsetAdditive()
 {
@@ -925,17 +925,17 @@ nsSMILAnimationFunction::UnsetAdditive()
   mHasChanged = PR_TRUE;
 }
 
 nsresult
 nsSMILAnimationFunction::SetCalcMode(const nsAString& aCalcMode,
                                      nsAttrValue& aResult)
 {
   mHasChanged = PR_TRUE;
-  PRBool parseResult 
+  PRBool parseResult
     = aResult.ParseEnumValue(aCalcMode, sCalcModeTable, PR_TRUE);
   SET_FLAG(mErrorFlags, BF_CALC_MODE, !parseResult);
   return parseResult ? NS_OK : NS_ERROR_FAILURE;
 }
 
 void
 nsSMILAnimationFunction::UnsetCalcMode()
 {
--- a/content/smil/nsSMILAnimationFunction.h
+++ b/content/smil/nsSMILAnimationFunction.h
@@ -169,26 +169,26 @@ public:
    */
   PRInt8 CompareTo(const nsSMILAnimationFunction* aOther) const;
 
   /*
    * The following methods are provided so that the compositor can optimize its
    * operations by only composing those animation that will affect the final
    * result.
    */
- 
+
   /**
    * Indicates if the animation is currently active. Inactive animations will
    * not contribute to the composed result.
    *
    * @return  True if the animation active, false otherwise.
    */
   PRBool IsActive() const
   {
-    /* 
+    /*
      * - Frozen animations should be considered active for the purposes of
      * compositing.
      * - This function does not assume that our nsSMILValues (by/from/to/values)
      * have already been parsed.
      */
     return (mIsActive || mIsFrozen);
   }
 
@@ -318,17 +318,17 @@ protected:
   // that it determines will not contribute to the final result.
   nsSMILTime                    mSampleTime; // sample time within simple dur
   nsSMILTimeValue               mSimpleDuration;
   PRUint32                      mRepeatIteration;
   PRPackedBool                  mLastValue;
   PRPackedBool                  mHasChanged;
 
   nsSMILTime                    mBeginTime; // document time
-  
+
   // The owning animation element. This is used for sorting based on document
   // position and for fetching attribute values stored in the element.
   // Raw pointer is OK here, because this nsSMILAnimationFunction can't outlive
   // its owning animation element.
   nsISMILAnimationElement*      mAnimationElement;
 
   // Which attributes have been set but have had errors. This is not used for
   // all attributes but only those which have specified error behaviour
--- a/content/smil/nsSMILCompositor.cpp
+++ b/content/smil/nsSMILCompositor.cpp
@@ -131,17 +131,17 @@ nsSMILCompositor::ComposeAttribute()
     // For this to work, the nsSMILAnimationFunction needs to cache its last
     // elem/smilAttr/isCSS values, and then check them against the new values
     // here.
     /*
     if (!changed && curAnimFunc->HasChanged()) {
       changed = PR_TRUE;
     }
     */
-    
+
     if (curAnimFunc->WillReplace()) {
       --i;
       break;
     }
   }
   // NOTE: 'i' is now the index of the first animation function that we need
   // to use in compositing.
 
@@ -160,17 +160,17 @@ nsSMILCompositor::ComposeAttribute()
       curAnimFunc->ComposeResult(*smilAttr, resultValue);
     }
   }
 
   // FIFTH: Set the animated value to the final composited result.
   nsresult rv = smilAttr->SetAnimValue(resultValue);
   if (NS_FAILED(rv)) {
     NS_WARNING("nsISMILAttr::SetAnimValue failed");
-  } 
+  }
 }
 
 void
 nsSMILCompositor::ClearAnimationEffects()
 {
   if (!mKey.mElement || !mKey.mAttributeName)
     return;
 
--- a/content/smil/nsSMILCompositor.h
+++ b/content/smil/nsSMILCompositor.h
@@ -88,17 +88,17 @@ public:
   KeyType GetKey() const { return mKey; }
   PRBool KeyEquals(KeyTypePointer aKey) const;
   static KeyTypePointer KeyToPointer(KeyType aKey) { return &aKey; }
   static PLDHashNumber HashKey(KeyTypePointer aKey);
   enum { ALLOW_MEMMOVE = PR_FALSE };
 
   // Adds the given animation function to this Compositor's list of functions
   void AddAnimationFunction(nsSMILAnimationFunction* aFunc);
-  
+
   // Composes the attribute's current value with the list of animation
   // functions, and assigns the resulting value to this compositor's target
   // attribute
   void ComposeAttribute();
 
   // Clears animation effects on my target attribute
   void ClearAnimationEffects();
 
--- a/content/smil/nsSMILFloatType.cpp
+++ b/content/smil/nsSMILFloatType.cpp
@@ -83,17 +83,17 @@ nsSMILFloatType::Add(nsSMILValue& aDest,
 
 nsresult
 nsSMILFloatType::ComputeDistance(const nsSMILValue& aFrom,
                                  const nsSMILValue& aTo,
                                  double& aDistance) const
 {
   NS_PRECONDITION(aFrom.mType == aTo.mType,"Trying to compare different types");
   NS_PRECONDITION(aFrom.mType == this, "Unexpected source type");
-  
+
   const double &from = aFrom.mU.mDouble;
   const double &to   = aTo.mU.mDouble;
 
   aDistance = fabs(to - from);
 
   return NS_OK;
 }
 
--- a/content/smil/nsSMILInterval.h
+++ b/content/smil/nsSMILInterval.h
@@ -40,17 +40,17 @@
 
 #include "nsSMILTimeValue.h"
 
 //----------------------------------------------------------------------
 // nsSMILInterval class
 //
 // This class is essentially a structure consisting of a begin and end time. It
 // is used for representing the current interval and also for storing past
-// intervals for the purpose of hyperlinking back in time. 
+// intervals for the purpose of hyperlinking back in time.
 //
 // For an overview of how this class is related to other SMIL time classes see
 // the documentstation in nsSMILTimeValue.h
 
 class nsSMILInterval
 {
 public:
   nsSMILTimeValue mBegin;
--- a/content/smil/nsSMILKeySpline.cpp
+++ b/content/smil/nsSMILKeySpline.cpp
@@ -35,17 +35,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsSMILKeySpline.h"
 #include <math.h>
 
 #define NEWTON_ITERATIONS   4
 
-const double nsSMILKeySpline::kSampleStepSize = 
+const double nsSMILKeySpline::kSampleStepSize =
                                         1.0 / double(kSplineTableSize - 1);
 
 nsSMILKeySpline::nsSMILKeySpline(double aX1,
                                  double aY1,
                                  double aX2,
                                  double aY2)
 : mX1(aX1),
   mY1(aY1),
@@ -82,33 +82,33 @@ nsSMILKeySpline::CalcBezier(double aT,
   return ((A(aA1, aA2)*aT + B(aA1, aA2))*aT + C(aA1))*aT;
 }
 
 /*static*/ double
 nsSMILKeySpline::GetSlope(double aT,
                           double aA1,
                           double aA2)
 {
-  double denom = (3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1)); 
+  double denom = (3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1));
   return (denom == 0.0) ? 0.0 : 1.0 / denom;
 }
 
 double
 nsSMILKeySpline::GetTForX(double aX) const
 {
   int i;
 
   // Get an initial guess.
   //
   // Note: This is better than just taking x as our initial guess as cases such
   // as where the control points are (1, 1), (0, 0) will take some 20 iterations
   // to converge to a good accuracy. By taking an initial guess in this way we
   // only need 3~4 iterations depending on the size of the table.
   for (i = 0; i < kSplineTableSize - 2 && mSampleValues[i] < aX; ++i);
-  double currentT = 
+  double currentT =
     double(i) * kSampleStepSize + (aX - mSampleValues[i]) * kSampleStepSize;
 
   // Refine with Newton-Raphson iteration
   for (i = 0; i < NEWTON_ITERATIONS; ++i) {
     double currentX = CalcBezier(currentT, mX1, mX2);
     double currentSlope = GetSlope(currentT, mX1, mX2);
 
     if (currentSlope == 0.0)
--- a/content/smil/nsSMILKeySpline.h
+++ b/content/smil/nsSMILKeySpline.h
@@ -75,17 +75,17 @@ private:
   double
   GetTForX(double aX) const;
 
   static double
   A(double aA1, double aA2)
   {
     return 1.0 - 3.0 * aA2 + 3.0 * aA1;
   }
-  
+
   static double
   B(double aA1, double aA2)
   {
     return 3.0 * aA2 - 6.0 * aA1;
   }
 
   static double
   C(double aA1)
--- a/content/smil/nsSMILParserUtils.cpp
+++ b/content/smil/nsSMILParserUtils.cpp
@@ -218,32 +218,32 @@ nsSMILParserUtils::ParseKeyTimes(const n
       rv = NS_ERROR_OUT_OF_MEMORY;
       break;
     }
     previousValue = value;
 
     SkipWsp(start, end);
     if (start == end)
       break;
-    
+
     if (*start++ != ';') {
       rv = NS_ERROR_FAILURE;
       break;
     }
 
     SkipWsp(start, end);
   }
 
   return rv;
 }
 
 nsresult
 nsSMILParserUtils::ParseValues(const nsAString& aSpec,
                                const nsISMILAnimationElement* aSrcElement,
-                               const nsISMILAttr& aAttribute, 
+                               const nsISMILAttr& aAttribute,
                                nsTArray<nsSMILValue>& aValuesArray)
 {
   nsresult rv = NS_ERROR_FAILURE;
   nsAString::const_iterator start;
   nsAString::const_iterator end;
   nsAString::const_iterator substr_end;
   nsAString::const_iterator next;
 
@@ -270,17 +270,17 @@ nsSMILParserUtils::ParseValues(const nsA
       if (next == end)
         break;
     }
 
     do --substr_end; while (start != substr_end && NS_IS_SPACE(*substr_end));
     ++substr_end;
 
     nsSMILValue newValue;
-    rv = aAttribute.ValueFromString(Substring(start, substr_end), 
+    rv = aAttribute.ValueFromString(Substring(start, substr_end),
                                     aSrcElement, newValue);
     if (NS_FAILED(rv))
       break;
 
     if (!aValuesArray.AppendElement(newValue)) {
       rv = NS_ERROR_OUT_OF_MEMORY;
       break;
     }
@@ -300,17 +300,17 @@ nsSMILParserUtils::ParseRepeatCount(cons
 
   NS_ConvertUTF16toUTF8 spec(aSpec);
 
   nsACString::const_iterator start, end;
   spec.BeginReading(start);
   spec.EndReading(end);
 
   SkipWsp(start, end);
-  
+
   if (start != end)
   {
     if (ConsumeSubstring(start, end, "indefinite")) {
       aResult.SetIndefinite();
     } else {
       double value = GetFloat(start, end, &rv);
 
       if (NS_SUCCEEDED(rv))
@@ -338,17 +338,17 @@ nsSMILParserUtils::ParseRepeatCount(cons
     aResult.Unset();
   }
 
   return rv;
 }
 
 nsresult
 nsSMILParserUtils::ParseClockValue(const nsAString& aSpec,
-                                   nsSMILTimeValue* aResult, 
+                                   nsSMILTimeValue* aResult,
                                    PRUint32 aFlags,   // = 0
                                    PRBool* aIsMedia)  // = nsnull
 {
   nsSMILTime offset = 0L;
   double component = 0.0;
 
   PRInt8 sign = 0;
   PRUint8 colonCount = 0;
@@ -563,17 +563,17 @@ inline PRBool
 nsSMILParserUtils::ParseMetricMultiplicand(nsACString::const_iterator& aSpec,
                                          const nsACString::const_iterator& aEnd,
                                          PRInt32& multiplicand)
 {
   PRBool result = PR_FALSE;
 
   size_t len = aEnd.get() - aSpec.get();
   nsACString::const_iterator spec(aSpec);
-  
+
   if (len) {
     switch (*spec++)
     {
       case 'h':
         multiplicand = MSEC_PER_HOUR;
         result = PR_TRUE;
         break;
       case 'm':
--- a/content/smil/nsSMILParserUtils.h
+++ b/content/smil/nsSMILParserUtils.h
@@ -97,17 +97,17 @@ public:
    *                 PR_TRUE if the value is the string "media", PR_FALSE
    *                 otherwise. If it is null, the string "media" is not
    *                 allowed.
    *
    * @return NS_OK if aSpec was successfully parsed as a valid clock value
    * (according to aFlags), an error code otherwise.
    */
   static nsresult ParseClockValue(const nsAString& aSpec,
-                                  nsSMILTimeValue* aResult, 
+                                  nsSMILTimeValue* aResult,
                                   PRUint32 aFlags = 0,
                                   PRBool* aIsMedia = nsnull);
 
 private:
   static void   SkipWsp(nsACString::const_iterator& aIter,
                         const nsACString::const_iterator& aIterEnd);
   static void   SkipWsp(nsAString::const_iterator& aIter,
                         const nsAString::const_iterator& aIterEnd);
--- a/content/smil/nsSMILTimeContainer.h
+++ b/content/smil/nsSMILTimeContainer.h
@@ -38,17 +38,17 @@
 #ifndef NS_SMILTIMECONTAINER_H_
 #define NS_SMILTIMECONTAINER_H_
 
 #include "nscore.h"
 #include "nsSMILTypes.h"
 
 //----------------------------------------------------------------------
 // nsSMILTimeContainer
-// 
+//
 // Common base class for a time base that can be paused, resumed, and sampled.
 //
 class nsSMILTimeContainer
 {
 public:
   nsSMILTimeContainer();
   virtual ~nsSMILTimeContainer();
 
--- a/content/smil/nsSMILTimeValueSpec.cpp
+++ b/content/smil/nsSMILTimeValueSpec.cpp
@@ -86,19 +86,19 @@ nsSMILTimeValueSpec::SetSpec(const nsASt
   // XXX Need to parse other specifiers, not just offset type
   nsSMILTimeValue clockTime;
   nsresult rv = nsSMILParserUtils::ParseClockValue(aStringSpec, &clockTime,
                               nsSMILParserUtils::kClockValueAllowSign
                               | nsSMILParserUtils::kClockValueAllowIndefinite);
 
   if (NS_FAILED(rv) || (!clockTime.IsResolved() && !clockTime.IsIndefinite()))
     return NS_ERROR_FAILURE;
-  
+
   if (clockTime.IsResolved())
     mOffset = clockTime.GetMillis();
-  
+
   if (mOwner) {
     nsSMILInstanceTime instance(clockTime, this);
     mOwner->AddInstanceTime(instance, mIsBegin);
   }
 
   return rv;
 }
--- a/content/smil/nsSMILTimedElement.cpp
+++ b/content/smil/nsSMILTimedElement.cpp
@@ -180,17 +180,17 @@ nsSMILTimedElement::GetStartTime() const
     } else {
       startTime = mCurrentInterval.mBegin;
     }
   }
 
   if (!startTime.IsResolved()) {
     startTime.SetIndefinite();
   }
-  
+
   return startTime;
 }
 
 //----------------------------------------------------------------------
 // nsSMILTimedElement
 
 void
 nsSMILTimedElement::AddInstanceTime(const nsSMILInstanceTime& aInstanceTime,
@@ -232,17 +232,17 @@ nsSMILTimedElement::SampleAt(nsSMILTime 
 
     switch (mElementState)
     {
     case STATE_STARTUP:
       {
         nsSMILTimeValue beginAfter;
         beginAfter.SetMillis(LL_MININT);
 
-        mElementState = 
+        mElementState =
          (NS_SUCCEEDED(GetNextInterval(beginAfter, PR_TRUE, mCurrentInterval)))
          ? STATE_WAITING
          : STATE_POSTACTIVE;
         stateChanged = PR_TRUE;
       }
       break;
 
     case STATE_WAITING:
@@ -257,17 +257,17 @@ nsSMILTimedElement::SampleAt(nsSMILTime 
       }
       break;
 
     case STATE_ACTIVE:
       {
         CheckForEarlyEnd(docTime);
         if (mCurrentInterval.mEnd.CompareTo(docTime) <= 0) {
           nsSMILInterval newInterval;
-          mElementState = 
+          mElementState =
             (NS_SUCCEEDED(GetNextInterval(mCurrentInterval.mEnd,
                                           PR_FALSE,
                                           newInterval)))
             ? STATE_WAITING
             : STATE_POSTACTIVE;
           if (mClient) {
             mClient->Inactivate(mFillMode == FILL_FREEZE);
           }
@@ -437,25 +437,25 @@ nsSMILTimedElement::UnsetEndSpec()
 }
 
 nsresult
 nsSMILTimedElement::SetSimpleDuration(const nsAString& aDurSpec)
 {
   nsSMILTimeValue duration;
   PRBool isMedia;
   nsresult rv;
-  
+
   rv = nsSMILParserUtils::ParseClockValue(aDurSpec, &duration,
           nsSMILParserUtils::kClockValueAllowIndefinite, &isMedia);
 
   if (NS_FAILED(rv)) {
     mSimpleDur.SetIndefinite();
     return NS_ERROR_FAILURE;
   }
-  
+
   if (duration.IsResolved() && duration.GetMillis() == 0L) {
     mSimpleDur.SetIndefinite();
     return NS_ERROR_FAILURE;
   }
 
   //
   // SVG-specific: "For SVG's animation elements, if "media" is specified, the
   // attribute will be ignored." (SVG 1.1, section 19.2.6)
@@ -482,28 +482,28 @@ nsSMILTimedElement::UnsetSimpleDuration(
 }
 
 nsresult
 nsSMILTimedElement::SetMin(const nsAString& aMinSpec)
 {
   nsSMILTimeValue duration;
   PRBool isMedia;
   nsresult rv;
-  
+
   rv = nsSMILParserUtils::ParseClockValue(aMinSpec, &duration, 0, &isMedia);
 
   if (isMedia) {
     duration.SetMillis(0L);
   }
 
   if (NS_FAILED(rv) || !duration.IsResolved()) {
     mMin.SetMillis(0L);
     return NS_ERROR_FAILURE;
   }
-  
+
   if (duration.GetMillis() < 0L) {
     mMin.SetMillis(0L);
     return NS_ERROR_FAILURE;
   }
 
   mMin = duration;
   UpdateCurrentInterval();
 
@@ -518,28 +518,28 @@ nsSMILTimedElement::UnsetMin()
 }
 
 nsresult
 nsSMILTimedElement::SetMax(const nsAString& aMaxSpec)
 {
   nsSMILTimeValue duration;
   PRBool isMedia;
   nsresult rv;
-  
+
   rv = nsSMILParserUtils::ParseClockValue(aMaxSpec, &duration,
           nsSMILParserUtils::kClockValueAllowIndefinite, &isMedia);
 
   if (isMedia)
     duration.SetIndefinite();
 
   if (NS_FAILED(rv) || (!duration.IsResolved() && !duration.IsIndefinite())) {
     mMax.SetIndefinite();
     return NS_ERROR_FAILURE;
   }
-  
+
   if (duration.IsResolved() && duration.GetMillis() <= 0L) {
     mMax.SetIndefinite();
     return NS_ERROR_FAILURE;
   }
 
   mMax = duration;
   UpdateCurrentInterval();
 
@@ -552,17 +552,17 @@ nsSMILTimedElement::UnsetMax()
   mMax.SetIndefinite();
   UpdateCurrentInterval();
 }
 
 nsresult
 nsSMILTimedElement::SetRestart(const nsAString& aRestartSpec)
 {
   nsAttrValue temp;
-  PRBool parseResult 
+  PRBool parseResult
     = temp.ParseEnumValue(aRestartSpec, sRestartModeTable, PR_TRUE);
   mRestartMode = parseResult
                ? nsSMILRestartMode(temp.GetEnumValue())
                : RESTART_ALWAYS;
   UpdateCurrentInterval();
   return parseResult ? NS_OK : NS_ERROR_FAILURE;
 }
 
@@ -572,27 +572,27 @@ nsSMILTimedElement::UnsetRestart()
   mRestartMode = RESTART_ALWAYS;
   UpdateCurrentInterval();
 }
 
 nsresult
 nsSMILTimedElement::SetRepeatCount(const nsAString& aRepeatCountSpec)
 {
   nsSMILRepeatCount newRepeatCount;
-  nsresult rv = 
+  nsresult rv =
     nsSMILParserUtils::ParseRepeatCount(aRepeatCountSpec, newRepeatCount);
 
   if (NS_SUCCEEDED(rv)) {
     mRepeatCount = newRepeatCount;
   } else {
     mRepeatCount.Unset();
   }
 
   UpdateCurrentInterval();
-    
+
   return rv;
 }
 
 void
 nsSMILTimedElement::UnsetRepeatCount()
 {
   mRepeatCount.Unset();
   UpdateCurrentInterval();
@@ -606,17 +606,17 @@ nsSMILTimedElement::SetRepeatDur(const n
 
   rv = nsSMILParserUtils::ParseClockValue(aRepeatDurSpec, &duration,
           nsSMILParserUtils::kClockValueAllowIndefinite);
 
   if (NS_FAILED(rv) || (!duration.IsResolved() && !duration.IsIndefinite())) {
     mRepeatDur.SetUnresolved();
     return NS_ERROR_FAILURE;
   }
-  
+
   mRepeatDur = duration;
   UpdateCurrentInterval();
 
   return NS_OK;
 }
 
 void
 nsSMILTimedElement::UnsetRepeatDur()
@@ -626,17 +626,17 @@ nsSMILTimedElement::UnsetRepeatDur()
 }
 
 nsresult
 nsSMILTimedElement::SetFillMode(const nsAString& aFillModeSpec)
 {
   PRUint16 previousFillMode = mFillMode;
 
   nsAttrValue temp;
-  PRBool parseResult = 
+  PRBool parseResult =
     temp.ParseEnumValue(aFillModeSpec, sFillModeTable, PR_TRUE);
   mFillMode = parseResult
             ? nsSMILFillMode(temp.GetEnumValue())
             : FILL_REMOVE;
 
   if (mFillMode != previousFillMode &&
       (mElementState == STATE_WAITING || mElementState == STATE_POSTACTIVE) &&
       mClient)
@@ -660,17 +660,17 @@ nsSMILTimedElement::UnsetFillMode()
 // Implementation helpers
 
 nsresult
 nsSMILTimedElement::SetBeginOrEndSpec(const nsAString& aSpec,
                                       PRBool aIsBegin)
 {
   nsRefPtr<nsSMILTimeValueSpec> spec;
   SMILTimeValueSpecList& timeSpecsList = aIsBegin ? mBeginSpecs : mEndSpecs;
-  nsTArray<nsSMILInstanceTime>& instancesList 
+  nsTArray<nsSMILInstanceTime>& instancesList
     = aIsBegin ? mBeginInstances : mEndInstances;
 
   timeSpecsList.Clear();
   instancesList.Clear();
   HardReset(); // XXX Need to take care of time dependents here
 
   PRInt32 start;
   PRInt32 end = -1;
@@ -707,17 +707,17 @@ nsSMILTimedElement::SetBeginOrEndSpec(co
 //
 nsresult
 nsSMILTimedElement::GetNextInterval(const nsSMILTimeValue& aBeginAfter,
                                     PRBool aFirstInterval,
                                     nsSMILInterval& aResult)
 {
   static nsSMILTimeValue zeroTime;
   zeroTime.SetMillis(0L);
-  
+
   nsSMILTimeValue beginAfter = aBeginAfter;
   nsSMILTimeValue tempBegin;
   nsSMILTimeValue tempEnd;
   PRInt32         beginPos = 0;
   PRInt32         endPos = 0;
 
   //
   // This is to handle the special case when a we are calculating the first
@@ -746,43 +746,43 @@ nsSMILTimedElement::GetNextInterval(cons
     }
 
     if (mEndInstances.Length() == 0) {
       nsSMILTimeValue indefiniteEnd;
       indefiniteEnd.SetIndefinite();
 
       tempEnd = CalcActiveEnd(tempBegin, indefiniteEnd);
     } else {
-      // 
+      //
       // Start searching from the beginning again.
       //
       endPos = 0;
 
       PRBool endFound = GetNextGreaterOrEqual(mEndInstances, tempBegin,
                                               endPos, tempEnd);
 
       if ((!aFirstInterval && tempEnd.CompareTo(aBeginAfter) == 0) ||
-          (aFirstInterval && tempEnd.CompareTo(tempBegin) == 0 && 
+          (aFirstInterval && tempEnd.CompareTo(tempBegin) == 0 &&
            endPos <= endMaxPos)) {
-        endFound = 
+        endFound =
           GetNextGreaterOrEqual(mEndInstances, tempBegin, endPos, tempEnd);
       }
 
       endMaxPos = endPos;
 
       if (!endFound) {
         if (mEndHasEventConditions || mEndInstances.Length() == 0) {
           tempEnd.SetUnresolved();
         } else {
-          // 
+          //
           // This is a little counter-intuitive but according to SMILANIM, if
           // all the ends are before the begin, we _don't_ just assume an
           // infinite end, it's actually a bad interval. ASV however will just
           // use an infinite end.
-          // 
+          //
           return NS_ERROR_FAILURE;
         }
       }
 
       tempEnd = CalcActiveEnd(tempBegin, tempEnd);
     }
 
     if (tempEnd.CompareTo(zeroTime) > 0) {
@@ -923,17 +923,17 @@ nsSMILTimedElement::ActiveTimeToSimpleTi
   nsSMILTime result;
 
   NS_ASSERTION(mSimpleDur.IsResolved() || mSimpleDur.IsIndefinite(),
       "Unresolved simple duration in ActiveTimeToSimpleTime");
 
   if (mSimpleDur.IsIndefinite() || mSimpleDur.GetMillis() == 0L) {
     aRepeatIteration = 0;
     result = aActiveTime;
-  } else {    
+  } else {
     result = aActiveTime % mSimpleDur.GetMillis();
     aRepeatIteration = (PRUint32)(aActiveTime / mSimpleDur.GetMillis());
   }
 
   return result;
 }
 
 //
@@ -955,18 +955,18 @@ nsSMILTimedElement::CheckForEarlyEnd(con
     return;
 
   nsSMILTimeValue nextBegin;
   PRInt32 position = 0;
 
   while (GetNextGreaterOrEqual(mBeginInstances, mCurrentInterval.mBegin,
                                position, nextBegin)
          && nextBegin.CompareTo(mCurrentInterval.mBegin) == 0);
-        
-  if (nextBegin.IsResolved() && 
+
+  if (nextBegin.IsResolved() &&
       nextBegin.CompareTo(mCurrentInterval.mBegin) > 0 &&
       nextBegin.CompareTo(mCurrentInterval.mEnd) < 0 &&
       nextBegin.CompareTo(aDocumentTime) <= 0) {
     mCurrentInterval.mEnd = nextBegin;
   }
 }
 
 void
@@ -1022,36 +1022,36 @@ nsSMILTimedElement::UpdateCurrentInterva
   }
 }
 
 void
 nsSMILTimedElement::SampleSimpleTime(nsSMILTime aActiveTime)
 {
   if (mClient) {
     PRUint32 repeatIteration;
-    nsSMILTime simpleTime = 
+    nsSMILTime simpleTime =
       ActiveTimeToSimpleTime(aActiveTime, repeatIteration);
     mClient->SampleAt(simpleTime, mSimpleDur, repeatIteration);
   }
 }
 
 void
 nsSMILTimedElement::SampleFillValue()
 {
   if (mFillMode != FILL_FREEZE)
     return;
 
   if (!mClient)
     return;
 
   PRUint32 repeatIteration;
-  nsSMILTime activeTime = 
+  nsSMILTime activeTime =
     mCurrentInterval.mEnd.GetMillis() - mCurrentInterval.mBegin.GetMillis();
 
-  nsSMILTime simpleTime = 
+  nsSMILTime simpleTime =
     ActiveTimeToSimpleTime(activeTime, repeatIteration);
 
   if (simpleTime == 0L) {
     mClient->SampleLastValue(--repeatIteration);
   } else {
     mClient->SampleAt(simpleTime, mSimpleDur, repeatIteration);
   }
 }
--- a/content/smil/nsSMILTimedElement.h
+++ b/content/smil/nsSMILTimedElement.h
@@ -55,17 +55,17 @@ class nsIAtom;
 //----------------------------------------------------------------------
 // nsSMILTimedElement
 
 class nsSMILTimedElement
 {
 public:
   nsSMILTimedElement();
 
-  /** 
+  /**
    * Methods for supporting the nsIDOMElementTimeControl interface.
    */
 
   /*
    * Adds a new begin instance time at the current document time (as defined by
    * aContainer) plus or minus the specified offset.
    *
    * @param aOffsetSeconds A real number specifying the number of seconds to add
@@ -87,17 +87,17 @@ public:
    * @param aContainer The time container with which this timed element is
    *                   associated and which should be used for determining the
    *                   current time.
    * @return NS_OK if the operation succeeeded, or an error code otherwise.
    */
   nsresult EndElementAt(double aOffsetSeconds,
                         const nsSMILTimeContainer* aContainer);
 
-  /** 
+  /**
    * Methods for supporting the nsSVGAnimationElement interface.
    */
 
   /**
    * According to SVG 1.1 this is supposed to return the start time for the
    * animation but at this stage no one seems to know what that means.
    *
    * For now we have adopted Opera's behaviour which seems to be:
@@ -125,17 +125,17 @@ public:
    *
    * @return the simple duration in milliseconds or INDEFINITE.
    */
   nsSMILTimeValue GetSimpleDuration() const
   {
     return mSimpleDur;
   }
 
-  /** 
+  /**
    * Internal SMIL methods
    */
 
   /**
    * Adds an instance time object this element's list of instance times.
    * These instance times are used when creating intervals.
    *
    * This method is typically called by an nsSMILTimeValueSpec.
--- a/content/svg/content/src/nsSVGAnimationElement.cpp
+++ b/content/svg/content/src/nsSVGAnimationElement.cpp
@@ -295,25 +295,25 @@ nsSVGAnimationElement::ParseAttribute(PR
       aResult.ParseAtom(aValue);
       AnimationNeedsResample();
       return PR_TRUE;
     }
 
     nsresult rv = NS_ERROR_FAILURE;
 
     // First let the animation function try to parse it...
-    PRBool foundMatch = 
+    PRBool foundMatch =
       AnimationFunction().SetAttr(aAttribute, aValue, aResult, &rv);
 
     // ... and if that didn't recognize the attribute, let the timed element
     // try to parse it.
     if (!foundMatch) {
       foundMatch = mTimedElement.SetAttr(aAttribute, aValue, aResult, &rv);
     }
-    
+
     if (foundMatch) {
       AnimationNeedsResample();
       if (NS_FAILED(rv)) {
         ReportAttributeParseFailure(GetOwnerDoc(), aAttribute, aValue);
         return PR_FALSE;
       }
       return PR_TRUE;
     }
--- a/content/svg/content/src/nsSVGAnimationElement.h
+++ b/content/svg/content/src/nsSVGAnimationElement.h
@@ -54,17 +54,17 @@ class nsSVGAnimationElement : public nsS
                               public nsISMILAnimationElement,
                               public nsIDOMElementTimeControl
 {
 protected:
   nsSVGAnimationElement(nsINodeInfo *aNodeInfo);
   nsresult Init();
 
 public:
-  // interfaces:  
+  // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMSVGANIMATIONELEMENT
   NS_DECL_NSIDOMELEMENTTIMECONTROL
 
   // nsIContent specializations
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               PRBool aCompileEventHandlers);
--- a/content/svg/content/src/nsSVGSMILTransform.h
+++ b/content/svg/content/src/nsSVGSMILTransform.h
@@ -96,15 +96,15 @@ public:
 
   nsSVGSMILTransform(float (&aParams)[6])
   : mTransformType(TRANSFORM_MATRIX)
   {
     for (int i = 0; i < 6; ++i) {
       mParams[i] = aParams[i];
     }
   }
-    
+
   TransformType mTransformType;
-  
+
   float mParams[6];
 };
 
 #endif // NS_SVGSMILTRANSFORM_H_
--- a/content/svg/content/src/nsSVGTransformSMILAttr.cpp
+++ b/content/svg/content/src/nsSVGTransformSMILAttr.cpp
@@ -86,30 +86,30 @@ nsSVGTransformSMILAttr::ValueFromString(
 
 nsSMILValue
 nsSVGTransformSMILAttr::GetBaseValue() const
 {
   nsSVGTransformSMILType *type = &nsSVGTransformSMILType::sSingleton;
   nsSMILValue val(type);
   if (val.IsNull())
     return val;
- 
+
   nsIDOMSVGTransformList *list = mVal->mBaseVal.get();
 
   PRUint32 numItems = 0;
   list->GetNumberOfItems(&numItems);
   for (PRUint32 i = 0; i < numItems; i++) {
     nsCOMPtr<nsIDOMSVGTransform> transform;
     nsresult rv = list->GetItem(i, getter_AddRefs(transform));
     if (NS_SUCCEEDED(rv) && transform) {
       rv = AppendSVGTransformToSMILValue(transform.get(), val);
       NS_ENSURE_SUCCESS(rv,nsSMILValue());
     }
   }
-  
+
   return val;
 }
 
 void
 nsSVGTransformSMILAttr::ClearAnimValue()
 {
   mVal->WillModify(nsISVGValue::mod_other);
   mVal->mAnimVal = nsnull;
@@ -161,17 +161,17 @@ nsSVGTransformSMILAttr::ParseValue(const
 
   // Reset the result so we can just append to it
   nsresult rv = type->Init(aResult);
   NS_ENSURE_SUCCESS(rv,rv);
 
   float params[3] = { 0.f };
   PRInt32 numParsed = ParseParameterList(aSpec, params, 3);
   nsSVGSMILTransform::TransformType transformType;
-   
+
   if (aTransformType == nsGkAtoms::translate) {
     // tx [ty=0]
     if (numParsed != 1 && numParsed != 2)
       return NS_ERROR_FAILURE;
     transformType = nsSVGSMILTransform::TRANSFORM_TRANSLATE;
   } else if (aTransformType == nsGkAtoms::scale) {
     // sx [sy=sx]
     if (numParsed != 1 && numParsed != 2)
@@ -338,17 +338,17 @@ nsSVGTransformSMILAttr::AppendSVGTransfo
       return NS_OK;
 
     default:
       NS_WARNING("Trying to convert unrecognised SVG transform type.");
       return NS_ERROR_FAILURE;
   }
 
   if (transformType != nsSVGSMILTransform::TRANSFORM_MATRIX) {
-    rv = 
+    rv =
       type->AppendTransform(nsSVGSMILTransform(transformType, params), aValue);
   }
 
   return rv;
 }
 
 nsresult
 nsSVGTransformSMILAttr::UpdateFromSMILValue(
--- a/content/svg/content/src/nsSVGTransformSMILType.cpp
+++ b/content/svg/content/src/nsSVGTransformSMILType.cpp
@@ -49,17 +49,17 @@ nsresult
 nsSVGTransformSMILType::Init(nsSMILValue &aValue) const
 {
   NS_PRECONDITION(aValue.mType == this || aValue.IsNull(),
                   "Unexpected value type");
   NS_ASSERTION(aValue.mType != this || aValue.mU.mPtr,
                "Invalid nsSMILValue of SVG transform type: NULL data member.");
 
   if (aValue.mType != this || !aValue.mU.mPtr) {
-    // Different type, or no data member: allocate memory and set type 
+    // Different type, or no data member: allocate memory and set type
     TransformArray* transforms = new TransformArray(1);
     NS_ENSURE_TRUE(transforms, NS_ERROR_OUT_OF_MEMORY);
     aValue.mU.mPtr = transforms;
     aValue.mType = this;
   } else {
     // Same type, just set clear
     TransformArray* transforms = static_cast<TransformArray*>(aValue.mU.mPtr);
     transforms->Clear();
@@ -80,17 +80,17 @@ nsSVGTransformSMILType::Destroy(nsSMILVa
 
 nsresult
 nsSVGTransformSMILType::Assign(nsSMILValue& aDest,
                                const nsSMILValue& aSrc) const
 {
   NS_PRECONDITION(aDest.mType == aSrc.mType, "Incompatible SMIL types.");
   NS_PRECONDITION(aDest.mType == this, "Unexpected SMIL value.");
 
-  const TransformArray* srcTransforms = 
+  const TransformArray* srcTransforms =
     static_cast<const TransformArray*>(aSrc.mU.mPtr);
   TransformArray* dstTransforms = static_cast<TransformArray*>(aDest.mU.mPtr);
 
   // Before we assign, ensure we have sufficient memory
   PRBool result = dstTransforms->SetCapacity(srcTransforms->Length());
   NS_ENSURE_TRUE(result,NS_ERROR_OUT_OF_MEMORY);
 
   *dstTransforms = *srcTransforms;
@@ -176,23 +176,23 @@ nsSVGTransformSMILType::SandwichAdd(nsSM
   return NS_OK;
 }
 
 nsresult
 nsSVGTransformSMILType::ComputeDistance(const nsSMILValue& aFrom,
                                         const nsSMILValue& aTo,
                                         double& aDistance) const
 {
-  NS_PRECONDITION(aFrom.mType == aTo.mType, 
+  NS_PRECONDITION(aFrom.mType == aTo.mType,
       "Can't compute difference between different SMIL types.");
   NS_PRECONDITION(aFrom.mType == this, "Unexpected SMIL type.");
 
-  const TransformArray* fromTransforms = 
+  const TransformArray* fromTransforms =
     static_cast<const TransformArray*>(aFrom.mU.mPtr);
-  const TransformArray* toTransforms = 
+  const TransformArray* toTransforms =
     static_cast<const TransformArray*>(aTo.mU.mPtr);
 
   // ComputeDistance is only used for calculating distances between single
   // values in a values array which necessarily have the same type
   //
   // So we should only have one transform in each array and they should be of
   // the same type
   NS_ASSERTION(fromTransforms->Length() == 1,
@@ -247,19 +247,19 @@ nsSVGTransformSMILType::Interpolate(cons
                                     nsSMILValue& aResult) const
 {
   NS_PRECONDITION(aStartVal.mType == aEndVal.mType,
       "Can't interpolate between different SMIL types.");
   NS_PRECONDITION(aStartVal.mType == this,
       "Unexpected type for interpolation.");
   NS_PRECONDITION(aResult.mType == this, "Unexpected result type.");
 
-  const TransformArray& startTransforms = 
+  const TransformArray& startTransforms =
     (*static_cast<const TransformArray*>(aStartVal.mU.mPtr));
-  const TransformArray& endTransforms 
+  const TransformArray& endTransforms
     (*static_cast<const TransformArray*>(aEndVal.mU.mPtr));
 
   // We may have 0..n transforms in the start transform array (the base
   // value) but we should only have 1 transform in the end transform array
   NS_ASSERTION(endTransforms.Length() == 1,
     "Invalid end-point for interpolating between transform values.");
 
   // The end point should never be a matrix transform
@@ -279,32 +279,32 @@ nsSVGTransformSMILType::Interpolate(cons
     const nsSVGSMILTransform& startTransform = startTransforms[0];
     if (startTransform.mTransformType == endTransform.mTransformType) {
       startParams = startTransform.mParams;
     }
   }
   if (!startParams) {
     startParams = identityParams;
   }
-  
+
   const float* endParams = endTransform.mParams;
 
   // Interpolate between the params
   float newParams[3];
   for (int i = 0; i <= 2; ++i) {
     const float& a = startParams[i];
     const float& b = endParams[i];
     newParams[i] = a + (b - a) * aUnitDistance;
   }
 
   // Make the result
   nsSVGSMILTransform resultTransform(endTransform.mTransformType, newParams);
 
   // Clear the way for it in the result array
-  TransformArray& dstTransforms = 
+  TransformArray& dstTransforms =
     (*static_cast<TransformArray*>(aResult.mU.mPtr));
   dstTransforms.Clear();
 
   // Assign the result
   nsSVGSMILTransform* transform = dstTransforms.AppendElement(resultTransform);
   NS_ENSURE_TRUE(transform,NS_ERROR_OUT_OF_MEMORY);
 
   return NS_OK;
@@ -313,36 +313,36 @@ nsSVGTransformSMILType::Interpolate(cons
 //----------------------------------------------------------------------
 // Transform array accessors
 
 PRUint32
 nsSVGTransformSMILType::GetNumTransforms(const nsSMILValue& aValue) const
 {
   NS_PRECONDITION(aValue.mType == this, "Unexpected SMIL value.");
 
-  const TransformArray& transforms = 
+  const TransformArray& transforms =
     *static_cast<const TransformArray*>(aValue.mU.mPtr);
-  
+
   return transforms.Length();
 }
 
 const nsSVGSMILTransform*
 nsSVGTransformSMILType::GetTransformAt(PRUint32 aIndex,
                                        const nsSMILValue& aValue) const
 {
   NS_PRECONDITION(aValue.mType == this, "Unexpected SMIL value.");
 
-  const TransformArray& transforms = 
+  const TransformArray& transforms =
     *static_cast<const TransformArray*>(aValue.mU.mPtr);
 
   if (aIndex >= transforms.Length()) {
     NS_ERROR("Attempting to access invalid transform.");
     return nsnull;
   }
-  
+
   return &transforms[aIndex];
 }
 
 nsresult
 nsSVGTransformSMILType::AppendTransform(const nsSVGSMILTransform& aTransform,
                                         nsSMILValue& aValue) const
 {
   NS_PRECONDITION(aValue.mType == this, "Unexpected SMIL value.");