Bug 1516551 - Part 2 rename nsSVGTransform to SVGTransform r=dholbert
authorlongsonr <longsonr@gmail.com>
Sat, 29 Dec 2018 09:15:40 +0000
changeset 509203 cf6fac6a26ddb51000d3ddbf738e5bb173788220
parent 509201 72e9464d44ab1bbf28ddf419fa08407526cd930f
child 509204 b136d859d516b0c85942cc933219882ae70444ab
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1516551
milestone66.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 1516551 - Part 2 rename nsSVGTransform to SVGTransform r=dholbert
dom/svg/DOMSVGTransform.cpp
dom/svg/DOMSVGTransform.h
dom/svg/SVGAnimatedTransformList.cpp
dom/svg/SVGTransform.cpp
dom/svg/SVGTransform.h
dom/svg/SVGTransformList.cpp
dom/svg/SVGTransformList.h
dom/svg/SVGTransformListParser.cpp
dom/svg/SVGTransformListParser.h
dom/svg/SVGTransformListSMILType.cpp
dom/svg/SVGTransformListSMILType.h
dom/svg/SVGViewportElement.h
dom/svg/moz.build
dom/svg/nsSVGTransform.cpp
dom/svg/nsSVGTransform.h
dom/svg/test/test_SVGxxxList.xhtml
--- a/dom/svg/DOMSVGTransform.cpp
+++ b/dom/svg/DOMSVGTransform.cpp
@@ -112,32 +112,32 @@ DOMSVGTransform::DOMSVGTransform(DOMSVGT
 
   MOZ_ASSERT(IndexIsValid(), "Bad index for DOMSVGNumber!");
 }
 
 DOMSVGTransform::DOMSVGTransform()
     : mList(nullptr),
       mListIndex(0),
       mIsAnimValItem(false),
-      mTransform(new nsSVGTransform())  // Default ctor for objects not in a
-                                        // list initialises to matrix type with
-                                        // identity matrix
+      mTransform(new SVGTransform())  // Default ctor for objects not in a
+                                      // list initialises to matrix type with
+                                      // identity matrix
 {}
 
 DOMSVGTransform::DOMSVGTransform(const gfxMatrix& aMatrix)
     : mList(nullptr),
       mListIndex(0),
       mIsAnimValItem(false),
-      mTransform(new nsSVGTransform(aMatrix)) {}
+      mTransform(new SVGTransform(aMatrix)) {}
 
-DOMSVGTransform::DOMSVGTransform(const nsSVGTransform& aTransform)
+DOMSVGTransform::DOMSVGTransform(const SVGTransform& aTransform)
     : mList(nullptr),
       mListIndex(0),
       mIsAnimValItem(false),
-      mTransform(new nsSVGTransform(aTransform)) {}
+      mTransform(new SVGTransform(aTransform)) {}
 
 DOMSVGTransform::~DOMSVGTransform() {
   SVGMatrix* matrix = SVGMatrixTearoffTable().GetTearoff(this);
   if (matrix) {
     SVGMatrixTearoffTable().RemoveTearoff(this);
     NS_RELEASE(matrix);
   }
   // Our mList's weak ref to us must be nulled out when we die. If GC has
@@ -274,28 +274,28 @@ void DOMSVGTransform::InsertingIntoList(
 
   MOZ_ASSERT(IndexIsValid(), "Bad index for DOMSVGLength!");
 }
 
 void DOMSVGTransform::RemovingFromList() {
   MOZ_ASSERT(!mTransform,
              "Item in list also has another non-list value associated with it");
 
-  mTransform = new nsSVGTransform(InternalItem());
+  mTransform = new SVGTransform(InternalItem());
   mList = nullptr;
   mIsAnimValItem = false;
 }
 
-nsSVGTransform& DOMSVGTransform::InternalItem() {
+SVGTransform& DOMSVGTransform::InternalItem() {
   SVGAnimatedTransformList* alist = Element()->GetAnimatedTransformList();
   return mIsAnimValItem && alist->mAnimVal ? (*alist->mAnimVal)[mListIndex]
                                            : alist->mBaseVal[mListIndex];
 }
 
-const nsSVGTransform& DOMSVGTransform::InternalItem() const {
+const SVGTransform& DOMSVGTransform::InternalItem() const {
   return const_cast<DOMSVGTransform*>(this)->InternalItem();
 }
 
 #ifdef DEBUG
 bool DOMSVGTransform::IndexIsValid() {
   SVGAnimatedTransformList* alist = Element()->GetAnimatedTransformList();
   return (mIsAnimValItem && mListIndex < alist->GetAnimValue().Length()) ||
          (!mIsAnimValItem && mListIndex < alist->GetBaseValue().Length());
@@ -304,17 +304,17 @@ bool DOMSVGTransform::IndexIsValid() {
 
 //----------------------------------------------------------------------
 // Interface for SVGMatrix's use
 
 void DOMSVGTransform::SetMatrix(const gfxMatrix& aMatrix) {
   MOZ_ASSERT(!mIsAnimValItem, "Attempting to modify read-only transform");
 
   if (Transform().Type() == SVG_TRANSFORM_MATRIX &&
-      nsSVGTransform::MatricesEqual(Matrixgfx(), aMatrix)) {
+      SVGTransform::MatricesEqual(Matrixgfx(), aMatrix)) {
     return;
   }
 
   AutoChangeTransformNotifier notifier(this);
   Transform().SetMatrix(aMatrix);
 }
 
 }  // namespace dom
--- a/dom/svg/DOMSVGTransform.h
+++ b/dom/svg/DOMSVGTransform.h
@@ -8,17 +8,17 @@
 #define mozilla_dom_SVGTransform_h
 
 #include "DOMSVGTransformList.h"
 #include "gfxMatrix.h"
 #include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDebug.h"
 #include "nsID.h"
-#include "nsSVGTransform.h"
+#include "SVGTransform.h"
 #include "nsWrapperCache.h"
 #include "mozilla/Attributes.h"
 
 #define MOZ_SVG_LIST_INDEX_BIT_COUNT 31  // supports > 2 billion list items
 
 namespace mozilla {
 namespace dom {
 
@@ -49,17 +49,17 @@ class DOMSVGTransform final : public nsW
    * which do not initially belong to an attribute.
    */
   explicit DOMSVGTransform();
   explicit DOMSVGTransform(const gfxMatrix& aMatrix);
 
   /**
    * Ctor for creating an unowned copy. Used with Clone().
    */
-  explicit DOMSVGTransform(const nsSVGTransform& aMatrix);
+  explicit DOMSVGTransform(const SVGTransform& aMatrix);
 
   /**
    * Create an unowned copy of an owned transform. The caller is responsible for
    * the first AddRef().
    */
   DOMSVGTransform* Clone() {
     NS_ASSERTION(mList, "unexpected caller");
     return new DOMSVGTransform(InternalItem());
@@ -96,17 +96,17 @@ class DOMSVGTransform final : public nsW
   /**
    * This method is called to notify this DOM object that it is about to be
    * removed from its current DOM list so that it can first make a copy of its
    * internal counterpart's values. (If it didn't do this, then it would
    * "lose" its value on being removed.)
    */
   void RemovingFromList();
 
-  nsSVGTransform ToSVGTransform() const { return Transform(); }
+  SVGTransform ToSVGTransform() const { return Transform(); }
 
   // WebIDL
   DOMSVGTransformList* GetParentObject() const { return mList; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
   uint16_t Type() const;
   dom::SVGMatrix* GetMatrix();
   float Angle() const;
@@ -125,49 +125,49 @@ class DOMSVGTransform final : public nsW
   bool IsAnimVal() const { return mIsAnimValItem; }
   const gfxMatrix& Matrixgfx() const { return Transform().GetMatrix(); }
   void SetMatrix(const gfxMatrix& aMatrix);
 
  private:
   SVGElement* Element() { return mList->Element(); }
 
   /**
-   * Get a reference to the internal nsSVGTransform list item that this DOM
+   * Get a reference to the internal SVGTransform list item that this DOM
    * wrapper object currently wraps.
    */
-  nsSVGTransform& InternalItem();
-  const nsSVGTransform& InternalItem() const;
+  SVGTransform& InternalItem();
+  const SVGTransform& InternalItem() const;
 
 #ifdef DEBUG
   bool IndexIsValid();
 #endif
 
-  const nsSVGTransform& Transform() const {
+  const SVGTransform& Transform() const {
     return HasOwner() ? InternalItem() : *mTransform;
   }
-  nsSVGTransform& Transform() {
+  SVGTransform& Transform() {
     return HasOwner() ? InternalItem() : *mTransform;
   }
 
   RefPtr<DOMSVGTransformList> mList;
 
   // Bounds for the following are checked in the ctor, so be sure to update
   // that if you change the capacity of any of the following.
 
   uint32_t mListIndex : MOZ_SVG_LIST_INDEX_BIT_COUNT;
   uint32_t mIsAnimValItem : 1;
 
-  // Usually this class acts as a wrapper for an nsSVGTransform object which is
+  // Usually this class acts as a wrapper for an SVGTransform object which is
   // part of a list and is accessed by going via the owning Element.
   //
   // However, in some circumstances, objects of this class may not be associated
-  // with any particular list and thus, no internal nsSVGTransform object. In
-  // that case we allocate an nsSVGTransform object on the heap to store the
+  // with any particular list and thus, no internal SVGTransform object. In
+  // that case we allocate an SVGTransform object on the heap to store the
   // data.
-  nsAutoPtr<nsSVGTransform> mTransform;
+  nsAutoPtr<SVGTransform> mTransform;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #undef MOZ_SVG_LIST_INDEX_BIT_COUNT
 
 #endif  // mozilla_dom_SVGTransform_h
--- a/dom/svg/SVGAnimatedTransformList.cpp
+++ b/dom/svg/SVGAnimatedTransformList.cpp
@@ -8,17 +8,17 @@
 
 #include "mozilla/dom/MutationEventBinding.h"
 #include "mozilla/dom/SVGAnimationElement.h"
 #include "mozilla/Move.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "DOMSVGAnimatedTransformList.h"
 #include "SVGContentUtils.h"
 #include "nsSMILValue.h"
-#include "nsSVGTransform.h"
+#include "SVGTransform.h"
 #include "SVGTransformListSMILType.h"
 
 using namespace mozilla::dom;
 using namespace mozilla::dom::SVGTransform_Binding;
 
 namespace mozilla {
 
 nsresult SVGAnimatedTransformList::SetBaseValueString(const nsAString& aValue,
rename from dom/svg/nsSVGTransform.cpp
rename to dom/svg/SVGTransform.cpp
--- a/dom/svg/nsSVGTransform.cpp
+++ b/dom/svg/SVGTransform.cpp
@@ -1,29 +1,29 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "nsSVGTransform.h"
+#include "SVGTransform.h"
 
 #include "nsError.h"
 #include "nsContentUtils.h"  // for NS_ENSURE_FINITE
 #include "nsTextFormatter.h"
 
 namespace {
 const double kRadPerDegree = 2.0 * M_PI / 360.0;
 }  // namespace
 
 namespace mozilla {
 
 using namespace dom::SVGTransform_Binding;
 
-void nsSVGTransform::GetValueAsString(nsAString& aValue) const {
+void SVGTransform::GetValueAsString(nsAString& aValue) const {
   switch (mType) {
     case SVG_TRANSFORM_TRANSLATE:
       // The spec say that if Y is not provided, it is assumed to be zero.
       if (mMatrix._32 != 0)
         nsTextFormatter::ssprintf(aValue, u"translate(%g, %g)", mMatrix._31,
                                   mMatrix._32);
       else
         nsTextFormatter::ssprintf(aValue, u"translate(%g)", mMatrix._31);
@@ -55,79 +55,79 @@ void nsSVGTransform::GetValueAsString(ns
       break;
     default:
       aValue.Truncate();
       NS_ERROR("unknown transformation type");
       break;
   }
 }
 
-void nsSVGTransform::SetMatrix(const gfxMatrix& aMatrix) {
+void SVGTransform::SetMatrix(const gfxMatrix& aMatrix) {
   mType = SVG_TRANSFORM_MATRIX;
   mMatrix = aMatrix;
   // We set the other members here too, since operator== requires it and
   // the DOM requires it for mAngle.
   mAngle = 0.f;
   mOriginX = 0.f;
   mOriginY = 0.f;
 }
 
-void nsSVGTransform::SetTranslate(float aTx, float aTy) {
+void SVGTransform::SetTranslate(float aTx, float aTy) {
   mType = SVG_TRANSFORM_TRANSLATE;
   mMatrix = gfxMatrix::Translation(aTx, aTy);
   mAngle = 0.f;
   mOriginX = 0.f;
   mOriginY = 0.f;
 }
 
-void nsSVGTransform::SetScale(float aSx, float aSy) {
+void SVGTransform::SetScale(float aSx, float aSy) {
   mType = SVG_TRANSFORM_SCALE;
   mMatrix = gfxMatrix::Scaling(aSx, aSy);
   mAngle = 0.f;
   mOriginX = 0.f;
   mOriginY = 0.f;
 }
 
-void nsSVGTransform::SetRotate(float aAngle, float aCx, float aCy) {
+void SVGTransform::SetRotate(float aAngle, float aCx, float aCy) {
   mType = SVG_TRANSFORM_ROTATE;
   mMatrix = gfxMatrix::Translation(aCx, aCy)
                 .PreRotate(aAngle * kRadPerDegree)
                 .PreTranslate(-aCx, -aCy);
   mAngle = aAngle;
   mOriginX = aCx;
   mOriginY = aCy;
 }
 
-nsresult nsSVGTransform::SetSkewX(float aAngle) {
+nsresult SVGTransform::SetSkewX(float aAngle) {
   double ta = tan(aAngle * kRadPerDegree);
   NS_ENSURE_FINITE(ta, NS_ERROR_RANGE_ERR);
 
   mType = SVG_TRANSFORM_SKEWX;
   mMatrix = gfxMatrix();
   mMatrix._21 = ta;
   mAngle = aAngle;
   mOriginX = 0.f;
   mOriginY = 0.f;
   return NS_OK;
 }
 
-nsresult nsSVGTransform::SetSkewY(float aAngle) {
+nsresult SVGTransform::SetSkewY(float aAngle) {
   double ta = tan(aAngle * kRadPerDegree);
   NS_ENSURE_FINITE(ta, NS_ERROR_RANGE_ERR);
 
   mType = SVG_TRANSFORM_SKEWY;
   mMatrix = gfxMatrix();
   mMatrix._12 = ta;
   mAngle = aAngle;
   mOriginX = 0.f;
   mOriginY = 0.f;
   return NS_OK;
 }
 
-SVGTransformSMILData::SVGTransformSMILData(const nsSVGTransform& aTransform)
+SVGTransformSMILData::SVGTransformSMILData(const SVGTransform& aTransform)
     : mTransformType(aTransform.Type()) {
   MOZ_ASSERT(mTransformType >= SVG_TRANSFORM_MATRIX &&
                  mTransformType <= SVG_TRANSFORM_SKEWY,
              "Unexpected transform type");
 
   for (uint32_t i = 0; i < NUM_STORED_PARAMS; ++i) {
     mParams[i] = 0.f;
   }
@@ -166,18 +166,18 @@ SVGTransformSMILData::SVGTransformSMILDa
       break;
 
     default:
       MOZ_ASSERT_UNREACHABLE("Unexpected transform type");
       break;
   }
 }
 
-nsSVGTransform SVGTransformSMILData::ToSVGTransform() const {
-  nsSVGTransform result;
+SVGTransform SVGTransformSMILData::ToSVGTransform() const {
+  SVGTransform result;
 
   switch (mTransformType) {
     case SVG_TRANSFORM_MATRIX:
       result.SetMatrix(gfxMatrix(mParams[0], mParams[1], mParams[2], mParams[3],
                                  mParams[4], mParams[5]));
       break;
 
     case SVG_TRANSFORM_TRANSLATE:
rename from dom/svg/nsSVGTransform.h
rename to dom/svg/SVGTransform.h
--- a/dom/svg/nsSVGTransform.h
+++ b/dom/svg/SVGTransform.h
@@ -12,35 +12,35 @@
 #include "mozilla/gfx/Matrix.h"
 #include "nsDebug.h"
 
 namespace mozilla {
 
 /*
  * The DOM wrapper class for this class is DOMSVGTransform.
  */
-class nsSVGTransform {
+class SVGTransform {
  public:
   // Default ctor initialises to matrix type with identity matrix
-  nsSVGTransform()
+  SVGTransform()
       : mMatrix()  // Initialises to identity
         ,
         mAngle(0.f),
         mOriginX(0.f),
         mOriginY(0.f),
         mType(dom::SVGTransform_Binding::SVG_TRANSFORM_MATRIX) {}
 
-  explicit nsSVGTransform(const gfxMatrix& aMatrix)
+  explicit SVGTransform(const gfxMatrix& aMatrix)
       : mMatrix(aMatrix),
         mAngle(0.f),
         mOriginX(0.f),
         mOriginY(0.f),
         mType(dom::SVGTransform_Binding::SVG_TRANSFORM_MATRIX) {}
 
-  bool operator==(const nsSVGTransform& rhs) const {
+  bool operator==(const SVGTransform& rhs) const {
     return mType == rhs.mType && MatricesEqual(mMatrix, rhs.mMatrix) &&
            mAngle == rhs.mAngle && mOriginX == rhs.mOriginX &&
            mOriginY == rhs.mOriginY;
   }
 
   void GetValueAsString(nsAString& aValue) const;
 
   float Angle() const { return mAngle; }
@@ -65,17 +65,17 @@ class nsSVGTransform {
 
  protected:
   gfxMatrix mMatrix;
   float mAngle, mOriginX, mOriginY;
   uint16_t mType;
 };
 
 /*
- * A slightly more light-weight version of nsSVGTransform for SMIL animation.
+ * A slightly more light-weight version of SVGTransform for SMIL animation.
  *
  * Storing the parameters in an array (rather than a matrix) also allows simpler
  * (transform type-agnostic) interpolation and addition.
  *
  * The meaning of the mParams array depends on the transform type as follows:
  *
  * Type                | mParams[0], mParams[1], mParams[2], ...
  * --------------------+-----------------------------------------
@@ -119,19 +119,19 @@ class SVGTransformSMILData {
     for (uint32_t i = 0; i < NUM_SIMPLE_PARAMS; ++i) {
       mParams[i] = aParams[i];
     }
     for (uint32_t i = NUM_SIMPLE_PARAMS; i < NUM_STORED_PARAMS; ++i) {
       mParams[i] = 0.f;
     }
   }
 
-  // Conversion to/from a fully-fledged nsSVGTransform
-  explicit SVGTransformSMILData(const nsSVGTransform& aTransform);
-  nsSVGTransform ToSVGTransform() const;
+  // Conversion to/from a fully-fledged SVGTransform
+  explicit SVGTransformSMILData(const SVGTransform& aTransform);
+  SVGTransform ToSVGTransform() const;
 
   bool operator==(const SVGTransformSMILData& aOther) const {
     if (mTransformType != aOther.mTransformType) return false;
 
     for (uint32_t i = 0; i < NUM_STORED_PARAMS; ++i) {
       if (mParams[i] != aOther.mParams[i]) {
         return false;
       }
--- a/dom/svg/SVGTransformList.cpp
+++ b/dom/svg/SVGTransformList.cpp
@@ -30,17 +30,17 @@ gfxMatrix SVGTransformList::GetConsolida
   return result;
 }
 
 nsresult SVGTransformList::CopyFrom(const SVGTransformList& rhs) {
   return CopyFrom(rhs.mItems);
 }
 
 nsresult SVGTransformList::CopyFrom(
-    const nsTArray<nsSVGTransform>& aTransformArray) {
+    const nsTArray<SVGTransform>& aTransformArray) {
   if (!mItems.Assign(aTransformArray, fallible)) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
   return NS_OK;
 }
 
 void SVGTransformList::GetValueAsString(nsAString& aValue) const {
   aValue.Truncate();
--- a/dom/svg/SVGTransformList.h
+++ b/dom/svg/SVGTransformList.h
@@ -3,17 +3,17 @@
 /* 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_SVGTRANSFORMLIST_H__
 #define MOZILLA_SVGTRANSFORMLIST_H__
 
 #include "gfxMatrix.h"
-#include "nsSVGTransform.h"
+#include "SVGTransform.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 
 namespace dom {
 class DOMSVGTransform;
 }  // namespace dom
 
@@ -40,17 +40,17 @@ class SVGTransformList {
 
   /// This may return an incomplete string on OOM, but that's acceptable.
   void GetValueAsString(nsAString& aValue) const;
 
   bool IsEmpty() const { return mItems.IsEmpty(); }
 
   uint32_t Length() const { return mItems.Length(); }
 
-  const nsSVGTransform& operator[](uint32_t aIndex) const {
+  const SVGTransform& operator[](uint32_t aIndex) const {
     return mItems[aIndex];
   }
 
   bool operator==(const SVGTransformList& rhs) const {
     return mItems == rhs.mItems;
   }
 
   bool SetCapacity(uint32_t size) { return mItems.SetCapacity(size, fallible); }
@@ -67,19 +67,19 @@ class SVGTransformList {
   // it can take care of keeping DOM wrappers in sync.
 
  protected:
   /**
    * These may fail on OOM if the internal capacity needs to be increased, in
    * which case the list will be left unmodified.
    */
   nsresult CopyFrom(const SVGTransformList& rhs);
-  nsresult CopyFrom(const nsTArray<nsSVGTransform>& aTransformArray);
+  nsresult CopyFrom(const nsTArray<SVGTransform>& aTransformArray);
 
-  nsSVGTransform& operator[](uint32_t aIndex) { return mItems[aIndex]; }
+  SVGTransform& operator[](uint32_t aIndex) { return mItems[aIndex]; }
 
   /**
    * This may fail (return false) on OOM if the internal capacity is being
    * increased, in which case the list will be left unmodified.
    */
   bool SetLength(uint32_t aNumberOfItems) {
     return mItems.SetLength(aNumberOfItems, fallible);
   }
@@ -88,43 +88,43 @@ class SVGTransformList {
   // Marking the following private only serves to show which methods are only
   // used by our friend classes (as opposed to our subclasses) - it doesn't
   // really provide additional safety.
 
   nsresult SetValueFromString(const nsAString& aValue);
 
   void Clear() { mItems.Clear(); }
 
-  bool InsertItem(uint32_t aIndex, const nsSVGTransform& aTransform) {
+  bool InsertItem(uint32_t aIndex, const SVGTransform& aTransform) {
     if (aIndex >= mItems.Length()) {
       aIndex = mItems.Length();
     }
     return !!mItems.InsertElementAt(aIndex, aTransform, fallible);
   }
 
-  void ReplaceItem(uint32_t aIndex, const nsSVGTransform& aTransform) {
+  void ReplaceItem(uint32_t aIndex, const SVGTransform& aTransform) {
     MOZ_ASSERT(aIndex < mItems.Length(),
                "DOM wrapper caller should have raised INDEX_SIZE_ERR");
     mItems[aIndex] = aTransform;
   }
 
   void RemoveItem(uint32_t aIndex) {
     MOZ_ASSERT(aIndex < mItems.Length(),
                "DOM wrapper caller should have raised INDEX_SIZE_ERR");
     mItems.RemoveElementAt(aIndex);
   }
 
-  bool AppendItem(const nsSVGTransform& aTransform) {
+  bool AppendItem(const SVGTransform& aTransform) {
     return !!mItems.AppendElement(aTransform, fallible);
   }
 
  protected:
   /*
    * See SVGLengthList for the rationale for using
-   * FallibleTArray<nsSVGTransform> instead of FallibleTArray<nsSVGTransform,
+   * FallibleTArray<SVGTransform> instead of FallibleTArray<SVGTransform,
    * 1>.
    */
-  FallibleTArray<nsSVGTransform> mItems;
+  FallibleTArray<SVGTransform> mItems;
 };
 
 }  // namespace mozilla
 
 #endif  // MOZILLA_SVGTRANSFORMLIST_H__
--- a/dom/svg/SVGTransformListParser.cpp
+++ b/dom/svg/SVGTransformListParser.cpp
@@ -3,17 +3,17 @@
 /* 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 "SVGTransformListParser.h"
 
 #include "mozilla/ArrayUtils.h"
 #include "SVGContentUtils.h"
-#include "nsSVGTransform.h"
+#include "SVGTransform.h"
 #include "nsGkAtoms.h"
 #include "nsAtom.h"
 
 using namespace mozilla;
 
 //----------------------------------------------------------------------
 // private methods
 
@@ -130,17 +130,17 @@ bool SVGTransformListParser::ParseTransl
     return false;
   }
 
   switch (count) {
     case 1:
       t[1] = 0.f;
       MOZ_FALLTHROUGH;
     case 2: {
-      nsSVGTransform* transform = mTransforms.AppendElement(fallible);
+      SVGTransform* transform = mTransforms.AppendElement(fallible);
       if (!transform) {
         return false;
       }
       transform->SetTranslate(t[0], t[1]);
       return true;
     }
   }
 
@@ -155,17 +155,17 @@ bool SVGTransformListParser::ParseScale(
     return false;
   }
 
   switch (count) {
     case 1:
       s[1] = s[0];
       MOZ_FALLTHROUGH;
     case 2: {
-      nsSVGTransform* transform = mTransforms.AppendElement(fallible);
+      SVGTransform* transform = mTransforms.AppendElement(fallible);
       if (!transform) {
         return false;
       }
       transform->SetScale(s[0], s[1]);
       return true;
     }
   }
 
@@ -180,17 +180,17 @@ bool SVGTransformListParser::ParseRotate
     return false;
   }
 
   switch (count) {
     case 1:
       r[1] = r[2] = 0.f;
       MOZ_FALLTHROUGH;
     case 3: {
-      nsSVGTransform* transform = mTransforms.AppendElement(fallible);
+      SVGTransform* transform = mTransforms.AppendElement(fallible);
       if (!transform) {
         return false;
       }
       transform->SetRotate(r[0], r[1], r[2]);
       return true;
     }
   }
 
@@ -200,50 +200,50 @@ bool SVGTransformListParser::ParseRotate
 bool SVGTransformListParser::ParseSkewX() {
   float skew;
   uint32_t count;
 
   if (!ParseArguments(&skew, 1, &count) || count != 1) {
     return false;
   }
 
-  nsSVGTransform* transform = mTransforms.AppendElement(fallible);
+  SVGTransform* transform = mTransforms.AppendElement(fallible);
   if (!transform) {
     return false;
   }
   transform->SetSkewX(skew);
 
   return true;
 }
 
 bool SVGTransformListParser::ParseSkewY() {
   float skew;
   uint32_t count;
 
   if (!ParseArguments(&skew, 1, &count) || count != 1) {
     return false;
   }
 
-  nsSVGTransform* transform = mTransforms.AppendElement(fallible);
+  SVGTransform* transform = mTransforms.AppendElement(fallible);
   if (!transform) {
     return false;
   }
   transform->SetSkewY(skew);
 
   return true;
 }
 
 bool SVGTransformListParser::ParseMatrix() {
   float m[6];
   uint32_t count;
 
   if (!ParseArguments(m, ArrayLength(m), &count) || count != 6) {
     return false;
   }
 
-  nsSVGTransform* transform = mTransforms.AppendElement(fallible);
+  SVGTransform* transform = mTransforms.AppendElement(fallible);
   if (!transform) {
     return false;
   }
   transform->SetMatrix(gfxMatrix(m[0], m[1], m[2], m[3], m[4], m[5]));
 
   return true;
 }
--- a/dom/svg/SVGTransformListParser.h
+++ b/dom/svg/SVGTransformListParser.h
@@ -14,28 +14,26 @@
 ////////////////////////////////////////////////////////////////////////
 // SVGTransformListParser: A simple recursive descent parser that builds
 // transform lists from transform attributes. The grammar for path data
 // can be found in SVG 1.1,  chapter 7.
 // http://www.w3.org/TR/SVG11/coords.html#TransformAttribute
 
 namespace mozilla {
 
-class nsSVGTransform;
+class SVGTransform;
 
 class SVGTransformListParser : public SVGDataParser {
  public:
   explicit SVGTransformListParser(const nsAString& aValue)
       : SVGDataParser(aValue) {}
 
   bool Parse();
 
-  const nsTArray<nsSVGTransform>& GetTransformList() const {
-    return mTransforms;
-  }
+  const nsTArray<SVGTransform>& GetTransformList() const { return mTransforms; }
 
  private:
   // helpers
   bool ParseArguments(float* aResult, uint32_t aMaxCount,
                       uint32_t* aParsedCount);
 
   bool ParseTransforms();
 
@@ -43,14 +41,14 @@ class SVGTransformListParser : public SV
 
   bool ParseTranslate();
   bool ParseScale();
   bool ParseRotate();
   bool ParseSkewX();
   bool ParseSkewY();
   bool ParseMatrix();
 
-  FallibleTArray<nsSVGTransform> mTransforms;
+  FallibleTArray<SVGTransform> mTransforms;
 };
 
 }  // namespace mozilla
 
 #endif  // MOZILLA_SVGTRANSFORMLISTPARSER_H__
--- a/dom/svg/SVGTransformListSMILType.cpp
+++ b/dom/svg/SVGTransformListSMILType.cpp
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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 "SVGTransformListSMILType.h"
 #include "SVGTransformList.h"
-#include "nsSVGTransform.h"
+#include "SVGTransform.h"
 #include "nsSMILValue.h"
 #include "nsCRT.h"
 #include <math.h>
 
 using namespace mozilla;
 using namespace dom::SVGTransform_Binding;
 
 typedef FallibleTArray<SVGTransformSMILData> TransformArray;
@@ -315,17 +315,17 @@ bool SVGTransformListSMILType::AppendTra
     MOZ_ALWAYS_TRUE(
         transforms.AppendElement(SVGTransformSMILData(aList[i]), fallible));
   }
   return true;
 }
 
 // static
 bool SVGTransformListSMILType::GetTransforms(
-    const nsSMILValue& aValue, FallibleTArray<nsSVGTransform>& aTransforms) {
+    const nsSMILValue& aValue, FallibleTArray<SVGTransform>& aTransforms) {
   MOZ_ASSERT(aValue.mType == Singleton(), "Unexpected SMIL value type");
 
   const TransformArray& smilTransforms =
       *static_cast<const TransformArray*>(aValue.mU.mPtr);
 
   aTransforms.Clear();
   if (!aTransforms.SetCapacity(smilTransforms.Length(), fallible)) return false;
 
--- a/dom/svg/SVGTransformListSMILType.h
+++ b/dom/svg/SVGTransformListSMILType.h
@@ -10,29 +10,29 @@
 #include "mozilla/Attributes.h"
 #include "SMILType.h"
 #include "nsTArray.h"
 
 class nsSMILValue;
 
 namespace mozilla {
 
-class nsSVGTransform;
+class SVGTransform;
 class SVGTransformList;
 class SVGTransformSMILData;
 
 ////////////////////////////////////////////////////////////////////////
 // SVGTransformListSMILType
 //
-// Operations for animating an nsSVGTransformList.
+// Operations for animating an SVGTransformList.
 //
 // This class is confused somewhat by the fact that:
 // (i)  An <animateTransform> element animates an SVGTransformList
 // (ii) BUT <animateTransform> only allows the user to specify animation values
-//      for an nsSVGTransform
+//      for an SVGTransform
 //
 // This may be rectified in a future edition of SVG but for now it means that
 // the underlying value of an animation may be something of the form:
 //
 //   rotate(90) scale(2) skewX(50)
 //
 // BUT the animation values can only ever be SINGLE transform operations such as
 //
@@ -109,17 +109,17 @@ class SVGTransformListSMILType : public 
  public:
   // Transform array accessors
   // -------------------------
   static nsresult AppendTransform(const SVGTransformSMILData& aTransform,
                                   nsSMILValue& aValue);
   static bool AppendTransforms(const SVGTransformList& aList,
                                nsSMILValue& aValue);
   static bool GetTransforms(const nsSMILValue& aValue,
-                            FallibleTArray<nsSVGTransform>& aTransforms);
+                            FallibleTArray<SVGTransform>& aTransforms);
 
  private:
   // Private constructor: prevent instances beyond my singleton.
   constexpr SVGTransformListSMILType() {}
 };
 
 }  // end namespace mozilla
 
--- a/dom/svg/SVGViewportElement.h
+++ b/dom/svg/SVGViewportElement.h
@@ -24,17 +24,16 @@ class nsSVGOuterSVGFrame;
 class nsSVGViewportFrame;
 
 namespace mozilla {
 class AutoPreserveAspectRatioOverride;
 class DOMSVGAnimatedPreserveAspectRatio;
 
 namespace dom {
 class SVGAnimatedRect;
-class SVGTransform;
 class SVGViewElement;
 class SVGViewportElement;
 
 class svgFloatSize {
  public:
   svgFloatSize(float aWidth, float aHeight) : width(aWidth), height(aHeight) {}
   bool operator!=(const svgFloatSize& rhs) {
     return width != rhs.width || height != rhs.height;
--- a/dom/svg/moz.build
+++ b/dom/svg/moz.build
@@ -129,17 +129,16 @@ UNIFIED_SOURCES += [
     'nsSVGEnum.cpp',
     'nsSVGFeatures.cpp',
     'nsSVGInteger.cpp',
     'nsSVGIntegerPair.cpp',
     'nsSVGLength2.cpp',
     'nsSVGNumber2.cpp',
     'nsSVGNumberPair.cpp',
     'nsSVGString.cpp',
-    'nsSVGTransform.cpp',
     'nsSVGViewBox.cpp',
     'SVGAElement.cpp',
     'SVGAngle.cpp',
     'SVGAnimatedAngle.cpp',
     'SVGAnimatedBoolean.cpp',
     'SVGAnimatedEnumeration.cpp',
     'SVGAnimatedInteger.cpp',
     'SVGAnimatedLength.cpp',
@@ -238,16 +237,17 @@ UNIFIED_SOURCES += [
     'SVGSwitchElement.cpp',
     'SVGSymbolElement.cpp',
     'SVGTests.cpp',
     'SVGTextContentElement.cpp',
     'SVGTextElement.cpp',
     'SVGTextPathElement.cpp',
     'SVGTextPositioningElement.cpp',
     'SVGTitleElement.cpp',
+    'SVGTransform.cpp',
     'SVGTransformableElement.cpp',
     'SVGTransformList.cpp',
     'SVGTransformListParser.cpp',
     'SVGTransformListSMILType.cpp',
     'SVGTSpanElement.cpp',
     'SVGUseElement.cpp',
     'SVGViewBoxSMILType.cpp',
     'SVGViewElement.cpp',
--- a/dom/svg/test/test_SVGxxxList.xhtml
+++ b/dom/svg/test/test_SVGxxxList.xhtml
@@ -320,17 +320,17 @@ At t=10s we programmatically remove the 
 */
 function create_animate_elements(test)
 {
   var SVG_NS = 'http://www.w3.org/2000/svg';
   var df = document.createDocumentFragment();
 
   if (is_transform_attr(test.attr_name)) {
     // animateTransform is "special". Although it targets an
-    // nsSVGAnimatedTransformList it only takes nsSVGTransform values as
+    // SVGAnimatedTransformList it only takes SVGTransform values as
     // animation values. Therefore all the assumptions we're testing about the
     // length of lists don't apply. We simply have to test it separately.
     // This is done in test_SVGTransformListAddition.xhtml.
     return df; // Return the empty document fragment
   }
 
   var animate1 = document.createElementNS(SVG_NS, 'animate');
   var animate2 = document.createElementNS(SVG_NS, 'animate');