Bug 1522159 - Move nsSVGAttrTearOffTable to the mozilla namespace r=dholbert
authorlongsonr <longsonr@gmail.com>
Wed, 23 Jan 2019 21:48:00 +0000
changeset 515222 6e2afd71fecdd563e63bdd7a4353f05664e1a8ee
parent 515221 a18e28e269349a5a7c4e59f95da24f461afa717b
child 515223 8129ef9863e5cf6f6665dd7772569724c6702dfb
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1522159
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 1522159 - Move nsSVGAttrTearOffTable to the mozilla namespace r=dholbert
dom/svg/DOMSVGAnimatedLengthList.cpp
dom/svg/DOMSVGAnimatedNumberList.cpp
dom/svg/DOMSVGAnimatedTransformList.cpp
dom/svg/DOMSVGLength.cpp
dom/svg/DOMSVGPathSegList.cpp
dom/svg/DOMSVGPointList.cpp
dom/svg/DOMSVGStringList.cpp
dom/svg/DOMSVGTransform.cpp
dom/svg/SVGAngle.cpp
dom/svg/SVGAnimatedLengthList.cpp
dom/svg/SVGAnimatedNumberList.cpp
dom/svg/SVGAnimatedPathSegList.cpp
dom/svg/SVGAnimatedPointList.cpp
dom/svg/SVGAnimatedPreserveAspectRatio.cpp
dom/svg/SVGAttrTearoffTable.h
dom/svg/SVGBoolean.cpp
dom/svg/SVGEnum.cpp
dom/svg/SVGInteger.cpp
dom/svg/SVGIntegerPair.cpp
dom/svg/SVGNumberPair.cpp
dom/svg/SVGString.cpp
dom/svg/SVGViewBox.cpp
dom/svg/SVGViewBox.h
dom/svg/nsSVGAttrTearoffTable.h
dom/svg/nsSVGLength2.cpp
dom/svg/nsSVGNumber2.cpp
--- a/dom/svg/DOMSVGAnimatedLengthList.cpp
+++ b/dom/svg/DOMSVGAnimatedLengthList.cpp
@@ -1,31 +1,32 @@
 /* -*- 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 "DOMSVGAnimatedLengthList.h"
+
+#include "nsCOMPtr.h"
 #include "DOMSVGLengthList.h"
 #include "SVGAnimatedLengthList.h"
-#include "SVGElement.h"
-#include "nsCOMPtr.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 #include "mozilla/dom/SVGAnimatedLengthListBinding.h"
+#include "mozilla/dom/SVGElement.h"
 
 // See the architecture comment in this file's header.
 
 namespace mozilla {
 namespace dom {
 
-static inline nsSVGAttrTearoffTable<SVGAnimatedLengthList,
-                                    DOMSVGAnimatedLengthList>&
+static inline SVGAttrTearoffTable<SVGAnimatedLengthList,
+                                  DOMSVGAnimatedLengthList>&
 SVGAnimatedLengthListTearoffTable() {
-  static nsSVGAttrTearoffTable<SVGAnimatedLengthList, DOMSVGAnimatedLengthList>
+  static SVGAttrTearoffTable<SVGAnimatedLengthList, DOMSVGAnimatedLengthList>
       sSVGAnimatedLengthListTearoffTable;
   return sSVGAnimatedLengthListTearoffTable;
 }
 
 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedLengthList,
                                                mElement)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMSVGAnimatedLengthList, AddRef)
--- a/dom/svg/DOMSVGAnimatedNumberList.cpp
+++ b/dom/svg/DOMSVGAnimatedNumberList.cpp
@@ -1,31 +1,32 @@
 /* -*- 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 "DOMSVGAnimatedNumberList.h"
+
+#include "nsCOMPtr.h"
 #include "DOMSVGNumberList.h"
 #include "SVGAnimatedNumberList.h"
-#include "SVGElement.h"
-#include "nsCOMPtr.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 #include "mozilla/dom/SVGAnimatedNumberListBinding.h"
+#include "mozilla/dom/SVGElement.h"
 
 // See the architecture comment in this file's header.
 
 namespace mozilla {
 namespace dom {
 
-static inline nsSVGAttrTearoffTable<SVGAnimatedNumberList,
-                                    DOMSVGAnimatedNumberList>&
+static inline SVGAttrTearoffTable<SVGAnimatedNumberList,
+                                  DOMSVGAnimatedNumberList>&
 SVGAnimatedNumberListTearoffTable() {
-  static nsSVGAttrTearoffTable<SVGAnimatedNumberList, DOMSVGAnimatedNumberList>
+  static SVGAttrTearoffTable<SVGAnimatedNumberList, DOMSVGAnimatedNumberList>
       sSVGAnimatedNumberListTearoffTable;
   return sSVGAnimatedNumberListTearoffTable;
 }
 
 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedNumberList,
                                                mElement)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGAnimatedNumberList)
--- a/dom/svg/DOMSVGAnimatedTransformList.cpp
+++ b/dom/svg/DOMSVGAnimatedTransformList.cpp
@@ -1,25 +1,26 @@
 /* -*- 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 "DOMSVGAnimatedTransformList.h"
+
 #include "DOMSVGTransformList.h"
 #include "SVGAnimatedTransformList.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 #include "mozilla/dom/SVGAnimatedTransformListBinding.h"
 
 namespace mozilla {
 namespace dom {
 
-static nsSVGAttrTearoffTable<SVGAnimatedTransformList,
-                             DOMSVGAnimatedTransformList>
+static SVGAttrTearoffTable<SVGAnimatedTransformList,
+                           DOMSVGAnimatedTransformList>
     sSVGAnimatedTransformListTearoffTable;
 
 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGAnimatedTransformList,
                                                mElement)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(DOMSVGAnimatedTransformList, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(DOMSVGAnimatedTransformList, Release)
 
--- a/dom/svg/DOMSVGLength.cpp
+++ b/dom/svg/DOMSVGLength.cpp
@@ -1,34 +1,35 @@
 /* -*- 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 "DOMSVGLength.h"
+
 #include "DOMSVGLengthList.h"
 #include "DOMSVGAnimatedLengthList.h"
-#include "SVGLength.h"
-#include "SVGAnimatedLengthList.h"
-#include "SVGElement.h"
-#include "nsSVGLength2.h"
 #include "nsError.h"
 #include "nsMathUtils.h"
+#include "SVGAnimatedLengthList.h"
+#include "SVGAttrTearoffTable.h"
+#include "SVGLength.h"
+#include "nsSVGLength2.h"
+#include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 #include "mozilla/FloatingPoint.h"
-#include "nsSVGAttrTearoffTable.h"
 
 // See the architecture comment in DOMSVGAnimatedLengthList.h.
 
 namespace mozilla {
 
 namespace dom {
 
-static nsSVGAttrTearoffTable<nsSVGLength2, DOMSVGLength>
+static SVGAttrTearoffTable<nsSVGLength2, DOMSVGLength>
     sBaseSVGLengthTearOffTable, sAnimSVGLengthTearOffTable;
 
 // We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our list's weak ref to us to be safe. (The other option would be to
 // not unlink and rely on the breaking of the other edges in the cycle, as
 // NS_SVG_VAL_IMPL_CYCLE_COLLECTION does.)
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGLength)
 
--- a/dom/svg/DOMSVGPathSegList.cpp
+++ b/dom/svg/DOMSVGPathSegList.cpp
@@ -1,33 +1,34 @@
 /* -*- 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 "DOMSVGPathSegList.h"
+
+#include "nsCOMPtr.h"
 #include "DOMSVGPathSeg.h"
 #include "nsError.h"
 #include "SVGAnimatedPathSegList.h"
-#include "nsCOMPtr.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 #include "SVGPathSegUtils.h"
 #include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGPathSegListBinding.h"
 
 using namespace mozilla::dom;
 
 // See the comment in this file's header.
 
 namespace mozilla {
 
-static inline nsSVGAttrTearoffTable<void, DOMSVGPathSegList>&
+static inline SVGAttrTearoffTable<void, DOMSVGPathSegList>&
 SVGPathSegListTearoffTable() {
-  static nsSVGAttrTearoffTable<void, DOMSVGPathSegList>
+  static SVGAttrTearoffTable<void, DOMSVGPathSegList>
       sSVGPathSegListTearoffTable;
   return sSVGPathSegListTearoffTable;
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGPathSegList)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGPathSegList)
   // No unlinking of mElement, we'd need to null out the value pointer (the
--- a/dom/svg/DOMSVGPointList.cpp
+++ b/dom/svg/DOMSVGPointList.cpp
@@ -1,21 +1,22 @@
 /* -*- 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 "DOMSVGPointList.h"
+
+#include "nsCOMPtr.h"
+#include "nsContentUtils.h"
 #include "DOMSVGPoint.h"
 #include "nsError.h"
 #include "SVGAnimatedPointList.h"
-#include "nsCOMPtr.h"
-#include "nsSVGAttrTearoffTable.h"
-#include "nsContentUtils.h"
+#include "SVGAttrTearoffTable.h"
 #include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGPointListBinding.h"
 #include <algorithm>
 
 using namespace mozilla::dom;
 
 // See the comment in this file's header.
 
@@ -33,19 +34,19 @@ void UpdateListIndicesFromIndex(
     }
   }
 }
 
 }  // namespace
 
 namespace mozilla {
 
-static inline nsSVGAttrTearoffTable<void, DOMSVGPointList>&
+static inline SVGAttrTearoffTable<void, DOMSVGPointList>&
 SVGPointListTearoffTable() {
-  static nsSVGAttrTearoffTable<void, DOMSVGPointList> sSVGPointListTearoffTable;
+  static SVGAttrTearoffTable<void, DOMSVGPointList> sSVGPointListTearoffTable;
   return sSVGPointListTearoffTable;
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGPointList)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGPointList)
   // No unlinking of mElement, we'd need to null out the value pointer (the
   // object it points to is held by the element) and null-check it everywhere.
--- a/dom/svg/DOMSVGStringList.cpp
+++ b/dom/svg/DOMSVGStringList.cpp
@@ -3,31 +3,31 @@
 /* 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 "DOMSVGStringList.h"
 
 #include "mozilla/dom/SVGStringListBinding.h"
 #include "mozilla/dom/SVGTests.h"
+#include "nsCOMPtr.h"
 #include "nsError.h"
-#include "nsCOMPtr.h"
-#include "nsSVGAttrTearoffTable.h"
 #include "nsQueryObject.h"
+#include "SVGAttrTearoffTable.h"
 #include <algorithm>
 
 // See the architecture comment in this file's header.
 
 namespace mozilla {
 
 using namespace dom;
 
-static inline nsSVGAttrTearoffTable<SVGStringList, DOMSVGStringList>&
+static inline SVGAttrTearoffTable<SVGStringList, DOMSVGStringList>&
 SVGStringListTearoffTable() {
-  static nsSVGAttrTearoffTable<SVGStringList, DOMSVGStringList>
+  static SVGAttrTearoffTable<SVGStringList, DOMSVGStringList>
       sSVGStringListTearoffTable;
   return sSVGStringListTearoffTable;
 }
 
 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(DOMSVGStringList, mElement)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(DOMSVGStringList)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGStringList)
--- a/dom/svg/DOMSVGTransform.cpp
+++ b/dom/svg/DOMSVGTransform.cpp
@@ -7,31 +7,30 @@
 #include "DOMSVGTransform.h"
 
 #include "mozilla/dom/SVGMatrix.h"
 #include "mozilla/dom/SVGTransformBinding.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/FloatingPoint.h"
 #include "nsError.h"
 #include "SVGAnimatedTransformList.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 
 namespace {
 const double kRadPerDegree = 2.0 * M_PI / 360.0;
 }  // namespace
 
 namespace mozilla {
 namespace dom {
 
 using namespace SVGTransform_Binding;
 
-static nsSVGAttrTearoffTable<DOMSVGTransform, SVGMatrix>&
+static SVGAttrTearoffTable<DOMSVGTransform, SVGMatrix>&
 SVGMatrixTearoffTable() {
-  static nsSVGAttrTearoffTable<DOMSVGTransform, SVGMatrix>
-      sSVGMatrixTearoffTable;
+  static SVGAttrTearoffTable<DOMSVGTransform, SVGMatrix> sSVGMatrixTearoffTable;
   return sSVGMatrixTearoffTable;
 }
 
 //----------------------------------------------------------------------
 
 // We could use NS_IMPL_CYCLE_COLLECTION(, except that in Unlink() we need to
 // clear our list's weak ref to us to be safe. (The other option would be to
 // not unlink and rely on the breaking of the other edges in the cycle, as
--- a/dom/svg/SVGAngle.cpp
+++ b/dom/svg/SVGAngle.cpp
@@ -8,35 +8,35 @@
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Move.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/dom/DOMSVGAngle.h"
 #include "mozilla/dom/SVGAnimatedAngle.h"
 #include "mozilla/dom/SVGMarkerElement.h"
 #include "nsContentUtils.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 #include "SVGOrientSMILType.h"
 #include "nsTextFormatter.h"
 
 using namespace mozilla::dom;
 using namespace mozilla::dom::SVGAngle_Binding;
 using namespace mozilla::dom::SVGMarkerElement_Binding;
 
 namespace mozilla {
 
 static const nsStaticAtom* const angleUnitMap[] = {
     nullptr, /* SVG_ANGLETYPE_UNKNOWN */
     nullptr, /* SVG_ANGLETYPE_UNSPECIFIED */
     nsGkAtoms::deg, nsGkAtoms::rad, nsGkAtoms::grad};
 
-static nsSVGAttrTearoffTable<SVGAngle, SVGAnimatedAngle>
+static SVGAttrTearoffTable<SVGAngle, SVGAnimatedAngle>
     sSVGAnimatedAngleTearoffTable;
-static nsSVGAttrTearoffTable<SVGAngle, DOMSVGAngle> sBaseSVGAngleTearoffTable;
-static nsSVGAttrTearoffTable<SVGAngle, DOMSVGAngle> sAnimSVGAngleTearoffTable;
+static SVGAttrTearoffTable<SVGAngle, DOMSVGAngle> sBaseSVGAngleTearoffTable;
+static SVGAttrTearoffTable<SVGAngle, DOMSVGAngle> sAnimSVGAngleTearoffTable;
 
 /* Helper functions */
 
 static bool IsValidAngleUnitType(uint16_t unit) {
   if (unit > SVG_ANGLETYPE_UNKNOWN && unit <= SVG_ANGLETYPE_GRAD) return true;
 
   return false;
 }
--- a/dom/svg/SVGAnimatedLengthList.cpp
+++ b/dom/svg/SVGAnimatedLengthList.cpp
@@ -6,17 +6,16 @@
 
 #include "SVGAnimatedLengthList.h"
 
 #include "mozilla/Move.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 #include "DOMSVGAnimatedLengthList.h"
-#include "nsSVGAttrTearoffTable.h"
 #include "SVGLengthListSMILType.h"
 
 namespace mozilla {
 
 using namespace dom;
 
 nsresult SVGAnimatedLengthList::SetBaseValueString(const nsAString &aValue) {
   SVGLengthList newBaseValue;
--- a/dom/svg/SVGAnimatedNumberList.cpp
+++ b/dom/svg/SVGAnimatedNumberList.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGAnimatedNumberList.h"
 
 #include "mozilla/dom/SVGElement.h"
 #include "mozilla/Move.h"
 #include "mozilla/SMILValue.h"
 #include "DOMSVGAnimatedNumberList.h"
-#include "nsSVGAttrTearoffTable.h"
 #include "SVGNumberListSMILType.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
 nsresult SVGAnimatedNumberList::SetBaseValueString(const nsAString &aValue) {
   SVGNumberList newBaseValue;
--- a/dom/svg/SVGAnimatedPathSegList.cpp
+++ b/dom/svg/SVGAnimatedPathSegList.cpp
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGAnimatedPathSegList.h"
 
 #include "mozilla/Move.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/dom/SVGElement.h"
 #include "DOMSVGPathSegList.h"
-#include "nsSVGAttrTearoffTable.h"
 #include "SVGPathSegListSMILType.h"
 
 using namespace mozilla::dom;
 
 // See the comments in this file's header!
 
 namespace mozilla {
 
--- a/dom/svg/SVGAnimatedPointList.cpp
+++ b/dom/svg/SVGAnimatedPointList.cpp
@@ -4,17 +4,16 @@
  * 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 "SVGAnimatedPointList.h"
 
 #include "mozilla/Move.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/dom/SVGElement.h"
-#include "nsSVGAttrTearoffTable.h"
 #include "DOMSVGPointList.h"
 #include "SVGPointListSMILType.h"
 
 using namespace mozilla::dom;
 
 // See the comments in this file's header!
 
 namespace mozilla {
--- a/dom/svg/SVGAnimatedPreserveAspectRatio.cpp
+++ b/dom/svg/SVGAnimatedPreserveAspectRatio.cpp
@@ -6,17 +6,17 @@
 
 #include "SVGAnimatedPreserveAspectRatio.h"
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/SVGContentUtils.h"
 #include "mozilla/dom/SVGAnimatedPreserveAspectRatioBinding.h"
 #include "SMILEnumType.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 ////////////////////////////////////////////////////////////////////////
 // SVGAnimatedPreserveAspectRatio class
 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(
     DOMSVGAnimatedPreserveAspectRatio, mSVGElement)
@@ -31,24 +31,24 @@ NS_INTERFACE_MAP_END
 
 JSObject* DOMSVGAnimatedPreserveAspectRatio::WrapObject(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SVGAnimatedPreserveAspectRatio_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 /* Implementation */
 
-static nsSVGAttrTearoffTable<SVGAnimatedPreserveAspectRatio,
-                             DOMSVGAnimatedPreserveAspectRatio>
+static SVGAttrTearoffTable<SVGAnimatedPreserveAspectRatio,
+                           DOMSVGAnimatedPreserveAspectRatio>
     sSVGAnimatedPAspectRatioTearoffTable;
-static nsSVGAttrTearoffTable<SVGAnimatedPreserveAspectRatio,
-                             DOMSVGPreserveAspectRatio>
+static SVGAttrTearoffTable<SVGAnimatedPreserveAspectRatio,
+                           DOMSVGPreserveAspectRatio>
     sBaseSVGPAspectRatioTearoffTable;
-static nsSVGAttrTearoffTable<SVGAnimatedPreserveAspectRatio,
-                             DOMSVGPreserveAspectRatio>
+static SVGAttrTearoffTable<SVGAnimatedPreserveAspectRatio,
+                           DOMSVGPreserveAspectRatio>
     sAnimSVGPAspectRatioTearoffTable;
 
 already_AddRefed<DOMSVGPreserveAspectRatio>
 DOMSVGAnimatedPreserveAspectRatio::BaseVal() {
   RefPtr<DOMSVGPreserveAspectRatio> domBaseVal =
       sBaseSVGPAspectRatioTearoffTable.GetTearoff(mVal);
   if (!domBaseVal) {
     domBaseVal = new DOMSVGPreserveAspectRatio(mVal, mSVGElement, true);
rename from dom/svg/nsSVGAttrTearoffTable.h
rename to dom/svg/SVGAttrTearoffTable.h
--- a/dom/svg/nsSVGAttrTearoffTable.h
+++ b/dom/svg/SVGAttrTearoffTable.h
@@ -6,29 +6,31 @@
 
 #ifndef NS_SVGATTRTEAROFFTABLE_H_
 #define NS_SVGATTRTEAROFFTABLE_H_
 
 #include "nsDataHashtable.h"
 #include "nsDebug.h"
 #include "nsHashKeys.h"
 
+namespace mozilla {
+
 /**
  * Global hashmap to associate internal SVG data types (e.g. nsSVGLength2) with
  * DOM tear-off objects (e.g. DOMSVGLength). This allows us to always return
  * the same object for subsequent requests for DOM objects.
  *
  * We don't keep an owning reference to the tear-off objects so they are
  * responsible for removing themselves from this table when they die.
  */
 template <class SimpleType, class TearoffType>
-class nsSVGAttrTearoffTable {
+class SVGAttrTearoffTable {
  public:
 #ifdef DEBUG
-  ~nsSVGAttrTearoffTable() {
+  ~SVGAttrTearoffTable() {
     MOZ_ASSERT(!mTable, "Tear-off objects remain in hashtable at shutdown.");
   }
 #endif
 
   TearoffType* GetTearoff(SimpleType* aSimple);
 
   void AddTearoff(SimpleType* aSimple, TearoffType* aTearoff);
 
@@ -37,58 +39,60 @@ class nsSVGAttrTearoffTable {
  private:
   typedef nsPtrHashKey<SimpleType> SimpleTypePtrKey;
   typedef nsDataHashtable<SimpleTypePtrKey, TearoffType*> TearoffTable;
 
   TearoffTable* mTable;
 };
 
 template <class SimpleType, class TearoffType>
-TearoffType* nsSVGAttrTearoffTable<SimpleType, TearoffType>::GetTearoff(
+TearoffType* SVGAttrTearoffTable<SimpleType, TearoffType>::GetTearoff(
     SimpleType* aSimple) {
   if (!mTable) return nullptr;
 
   TearoffType* tearoff = nullptr;
 
 #ifdef DEBUG
   bool found =
 #endif
       mTable->Get(aSimple, &tearoff);
   MOZ_ASSERT(!found || tearoff,
              "null pointer stored in attribute tear-off map");
 
   return tearoff;
 }
 
 template <class SimpleType, class TearoffType>
-void nsSVGAttrTearoffTable<SimpleType, TearoffType>::AddTearoff(
+void SVGAttrTearoffTable<SimpleType, TearoffType>::AddTearoff(
     SimpleType* aSimple, TearoffType* aTearoff) {
   if (!mTable) {
     mTable = new TearoffTable;
   }
 
   // We shouldn't be adding a tear-off if there already is one. If that happens,
   // something is wrong.
   if (mTable->Get(aSimple, nullptr)) {
     MOZ_ASSERT(false, "There is already a tear-off for this object.");
     return;
   }
 
   mTable->Put(aSimple, aTearoff);
 }
 
 template <class SimpleType, class TearoffType>
-void nsSVGAttrTearoffTable<SimpleType, TearoffType>::RemoveTearoff(
+void SVGAttrTearoffTable<SimpleType, TearoffType>::RemoveTearoff(
     SimpleType* aSimple) {
   if (!mTable) {
     // Perhaps something happened in between creating the SimpleType object and
     // registering it
     return;
   }
 
   mTable->Remove(aSimple);
   if (mTable->Count() == 0) {
     delete mTable;
     mTable = nullptr;
   }
 }
 
+}  // namespace mozilla
+
 #endif  // NS_SVGATTRTEAROFFTABLE_H_
--- a/dom/svg/SVGBoolean.cpp
+++ b/dom/svg/SVGBoolean.cpp
@@ -3,29 +3,29 @@
 /* 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 "SVGBoolean.h"
 
 #include "nsError.h"
 #include "SMILBoolType.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/dom/SVGAnimatedBoolean.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
 /* Implementation */
 
-static inline nsSVGAttrTearoffTable<SVGBoolean, SVGAnimatedBoolean>&
+static inline SVGAttrTearoffTable<SVGBoolean, SVGAnimatedBoolean>&
 SVGAnimatedBooleanTearoffTable() {
-  static nsSVGAttrTearoffTable<SVGBoolean, SVGAnimatedBoolean>
+  static SVGAttrTearoffTable<SVGBoolean, SVGAnimatedBoolean>
       sSVGAnimatedBooleanTearoffTable;
   return sSVGAnimatedBooleanTearoffTable;
 }
 
 static bool GetValueFromString(const nsAString& aValueAsString, bool& aValue) {
   if (aValueAsString.EqualsLiteral("true")) {
     aValue = true;
     return true;
--- a/dom/svg/SVGEnum.cpp
+++ b/dom/svg/SVGEnum.cpp
@@ -6,23 +6,23 @@
 
 #include "SVGEnum.h"
 
 #include "mozilla/dom/SVGElement.h"
 #include "mozilla/SMILValue.h"
 #include "nsAtom.h"
 #include "nsError.h"
 #include "SMILEnumType.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
-static nsSVGAttrTearoffTable<SVGEnum, SVGEnum::DOMAnimatedEnum>
+static SVGAttrTearoffTable<SVGEnum, SVGEnum::DOMAnimatedEnum>
     sSVGAnimatedEnumTearoffTable;
 
 const SVGEnumMapping* SVGEnum::GetMapping(SVGElement* aSVGElement) {
   SVGElement::EnumAttributesInfo info = aSVGElement->GetEnumInfo();
 
   NS_ASSERTION(info.mEnumCount > 0 && mAttrEnum < info.mEnumCount,
                "mapping request for a non-attrib enum");
 
--- a/dom/svg/SVGInteger.cpp
+++ b/dom/svg/SVGInteger.cpp
@@ -2,28 +2,28 @@
 /* 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 "SVGInteger.h"
 
 #include "nsError.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SMILIntegerType.h"
+#include "SVGAttrTearoffTable.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/SVGContentUtils.h"
-#include "SMILIntegerType.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
 /* Implementation */
 
-static nsSVGAttrTearoffTable<SVGInteger, SVGInteger::DOMAnimatedInteger>
+static SVGAttrTearoffTable<SVGInteger, SVGInteger::DOMAnimatedInteger>
     sSVGAnimatedIntegerTearoffTable;
 
 nsresult SVGInteger::SetBaseValueString(const nsAString &aValueAsString,
                                         SVGElement *aSVGElement) {
   int32_t value;
 
   if (!SVGContentUtils::ParseInteger(aValueAsString, value)) {
     return NS_ERROR_DOM_SYNTAX_ERR;
--- a/dom/svg/SVGIntegerPair.cpp
+++ b/dom/svg/SVGIntegerPair.cpp
@@ -1,31 +1,31 @@
 /* -*- 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 "SVGIntegerPair.h"
 
-#include "nsSVGAttrTearoffTable.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsError.h"
 #include "nsMathUtils.h"
+#include "SVGAttrTearoffTable.h"
 #include "SVGIntegerPairSMILType.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/SVGContentUtils.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
-static nsSVGAttrTearoffTable<SVGIntegerPair, SVGIntegerPair::DOMAnimatedInteger>
+static SVGAttrTearoffTable<SVGIntegerPair, SVGIntegerPair::DOMAnimatedInteger>
     sSVGFirstAnimatedIntegerTearoffTable;
-static nsSVGAttrTearoffTable<SVGIntegerPair, SVGIntegerPair::DOMAnimatedInteger>
+static SVGAttrTearoffTable<SVGIntegerPair, SVGIntegerPair::DOMAnimatedInteger>
     sSVGSecondAnimatedIntegerTearoffTable;
 
 /* Implementation */
 
 static nsresult ParseIntegerOptionalInteger(const nsAString& aValue,
                                             int32_t aValues[2]) {
   nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace> tokenizer(
       aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
--- a/dom/svg/SVGNumberPair.cpp
+++ b/dom/svg/SVGNumberPair.cpp
@@ -2,28 +2,28 @@
 /* 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 "SVGNumberPair.h"
 
 #include "nsCharSeparatedTokenizer.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 #include "SVGNumberPairSMILType.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/SVGContentUtils.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
-static nsSVGAttrTearoffTable<SVGNumberPair, SVGNumberPair::DOMAnimatedNumber>
+static SVGAttrTearoffTable<SVGNumberPair, SVGNumberPair::DOMAnimatedNumber>
     sSVGFirstAnimatedNumberTearoffTable;
-static nsSVGAttrTearoffTable<SVGNumberPair, SVGNumberPair::DOMAnimatedNumber>
+static SVGAttrTearoffTable<SVGNumberPair, SVGNumberPair::DOMAnimatedNumber>
     sSVGSecondAnimatedNumberTearoffTable;
 
 static nsresult ParseNumberOptionalNumber(const nsAString& aValue,
                                           float aValues[2]) {
   nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace> tokenizer(
       aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
   if (tokenizer.whitespaceBeforeFirstToken()) {
     return NS_ERROR_DOM_SYNTAX_ERR;
--- a/dom/svg/SVGString.cpp
+++ b/dom/svg/SVGString.cpp
@@ -3,37 +3,37 @@
 /* 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 "SVGString.h"
 
 #include "mozilla/Move.h"
 #include "mozilla/SMILValue.h"
-#include "nsSVGAttrTearoffTable.h"
 #include "SMILStringType.h"
+#include "SVGAttrTearoffTable.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGString::DOMAnimatedString,
                                                mSVGElement)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGString::DOMAnimatedString)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGString::DOMAnimatedString)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGString::DOMAnimatedString)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-static inline nsSVGAttrTearoffTable<SVGString, SVGString::DOMAnimatedString>&
+static inline SVGAttrTearoffTable<SVGString, SVGString::DOMAnimatedString>&
 SVGAnimatedStringTearoffTable() {
-  static nsSVGAttrTearoffTable<SVGString, SVGString::DOMAnimatedString>
+  static SVGAttrTearoffTable<SVGString, SVGString::DOMAnimatedString>
       sSVGAnimatedStringTearoffTable;
   return sSVGAnimatedStringTearoffTable;
 }
 
 /* Implementation */
 
 void SVGString::SetBaseValue(const nsAString& aValue, SVGElement* aSVGElement,
                              bool aDoSetAttr) {
--- a/dom/svg/SVGViewBox.cpp
+++ b/dom/svg/SVGViewBox.cpp
@@ -77,21 +77,21 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGViewBox::DOMAnimVal)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-static nsSVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMBaseVal>
+static SVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMBaseVal>
     sBaseSVGViewBoxTearoffTable;
-static nsSVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMAnimVal>
+static SVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMAnimVal>
     sAnimSVGViewBoxTearoffTable;
-nsSVGAttrTearoffTable<SVGViewBox, dom::SVGAnimatedRect>
+SVGAttrTearoffTable<SVGViewBox, dom::SVGAnimatedRect>
     SVGViewBox::sSVGAnimatedRectTearoffTable;
 
 /* Implementation of SVGViewBox methods */
 
 void SVGViewBox::Init() {
   mHasBaseVal = false;
   // We shouldn't use mBaseVal for rendering (its usages should be guarded with
   // "mHasBaseVal" checks), but just in case we do by accident, this will
--- a/dom/svg/SVGViewBox.h
+++ b/dom/svg/SVGViewBox.h
@@ -5,19 +5,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __NS_SVGVIEWBOX_H__
 #define __NS_SVGVIEWBOX_H__
 
 #include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
+#include "SVGAttrTearoffTable.h"
 #include "mozilla/Attributes.h"
 #include "nsISMILAttr.h"
-#include "nsSVGAttrTearoffTable.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/dom/SVGAnimatedRect.h"
 #include "mozilla/dom/SVGIRect.h"
 
 namespace mozilla {
 
 class SMILValue;
 
@@ -199,15 +199,15 @@ class SVGViewBox {
         const nsAString& aStr,
         const mozilla::dom::SVGAnimationElement* aSrcElement, SMILValue& aValue,
         bool& aPreventCachingOfSandwich) const override;
     virtual SMILValue GetBaseValue() const override;
     virtual void ClearAnimValue() override;
     virtual nsresult SetAnimValue(const SMILValue& aValue) override;
   };
 
-  static nsSVGAttrTearoffTable<SVGViewBox, mozilla::dom::SVGAnimatedRect>
+  static SVGAttrTearoffTable<SVGViewBox, mozilla::dom::SVGAnimatedRect>
       sSVGAnimatedRectTearoffTable;
 };
 
 }  // namespace mozilla
 
 #endif  // __NS_SVGVIEWBOX_H__
--- a/dom/svg/nsSVGLength2.cpp
+++ b/dom/svg/nsSVGLength2.cpp
@@ -6,23 +6,23 @@
 
 #include "nsSVGLength2.h"
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/dom/SVGAnimatedLength.h"
 #include "mozilla/dom/SVGViewportElement.h"
 #include "nsContentUtils.h"
+#include "DOMSVGLength.h"
 #include "nsIFrame.h"
+#include "LayoutLogging.h"
 #include "SMILFloatType.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 #include "nsSVGIntegrationUtils.h"
-#include "DOMSVGLength.h"
 #include "nsTextFormatter.h"
-#include "LayoutLogging.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 static const nsStaticAtom* const unitMap[] = {
     nullptr, /* SVG_LENGTHTYPE_UNKNOWN */
     nullptr, /* SVG_LENGTHTYPE_NUMBER */
     nsGkAtoms::percentage,
@@ -30,17 +30,17 @@ static const nsStaticAtom* const unitMap
     nsGkAtoms::ex,
     nsGkAtoms::px,
     nsGkAtoms::cm,
     nsGkAtoms::mm,
     nsGkAtoms::in,
     nsGkAtoms::pt,
     nsGkAtoms::pc};
 
-static nsSVGAttrTearoffTable<nsSVGLength2, SVGAnimatedLength>
+static SVGAttrTearoffTable<nsSVGLength2, SVGAnimatedLength>
     sSVGAnimatedLengthTearoffTable;
 
 /* Helper functions */
 
 static bool IsValidUnitType(uint16_t unit) {
   if (unit > SVGLength_Binding::SVG_LENGTHTYPE_UNKNOWN &&
       unit <= SVGLength_Binding::SVG_LENGTHTYPE_PC)
     return true;
--- a/dom/svg/nsSVGNumber2.cpp
+++ b/dom/svg/nsSVGNumber2.cpp
@@ -6,24 +6,24 @@
 
 #include "nsSVGNumber2.h"
 
 #include "mozilla/Attributes.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/SVGContentUtils.h"
 #include "nsContentUtils.h"
 #include "SMILFloatType.h"
-#include "nsSVGAttrTearoffTable.h"
+#include "SVGAttrTearoffTable.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 /* Implementation */
 
-static nsSVGAttrTearoffTable<nsSVGNumber2, nsSVGNumber2::DOMAnimatedNumber>
+static SVGAttrTearoffTable<nsSVGNumber2, nsSVGNumber2::DOMAnimatedNumber>
     sSVGAnimatedNumberTearoffTable;
 
 static bool GetValueFromString(const nsAString& aString,
                                bool aPercentagesAllowed, float& aValue) {
   RangedPtr<const char16_t> iter = SVGContentUtils::GetStartRangedPtr(aString);
   const RangedPtr<const char16_t> end =
       SVGContentUtils::GetEndRangedPtr(aString);