Bug 1518000 - Move nsSVGString and nsSVGViewBox to the mozilla namespace r=jwatt
authorlongsonr <longsonr@gmail.com>
Sun, 06 Jan 2019 17:52:55 +0000
changeset 452663 640985215424f83155c5fecdcadbe5f284d6c565
parent 452662 1675da659cb6f6a7e4824bc3dbf4e892ca4a5592
child 452664 5c37c61c937ea037e696c3424a5281f91c3dcb30
child 452669 4cfc198196e989cbda49033f03879d7f1b53fae7
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
bugs1518000
milestone66.0a1
first release with
nightly linux32
640985215424 / 66.0a1 / 20190106214444 / files
nightly linux64
640985215424 / 66.0a1 / 20190106214444 / files
nightly mac
640985215424 / 66.0a1 / 20190106214444 / files
nightly win32
640985215424 / 66.0a1 / 20190106214444 / files
nightly win64
640985215424 / 66.0a1 / 20190106214444 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1518000 - Move nsSVGString and nsSVGViewBox to the mozilla namespace r=jwatt
dom/base/nsAttrValue.cpp
dom/base/nsAttrValue.h
dom/base/nsAttrValueInlines.h
dom/svg/SVGAElement.cpp
dom/svg/SVGAElement.h
dom/svg/SVGAnimatedRect.cpp
dom/svg/SVGAnimatedRect.h
dom/svg/SVGAttrValueWrapper.cpp
dom/svg/SVGAttrValueWrapper.h
dom/svg/SVGElement.cpp
dom/svg/SVGElement.h
dom/svg/SVGFEBlendElement.h
dom/svg/SVGFEColorMatrixElement.h
dom/svg/SVGFEComponentTransferElement.h
dom/svg/SVGFECompositeElement.h
dom/svg/SVGFEConvolveMatrixElement.h
dom/svg/SVGFEDisplacementMapElement.h
dom/svg/SVGFEDropShadowElement.h
dom/svg/SVGFEFloodElement.h
dom/svg/SVGFEGaussianBlurElement.h
dom/svg/SVGFEImageElement.h
dom/svg/SVGFEMergeElement.h
dom/svg/SVGFEMergeNodeElement.h
dom/svg/SVGFEMorphologyElement.h
dom/svg/SVGFEOffsetElement.h
dom/svg/SVGFETileElement.h
dom/svg/SVGFETurbulenceElement.h
dom/svg/SVGFilterElement.h
dom/svg/SVGFilters.cpp
dom/svg/SVGFilters.h
dom/svg/SVGGradientElement.h
dom/svg/SVGImageElement.h
dom/svg/SVGMPathElement.h
dom/svg/SVGMarkerElement.cpp
dom/svg/SVGMarkerElement.h
dom/svg/SVGPatternElement.cpp
dom/svg/SVGPatternElement.h
dom/svg/SVGSVGElement.cpp
dom/svg/SVGSVGElement.h
dom/svg/SVGScriptElement.h
dom/svg/SVGString.cpp
dom/svg/SVGString.h
dom/svg/SVGTextPathElement.h
dom/svg/SVGUseElement.h
dom/svg/SVGViewBox.cpp
dom/svg/SVGViewBox.h
dom/svg/SVGViewBoxSMILType.cpp
dom/svg/SVGViewElement.cpp
dom/svg/SVGViewElement.h
dom/svg/SVGViewportElement.cpp
dom/svg/SVGViewportElement.h
dom/svg/moz.build
dom/svg/nsSVGString.cpp
dom/svg/nsSVGString.h
dom/svg/nsSVGViewBox.cpp
dom/svg/nsSVGViewBox.h
layout/base/nsLayoutUtils.cpp
layout/svg/nsCSSClipPathInstance.cpp
layout/svg/nsSVGMarkerFrame.cpp
layout/svg/nsSVGOuterSVGFrame.cpp
layout/svg/nsSVGPatternFrame.cpp
layout/svg/nsSVGPatternFrame.h
--- a/dom/base/nsAttrValue.cpp
+++ b/dom/base/nsAttrValue.cpp
@@ -477,17 +477,17 @@ void nsAttrValue::SetTo(const SVGTransfo
   // While an empty string will parse as a transform list, there's no need to
   // store it (and SetMiscAtomOrString will assert if we try)
   if (aSerialized && aSerialized->IsEmpty()) {
     aSerialized = nullptr;
   }
   SetSVGType(eSVGTransformList, &aValue, aSerialized);
 }
 
-void nsAttrValue::SetTo(const nsSVGViewBox& aValue,
+void nsAttrValue::SetTo(const SVGViewBox& aValue,
                         const nsAString* aSerialized) {
   SetSVGType(eSVGViewBox, &aValue, aSerialized);
 }
 
 void nsAttrValue::SwapValueWith(nsAttrValue& aOther) {
   uintptr_t tmp = aOther.mBits;
   aOther.mBits = mBits;
   mBits = tmp;
--- a/dom/base/nsAttrValue.h
+++ b/dom/base/nsAttrValue.h
@@ -164,17 +164,17 @@ class nsAttrValue {
   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);
-  void SetTo(const nsSVGViewBox& aValue, const nsAString* aSerialized);
+  void SetTo(const mozilla::SVGViewBox& aValue, const nsAString* aSerialized);
 
   /**
    * Sets this object with the string or atom representation of aValue.
    *
    * After calling this method, this object will have type eString unless the
    * type of aValue is eAtom, in which case this object will also have type
    * eAtom.
    */
--- a/dom/base/nsAttrValueInlines.h
+++ b/dom/base/nsAttrValueInlines.h
@@ -50,17 +50,17 @@ struct MiscContainer final {
         const mozilla::SVGLengthList* mSVGLengthList;
         const mozilla::SVGNumberList* mSVGNumberList;
         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;
+        const mozilla::SVGViewBox* mSVGViewBox;
       };
       uint32_t mRefCount : 31;
       uint32_t mCached : 1;
     } mValue;
     double mDoubleValue;
   };
 
   MiscContainer() : mType(nsAttrValue::eColor), mStringBits(0) {
--- a/dom/svg/SVGAElement.cpp
+++ b/dom/svg/SVGAElement.cpp
@@ -8,17 +8,16 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventStates.h"
 #include "mozilla/dom/SVGAElementBinding.h"
 #include "nsCOMPtr.h"
 #include "nsContentUtils.h"
 #include "nsGkAtoms.h"
-#include "nsSVGString.h"
 #include "nsIContentInlines.h"
 #include "nsIURI.h"
 
 NS_IMPL_NS_NEW_SVG_ELEMENT(A)
 
 namespace mozilla {
 namespace dom {
 
--- a/dom/svg/SVGAElement.h
+++ b/dom/svg/SVGAElement.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_SVGAElement_h
 #define mozilla_dom_SVGAElement_h
 
 #include "Link.h"
 #include "nsDOMTokenList.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 #include "mozilla/dom/SVGGraphicsElement.h"
 
 nsresult NS_NewSVGAElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 
 class EventChainPostVisitor;
@@ -92,17 +92,17 @@ class SVGAElement final : public SVGAEle
   }
 
  protected:
   virtual ~SVGAElement();
 
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { HREF, XLINK_HREF, TARGET };
-  nsSVGString mStringAttributes[3];
+  SVGString mStringAttributes[3];
   static StringInfo sStringInfo[3];
 
   RefPtr<nsDOMTokenList> mRelList;
   static DOMTokenListSupportedToken sSupportedRelValues[];
 };
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGAnimatedRect.cpp
+++ b/dom/svg/SVGAnimatedRect.cpp
@@ -2,32 +2,32 @@
 /* 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 "SVGAnimatedRect.h"
 #include "mozilla/dom/SVGAnimatedRectBinding.h"
 #include "SVGElement.h"
-#include "nsSVGViewBox.h"
+#include "SVGViewBox.h"
 #include "SVGIRect.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedRect, mSVGElement)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedRect, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedRect, Release)
 
-SVGAnimatedRect::SVGAnimatedRect(nsSVGViewBox* aVal, SVGElement* aSVGElement)
+SVGAnimatedRect::SVGAnimatedRect(SVGViewBox* aVal, SVGElement* aSVGElement)
     : mVal(aVal), mSVGElement(aSVGElement) {}
 
 SVGAnimatedRect::~SVGAnimatedRect() {
-  nsSVGViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
+  SVGViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
 }
 
 already_AddRefed<SVGIRect> SVGAnimatedRect::GetBaseVal() {
   return mVal->ToDOMBaseVal(mSVGElement);
 }
 
 already_AddRefed<SVGIRect> SVGAnimatedRect::GetAnimVal() {
   return mVal->ToDOMAnimVal(mSVGElement);
--- a/dom/svg/SVGAnimatedRect.h
+++ b/dom/svg/SVGAnimatedRect.h
@@ -3,46 +3,45 @@
 /* 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_SVGAnimatedRect_h
 #define mozilla_dom_SVGAnimatedRect_h
 
 #include "nsCycleCollectionParticipant.h"
+#include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGRectBinding.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "nsWrapperCache.h"
-#include "SVGElement.h"
-
-class nsSVGViewBox;
 
 namespace mozilla {
+class SVGViewBox;
 namespace dom {
 
 class SVGAnimatedRect final : public nsWrapperCache {
  public:
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedRect)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedRect)
 
-  SVGAnimatedRect(nsSVGViewBox* aVal, SVGElement* aSVGElement);
+  SVGAnimatedRect(SVGViewBox* aVal, SVGElement* aSVGElement);
 
   SVGElement* GetParentObject() const { return mSVGElement; }
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
   already_AddRefed<SVGIRect> GetBaseVal();
 
   already_AddRefed<SVGIRect> GetAnimVal();
 
  private:
   virtual ~SVGAnimatedRect();
 
-  nsSVGViewBox* mVal;  // kept alive because it belongs to content
+  SVGViewBox* mVal;  // kept alive because it belongs to content
   RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedRect_h
--- a/dom/svg/SVGAttrValueWrapper.cpp
+++ b/dom/svg/SVGAttrValueWrapper.cpp
@@ -1,27 +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 "SVGAttrValueWrapper.h"
+
+#include "SVGAnimatedPreserveAspectRatio.h"
 #include "SVGAngle.h"
 #include "SVGIntegerPair.h"
 #include "nsSVGLength2.h"
+#include "SVGLengthList.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"
+#include "SVGViewBox.h"
 
 namespace mozilla {
 
 /*static*/ void SVGAttrValueWrapper::ToString(const SVGAngle* aAngle,
                                               nsAString& aResult) {
   aAngle->GetBaseValueString(aResult);
 }
 
@@ -71,14 +72,14 @@ namespace mozilla {
   aStringList->GetValue(aResult);
 }
 
 /*static*/ void SVGAttrValueWrapper::ToString(
     const SVGTransformList* aTransformList, nsAString& aResult) {
   aTransformList->GetValueAsString(aResult);
 }
 
-/*static*/ void SVGAttrValueWrapper::ToString(const nsSVGViewBox* aViewBox,
+/*static*/ void SVGAttrValueWrapper::ToString(const SVGViewBox* aViewBox,
                                               nsAString& aResult) {
   aViewBox->GetBaseValueString(aResult);
 }
 
 }  // namespace mozilla
--- a/dom/svg/SVGAttrValueWrapper.h
+++ b/dom/svg/SVGAttrValueWrapper.h
@@ -10,29 +10,29 @@
 /**
  * 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 nsSVGLength2;
-class nsSVGViewBox;
 
 namespace mozilla {
 class SVGAngle;
 class SVGIntegerPair;
 class SVGLengthList;
 class SVGNumberList;
 class SVGNumberPair;
 class SVGPathData;
 class SVGPointList;
 class SVGAnimatedPreserveAspectRatio;
 class SVGStringList;
 class SVGTransformList;
+class SVGViewBox;
 
 class SVGAttrValueWrapper {
  public:
   static void ToString(const SVGAngle* aAngle, nsAString& aResult);
   static void ToString(const SVGIntegerPair* aIntegerPair, nsAString& aResult);
   static void ToString(const nsSVGLength2* aLength, nsAString& aResult);
   static void ToString(const SVGLengthList* aLengthList, nsAString& aResult);
   static void ToString(const SVGNumberList* aNumberList, nsAString& aResult);
@@ -40,14 +40,14 @@ class SVGAttrValueWrapper {
   static void ToString(const SVGPathData* aPathData, nsAString& aResult);
   static void ToString(const SVGPointList* aPointList, nsAString& aResult);
   static void ToString(
       const SVGAnimatedPreserveAspectRatio* aPreserveAspectRatio,
       nsAString& aResult);
   static void ToString(const SVGStringList* aStringList, nsAString& aResult);
   static void ToString(const SVGTransformList* aTransformList,
                        nsAString& aResult);
-  static void ToString(const nsSVGViewBox* aViewBox, nsAString& aResult);
+  static void ToString(const SVGViewBox* aViewBox, nsAString& aResult);
 };
 
 } /* namespace mozilla */
 
 #endif  // MOZILLA_SVGATTRVALUEWRAPPER_H__
--- a/dom/svg/SVGElement.cpp
+++ b/dom/svg/SVGElement.cpp
@@ -47,18 +47,18 @@
 #include "nsSVGBoolean.h"
 #include "SVGEnum.h"
 #include "nsSVGInteger.h"
 #include "SVGIntegerPair.h"
 #include "nsSVGLength2.h"
 #include "SVGMotionSMILAttr.h"
 #include "nsSVGNumber2.h"
 #include "SVGNumberPair.h"
-#include "nsSVGString.h"
-#include "nsSVGViewBox.h"
+#include "SVGString.h"
+#include "SVGViewBox.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:
 static_assert(sizeof(void*) == sizeof(nullptr),
               "nullptr should be the correct size");
@@ -173,17 +173,17 @@ nsresult SVGElement::Init() {
   }
 
   EnumAttributesInfo enumInfo = GetEnumInfo();
 
   for (i = 0; i < enumInfo.mEnumCount; i++) {
     enumInfo.Reset(i);
   }
 
-  nsSVGViewBox* viewBox = GetViewBox();
+  SVGViewBox* viewBox = GetViewBox();
 
   if (viewBox) {
     viewBox->Init();
   }
 
   SVGAnimatedPreserveAspectRatio* preserveAspectRatio =
       GetPreserveAspectRatio();
 
@@ -542,19 +542,19 @@ bool SVGElement::ParseAttribute(int32_t 
           }
           foundMatch = true;
           break;
         }
       }
     }
 
     if (!foundMatch) {
-      // Check for nsSVGViewBox attribute
+      // Check for SVGViewBox attribute
       if (aAttribute == nsGkAtoms::viewBox) {
-        nsSVGViewBox* viewBox = GetViewBox();
+        SVGViewBox* viewBox = GetViewBox();
         if (viewBox) {
           rv = viewBox->SetBaseValueString(aValue, this, false);
           if (NS_FAILED(rv)) {
             viewBox->Init();
           } else {
             aResult.SetTo(*viewBox, &aValue);
             didSetResult = true;
           }
@@ -602,17 +602,17 @@ bool SVGElement::ParseAttribute(int32_t 
 
     if (aAttribute == nsGkAtoms::rel) {
       aResult.ParseAtomArray(aValue);
       return true;
     }
   }
 
   if (!foundMatch) {
-    // Check for nsSVGString attribute
+    // Check for SVGString attribute
     StringAttributesInfo stringInfo = GetStringInfo();
     for (uint32_t i = 0; i < stringInfo.mStringCount; i++) {
       if (aNamespaceID == stringInfo.mStringInfo[i].mNamespaceID &&
           aAttribute == stringInfo.mStringInfo[i].mName) {
         stringInfo.mStrings[i].SetBaseValue(aValue, this, false);
         foundMatch = true;
         break;
       }
@@ -778,17 +778,17 @@ void SVGElement::UnsetAttrInternal(int32
       if (aName == enumInfo.mEnumInfo[i].mName) {
         enumInfo.Reset(i);
         return;
       }
     }
 
     // Check if this is a nsViewBox attribute going away
     if (aName == nsGkAtoms::viewBox) {
-      nsSVGViewBox* viewBox = GetViewBox();
+      SVGViewBox* viewBox = GetViewBox();
       if (viewBox) {
         MaybeSerializeAttrBeforeRemoval(aName, aNotify);
         viewBox->Init();
         return;
       }
     }
 
     // Check if this is a preserveAspectRatio attribute going away
@@ -1914,24 +1914,24 @@ void SVGElement::DidAnimateEnum(uint8_t 
 
   if (frame) {
     EnumAttributesInfo info = GetEnumInfo();
     frame->AttributeChanged(kNameSpaceID_None, info.mEnumInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsSVGViewBox* SVGElement::GetViewBox() { return nullptr; }
+SVGViewBox* SVGElement::GetViewBox() { return nullptr; }
 
 nsAttrValue SVGElement::WillChangeViewBox() {
   return WillChangeValue(nsGkAtoms::viewBox);
 }
 
 void SVGElement::DidChangeViewBox(const nsAttrValue& aEmptyOrOldValue) {
-  nsSVGViewBox* viewBox = GetViewBox();
+  SVGViewBox* viewBox = GetViewBox();
 
   NS_ASSERTION(viewBox, "DidChangeViewBox on element with no viewBox attrib");
 
   nsAttrValue newValue;
   newValue.SetTo(*viewBox, nullptr);
 
   DidChangeValue(nsGkAtoms::viewBox, aEmptyOrOldValue, newValue);
 }
@@ -2235,17 +2235,17 @@ UniquePtr<nsISMILAttr> SVGElement::GetAn
         if (aName == info.mAngleInfo[i].mName) {
           return info.mAngles[i].ToSMILAttr(this);
         }
       }
     }
 
     // viewBox:
     if (aName == nsGkAtoms::viewBox) {
-      nsSVGViewBox* viewBox = GetViewBox();
+      SVGViewBox* viewBox = GetViewBox();
       return viewBox ? viewBox->ToSMILAttr(this) : nullptr;
     }
 
     // preserveAspectRatio:
     if (aName == nsGkAtoms::preserveAspectRatio) {
       SVGAnimatedPreserveAspectRatio* preserveAspectRatio =
           GetPreserveAspectRatio();
       return preserveAspectRatio ? preserveAspectRatio->ToSMILAttr(this)
--- a/dom/svg/SVGElement.h
+++ b/dom/svg/SVGElement.h
@@ -26,18 +26,16 @@
 #include "nsISupportsImpl.h"
 #include "nsStyledElement.h"
 #include "gfxMatrix.h"
 
 class nsSVGBoolean;
 class nsSVGInteger;
 class nsSVGLength2;
 class nsSVGNumber2;
-class nsSVGString;
-class nsSVGViewBox;
 
 nsresult NS_NewSVGElement(mozilla::dom::Element** aResult,
                           already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 class DeclarationBlock;
 
 class SVGAngle;
@@ -47,18 +45,20 @@ class SVGAnimatedPointList;
 class SVGAnimatedPreserveAspectRatio;
 class SVGAnimatedTransformList;
 class SVGAnimatedLengthList;
 class SVGEnum;
 class SVGUserUnitList;
 class SVGIntegerPair;
 class SVGNumberList;
 class SVGNumberPair;
+class SVGString;
 class SVGStringList;
 class DOMSVGStringList;
+class SVGViewBox;
 
 struct SVGEnumMapping;
 
 namespace dom {
 class SVGSVGElement;
 class SVGViewportElement;
 
 typedef nsStyledElement SVGElementBase;
@@ -551,21 +551,21 @@ class SVGElement : public SVGElementBase
 
   struct StringInfo {
     nsStaticAtom* const mName;
     const int32_t mNamespaceID;
     const bool mIsAnimatable;
   };
 
   struct StringAttributesInfo {
-    nsSVGString* const mStrings;
+    SVGString* const mStrings;
     const StringInfo* const mStringInfo;
     const uint32_t mStringCount;
 
-    StringAttributesInfo(nsSVGString* aStrings, StringInfo* aStringInfo,
+    StringAttributesInfo(SVGString* aStrings, StringInfo* aStringInfo,
                          uint32_t aStringCount)
         : mStrings(aStrings),
           mStringInfo(aStringInfo),
           mStringCount(aStringCount) {}
 
     void Reset(uint8_t aAttrEnum);
   };
 
@@ -595,17 +595,17 @@ class SVGElement : public SVGElementBase
   virtual NumberPairAttributesInfo GetNumberPairInfo();
   virtual IntegerAttributesInfo GetIntegerInfo();
   virtual IntegerPairAttributesInfo GetIntegerPairInfo();
   virtual AngleAttributesInfo GetAngleInfo();
   virtual BooleanAttributesInfo GetBooleanInfo();
   virtual EnumAttributesInfo GetEnumInfo();
   // We assume all viewboxes and preserveAspectRatios are alike
   // so we don't need to wrap the class
-  virtual nsSVGViewBox* GetViewBox();
+  virtual SVGViewBox* GetViewBox();
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio();
   virtual NumberListAttributesInfo GetNumberListInfo();
   virtual LengthListAttributesInfo GetLengthListInfo();
   virtual StringAttributesInfo GetStringInfo();
   virtual StringListAttributesInfo GetStringListInfo();
 
   static SVGEnumMapping sSVGUnitTypesMap[];
 
--- a/dom/svg/SVGFEBlendElement.h
+++ b/dom/svg/SVGFEBlendElement.h
@@ -31,17 +31,17 @@ class SVGFEBlendElement : public SVGFEBl
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
@@ -53,16 +53,16 @@ class SVGFEBlendElement : public SVGFEBl
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { MODE };
   SVGEnum mEnumAttributes[1];
   static SVGEnumMapping sModeMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1, IN2 };
-  nsSVGString mStringAttributes[3];
+  SVGString mStringAttributes[3];
   static StringInfo sStringInfo[3];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEBlendElement_h
--- a/dom/svg/SVGFEColorMatrixElement.h
+++ b/dom/svg/SVGFEColorMatrixElement.h
@@ -35,17 +35,17 @@ class SVGFEColorMatrixElement : public S
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
@@ -58,17 +58,17 @@ class SVGFEColorMatrixElement : public S
   virtual NumberListAttributesInfo GetNumberListInfo() override;
 
   enum { TYPE };
   SVGEnum mEnumAttributes[1];
   static SVGEnumMapping sTypeMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1 };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   enum { VALUES };
   SVGAnimatedNumberList mNumberListAttributes[1];
   static NumberListInfo sNumberListInfo[1];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFEComponentTransferElement.h
+++ b/dom/svg/SVGFEComponentTransferElement.h
@@ -31,31 +31,31 @@ class SVGFEComponentTransferElement : pu
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   // nsIContent
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
 
  protected:
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { RESULT, IN1 };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEComponentTransferElement_h
--- a/dom/svg/SVGFECompositeElement.h
+++ b/dom/svg/SVGFECompositeElement.h
@@ -33,17 +33,17 @@ class SVGFECompositeElement : public SVG
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
@@ -65,16 +65,16 @@ class SVGFECompositeElement : public SVG
   static NumberInfo sNumberInfo[4];
 
   enum { OPERATOR };
   SVGEnum mEnumAttributes[1];
   static SVGEnumMapping sOperatorMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1, IN2 };
-  nsSVGString mStringAttributes[3];
+  SVGString mStringAttributes[3];
   static StringInfo sStringInfo[3];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFECompositeElement_h
--- a/dom/svg/SVGFEConvolveMatrixElement.h
+++ b/dom/svg/SVGFEConvolveMatrixElement.h
@@ -9,17 +9,17 @@
 
 #include "SVGAnimatedNumberList.h"
 #include "nsSVGBoolean.h"
 #include "SVGEnum.h"
 #include "SVGFilters.h"
 #include "nsSVGInteger.h"
 #include "SVGIntegerPair.h"
 #include "nsSVGNumber2.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 
 nsresult NS_NewSVGFEConvolveMatrixElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 
 namespace dom {
 class DOMSVGAnimatedNumberList;
@@ -41,17 +41,17 @@ class SVGFEConvolveMatrixElement : publi
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
@@ -98,17 +98,17 @@ class SVGFEConvolveMatrixElement : publi
   static BooleanInfo sBooleanInfo[1];
 
   enum { EDGEMODE };
   SVGEnum mEnumAttributes[1];
   static SVGEnumMapping sEdgeModeMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1 };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   enum { KERNELMATRIX };
   SVGAnimatedNumberList mNumberListAttributes[1];
   static NumberListInfo sNumberListInfo[1];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFEDisplacementMapElement.h
+++ b/dom/svg/SVGFEDisplacementMapElement.h
@@ -31,17 +31,17 @@ class SVGFEDisplacementMapElement : publ
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
@@ -74,16 +74,16 @@ class SVGFEDisplacementMapElement : publ
   static NumberInfo sNumberInfo[1];
 
   enum { CHANNEL_X, CHANNEL_Y };
   SVGEnum mEnumAttributes[2];
   static SVGEnumMapping sChannelMap[];
   static EnumInfo sEnumInfo[2];
 
   enum { RESULT, IN1, IN2 };
-  nsSVGString mStringAttributes[3];
+  SVGString mStringAttributes[3];
   static StringInfo sStringInfo[3];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEDisplacementMapElement_h
--- a/dom/svg/SVGFEDropShadowElement.h
+++ b/dom/svg/SVGFEDropShadowElement.h
@@ -5,17 +5,17 @@
  * 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 "SVGNumberPair.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 
 nsresult NS_NewSVGFEDropShadowElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGFE SVGFEDropShadowElementBase;
@@ -34,17 +34,17 @@ class SVGFEDropShadowElement : public SV
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
@@ -66,16 +66,16 @@ class SVGFEDropShadowElement : public SV
   nsSVGNumber2 mNumberAttributes[2];
   static NumberInfo sNumberInfo[2];
 
   enum { STD_DEV };
   SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { RESULT, IN1 };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEDropShadowElement_h
--- a/dom/svg/SVGFEFloodElement.h
+++ b/dom/svg/SVGFEFloodElement.h
@@ -31,31 +31,31 @@ class SVGFEFloodElement : public SVGFEFl
 
  public:
   virtual bool SubregionIsUnionOfRegions() override { return false; }
 
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
 
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
  protected:
   virtual bool ProducesSRGB() override { return true; }
 
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { RESULT };
-  nsSVGString mStringAttributes[1];
+  SVGString mStringAttributes[1];
   static StringInfo sStringInfo[1];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEFloodElement_h
--- a/dom/svg/SVGFEGaussianBlurElement.h
+++ b/dom/svg/SVGFEGaussianBlurElement.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_SVGFEGaussianBlurElement_h
 #define mozilla_dom_SVGFEGaussianBlurElement_h
 
 #include "SVGFilters.h"
 #include "SVGNumberPair.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 
 nsresult NS_NewSVGFEGaussianBlurElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGFE SVGFEGaussianBlurElementBase;
@@ -33,17 +33,17 @@ class SVGFEGaussianBlurElement : public 
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
@@ -55,16 +55,16 @@ class SVGFEGaussianBlurElement : public 
   virtual NumberPairAttributesInfo GetNumberPairInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { STD_DEV };
   SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { RESULT, IN1 };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEGaussianBlurElement_h
--- a/dom/svg/SVGFEImageElement.h
+++ b/dom/svg/SVGFEImageElement.h
@@ -44,17 +44,17 @@ class SVGFEImageElement final : public S
   virtual void AsyncEventRunning(AsyncEventDispatcher* aEvent) override;
 
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual bool OutputIsTainted(const nsTArray<bool>& aInputsAreTainted,
                                nsIPrincipal* aReferencePrincipal) override;
 
   // nsIContent
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
 
@@ -90,17 +90,17 @@ class SVGFEImageElement final : public S
 
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   // Override for nsImageLoadingContent.
   nsIContent* AsContent() override { return this; }
 
   enum { RESULT, HREF, XLINK_HREF };
-  nsSVGString mStringAttributes[3];
+  SVGString mStringAttributes[3];
   static StringInfo sStringInfo[3];
 
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
   uint16_t mImageAnimationMode;
 };
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEMergeElement.h
+++ b/dom/svg/SVGFEMergeElement.h
@@ -29,28 +29,28 @@ class SVGFEMergeElement : public SVGFEMe
   virtual JSObject* WrapNode(JSContext* cx,
                              JS::Handle<JSObject*> aGivenProto) override;
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   // nsIContent
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
  protected:
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { RESULT };
-  nsSVGString mStringAttributes[1];
+  SVGString mStringAttributes[1];
   static StringInfo sStringInfo[1];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEMergeElement_h
--- a/dom/svg/SVGFEMergeNodeElement.h
+++ b/dom/svg/SVGFEMergeNodeElement.h
@@ -30,25 +30,25 @@ class SVGFEMergeNodeElement : public SVG
                              JS::Handle<JSObject*> aGivenProto) override;
 
  public:
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
 
-  const nsSVGString* GetIn1() { return &mStringAttributes[IN1]; }
+  const SVGString* GetIn1() { return &mStringAttributes[IN1]; }
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
 
  protected:
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { IN1 };
-  nsSVGString mStringAttributes[1];
+  SVGString mStringAttributes[1];
   static StringInfo sStringInfo[1];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEMergeNodeElement_h
--- a/dom/svg/SVGFEMorphologyElement.h
+++ b/dom/svg/SVGFEMorphologyElement.h
@@ -5,17 +5,17 @@
  * 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 "SVGNumberPair.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 
 nsresult NS_NewSVGFEMorphologyElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGFE SVGFEMorphologyElementBase;
@@ -34,17 +34,17 @@ class SVGFEMorphologyElement : public SV
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
@@ -65,16 +65,16 @@ class SVGFEMorphologyElement : public SV
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { OPERATOR };
   SVGEnum mEnumAttributes[1];
   static SVGEnumMapping sOperatorMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1 };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEMorphologyElement_h
--- a/dom/svg/SVGFEOffsetElement.h
+++ b/dom/svg/SVGFEOffsetElement.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_SVGFEOffsetElement_h
 #define mozilla_dom_SVGFEOffsetElement_h
 
 #include "SVGFilters.h"
 #include "nsSVGNumber2.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 
 nsresult NS_NewSVGFEOffsetElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGFE SVGFEOffsetElementBase;
@@ -33,17 +33,17 @@ class SVGFEOffsetElement : public SVGFEO
 
  public:
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
@@ -54,16 +54,16 @@ class SVGFEOffsetElement : public SVGFEO
   virtual NumberAttributesInfo GetNumberInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { DX, DY };
   nsSVGNumber2 mNumberAttributes[2];
   static NumberInfo sNumberInfo[2];
 
   enum { RESULT, IN1 };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFEOffsetElement_h
--- a/dom/svg/SVGFETileElement.h
+++ b/dom/svg/SVGFETileElement.h
@@ -33,30 +33,30 @@ class SVGFETileElement : public SVGFETil
   virtual bool SubregionIsUnionOfRegions() override { return false; }
 
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
 
  protected:
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { RESULT, IN1 };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFETileElement_h
--- a/dom/svg/SVGFETurbulenceElement.h
+++ b/dom/svg/SVGFETurbulenceElement.h
@@ -6,17 +6,17 @@
 
 #ifndef mozilla_dom_SVGFETurbulenceElement_h
 #define mozilla_dom_SVGFETurbulenceElement_h
 
 #include "SVGEnum.h"
 #include "SVGFilters.h"
 #include "nsSVGNumber2.h"
 #include "nsSVGInteger.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 
 nsresult NS_NewSVGFETurbulenceElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGFE SVGFETurbulenceElementBase;
@@ -37,17 +37,17 @@ class SVGFETurbulenceElement : public SV
   virtual bool SubregionIsUnionOfRegions() override { return false; }
 
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // WebIDL
   already_AddRefed<SVGAnimatedNumber> BaseFrequencyX();
   already_AddRefed<SVGAnimatedNumber> BaseFrequencyY();
@@ -77,16 +77,16 @@ class SVGFETurbulenceElement : public SV
 
   enum { TYPE, STITCHTILES };
   SVGEnum mEnumAttributes[2];
   static SVGEnumMapping sTypeMap[];
   static SVGEnumMapping sStitchTilesMap[];
   static EnumInfo sEnumInfo[2];
 
   enum { RESULT };
-  nsSVGString mStringAttributes[1];
+  SVGString mStringAttributes[1];
   static StringInfo sStringInfo[1];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFETurbulenceElement_h
--- a/dom/svg/SVGFilterElement.h
+++ b/dom/svg/SVGFilterElement.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_SVGFilterElement_h
 #define mozilla_dom_SVGFilterElement_h
 
 #include "SVGEnum.h"
 #include "nsSVGLength2.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 #include "mozilla/dom/SVGElement.h"
 
 class nsSVGFilterFrame;
 class nsSVGFilterInstance;
 
 nsresult NS_NewSVGFilterElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
@@ -63,16 +63,16 @@ class SVGFilterElement : public SVGFilte
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   enum { FILTERUNITS, PRIMITIVEUNITS };
   SVGEnum mEnumAttributes[2];
   static EnumInfo sEnumInfo[2];
 
   enum { HREF, XLINK_HREF };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGFilterElement_h
--- a/dom/svg/SVGFilters.cpp
+++ b/dom/svg/SVGFilters.cpp
@@ -13,17 +13,17 @@
 #include "nsCOMPtr.h"
 #include "nsIFrame.h"
 #include "nsLayoutUtils.h"
 #include "SVGAnimatedNumberList.h"
 #include "SVGEnum.h"
 #include "nsSVGFilterInstance.h"
 #include "SVGNumberList.h"
 #include "SVGNumberPair.h"
-#include "nsSVGString.h"
+#include "SVGString.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"
 #include "mozilla/dom/SVGFEDistantLightElement.h"
--- a/dom/svg/SVGFilters.h
+++ b/dom/svg/SVGFilters.h
@@ -7,30 +7,30 @@
 #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 "SVGString.h"
 #include "nsSVGNumber2.h"
 #include "SVGNumberPair.h"
 
 class nsSVGFilterInstance;
 
 namespace mozilla {
 namespace dom {
 
 struct SVGStringInfo {
-  SVGStringInfo(const nsSVGString* aString, SVGElement* aElement)
+  SVGStringInfo(const SVGString* aString, SVGElement* aElement)
       : mString(aString), mElement(aElement) {}
 
-  const nsSVGString* mString;
+  const SVGString* mString;
   SVGElement* mElement;
 };
 
 typedef SVGElement SVGFEBase;
 
 #define NS_SVG_FE_CID                                \
   {                                                  \
     0x60483958, 0xd229, 0x4a77, {                    \
@@ -90,17 +90,17 @@ class SVGFE : public SVGFEBase {
                          nsINode** aResult) const override = 0;
 
   virtual bool HasValidDimensions() const override;
 
   bool IsNodeOfType(uint32_t aFlags) const override {
     return !(aFlags & ~eFILTER);
   }
 
-  virtual nsSVGString& GetResultImageName() = 0;
+  virtual SVGString& GetResultImageName() = 0;
   // Return a list of all image names used as sources. Default is to
   // return no sources.
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources);
 
   virtual FilterPrimitiveDescription GetPrimitiveDescription(
       nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
       const nsTArray<bool>& aInputsAreTainted,
       nsTArray<RefPtr<SourceSurface>>& aInputImages) = 0;
@@ -187,17 +187,17 @@ class SVGFELightingElement : public SVGF
 
  public:
   // interfaces:
   NS_INLINE_DECL_REFCOUNTING_INHERITED(SVGFELightingElement,
                                        SVGFELightingElementBase)
 
   virtual bool AttributeAffectsRendering(int32_t aNameSpaceID,
                                          nsAtom* aAttribute) const override;
-  virtual nsSVGString& GetResultImageName() override {
+  virtual SVGString& GetResultImageName() override {
     return mStringAttributes[RESULT];
   }
   virtual void GetSourceImageNames(nsTArray<SVGStringInfo>& aSources) override;
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
 
  protected:
   virtual bool OperatesOnSRGB(int32_t aInputIndex,
                               bool aInputIsAlreadySRGB) override {
@@ -224,17 +224,17 @@ class SVGFELightingElement : public SVGF
   nsSVGNumber2 mNumberAttributes[4];
   static NumberInfo sNumberInfo[4];
 
   enum { KERNEL_UNIT_LENGTH };
   SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { RESULT, IN1 };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 typedef SVGFEUnstyledElement SVGFELightElementBase;
 
 class SVGFELightElement : public SVGFELightElementBase {
  protected:
   explicit SVGFELightElement(
--- a/dom/svg/SVGGradientElement.h
+++ b/dom/svg/SVGGradientElement.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __NS_SVGGRADIENTELEMENT_H__
 #define __NS_SVGGRADIENTELEMENT_H__
 
 #include "nsAutoPtr.h"
 #include "SVGEnum.h"
 #include "nsSVGLength2.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 #include "SVGAnimatedTransformList.h"
 #include "mozilla/dom/SVGElement.h"
 
 class nsSVGGradientFrame;
 class nsSVGLinearGradientFrame;
 class nsSVGRadialGradientFrame;
 
 nsresult NS_NewSVGLinearGradientElement(
@@ -64,17 +64,17 @@ class SVGGradientElement : public SVGGra
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { GRADIENTUNITS, SPREADMETHOD };
   SVGEnum mEnumAttributes[2];
   static SVGEnumMapping sSpreadMethodMap[];
   static EnumInfo sEnumInfo[2];
 
   enum { HREF, XLINK_HREF };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   // SVGGradientElement values
   nsAutoPtr<SVGAnimatedTransformList> mGradientTransform;
 };
 
 //---------------------Linear Gradients------------------------
 
--- a/dom/svg/SVGImageElement.h
+++ b/dom/svg/SVGImageElement.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_SVGImageElement_h
 #define mozilla_dom_SVGImageElement_h
 
 #include "nsImageLoadingContent.h"
 #include "nsSVGLength2.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 #include "SVGGeometryElement.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 
 nsresult NS_NewSVGImageElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 class nsSVGImageFrame;
 
@@ -105,16 +105,16 @@ class SVGImageElement : public SVGImageE
 
   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
 
   enum { HREF, XLINK_HREF };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGImageElement_h
--- a/dom/svg/SVGMPathElement.h
+++ b/dom/svg/SVGMPathElement.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_SVGMPathElement_h
 #define mozilla_dom_SVGMPathElement_h
 
 #include "mozilla/dom/IDTracker.h"
 #include "SVGElement.h"
 #include "nsStubMutationObserver.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 
 nsresult NS_NewSVGMPathElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 class SVGPathElement;
 
@@ -105,17 +105,17 @@ class SVGMPathElement final : public SVG
 
   virtual StringAttributesInfo GetStringInfo() override;
 
   void UpdateHrefTarget(nsIContent* aParent, const nsAString& aHrefStr);
   void UnlinkHrefTarget(bool aNotifyParent);
   void NotifyParentOfMpathChange(nsIContent* aParent);
 
   enum { HREF, XLINK_HREF };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
   PathElementTracker mPathTracker;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGMPathElement_h
--- a/dom/svg/SVGMarkerElement.cpp
+++ b/dom/svg/SVGMarkerElement.cpp
@@ -235,17 +235,17 @@ SVGElement::AngleAttributesInfo SVGMarke
   return AngleAttributesInfo(mAngleAttributes, sAngleInfo,
                              ArrayLength(sAngleInfo));
 }
 
 SVGElement::EnumAttributesInfo SVGMarkerElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGViewBox* SVGMarkerElement::GetViewBox() { return &mViewBox; }
+SVGViewBox* SVGMarkerElement::GetViewBox() { return &mViewBox; }
 
 SVGAnimatedPreserveAspectRatio* SVGMarkerElement::GetPreserveAspectRatio() {
   return &mPreserveAspectRatio;
 }
 
 //----------------------------------------------------------------------
 // public helpers
 
@@ -268,33 +268,33 @@ gfx::Matrix SVGMarkerElement::GetMarkerT
       angle = mAngleAttributes[ORIENT].GetAnimValue() * M_PI / 180.0f;
       break;
   }
 
   return gfx::Matrix(cos(angle) * scale, sin(angle) * scale,
                      -sin(angle) * scale, cos(angle) * scale, aMark.x, aMark.y);
 }
 
-nsSVGViewBoxRect SVGMarkerElement::GetViewBoxRect() {
+SVGViewBoxRect SVGMarkerElement::GetViewBoxRect() {
   if (mViewBox.HasRect()) {
     return mViewBox.GetAnimValue();
   }
-  return nsSVGViewBoxRect(
+  return SVGViewBoxRect(
       0, 0, mLengthAttributes[MARKERWIDTH].GetAnimValue(mCoordCtx),
       mLengthAttributes[MARKERHEIGHT].GetAnimValue(mCoordCtx));
 }
 
 gfx::Matrix SVGMarkerElement::GetViewBoxTransform() {
   if (!mViewBoxToViewportTransform) {
     float viewportWidth =
         mLengthAttributes[MARKERWIDTH].GetAnimValue(mCoordCtx);
     float viewportHeight =
         mLengthAttributes[MARKERHEIGHT].GetAnimValue(mCoordCtx);
 
-    nsSVGViewBoxRect viewbox = GetViewBoxRect();
+    SVGViewBoxRect viewbox = GetViewBoxRect();
 
     MOZ_ASSERT(viewbox.width > 0.0f && viewbox.height > 0.0f,
                "Rendering should be disabled");
 
     gfx::Matrix viewBoxTM = SVGContentUtils::GetViewBoxTransform(
         viewportWidth, viewportHeight, viewbox.x, viewbox.y, viewbox.width,
         viewbox.height, mPreserveAspectRatio);
 
--- a/dom/svg/SVGMarkerElement.h
+++ b/dom/svg/SVGMarkerElement.h
@@ -7,17 +7,17 @@
 #ifndef mozilla_dom_SVGMarkerElement_h
 #define mozilla_dom_SVGMarkerElement_h
 
 #include "nsAutoPtr.h"
 #include "SVGAngle.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "SVGEnum.h"
 #include "nsSVGLength2.h"
-#include "nsSVGViewBox.h"
+#include "SVGViewBox.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/SVGAnimatedEnumeration.h"
 #include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGMarkerElementBinding.h"
 
 class nsSVGMarkerFrame;
 struct nsSVGMark;
 
@@ -104,17 +104,17 @@ class SVGMarkerElement : public SVGMarke
                                 nsIPrincipal* aMaybeScriptedPrincipal,
                                 bool aNotify) override;
 
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const override;
 
   // public helpers
   gfx::Matrix GetMarkerTransform(float aStrokeWidth, const nsSVGMark& aMark);
-  nsSVGViewBoxRect GetViewBoxRect();
+  SVGViewBoxRect GetViewBoxRect();
   gfx::Matrix GetViewBoxTransform();
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   nsSVGOrientType* GetOrientType() { return &mOrientType; }
 
   // WebIDL
   already_AddRefed<SVGAnimatedRect> ViewBox();
@@ -135,33 +135,33 @@ class SVGMarkerElement : public SVGMarke
                               nsIPrincipal* aMaybeScriptedPrincipal,
                               nsAttrValue& aResult) override;
 
   void SetParentCoordCtxProvider(SVGViewportElement* aContext);
 
   virtual LengthAttributesInfo GetLengthInfo() override;
   virtual AngleAttributesInfo GetAngleInfo() override;
   virtual EnumAttributesInfo GetEnumInfo() override;
-  virtual nsSVGViewBox* GetViewBox() override;
+  virtual SVGViewBox* GetViewBox() override;
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
 
   enum { REFX, REFY, MARKERWIDTH, MARKERHEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   enum { MARKERUNITS };
   SVGEnum mEnumAttributes[1];
   static SVGEnumMapping sUnitsMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { ORIENT };
   SVGAngle mAngleAttributes[1];
   static AngleInfo sAngleInfo[1];
 
-  nsSVGViewBox mViewBox;
+  SVGViewBox mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
 
   // derived properties (from 'orient') handled separately
   nsSVGOrientType mOrientType;
 
   SVGViewportElement* mCoordCtx;
   nsAutoPtr<gfx::Matrix> mViewBoxToViewportTransform;
 };
--- a/dom/svg/SVGPatternElement.cpp
+++ b/dom/svg/SVGPatternElement.cpp
@@ -156,17 +156,17 @@ SVGElement::LengthAttributesInfo SVGPatt
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 SVGElement::EnumAttributesInfo SVGPatternElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGViewBox* SVGPatternElement::GetViewBox() { return &mViewBox; }
+SVGViewBox* SVGPatternElement::GetViewBox() { return &mViewBox; }
 
 SVGAnimatedPreserveAspectRatio* SVGPatternElement::GetPreserveAspectRatio() {
   return &mPreserveAspectRatio;
 }
 
 SVGElement::StringAttributesInfo SVGPatternElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
--- a/dom/svg/SVGPatternElement.h
+++ b/dom/svg/SVGPatternElement.h
@@ -7,18 +7,18 @@
 #ifndef mozilla_dom_SVGPatternElement_h
 #define mozilla_dom_SVGPatternElement_h
 
 #include "nsAutoPtr.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "SVGAnimatedTransformList.h"
 #include "SVGEnum.h"
 #include "nsSVGLength2.h"
-#include "nsSVGString.h"
-#include "nsSVGViewBox.h"
+#include "SVGString.h"
+#include "SVGViewBox.h"
 #include "mozilla/dom/SVGElement.h"
 
 class nsSVGPatternFrame;
 
 nsresult NS_NewSVGPatternElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
@@ -67,35 +67,35 @@ class SVGPatternElement final : public S
   already_AddRefed<SVGAnimatedLength> Y();
   already_AddRefed<SVGAnimatedLength> Width();
   already_AddRefed<SVGAnimatedLength> Height();
   already_AddRefed<SVGAnimatedString> Href();
 
  protected:
   virtual LengthAttributesInfo GetLengthInfo() override;
   virtual EnumAttributesInfo GetEnumInfo() override;
-  virtual nsSVGViewBox* GetViewBox() override;
+  virtual SVGViewBox* GetViewBox() override;
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   enum { PATTERNUNITS, PATTERNCONTENTUNITS };
   SVGEnum mEnumAttributes[2];
   static EnumInfo sEnumInfo[2];
 
   nsAutoPtr<mozilla::SVGAnimatedTransformList> mPatternTransform;
 
   enum { HREF, XLINK_HREF };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   // SVGFitToViewbox properties
-  nsSVGViewBox mViewBox;
+  SVGViewBox mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGPatternElement_h
--- a/dom/svg/SVGSVGElement.cpp
+++ b/dom/svg/SVGSVGElement.cpp
@@ -642,17 +642,17 @@ SVGViewElement* SVGSVGElement::GetCurren
       if (element && element->IsSVGElement(nsGkAtoms::view)) {
         return static_cast<SVGViewElement*>(element);
       }
     }
   }
   return nullptr;
 }
 
-const nsSVGViewBox& SVGSVGElement::GetViewBoxInternal() const {
+const SVGViewBox& SVGSVGElement::GetViewBoxInternal() const {
   SVGViewElement* viewElement = GetCurrentViewElement();
 
   if (viewElement && viewElement->mViewBox.HasRect()) {
     return viewElement->mViewBox;
   } else if (mSVGView && mSVGView->mViewBox.HasRect()) {
     return mSVGView->mViewBox;
   }
 
--- a/dom/svg/SVGSVGElement.h
+++ b/dom/svg/SVGSVGElement.h
@@ -29,17 +29,17 @@ class SVGIRect;
 class SVGSVGElement;
 
 // Stores svgView arguments of SVG fragment identifiers.
 class SVGView {
  public:
   SVGView();
 
   mozilla::SVGEnum mZoomAndPan;
-  nsSVGViewBox mViewBox;
+  SVGViewBox mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
   nsAutoPtr<SVGAnimatedTransformList> mTransforms;
 };
 
 class DOMSVGTranslatePoint final : public nsISVGPoint {
  public:
   DOMSVGTranslatePoint(SVGPoint* aPt, SVGSVGElement* aElement)
       : nsISVGPoint(aPt, true), mElement(aElement) {}
@@ -214,17 +214,17 @@ class SVGSVGElement final : public SVGSV
   const SVGPreserveAspectRatio* GetPreserveAspectRatioProperty() const;
   bool ClearPreserveAspectRatioProperty();
 
   virtual SVGPoint GetCurrentTranslate() const override {
     return mCurrentTranslate;
   }
   virtual float GetCurrentScale() const override { return mCurrentScale; }
 
-  virtual const nsSVGViewBox& GetViewBoxInternal() const override;
+  virtual const SVGViewBox& GetViewBoxInternal() const override;
   virtual SVGAnimatedTransformList* GetTransformInternal() const override;
 
   virtual EnumAttributesInfo GetEnumInfo() override;
 
   enum { ZOOMANDPAN };
   mozilla::SVGEnum mEnumAttributes[1];
   static mozilla::SVGEnumMapping sZoomAndPanMap[];
   static EnumInfo sEnumInfo[1];
--- a/dom/svg/SVGScriptElement.h
+++ b/dom/svg/SVGScriptElement.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_SVGScriptElement_h
 #define mozilla_dom_SVGScriptElement_h
 
 #include "SVGElement.h"
 #include "nsCOMPtr.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 #include "mozilla/dom/ScriptElement.h"
 
 nsresult NS_NewSVGScriptElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
     mozilla::dom::FromParser aFromParser);
 
 namespace mozilla {
 namespace dom {
@@ -76,16 +76,16 @@ class SVGScriptElement final : public SV
 
   virtual StringAttributesInfo GetStringInfo() override;
 
   // SVG Script elements don't have the ability to set async properties on
   // themselves, so this will always return false.
   virtual bool GetAsyncState() override { return false; }
 
   enum { HREF, XLINK_HREF };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGScriptElement_h
rename from dom/svg/nsSVGString.cpp
rename to dom/svg/SVGString.cpp
--- a/dom/svg/nsSVGString.cpp
+++ b/dom/svg/SVGString.cpp
@@ -1,129 +1,130 @@
 /* -*- 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 "nsSVGString.h"
+#include "SVGString.h"
 
 #include "mozilla/Move.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SMILStringType.h"
 
-using namespace mozilla;
 using namespace mozilla::dom;
 
-NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(nsSVGString::DOMAnimatedString,
+namespace mozilla {
+
+NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGString::DOMAnimatedString,
                                                mSVGElement)
 
-NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGString::DOMAnimatedString)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGString::DOMAnimatedString)
+NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGString::DOMAnimatedString)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGString::DOMAnimatedString)
 
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGString::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<nsSVGString,
-                                    nsSVGString::DOMAnimatedString>&
+static inline nsSVGAttrTearoffTable<SVGString, SVGString::DOMAnimatedString>&
 SVGAnimatedStringTearoffTable() {
-  static nsSVGAttrTearoffTable<nsSVGString, nsSVGString::DOMAnimatedString>
+  static nsSVGAttrTearoffTable<SVGString, SVGString::DOMAnimatedString>
       sSVGAnimatedStringTearoffTable;
   return sSVGAnimatedStringTearoffTable;
 }
 
 /* Implementation */
 
-void nsSVGString::SetBaseValue(const nsAString& aValue, SVGElement* aSVGElement,
-                               bool aDoSetAttr) {
+void SVGString::SetBaseValue(const nsAString& aValue, SVGElement* aSVGElement,
+                             bool aDoSetAttr) {
   NS_ASSERTION(aSVGElement, "Null element passed to SetBaseValue");
 
   mIsBaseSet = true;
   if (aDoSetAttr) {
     aSVGElement->SetStringBaseValue(mAttrEnum, aValue);
   }
   if (mAnimVal) {
     aSVGElement->AnimationNeedsResample();
   }
 
   aSVGElement->DidChangeString(mAttrEnum);
 }
 
-void nsSVGString::GetAnimValue(nsAString& aResult,
-                               const SVGElement* aSVGElement) const {
+void SVGString::GetAnimValue(nsAString& aResult,
+                             const SVGElement* aSVGElement) const {
   if (mAnimVal) {
     aResult = *mAnimVal;
     return;
   }
 
   aSVGElement->GetStringBaseValue(mAttrEnum, aResult);
 }
 
-void nsSVGString::SetAnimValue(const nsAString& aValue,
-                               SVGElement* aSVGElement) {
+void SVGString::SetAnimValue(const nsAString& aValue, SVGElement* aSVGElement) {
   if (aSVGElement->IsStringAnimatable(mAttrEnum)) {
     if (mAnimVal && mAnimVal->Equals(aValue)) {
       return;
     }
     if (!mAnimVal) {
       mAnimVal = new nsString();
     }
     *mAnimVal = aValue;
     aSVGElement->DidAnimateString(mAttrEnum);
   }
 }
 
-already_AddRefed<SVGAnimatedString> nsSVGString::ToDOMAnimatedString(
+already_AddRefed<SVGAnimatedString> SVGString::ToDOMAnimatedString(
     SVGElement* aSVGElement) {
   RefPtr<DOMAnimatedString> domAnimatedString =
       SVGAnimatedStringTearoffTable().GetTearoff(this);
   if (!domAnimatedString) {
     domAnimatedString = new DOMAnimatedString(this, aSVGElement);
     SVGAnimatedStringTearoffTable().AddTearoff(this, domAnimatedString);
   }
 
   return domAnimatedString.forget();
 }
 
-nsSVGString::DOMAnimatedString::~DOMAnimatedString() {
+SVGString::DOMAnimatedString::~DOMAnimatedString() {
   SVGAnimatedStringTearoffTable().RemoveTearoff(mVal);
 }
 
-UniquePtr<nsISMILAttr> nsSVGString::ToSMILAttr(SVGElement* aSVGElement) {
+UniquePtr<nsISMILAttr> SVGString::ToSMILAttr(SVGElement* aSVGElement) {
   return MakeUnique<SMILString>(this, aSVGElement);
 }
 
-nsresult nsSVGString::SMILString::ValueFromString(
+nsresult SVGString::SMILString::ValueFromString(
     const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
     nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const {
   nsSMILValue val(SMILStringType::Singleton());
 
   *static_cast<nsAString*>(val.mU.mPtr) = aStr;
   aValue = std::move(val);
   aPreventCachingOfSandwich = false;
   return NS_OK;
 }
 
-nsSMILValue nsSVGString::SMILString::GetBaseValue() const {
+nsSMILValue SVGString::SMILString::GetBaseValue() const {
   nsSMILValue val(SMILStringType::Singleton());
   mSVGElement->GetStringBaseValue(mVal->mAttrEnum,
                                   *static_cast<nsAString*>(val.mU.mPtr));
   return val;
 }
 
-void nsSVGString::SMILString::ClearAnimValue() {
+void SVGString::SMILString::ClearAnimValue() {
   if (mVal->mAnimVal) {
     mVal->mAnimVal = nullptr;
     mSVGElement->DidAnimateString(mVal->mAttrEnum);
   }
 }
 
-nsresult nsSVGString::SMILString::SetAnimValue(const nsSMILValue& aValue) {
+nsresult SVGString::SMILString::SetAnimValue(const nsSMILValue& aValue) {
   NS_ASSERTION(aValue.mType == SMILStringType::Singleton(),
                "Unexpected type to assign animated value");
   if (aValue.mType == SMILStringType::Singleton()) {
     mVal->SetAnimValue(*static_cast<nsAString*>(aValue.mU.mPtr), mSVGElement);
   }
   return NS_OK;
 }
+
+}  // namespace mozilla
rename from dom/svg/nsSVGString.h
rename to dom/svg/SVGString.h
--- a/dom/svg/nsSVGString.h
+++ b/dom/svg/SVGString.h
@@ -4,22 +4,26 @@
  * 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_SVGSTRING_H__
 #define __NS_SVGSTRING_H__
 
 #include "nsAutoPtr.h"
 #include "nsError.h"
-#include "SVGElement.h"
+#include "mozilla/dom/SVGAnimatedString.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/dom/SVGAnimatedString.h"
 #include "mozilla/UniquePtr.h"
 
-class nsSVGString {
+namespace mozilla {
+namespace dom {
+class SVGElement;
+}
+
+class SVGString {
  public:
   typedef mozilla::dom::SVGElement SVGElement;
 
   void Init(uint8_t aAttrEnum) {
     mAnimVal = nullptr;
     mAttrEnum = aAttrEnum;
     mIsBaseSet = false;
   }
@@ -50,20 +54,20 @@ class nsSVGString {
   uint8_t mAttrEnum;  // element specified tracking for attribute
   bool mIsBaseSet;
 
  public:
   struct DOMAnimatedString final : public mozilla::dom::SVGAnimatedString {
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMAnimatedString)
 
-    DOMAnimatedString(nsSVGString* aVal, SVGElement* aSVGElement)
+    DOMAnimatedString(SVGString* aVal, SVGElement* aSVGElement)
         : mozilla::dom::SVGAnimatedString(aSVGElement), mVal(aVal) {}
 
-    nsSVGString* mVal;  // kept alive because it belongs to content
+    SVGString* mVal;  // kept alive because it belongs to content
 
     void GetBaseVal(nsAString& aResult) override {
       mVal->GetBaseValue(aResult, mSVGElement);
     }
 
     void SetBaseVal(const nsAString& aValue) override {
       mVal->SetBaseValue(aValue, mSVGElement, true);
     }
@@ -73,28 +77,31 @@ class nsSVGString {
       mVal->GetAnimValue(aResult, mSVGElement);
     }
 
    private:
     virtual ~DOMAnimatedString();
   };
   struct SMILString : public nsISMILAttr {
    public:
-    SMILString(nsSVGString* aVal, SVGElement* aSVGElement)
+    SMILString(SVGString* 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.
-    nsSVGString* mVal;
+    SVGString* 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_SVGSTRING_H__
--- a/dom/svg/SVGTextPathElement.h
+++ b/dom/svg/SVGTextPathElement.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_SVGTextPathElement_h
 #define mozilla_dom_SVGTextPathElement_h
 
 #include "SVGEnum.h"
 #include "nsSVGLength2.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 #include "mozilla/dom/SVGAnimatedPathSegList.h"
 #include "mozilla/dom/SVGTextContentElement.h"
 
 class nsAtom;
 class nsIContent;
 
 nsresult NS_NewSVGTextPathElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
@@ -75,17 +75,17 @@ class SVGTextPathElement final : public 
   SVGEnum mEnumAttributes[4];
   virtual SVGEnum* EnumAttributes() override { return mEnumAttributes; }
   static SVGEnumMapping sMethodMap[];
   static SVGEnumMapping sSpacingMap[];
   static SVGEnumMapping sSideMap[];
   static EnumInfo sEnumInfo[4];
 
   enum { HREF, XLINK_HREF };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   SVGAnimatedPathSegList mPath;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
--- a/dom/svg/SVGUseElement.h
+++ b/dom/svg/SVGUseElement.h
@@ -7,17 +7,17 @@
 #ifndef mozilla_dom_SVGUseElement_h
 #define mozilla_dom_SVGUseElement_h
 
 #include "mozilla/dom/FromParser.h"
 #include "mozilla/dom/IDTracker.h"
 #include "nsStubMutationObserver.h"
 #include "mozilla/dom/SVGGraphicsElement.h"
 #include "nsSVGLength2.h"
-#include "nsSVGString.h"
+#include "SVGString.h"
 #include "nsTArray.h"
 
 class nsIContent;
 class nsSVGUseFrame;
 
 nsresult NS_NewSVGSVGElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
     mozilla::dom::FromParser aFromParser);
@@ -135,17 +135,17 @@ class SVGUseElement final : public SVGUs
   void TriggerReclone();
   void UnlinkSource();
 
   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   enum { HREF, XLINK_HREF };
-  nsSVGString mStringAttributes[2];
+  SVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   nsCOMPtr<nsIContent> mOriginal;  // if we've been cloned, our "real" copy
   ElementTracker mReferencedElementTracker;
   RefPtr<URLExtraData> mContentURLData;  // URL data for its anonymous content
 };
 
 }  // namespace dom
rename from dom/svg/nsSVGViewBox.cpp
rename to dom/svg/SVGViewBox.cpp
--- a/dom/svg/nsSVGViewBox.cpp
+++ b/dom/svg/SVGViewBox.cpp
@@ -1,38 +1,39 @@
 /* -*- 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 "nsSVGViewBox.h"
+#include "SVGViewBox.h"
 
 #include "mozilla/Move.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsSMILValue.h"
 #include "nsTextFormatter.h"
 #include "SVGContentUtils.h"
 #include "SVGViewBoxSMILType.h"
 
+namespace mozilla {
+
 #define NUM_VIEWBOX_COMPONENTS 4
-using namespace mozilla;
 
-/* Implementation of nsSVGViewBoxRect methods */
+/* Implementation of SVGViewBoxRect methods */
 
-bool nsSVGViewBoxRect::operator==(const nsSVGViewBoxRect& aOther) const {
+bool SVGViewBoxRect::operator==(const SVGViewBoxRect& aOther) const {
   if (&aOther == this) return true;
 
   return (none && aOther.none) ||
          (!none && !aOther.none && x == aOther.x && y == aOther.y &&
           width == aOther.width && height == aOther.height);
 }
 
-/* static */ nsresult nsSVGViewBoxRect::FromString(const nsAString& aStr,
-                                                   nsSVGViewBoxRect* aViewBox) {
+/* static */ nsresult SVGViewBoxRect::FromString(const nsAString& aStr,
+                                                 SVGViewBoxRect* aViewBox) {
   if (aStr.EqualsLiteral("none")) {
     aViewBox->none = true;
     return NS_OK;
   }
 
   nsCharSeparatedTokenizerTemplate<nsContentUtils::IsHTMLWhitespace> tokenizer(
       aStr, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL);
   float vals[NUM_VIEWBOX_COMPONENTS];
@@ -53,89 +54,89 @@ bool nsSVGViewBoxRect::operator==(const 
   aViewBox->y = vals[1];
   aViewBox->width = vals[2];
   aViewBox->height = vals[3];
   aViewBox->none = false;
 
   return NS_OK;
 }
 
-/* Cycle collection macros for nsSVGViewBox */
+/* Cycle collection macros for SVGViewBox */
 
-NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(nsSVGViewBox::DOMBaseVal,
+NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGViewBox::DOMBaseVal,
                                                mSVGElement)
-NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(nsSVGViewBox::DOMAnimVal,
+NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGViewBox::DOMAnimVal,
                                                mSVGElement)
 
-NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGViewBox::DOMBaseVal)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGViewBox::DOMBaseVal)
+NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGViewBox::DOMBaseVal)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGViewBox::DOMBaseVal)
 
-NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGViewBox::DOMAnimVal)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGViewBox::DOMAnimVal)
+NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGViewBox::DOMAnimVal)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGViewBox::DOMAnimVal)
 
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGViewBox::DOMBaseVal)
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGViewBox::DOMBaseVal)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGViewBox::DOMAnimVal)
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGViewBox::DOMAnimVal)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-static nsSVGAttrTearoffTable<nsSVGViewBox, nsSVGViewBox::DOMBaseVal>
+static nsSVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMBaseVal>
     sBaseSVGViewBoxTearoffTable;
-static nsSVGAttrTearoffTable<nsSVGViewBox, nsSVGViewBox::DOMAnimVal>
+static nsSVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMAnimVal>
     sAnimSVGViewBoxTearoffTable;
-nsSVGAttrTearoffTable<nsSVGViewBox, dom::SVGAnimatedRect>
-    nsSVGViewBox::sSVGAnimatedRectTearoffTable;
+nsSVGAttrTearoffTable<SVGViewBox, dom::SVGAnimatedRect>
+    SVGViewBox::sSVGAnimatedRectTearoffTable;
 
-/* Implementation of nsSVGViewBox methods */
+/* Implementation of SVGViewBox methods */
 
-void nsSVGViewBox::Init() {
+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
   // ensure that we treat it as "none" and ignore its numeric values:
   mBaseVal.none = true;
 
   mAnimVal = nullptr;
 }
 
-bool nsSVGViewBox::HasRect() const {
+bool SVGViewBox::HasRect() const {
   // Check mAnimVal if we have one; otherwise, check mBaseVal if we have one;
   // otherwise, just return false (we clearly do not have a rect).
-  const nsSVGViewBoxRect* rect = mAnimVal;
+  const SVGViewBoxRect* rect = mAnimVal;
   if (!rect) {
     if (!mHasBaseVal) {
       // no anim val, no base val --> no viewbox rect
       return false;
     }
     rect = &mBaseVal;
   }
 
   return !rect->none && rect->width >= 0 && rect->height >= 0;
 }
 
-void nsSVGViewBox::SetAnimValue(const nsSVGViewBoxRect& aRect,
-                                SVGElement* aSVGElement) {
+void SVGViewBox::SetAnimValue(const SVGViewBoxRect& aRect,
+                              SVGElement* aSVGElement) {
   if (!mAnimVal) {
     // it's okay if allocation fails - and no point in reporting that
-    mAnimVal = new nsSVGViewBoxRect(aRect);
+    mAnimVal = new SVGViewBoxRect(aRect);
   } else {
     if (aRect == *mAnimVal) {
       return;
     }
     *mAnimVal = aRect;
   }
   aSVGElement->DidAnimateViewBox();
 }
 
-void nsSVGViewBox::SetBaseValue(const nsSVGViewBoxRect& aRect,
-                                SVGElement* aSVGElement) {
+void SVGViewBox::SetBaseValue(const SVGViewBoxRect& aRect,
+                              SVGElement* aSVGElement) {
   if (!mHasBaseVal || mBaseVal == aRect) {
     // This method is used to set a single x, y, width
     // or height value. It can't create a base value
     // as the other components may be undefined. We record
     // the new value though, so as not to lose data.
     mBaseVal = aRect;
     return;
   }
@@ -146,22 +147,22 @@ void nsSVGViewBox::SetBaseValue(const ns
   mHasBaseVal = true;
 
   aSVGElement->DidChangeViewBox(emptyOrOldValue);
   if (mAnimVal) {
     aSVGElement->AnimationNeedsResample();
   }
 }
 
-nsresult nsSVGViewBox::SetBaseValueString(const nsAString& aValue,
-                                          SVGElement* aSVGElement,
-                                          bool aDoSetAttr) {
-  nsSVGViewBoxRect viewBox;
+nsresult SVGViewBox::SetBaseValueString(const nsAString& aValue,
+                                        SVGElement* aSVGElement,
+                                        bool aDoSetAttr) {
+  SVGViewBoxRect viewBox;
 
-  nsresult rv = nsSVGViewBoxRect::FromString(aValue, &viewBox);
+  nsresult rv = SVGViewBoxRect::FromString(aValue, &viewBox);
   if (NS_FAILED(rv)) {
     return rv;
   }
   // Comparison against mBaseVal is only valid if we currently have a base val.
   if (mHasBaseVal && viewBox == mBaseVal) {
     return NS_OK;
   }
 
@@ -176,135 +177,137 @@ nsresult nsSVGViewBox::SetBaseValueStrin
     aSVGElement->DidChangeViewBox(emptyOrOldValue);
   }
   if (mAnimVal) {
     aSVGElement->AnimationNeedsResample();
   }
   return NS_OK;
 }
 
-void nsSVGViewBox::GetBaseValueString(nsAString& aValue) const {
+void SVGViewBox::GetBaseValueString(nsAString& aValue) const {
   if (mBaseVal.none) {
     aValue.AssignLiteral("none");
     return;
   }
   nsTextFormatter::ssprintf(aValue, u"%g %g %g %g", (double)mBaseVal.x,
                             (double)mBaseVal.y, (double)mBaseVal.width,
                             (double)mBaseVal.height);
 }
 
-already_AddRefed<dom::SVGAnimatedRect> nsSVGViewBox::ToSVGAnimatedRect(
+already_AddRefed<dom::SVGAnimatedRect> SVGViewBox::ToSVGAnimatedRect(
     SVGElement* aSVGElement) {
   RefPtr<dom::SVGAnimatedRect> domAnimatedRect =
       sSVGAnimatedRectTearoffTable.GetTearoff(this);
   if (!domAnimatedRect) {
     domAnimatedRect = new dom::SVGAnimatedRect(this, aSVGElement);
     sSVGAnimatedRectTearoffTable.AddTearoff(this, domAnimatedRect);
   }
 
   return domAnimatedRect.forget();
 }
 
-already_AddRefed<dom::SVGIRect> nsSVGViewBox::ToDOMBaseVal(
+already_AddRefed<dom::SVGIRect> SVGViewBox::ToDOMBaseVal(
     SVGElement* aSVGElement) {
   if (!mHasBaseVal || mBaseVal.none) {
     return nullptr;
   }
 
   RefPtr<DOMBaseVal> domBaseVal = sBaseSVGViewBoxTearoffTable.GetTearoff(this);
   if (!domBaseVal) {
     domBaseVal = new DOMBaseVal(this, aSVGElement);
     sBaseSVGViewBoxTearoffTable.AddTearoff(this, domBaseVal);
   }
 
   return domBaseVal.forget();
 }
 
-nsSVGViewBox::DOMBaseVal::~DOMBaseVal() {
+SVGViewBox::DOMBaseVal::~DOMBaseVal() {
   sBaseSVGViewBoxTearoffTable.RemoveTearoff(mVal);
 }
 
-already_AddRefed<dom::SVGIRect> nsSVGViewBox::ToDOMAnimVal(
+already_AddRefed<dom::SVGIRect> SVGViewBox::ToDOMAnimVal(
     SVGElement* aSVGElement) {
   if ((mAnimVal && mAnimVal->none) ||
       (!mAnimVal && (!mHasBaseVal || mBaseVal.none))) {
     return nullptr;
   }
 
   RefPtr<DOMAnimVal> domAnimVal = sAnimSVGViewBoxTearoffTable.GetTearoff(this);
   if (!domAnimVal) {
     domAnimVal = new DOMAnimVal(this, aSVGElement);
     sAnimSVGViewBoxTearoffTable.AddTearoff(this, domAnimVal);
   }
 
   return domAnimVal.forget();
 }
 
-nsSVGViewBox::DOMAnimVal::~DOMAnimVal() {
+SVGViewBox::DOMAnimVal::~DOMAnimVal() {
   sAnimSVGViewBoxTearoffTable.RemoveTearoff(mVal);
 }
 
-void nsSVGViewBox::DOMBaseVal::SetX(float aX, ErrorResult& aRv) {
-  nsSVGViewBoxRect rect = mVal->GetBaseValue();
+void SVGViewBox::DOMBaseVal::SetX(float aX, ErrorResult& aRv) {
+  SVGViewBoxRect rect = mVal->GetBaseValue();
   rect.x = aX;
   mVal->SetBaseValue(rect, mSVGElement);
 }
 
-void nsSVGViewBox::DOMBaseVal::SetY(float aY, ErrorResult& aRv) {
-  nsSVGViewBoxRect rect = mVal->GetBaseValue();
+void SVGViewBox::DOMBaseVal::SetY(float aY, ErrorResult& aRv) {
+  SVGViewBoxRect rect = mVal->GetBaseValue();
   rect.y = aY;
   mVal->SetBaseValue(rect, mSVGElement);
 }
 
-void nsSVGViewBox::DOMBaseVal::SetWidth(float aWidth, ErrorResult& aRv) {
-  nsSVGViewBoxRect rect = mVal->GetBaseValue();
+void SVGViewBox::DOMBaseVal::SetWidth(float aWidth, ErrorResult& aRv) {
+  SVGViewBoxRect rect = mVal->GetBaseValue();
   rect.width = aWidth;
   mVal->SetBaseValue(rect, mSVGElement);
 }
 
-void nsSVGViewBox::DOMBaseVal::SetHeight(float aHeight, ErrorResult& aRv) {
-  nsSVGViewBoxRect rect = mVal->GetBaseValue();
+void SVGViewBox::DOMBaseVal::SetHeight(float aHeight, ErrorResult& aRv) {
+  SVGViewBoxRect rect = mVal->GetBaseValue();
   rect.height = aHeight;
   mVal->SetBaseValue(rect, mSVGElement);
 }
 
-UniquePtr<nsISMILAttr> nsSVGViewBox::ToSMILAttr(SVGElement* aSVGElement) {
+UniquePtr<nsISMILAttr> SVGViewBox::ToSMILAttr(SVGElement* aSVGElement) {
   return MakeUnique<SMILViewBox>(this, aSVGElement);
 }
 
-nsresult nsSVGViewBox::SMILViewBox ::ValueFromString(
+nsresult SVGViewBox::SMILViewBox ::ValueFromString(
     const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
     nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const {
-  nsSVGViewBoxRect viewBox;
-  nsresult res = nsSVGViewBoxRect::FromString(aStr, &viewBox);
+  SVGViewBoxRect viewBox;
+  nsresult res = SVGViewBoxRect::FromString(aStr, &viewBox);
   if (NS_FAILED(res)) {
     return res;
   }
   nsSMILValue val(&SVGViewBoxSMILType::sSingleton);
-  *static_cast<nsSVGViewBoxRect*>(val.mU.mPtr) = viewBox;
+  *static_cast<SVGViewBoxRect*>(val.mU.mPtr) = viewBox;
   aValue = std::move(val);
   aPreventCachingOfSandwich = false;
 
   return NS_OK;
 }
 
-nsSMILValue nsSVGViewBox::SMILViewBox::GetBaseValue() const {
+nsSMILValue SVGViewBox::SMILViewBox::GetBaseValue() const {
   nsSMILValue val(&SVGViewBoxSMILType::sSingleton);
-  *static_cast<nsSVGViewBoxRect*>(val.mU.mPtr) = mVal->mBaseVal;
+  *static_cast<SVGViewBoxRect*>(val.mU.mPtr) = mVal->mBaseVal;
   return val;
 }
 
-void nsSVGViewBox::SMILViewBox::ClearAnimValue() {
+void SVGViewBox::SMILViewBox::ClearAnimValue() {
   if (mVal->mAnimVal) {
     mVal->mAnimVal = nullptr;
     mSVGElement->DidAnimateViewBox();
   }
 }
 
-nsresult nsSVGViewBox::SMILViewBox::SetAnimValue(const nsSMILValue& aValue) {
+nsresult SVGViewBox::SMILViewBox::SetAnimValue(const nsSMILValue& aValue) {
   NS_ASSERTION(aValue.mType == &SVGViewBoxSMILType::sSingleton,
                "Unexpected type to assign animated value");
   if (aValue.mType == &SVGViewBoxSMILType::sSingleton) {
-    nsSVGViewBoxRect& vb = *static_cast<nsSVGViewBoxRect*>(aValue.mU.mPtr);
+    SVGViewBoxRect& vb = *static_cast<SVGViewBoxRect*>(aValue.mU.mPtr);
     mVal->SetAnimValue(vb, mSVGElement);
   }
   return NS_OK;
 }
+
+}  // namespace mozilla
rename from dom/svg/nsSVGViewBox.h
rename to dom/svg/SVGViewBox.h
--- a/dom/svg/nsSVGViewBox.h
+++ b/dom/svg/SVGViewBox.h
@@ -5,52 +5,51 @@
  * 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 "mozilla/Attributes.h"
+#include "nsISMILAttr.h"
+#include "nsSVGAttrTearoffTable.h"
+#include "mozilla/UniquePtr.h"
 #include "mozilla/dom/SVGAnimatedRect.h"
 #include "mozilla/dom/SVGIRect.h"
-#include "nsISMILAttr.h"
-#include "SVGElement.h"
-#include "mozilla/Attributes.h"
-#include "mozilla/UniquePtr.h"
-#include "nsSVGAttrTearoffTable.h"
 
 class nsSMILValue;
 
 namespace mozilla {
 namespace dom {
 class SVGAnimationElement;
+class SVGElement;
 }  // namespace dom
-}  // namespace mozilla
 
-struct nsSVGViewBoxRect {
+struct SVGViewBoxRect {
   float x, y;
   float width, height;
   bool none;
 
-  nsSVGViewBoxRect() : x(0.0), y(0.0), width(0.0), height(0.0), none(true) {}
-  nsSVGViewBoxRect(float aX, float aY, float aWidth, float aHeight)
+  SVGViewBoxRect() : x(0.0), y(0.0), width(0.0), height(0.0), none(true) {}
+  SVGViewBoxRect(float aX, float aY, float aWidth, float aHeight)
       : x(aX), y(aY), width(aWidth), height(aHeight), none(false) {}
-  nsSVGViewBoxRect(const nsSVGViewBoxRect& rhs)
+  SVGViewBoxRect(const SVGViewBoxRect& rhs)
       : x(rhs.x),
         y(rhs.y),
         width(rhs.width),
         height(rhs.height),
         none(rhs.none) {}
-  bool operator==(const nsSVGViewBoxRect& aOther) const;
+  bool operator==(const SVGViewBoxRect& aOther) const;
 
-  static nsresult FromString(const nsAString& aStr, nsSVGViewBoxRect* aViewBox);
+  static nsresult FromString(const nsAString& aStr, SVGViewBoxRect* aViewBox);
 };
 
-class nsSVGViewBox {
+class SVGViewBox {
  public:
   typedef mozilla::dom::SVGElement SVGElement;
 
   void Init();
 
   /**
    * Returns true if the corresponding "viewBox" attribute defined a rectangle
    * with finite values and nonnegative width/height.
@@ -61,28 +60,28 @@ class nsSVGViewBox {
   bool HasRect() const;
 
   /**
    * Returns true if the corresponding "viewBox" attribute either defined a
    * rectangle with finite values or the special "none" value.
    */
   bool IsExplicitlySet() const {
     if (mAnimVal || mHasBaseVal) {
-      const nsSVGViewBoxRect& rect = GetAnimValue();
+      const SVGViewBoxRect& rect = GetAnimValue();
       return rect.none || (rect.width >= 0 && rect.height >= 0);
     }
     return false;
   }
 
-  const nsSVGViewBoxRect& GetBaseValue() const { return mBaseVal; }
-  void SetBaseValue(const nsSVGViewBoxRect& aRect, SVGElement* aSVGElement);
-  const nsSVGViewBoxRect& GetAnimValue() const {
+  const SVGViewBoxRect& GetBaseValue() const { return mBaseVal; }
+  void SetBaseValue(const SVGViewBoxRect& aRect, SVGElement* aSVGElement);
+  const SVGViewBoxRect& GetAnimValue() const {
     return mAnimVal ? *mAnimVal : mBaseVal;
   }
-  void SetAnimValue(const nsSVGViewBoxRect& aRect, SVGElement* aSVGElement);
+  void SetAnimValue(const SVGViewBoxRect& aRect, SVGElement* aSVGElement);
 
   nsresult SetBaseValueString(const nsAString& aValue, SVGElement* aSVGElement,
                               bool aDoSetAttr);
   void GetBaseValueString(nsAString& aValue) const;
 
   already_AddRefed<mozilla::dom::SVGAnimatedRect> ToSVGAnimatedRect(
       SVGElement* aSVGElement);
 
@@ -90,29 +89,29 @@ class nsSVGViewBox {
       SVGElement* aSVGElement);
 
   already_AddRefed<mozilla::dom::SVGIRect> ToDOMAnimVal(
       SVGElement* aSVGElement);
 
   mozilla::UniquePtr<nsISMILAttr> ToSMILAttr(SVGElement* aSVGElement);
 
  private:
-  nsSVGViewBoxRect mBaseVal;
-  nsAutoPtr<nsSVGViewBoxRect> mAnimVal;
+  SVGViewBoxRect mBaseVal;
+  nsAutoPtr<SVGViewBoxRect> mAnimVal;
   bool mHasBaseVal;
 
  public:
   struct DOMBaseVal final : public mozilla::dom::SVGIRect {
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMBaseVal)
 
-    DOMBaseVal(nsSVGViewBox* aVal, SVGElement* aSVGElement)
+    DOMBaseVal(SVGViewBox* aVal, SVGElement* aSVGElement)
         : mozilla::dom::SVGIRect(), mVal(aVal), mSVGElement(aSVGElement) {}
 
-    nsSVGViewBox* mVal;  // kept alive because it belongs to content
+    SVGViewBox* mVal;  // kept alive because it belongs to content
     RefPtr<SVGElement> mSVGElement;
 
     float X() const final { return mVal->GetBaseValue().x; }
 
     float Y() const final { return mVal->GetBaseValue().y; }
 
     float Width() const final { return mVal->GetBaseValue().width; }
 
@@ -128,20 +127,20 @@ class nsSVGViewBox {
    private:
     virtual ~DOMBaseVal();
   };
 
   struct DOMAnimVal final : public mozilla::dom::SVGIRect {
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMAnimVal)
 
-    DOMAnimVal(nsSVGViewBox* aVal, SVGElement* aSVGElement)
+    DOMAnimVal(SVGViewBox* aVal, SVGElement* aSVGElement)
         : mozilla::dom::SVGIRect(), mVal(aVal), mSVGElement(aSVGElement) {}
 
-    nsSVGViewBox* mVal;  // kept alive because it belongs to content
+    SVGViewBox* mVal;  // kept alive because it belongs to content
     RefPtr<SVGElement> mSVGElement;
 
     // Script may have modified animation parameters or timeline -- DOM getters
     // need to flush any resample requests to reflect these modifications.
     float X() const final {
       mSVGElement->FlushAnimations();
       return mVal->GetAnimValue().x;
     }
@@ -180,32 +179,34 @@ class nsSVGViewBox {
     virtual nsIContent* GetParentObject() const override { return mSVGElement; }
 
    private:
     virtual ~DOMAnimVal();
   };
 
   struct SMILViewBox : public nsISMILAttr {
    public:
-    SMILViewBox(nsSVGViewBox* aVal, SVGElement* aSVGElement)
+    SMILViewBox(SVGViewBox* 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.
-    nsSVGViewBox* mVal;
+    SVGViewBox* 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;
   };
 
-  static nsSVGAttrTearoffTable<nsSVGViewBox, mozilla::dom::SVGAnimatedRect>
+  static nsSVGAttrTearoffTable<SVGViewBox, mozilla::dom::SVGAnimatedRect>
       sSVGAnimatedRectTearoffTable;
 };
 
+}  // namespace mozilla
+
 #endif  // __NS_SVGVIEWBOX_H__
--- a/dom/svg/SVGViewBoxSMILType.cpp
+++ b/dom/svg/SVGViewBoxSMILType.cpp
@@ -1,59 +1,57 @@
 /* -*- 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 "SVGViewBoxSMILType.h"
 #include "nsSMILValue.h"
-#include "nsSVGViewBox.h"
+#include "SVGViewBox.h"
 #include "nsDebug.h"
 #include <math.h>
 
 namespace mozilla {
 
 /*static*/ SVGViewBoxSMILType SVGViewBoxSMILType::sSingleton;
 
 void SVGViewBoxSMILType::Init(nsSMILValue& aValue) const {
   MOZ_ASSERT(aValue.IsNull(), "Unexpected value type");
 
-  aValue.mU.mPtr = new nsSVGViewBoxRect();
+  aValue.mU.mPtr = new SVGViewBoxRect();
   aValue.mType = this;
 }
 
 void SVGViewBoxSMILType::Destroy(nsSMILValue& aValue) const {
   MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value");
-  delete static_cast<nsSVGViewBoxRect*>(aValue.mU.mPtr);
+  delete static_cast<SVGViewBoxRect*>(aValue.mU.mPtr);
   aValue.mU.mPtr = nullptr;
   aValue.mType = SMILNullType::Singleton();
 }
 
 nsresult SVGViewBoxSMILType::Assign(nsSMILValue& aDest,
                                     const nsSMILValue& aSrc) const {
   MOZ_ASSERT(aDest.mType == aSrc.mType, "Incompatible SMIL types");
   MOZ_ASSERT(aDest.mType == this, "Unexpected SMIL value");
 
-  const nsSVGViewBoxRect* src =
-      static_cast<const nsSVGViewBoxRect*>(aSrc.mU.mPtr);
-  nsSVGViewBoxRect* dst = static_cast<nsSVGViewBoxRect*>(aDest.mU.mPtr);
+  const SVGViewBoxRect* src = static_cast<const SVGViewBoxRect*>(aSrc.mU.mPtr);
+  SVGViewBoxRect* dst = static_cast<SVGViewBoxRect*>(aDest.mU.mPtr);
   *dst = *src;
   return NS_OK;
 }
 
 bool SVGViewBoxSMILType::IsEqual(const nsSMILValue& aLeft,
                                  const nsSMILValue& aRight) const {
   MOZ_ASSERT(aLeft.mType == aRight.mType, "Incompatible SMIL types");
   MOZ_ASSERT(aLeft.mType == this, "Unexpected type for SMIL value");
 
-  const nsSVGViewBoxRect* leftBox =
-      static_cast<const nsSVGViewBoxRect*>(aLeft.mU.mPtr);
-  const nsSVGViewBoxRect* rightBox =
-      static_cast<nsSVGViewBoxRect*>(aRight.mU.mPtr);
+  const SVGViewBoxRect* leftBox =
+      static_cast<const SVGViewBoxRect*>(aLeft.mU.mPtr);
+  const SVGViewBoxRect* rightBox = static_cast<SVGViewBoxRect*>(aRight.mU.mPtr);
   return *leftBox == *rightBox;
 }
 
 nsresult SVGViewBoxSMILType::Add(nsSMILValue& aDest,
                                  const nsSMILValue& aValueToAdd,
                                  uint32_t aCount) const {
   MOZ_ASSERT(aValueToAdd.mType == aDest.mType, "Trying to add invalid types");
   MOZ_ASSERT(aValueToAdd.mType == this, "Unexpected source type");
@@ -66,20 +64,19 @@ nsresult SVGViewBoxSMILType::Add(nsSMILV
 }
 
 nsresult SVGViewBoxSMILType::ComputeDistance(const nsSMILValue& aFrom,
                                              const nsSMILValue& aTo,
                                              double& aDistance) const {
   MOZ_ASSERT(aFrom.mType == aTo.mType, "Trying to compare different types");
   MOZ_ASSERT(aFrom.mType == this, "Unexpected source type");
 
-  const nsSVGViewBoxRect* from =
-      static_cast<const nsSVGViewBoxRect*>(aFrom.mU.mPtr);
-  const nsSVGViewBoxRect* to =
-      static_cast<const nsSVGViewBoxRect*>(aTo.mU.mPtr);
+  const SVGViewBoxRect* from =
+      static_cast<const SVGViewBoxRect*>(aFrom.mU.mPtr);
+  const SVGViewBoxRect* to = static_cast<const SVGViewBoxRect*>(aTo.mU.mPtr);
 
   if (from->none || to->none) {
     return NS_ERROR_FAILURE;
   }
 
   // We use the distances between the edges rather than the difference between
   // the x, y, width and height for the "distance". This is necessary in
   // order for the "distance" result that we calculate to be the same for a
@@ -101,31 +98,31 @@ nsresult SVGViewBoxSMILType::Interpolate
                                          const nsSMILValue& aEndVal,
                                          double aUnitDistance,
                                          nsSMILValue& aResult) const {
   MOZ_ASSERT(aStartVal.mType == aEndVal.mType,
              "Trying to interpolate different types");
   MOZ_ASSERT(aStartVal.mType == this, "Unexpected types for interpolation");
   MOZ_ASSERT(aResult.mType == this, "Unexpected result type");
 
-  const nsSVGViewBoxRect* start =
-      static_cast<const nsSVGViewBoxRect*>(aStartVal.mU.mPtr);
-  const nsSVGViewBoxRect* end =
-      static_cast<const nsSVGViewBoxRect*>(aEndVal.mU.mPtr);
+  const SVGViewBoxRect* start =
+      static_cast<const SVGViewBoxRect*>(aStartVal.mU.mPtr);
+  const SVGViewBoxRect* end =
+      static_cast<const SVGViewBoxRect*>(aEndVal.mU.mPtr);
 
   if (start->none || end->none) {
     return NS_ERROR_FAILURE;
   }
 
-  nsSVGViewBoxRect* current = static_cast<nsSVGViewBoxRect*>(aResult.mU.mPtr);
+  SVGViewBoxRect* current = static_cast<SVGViewBoxRect*>(aResult.mU.mPtr);
 
   float x = (start->x + (end->x - start->x) * aUnitDistance);
   float y = (start->y + (end->y - start->y) * aUnitDistance);
   float width = (start->width + (end->width - start->width) * aUnitDistance);
   float height =
       (start->height + (end->height - start->height) * aUnitDistance);
 
-  *current = nsSVGViewBoxRect(x, y, width, height);
+  *current = SVGViewBoxRect(x, y, width, height);
 
   return NS_OK;
 }
 
 }  // namespace mozilla
--- a/dom/svg/SVGViewElement.cpp
+++ b/dom/svg/SVGViewElement.cpp
@@ -62,16 +62,16 @@ SVGViewElement::PreserveAspectRatio() {
 
 //----------------------------------------------------------------------
 // SVGElement methods
 
 SVGElement::EnumAttributesInfo SVGViewElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGViewBox* SVGViewElement::GetViewBox() { return &mViewBox; }
+SVGViewBox* SVGViewElement::GetViewBox() { return &mViewBox; }
 
 SVGAnimatedPreserveAspectRatio* SVGViewElement::GetPreserveAspectRatio() {
   return &mPreserveAspectRatio;
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGViewElement.h
+++ b/dom/svg/SVGViewElement.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_SVGViewElement_h
 #define mozilla_dom_SVGViewElement_h
 
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "SVGEnum.h"
 #include "SVGStringList.h"
-#include "nsSVGViewBox.h"
+#include "SVGViewBox.h"
 #include "mozilla/dom/SVGElement.h"
 
 class nsSVGOuterSVGFrame;
 
 nsresult NS_NewSVGViewElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
@@ -53,19 +53,19 @@ class SVGViewElement : public SVGViewEle
 
   virtual EnumAttributesInfo GetEnumInfo() override;
 
   enum { ZOOMANDPAN };
   SVGEnum mEnumAttributes[1];
   static SVGEnumMapping sZoomAndPanMap[];
   static EnumInfo sEnumInfo[1];
 
-  virtual nsSVGViewBox* GetViewBox() override;
+  virtual SVGViewBox* GetViewBox() override;
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
 
-  nsSVGViewBox mViewBox;
+  SVGViewBox mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGViewElement_h
--- a/dom/svg/SVGViewportElement.cpp
+++ b/dom/svg/SVGViewportElement.cpp
@@ -181,34 +181,34 @@ gfx::Matrix SVGViewportElement::GetViewB
     viewportWidth = mViewportWidth;
     viewportHeight = mViewportHeight;
   }
 
   if (viewportWidth <= 0.0f || viewportHeight <= 0.0f) {
     return gfx::Matrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);  // singular
   }
 
-  nsSVGViewBoxRect viewBox =
+  SVGViewBoxRect viewBox =
       GetViewBoxWithSynthesis(viewportWidth, viewportHeight);
 
   if (viewBox.width <= 0.0f || viewBox.height <= 0.0f) {
     return gfx::Matrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);  // singular
   }
 
   return SVGContentUtils::GetViewBoxTransform(
       viewportWidth, viewportHeight, viewBox.x, viewBox.y, viewBox.width,
       viewBox.height, GetPreserveAspectRatioWithOverride());
 }
 //----------------------------------------------------------------------
 // SVGViewportElement
 
 float SVGViewportElement::GetLength(uint8_t aCtxType) {
-  const nsSVGViewBoxRect* viewbox = GetViewBoxInternal().HasRect()
-                                        ? &GetViewBoxInternal().GetAnimValue()
-                                        : nullptr;
+  const SVGViewBoxRect* viewbox = GetViewBoxInternal().HasRect()
+                                      ? &GetViewBoxInternal().GetAnimValue()
+                                      : nullptr;
 
   float h, w;
   if (viewbox) {
     w = viewbox->width;
     h = viewbox->height;
   } else if (IsInner()) {
     SVGViewportElement* ctx = GetCtx();
     w = mLengthAttributes[ATTR_WIDTH].GetAnimValue(ctx);
@@ -291,51 +291,51 @@ float SVGViewportElement::GetLength(uint
 /* virtual */ bool SVGViewportElement::HasValidDimensions() const {
   return !IsInner() ||
          ((!mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() ||
            mLengthAttributes[ATTR_WIDTH].GetAnimValInSpecifiedUnits() > 0) &&
           (!mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet() ||
            mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0));
 }
 
-nsSVGViewBox* SVGViewportElement::GetViewBox() { return &mViewBox; }
+SVGViewBox* SVGViewportElement::GetViewBox() { return &mViewBox; }
 
 SVGAnimatedPreserveAspectRatio* SVGViewportElement::GetPreserveAspectRatio() {
   return &mPreserveAspectRatio;
 }
 
 bool SVGViewportElement::ShouldSynthesizeViewBox() const {
   MOZ_ASSERT(!HasViewBoxRect(), "Should only be called if we lack a viewBox");
 
   return IsRoot() && OwnerDoc()->IsBeingUsedAsImage();
 }
 
 //----------------------------------------------------------------------
 // implementation helpers
 
-nsSVGViewBoxRect SVGViewportElement::GetViewBoxWithSynthesis(
+SVGViewBoxRect SVGViewportElement::GetViewBoxWithSynthesis(
     float aViewportWidth, float aViewportHeight) const {
   if (GetViewBoxInternal().HasRect()) {
     return GetViewBoxInternal().GetAnimValue();
   }
 
   if (ShouldSynthesizeViewBox()) {
     // Special case -- fake a viewBox, using height & width attrs.
     // (Use |this| as context, since if we get here, we're outermost <svg>.)
-    return nsSVGViewBoxRect(
+    return SVGViewBoxRect(
         0, 0,
         ComputeSynthesizedViewBoxDimension(mLengthAttributes[ATTR_WIDTH],
                                            mViewportWidth, this),
         ComputeSynthesizedViewBoxDimension(mLengthAttributes[ATTR_HEIGHT],
                                            mViewportHeight, this));
   }
 
   // No viewBox attribute, so we shouldn't auto-scale. This is equivalent
   // to having a viewBox that exactly matches our viewport size.
-  return nsSVGViewBoxRect(0, 0, aViewportWidth, aViewportHeight);
+  return SVGViewBoxRect(0, 0, aViewportWidth, aViewportHeight);
 }
 
 SVGElement::LengthAttributesInfo SVGViewportElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 }  // namespace dom
--- a/dom/svg/SVGViewportElement.h
+++ b/dom/svg/SVGViewportElement.h
@@ -13,17 +13,17 @@
 #include "nsIContentInlines.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "SVGEnum.h"
 #include "SVGGraphicsElement.h"
 #include "SVGImageContext.h"
 #include "nsSVGLength2.h"
 #include "nsISVGPoint.h"
 #include "SVGPreserveAspectRatio.h"
-#include "nsSVGViewBox.h"
+#include "SVGViewBox.h"
 
 class nsSVGOuterSVGFrame;
 class nsSVGViewportFrame;
 
 namespace mozilla {
 class AutoPreserveAspectRatioOverride;
 class DOMSVGAnimatedPreserveAspectRatio;
 
@@ -121,17 +121,17 @@ class SVGViewportElement : public SVGGra
   void SetViewportSize(const svgFloatSize& aSize) {
     mViewportWidth = aSize.width;
     mViewportHeight = aSize.height;
   }
 
   // WebIDL
   already_AddRefed<SVGAnimatedRect> ViewBox();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
-  virtual nsSVGViewBox* GetViewBox() override;
+  virtual SVGViewBox* GetViewBox() override;
 
  protected:
   // implementation helpers:
 
   bool IsRoot() const {
     NS_ASSERTION((IsInUncomposedDoc() && !GetParent()) ==
                      (OwnerDoc()->GetRootElement() == this),
                  "Can't determine if we're root");
@@ -157,37 +157,37 @@ class SVGViewportElement : public SVGGra
     return mPreserveAspectRatio.GetAnimValue();
   }
 
   /**
    * Returns the explicit viewBox rect, if specified, or else a synthesized
    * viewBox, if appropriate, or else a viewBox matching the dimensions of the
    * SVG viewport.
    */
-  nsSVGViewBoxRect GetViewBoxWithSynthesis(float aViewportWidth,
-                                           float aViewportHeight) const;
+  SVGViewBoxRect GetViewBoxWithSynthesis(float aViewportWidth,
+                                         float aViewportHeight) const;
 
   /**
    * Retrieve the value of currentScale and currentTranslate.
    */
   virtual SVGPoint GetCurrentTranslate() const { return SVGPoint(0.0f, 0.0f); }
   virtual float GetCurrentScale() const { return 1.0f; }
 
   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
   virtual LengthAttributesInfo GetLengthInfo() override;
 
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
 
-  virtual const nsSVGViewBox& GetViewBoxInternal() const { return mViewBox; }
+  virtual const SVGViewBox& GetViewBoxInternal() const { return mViewBox; }
   virtual SVGAnimatedTransformList* GetTransformInternal() const {
     return mTransforms;
   }
-  nsSVGViewBox mViewBox;
+  SVGViewBox mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
 
   // The size of the rectangular SVG viewport into which we render. This is
   // not (necessarily) the same as the content area. See:
   //
   //   http://www.w3.org/TR/SVG11/coords.html#ViewportSpace
   //
   // XXXjwatt Currently only used for outer <svg>, but maybe we could use -1 to
--- a/dom/svg/moz.build
+++ b/dom/svg/moz.build
@@ -122,18 +122,16 @@ UNIFIED_SOURCES += [
     'DOMSVGStringList.cpp',
     'DOMSVGTransform.cpp',
     'DOMSVGTransformList.cpp',
     'nsISVGPoint.cpp',
     'nsSVGBoolean.cpp',
     'nsSVGInteger.cpp',
     'nsSVGLength2.cpp',
     'nsSVGNumber2.cpp',
-    'nsSVGString.cpp',
-    'nsSVGViewBox.cpp',
     'SVGAElement.cpp',
     'SVGAngle.cpp',
     'SVGAnimatedAngle.cpp',
     'SVGAnimatedBoolean.cpp',
     'SVGAnimatedEnumeration.cpp',
     'SVGAnimatedInteger.cpp',
     'SVGAnimatedLength.cpp',
     'SVGAnimatedLengthList.cpp',
@@ -224,16 +222,17 @@ UNIFIED_SOURCES += [
     'SVGPolygonElement.cpp',
     'SVGPolylineElement.cpp',
     'SVGPreserveAspectRatio.cpp',
     'SVGRect.cpp',
     'SVGRectElement.cpp',
     'SVGScriptElement.cpp',
     'SVGSetElement.cpp',
     'SVGStopElement.cpp',
+    'SVGString.cpp',
     'SVGStringList.cpp',
     'SVGStyleElement.cpp',
     'SVGSVGElement.cpp',
     'SVGSwitchElement.cpp',
     'SVGSymbolElement.cpp',
     'SVGTests.cpp',
     'SVGTextContentElement.cpp',
     'SVGTextElement.cpp',
@@ -242,16 +241,17 @@ UNIFIED_SOURCES += [
     'SVGTitleElement.cpp',
     'SVGTransform.cpp',
     'SVGTransformableElement.cpp',
     'SVGTransformList.cpp',
     'SVGTransformListParser.cpp',
     'SVGTransformListSMILType.cpp',
     'SVGTSpanElement.cpp',
     'SVGUseElement.cpp',
+    'SVGViewBox.cpp',
     'SVGViewBoxSMILType.cpp',
     'SVGViewElement.cpp',
     'SVGViewportElement.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -9442,18 +9442,18 @@ static nsRect ComputeSVGReferenceRect(ns
 
       if (svgElement && svgElement->HasViewBoxRect()) {
         // If a ‘viewBox‘ attribute is specified for the SVG viewport creating
         // element:
         // 1. The reference box is positioned at the origin of the coordinate
         //    system established by the ‘viewBox‘ attribute.
         // 2. The dimension of the reference box is set to the width and height
         //    values of the ‘viewBox‘ attribute.
-        nsSVGViewBox* viewBox = svgElement->GetViewBox();
-        const nsSVGViewBoxRect& value = viewBox->GetAnimValue();
+        SVGViewBox* viewBox = svgElement->GetViewBox();
+        const SVGViewBoxRect& value = viewBox->GetAnimValue();
         r = nsRect(nsPresContext::CSSPixelsToAppUnits(value.x),
                    nsPresContext::CSSPixelsToAppUnits(value.y),
                    nsPresContext::CSSPixelsToAppUnits(value.width),
                    nsPresContext::CSSPixelsToAppUnits(value.height));
       } else {
         // No viewBox is specified, uses the nearest SVG viewport as reference
         // box.
         svgFloatSize viewportSize = svgElement->GetViewportSize();
--- a/layout/svg/nsCSSClipPathInstance.cpp
+++ b/layout/svg/nsCSSClipPathInstance.cpp
@@ -2,29 +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/. */
 
 // Main header first:
 #include "nsCSSClipPathInstance.h"
 
-#include "gfx2DGlue.h"
-#include "gfxContext.h"
-#include "gfxPlatform.h"
+#include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGPathData.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/PathHelpers.h"
 #include "mozilla/ShapeUtils.h"
+#include "nsSVGUtils.h"
+#include "gfx2DGlue.h"
+#include "gfxContext.h"
+#include "gfxPlatform.h"
 #include "nsCSSRendering.h"
 #include "nsIFrame.h"
 #include "nsLayoutUtils.h"
-#include "SVGElement.h"
-#include "nsSVGUtils.h"
-#include "nsSVGViewBox.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 
 /* static*/ void nsCSSClipPathInstance::ApplyBasicShapeOrPathClip(
     gfxContext& aContext, nsIFrame* aFrame) {
   auto& clipPathStyle = aFrame->StyleSVGReset()->mClipPath;
--- a/layout/svg/nsSVGMarkerFrame.cpp
+++ b/layout/svg/nsSVGMarkerFrame.cpp
@@ -99,17 +99,17 @@ void nsSVGMarkerFrame::PaintMark(gfxCont
 
   AutoMarkerReferencer markerRef(this, aMarkedFrame);
 
   SVGMarkerElement* marker = static_cast<SVGMarkerElement*>(GetContent());
   if (!marker->HasValidDimensions()) {
     return;
   }
 
-  const nsSVGViewBoxRect viewBox = marker->GetViewBoxRect();
+  const SVGViewBoxRect viewBox = marker->GetViewBoxRect();
 
   if (viewBox.width <= 0.0f || viewBox.height <= 0.0f) {
     // We must disable rendering if the viewBox width or height are zero.
     return;
   }
 
   Matrix viewBoxTM = marker->GetViewBoxTransform();
 
@@ -149,17 +149,17 @@ SVGBBox nsSVGMarkerFrame::GetMarkBBoxCon
 
   AutoMarkerReferencer markerRef(this, aMarkedFrame);
 
   SVGMarkerElement* content = static_cast<SVGMarkerElement*>(GetContent());
   if (!content->HasValidDimensions()) {
     return bbox;
   }
 
-  const nsSVGViewBoxRect viewBox = content->GetViewBoxRect();
+  const SVGViewBoxRect viewBox = content->GetViewBoxRect();
 
   if (viewBox.width <= 0.0f || viewBox.height <= 0.0f) {
     return bbox;
   }
 
   mMarkerTM = content->GetMarkerTransform(aStrokeWidth, aMark);
   Matrix viewBoxTM = content->GetViewBoxTransform();
 
--- a/layout/svg/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/nsSVGOuterSVGFrame.cpp
@@ -247,17 +247,17 @@ NS_QUERYFRAME_TAIL_INHERITING(nsSVGDispl
     }
     if (ratio.height < 0) {
       ratio.height = 0;
     }
     return ratio;
   }
 
   SVGViewElement* viewElement = content->GetCurrentViewElement();
-  const nsSVGViewBoxRect* viewbox = nullptr;
+  const SVGViewBoxRect* viewbox = nullptr;
 
   // The logic here should match HasViewBox().
   if (viewElement && viewElement->mViewBox.HasRect()) {
     viewbox = &viewElement->mViewBox.GetAnimValue();
   } else if (content->mViewBox.HasRect()) {
     viewbox = &content->mViewBox.GetAnimValue();
   }
 
--- a/layout/svg/nsSVGPatternFrame.cpp
+++ b/layout/svg/nsSVGPatternFrame.cpp
@@ -125,17 +125,17 @@ static float MaxExpansion(const Matrix &
   return sqrt(f + sqrt(g * g + h * h));
 }
 
 // The SVG specification says that the 'patternContentUnits' attribute "has no
 // effect if attribute ‘viewBox’ is specified". We still need to include a bbox
 // scale if the viewBox is specified and _patternUnits_ is set to or defaults to
 // objectBoundingBox though, since in that case the viewBox is relative to the
 // bbox
-static bool IncludeBBoxScale(const nsSVGViewBox &aViewBox,
+static bool IncludeBBoxScale(const SVGViewBox &aViewBox,
                              uint32_t aPatternContentUnits,
                              uint32_t aPatternUnits) {
   return (!aViewBox.IsExplicitlySet() &&
           aPatternContentUnits == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) ||
          (aViewBox.IsExplicitlySet() &&
           aPatternUnits == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
 }
 
@@ -157,17 +157,17 @@ static Matrix GetPatternMatrix(uint16_t 
   float scale = 1.0f / MaxExpansion(callerCTM);
   Matrix patternMatrix = patternTransform;
   patternMatrix.PreScale(scale, scale);
   patternMatrix.PreTranslate(minx, miny);
 
   return patternMatrix;
 }
 
-static nsresult GetTargetGeometry(gfxRect *aBBox, const nsSVGViewBox &aViewBox,
+static nsresult GetTargetGeometry(gfxRect *aBBox, const SVGViewBox &aViewBox,
                                   uint16_t aPatternContentUnits,
                                   uint16_t aPatternUnits, nsIFrame *aTarget,
                                   const Matrix &aContextMatrix,
                                   const gfxRect *aOverrideBounds) {
   *aBBox = aOverrideBounds
                ? *aOverrideBounds
                : nsSVGUtils::GetBBox(aTarget,
                                      nsSVGUtils::eUseFrameBoundsForOuterSVG |
@@ -208,17 +208,17 @@ already_AddRefed<SourceSurface> nsSVGPat
 
   nsSVGPatternFrame *patternWithChildren = GetPatternWithChildren();
   if (!patternWithChildren) {
     // Either no kids or a bad reference
     return nullptr;
   }
   nsIFrame *firstKid = patternWithChildren->mFrames.FirstChild();
 
-  const nsSVGViewBox &viewBox = GetViewBox();
+  const SVGViewBox &viewBox = GetViewBox();
 
   uint16_t patternContentUnits =
       GetEnumValue(SVGPatternElement::PATTERNCONTENTUNITS);
   uint16_t patternUnits = GetEnumValue(SVGPatternElement::PATTERNUNITS);
 
   /*
    * Get the content geometry information.  This is a little tricky --
    * our parent is probably a <defs>, but we are rendering in the context
@@ -466,18 +466,18 @@ gfxMatrix nsSVGPatternFrame::GetPatternT
       GetPatternTransformList(GetContent());
   if (!animTransformList) {
     return gfxMatrix();
   }
 
   return animTransformList->GetAnimValue().GetConsolidationMatrix();
 }
 
-const nsSVGViewBox &nsSVGPatternFrame::GetViewBox(nsIContent *aDefault) {
-  const nsSVGViewBox &thisViewBox =
+const SVGViewBox &nsSVGPatternFrame::GetViewBox(nsIContent *aDefault) {
+  const SVGViewBox &thisViewBox =
       static_cast<SVGPatternElement *>(GetContent())->mViewBox;
 
   if (thisViewBox.IsExplicitlySet()) {
     return thisViewBox;
   }
 
   // Before we recurse, make sure we'll break reference loops and over long
   // reference chains:
@@ -605,17 +605,17 @@ gfxRect nsSVGPatternFrame::GetPatternRec
     y = nsSVGUtils::UserSpace(aTarget, tmpY) * scale;
     width = nsSVGUtils::UserSpace(aTarget, tmpWidth) * scale;
     height = nsSVGUtils::UserSpace(aTarget, tmpHeight) * scale;
   }
 
   return gfxRect(x, y, width, height);
 }
 
-gfxMatrix nsSVGPatternFrame::ConstructCTM(const nsSVGViewBox &aViewBox,
+gfxMatrix nsSVGPatternFrame::ConstructCTM(const SVGViewBox &aViewBox,
                                           uint16_t aPatternContentUnits,
                                           uint16_t aPatternUnits,
                                           const gfxRect &callerBBox,
                                           const Matrix &callerCTM,
                                           nsIFrame *aTarget) {
   SVGViewportElement *ctx = nullptr;
   nsIContent *targetContent = aTarget->GetContent();
   gfxFloat scaleX, scaleY;
@@ -629,17 +629,17 @@ gfxMatrix nsSVGPatternFrame::ConstructCT
       ctx = static_cast<SVGElement *>(targetContent)->GetCtx();
     }
     scaleX = scaleY = MaxExpansion(callerCTM);
   }
 
   if (!aViewBox.IsExplicitlySet()) {
     return gfxMatrix(scaleX, 0.0, 0.0, scaleY, 0.0, 0.0);
   }
-  const nsSVGViewBoxRect viewBoxRect = aViewBox.GetAnimValue();
+  const SVGViewBoxRect viewBoxRect = aViewBox.GetAnimValue();
 
   if (viewBoxRect.height <= 0.0f || viewBoxRect.width <= 0.0f) {
     return gfxMatrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);  // singular
   }
 
   float viewportWidth, viewportHeight;
   if (targetContent->IsSVGElement()) {
     // If we're dealing with an SVG target only retrieve the context once.
--- a/layout/svg/nsSVGPatternFrame.h
+++ b/layout/svg/nsSVGPatternFrame.h
@@ -11,22 +11,22 @@
 #include "gfxMatrix.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/RefPtr.h"
 #include "nsAutoPtr.h"
 #include "nsSVGPaintServerFrame.h"
 
 class nsIFrame;
 class nsSVGLength2;
-class nsSVGViewBox;
 
 namespace mozilla {
 class SVGAnimatedPreserveAspectRatio;
 class SVGAnimatedTransformList;
 class SVGGeometryFrame;
+class SVGViewBox;
 }  // namespace mozilla
 
 class nsSVGPatternFrame final : public nsSVGPaintServerFrame {
   typedef mozilla::gfx::SourceSurface SourceSurface;
 
  public:
   NS_DECL_FRAMEARENA_HELPERS(nsSVGPatternFrame)
 
@@ -74,18 +74,18 @@ class nsSVGPatternFrame final : public n
   // Accessors to lookup pattern attributes
   uint16_t GetEnumValue(uint32_t aIndex, nsIContent* aDefault);
   uint16_t GetEnumValue(uint32_t aIndex) {
     return GetEnumValue(aIndex, mContent);
   }
   mozilla::SVGAnimatedTransformList* GetPatternTransformList(
       nsIContent* aDefault);
   gfxMatrix GetPatternTransform();
-  const nsSVGViewBox& GetViewBox(nsIContent* aDefault);
-  const nsSVGViewBox& GetViewBox() { return GetViewBox(mContent); }
+  const SVGViewBox& GetViewBox(nsIContent* aDefault);
+  const SVGViewBox& GetViewBox() { return GetViewBox(mContent); }
   const SVGAnimatedPreserveAspectRatio& GetPreserveAspectRatio(
       nsIContent* aDefault);
   const SVGAnimatedPreserveAspectRatio& GetPreserveAspectRatio() {
     return GetPreserveAspectRatio(mContent);
   }
   const nsSVGLength2* GetLengthValue(uint32_t aIndex, nsIContent* aDefault);
   const nsSVGLength2* GetLengthValue(uint32_t aIndex) {
     return GetLengthValue(aIndex, mContent);
@@ -104,17 +104,17 @@ class nsSVGPatternFrame final : public n
    * inheriting its children if it references another <pattern>).  This
    * function returns this nsSVGPatternFrame or the first pattern along the
    * reference chain (if there is one) to have children.
    */
   nsSVGPatternFrame* GetPatternWithChildren();
 
   gfxRect GetPatternRect(uint16_t aPatternUnits, const gfxRect& bbox,
                          const Matrix& callerCTM, nsIFrame* aTarget);
-  gfxMatrix ConstructCTM(const nsSVGViewBox& aViewBox,
+  gfxMatrix ConstructCTM(const SVGViewBox& aViewBox,
                          uint16_t aPatternContentUnits, uint16_t aPatternUnits,
                          const gfxRect& callerBBox, const Matrix& callerCTM,
                          nsIFrame* aTarget);
 
  private:
   // this is a *temporary* reference to the frame of the element currently
   // referencing our pattern.  This must be temporary because different
   // referencing frames will all reference this one frame