Bug 1517938 - Move nsSVGIntegerPair and nsSVGNumberPair to the mozilla namespace r=jwatt
authorlongsonr <longsonr@gmail.com>
Sun, 06 Jan 2019 08:22:55 +0000
changeset 452655 d0a964c90dd6ed1063c19869ce571829b3cb9eb7
parent 452653 ad135e7ddad2fa240139653a81be39e3cc96fd0f
child 452656 10040ee53d5b569289db95b0e110c92ed40d49cc
push id35323
push usercsabou@mozilla.com
push dateSun, 06 Jan 2019 21:44:44 +0000
treeherdermozilla-central@640985215424 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1517938
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 1517938 - Move nsSVGIntegerPair and nsSVGNumberPair to the mozilla namespace r=jwatt
dom/base/nsAttrValue.cpp
dom/base/nsAttrValue.h
dom/base/nsAttrValueInlines.h
dom/svg/SVGAttrValueWrapper.cpp
dom/svg/SVGAttrValueWrapper.h
dom/svg/SVGElement.cpp
dom/svg/SVGElement.h
dom/svg/SVGFEConvolveMatrixElement.cpp
dom/svg/SVGFEConvolveMatrixElement.h
dom/svg/SVGFEDiffuseLightingElement.cpp
dom/svg/SVGFEDropShadowElement.cpp
dom/svg/SVGFEDropShadowElement.h
dom/svg/SVGFEGaussianBlurElement.cpp
dom/svg/SVGFEGaussianBlurElement.h
dom/svg/SVGFEMorphologyElement.cpp
dom/svg/SVGFEMorphologyElement.h
dom/svg/SVGFESpecularLightingElement.cpp
dom/svg/SVGFETurbulenceElement.cpp
dom/svg/SVGFETurbulenceElement.h
dom/svg/SVGFilterElement.h
dom/svg/SVGFilters.cpp
dom/svg/SVGFilters.h
dom/svg/SVGIntegerPair.cpp
dom/svg/SVGIntegerPair.h
dom/svg/SVGNumberPair.cpp
dom/svg/SVGNumberPair.h
dom/svg/moz.build
dom/svg/nsSVGIntegerPair.cpp
dom/svg/nsSVGIntegerPair.h
dom/svg/nsSVGNumberPair.cpp
dom/svg/nsSVGNumberPair.h
layout/svg/nsFilterInstance.h
layout/svg/nsSVGFilterInstance.h
--- a/dom/base/nsAttrValue.cpp
+++ b/dom/base/nsAttrValue.cpp
@@ -397,17 +397,17 @@ void nsAttrValue::SetToSerialized(const 
     SetTo(aOther);
   }
 }
 
 void nsAttrValue::SetTo(const SVGAngle& aValue, const nsAString* aSerialized) {
   SetSVGType(eSVGAngle, &aValue, aSerialized);
 }
 
-void nsAttrValue::SetTo(const nsSVGIntegerPair& aValue,
+void nsAttrValue::SetTo(const SVGIntegerPair& aValue,
                         const nsAString* aSerialized) {
   SetSVGType(eSVGIntegerPair, &aValue, aSerialized);
 }
 
 void nsAttrValue::SetTo(const nsSVGLength2& aValue,
                         const nsAString* aSerialized) {
   SetSVGType(eSVGLength, &aValue, aSerialized);
 }
@@ -427,17 +427,17 @@ void nsAttrValue::SetTo(const SVGNumberL
   // While an empty string will parse as a number list, there's no need to store
   // it (and SetMiscAtomOrString will assert if we try)
   if (aSerialized && aSerialized->IsEmpty()) {
     aSerialized = nullptr;
   }
   SetSVGType(eSVGNumberList, &aValue, aSerialized);
 }
 
-void nsAttrValue::SetTo(const nsSVGNumberPair& aValue,
+void nsAttrValue::SetTo(const SVGNumberPair& aValue,
                         const nsAString* aSerialized) {
   SetSVGType(eSVGNumberPair, &aValue, aSerialized);
 }
 
 void nsAttrValue::SetTo(const SVGPathData& aValue,
                         const nsAString* aSerialized) {
   // While an empty string will parse as path data, there's no need to store it
   // (and SetMiscAtomOrString will assert if we try)
--- a/dom/base/nsAttrValue.h
+++ b/dom/base/nsAttrValue.h
@@ -147,23 +147,25 @@ class nsAttrValue {
   void SetTo(int16_t aInt);
   void SetTo(int32_t aInt, const nsAString* aSerialized);
   void SetTo(double aValue, const nsAString* aSerialized);
   void SetTo(already_AddRefed<mozilla::DeclarationBlock> aValue,
              const nsAString* aSerialized);
   void SetTo(nsIURI* aValue, const nsAString* aSerialized);
   void SetTo(const nsIntMargin& aValue);
   void SetTo(const mozilla::SVGAngle& aValue, const nsAString* aSerialized);
-  void SetTo(const nsSVGIntegerPair& aValue, const nsAString* aSerialized);
+  void SetTo(const mozilla::SVGIntegerPair& aValue,
+             const nsAString* aSerialized);
   void SetTo(const nsSVGLength2& aValue, const nsAString* aSerialized);
   void SetTo(const mozilla::SVGLengthList& aValue,
              const nsAString* aSerialized);
   void SetTo(const mozilla::SVGNumberList& aValue,
              const nsAString* aSerialized);
-  void SetTo(const nsSVGNumberPair& aValue, const nsAString* aSerialized);
+  void SetTo(const mozilla::SVGNumberPair& aValue,
+             const nsAString* aSerialized);
   void SetTo(const mozilla::SVGPathData& aValue, const nsAString* aSerialized);
   void SetTo(const mozilla::SVGPointList& aValue, const nsAString* aSerialized);
   void SetTo(const mozilla::SVGAnimatedPreserveAspectRatio& aValue,
              const nsAString* aSerialized);
   void SetTo(const mozilla::SVGStringList& aValue,
              const nsAString* aSerialized);
   void SetTo(const mozilla::SVGTransformList& aValue,
              const nsAString* aSerialized);
--- a/dom/base/nsAttrValueInlines.h
+++ b/dom/base/nsAttrValueInlines.h
@@ -40,21 +40,21 @@ struct MiscContainer final {
         nscolor mColor;
         uint32_t mEnumValue;
         int32_t mPercent;
         mozilla::DeclarationBlock* mCSSDeclaration;
         nsIURI* mURL;
         mozilla::AtomArray* mAtomArray;
         nsIntMargin* mIntMargin;
         const mozilla::SVGAngle* mSVGAngle;
-        const nsSVGIntegerPair* mSVGIntegerPair;
+        const mozilla::SVGIntegerPair* mSVGIntegerPair;
         const nsSVGLength2* mSVGLength;
         const mozilla::SVGLengthList* mSVGLengthList;
         const mozilla::SVGNumberList* mSVGNumberList;
-        const nsSVGNumberPair* mSVGNumberPair;
+        const mozilla::SVGNumberPair* mSVGNumberPair;
         const mozilla::SVGPathData* mSVGPathData;
         const mozilla::SVGPointList* mSVGPointList;
         const mozilla::SVGAnimatedPreserveAspectRatio* mSVGPreserveAspectRatio;
         const mozilla::SVGStringList* mSVGStringList;
         const mozilla::SVGTransformList* mSVGTransformList;
         const nsSVGViewBox* mSVGViewBox;
       };
       uint32_t mRefCount : 31;
--- a/dom/svg/SVGAttrValueWrapper.cpp
+++ b/dom/svg/SVGAttrValueWrapper.cpp
@@ -1,37 +1,37 @@
 /* -*- 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 "SVGAttrValueWrapper.h"
 #include "SVGAngle.h"
-#include "nsSVGIntegerPair.h"
+#include "SVGIntegerPair.h"
 #include "nsSVGLength2.h"
-#include "nsSVGNumberPair.h"
+#include "SVGNumberPair.h"
 #include "nsSVGViewBox.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "SVGLengthList.h"
 #include "SVGNumberList.h"
 #include "SVGPathData.h"
 #include "SVGPointList.h"
 #include "SVGStringList.h"
 #include "SVGTransformList.h"
 
-using namespace mozilla;
+namespace mozilla {
 
 /*static*/ void SVGAttrValueWrapper::ToString(const SVGAngle* aAngle,
                                               nsAString& aResult) {
   aAngle->GetBaseValueString(aResult);
 }
 
 /*static*/ void SVGAttrValueWrapper::ToString(
-    const nsSVGIntegerPair* aIntegerPair, nsAString& aResult) {
+    const SVGIntegerPair* aIntegerPair, nsAString& aResult) {
   aIntegerPair->GetBaseValueString(aResult);
 }
 
 /*static*/ void SVGAttrValueWrapper::ToString(const nsSVGLength2* aLength,
                                               nsAString& aResult) {
   aLength->GetBaseValueString(aResult);
 }
 
@@ -40,18 +40,18 @@ using namespace mozilla;
   aLengthList->GetValueAsString(aResult);
 }
 
 /*static*/ void SVGAttrValueWrapper::ToString(const SVGNumberList* aNumberList,
                                               nsAString& aResult) {
   aNumberList->GetValueAsString(aResult);
 }
 
-/*static*/ void SVGAttrValueWrapper::ToString(
-    const nsSVGNumberPair* aNumberPair, nsAString& aResult) {
+/*static*/ void SVGAttrValueWrapper::ToString(const SVGNumberPair* aNumberPair,
+                                              nsAString& aResult) {
   aNumberPair->GetBaseValueString(aResult);
 }
 
 /*static*/ void SVGAttrValueWrapper::ToString(const SVGPathData* aPathData,
                                               nsAString& aResult) {
   aPathData->GetValueAsString(aResult);
 }
 
@@ -75,8 +75,10 @@ using namespace mozilla;
     const SVGTransformList* aTransformList, nsAString& aResult) {
   aTransformList->GetValueAsString(aResult);
 }
 
 /*static*/ void SVGAttrValueWrapper::ToString(const nsSVGViewBox* aViewBox,
                                               nsAString& aResult) {
   aViewBox->GetBaseValueString(aResult);
 }
+
+}  // namespace mozilla
--- a/dom/svg/SVGAttrValueWrapper.h
+++ b/dom/svg/SVGAttrValueWrapper.h
@@ -9,54 +9,45 @@
 
 /**
  * Utility wrapper for handling SVG types used inside nsAttrValue so that these
  * types don't need to be exported outside the SVG module.
  */
 
 #include "nsString.h"
 
-class nsSVGIntegerPair;
 class nsSVGLength2;
-class nsSVGNumberPair;
 class nsSVGViewBox;
 
 namespace mozilla {
 class SVGAngle;
+class SVGIntegerPair;
 class SVGLengthList;
 class SVGNumberList;
+class SVGNumberPair;
 class SVGPathData;
 class SVGPointList;
 class SVGAnimatedPreserveAspectRatio;
 class SVGStringList;
 class SVGTransformList;
-}  // namespace mozilla
-
-namespace mozilla {
 
 class SVGAttrValueWrapper {
  public:
   static void ToString(const SVGAngle* aAngle, nsAString& aResult);
-  static void ToString(const nsSVGIntegerPair* aIntegerPair,
-                       nsAString& aResult);
+  static void ToString(const SVGIntegerPair* aIntegerPair, nsAString& aResult);
   static void ToString(const nsSVGLength2* aLength, nsAString& aResult);
-  static void ToString(const mozilla::SVGLengthList* aLengthList,
-                       nsAString& aResult);
-  static void ToString(const mozilla::SVGNumberList* aNumberList,
-                       nsAString& aResult);
-  static void ToString(const nsSVGNumberPair* aNumberPair, nsAString& aResult);
-  static void ToString(const mozilla::SVGPathData* aPathData,
-                       nsAString& aResult);
-  static void ToString(const mozilla::SVGPointList* aPointList,
-                       nsAString& aResult);
+  static void ToString(const SVGLengthList* aLengthList, nsAString& aResult);
+  static void ToString(const SVGNumberList* aNumberList, nsAString& aResult);
+  static void ToString(const SVGNumberPair* aNumberPair, nsAString& aResult);
+  static void ToString(const SVGPathData* aPathData, nsAString& aResult);
+  static void ToString(const SVGPointList* aPointList, nsAString& aResult);
   static void ToString(
-      const mozilla::SVGAnimatedPreserveAspectRatio* aPreserveAspectRatio,
+      const SVGAnimatedPreserveAspectRatio* aPreserveAspectRatio,
       nsAString& aResult);
-  static void ToString(const mozilla::SVGStringList* aStringList,
-                       nsAString& aResult);
-  static void ToString(const mozilla::SVGTransformList* aTransformList,
+  static void ToString(const SVGStringList* aStringList, nsAString& aResult);
+  static void ToString(const SVGTransformList* aTransformList,
                        nsAString& aResult);
   static void ToString(const nsSVGViewBox* aViewBox, nsAString& aResult);
 };
 
 } /* namespace mozilla */
 
 #endif  // MOZILLA_SVGATTRVALUEWRAPPER_H__
--- a/dom/svg/SVGElement.cpp
+++ b/dom/svg/SVGElement.cpp
@@ -42,21 +42,21 @@
 #include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedLengthList.h"
 #include "SVGAnimatedPointList.h"
 #include "SVGAnimatedPathSegList.h"
 #include "SVGAnimatedTransformList.h"
 #include "nsSVGBoolean.h"
 #include "SVGEnum.h"
 #include "nsSVGInteger.h"
-#include "nsSVGIntegerPair.h"
+#include "SVGIntegerPair.h"
 #include "nsSVGLength2.h"
 #include "SVGMotionSMILAttr.h"
 #include "nsSVGNumber2.h"
-#include "nsSVGNumberPair.h"
+#include "SVGNumberPair.h"
 #include "nsSVGString.h"
 #include "nsSVGViewBox.h"
 #include <stdarg.h>
 
 // This is needed to ensure correct handling of calls to the
 // vararg-list methods in this file:
 //   SVGElement::GetAnimated{Length,Number,Integer}Values
 // See bug 547964 for details:
@@ -402,17 +402,17 @@ bool SVGElement::ParseAttribute(int32_t 
           }
           foundMatch = true;
           break;
         }
       }
     }
 
     if (!foundMatch) {
-      // Check for nsSVGNumberPair attribute
+      // Check for SVGNumberPair attribute
       NumberPairAttributesInfo numberPairInfo = GetNumberPairInfo();
       for (i = 0; i < numberPairInfo.mNumberPairCount; i++) {
         if (aAttribute == numberPairInfo.mNumberPairInfo[i].mName) {
           rv = numberPairInfo.mNumberPairs[i].SetBaseValueString(aValue, this);
           if (NS_FAILED(rv)) {
             numberPairInfo.Reset(i);
           } else {
             aResult.SetTo(numberPairInfo.mNumberPairs[i], &aValue);
@@ -438,17 +438,17 @@ bool SVGElement::ParseAttribute(int32_t 
           }
           foundMatch = true;
           break;
         }
       }
     }
 
     if (!foundMatch) {
-      // Check for nsSVGIntegerPair attribute
+      // Check for SVGIntegerPair attribute
       IntegerPairAttributesInfo integerPairInfo = GetIntegerPairInfo();
       for (i = 0; i < integerPairInfo.mIntegerPairCount; i++) {
         if (aAttribute == integerPairInfo.mIntegerPairInfo[i].mName) {
           rv =
               integerPairInfo.mIntegerPairs[i].SetBaseValueString(aValue, this);
           if (NS_FAILED(rv)) {
             integerPairInfo.Reset(i);
           } else {
--- a/dom/svg/SVGElement.h
+++ b/dom/svg/SVGElement.h
@@ -24,39 +24,39 @@
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
 #include "nsISupportsImpl.h"
 #include "nsStyledElement.h"
 #include "gfxMatrix.h"
 
 class nsSVGBoolean;
 class nsSVGInteger;
-class nsSVGIntegerPair;
 class nsSVGLength2;
 class nsSVGNumber2;
-class nsSVGNumberPair;
 class nsSVGString;
 class nsSVGViewBox;
 
 nsresult NS_NewSVGElement(mozilla::dom::Element** aResult,
                           already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 class DeclarationBlock;
 
 class SVGAngle;
 class SVGAnimatedNumberList;
-class SVGNumberList;
+class SVGAnimatedPathSegList;
+class SVGAnimatedPointList;
+class SVGAnimatedPreserveAspectRatio;
+class SVGAnimatedTransformList;
 class SVGAnimatedLengthList;
 class SVGEnum;
 class SVGUserUnitList;
-class SVGAnimatedPointList;
-class SVGAnimatedPathSegList;
-class SVGAnimatedPreserveAspectRatio;
-class SVGAnimatedTransformList;
+class SVGIntegerPair;
+class SVGNumberList;
+class SVGNumberPair;
 class SVGStringList;
 class DOMSVGStringList;
 
 struct SVGEnumMapping;
 
 namespace dom {
 class SVGSVGElement;
 class SVGViewportElement;
@@ -384,21 +384,21 @@ class SVGElement : public SVGElementBase
 
   struct NumberPairInfo {
     nsStaticAtom* const mName;
     const float mDefaultValue1;
     const float mDefaultValue2;
   };
 
   struct NumberPairAttributesInfo {
-    nsSVGNumberPair* const mNumberPairs;
+    SVGNumberPair* const mNumberPairs;
     const NumberPairInfo* const mNumberPairInfo;
     const uint32_t mNumberPairCount;
 
-    NumberPairAttributesInfo(nsSVGNumberPair* aNumberPairs,
+    NumberPairAttributesInfo(SVGNumberPair* aNumberPairs,
                              NumberPairInfo* aNumberPairInfo,
                              uint32_t aNumberPairCount)
         : mNumberPairs(aNumberPairs),
           mNumberPairInfo(aNumberPairInfo),
           mNumberPairCount(aNumberPairCount) {}
 
     void Reset(uint8_t aAttrEnum);
   };
@@ -424,21 +424,21 @@ class SVGElement : public SVGElementBase
 
   struct IntegerPairInfo {
     nsStaticAtom* const mName;
     const int32_t mDefaultValue1;
     const int32_t mDefaultValue2;
   };
 
   struct IntegerPairAttributesInfo {
-    nsSVGIntegerPair* const mIntegerPairs;
+    SVGIntegerPair* const mIntegerPairs;
     const IntegerPairInfo* const mIntegerPairInfo;
     const uint32_t mIntegerPairCount;
 
-    IntegerPairAttributesInfo(nsSVGIntegerPair* aIntegerPairs,
+    IntegerPairAttributesInfo(SVGIntegerPair* aIntegerPairs,
                               IntegerPairInfo* aIntegerPairInfo,
                               uint32_t aIntegerPairCount)
         : mIntegerPairs(aIntegerPairs),
           mIntegerPairInfo(aIntegerPairInfo),
           mIntegerPairCount(aIntegerPairCount) {}
 
     void Reset(uint8_t aAttrEnum);
   };
--- a/dom/svg/SVGFEConvolveMatrixElement.cpp
+++ b/dom/svg/SVGFEConvolveMatrixElement.cpp
@@ -63,22 +63,22 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFECon
 //----------------------------------------------------------------------
 
 already_AddRefed<SVGAnimatedString> SVGFEConvolveMatrixElement::In1() {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
 already_AddRefed<SVGAnimatedInteger> SVGFEConvolveMatrixElement::OrderX() {
   return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(
-      nsSVGIntegerPair::eFirst, this);
+      SVGIntegerPair::eFirst, this);
 }
 
 already_AddRefed<SVGAnimatedInteger> SVGFEConvolveMatrixElement::OrderY() {
   return mIntegerPairAttributes[ORDER].ToDOMAnimatedInteger(
-      nsSVGIntegerPair::eSecond, this);
+      SVGIntegerPair::eSecond, this);
 }
 
 already_AddRefed<DOMSVGAnimatedNumberList>
 SVGFEConvolveMatrixElement::KernelMatrix() {
   return DOMSVGAnimatedNumberList::GetDOMWrapper(
       &mNumberListAttributes[KERNELMATRIX], this, KERNELMATRIX);
 }
 
@@ -106,23 +106,23 @@ already_AddRefed<SVGAnimatedNumber> SVGF
 
 already_AddRefed<SVGAnimatedNumber> SVGFEConvolveMatrixElement::Bias() {
   return mNumberAttributes[BIAS].ToDOMAnimatedNumber(this);
 }
 
 already_AddRefed<SVGAnimatedNumber>
 SVGFEConvolveMatrixElement::KernelUnitLengthX() {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eFirst, this);
+      SVGNumberPair::eFirst, this);
 }
 
 already_AddRefed<SVGAnimatedNumber>
 SVGFEConvolveMatrixElement::KernelUnitLengthY() {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eSecond, this);
+      SVGNumberPair::eSecond, this);
 }
 
 void SVGFEConvolveMatrixElement::GetSourceImageNames(
     nsTArray<SVGStringInfo>& aSources) {
   aSources.AppendElement(SVGStringInfo(&mStringAttributes[IN1], this));
 }
 
 FilterPrimitiveDescription SVGFEConvolveMatrixElement::GetPrimitiveDescription(
@@ -131,19 +131,19 @@ FilterPrimitiveDescription SVGFEConvolve
     nsTArray<RefPtr<SourceSurface>>& aInputImages) {
   FilterPrimitiveDescription failureDescription;
 
   const SVGNumberList& kernelMatrix =
       mNumberListAttributes[KERNELMATRIX].GetAnimValue();
   uint32_t kmLength = kernelMatrix.Length();
 
   int32_t orderX =
-      mIntegerPairAttributes[ORDER].GetAnimValue(nsSVGIntegerPair::eFirst);
+      mIntegerPairAttributes[ORDER].GetAnimValue(SVGIntegerPair::eFirst);
   int32_t orderY =
-      mIntegerPairAttributes[ORDER].GetAnimValue(nsSVGIntegerPair::eSecond);
+      mIntegerPairAttributes[ORDER].GetAnimValue(SVGIntegerPair::eSecond);
 
   if (orderX <= 0 || orderY <= 0 ||
       static_cast<uint32_t>(orderX * orderY) != kmLength) {
     return failureDescription;
   }
 
   int32_t targetX, targetY;
   GetAnimatedIntegerValues(&targetX, &targetY, nullptr);
--- a/dom/svg/SVGFEConvolveMatrixElement.h
+++ b/dom/svg/SVGFEConvolveMatrixElement.h
@@ -7,17 +7,17 @@
 #ifndef mozilla_dom_SVGFEConvolveMatrixElement_h
 #define mozilla_dom_SVGFEConvolveMatrixElement_h
 
 #include "SVGAnimatedNumberList.h"
 #include "nsSVGBoolean.h"
 #include "SVGEnum.h"
 #include "SVGFilters.h"
 #include "nsSVGInteger.h"
-#include "nsSVGIntegerPair.h"
+#include "SVGIntegerPair.h"
 #include "nsSVGNumber2.h"
 #include "nsSVGString.h"
 
 nsresult NS_NewSVGFEConvolveMatrixElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 
@@ -77,25 +77,25 @@ class SVGFEConvolveMatrixElement : publi
   virtual StringAttributesInfo GetStringInfo() override;
   virtual NumberListAttributesInfo GetNumberListInfo() override;
 
   enum { DIVISOR, BIAS };
   nsSVGNumber2 mNumberAttributes[2];
   static NumberInfo sNumberInfo[2];
 
   enum { KERNEL_UNIT_LENGTH };
-  nsSVGNumberPair mNumberPairAttributes[1];
+  SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { TARGET_X, TARGET_Y };
   nsSVGInteger mIntegerAttributes[2];
   static IntegerInfo sIntegerInfo[2];
 
   enum { ORDER };
-  nsSVGIntegerPair mIntegerPairAttributes[1];
+  SVGIntegerPair mIntegerPairAttributes[1];
   static IntegerPairInfo sIntegerPairInfo[1];
 
   enum { PRESERVEALPHA };
   nsSVGBoolean mBooleanAttributes[1];
   static BooleanInfo sBooleanInfo[1];
 
   enum { EDGEMODE };
   SVGEnum mEnumAttributes[1];
--- a/dom/svg/SVGFEDiffuseLightingElement.cpp
+++ b/dom/svg/SVGFEDiffuseLightingElement.cpp
@@ -40,23 +40,23 @@ SVGFEDiffuseLightingElement::SurfaceScal
 already_AddRefed<SVGAnimatedNumber>
 SVGFEDiffuseLightingElement::DiffuseConstant() {
   return mNumberAttributes[DIFFUSE_CONSTANT].ToDOMAnimatedNumber(this);
 }
 
 already_AddRefed<SVGAnimatedNumber>
 SVGFEDiffuseLightingElement::KernelUnitLengthX() {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eFirst, this);
+      SVGNumberPair::eFirst, this);
 }
 
 already_AddRefed<SVGAnimatedNumber>
 SVGFEDiffuseLightingElement::KernelUnitLengthY() {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eSecond, this);
+      SVGNumberPair::eSecond, this);
 }
 
 FilterPrimitiveDescription SVGFEDiffuseLightingElement::GetPrimitiveDescription(
     nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     const nsTArray<bool>& aInputsAreTainted,
     nsTArray<RefPtr<SourceSurface>>& aInputImages) {
   float diffuseConstant = mNumberAttributes[DIFFUSE_CONSTANT].GetAnimValue();
 
--- a/dom/svg/SVGFEDropShadowElement.cpp
+++ b/dom/svg/SVGFEDropShadowElement.cpp
@@ -47,40 +47,40 @@ already_AddRefed<SVGAnimatedNumber> SVGF
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFEDropShadowElement::Dy() {
   return mNumberAttributes[DY].ToDOMAnimatedNumber(this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFEDropShadowElement::StdDeviationX() {
   return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eFirst, this);
+      SVGNumberPair::eFirst, this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFEDropShadowElement::StdDeviationY() {
   return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eSecond, this);
+      SVGNumberPair::eSecond, this);
 }
 
 void SVGFEDropShadowElement::SetStdDeviation(float stdDeviationX,
                                              float stdDeviationY) {
   mNumberPairAttributes[STD_DEV].SetBaseValues(stdDeviationX, stdDeviationY,
                                                this);
 }
 
 FilterPrimitiveDescription SVGFEDropShadowElement::GetPrimitiveDescription(
     nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     const nsTArray<bool>& aInputsAreTainted,
     nsTArray<RefPtr<SourceSurface>>& aInputImages) {
   float stdX = aInstance->GetPrimitiveNumber(SVGContentUtils::X,
                                              &mNumberPairAttributes[STD_DEV],
-                                             nsSVGNumberPair::eFirst);
+                                             SVGNumberPair::eFirst);
   float stdY = aInstance->GetPrimitiveNumber(SVGContentUtils::Y,
                                              &mNumberPairAttributes[STD_DEV],
-                                             nsSVGNumberPair::eSecond);
+                                             SVGNumberPair::eSecond);
   if (stdX < 0 || stdY < 0) {
     return FilterPrimitiveDescription();
   }
 
   IntPoint offset(int32_t(aInstance->GetPrimitiveNumber(
                       SVGContentUtils::X, &mNumberAttributes[DX])),
                   int32_t(aInstance->GetPrimitiveNumber(
                       SVGContentUtils::Y, &mNumberAttributes[DY])));
--- a/dom/svg/SVGFEDropShadowElement.h
+++ b/dom/svg/SVGFEDropShadowElement.h
@@ -4,17 +4,17 @@
  * 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_dom_SVGFEDropShadowElement_h
 #define mozilla_dom_SVGFEDropShadowElement_h
 
 #include "SVGFilters.h"
 #include "nsSVGNumber2.h"
-#include "nsSVGNumberPair.h"
+#include "SVGNumberPair.h"
 #include "nsSVGString.h"
 
 nsresult NS_NewSVGFEDropShadowElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
@@ -62,17 +62,17 @@ class SVGFEDropShadowElement : public SV
   virtual NumberPairAttributesInfo GetNumberPairInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { DX, DY };
   nsSVGNumber2 mNumberAttributes[2];
   static NumberInfo sNumberInfo[2];
 
   enum { STD_DEV };
-  nsSVGNumberPair mNumberPairAttributes[1];
+  SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { RESULT, IN1 };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFEGaussianBlurElement.cpp
+++ b/dom/svg/SVGFEGaussianBlurElement.cpp
@@ -36,40 +36,40 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEGau
 //----------------------------------------------------------------------
 
 already_AddRefed<SVGAnimatedString> SVGFEGaussianBlurElement::In1() {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFEGaussianBlurElement::StdDeviationX() {
   return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eFirst, this);
+      SVGNumberPair::eFirst, this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFEGaussianBlurElement::StdDeviationY() {
   return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eSecond, this);
+      SVGNumberPair::eSecond, this);
 }
 
 void SVGFEGaussianBlurElement::SetStdDeviation(float stdDeviationX,
                                                float stdDeviationY) {
   mNumberPairAttributes[STD_DEV].SetBaseValues(stdDeviationX, stdDeviationY,
                                                this);
 }
 
 FilterPrimitiveDescription SVGFEGaussianBlurElement::GetPrimitiveDescription(
     nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     const nsTArray<bool>& aInputsAreTainted,
     nsTArray<RefPtr<SourceSurface>>& aInputImages) {
   float stdX = aInstance->GetPrimitiveNumber(SVGContentUtils::X,
                                              &mNumberPairAttributes[STD_DEV],
-                                             nsSVGNumberPair::eFirst);
+                                             SVGNumberPair::eFirst);
   float stdY = aInstance->GetPrimitiveNumber(SVGContentUtils::Y,
                                              &mNumberPairAttributes[STD_DEV],
-                                             nsSVGNumberPair::eSecond);
+                                             SVGNumberPair::eSecond);
   if (stdX < 0 || stdY < 0) {
     return FilterPrimitiveDescription();
   }
 
   GaussianBlurAttributes atts;
   atts.mStdDeviation = Size(stdX, stdY);
   return FilterPrimitiveDescription(AsVariant(std::move(atts)));
 }
--- a/dom/svg/SVGFEGaussianBlurElement.h
+++ b/dom/svg/SVGFEGaussianBlurElement.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_dom_SVGFEGaussianBlurElement_h
 #define mozilla_dom_SVGFEGaussianBlurElement_h
 
 #include "SVGFilters.h"
-#include "nsSVGNumberPair.h"
+#include "SVGNumberPair.h"
 #include "nsSVGString.h"
 
 nsresult NS_NewSVGFEGaussianBlurElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
@@ -51,17 +51,17 @@ class SVGFEGaussianBlurElement : public 
   already_AddRefed<SVGAnimatedNumber> StdDeviationY();
   void SetStdDeviation(float stdDeviationX, float stdDeviationY);
 
  protected:
   virtual NumberPairAttributesInfo GetNumberPairInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { STD_DEV };
-  nsSVGNumberPair mNumberPairAttributes[1];
+  SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { RESULT, IN1 };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFEMorphologyElement.cpp
+++ b/dom/svg/SVGFEMorphologyElement.cpp
@@ -48,22 +48,22 @@ already_AddRefed<SVGAnimatedString> SVGF
 }
 
 already_AddRefed<SVGAnimatedEnumeration> SVGFEMorphologyElement::Operator() {
   return mEnumAttributes[OPERATOR].ToDOMAnimatedEnum(this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFEMorphologyElement::RadiusX() {
   return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eFirst, this);
+      SVGNumberPair::eFirst, this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFEMorphologyElement::RadiusY() {
   return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eSecond, this);
+      SVGNumberPair::eSecond, this);
 }
 
 void SVGFEMorphologyElement::SetRadius(float rx, float ry) {
   mNumberPairAttributes[RADIUS].SetBaseValues(rx, ry, this);
 }
 
 void SVGFEMorphologyElement::GetSourceImageNames(
     nsTArray<SVGStringInfo>& aSources) {
@@ -75,21 +75,21 @@ void SVGFEMorphologyElement::GetSourceIm
 void SVGFEMorphologyElement::GetRXY(int32_t* aRX, int32_t* aRY,
                                     const nsSVGFilterInstance& aInstance) {
   // Subtract an epsilon here because we don't want a value that's just
   // slightly larger than an integer to round up to the next integer; it's
   // probably meant to be the integer it's close to, modulo machine precision
   // issues.
   *aRX = NSToIntCeil(aInstance.GetPrimitiveNumber(
                          SVGContentUtils::X, &mNumberPairAttributes[RADIUS],
-                         nsSVGNumberPair::eFirst) -
+                         SVGNumberPair::eFirst) -
                      MORPHOLOGY_EPSILON);
   *aRY = NSToIntCeil(aInstance.GetPrimitiveNumber(
                          SVGContentUtils::Y, &mNumberPairAttributes[RADIUS],
-                         nsSVGNumberPair::eSecond) -
+                         SVGNumberPair::eSecond) -
                      MORPHOLOGY_EPSILON);
 }
 
 FilterPrimitiveDescription SVGFEMorphologyElement::GetPrimitiveDescription(
     nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     const nsTArray<bool>& aInputsAreTainted,
     nsTArray<RefPtr<SourceSurface>>& aInputImages) {
   int32_t rx, ry;
--- a/dom/svg/SVGFEMorphologyElement.h
+++ b/dom/svg/SVGFEMorphologyElement.h
@@ -4,17 +4,17 @@
  * 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_dom_SVGFEMorphologyElement_h
 #define mozilla_dom_SVGFEMorphologyElement_h
 
 #include "SVGEnum.h"
 #include "SVGFilters.h"
-#include "nsSVGNumberPair.h"
+#include "SVGNumberPair.h"
 #include "nsSVGString.h"
 
 nsresult NS_NewSVGFEMorphologyElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
@@ -56,17 +56,17 @@ class SVGFEMorphologyElement : public SV
  protected:
   void GetRXY(int32_t* aRX, int32_t* aRY, const nsSVGFilterInstance& aInstance);
 
   virtual NumberPairAttributesInfo GetNumberPairInfo() override;
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { RADIUS };
-  nsSVGNumberPair mNumberPairAttributes[1];
+  SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { OPERATOR };
   SVGEnum mEnumAttributes[1];
   static SVGEnumMapping sOperatorMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1 };
--- a/dom/svg/SVGFESpecularLightingElement.cpp
+++ b/dom/svg/SVGFESpecularLightingElement.cpp
@@ -43,23 +43,23 @@ SVGFESpecularLightingElement::SpecularCo
 already_AddRefed<SVGAnimatedNumber>
 SVGFESpecularLightingElement::SpecularExponent() {
   return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this);
 }
 
 already_AddRefed<SVGAnimatedNumber>
 SVGFESpecularLightingElement::KernelUnitLengthX() {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eFirst, this);
+      SVGNumberPair::eFirst, this);
 }
 
 already_AddRefed<SVGAnimatedNumber>
 SVGFESpecularLightingElement::KernelUnitLengthY() {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eSecond, this);
+      SVGNumberPair::eSecond, this);
 }
 
 //----------------------------------------------------------------------
 // SVGElement methods
 
 FilterPrimitiveDescription
 SVGFESpecularLightingElement::GetPrimitiveDescription(
     nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
--- a/dom/svg/SVGFETurbulenceElement.cpp
+++ b/dom/svg/SVGFETurbulenceElement.cpp
@@ -57,22 +57,22 @@ SVGElement::StringInfo SVGFETurbulenceEl
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFETurbulenceElement)
 
 //----------------------------------------------------------------------
 
 already_AddRefed<SVGAnimatedNumber> SVGFETurbulenceElement::BaseFrequencyX() {
   return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eFirst, this);
+      SVGNumberPair::eFirst, this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFETurbulenceElement::BaseFrequencyY() {
   return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(
-      nsSVGNumberPair::eSecond, this);
+      SVGNumberPair::eSecond, this);
 }
 
 already_AddRefed<SVGAnimatedInteger> SVGFETurbulenceElement::NumOctaves() {
   return mIntegerAttributes[OCTAVES].ToDOMAnimatedInteger(this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFETurbulenceElement::Seed() {
   return mNumberAttributes[SEED].ToDOMAnimatedNumber(this);
@@ -86,19 +86,19 @@ already_AddRefed<SVGAnimatedEnumeration>
   return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this);
 }
 
 FilterPrimitiveDescription SVGFETurbulenceElement::GetPrimitiveDescription(
     nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     const nsTArray<bool>& aInputsAreTainted,
     nsTArray<RefPtr<SourceSurface>>& aInputImages) {
   float fX =
-      mNumberPairAttributes[BASE_FREQ].GetAnimValue(nsSVGNumberPair::eFirst);
+      mNumberPairAttributes[BASE_FREQ].GetAnimValue(SVGNumberPair::eFirst);
   float fY =
-      mNumberPairAttributes[BASE_FREQ].GetAnimValue(nsSVGNumberPair::eSecond);
+      mNumberPairAttributes[BASE_FREQ].GetAnimValue(SVGNumberPair::eSecond);
   float seed = mNumberAttributes[OCTAVES].GetAnimValue();
   uint32_t octaves =
       clamped(mIntegerAttributes[OCTAVES].GetAnimValue(), 0, MAX_OCTAVES);
   uint32_t type = mEnumAttributes[TYPE].GetAnimValue();
   uint16_t stitch = mEnumAttributes[STITCHTILES].GetAnimValue();
 
   if (fX == 0 && fY == 0) {
     // A base frequency of zero results in transparent black for
--- a/dom/svg/SVGFETurbulenceElement.h
+++ b/dom/svg/SVGFETurbulenceElement.h
@@ -63,17 +63,17 @@ class SVGFETurbulenceElement : public SV
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { SEED };  // floating point seed?!
   nsSVGNumber2 mNumberAttributes[1];
   static NumberInfo sNumberInfo[1];
 
   enum { BASE_FREQ };
-  nsSVGNumberPair mNumberPairAttributes[1];
+  SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { OCTAVES };
   nsSVGInteger mIntegerAttributes[1];
   static IntegerInfo sIntegerInfo[1];
 
   enum { TYPE, STITCHTILES };
   SVGEnum mEnumAttributes[2];
--- a/dom/svg/SVGFilterElement.h
+++ b/dom/svg/SVGFilterElement.h
@@ -3,17 +3,16 @@
 /* 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_dom_SVGFilterElement_h
 #define mozilla_dom_SVGFilterElement_h
 
 #include "SVGEnum.h"
-#include "nsSVGIntegerPair.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
 #include "mozilla/dom/SVGElement.h"
 
 class nsSVGFilterFrame;
 class nsSVGFilterInstance;
 
 nsresult NS_NewSVGFilterElement(
--- a/dom/svg/SVGFilters.cpp
+++ b/dom/svg/SVGFilters.cpp
@@ -9,24 +9,20 @@
 #include <algorithm>
 #include "DOMSVGAnimatedNumberList.h"
 #include "imgIContainer.h"
 #include "nsGkAtoms.h"
 #include "nsCOMPtr.h"
 #include "nsIFrame.h"
 #include "nsLayoutUtils.h"
 #include "SVGAnimatedNumberList.h"
-#include "nsSVGBoolean.h"
 #include "SVGEnum.h"
 #include "nsSVGFilterInstance.h"
-#include "nsSVGInteger.h"
-#include "nsSVGIntegerPair.h"
-#include "nsSVGNumber2.h"
-#include "nsSVGNumberPair.h"
 #include "SVGNumberList.h"
+#include "SVGNumberPair.h"
 #include "nsSVGString.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/ComputedStyle.h"
 #include "mozilla/SVGContentUtils.h"
 #include "nsSVGUtils.h"
 #include "mozilla/dom/SVGAnimatedLength.h"
 #include "mozilla/dom/SVGComponentTransferFunctionElement.h"
 #include "mozilla/dom/SVGElement.h"
@@ -143,25 +139,25 @@ bool SVGFE::StyleIsSetToSRGB() {
 /* virtual */ bool SVGFE::HasValidDimensions() const {
   return (!mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() ||
           mLengthAttributes[ATTR_WIDTH].GetAnimValInSpecifiedUnits() > 0) &&
          (!mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet() ||
           mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0);
 }
 
 Size SVGFE::GetKernelUnitLength(nsSVGFilterInstance* aInstance,
-                                nsSVGNumberPair* aKernelUnitLength) {
+                                SVGNumberPair* aKernelUnitLength) {
   if (!aKernelUnitLength->IsExplicitlySet()) {
     return Size(1, 1);
   }
 
   float kernelX = aInstance->GetPrimitiveNumber(
-      SVGContentUtils::X, aKernelUnitLength, nsSVGNumberPair::eFirst);
+      SVGContentUtils::X, aKernelUnitLength, SVGNumberPair::eFirst);
   float kernelY = aInstance->GetPrimitiveNumber(
-      SVGContentUtils::Y, aKernelUnitLength, nsSVGNumberPair::eSecond);
+      SVGContentUtils::Y, aKernelUnitLength, SVGNumberPair::eSecond);
   return Size(kernelX, kernelY);
 }
 
 SVGElement::LengthAttributesInfo SVGFE::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
--- a/dom/svg/SVGFilters.h
+++ b/dom/svg/SVGFilters.h
@@ -3,26 +3,25 @@
 /* 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 __NS_SVGFILTERSELEMENT_H__
 #define __NS_SVGFILTERSELEMENT_H__
 
 #include "mozilla/Attributes.h"
+#include "mozilla/dom/SVGElement.h"
+#include "FilterSupport.h"
 #include "nsImageLoadingContent.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
-#include "SVGElement.h"
 #include "nsSVGNumber2.h"
-#include "nsSVGNumberPair.h"
-#include "FilterSupport.h"
+#include "SVGNumberPair.h"
 
 class nsSVGFilterInstance;
-class nsSVGNumberPair;
 
 namespace mozilla {
 namespace dom {
 
 struct SVGStringInfo {
   SVGStringInfo(const nsSVGString* aString, SVGElement* aElement)
       : mString(aString), mElement(aElement) {}
 
@@ -142,17 +141,17 @@ class SVGFE : public SVGFEBase {
   virtual bool ProducesSRGB() { return StyleIsSetToSRGB(); }
 
   bool StyleIsSetToSRGB();
 
   // SVGElement specializations:
   virtual LengthAttributesInfo GetLengthInfo() override;
 
   Size GetKernelUnitLength(nsSVGFilterInstance* aInstance,
-                           nsSVGNumberPair* aKernelUnitLength);
+                           SVGNumberPair* aKernelUnitLength);
 
   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(SVGFE, NS_SVG_FE_CID)
 
@@ -221,17 +220,17 @@ class SVGFELightingElement : public SVGF
     DIFFUSE_CONSTANT,
     SPECULAR_CONSTANT,
     SPECULAR_EXPONENT
   };
   nsSVGNumber2 mNumberAttributes[4];
   static NumberInfo sNumberInfo[4];
 
   enum { KERNEL_UNIT_LENGTH };
-  nsSVGNumberPair mNumberPairAttributes[1];
+  SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { RESULT, IN1 };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 typedef SVGFEUnstyledElement SVGFELightElementBase;
rename from dom/svg/nsSVGIntegerPair.cpp
rename to dom/svg/SVGIntegerPair.cpp
--- a/dom/svg/nsSVGIntegerPair.cpp
+++ b/dom/svg/SVGIntegerPair.cpp
@@ -1,31 +1,30 @@
 /* -*- 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 "nsSVGIntegerPair.h"
+#include "SVGIntegerPair.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsError.h"
 #include "nsMathUtils.h"
 #include "nsSMILValue.h"
 #include "SVGContentUtils.h"
 #include "SVGIntegerPairSMILType.h"
 
-using namespace mozilla;
 using namespace mozilla::dom;
 
-static nsSVGAttrTearoffTable<nsSVGIntegerPair,
-                             nsSVGIntegerPair::DOMAnimatedInteger>
+namespace mozilla {
+
+static nsSVGAttrTearoffTable<SVGIntegerPair, SVGIntegerPair::DOMAnimatedInteger>
     sSVGFirstAnimatedIntegerTearoffTable;
-static nsSVGAttrTearoffTable<nsSVGIntegerPair,
-                             nsSVGIntegerPair::DOMAnimatedInteger>
+static nsSVGAttrTearoffTable<SVGIntegerPair, SVGIntegerPair::DOMAnimatedInteger>
     sSVGSecondAnimatedIntegerTearoffTable;
 
 /* Implementation */
 
 static nsresult ParseIntegerOptionalInteger(const nsAString& aValue,
                                             int32_t aValues[2]) {
   nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace> tokenizer(
       aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
@@ -48,18 +47,18 @@ static nsresult ParseIntegerOptionalInte
       tokenizer.whitespaceAfterCurrentToken() ||  // Trailing whitespace.
       tokenizer.separatorAfterCurrentToken()) {   // Trailing comma.
     return NS_ERROR_DOM_SYNTAX_ERR;
   }
 
   return NS_OK;
 }
 
-nsresult nsSVGIntegerPair::SetBaseValueString(const nsAString& aValueAsString,
-                                              SVGElement* aSVGElement) {
+nsresult SVGIntegerPair::SetBaseValueString(const nsAString& aValueAsString,
+                                            SVGElement* aSVGElement) {
   int32_t val[2];
 
   nsresult rv = ParseIntegerOptionalInteger(aValueAsString, val);
 
   if (NS_FAILED(rv)) {
     return rv;
   }
 
@@ -74,45 +73,45 @@ nsresult nsSVGIntegerPair::SetBaseValueS
   }
 
   // We don't need to call DidChange* here - we're only called by
   // SVGElement::ParseAttribute under Element::SetAttr,
   // which takes care of notifying.
   return NS_OK;
 }
 
-void nsSVGIntegerPair::GetBaseValueString(nsAString& aValueAsString) const {
+void SVGIntegerPair::GetBaseValueString(nsAString& aValueAsString) const {
   aValueAsString.Truncate();
   aValueAsString.AppendInt(mBaseVal[0]);
   if (mBaseVal[0] != mBaseVal[1]) {
     aValueAsString.AppendLiteral(", ");
     aValueAsString.AppendInt(mBaseVal[1]);
   }
 }
 
-void nsSVGIntegerPair::SetBaseValue(int32_t aValue, PairIndex aPairIndex,
-                                    SVGElement* aSVGElement) {
+void SVGIntegerPair::SetBaseValue(int32_t aValue, PairIndex aPairIndex,
+                                  SVGElement* aSVGElement) {
   uint32_t index = (aPairIndex == eFirst ? 0 : 1);
   if (mIsBaseSet && mBaseVal[index] == aValue) {
     return;
   }
 
   nsAttrValue emptyOrOldValue = aSVGElement->WillChangeIntegerPair(mAttrEnum);
   mBaseVal[index] = aValue;
   mIsBaseSet = true;
   if (!mIsAnimated) {
     mAnimVal[index] = aValue;
   } else {
     aSVGElement->AnimationNeedsResample();
   }
   aSVGElement->DidChangeIntegerPair(mAttrEnum, emptyOrOldValue);
 }
 
-void nsSVGIntegerPair::SetBaseValues(int32_t aValue1, int32_t aValue2,
-                                     SVGElement* aSVGElement) {
+void SVGIntegerPair::SetBaseValues(int32_t aValue1, int32_t aValue2,
+                                   SVGElement* aSVGElement) {
   if (mIsBaseSet && mBaseVal[0] == aValue1 && mBaseVal[1] == aValue2) {
     return;
   }
 
   nsAttrValue emptyOrOldValue = aSVGElement->WillChangeIntegerPair(mAttrEnum);
   mBaseVal[0] = aValue1;
   mBaseVal[1] = aValue2;
   mIsBaseSet = true;
@@ -120,28 +119,28 @@ void nsSVGIntegerPair::SetBaseValues(int
     mAnimVal[0] = aValue1;
     mAnimVal[1] = aValue2;
   } else {
     aSVGElement->AnimationNeedsResample();
   }
   aSVGElement->DidChangeIntegerPair(mAttrEnum, emptyOrOldValue);
 }
 
-void nsSVGIntegerPair::SetAnimValue(const int32_t aValue[2],
-                                    SVGElement* aSVGElement) {
+void SVGIntegerPair::SetAnimValue(const int32_t aValue[2],
+                                  SVGElement* aSVGElement) {
   if (mIsAnimated && mAnimVal[0] == aValue[0] && mAnimVal[1] == aValue[1]) {
     return;
   }
   mAnimVal[0] = aValue[0];
   mAnimVal[1] = aValue[1];
   mIsAnimated = true;
   aSVGElement->DidAnimateIntegerPair(mAttrEnum);
 }
 
-already_AddRefed<SVGAnimatedInteger> nsSVGIntegerPair::ToDOMAnimatedInteger(
+already_AddRefed<SVGAnimatedInteger> SVGIntegerPair::ToDOMAnimatedInteger(
     PairIndex aIndex, SVGElement* aSVGElement) {
   RefPtr<DOMAnimatedInteger> domAnimatedInteger =
       aIndex == eFirst ? sSVGFirstAnimatedIntegerTearoffTable.GetTearoff(this)
                        : sSVGSecondAnimatedIntegerTearoffTable.GetTearoff(this);
   if (!domAnimatedInteger) {
     domAnimatedInteger = new DOMAnimatedInteger(this, aIndex, aSVGElement);
     if (aIndex == eFirst) {
       sSVGFirstAnimatedIntegerTearoffTable.AddTearoff(this, domAnimatedInteger);
@@ -149,29 +148,29 @@ already_AddRefed<SVGAnimatedInteger> nsS
       sSVGSecondAnimatedIntegerTearoffTable.AddTearoff(this,
                                                        domAnimatedInteger);
     }
   }
 
   return domAnimatedInteger.forget();
 }
 
-nsSVGIntegerPair::DOMAnimatedInteger::~DOMAnimatedInteger() {
+SVGIntegerPair::DOMAnimatedInteger::~DOMAnimatedInteger() {
   if (mIndex == eFirst) {
     sSVGFirstAnimatedIntegerTearoffTable.RemoveTearoff(mVal);
   } else {
     sSVGSecondAnimatedIntegerTearoffTable.RemoveTearoff(mVal);
   }
 }
 
-UniquePtr<nsISMILAttr> nsSVGIntegerPair::ToSMILAttr(SVGElement* aSVGElement) {
+UniquePtr<nsISMILAttr> SVGIntegerPair::ToSMILAttr(SVGElement* aSVGElement) {
   return MakeUnique<SMILIntegerPair>(this, aSVGElement);
 }
 
-nsresult nsSVGIntegerPair::SMILIntegerPair::ValueFromString(
+nsresult SVGIntegerPair::SMILIntegerPair::ValueFromString(
     const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
     nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const {
   int32_t values[2];
 
   nsresult rv = ParseIntegerOptionalInteger(aStr, values);
   if (NS_FAILED(rv)) {
     return rv;
   }
@@ -180,33 +179,35 @@ nsresult nsSVGIntegerPair::SMILIntegerPa
   val.mU.mIntPair[0] = values[0];
   val.mU.mIntPair[1] = values[1];
   aValue = val;
   aPreventCachingOfSandwich = false;
 
   return NS_OK;
 }
 
-nsSMILValue nsSVGIntegerPair::SMILIntegerPair::GetBaseValue() const {
+nsSMILValue SVGIntegerPair::SMILIntegerPair::GetBaseValue() const {
   nsSMILValue val(SVGIntegerPairSMILType::Singleton());
   val.mU.mIntPair[0] = mVal->mBaseVal[0];
   val.mU.mIntPair[1] = mVal->mBaseVal[1];
   return val;
 }
 
-void nsSVGIntegerPair::SMILIntegerPair::ClearAnimValue() {
+void SVGIntegerPair::SMILIntegerPair::ClearAnimValue() {
   if (mVal->mIsAnimated) {
     mVal->mIsAnimated = false;
     mVal->mAnimVal[0] = mVal->mBaseVal[0];
     mVal->mAnimVal[1] = mVal->mBaseVal[1];
     mSVGElement->DidAnimateIntegerPair(mVal->mAttrEnum);
   }
 }
 
-nsresult nsSVGIntegerPair::SMILIntegerPair::SetAnimValue(
+nsresult SVGIntegerPair::SMILIntegerPair::SetAnimValue(
     const nsSMILValue& aValue) {
   NS_ASSERTION(aValue.mType == SVGIntegerPairSMILType::Singleton(),
                "Unexpected type to assign animated value");
   if (aValue.mType == SVGIntegerPairSMILType::Singleton()) {
     mVal->SetAnimValue(aValue.mU.mIntPair, mSVGElement);
   }
   return NS_OK;
 }
+
+}  // namespace mozilla
rename from dom/svg/nsSVGIntegerPair.h
rename to dom/svg/SVGIntegerPair.h
--- a/dom/svg/nsSVGIntegerPair.h
+++ b/dom/svg/SVGIntegerPair.h
@@ -5,30 +5,29 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __NS_SVGINTEGERPAIR_H__
 #define __NS_SVGINTEGERPAIR_H__
 
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
 #include "nsISMILAttr.h"
-#include "SVGElement.h"
 #include "mozilla/Attributes.h"
+#include "mozilla/UniquePtr.h"
 #include "mozilla/dom/SVGAnimatedInteger.h"
-#include "mozilla/UniquePtr.h"
 
 class nsSMILValue;
 
 namespace mozilla {
 namespace dom {
 class SVGAnimationElement;
+class SVGElement;
 }  // namespace dom
-}  // namespace mozilla
 
-class nsSVGIntegerPair {
+class SVGIntegerPair {
  public:
   typedef mozilla::dom::SVGElement SVGElement;
 
   enum PairIndex { eFirst, eSecond };
 
   void Init(uint8_t aAttrEnum = 0xff, int32_t aValue1 = 0,
             int32_t aValue2 = 0) {
     mAnimVal[0] = mBaseVal[0] = aValue1;
@@ -66,24 +65,24 @@ class nsSVGIntegerPair {
   int32_t mAnimVal[2];
   int32_t mBaseVal[2];
   uint8_t mAttrEnum;  // element specified tracking for attribute
   bool mIsAnimated;
   bool mIsBaseSet;
 
  public:
   struct DOMAnimatedInteger final : public mozilla::dom::SVGAnimatedInteger {
-    DOMAnimatedInteger(nsSVGIntegerPair* aVal, PairIndex aIndex,
+    DOMAnimatedInteger(SVGIntegerPair* aVal, PairIndex aIndex,
                        SVGElement* aSVGElement)
         : mozilla::dom::SVGAnimatedInteger(aSVGElement),
           mVal(aVal),
           mIndex(aIndex) {}
     virtual ~DOMAnimatedInteger();
 
-    nsSVGIntegerPair* mVal;  // kept alive because it belongs to content
+    SVGIntegerPair* mVal;    // kept alive because it belongs to content
     PairIndex mIndex;        // are we the first or second integer
 
     virtual int32_t BaseVal() override { return mVal->GetBaseValue(mIndex); }
     virtual void SetBaseVal(int32_t aValue) override {
       mVal->SetBaseValue(aValue, mIndex, mSVGElement);
     }
 
     // Script may have modified animation parameters or timeline -- DOM getters
@@ -91,29 +90,31 @@ class nsSVGIntegerPair {
     virtual int32_t AnimVal() override {
       mSVGElement->FlushAnimations();
       return mVal->GetAnimValue(mIndex);
     }
   };
 
   struct SMILIntegerPair : public nsISMILAttr {
    public:
-    SMILIntegerPair(nsSVGIntegerPair* aVal, SVGElement* aSVGElement)
+    SMILIntegerPair(SVGIntegerPair* aVal, SVGElement* aSVGElement)
         : mVal(aVal), mSVGElement(aSVGElement) {}
 
     // These will stay alive because a nsISMILAttr only lives as long
     // as the Compositing step, and DOM elements don't get a chance to
     // die during that.
-    nsSVGIntegerPair* mVal;
+    SVGIntegerPair* mVal;
     SVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(
         const nsAString& aStr,
         const mozilla::dom::SVGAnimationElement* aSrcElement,
         nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
     virtual nsSMILValue GetBaseValue() const override;
     virtual void ClearAnimValue() override;
     virtual nsresult SetAnimValue(const nsSMILValue& aValue) override;
   };
 };
 
+}  // namespace mozilla
+
 #endif  //__NS_SVGINTEGERPAIR_H__
rename from dom/svg/nsSVGNumberPair.cpp
rename to dom/svg/SVGNumberPair.cpp
--- a/dom/svg/nsSVGNumberPair.cpp
+++ b/dom/svg/SVGNumberPair.cpp
@@ -1,29 +1,28 @@
 /* -*- 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 "nsSVGNumberPair.h"
+#include "SVGNumberPair.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsSMILValue.h"
 #include "SVGContentUtils.h"
 #include "SVGNumberPairSMILType.h"
 
-using namespace mozilla;
 using namespace mozilla::dom;
 
-static nsSVGAttrTearoffTable<nsSVGNumberPair,
-                             nsSVGNumberPair::DOMAnimatedNumber>
+namespace mozilla {
+
+static nsSVGAttrTearoffTable<SVGNumberPair, SVGNumberPair::DOMAnimatedNumber>
     sSVGFirstAnimatedNumberTearoffTable;
-static nsSVGAttrTearoffTable<nsSVGNumberPair,
-                             nsSVGNumberPair::DOMAnimatedNumber>
+static nsSVGAttrTearoffTable<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;
@@ -44,18 +43,18 @@ static nsresult ParseNumberOptionalNumbe
       tokenizer.whitespaceAfterCurrentToken() ||  // Trailing whitespace.
       tokenizer.separatorAfterCurrentToken()) {   // Trailing comma.
     return NS_ERROR_DOM_SYNTAX_ERR;
   }
 
   return NS_OK;
 }
 
-nsresult nsSVGNumberPair::SetBaseValueString(const nsAString& aValueAsString,
-                                             SVGElement* aSVGElement) {
+nsresult SVGNumberPair::SetBaseValueString(const nsAString& aValueAsString,
+                                           SVGElement* aSVGElement) {
   float val[2];
 
   nsresult rv = ParseNumberOptionalNumber(aValueAsString, val);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   mBaseVal[0] = val[0];
@@ -69,101 +68,101 @@ nsresult nsSVGNumberPair::SetBaseValueSt
   }
 
   // We don't need to call Will/DidChange* here - we're only called by
   // SVGElement::ParseAttribute under Element::SetAttr,
   // which takes care of notifying.
   return NS_OK;
 }
 
-void nsSVGNumberPair::GetBaseValueString(nsAString& aValueAsString) const {
+void SVGNumberPair::GetBaseValueString(nsAString& aValueAsString) const {
   aValueAsString.Truncate();
   aValueAsString.AppendFloat(mBaseVal[0]);
   if (mBaseVal[0] != mBaseVal[1]) {
     aValueAsString.AppendLiteral(", ");
     aValueAsString.AppendFloat(mBaseVal[1]);
   }
 }
 
-void nsSVGNumberPair::SetBaseValue(float aValue, PairIndex aPairIndex,
-                                   SVGElement* aSVGElement) {
+void SVGNumberPair::SetBaseValue(float aValue, PairIndex aPairIndex,
+                                 SVGElement* aSVGElement) {
   uint32_t index = (aPairIndex == eFirst ? 0 : 1);
   if (mIsBaseSet && mBaseVal[index] == aValue) {
     return;
   }
   nsAttrValue emptyOrOldValue = aSVGElement->WillChangeNumberPair(mAttrEnum);
   mBaseVal[index] = aValue;
   mIsBaseSet = true;
   if (!mIsAnimated) {
     mAnimVal[index] = aValue;
   } else {
     aSVGElement->AnimationNeedsResample();
   }
   aSVGElement->DidChangeNumberPair(mAttrEnum, emptyOrOldValue);
 }
 
-void nsSVGNumberPair::SetBaseValues(float aValue1, float aValue2,
-                                    SVGElement* aSVGElement) {
+void SVGNumberPair::SetBaseValues(float aValue1, float aValue2,
+                                  SVGElement* aSVGElement) {
   if (mIsBaseSet && mBaseVal[0] == aValue1 && mBaseVal[1] == aValue2) {
     return;
   }
   nsAttrValue emptyOrOldValue = aSVGElement->WillChangeNumberPair(mAttrEnum);
   mBaseVal[0] = aValue1;
   mBaseVal[1] = aValue2;
   mIsBaseSet = true;
   if (!mIsAnimated) {
     mAnimVal[0] = aValue1;
     mAnimVal[1] = aValue2;
   } else {
     aSVGElement->AnimationNeedsResample();
   }
   aSVGElement->DidChangeNumberPair(mAttrEnum, emptyOrOldValue);
 }
 
-void nsSVGNumberPair::SetAnimValue(const float aValue[2],
-                                   SVGElement* aSVGElement) {
+void SVGNumberPair::SetAnimValue(const float aValue[2],
+                                 SVGElement* aSVGElement) {
   if (mIsAnimated && mAnimVal[0] == aValue[0] && mAnimVal[1] == aValue[1]) {
     return;
   }
   mAnimVal[0] = aValue[0];
   mAnimVal[1] = aValue[1];
   mIsAnimated = true;
   aSVGElement->DidAnimateNumberPair(mAttrEnum);
 }
 
-already_AddRefed<SVGAnimatedNumber> nsSVGNumberPair::ToDOMAnimatedNumber(
+already_AddRefed<SVGAnimatedNumber> SVGNumberPair::ToDOMAnimatedNumber(
     PairIndex aIndex, SVGElement* aSVGElement) {
   RefPtr<DOMAnimatedNumber> domAnimatedNumber =
       aIndex == eFirst ? sSVGFirstAnimatedNumberTearoffTable.GetTearoff(this)
                        : sSVGSecondAnimatedNumberTearoffTable.GetTearoff(this);
   if (!domAnimatedNumber) {
     domAnimatedNumber = new DOMAnimatedNumber(this, aIndex, aSVGElement);
     if (aIndex == eFirst) {
       sSVGFirstAnimatedNumberTearoffTable.AddTearoff(this, domAnimatedNumber);
     } else {
       sSVGSecondAnimatedNumberTearoffTable.AddTearoff(this, domAnimatedNumber);
     }
   }
 
   return domAnimatedNumber.forget();
 }
 
-nsSVGNumberPair::DOMAnimatedNumber::~DOMAnimatedNumber() {
+SVGNumberPair::DOMAnimatedNumber::~DOMAnimatedNumber() {
   if (mIndex == eFirst) {
     sSVGFirstAnimatedNumberTearoffTable.RemoveTearoff(mVal);
   } else {
     sSVGSecondAnimatedNumberTearoffTable.RemoveTearoff(mVal);
   }
 }
 
-UniquePtr<nsISMILAttr> nsSVGNumberPair::ToSMILAttr(SVGElement* aSVGElement) {
+UniquePtr<nsISMILAttr> SVGNumberPair::ToSMILAttr(SVGElement* aSVGElement) {
   return MakeUnique<SMILNumberPair>(this, aSVGElement);
 }
 
-nsresult nsSVGNumberPair::SMILNumberPair::ValueFromString(
+nsresult SVGNumberPair::SMILNumberPair::ValueFromString(
     const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
     nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const {
   float values[2];
 
   nsresult rv = ParseNumberOptionalNumber(aStr, values);
   if (NS_FAILED(rv)) {
     return rv;
   }
@@ -172,33 +171,35 @@ nsresult nsSVGNumberPair::SMILNumberPair
   val.mU.mNumberPair[0] = values[0];
   val.mU.mNumberPair[1] = values[1];
   aValue = val;
   aPreventCachingOfSandwich = false;
 
   return NS_OK;
 }
 
-nsSMILValue nsSVGNumberPair::SMILNumberPair::GetBaseValue() const {
+nsSMILValue SVGNumberPair::SMILNumberPair::GetBaseValue() const {
   nsSMILValue val(&SVGNumberPairSMILType::sSingleton);
   val.mU.mNumberPair[0] = mVal->mBaseVal[0];
   val.mU.mNumberPair[1] = mVal->mBaseVal[1];
   return val;
 }
 
-void nsSVGNumberPair::SMILNumberPair::ClearAnimValue() {
+void SVGNumberPair::SMILNumberPair::ClearAnimValue() {
   if (mVal->mIsAnimated) {
     mVal->mIsAnimated = false;
     mVal->mAnimVal[0] = mVal->mBaseVal[0];
     mVal->mAnimVal[1] = mVal->mBaseVal[1];
     mSVGElement->DidAnimateNumberPair(mVal->mAttrEnum);
   }
 }
 
-nsresult nsSVGNumberPair::SMILNumberPair::SetAnimValue(
+nsresult SVGNumberPair::SMILNumberPair::SetAnimValue(
     const nsSMILValue& aValue) {
   NS_ASSERTION(aValue.mType == &SVGNumberPairSMILType::sSingleton,
                "Unexpected type to assign animated value");
   if (aValue.mType == &SVGNumberPairSMILType::sSingleton) {
     mVal->SetAnimValue(aValue.mU.mNumberPair, mSVGElement);
   }
   return NS_OK;
 }
+
+}  // namespace mozilla
rename from dom/svg/nsSVGNumberPair.h
rename to dom/svg/SVGNumberPair.h
--- a/dom/svg/nsSVGNumberPair.h
+++ b/dom/svg/SVGNumberPair.h
@@ -6,31 +6,30 @@
 
 #ifndef __NS_SVGNUMBERPAIR_H__
 #define __NS_SVGNUMBERPAIR_H__
 
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
 #include "nsISMILAttr.h"
 #include "nsMathUtils.h"
-#include "SVGElement.h"
+#include "mozilla/dom/SVGAnimatedNumber.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/dom/SVGAnimatedNumber.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/UniquePtr.h"
 
 class nsSMILValue;
 
 namespace mozilla {
 namespace dom {
 class SVGAnimationElement;
+class SVGElement;
 }  // namespace dom
-}  // namespace mozilla
 
-class nsSVGNumberPair {
+class SVGNumberPair {
  public:
   typedef mozilla::dom::SVGElement SVGElement;
 
   enum PairIndex { eFirst, eSecond };
 
   void Init(uint8_t aAttrEnum = 0xff, float aValue1 = 0, float aValue2 = 0) {
     mAnimVal[0] = mBaseVal[0] = aValue1;
     mAnimVal[1] = mBaseVal[1] = aValue2;
@@ -67,24 +66,24 @@ class nsSVGNumberPair {
   float mAnimVal[2];
   float mBaseVal[2];
   uint8_t mAttrEnum;  // element specified tracking for attribute
   bool mIsAnimated;
   bool mIsBaseSet;
 
  public:
   struct DOMAnimatedNumber final : public mozilla::dom::SVGAnimatedNumber {
-    DOMAnimatedNumber(nsSVGNumberPair* aVal, PairIndex aIndex,
+    DOMAnimatedNumber(SVGNumberPair* aVal, PairIndex aIndex,
                       SVGElement* aSVGElement)
         : mozilla::dom::SVGAnimatedNumber(aSVGElement),
           mVal(aVal),
           mIndex(aIndex) {}
     virtual ~DOMAnimatedNumber();
 
-    nsSVGNumberPair* mVal;  // kept alive because it belongs to content
+    SVGNumberPair* mVal;    // kept alive because it belongs to content
     PairIndex mIndex;       // are we the first or second number
 
     virtual float BaseVal() override { return mVal->GetBaseValue(mIndex); }
     virtual void SetBaseVal(float aValue) override {
       MOZ_ASSERT(mozilla::IsFinite(aValue));
       mVal->SetBaseValue(aValue, mIndex, mSVGElement);
     }
 
@@ -93,29 +92,31 @@ class nsSVGNumberPair {
     virtual float AnimVal() override {
       mSVGElement->FlushAnimations();
       return mVal->GetAnimValue(mIndex);
     }
   };
 
   struct SMILNumberPair : public nsISMILAttr {
    public:
-    SMILNumberPair(nsSVGNumberPair* aVal, SVGElement* aSVGElement)
+    SMILNumberPair(SVGNumberPair* aVal, SVGElement* aSVGElement)
         : mVal(aVal), mSVGElement(aSVGElement) {}
 
     // These will stay alive because a nsISMILAttr only lives as long
     // as the Compositing step, and DOM elements don't get a chance to
     // die during that.
-    nsSVGNumberPair* mVal;
+    SVGNumberPair* mVal;
     SVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(
         const nsAString& aStr,
         const mozilla::dom::SVGAnimationElement* aSrcElement,
         nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
     virtual nsSMILValue GetBaseValue() const override;
     virtual void ClearAnimValue() override;
     virtual nsresult SetAnimValue(const nsSMILValue& aValue) override;
   };
 };
 
+}  // namespace mozilla
+
 #endif  //__NS_SVGNUMBERPAIR_H__
--- a/dom/svg/moz.build
+++ b/dom/svg/moz.build
@@ -120,20 +120,18 @@ UNIFIED_SOURCES += [
     'DOMSVGPoint.cpp',
     'DOMSVGPointList.cpp',
     'DOMSVGStringList.cpp',
     'DOMSVGTransform.cpp',
     'DOMSVGTransformList.cpp',
     'nsISVGPoint.cpp',
     'nsSVGBoolean.cpp',
     'nsSVGInteger.cpp',
-    'nsSVGIntegerPair.cpp',
     'nsSVGLength2.cpp',
     'nsSVGNumber2.cpp',
-    'nsSVGNumberPair.cpp',
     'nsSVGString.cpp',
     'nsSVGViewBox.cpp',
     'SVGAElement.cpp',
     'SVGAngle.cpp',
     'SVGAnimatedAngle.cpp',
     'SVGAnimatedBoolean.cpp',
     'SVGAnimatedEnumeration.cpp',
     'SVGAnimatedInteger.cpp',
@@ -189,32 +187,34 @@ UNIFIED_SOURCES += [
     'SVGFilters.cpp',
     'SVGForeignObjectElement.cpp',
     'SVGFragmentIdentifier.cpp',
     'SVGGElement.cpp',
     'SVGGeometryElement.cpp',
     'SVGGradientElement.cpp',
     'SVGGraphicsElement.cpp',
     'SVGImageElement.cpp',
+    'SVGIntegerPair.cpp',
     'SVGIntegerPairSMILType.cpp',
     'SVGLength.cpp',
     'SVGLengthList.cpp',
     'SVGLengthListSMILType.cpp',
     'SVGLineElement.cpp',
     'SVGMarkerElement.cpp',
     'SVGMaskElement.cpp',
     'SVGMatrix.cpp',
     'SVGMetadataElement.cpp',
     'SVGMotionSMILAnimationFunction.cpp',
     'SVGMotionSMILAttr.cpp',
     'SVGMotionSMILPathUtils.cpp',
     'SVGMotionSMILType.cpp',
     'SVGMPathElement.cpp',
     'SVGNumberList.cpp',
     'SVGNumberListSMILType.cpp',
+    'SVGNumberPair.cpp',
     'SVGNumberPairSMILType.cpp',
     'SVGOrientSMILType.cpp',
     'SVGPathData.cpp',
     'SVGPathDataParser.cpp',
     'SVGPathElement.cpp',
     'SVGPathSegListSMILType.cpp',
     'SVGPathSegUtils.cpp',
     'SVGPatternElement.cpp',
--- a/layout/svg/nsFilterInstance.h
+++ b/layout/svg/nsFilterInstance.h
@@ -6,23 +6,21 @@
 
 #ifndef __NS_FILTERINSTANCE_H__
 #define __NS_FILTERINSTANCE_H__
 
 #include "gfxMatrix.h"
 #include "gfxPoint.h"
 #include "gfxRect.h"
 #include "nsCOMPtr.h"
+#include "FilterSupport.h"
 #include "nsHashKeys.h"
 #include "nsPoint.h"
 #include "nsRect.h"
 #include "nsSize.h"
-#include "SVGFilters.h"
-#include "nsSVGNumber2.h"
-#include "nsSVGNumberPair.h"
 #include "nsTArray.h"
 #include "nsIFrame.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/webrender/WebRenderTypes.h"
 
 class gfxContext;
 class nsIFrame;
 class nsSVGFilterPaintCallback;
--- a/layout/svg/nsSVGFilterInstance.h
+++ b/layout/svg/nsSVGFilterInstance.h
@@ -6,17 +6,17 @@
 
 #ifndef __NS_SVGFILTERINSTANCE_H__
 #define __NS_SVGFILTERINSTANCE_H__
 
 #include "gfxMatrix.h"
 #include "gfxRect.h"
 #include "SVGFilters.h"
 #include "nsSVGNumber2.h"
-#include "nsSVGNumberPair.h"
+#include "SVGNumberPair.h"
 #include "nsTArray.h"
 
 class nsSVGFilterFrame;
 struct nsStyleFilter;
 
 namespace mozilla {
 namespace dom {
 class SVGFilterElement;
@@ -60,16 +60,17 @@ class SVGFilterElement;
  * div element's border box.
  *
  * Now, let's transform the point from user space to filter space:
  *   "filter space point" = "user space point" * "device pixels per CSS pixel"
  *   "filter space point" = (10, 10) * 2
  *   "filter space point" = (20, 20)
  */
 class nsSVGFilterInstance {
+  typedef mozilla::SVGNumberPair SVGNumberPair;
   typedef mozilla::gfx::Point3D Point3D;
   typedef mozilla::gfx::IntRect IntRect;
   typedef mozilla::gfx::SourceSurface SourceSurface;
   typedef mozilla::gfx::FilterPrimitiveDescription FilterPrimitiveDescription;
   typedef mozilla::dom::SVGFE SVGFE;
   typedef mozilla::dom::UserSpaceMetrics UserSpaceMetrics;
 
  public:
@@ -108,18 +109,18 @@ class nsSVGFilterInstance {
   nsresult BuildPrimitives(
       nsTArray<FilterPrimitiveDescription>& aPrimitiveDescrs,
       nsTArray<RefPtr<SourceSurface>>& aInputImages, bool aInputIsTainted);
 
   float GetPrimitiveNumber(uint8_t aCtxType,
                            const nsSVGNumber2* aNumber) const {
     return GetPrimitiveNumber(aCtxType, aNumber->GetAnimValue());
   }
-  float GetPrimitiveNumber(uint8_t aCtxType, const nsSVGNumberPair* aNumberPair,
-                           nsSVGNumberPair::PairIndex aIndex) const {
+  float GetPrimitiveNumber(uint8_t aCtxType, const SVGNumberPair* aNumberPair,
+                           SVGNumberPair::PairIndex aIndex) const {
     return GetPrimitiveNumber(aCtxType, aNumberPair->GetAnimValue(aIndex));
   }
 
   /**
    * Converts a userSpaceOnUse/objectBoundingBoxUnits unitless point
    * into filter space, depending on the value of mPrimitiveUnits. (For
    * objectBoundingBoxUnits, the bounding box offset is applied to the point.)
    */