Bug 846995 Part 3: Rename DOMSVGAnimatedTransformList and kill nsISupports r=jwatt
☠☠ backed out by 5882acd59c33 ☠ ☠
authorDavid Zbarsky <dzbarsky@gmail.com>
Tue, 19 Mar 2013 22:31:44 -0400
changeset 125559 26f0d590a021eebb470792b132513326428d08f3
parent 125558 d92e88a1826328a1a49e932ca053c05df4728b37
child 125560 b147c2b0837255a562dacbdc0a3918e35a3fdd91
push id24459
push useremorley@mozilla.com
push dateWed, 20 Mar 2013 11:46:36 +0000
treeherdermozilla-central@1d6fe70c79c5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs846995
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 846995 Part 3: Rename DOMSVGAnimatedTransformList and kill nsISupports r=jwatt
content/svg/content/src/DOMSVGAnimatedTransformList.cpp
content/svg/content/src/DOMSVGAnimatedTransformList.h
content/svg/content/src/SVGAnimatedTransformList.cpp
content/svg/content/src/SVGAnimatedTransformList.h
content/svg/content/src/SVGFragmentIdentifier.cpp
content/svg/content/src/SVGPatternElement.cpp
content/svg/content/src/SVGPatternElement.h
dom/bindings/Bindings.conf
layout/svg/nsSVGGradientFrame.cpp
layout/svg/nsSVGGradientFrame.h
layout/svg/nsSVGPatternFrame.cpp
layout/svg/nsSVGPatternFrame.h
rename from content/svg/content/src/DOMSVGAnimatedTransformList.cpp
rename to content/svg/content/src/SVGAnimatedTransformList.cpp
--- a/content/svg/content/src/DOMSVGAnimatedTransformList.cpp
+++ b/content/svg/content/src/SVGAnimatedTransformList.cpp
@@ -1,102 +1,98 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "DOMSVGAnimatedTransformList.h"
+#include "mozilla/dom/SVGAnimatedTransformList.h"
 #include "DOMSVGTransformList.h"
-#include "SVGAnimatedTransformList.h"
+#include "nsSVGAnimatedTransformList.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "mozilla/dom/SVGAnimatedTransformListBinding.h"
 #include "nsContentUtils.h"
 
 namespace mozilla {
+namespace dom {
 
 static
-  nsSVGAttrTearoffTable<SVGAnimatedTransformList,DOMSVGAnimatedTransformList>
+  nsSVGAttrTearoffTable<nsSVGAnimatedTransformList, SVGAnimatedTransformList>
   sSVGAnimatedTransformListTearoffTable;
 
-NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedTransformList, mElement)
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGAnimatedTransformList)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGAnimatedTransformList)
+NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedTransformList, mElement)
 
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGAnimatedTransformList)
-  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-NS_INTERFACE_MAP_END
+NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedTransformList, AddRef)
+NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedTransformList, Release)
 
 JSObject*
-DOMSVGAnimatedTransformList::WrapObject(JSContext* aCx, JSObject* aScope)
+SVGAnimatedTransformList::WrapObject(JSContext* aCx, JSObject* aScope)
 {
-  return mozilla::dom::SVGAnimatedTransformListBinding::Wrap(aCx, aScope, this);
+  return SVGAnimatedTransformListBinding::Wrap(aCx, aScope, this);
 }
 
 //----------------------------------------------------------------------
 already_AddRefed<DOMSVGTransformList>
-DOMSVGAnimatedTransformList::BaseVal()
+SVGAnimatedTransformList::BaseVal()
 {
   if (!mBaseVal) {
     mBaseVal = new DOMSVGTransformList(this, InternalAList().GetBaseValue());
   }
   nsRefPtr<DOMSVGTransformList> baseVal = mBaseVal;
   return baseVal.forget();
 }
 
 already_AddRefed<DOMSVGTransformList>
-DOMSVGAnimatedTransformList::AnimVal()
+SVGAnimatedTransformList::AnimVal()
 {
   if (!mAnimVal) {
     mAnimVal = new DOMSVGTransformList(this, InternalAList().GetAnimValue());
   }
   nsRefPtr<DOMSVGTransformList> animVal = mAnimVal;
   return animVal.forget();
 }
 
-/* static */ already_AddRefed<DOMSVGAnimatedTransformList>
-DOMSVGAnimatedTransformList::GetDOMWrapper(SVGAnimatedTransformList *aList,
-                                           nsSVGElement *aElement)
+/* static */ already_AddRefed<SVGAnimatedTransformList>
+SVGAnimatedTransformList::GetDOMWrapper(nsSVGAnimatedTransformList *aList,
+                                        nsSVGElement *aElement)
 {
-  nsRefPtr<DOMSVGAnimatedTransformList> wrapper =
+  nsRefPtr<SVGAnimatedTransformList> wrapper =
     sSVGAnimatedTransformListTearoffTable.GetTearoff(aList);
   if (!wrapper) {
-    wrapper = new DOMSVGAnimatedTransformList(aElement);
+    wrapper = new SVGAnimatedTransformList(aElement);
     sSVGAnimatedTransformListTearoffTable.AddTearoff(aList, wrapper);
   }
   return wrapper.forget();
 }
 
-/* static */ DOMSVGAnimatedTransformList*
-DOMSVGAnimatedTransformList::GetDOMWrapperIfExists(
-  SVGAnimatedTransformList *aList)
+/* static */ SVGAnimatedTransformList*
+SVGAnimatedTransformList::GetDOMWrapperIfExists(
+  nsSVGAnimatedTransformList *aList)
 {
   return sSVGAnimatedTransformListTearoffTable.GetTearoff(aList);
 }
 
-DOMSVGAnimatedTransformList::~DOMSVGAnimatedTransformList()
+SVGAnimatedTransformList::~SVGAnimatedTransformList()
 {
   // Script no longer has any references to us, to our base/animVal objects, or
   // to any of their list items.
   sSVGAnimatedTransformListTearoffTable.RemoveTearoff(&InternalAList());
 }
 
 void
-DOMSVGAnimatedTransformList::InternalBaseValListWillChangeLengthTo(
+SVGAnimatedTransformList::InternalBaseValListWillChangeLengthTo(
   uint32_t aNewLength)
 {
   // When the number of items in our internal counterpart's baseVal changes,
   // we MUST keep our baseVal in sync. If we don't, script will either see a
   // list that is too short and be unable to access indexes that should be
   // valid, or else, MUCH WORSE, script will see a list that is too long and be
   // able to access "items" at indexes that are out of bounds (read/write to
   // bad memory)!!
 
-  nsRefPtr<DOMSVGAnimatedTransformList> kungFuDeathGrip;
+  nsRefPtr<SVGAnimatedTransformList> kungFuDeathGrip;
   if (mBaseVal) {
     if (aNewLength < mBaseVal->LengthNoFlush()) {
       // InternalListLengthWillChange might clear last reference to |this|.
       // Retain a temporary reference to keep from dying before returning.
       kungFuDeathGrip = this;
     }
     mBaseVal->InternalListLengthWillChange(aNewLength);
   }
@@ -107,35 +103,36 @@ DOMSVGAnimatedTransformList::InternalBas
   // if necessary.)
 
   if (!IsAnimating()) {
     InternalAnimValListWillChangeLengthTo(aNewLength);
   }
 }
 
 void
-DOMSVGAnimatedTransformList::InternalAnimValListWillChangeLengthTo(
+SVGAnimatedTransformList::InternalAnimValListWillChangeLengthTo(
   uint32_t aNewLength)
 {
   if (mAnimVal) {
     mAnimVal->InternalListLengthWillChange(aNewLength);
   }
 }
 
 bool
-DOMSVGAnimatedTransformList::IsAnimating() const
+SVGAnimatedTransformList::IsAnimating() const
 {
   return InternalAList().IsAnimating();
 }
 
-SVGAnimatedTransformList&
-DOMSVGAnimatedTransformList::InternalAList()
+nsSVGAnimatedTransformList&
+SVGAnimatedTransformList::InternalAList()
 {
   return *mElement->GetAnimatedTransformList();
 }
 
-const SVGAnimatedTransformList&
-DOMSVGAnimatedTransformList::InternalAList() const
+const nsSVGAnimatedTransformList&
+SVGAnimatedTransformList::InternalAList() const
 {
   return *mElement->GetAnimatedTransformList();
 }
 
+} // namespace dom
 } // namespace mozilla
rename from content/svg/content/src/DOMSVGAnimatedTransformList.h
rename to content/svg/content/src/SVGAnimatedTransformList.h
--- a/content/svg/content/src/DOMSVGAnimatedTransformList.h
+++ b/content/svg/content/src/SVGAnimatedTransformList.h
@@ -1,75 +1,76 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef MOZILLA_DOMSVGANIMATEDTRANSFORMLIST_H__
-#define MOZILLA_DOMSVGANIMATEDTRANSFORMLIST_H__
+#ifndef mozilla_dom_SVGAnimatedTransformList_h
+#define mozilla_dom_SVGAnimatedTransformList_h
 
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsSVGElement.h"
 #include "nsWrapperCache.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 
 class DOMSVGTransformList;
-class SVGAnimatedTransformList;
+class nsSVGAnimatedTransformList;
+
+namespace dom {
 
 /**
- * Class DOMSVGAnimatedTransformList
+ * Class SVGAnimatedTransformList
  *
  * This class is used to create the DOM tearoff objects that wrap internal
- * SVGAnimatedTransformList objects.
+ * nsSVGAnimatedTransformList objects.
  *
  * See the architecture comment in DOMSVGAnimatedLengthList.h (that's
  * LENGTH list). The comment for that class largly applies to this one too
  * and will go a long way to helping you understand the architecture here.
  *
  * This class is strongly intertwined with DOMSVGTransformList and
  * DOMSVGTransform.
  * Our DOMSVGTransformList base and anim vals are friends and take care of
  * nulling out our pointers to them when they die (making our pointers to them
  * true weak refs).
  */
-class DOMSVGAnimatedTransformList MOZ_FINAL : public nsISupports,
-                                              public nsWrapperCache
+class SVGAnimatedTransformList MOZ_FINAL : public nsWrapperCache
 {
   friend class DOMSVGTransformList;
 
 public:
-  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGAnimatedTransformList)
+  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedTransformList)
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedTransformList)
 
   /**
-   * Factory method to create and return a DOMSVGAnimatedTransformList wrapper
-   * for a given internal SVGAnimatedTransformList object. The factory takes
+   * Factory method to create and return a SVGAnimatedTransformList wrapper
+   * for a given internal nsSVGAnimatedTransformList object. The factory takes
    * care of caching the object that it returns so that the same object can be
-   * returned for the given SVGAnimatedTransformList each time it is requested.
+   * returned for the given nsSVGAnimatedTransformList each time it is requested.
    * The cached object is only removed from the cache when it is destroyed due
    * to there being no more references to it or to any of its descendant
    * objects. If that happens, any subsequent call requesting the DOM wrapper
-   * for the SVGAnimatedTransformList will naturally result in a new
-   * DOMSVGAnimatedTransformList being returned.
+   * for the nsSVGAnimatedTransformList will naturally result in a new
+   * SVGAnimatedTransformList being returned.
    */
-  static already_AddRefed<DOMSVGAnimatedTransformList>
-    GetDOMWrapper(SVGAnimatedTransformList *aList, nsSVGElement *aElement);
+  static already_AddRefed<SVGAnimatedTransformList>
+    GetDOMWrapper(nsSVGAnimatedTransformList *aList, nsSVGElement *aElement);
 
   /**
-   * This method returns the DOMSVGAnimatedTransformList wrapper for an internal
-   * SVGAnimatedTransformList object if it currently has a wrapper. If it does
+   * This method returns the SVGAnimatedTransformList wrapper for an internal
+   * nsSVGAnimatedTransformList object if it currently has a wrapper. If it does
    * not, then nullptr is returned.
    */
-  static DOMSVGAnimatedTransformList*
-    GetDOMWrapperIfExists(SVGAnimatedTransformList *aList);
+  static SVGAnimatedTransformList*
+    GetDOMWrapperIfExists(nsSVGAnimatedTransformList *aList);
 
   /**
    * Called by internal code to notify us when we need to sync the length of
    * our baseVal DOM list with its internal list. This is called just prior to
    * the length of the internal baseVal list being changed so that any DOM list
    * items that need to be removed from the DOM list can first get their values
    * from their internal counterpart.
    *
@@ -95,36 +96,37 @@ public:
   already_AddRefed<DOMSVGTransformList> AnimVal();
 
 private:
 
   /**
    * Only our static GetDOMWrapper() factory method may create objects of our
    * type.
    */
-  explicit DOMSVGAnimatedTransformList(nsSVGElement *aElement)
+  explicit SVGAnimatedTransformList(nsSVGElement *aElement)
     : mBaseVal(nullptr)
     , mAnimVal(nullptr)
     , mElement(aElement)
   {
     SetIsDOMBinding();
   }
 
-  ~DOMSVGAnimatedTransformList();
+  ~SVGAnimatedTransformList();
 
   /// Get a reference to this DOM wrapper object's internal counterpart.
-  SVGAnimatedTransformList& InternalAList();
-  const SVGAnimatedTransformList& InternalAList() const;
+  nsSVGAnimatedTransformList& InternalAList();
+  const nsSVGAnimatedTransformList& InternalAList() const;
 
   // Weak refs to our DOMSVGTransformList baseVal/animVal objects. These objects
   // are friends and take care of clearing these pointers when they die, making
   // these true weak references.
   DOMSVGTransformList *mBaseVal;
   DOMSVGTransformList *mAnimVal;
 
   // Strong ref to our element to keep it alive. We hold this not only for
   // ourself, but also for our base/animVal and all of their items.
   nsRefPtr<nsSVGElement> mElement;
 };
 
+} // namespace dom
 } // namespace mozilla
 
-#endif // MOZILLA_DOMSVGANIMATEDTRANSFORMLIST_H__
+#endif // mozilla_dom_SVGAnimatedTransformList_h
--- a/content/svg/content/src/SVGFragmentIdentifier.cpp
+++ b/content/svg/content/src/SVGFragmentIdentifier.cpp
@@ -151,17 +151,17 @@ SVGFragmentIdentifier::ProcessSVGViewSpe
     } else if (IsMatchingParameter(token, NS_LITERAL_STRING("preserveAspectRatio"))) {
       if (preserveAspectRatioFound ||
           NS_FAILED(root->mPreserveAspectRatio.SetBaseValueString(
                       params, root, true))) {
         return false;
       }
       preserveAspectRatioFound = true;
     } else if (IsMatchingParameter(token, NS_LITERAL_STRING("transform"))) {
-      SVGAnimatedTransformList transforms;
+      nsSVGAnimatedTransformList transforms;
       if (transformFound ||
           NS_FAILED(transforms.SetBaseValueString(params))) {
         return false;
       }
       if (!root->mFragmentIdentifierTransform) {
         root->mFragmentIdentifierTransform = new gfxMatrix();
       }
       *root->mFragmentIdentifierTransform =
--- a/content/svg/content/src/SVGPatternElement.cpp
+++ b/content/svg/content/src/SVGPatternElement.cpp
@@ -5,16 +5,17 @@
 
 #include "mozilla/Util.h"
 
 #include "nsCOMPtr.h"
 #include "nsGkAtoms.h"
 #include "mozilla/dom/SVGAnimatedTransformList.h"
 #include "mozilla/dom/SVGPatternElement.h"
 #include "mozilla/dom/SVGPatternElementBinding.h"
+#include "nsSVGAnimatedTransformList.h"
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Pattern)
 
 namespace mozilla {
 namespace dom {
 
 JSObject*
 SVGPatternElement::WrapNode(JSContext *aCx, JSObject *aScope)
--- a/content/svg/content/src/SVGPatternElement.h
+++ b/content/svg/content/src/SVGPatternElement.h
@@ -16,37 +16,35 @@
 #include "SVGAnimatedTransformList.h"
 
 class nsSVGPatternFrame;
 
 nsresult NS_NewSVGPatternElement(nsIContent **aResult,
                                  already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
-class DOMSVGAnimatedTransformList;
 
 namespace dom {
+class SVGAnimatedTransformList;
 
 typedef nsSVGElement SVGPatternElementBase;
 
 class SVGPatternElement MOZ_FINAL : public SVGPatternElementBase,
                                     public nsIDOMSVGElement,
                                     public nsIDOMSVGUnitTypes
 {
   friend class ::nsSVGPatternFrame;
 
 protected:
   friend nsresult (::NS_NewSVGPatternElement(nsIContent **aResult,
                                              already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGPatternElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
-  typedef mozilla::SVGAnimatedPreserveAspectRatio SVGAnimatedPreserveAspectRatio;
-
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
   NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
 
   // nsIContent interface
@@ -88,17 +86,17 @@ protected:
   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   enum { PATTERNUNITS, PATTERNCONTENTUNITS };
   nsSVGEnum mEnumAttributes[2];
   static EnumInfo sEnumInfo[2];
 
-  nsAutoPtr<mozilla::SVGAnimatedTransformList> mPatternTransform;
+  nsAutoPtr<nsSVGAnimatedTransformList> mPatternTransform;
 
   enum { HREF };
   nsSVGString mStringAttributes[1];
   static StringInfo sStringInfo[1];
 
   // SVGFitToViewbox properties
   nsSVGViewBox mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -662,17 +662,17 @@ DOMInterfaces = {
 },
 
 'SVGAnimatedPreserveAspectRatio': {
     'nativeType': 'mozilla::dom::DOMSVGAnimatedPreserveAspectRatio',
     'headerFile': 'SVGAnimatedPreserveAspectRatio.h'
 },
 
 'SVGAnimatedTransformList': {
- #   'nativeOwnership': 'refcounted',
+    'nativeOwnership': 'refcounted',
 },
 
 'SVGAnimationElement': {
     'resultNotAddRefed': ['targetElement'],
     'concrete': False
 },
 
 'SVGComponentTransferFunctionElement': {
--- a/layout/svg/nsSVGGradientFrame.cpp
+++ b/layout/svg/nsSVGGradientFrame.cpp
@@ -9,17 +9,17 @@
 
 // Keep others in (case-insensitive) order:
 #include "gfxPattern.h"
 #include "mozilla/dom/SVGGradientElement.h"
 #include "mozilla/dom/SVGStopElement.h"
 #include "nsContentUtils.h"
 #include "nsIDOMSVGAnimatedNumber.h"
 #include "nsSVGEffects.h"
-#include "SVGAnimatedTransformList.h"
+#include "nsSVGAnimatedTransformList.h"
 
 // XXX Tight coupling with content classes ahead!
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 //----------------------------------------------------------------------
 // Helper classes
@@ -152,20 +152,20 @@ nsSVGGradientFrame::GetGradientUnits()
 }
 
 uint16_t
 nsSVGGradientFrame::GetSpreadMethod()
 {
   return GetEnumValue(dom::SVGGradientElement::SPREADMETHOD);
 }
 
-const SVGAnimatedTransformList*
+const nsSVGAnimatedTransformList*
 nsSVGGradientFrame::GetGradientTransformList(nsIContent* aDefault)
 {
-  SVGAnimatedTransformList *thisTransformList =
+  nsSVGAnimatedTransformList *thisTransformList =
     static_cast<dom::SVGGradientElement*>(mContent)->GetAnimatedTransformList();
 
   if (thisTransformList && thisTransformList->IsExplicitlySet())
     return thisTransformList;
 
   AutoGradientReferencer gradientRef(this);
 
   nsSVGGradientFrame *next = GetReferencedGradientIfNotInUse();
@@ -196,17 +196,17 @@ nsSVGGradientFrame::GetGradientTransform
     // objectBoundingBox is the default anyway
 
     gfxRect bbox =
       aOverrideBounds ? *aOverrideBounds : nsSVGUtils::GetBBox(aSource);
     bboxMatrix =
       gfxMatrix(bbox.Width(), 0, 0, bbox.Height(), bbox.X(), bbox.Y());
   }
 
-  const SVGAnimatedTransformList* animTransformList =
+  const nsSVGAnimatedTransformList* animTransformList =
     GetGradientTransformList(mContent);
   if (!animTransformList)
     return bboxMatrix;
 
   gfxMatrix gradientTransform =
     animTransformList->GetAnimValue().GetConsolidationMatrix();
   return bboxMatrix.PreMultiply(gradientTransform);
 }
--- a/layout/svg/nsSVGGradientFrame.h
+++ b/layout/svg/nsSVGGradientFrame.h
@@ -17,17 +17,17 @@ class nsIAtom;
 class nsIContent;
 class nsIFrame;
 class nsIPresShell;
 class nsStyleContext;
 
 struct gfxRect;
 
 namespace mozilla {
-class SVGAnimatedTransformList;
+class nsSVGAnimatedTransformList;
 
 namespace dom {
 class SVGLinearGradientElement;
 class SVGRadialGradientElement;
 } // namespace dom
 } // namespace mozilla
 
 typedef nsSVGPaintServerFrame nsSVGGradientFrameBase;
@@ -74,17 +74,17 @@ private:
   nsSVGGradientFrame* GetReferencedGradient();
 
   // Optionally get a stop frame (returns stop index/count)
   int32_t GetStopFrame(int32_t aIndex, nsIFrame * *aStopFrame);
 
   void GetStopInformation(int32_t aIndex,
                           float *aOffset, nscolor *aColor, float *aStopOpacity);
 
-  const mozilla::SVGAnimatedTransformList* GetGradientTransformList(
+  const mozilla::nsSVGAnimatedTransformList* GetGradientTransformList(
     nsIContent* aDefault);
   // Will be singular for gradientUnits="objectBoundingBox" with an empty bbox.
   gfxMatrix GetGradientTransform(nsIFrame *aSource,
                                  const gfxRect *aOverrideBounds);
 
 protected:
   uint32_t GetStopCount();
   virtual bool IsSingleColour(uint32_t nStops) = 0;
--- a/layout/svg/nsSVGPatternFrame.cpp
+++ b/layout/svg/nsSVGPatternFrame.cpp
@@ -15,17 +15,17 @@
 #include "nsGkAtoms.h"
 #include "nsISVGChildFrame.h"
 #include "nsRenderingContext.h"
 #include "nsStyleContext.h"
 #include "nsSVGEffects.h"
 #include "nsSVGGeometryFrame.h"
 #include "mozilla/dom/SVGPatternElement.h"
 #include "nsSVGUtils.h"
-#include "SVGAnimatedTransformList.h"
+#include "nsSVGAnimatedTransformList.h"
 #include "SVGContentUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 //----------------------------------------------------------------------
 // Helper classes
 
@@ -438,36 +438,36 @@ nsSVGPatternFrame::GetEnumValue(uint32_t
   AutoPatternReferencer patternRef(this);
 
   nsSVGPatternFrame *next = GetReferencedPatternIfNotInUse();
   return next ? next->GetEnumValue(aIndex, aDefault) :
     static_cast<SVGPatternElement *>(aDefault)->
       mEnumAttributes[aIndex].GetAnimValue();
 }
 
-SVGAnimatedTransformList*
+nsSVGAnimatedTransformList*
 nsSVGPatternFrame::GetPatternTransformList(nsIContent* aDefault)
 {
-  SVGAnimatedTransformList *thisTransformList =
+  nsSVGAnimatedTransformList *thisTransformList =
     static_cast<SVGPatternElement *>(mContent)->GetAnimatedTransformList();
 
   if (thisTransformList && thisTransformList->IsExplicitlySet())
     return thisTransformList;
 
   AutoPatternReferencer patternRef(this);
 
   nsSVGPatternFrame *next = GetReferencedPatternIfNotInUse();
   return next ? next->GetPatternTransformList(aDefault) :
     static_cast<SVGPatternElement *>(aDefault)->mPatternTransform.get();
 }
 
 gfxMatrix
 nsSVGPatternFrame::GetPatternTransform()
 {
-  SVGAnimatedTransformList* animTransformList =
+  nsSVGAnimatedTransformList* animTransformList =
     GetPatternTransformList(mContent);
   if (!animTransformList)
     return gfxMatrix();
 
   return animTransformList->GetAnimValue().GetConsolidationMatrix();
 }
 
 const nsSVGViewBox &
--- a/layout/svg/nsSVGPatternFrame.h
+++ b/layout/svg/nsSVGPatternFrame.h
@@ -13,17 +13,17 @@ class gfxASurface;
 class gfxContext;
 class nsIFrame;
 class nsSVGElement;
 class nsSVGLength2;
 class nsSVGViewBox;
 
 namespace mozilla {
 class SVGAnimatedPreserveAspectRatio;
-class SVGAnimatedTransformList;
+class nsSVGAnimatedTransformList;
 } // namespace mozilla
 
 typedef nsSVGPaintServerFrame  nsSVGPatternFrameBase;
 
 /**
  * Patterns can refer to other patterns. We create an nsSVGPaintingProperty
  * with property type nsGkAtoms::href to track the referenced pattern.
  */
@@ -85,17 +85,17 @@ protected:
   nsSVGPatternFrame* GetReferencedPatternIfNotInUse();
 
   // Accessors to lookup pattern attributes
   uint16_t GetEnumValue(uint32_t aIndex, nsIContent *aDefault);
   uint16_t GetEnumValue(uint32_t aIndex)
   {
     return GetEnumValue(aIndex, mContent);
   }
-  mozilla::SVGAnimatedTransformList* GetPatternTransformList(
+  mozilla::nsSVGAnimatedTransformList* GetPatternTransformList(
       nsIContent* aDefault);
   gfxMatrix GetPatternTransform();
   const nsSVGViewBox &GetViewBox(nsIContent *aDefault);
   const nsSVGViewBox &GetViewBox() { return GetViewBox(mContent); }
   const SVGAnimatedPreserveAspectRatio &GetPreserveAspectRatio(
       nsIContent *aDefault);
   const SVGAnimatedPreserveAspectRatio &GetPreserveAspectRatio()
   {