Bug 846995 Part 3: Rename DOMSVGAnimatedTransformList and kill nsISupports r=jwatt
authorDavid Zbarsky <dzbarsky@gmail.com>
Sun, 14 Apr 2013 18:56:34 -0400
changeset 128738 46906005efc8d7ba015a3f623b52045e930da173
parent 128737 218392354af18c61e0e743ac5cfcc03663230509
child 128739 d31055321344354a39889eccb54a95206ece6fcb
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjwatt
bugs846995
milestone23.0a1
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/DOMSVGTransformList.h
content/svg/content/src/SVGAnimatedTransformList.cpp
content/svg/content/src/SVGAnimatedTransformList.h
content/svg/content/src/SVGFragmentIdentifier.cpp
content/svg/content/src/SVGPatternElement.h
dom/bindings/Bindings.conf
layout/svg/nsSVGContainerFrame.cpp
layout/svg/nsSVGForeignObjectFrame.cpp
layout/svg/nsSVGGradientFrame.cpp
layout/svg/nsSVGGradientFrame.h
layout/svg/nsSVGPathGeometryFrame.cpp
layout/svg/nsSVGPatternFrame.cpp
layout/svg/nsSVGPatternFrame.h
--- a/content/svg/content/src/DOMSVGTransformList.h
+++ b/content/svg/content/src/DOMSVGTransformList.h
@@ -26,28 +26,28 @@ class SVGTransform;
 }
 
 /**
  * Class DOMSVGTransformList
  *
  * This class is used to create the DOM tearoff objects that wrap internal
  * SVGTransformList objects.
  *
- * See the architecture comment in DOMSVGAnimatedTransformList.h.
+ * See the architecture comment in SVGAnimatedTransformList.h.
  */
 class DOMSVGTransformList MOZ_FINAL : public nsISupports,
                                       public nsWrapperCache
 {
   friend class dom::SVGTransform;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGTransformList)
 
-  DOMSVGTransformList(DOMSVGAnimatedTransformList *aAList,
+  DOMSVGTransformList(dom::SVGAnimatedTransformList *aAList,
                       const SVGTransformList &aInternalList)
     : mAList(aAList)
   {
     SetIsDOMBinding();
 
     // aInternalList must be passed in explicitly because we can't use
     // InternalList() here. (Because it depends on IsAnimValList, which depends
     // on this object having been assigned to aAList's mBaseVal or mAnimVal,
@@ -155,14 +155,14 @@ private:
 
   void MaybeInsertNullInAnimValListAt(uint32_t aIndex);
   void MaybeRemoveItemFromAnimValListAt(uint32_t aIndex);
 
   // Weak refs to our SVGTransform items. The items are friends and take care
   // of clearing our pointer to them when they die.
   FallibleTArray<dom::SVGTransform*> mItems;
 
-  nsRefPtr<DOMSVGAnimatedTransformList> mAList;
+  nsRefPtr<dom::SVGAnimatedTransformList> mAList;
 };
 
 } // namespace mozilla
 
 #endif // MOZILLA_DOMSVGTRANSFORMLIST_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;
+  friend class mozilla::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
@@ -1,17 +1,17 @@
 /* -*- 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 "SVGFragmentIdentifier.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "mozilla/dom/SVGViewElement.h"
-#include "SVGAnimatedTransformList.h"
+#include "nsSVGAnimatedTransformList.h"
 
 using namespace mozilla;
 
 static bool
 IsMatchingParameter(const nsAString &aString, const nsAString &aParameterName)
 {
   // The first two tests ensure aString.Length() > aParameterName.Length()
   // so it's then safe to do the third test
@@ -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.h
+++ b/content/svg/content/src/SVGPatternElement.h
@@ -7,27 +7,26 @@
 #define mozilla_dom_SVGPatternElement_h
 
 #include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
 #include "nsSVGElement.h"
 #include "nsSVGViewBox.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
-#include "SVGAnimatedTransformList.h"
+#include "nsSVGAnimatedTransformList.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
 {
   friend class ::nsSVGPatternFrame;
 
 protected:
@@ -42,28 +41,28 @@ public:
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const;
 
-  virtual mozilla::SVGAnimatedTransformList*
+  virtual mozilla::nsSVGAnimatedTransformList*
     GetAnimatedTransformList(uint32_t aFlags = 0);
   virtual nsIAtom* GetTransformListAttrName() const {
     return nsGkAtoms::patternTransform;
   }
 
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedRect> ViewBox();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> PatternUnits();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> PatternContentUnits();
-  already_AddRefed<DOMSVGAnimatedTransformList> PatternTransform();
+  already_AddRefed<SVGAnimatedTransformList> PatternTransform();
   already_AddRefed<SVGAnimatedLength> X();
   already_AddRefed<SVGAnimatedLength> Y();
   already_AddRefed<SVGAnimatedLength> Width();
   already_AddRefed<SVGAnimatedLength> Height();
   already_AddRefed<nsIDOMSVGAnimatedString> Href();
 
 protected:
 
@@ -76,17 +75,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<mozilla::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
@@ -735,17 +735,17 @@ DOMInterfaces = {
 },
 
 'SVGAnimatedPreserveAspectRatio': {
     'nativeType': 'mozilla::dom::DOMSVGAnimatedPreserveAspectRatio',
     'headerFile': 'SVGAnimatedPreserveAspectRatio.h'
 },
 
 'SVGAnimatedTransformList': {
- #   'nativeOwnership': 'refcounted',
+    'nativeOwnership': 'refcounted',
 },
 
 'SVGAnimationElement': {
     'resultNotAddRefed': ['targetElement'],
     'concrete': False
 },
 
 'SVGComponentTransferFunctionElement': {
--- a/layout/svg/nsSVGContainerFrame.cpp
+++ b/layout/svg/nsSVGContainerFrame.cpp
@@ -5,17 +5,17 @@
 
 // Main header first:
 #include "nsSVGContainerFrame.h"
 
 // Keep others in (case-insensitive) order:
 #include "nsSVGEffects.h"
 #include "nsSVGElement.h"
 #include "nsSVGUtils.h"
-#include "SVGAnimatedTransformList.h"
+#include "nsSVGAnimatedTransformList.h"
 
 using namespace mozilla;
 
 NS_QUERYFRAME_HEAD(nsSVGContainerFrame)
   NS_QUERYFRAME_ENTRY(nsSVGContainerFrame)
 NS_QUERYFRAME_TAIL_INHERITING(nsSVGContainerFrameBase)
 
 NS_QUERYFRAME_HEAD(nsSVGDisplayContainerFrame)
@@ -174,17 +174,17 @@ nsSVGDisplayContainerFrame::IsSVGTransfo
   if (parent &&
       parent->IsFrameOfType(nsIFrame::eSVG | nsIFrame::eSVGContainer)) {
     foundTransform = static_cast<nsSVGContainerFrame*>(parent)->
                        HasChildrenOnlyTransform(aFromParentTransform);
   }
 
   if (mContent->IsSVG()) {
     nsSVGElement *content = static_cast<nsSVGElement*>(mContent);
-    SVGAnimatedTransformList* transformList =
+    nsSVGAnimatedTransformList* transformList =
       content->GetAnimatedTransformList();
     if ((transformList && transformList->HasTransform()) ||
         content->GetAnimateMotionTransform()) {
       if (aOwnTransform) {
         *aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(),
                                     nsSVGElement::eUserSpaceToParent);
       }
       foundTransform = true;
--- a/layout/svg/nsSVGForeignObjectFrame.cpp
+++ b/layout/svg/nsSVGForeignObjectFrame.cpp
@@ -187,17 +187,17 @@ nsSVGForeignObjectFrame::IsSVGTransforme
   nsIFrame *parent = GetParent();
   if (parent &&
       parent->IsFrameOfType(nsIFrame::eSVG | nsIFrame::eSVGContainer)) {
     foundTransform = static_cast<nsSVGContainerFrame*>(parent)->
                        HasChildrenOnlyTransform(aFromParentTransform);
   }
 
   nsSVGElement *content = static_cast<nsSVGElement*>(mContent);
-  SVGAnimatedTransformList* transformList =
+  nsSVGAnimatedTransformList* transformList =
     content->GetAnimatedTransformList();
   if (transformList && transformList->HasTransform()) {
     if (aOwnTransform) {
       *aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(),
                                   nsSVGElement::eUserSpaceToParent);
     }
     foundTransform = true;
   }
--- 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/nsSVGPathGeometryFrame.cpp
+++ b/layout/svg/nsSVGPathGeometryFrame.cpp
@@ -147,17 +147,17 @@ nsSVGPathGeometryFrame::IsSVGTransformed
   nsIFrame *parent = GetParent();
   if (parent &&
       parent->IsFrameOfType(nsIFrame::eSVG | nsIFrame::eSVGContainer)) {
     foundTransform = static_cast<nsSVGContainerFrame*>(parent)->
                        HasChildrenOnlyTransform(aFromParentTransform);
   }
 
   nsSVGElement *content = static_cast<nsSVGElement*>(mContent);
-  SVGAnimatedTransformList* transformList =
+  nsSVGAnimatedTransformList* transformList =
     content->GetAnimatedTransformList();
   if ((transformList && transformList->HasTransform()) ||
       content->GetAnimateMotionTransform()) {
     if (aOwnTransform) {
       *aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(),
                                   nsSVGElement::eUserSpaceToParent);
     }
     foundTransform = true;
--- 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()
   {