Bug 1515187 - Part 4 Rename nsSVGElement to SVGElement and put it in the mozilla:dom namespace r=dholbert
authorlongsonr <longsonr@gmail.com>
Fri, 21 Dec 2018 08:58:14 +0000
changeset 508768 2d778b55d6bee9fcd82ad71b2719c2ae7b358674
parent 508767 20a175eb2e24876e5a5a20b0f4a922273830d776
child 508769 e4a0eaea412616e02e66ca6cc90d1f57a1b4d798
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1515187
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1515187 - Part 4 Rename nsSVGElement to SVGElement and put it in the mozilla:dom namespace r=dholbert
dom/base/Element.cpp
dom/base/nsDocument.cpp
dom/base/nsIDocument.h
dom/bindings/Bindings.conf
dom/smil/test/db_smilMappedAttrList.js
dom/svg/DOMSVGAnimatedLengthList.cpp
dom/svg/DOMSVGAnimatedLengthList.h
dom/svg/DOMSVGAnimatedNumberList.cpp
dom/svg/DOMSVGAnimatedNumberList.h
dom/svg/DOMSVGLength.cpp
dom/svg/DOMSVGLength.h
dom/svg/DOMSVGLengthList.cpp
dom/svg/DOMSVGLengthList.h
dom/svg/DOMSVGNumber.cpp
dom/svg/DOMSVGNumber.h
dom/svg/DOMSVGNumberList.cpp
dom/svg/DOMSVGNumberList.h
dom/svg/DOMSVGPathSeg.cpp
dom/svg/DOMSVGPathSeg.h
dom/svg/DOMSVGPathSegList.cpp
dom/svg/DOMSVGPathSegList.h
dom/svg/DOMSVGPoint.cpp
dom/svg/DOMSVGPoint.h
dom/svg/DOMSVGPointList.cpp
dom/svg/DOMSVGPointList.h
dom/svg/DOMSVGStringList.cpp
dom/svg/DOMSVGStringList.h
dom/svg/DOMSVGTransformList.cpp
dom/svg/DOMSVGTransformList.h
dom/svg/SVGAElement.cpp
dom/svg/SVGAngle.h
dom/svg/SVGAnimateMotionElement.h
dom/svg/SVGAnimatedAngle.h
dom/svg/SVGAnimatedBoolean.h
dom/svg/SVGAnimatedEnumeration.h
dom/svg/SVGAnimatedInteger.h
dom/svg/SVGAnimatedLength.h
dom/svg/SVGAnimatedLengthList.cpp
dom/svg/SVGAnimatedLengthList.h
dom/svg/SVGAnimatedNumber.h
dom/svg/SVGAnimatedNumberList.cpp
dom/svg/SVGAnimatedNumberList.h
dom/svg/SVGAnimatedPathSegList.cpp
dom/svg/SVGAnimatedPathSegList.h
dom/svg/SVGAnimatedPointList.cpp
dom/svg/SVGAnimatedPointList.h
dom/svg/SVGAnimatedPreserveAspectRatio.cpp
dom/svg/SVGAnimatedPreserveAspectRatio.h
dom/svg/SVGAnimatedRect.cpp
dom/svg/SVGAnimatedRect.h
dom/svg/SVGAnimatedString.h
dom/svg/SVGAnimatedTransformList.cpp
dom/svg/SVGAnimatedTransformList.h
dom/svg/SVGAnimationElement.cpp
dom/svg/SVGAnimationElement.h
dom/svg/SVGCircleElement.cpp
dom/svg/SVGClipPathElement.cpp
dom/svg/SVGContentUtils.cpp
dom/svg/SVGContentUtils.h
dom/svg/SVGDescElement.h
dom/svg/SVGDocument.cpp
dom/svg/SVGDocument.h
dom/svg/SVGElement.cpp
dom/svg/SVGElement.h
dom/svg/SVGEllipseElement.cpp
dom/svg/SVGFEBlendElement.cpp
dom/svg/SVGFEColorMatrixElement.cpp
dom/svg/SVGFEComponentTransferElement.cpp
dom/svg/SVGFECompositeElement.cpp
dom/svg/SVGFEConvolveMatrixElement.cpp
dom/svg/SVGFEDisplacementMapElement.cpp
dom/svg/SVGFEDistantLightElement.cpp
dom/svg/SVGFEDropShadowElement.cpp
dom/svg/SVGFEFloodElement.cpp
dom/svg/SVGFEGaussianBlurElement.cpp
dom/svg/SVGFEImageElement.cpp
dom/svg/SVGFEMergeElement.cpp
dom/svg/SVGFEMergeNodeElement.cpp
dom/svg/SVGFEMorphologyElement.cpp
dom/svg/SVGFEOffsetElement.cpp
dom/svg/SVGFEPointLightElement.cpp
dom/svg/SVGFESpecularLightingElement.cpp
dom/svg/SVGFESpotLightElement.cpp
dom/svg/SVGFETileElement.cpp
dom/svg/SVGFETurbulenceElement.cpp
dom/svg/SVGFilterElement.cpp
dom/svg/SVGFilterElement.h
dom/svg/SVGForeignObjectElement.cpp
dom/svg/SVGForeignObjectElement.h
dom/svg/SVGGeometryElement.cpp
dom/svg/SVGGeometryElement.h
dom/svg/SVGGradientElement.cpp
dom/svg/SVGGradientElement.h
dom/svg/SVGGraphicsElement.h
dom/svg/SVGImageElement.cpp
dom/svg/SVGLength.cpp
dom/svg/SVGLength.h
dom/svg/SVGLengthList.cpp
dom/svg/SVGLengthList.h
dom/svg/SVGLineElement.cpp
dom/svg/SVGMPathElement.cpp
dom/svg/SVGMPathElement.h
dom/svg/SVGMarkerElement.cpp
dom/svg/SVGMarkerElement.h
dom/svg/SVGMaskElement.cpp
dom/svg/SVGMaskElement.h
dom/svg/SVGMetadataElement.h
dom/svg/SVGMotionSMILAnimationFunction.cpp
dom/svg/SVGMotionSMILAttr.cpp
dom/svg/SVGMotionSMILAttr.h
dom/svg/SVGMotionSMILPathUtils.h
dom/svg/SVGNumberList.h
dom/svg/SVGPathData.h
dom/svg/SVGPathElement.cpp
dom/svg/SVGPatternElement.cpp
dom/svg/SVGPatternElement.h
dom/svg/SVGPointList.h
dom/svg/SVGPolyElement.cpp
dom/svg/SVGPolyElement.h
dom/svg/SVGPreserveAspectRatio.h
dom/svg/SVGRect.cpp
dom/svg/SVGRect.h
dom/svg/SVGRectElement.cpp
dom/svg/SVGSVGElement.cpp
dom/svg/SVGSVGElement.h
dom/svg/SVGScriptElement.cpp
dom/svg/SVGScriptElement.h
dom/svg/SVGStopElement.cpp
dom/svg/SVGStopElement.h
dom/svg/SVGStyleElement.h
dom/svg/SVGTSpanElement.cpp
dom/svg/SVGTests.h
dom/svg/SVGTextContentElement.cpp
dom/svg/SVGTextElement.cpp
dom/svg/SVGTextPathElement.cpp
dom/svg/SVGTextPositioningElement.cpp
dom/svg/SVGTitleElement.h
dom/svg/SVGTransform.h
dom/svg/SVGTransformableElement.cpp
dom/svg/SVGTransformableElement.h
dom/svg/SVGUseElement.cpp
dom/svg/SVGUseElement.h
dom/svg/SVGViewElement.cpp
dom/svg/SVGViewElement.h
dom/svg/SVGViewportElement.cpp
dom/svg/SVGViewportElement.h
dom/svg/moz.build
dom/svg/nsISVGPoint.cpp
dom/svg/nsSVGAngle.cpp
dom/svg/nsSVGAngle.h
dom/svg/nsSVGAnimatedTransformList.cpp
dom/svg/nsSVGAnimatedTransformList.h
dom/svg/nsSVGBoolean.cpp
dom/svg/nsSVGBoolean.h
dom/svg/nsSVGClass.cpp
dom/svg/nsSVGClass.h
dom/svg/nsSVGElement.cpp
dom/svg/nsSVGElement.h
dom/svg/nsSVGEnum.cpp
dom/svg/nsSVGEnum.h
dom/svg/nsSVGFilters.cpp
dom/svg/nsSVGFilters.h
dom/svg/nsSVGInteger.cpp
dom/svg/nsSVGInteger.h
dom/svg/nsSVGIntegerPair.cpp
dom/svg/nsSVGIntegerPair.h
dom/svg/nsSVGLength2.cpp
dom/svg/nsSVGLength2.h
dom/svg/nsSVGNumber2.cpp
dom/svg/nsSVGNumber2.h
dom/svg/nsSVGNumberPair.cpp
dom/svg/nsSVGNumberPair.h
dom/svg/nsSVGString.cpp
dom/svg/nsSVGString.h
dom/svg/nsSVGViewBox.cpp
dom/svg/nsSVGViewBox.h
layout/base/nsLayoutUtils.cpp
layout/painting/nsDisplayList.cpp
layout/style/GeckoBindings.cpp
layout/svg/SVGGeometryFrame.cpp
layout/svg/SVGTextFrame.cpp
layout/svg/nsCSSClipPathInstance.cpp
layout/svg/nsFilterInstance.cpp
layout/svg/nsSVGClipPathFrame.cpp
layout/svg/nsSVGContainerFrame.cpp
layout/svg/nsSVGFilterFrame.cpp
layout/svg/nsSVGForeignObjectFrame.cpp
layout/svg/nsSVGGFrame.cpp
layout/svg/nsSVGIntegrationUtils.cpp
layout/svg/nsSVGMarkerFrame.cpp
layout/svg/nsSVGMaskFrame.cpp
layout/svg/nsSVGPatternFrame.cpp
layout/svg/nsSVGSwitchFrame.cpp
layout/svg/nsSVGUtils.cpp
layout/svg/nsSVGUtils.h
layout/svg/nsSVGViewportFrame.cpp
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -78,17 +78,17 @@
 #include "nsDocument.h"
 #include "nsAttrValueOrString.h"
 #include "nsAttrValueInlines.h"
 #include "nsCSSPseudoElements.h"
 #include "nsWindowSizes.h"
 #ifdef MOZ_XUL
 #include "nsXULElement.h"
 #endif /* MOZ_XUL */
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsFrameSelection.h"
 #ifdef DEBUG
 #include "nsRange.h"
 #endif
 
 #include "nsBindingManager.h"
 #include "nsXBLBinding.h"
 #include "nsPIDOMWindow.h"
@@ -208,17 +208,17 @@ nsAtom* nsIContent::DoGetID() const {
   MOZ_ASSERT(HasID(), "Unexpected call");
   MOZ_ASSERT(IsElement(), "Only elements can have IDs");
 
   return AsElement()->GetParsedAttr(nsGkAtoms::id)->GetAtomValue();
 }
 
 const nsAttrValue* Element::GetSVGAnimatedClass() const {
   MOZ_ASSERT(MayHaveClass() && IsSVGElement(), "Unexpected call");
-  return static_cast<const nsSVGElement*>(this)->GetAnimatedClassName();
+  return static_cast<const SVGElement*>(this)->GetAnimatedClassName();
 }
 
 NS_IMETHODIMP
 Element::QueryInterface(REFNSIID aIID, void** aInstancePtr) {
   if (aIID.Equals(NS_GET_IID(Element))) {
     NS_ADDREF_THIS();
     *aInstancePtr = this;
     return NS_OK;
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -5488,17 +5488,17 @@ already_AddRefed<Attr> nsIDocument::Crea
   }
 
   RefPtr<Attr> attribute = new Attr(nullptr, nodeInfo.forget(), EmptyString());
   return attribute.forget();
 }
 
 void nsIDocument::ResolveScheduledSVGPresAttrs() {
   for (auto iter = mLazySVGPresElements.Iter(); !iter.Done(); iter.Next()) {
-    nsSVGElement* svg = iter.Get()->GetKey();
+    SVGElement* svg = iter.Get()->GetKey();
     svg->UpdateContentDeclarationBlock();
   }
   mLazySVGPresElements.Clear();
 }
 
 already_AddRefed<nsSimpleContentList> nsIDocument::BlockedTrackingNodes()
     const {
   RefPtr<nsSimpleContentList> list = new nsSimpleContentList(nullptr);
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -108,17 +108,16 @@ class nsIStreamListener;
 class nsIStructuredCloneContainer;
 class nsIURI;
 class nsIVariant;
 class nsViewManager;
 class nsPresContext;
 class nsRange;
 class nsSimpleContentList;
 class nsSMILAnimationController;
-class nsSVGElement;
 class nsTextNode;
 class nsUnblockOnloadEvent;
 class nsWindowSizes;
 class nsDOMCaretPosition;
 class nsViewportInfo;
 class nsIGlobalObject;
 class nsIXULWindow;
 
@@ -184,16 +183,17 @@ class NodeIterator;
 enum class OrientationType : uint8_t;
 class ProcessingInstruction;
 class Promise;
 class ScriptLoader;
 class Selection;
 class ServiceWorkerDescriptor;
 class StyleSheetList;
 class SVGDocument;
+class SVGElement;
 class SVGSVGElement;
 class SVGUseElement;
 class Touch;
 class TouchList;
 class TreeWalker;
 class XPathEvaluator;
 class XPathExpression;
 class XPathNSResolver;
@@ -442,16 +442,17 @@ class nsIDocument : public nsINode,
   template <typename T>
   using NotNull = mozilla::NotNull<T>;
 
  public:
   typedef nsExternalResourceMap::ExternalResourceLoad ExternalResourceLoad;
   typedef mozilla::FullscreenRequest FullscreenRequest;
   typedef mozilla::net::ReferrerPolicy ReferrerPolicyEnum;
   typedef mozilla::dom::Element Element;
+  typedef mozilla::dom::SVGElement SVGElement;
 
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_IID)
 
 #ifdef MOZILLA_INTERNAL_API
   nsIDocument();
 #endif
 
   // This helper class must be set when we dispatch beforeunload and unload
@@ -1248,23 +1249,23 @@ class nsIDocument : public nsINode,
 
   /**
    * Add an SVG element to the list of elements that need
    * their mapped attributes resolved to a Servo declaration block.
    *
    * These are weak pointers, please manually unschedule them when an element
    * is removed.
    */
-  void ScheduleSVGForPresAttrEvaluation(nsSVGElement* aSVG) {
+  void ScheduleSVGForPresAttrEvaluation(SVGElement* aSVG) {
     mLazySVGPresElements.PutEntry(aSVG);
   }
 
   // Unschedule an element scheduled by ScheduleFrameRequestCallback (e.g. for
   // when it is destroyed)
-  void UnscheduleSVGForPresAttrEvaluation(nsSVGElement* aSVG) {
+  void UnscheduleSVGForPresAttrEvaluation(SVGElement* aSVG) {
     mLazySVGPresElements.RemoveEntry(aSVG);
   }
 
   // Resolve all SVG pres attrs scheduled in ScheduleSVGForPresAttrEvaluation
   void ResolveScheduledSVGPresAttrs();
 
   mozilla::Maybe<mozilla::dom::ClientInfo> GetClientInfo() const;
   mozilla::Maybe<mozilla::dom::ClientState> GetClientState() const;
@@ -4302,17 +4303,17 @@ class nsIDocument : public nsINode,
   nsString mLastStyleSheetSet;
   nsString mPreferredStyleSheetSet;
 
   RefPtr<nsDOMStyleSheetSetList> mStyleSheetSetList;
 
   // We lazily calculate declaration blocks for SVG elements with mapped
   // attributes in Servo mode. This list contains all elements which need lazy
   // resolution.
-  nsTHashtable<nsPtrHashKey<nsSVGElement>> mLazySVGPresElements;
+  nsTHashtable<nsPtrHashKey<SVGElement>> mLazySVGPresElements;
 
   // Restyle root for servo's style system.
   //
   // We store this as an nsINode, rather than as an Element, so that we can
   // store the Document node as the restyle root if the entire document (along
   // with all document-level native-anonymous content) needs to be restyled.
   //
   // We also track which "descendant" bits (normal/animation-only/lazy-fc) the
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -789,20 +789,16 @@ DOMInterfaces = {
 'SVGAnimationElement': {
     'concrete': False
 },
 
 'SVGComponentTransferFunctionElement': {
     'concrete': False,
 },
 
-'SVGElement': {
-    'nativeType': 'nsSVGElement',
-},
-
 'SVGFEFuncAElement': {
     'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
 },
 
 'SVGFEFuncBElement': {
     'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
 },
 
--- a/dom/smil/test/db_smilMappedAttrList.js
+++ b/dom/smil/test/db_smilMappedAttrList.js
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* List of SVG presentational attributes in the SVG 1.1 spec, for use in
    mochitests. (These are the attributes that are mapped to CSS properties) */
 
 var gMappedAttrList =
 {
   // NOTE: The list here should match the MappedAttributeEntry arrays in
-  // nsSVGElement.cpp
+  // SVGElement.cpp
 
   // PresentationAttributes-FillStroke
   fill:              new AdditiveAttribute("fill", "XML", "rect"),
   fill_opacity:      new AdditiveAttribute("fill-opacity", "XML", "rect"),
   fill_rule:         new NonAdditiveAttribute("fill-rule", "XML", "rect"),
   stroke:            new AdditiveAttribute("stroke", "XML", "rect"),
   stroke_dasharray:
     new NonAdditiveAttribute("stroke-dasharray", "XML", "rect"),
--- a/dom/svg/DOMSVGAnimatedLengthList.cpp
+++ b/dom/svg/DOMSVGAnimatedLengthList.cpp
@@ -2,17 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DOMSVGAnimatedLengthList.h"
 #include "DOMSVGLengthList.h"
 #include "SVGAnimatedLengthList.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsCOMPtr.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "mozilla/dom/SVGAnimatedLengthListBinding.h"
 
 // See the architecture comment in this file's header.
 
 namespace mozilla {
 
@@ -48,17 +48,17 @@ already_AddRefed<DOMSVGLengthList> DOMSV
     mAnimVal = new DOMSVGLengthList(this, InternalAList().GetAnimValue());
   }
   RefPtr<DOMSVGLengthList> animVal = mAnimVal;
   return animVal.forget();
 }
 
 /* static */ already_AddRefed<DOMSVGAnimatedLengthList>
 DOMSVGAnimatedLengthList::GetDOMWrapper(SVGAnimatedLengthList* aList,
-                                        nsSVGElement* aElement,
+                                        dom::SVGElement* aElement,
                                         uint8_t aAttrEnum, uint8_t aAxis) {
   RefPtr<DOMSVGAnimatedLengthList> wrapper =
       SVGAnimatedLengthListTearoffTable().GetTearoff(aList);
   if (!wrapper) {
     wrapper = new DOMSVGAnimatedLengthList(aElement, aAttrEnum, aAxis);
     SVGAnimatedLengthListTearoffTable().AddTearoff(aList, wrapper);
   }
   return wrapper.forget();
--- a/dom/svg/DOMSVGAnimatedLengthList.h
+++ b/dom/svg/DOMSVGAnimatedLengthList.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_DOMSVGANIMATEDLENGTHLIST_H__
 #define MOZILLA_DOMSVGANIMATEDLENGTHLIST_H__
 
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 
 class SVGAnimatedLengthList;
 class SVGLengthList;
 class DOMSVGLengthList;
 
@@ -117,18 +117,18 @@ class DOMSVGAnimatedLengthList final : p
    * returned for the given SVGAnimatedLengthList each time it is requested.
    * The cached object is only removed from the cache when it is destroyed due
    * to there being no more references to it or to any of its descendant
    * objects. If that happens, any subsequent call requesting the DOM wrapper
    * for the SVGAnimatedLengthList will naturally result in a new
    * DOMSVGAnimatedLengthList being returned.
    */
   static already_AddRefed<DOMSVGAnimatedLengthList> GetDOMWrapper(
-      SVGAnimatedLengthList* aList, nsSVGElement* aElement, uint8_t aAttrEnum,
-      uint8_t aAxis);
+      SVGAnimatedLengthList* aList, dom::SVGElement* aElement,
+      uint8_t aAttrEnum, uint8_t aAxis);
 
   /**
    * This method returns the DOMSVGAnimatedLengthList wrapper for an internal
    * SVGAnimatedLengthList object if it currently has a wrapper. If it does
    * not, then nullptr is returned.
    */
   static DOMSVGAnimatedLengthList* GetDOMWrapperIfExists(
       SVGAnimatedLengthList* aList);
@@ -150,29 +150,29 @@ class DOMSVGAnimatedLengthList final : p
 
   /**
    * Returns true if our attribute is animating (in which case our animVal is
    * not simply a mirror of our baseVal).
    */
   bool IsAnimating() const;
 
   // WebIDL
-  nsSVGElement* GetParentObject() const { return mElement; }
+  dom::SVGElement* GetParentObject() const { return mElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
   // These aren't weak refs because mBaseVal and mAnimVal are weak
   already_AddRefed<DOMSVGLengthList> BaseVal();
   already_AddRefed<DOMSVGLengthList> AnimVal();
 
  private:
   /**
    * Only our static GetDOMWrapper() factory method may create objects of our
    * type.
    */
-  DOMSVGAnimatedLengthList(nsSVGElement* aElement, uint8_t aAttrEnum,
+  DOMSVGAnimatedLengthList(dom::SVGElement* aElement, uint8_t aAttrEnum,
                            uint8_t aAxis)
       : mBaseVal(nullptr),
         mAnimVal(nullptr),
         mElement(aElement),
         mAttrEnum(aAttrEnum),
         mAxis(aAxis) {}
 
   ~DOMSVGAnimatedLengthList();
@@ -184,17 +184,17 @@ class DOMSVGAnimatedLengthList final : p
   // Weak refs to our DOMSVGLengthList baseVal/animVal objects. These objects
   // are friends and take care of clearing these pointers when they die, making
   // these true weak references.
   DOMSVGLengthList* mBaseVal;
   DOMSVGLengthList* mAnimVal;
 
   // Strong ref to our element to keep it alive. We hold this not only for
   // ourself, but also for our base/animVal and all of their items.
-  RefPtr<nsSVGElement> mElement;
+  RefPtr<dom::SVGElement> mElement;
 
   uint8_t mAttrEnum;
   uint8_t mAxis;
 };
 
 }  // namespace mozilla
 
 #endif  // MOZILLA_DOMSVGANIMATEDLENGTHLIST_H__
--- a/dom/svg/DOMSVGAnimatedNumberList.cpp
+++ b/dom/svg/DOMSVGAnimatedNumberList.cpp
@@ -2,17 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DOMSVGAnimatedNumberList.h"
 #include "DOMSVGNumberList.h"
 #include "SVGAnimatedNumberList.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsCOMPtr.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "mozilla/dom/SVGAnimatedNumberListBinding.h"
 
 // See the architecture comment in this file's header.
 
 namespace mozilla {
 
@@ -54,17 +54,17 @@ already_AddRefed<DOMSVGNumberList> DOMSV
     mAnimVal = new DOMSVGNumberList(this, InternalAList().GetAnimValue());
   }
   RefPtr<DOMSVGNumberList> animVal = mAnimVal;
   return animVal.forget();
 }
 
 /* static */ already_AddRefed<DOMSVGAnimatedNumberList>
 DOMSVGAnimatedNumberList::GetDOMWrapper(SVGAnimatedNumberList* aList,
-                                        nsSVGElement* aElement,
+                                        dom::SVGElement* aElement,
                                         uint8_t aAttrEnum) {
   RefPtr<DOMSVGAnimatedNumberList> wrapper =
       SVGAnimatedNumberListTearoffTable().GetTearoff(aList);
   if (!wrapper) {
     wrapper = new DOMSVGAnimatedNumberList(aElement, aAttrEnum);
     SVGAnimatedNumberListTearoffTable().AddTearoff(aList, wrapper);
   }
   return wrapper.forget();
--- a/dom/svg/DOMSVGAnimatedNumberList.h
+++ b/dom/svg/DOMSVGAnimatedNumberList.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_DOMSVGANIMATEDNUMBERLIST_H__
 #define MOZILLA_DOMSVGANIMATEDNUMBERLIST_H__
 
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsWrapperCache.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 
 class DOMSVGNumberList;
 class SVGAnimatedNumberList;
 class SVGNumberList;
@@ -49,17 +49,18 @@ class DOMSVGAnimatedNumberList final : p
    * returned for the given SVGAnimatedNumberList each time it is requested.
    * The cached object is only removed from the cache when it is destroyed due
    * to there being no more references to it or to any of its descendant
    * objects. If that happens, any subsequent call requesting the DOM wrapper
    * for the SVGAnimatedNumberList will naturally result in a new
    * DOMSVGAnimatedNumberList being returned.
    */
   static already_AddRefed<DOMSVGAnimatedNumberList> GetDOMWrapper(
-      SVGAnimatedNumberList* aList, nsSVGElement* aElement, uint8_t aAttrEnum);
+      SVGAnimatedNumberList* aList, dom::SVGElement* aElement,
+      uint8_t aAttrEnum);
 
   /**
    * This method returns the DOMSVGAnimatedNumberList wrapper for an internal
    * SVGAnimatedNumberList object if it currently has a wrapper. If it does
    * not, then nullptr is returned.
    */
   static DOMSVGAnimatedNumberList* GetDOMWrapperIfExists(
       SVGAnimatedNumberList* aList);
@@ -81,29 +82,29 @@ class DOMSVGAnimatedNumberList final : p
 
   /**
    * Returns true if our attribute is animating (in which case our animVal is
    * not simply a mirror of our baseVal).
    */
   bool IsAnimating() const;
 
   // WebIDL
-  nsSVGElement* GetParentObject() const { return mElement; }
+  dom::SVGElement* GetParentObject() const { return mElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
   // These aren't weak refs because mBaseVal and mAnimVal are weak
   already_AddRefed<DOMSVGNumberList> BaseVal();
   already_AddRefed<DOMSVGNumberList> AnimVal();
 
  private:
   /**
    * Only our static GetDOMWrapper() factory method may create objects of our
    * type.
    */
-  DOMSVGAnimatedNumberList(nsSVGElement* aElement, uint8_t aAttrEnum)
+  DOMSVGAnimatedNumberList(dom::SVGElement* aElement, uint8_t aAttrEnum)
       : mBaseVal(nullptr),
         mAnimVal(nullptr),
         mElement(aElement),
         mAttrEnum(aAttrEnum) {}
 
   ~DOMSVGAnimatedNumberList();
 
   /// Get a reference to this DOM wrapper object's internal counterpart.
@@ -113,16 +114,16 @@ class DOMSVGAnimatedNumberList final : p
   // Weak refs to our DOMSVGNumberList baseVal/animVal objects. These objects
   // are friends and take care of clearing these pointers when they die, making
   // these true weak references.
   DOMSVGNumberList* mBaseVal;
   DOMSVGNumberList* mAnimVal;
 
   // Strong ref to our element to keep it alive. We hold this not only for
   // ourself, but also for our base/animVal and all of their items.
-  RefPtr<nsSVGElement> mElement;
+  RefPtr<dom::SVGElement> mElement;
 
   uint8_t mAttrEnum;
 };
 
 }  // namespace mozilla
 
 #endif  // MOZILLA_DOMSVGANIMATEDNUMBERLIST_H__
--- a/dom/svg/DOMSVGLength.cpp
+++ b/dom/svg/DOMSVGLength.cpp
@@ -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/. */
 
 #include "DOMSVGLength.h"
 #include "DOMSVGLengthList.h"
 #include "DOMSVGAnimatedLengthList.h"
 #include "SVGLength.h"
 #include "SVGAnimatedLengthList.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGLength2.h"
 #include "nsError.h"
 #include "nsMathUtils.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 #include "mozilla/FloatingPoint.h"
 #include "nsSVGAttrTearoffTable.h"
 
 // See the architecture comment in DOMSVGAnimatedLengthList.h.
@@ -111,17 +111,17 @@ DOMSVGLength::DOMSVGLength()
     : mList(nullptr),
       mListIndex(0),
       mAttrEnum(0),
       mIsAnimValItem(false),
       mUnit(SVGLength_Binding::SVG_LENGTHTYPE_NUMBER),
       mValue(0.0f),
       mVal(nullptr) {}
 
-DOMSVGLength::DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement,
+DOMSVGLength::DOMSVGLength(nsSVGLength2* aVal, SVGElement* aSVGElement,
                            bool aAnimVal)
     : mList(nullptr),
       mListIndex(0),
       mAttrEnum(0),
       mIsAnimValItem(aAnimVal),
       mUnit(SVGLength_Binding::SVG_LENGTHTYPE_NUMBER),
       mValue(0.0f),
       mVal(aVal),
@@ -143,18 +143,19 @@ void DOMSVGLength::CleanupWeakRefs() {
     auto& table = mIsAnimValItem ? sAnimSVGLengthTearOffTable
                                  : sBaseSVGLengthTearOffTable;
     table.RemoveTearoff(mVal);
   }
 }
 
 DOMSVGLength::~DOMSVGLength() { CleanupWeakRefs(); }
 
-already_AddRefed<DOMSVGLength> DOMSVGLength::GetTearOff(
-    nsSVGLength2* aVal, nsSVGElement* aSVGElement, bool aAnimVal) {
+already_AddRefed<DOMSVGLength> DOMSVGLength::GetTearOff(nsSVGLength2* aVal,
+                                                        SVGElement* aSVGElement,
+                                                        bool aAnimVal) {
   auto& table =
       aAnimVal ? sAnimSVGLengthTearOffTable : sBaseSVGLengthTearOffTable;
   RefPtr<DOMSVGLength> domLength = table.GetTearoff(aVal);
   if (!domLength) {
     domLength = new DOMSVGLength(aVal, aSVGElement, aAnimVal);
     table.AddTearoff(aVal, domLength);
   }
 
--- a/dom/svg/DOMSVGLength.h
+++ b/dom/svg/DOMSVGLength.h
@@ -10,18 +10,16 @@
 #include "DOMSVGLengthList.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDebug.h"
 #include "nsTArray.h"
 #include "SVGLength.h"
 #include "mozilla/Attributes.h"
 #include "nsWrapperCache.h"
 
-class nsSVGElement;
-
 // We make DOMSVGLength a pseudo-interface to allow us to QI to it in order to
 // check that the objects that scripts pass to DOMSVGLengthList methods are our
 // *native* length objects.
 //
 // {A8468350-7F7B-4976-9A7E-3765A1DADF9A}
 #define MOZILLA_DOMSVGLENGTH_IID                     \
   {                                                  \
     0xA8468350, 0x7F7B, 0x4976, {                    \
@@ -30,16 +28,20 @@ class nsSVGElement;
   }
 
 #define MOZ_SVG_LIST_INDEX_BIT_COUNT 22  // supports > 4 million list items
 
 namespace mozilla {
 
 class ErrorResult;
 
+namespace dom {
+class SVGElement;
+}
+
 /**
  * Class DOMSVGLength
  *
  * This class creates the DOM objects that wrap internal SVGLength objects that
  * are in an SVGLengthList. It is also used to create the objects returned by
  * SVGSVGElement.createSVGLength().
  *
  * For the DOM wrapper classes for non-list SVGLength, see nsSVGLength2.h.
@@ -79,17 +81,17 @@ class ErrorResult;
  */
 class DOMSVGLength final : public nsISupports, public nsWrapperCache {
   friend class AutoChangeLengthNotifier;
 
   /**
    * Ctor for creating the object returned by
    * nsSVGLength2::ToDOMBaseVal/ToDOMAnimVal
    */
-  DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement, bool aAnimVal);
+  DOMSVGLength(nsSVGLength2* aVal, dom::SVGElement* aSVGElement, bool aAnimVal);
 
   ~DOMSVGLength();
 
  public:
   NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGLENGTH_IID)
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGLength)
 
@@ -101,17 +103,17 @@ class DOMSVGLength final : public nsISup
 
   /**
    * Ctor for creating the objects returned by SVGSVGElement.createSVGLength(),
    * which do not initially belong to an attribute.
    */
   DOMSVGLength();
 
   static already_AddRefed<DOMSVGLength> GetTearOff(nsSVGLength2* aVal,
-                                                   nsSVGElement* aSVGElement,
+                                                   dom::SVGElement* aSVGElement,
                                                    bool aAnimVal);
 
   /**
    * Create an unowned copy of a length that is owned or is reflecting a single
    * attribute. The caller is responsible for the first AddRef().
    */
   DOMSVGLength* Copy();
 
@@ -175,17 +177,17 @@ class DOMSVGLength final : public nsISup
     auto svgElement = mList ? Element() : mSVGElement.get();
     return svgElement;
   }
 
   JSObject* WrapObject(JSContext* aCx,
                        JS::Handle<JSObject*> aGivenProto) override;
 
  private:
-  nsSVGElement* Element() const { return mList->Element(); }
+  dom::SVGElement* Element() const { return mList->Element(); }
 
   uint8_t AttrEnum() const { return mAttrEnum; }
 
   /**
    * Get the axis that this length lies along. This method must only be called
    * when this object is associated with an element (HasOwner() returns true).
    */
   uint8_t Axis() const { return mList->Axis(); }
@@ -223,17 +225,17 @@ class DOMSVGLength final : public nsISup
 
   // The following members are only used when we're not in a list:
   uint32_t mUnit : 5;  // can handle 31 units (the 10 SVG 1.1 units + rem, vw,
                        // vh, wm, calc + future additions)
   float mValue;
 
   // The following members are only used when we have an nsSVGLength2
   nsSVGLength2* mVal;  // kept alive because it belongs to mSVGElement
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<dom::SVGElement> mSVGElement;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(DOMSVGLength, MOZILLA_DOMSVGLENGTH_IID)
 
 }  // namespace mozilla
 
 #undef MOZ_SVG_LIST_INDEX_BIT_COUNT
 
--- a/dom/svg/DOMSVGLengthList.cpp
+++ b/dom/svg/DOMSVGLengthList.cpp
@@ -1,15 +1,15 @@
 /* -*- 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 "nsSVGElement.h"
+#include "SVGElement.h"
 #include "DOMSVGLengthList.h"
 #include "DOMSVGLength.h"
 #include "nsError.h"
 #include "SVGAnimatedLengthList.h"
 #include "nsCOMPtr.h"
 #include "mozilla/dom/SVGLengthListBinding.h"
 #include <algorithm>
 
--- a/dom/svg/DOMSVGLengthList.h
+++ b/dom/svg/DOMSVGLengthList.h
@@ -10,22 +10,24 @@
 #include "DOMSVGAnimatedLengthList.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDebug.h"
 #include "nsTArray.h"
 #include "SVGLengthList.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 
-class nsSVGElement;
-
 namespace mozilla {
 
 class DOMSVGLength;
 
+namespace dom {
+class SVGElement;
+}
+
 /**
  * Class DOMSVGLengthList
  *
  * This class is used to create the DOM tearoff objects that wrap internal
  * SVGLengthList objects.
  *
  * See the architecture comment in DOMSVGAnimatedLengthList.h.
  *
@@ -118,17 +120,17 @@ class DOMSVGLengthList final : public ns
   already_AddRefed<DOMSVGLength> RemoveItem(uint32_t index, ErrorResult& error);
   already_AddRefed<DOMSVGLength> AppendItem(DOMSVGLength& newItem,
                                             ErrorResult& error) {
     return InsertItemBefore(newItem, LengthNoFlush(), error);
   }
   uint32_t Length() const { return NumberOfItems(); }
 
  private:
-  nsSVGElement* Element() const { return mAList->mElement; }
+  dom::SVGElement* Element() const { return mAList->mElement; }
 
   uint8_t AttrEnum() const { return mAList->mAttrEnum; }
 
   uint8_t Axis() const { return mAList->mAxis; }
 
   /// Used to determine if this list is the baseVal or animVal list.
   bool IsAnimValList() const {
     MOZ_ASSERT(this == mAList->mBaseVal || this == mAList->mAnimVal,
--- a/dom/svg/DOMSVGNumber.cpp
+++ b/dom/svg/DOMSVGNumber.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DOMSVGNumber.h"
 #include "DOMSVGNumberList.h"
 #include "DOMSVGAnimatedNumberList.h"
 #include "SVGAnimatedNumberList.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsError.h"
 #include "nsContentUtils.h"  // for NS_ENSURE_FINITE
 #include "mozilla/dom/SVGNumberBinding.h"
 
 // See the architecture comment in DOMSVGAnimatedNumberList.h.
 
 namespace mozilla {
 
--- a/dom/svg/DOMSVGNumber.h
+++ b/dom/svg/DOMSVGNumber.h
@@ -9,22 +9,24 @@
 
 #include "DOMSVGNumberList.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsTArray.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "nsWrapperCache.h"
 
-class nsSVGElement;
-
 #define MOZ_SVG_LIST_INDEX_BIT_COUNT 27  // supports > 134 million list items
 
 namespace mozilla {
 
+namespace dom {
+class SVGElement;
+}
+
 /**
  * Class DOMSVGNumber
  *
  * This class creates the DOM objects that wrap internal SVGNumber objects that
  * are in an SVGNumberList. It is also used to create the objects returned by
  * SVGSVGElement.createSVGNumber().
  *
  * For the DOM wrapper classes for non-list SVGNumber, see nsSVGNumber2.h.
@@ -112,17 +114,17 @@ class DOMSVGNumber final : public nsISup
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
   float Value();
 
   void SetValue(float aValue, ErrorResult& aRv);
 
  private:
-  nsSVGElement* Element() { return mList->Element(); }
+  dom::SVGElement* Element() { return mList->Element(); }
 
   uint8_t AttrEnum() const { return mAttrEnum; }
 
   /**
    * Get a reference to the internal SVGNumber list item that this DOM wrapper
    * object currently wraps.
    *
    * To simplify the code we just have this one method for obtaining both
--- a/dom/svg/DOMSVGNumberList.cpp
+++ b/dom/svg/DOMSVGNumberList.cpp
@@ -1,15 +1,15 @@
 /* -*- 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 "nsSVGElement.h"
+#include "SVGElement.h"
 #include "DOMSVGNumberList.h"
 #include "DOMSVGNumber.h"
 #include "nsError.h"
 #include "SVGAnimatedNumberList.h"
 #include "nsCOMPtr.h"
 #include "mozilla/dom/SVGNumberListBinding.h"
 #include <algorithm>
 
--- a/dom/svg/DOMSVGNumberList.h
+++ b/dom/svg/DOMSVGNumberList.h
@@ -10,22 +10,24 @@
 #include "DOMSVGAnimatedNumberList.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDebug.h"
 #include "nsTArray.h"
 #include "SVGNumberList.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 
-class nsSVGElement;
-
 namespace mozilla {
 
 class DOMSVGNumber;
 
+namespace dom {
+class SVGElement;
+}
+
 /**
  * Class DOMSVGNumberList
  *
  * This class is used to create the DOM tearoff objects that wrap internal
  * SVGNumberList objects.
  *
  * See the architecture comment in DOMSVGAnimatedNumberList.h.
  *
@@ -118,17 +120,17 @@ class DOMSVGNumberList final : public ns
   already_AddRefed<DOMSVGNumber> RemoveItem(uint32_t index, ErrorResult& error);
   already_AddRefed<DOMSVGNumber> AppendItem(DOMSVGNumber& newItem,
                                             ErrorResult& error) {
     return InsertItemBefore(newItem, LengthNoFlush(), error);
   }
   uint32_t Length() const { return NumberOfItems(); }
 
  private:
-  nsSVGElement* Element() const { return mAList->mElement; }
+  dom::SVGElement* Element() const { return mAList->mElement; }
 
   uint8_t AttrEnum() const { return mAList->mAttrEnum; }
 
   /// Used to determine if this list is the baseVal or animVal list.
   bool IsAnimValList() const {
     MOZ_ASSERT(this == mAList->mBaseVal || this == mAList->mAnimVal,
                "Calling IsAnimValList() too early?!");
     return this == mAList->mAnimVal;
--- a/dom/svg/DOMSVGPathSeg.cpp
+++ b/dom/svg/DOMSVGPathSeg.cpp
@@ -2,17 +2,17 @@
 /* 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 "DOMSVGPathSeg.h"
 #include "DOMSVGPathSegList.h"
 #include "SVGAnimatedPathSegList.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsError.h"
 
 // See the architecture comment in DOMSVGPathSegList.h.
 
 namespace mozilla {
 
 using namespace dom::SVGPathSeg_Binding;
 
--- a/dom/svg/DOMSVGPathSeg.h
+++ b/dom/svg/DOMSVGPathSeg.h
@@ -8,22 +8,24 @@
 #define MOZILLA_DOMSVGPATHSEG_H__
 
 #include "DOMSVGPathSegList.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsWrapperCache.h"
 #include "SVGPathSegUtils.h"
 #include "mozilla/dom/SVGPathSegBinding.h"
 
-class nsSVGElement;
-
 #define MOZ_SVG_LIST_INDEX_BIT_COUNT 31
 
 namespace mozilla {
 
+namespace dom {
+class SVGElement;
+}
+
 #define CHECK_ARG_COUNT_IN_SYNC(segType)                                   \
   MOZ_ASSERT(                                                              \
       ArrayLength(mArgs) ==                                                \
               SVGPathSegUtils::ArgCountForType(uint32_t(segType)) ||       \
           uint32_t(segType) == dom::SVGPathSeg_Binding::PATHSEG_CLOSEPATH, \
       "Arg count/array size out of sync")
 
 #define IMPL_SVGPATHSEG_SUBCLASS_COMMON(segName, segType)                     \
@@ -166,17 +168,17 @@ class DOMSVGPathSeg : public nsWrapperCa
     // Our mList's weak ref to us must be nulled out when we die. If GC has
     // unlinked us using the cycle collector code, then that has already
     // happened, and mList is null.
     if (mList) {
       mList->ItemAt(mListIndex) = nullptr;
     }
   }
 
-  nsSVGElement* Element() { return mList->Element(); }
+  dom::SVGElement* Element() { return mList->Element(); }
 
   /**
    * Get a reference to the internal SVGPathSeg list item that this DOM wrapper
    * object currently wraps.
    *
    * To simplify the code we just have this one method for obtaining both
    * baseVal and animVal internal items. This means that animVal items don't
    * get const protection, but then our setter methods guard against changing
--- a/dom/svg/DOMSVGPathSegList.cpp
+++ b/dom/svg/DOMSVGPathSegList.cpp
@@ -1,15 +1,15 @@
 /* -*- 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 "nsSVGElement.h"
+#include "SVGElement.h"
 #include "DOMSVGPathSegList.h"
 #include "DOMSVGPathSeg.h"
 #include "nsError.h"
 #include "SVGAnimatedPathSegList.h"
 #include "nsCOMPtr.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "SVGPathSegUtils.h"
 #include "mozilla/dom/SVGPathSegListBinding.h"
@@ -70,17 +70,17 @@ class MOZ_RAII AutoChangePathSegListNoti
 
  private:
   DOMSVGPathSegList* const mPathSegList;
   nsAttrValue mEmptyOrOldValue;
   MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
 };
 
 /* static */ already_AddRefed<DOMSVGPathSegList>
-DOMSVGPathSegList::GetDOMWrapper(void* aList, nsSVGElement* aElement,
+DOMSVGPathSegList::GetDOMWrapper(void* aList, SVGElement* aElement,
                                  bool aIsAnimValList) {
   RefPtr<DOMSVGPathSegList> wrapper =
       SVGPathSegListTearoffTable().GetTearoff(aList);
   if (!wrapper) {
     wrapper = new DOMSVGPathSegList(aElement, aIsAnimValList);
     SVGPathSegListTearoffTable().AddTearoff(aList, wrapper);
   }
   return wrapper.forget();
--- a/dom/svg/DOMSVGPathSegList.h
+++ b/dom/svg/DOMSVGPathSegList.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOZILLA_DOMSVGPATHSEGLIST_H__
 #define MOZILLA_DOMSVGPATHSEGLIST_H__
 
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDebug.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsTArray.h"
 #include "SVGPathData.h"  // IWYU pragma: keep
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 
 namespace mozilla {
 
 class DOMSVGPathSeg;
@@ -72,17 +72,17 @@ class DOMSVGPathSegList final : public n
    *
    * It's unfortunate that aList is a void* instead of a typed argument. This
    * is because the mBaseVal and mAnimVal members of SVGAnimatedPathSegList are
    * of different types - a plain SVGPathData, and a SVGPathData*. We
    * use the addresses of these members as the key for the hash table, and
    * clearly SVGPathData* and a SVGPathData** are not the same type.
    */
   static already_AddRefed<DOMSVGPathSegList> GetDOMWrapper(
-      void* aList, nsSVGElement* aElement, bool aIsAnimValList);
+      void* aList, dom::SVGElement* aElement, bool aIsAnimValList);
 
   /**
    * This method returns the DOMSVGPathSegList wrapper for an internal
    * SVGPathData object if it currently has a wrapper. If it does
    * not, then nullptr is returned.
    */
   static DOMSVGPathSegList* GetDOMWrapperIfExists(void* aList);
 
@@ -151,24 +151,24 @@ class DOMSVGPathSegList final : public n
   }
   uint32_t Length() const { return NumberOfItems(); }
 
  private:
   /**
    * Only our static GetDOMWrapper() factory method may create objects of our
    * type.
    */
-  DOMSVGPathSegList(nsSVGElement* aElement, bool aIsAnimValList)
+  DOMSVGPathSegList(dom::SVGElement* aElement, bool aIsAnimValList)
       : mElement(aElement), mIsAnimValList(aIsAnimValList) {
     InternalListWillChangeTo(InternalList());  // Sync mItems
   }
 
   ~DOMSVGPathSegList();
 
-  nsSVGElement* Element() const { return mElement.get(); }
+  dom::SVGElement* Element() const { return mElement.get(); }
 
   /// Used to determine if this list is the baseVal or animVal list.
   bool IsAnimValList() const { return mIsAnimValList; }
 
   /**
    * Get a reference to this object's corresponding internal SVGPathData.
    *
    * To simplify the code we just have this one method for obtaining both
@@ -216,16 +216,16 @@ class DOMSVGPathSegList final : public n
   };
 
   // Weak refs to our DOMSVGPathSeg items. The items are friends and take care
   // of clearing our pointer to them when they die.
   FallibleTArray<ItemProxy> mItems;
 
   // Strong ref to our element to keep it alive. We hold this not only for
   // ourself, but also for our DOMSVGPathSeg items too.
-  RefPtr<nsSVGElement> mElement;
+  RefPtr<dom::SVGElement> mElement;
 
   bool mIsAnimValList;
 };
 
 }  // namespace mozilla
 
 #endif  // MOZILLA_DOMSVGPATHSEGLIST_H__
--- a/dom/svg/DOMSVGPoint.cpp
+++ b/dom/svg/DOMSVGPoint.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DOMSVGPoint.h"
 #include "DOMSVGPointList.h"
 #include "SVGPoint.h"
 #include "gfx2DGlue.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsError.h"
 #include "mozilla/dom/SVGMatrix.h"
 
 // See the architecture comment in DOMSVGPointList.h.
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 
--- a/dom/svg/DOMSVGPoint.h
+++ b/dom/svg/DOMSVGPoint.h
@@ -10,21 +10,20 @@
 #include "DOMSVGPointList.h"
 #include "mozilla/gfx/2D.h"
 #include "nsDebug.h"
 #include "nsISVGPoint.h"
 #include "SVGPoint.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/FloatingPoint.h"
 
-class nsSVGElement;
-
 namespace mozilla {
 
 namespace dom {
+class SVGElement;
 class SVGMatrix;
 }  // namespace dom
 
 /**
  * Class DOMSVGPoint
  *
  * This class creates the DOM objects that wrap internal SVGPoint objects that
  * are in an SVGPointList. It is also used to create the objects returned by
@@ -83,14 +82,14 @@ class DOMSVGPoint final : public nsISVGP
   virtual void SetY(float aY, ErrorResult& rv) override;
   virtual already_AddRefed<nsISVGPoint> MatrixTransform(
       dom::SVGMatrix& matrix) override;
   nsISupports* GetParentObject() override { return mList; }
 
   virtual DOMSVGPoint* Copy() override { return new DOMSVGPoint(this); }
 
  protected:
-  nsSVGElement* Element() { return mList->Element(); }
+  dom::SVGElement* Element() { return mList->Element(); }
 };
 
 }  // namespace mozilla
 
 #endif  // MOZILLA_DOMSVGPOINT_H__
--- a/dom/svg/DOMSVGPointList.cpp
+++ b/dom/svg/DOMSVGPointList.cpp
@@ -1,15 +1,15 @@
 /* -*- 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 "nsSVGElement.h"
+#include "SVGElement.h"
 #include "DOMSVGPointList.h"
 #include "DOMSVGPoint.h"
 #include "nsError.h"
 #include "SVGAnimatedPointList.h"
 #include "nsCOMPtr.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsContentUtils.h"
 #include "mozilla/dom/SVGPointListBinding.h"
@@ -87,17 +87,17 @@ class MOZ_RAII AutoChangePointListNotifi
 
  private:
   DOMSVGPointList* const mPointList;
   nsAttrValue mEmptyOrOldValue;
   MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
 };
 
 /* static */ already_AddRefed<DOMSVGPointList> DOMSVGPointList::GetDOMWrapper(
-    void* aList, nsSVGElement* aElement, bool aIsAnimValList) {
+    void* aList, SVGElement* aElement, bool aIsAnimValList) {
   RefPtr<DOMSVGPointList> wrapper =
       SVGPointListTearoffTable().GetTearoff(aList);
   if (!wrapper) {
     wrapper = new DOMSVGPointList(aElement, aIsAnimValList);
     SVGPointListTearoffTable().AddTearoff(aList, wrapper);
   }
   return wrapper.forget();
 }
--- a/dom/svg/DOMSVGPointList.h
+++ b/dom/svg/DOMSVGPointList.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOZILLA_DOMSVGPOINTLIST_H__
 #define MOZILLA_DOMSVGPOINTLIST_H__
 
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDebug.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsTArray.h"
 #include "SVGPointList.h"  // IWYU pragma: keep
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 
 namespace mozilla {
 
 class DOMSVGPoint;
@@ -73,19 +73,18 @@ class DOMSVGPointList final : public nsI
    * DOMSVGPointList being returned.
    *
    * It's unfortunate that aList is a void* instead of a typed argument. This
    * is because the mBaseVal and mAnimVal members of SVGAnimatedPointList are
    * of different types - a plain SVGPointList, and a SVGPointList*. We
    * use the addresses of these members as the key for the hash table, and
    * clearly SVGPointList* and a SVGPointList** are not the same type.
    */
-  static already_AddRefed<DOMSVGPointList> GetDOMWrapper(void* aList,
-                                                         nsSVGElement* aElement,
-                                                         bool aIsAnimValList);
+  static already_AddRefed<DOMSVGPointList> GetDOMWrapper(
+      void* aList, dom::SVGElement* aElement, bool aIsAnimValList);
 
   /**
    * This method returns the DOMSVGPointList wrapper for an internal
    * SVGPointList object if it currently has a wrapper. If it does
    * not, then nullptr is returned.
    */
   static DOMSVGPointList* GetDOMWrapperIfExists(void* aList);
 
@@ -154,24 +153,24 @@ class DOMSVGPointList final : public nsI
   }
   uint32_t Length() const { return NumberOfItems(); }
 
  private:
   /**
    * Only our static GetDOMWrapper() factory method may create objects of our
    * type.
    */
-  DOMSVGPointList(nsSVGElement* aElement, bool aIsAnimValList)
+  DOMSVGPointList(dom::SVGElement* aElement, bool aIsAnimValList)
       : mElement(aElement), mIsAnimValList(aIsAnimValList) {
     InternalListWillChangeTo(InternalList());  // Sync mItems
   }
 
   ~DOMSVGPointList();
 
-  nsSVGElement* Element() const { return mElement.get(); }
+  dom::SVGElement* Element() const { return mElement.get(); }
 
   /// Used to determine if this list is the baseVal or animVal list.
   bool IsAnimValList() const { return mIsAnimValList; }
 
   /**
    * Get a reference to this object's corresponding internal SVGPointList.
    *
    * To simplify the code we just have this one method for obtaining both
@@ -190,16 +189,16 @@ class DOMSVGPointList final : public nsI
   void MaybeRemoveItemFromAnimValListAt(uint32_t aIndex);
 
   // Weak refs to our nsISVGPoint items. The items are friends and take care
   // of clearing our pointer to them when they die.
   FallibleTArray<nsISVGPoint*> mItems;
 
   // Strong ref to our element to keep it alive. We hold this not only for
   // ourself, but also for our nsISVGPoint items too.
-  RefPtr<nsSVGElement> mElement;
+  RefPtr<dom::SVGElement> mElement;
 
   bool mIsAnimValList;
 };
 
 }  // namespace mozilla
 
 #endif  // MOZILLA_DOMSVGPOINTLIST_H__
--- a/dom/svg/DOMSVGStringList.cpp
+++ b/dom/svg/DOMSVGStringList.cpp
@@ -60,17 +60,17 @@ class MOZ_RAII AutoChangeStringListNotif
 
  private:
   DOMSVGStringList* const mStringList;
   nsAttrValue mEmptyOrOldValue;
   MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
 };
 
 /* static */ already_AddRefed<DOMSVGStringList> DOMSVGStringList::GetDOMWrapper(
-    SVGStringList* aList, nsSVGElement* aElement,
+    SVGStringList* aList, SVGElement* aElement,
     bool aIsConditionalProcessingAttribute, uint8_t aAttrEnum) {
   RefPtr<DOMSVGStringList> wrapper =
       SVGStringListTearoffTable().GetTearoff(aList);
   if (!wrapper) {
     wrapper = new DOMSVGStringList(aElement, aIsConditionalProcessingAttribute,
                                    aAttrEnum);
     SVGStringListTearoffTable().AddTearoff(aList, wrapper);
   }
--- a/dom/svg/DOMSVGStringList.h
+++ b/dom/svg/DOMSVGStringList.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_DOMSVGSTRINGLIST_H__
 #define MOZILLA_DOMSVGSTRINGLIST_H__
 
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 
 class ErrorResult;
 class SVGStringList;
 
 /**
@@ -45,17 +45,17 @@ class SVGStringList;
  */
 class DOMSVGStringList final : public nsISupports, public nsWrapperCache {
   friend class AutoChangeStringListNotifier;
 
  public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGStringList)
 
-  nsSVGElement* GetParentObject() const { return mElement; }
+  dom::SVGElement* GetParentObject() const { return mElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
   uint32_t NumberOfItems() const;
   uint32_t Length() const;
   void Clear();
   void Initialize(const nsAString& aNewItem, nsAString& aRetval,
                   ErrorResult& aRv);
@@ -75,36 +75,36 @@ class DOMSVGStringList final : public ns
    * of caching the object that it returns so that the same object can be
    * returned for the given SVGStringList each time it is requested.
    * The cached object is only removed from the cache when it is destroyed due
    * to there being no more references to it. If that happens, any subsequent
    * call requesting the DOM wrapper for the SVGStringList will naturally
    * result in a new DOMSVGStringList being returned.
    */
   static already_AddRefed<DOMSVGStringList> GetDOMWrapper(
-      SVGStringList* aList, nsSVGElement* aElement,
+      SVGStringList* aList, dom::SVGElement* aElement,
       bool aIsConditionalProcessingAttribute, uint8_t aAttrEnum);
 
  private:
   /**
    * Only our static GetDOMWrapper() factory method may create objects of our
    * type.
    */
-  DOMSVGStringList(nsSVGElement* aElement,
+  DOMSVGStringList(dom::SVGElement* aElement,
                    bool aIsConditionalProcessingAttribute, uint8_t aAttrEnum)
       : mElement(aElement),
         mAttrEnum(aAttrEnum),
         mIsConditionalProcessingAttribute(aIsConditionalProcessingAttribute) {}
 
   ~DOMSVGStringList();
 
   SVGStringList& InternalList() const;
 
   // Strong ref to our element to keep it alive.
-  RefPtr<nsSVGElement> mElement;
+  RefPtr<dom::SVGElement> mElement;
 
   uint8_t mAttrEnum;
 
   bool mIsConditionalProcessingAttribute;
 };
 
 }  // namespace mozilla
 
--- a/dom/svg/DOMSVGTransformList.cpp
+++ b/dom/svg/DOMSVGTransformList.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "DOMSVGTransformList.h"
 #include "mozilla/dom/SVGTransform.h"
 #include "mozilla/dom/SVGMatrix.h"
 #include "nsSVGAnimatedTransformList.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "mozilla/dom/SVGTransformListBinding.h"
 #include "nsError.h"
 #include <algorithm>
 
 // local helper functions
 namespace {
 
 void UpdateListIndicesFromIndex(
--- a/dom/svg/DOMSVGTransformList.h
+++ b/dom/svg/DOMSVGTransformList.h
@@ -10,21 +10,20 @@
 #include "mozilla/dom/SVGAnimatedTransformList.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDebug.h"
 #include "nsTArray.h"
 #include "SVGTransformList.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 
-class nsSVGElement;
-
 namespace mozilla {
 
 namespace dom {
+class SVGElement;
 class SVGMatrix;
 class SVGTransform;
 }  // namespace dom
 
 /**
  * Class DOMSVGTransformList
  *
  * This class is used to create the DOM tearoff objects that wrap internal
@@ -115,17 +114,17 @@ class DOMSVGTransformList final : public
     return InsertItemBefore(newItem, LengthNoFlush(), error);
   }
   already_AddRefed<dom::SVGTransform> CreateSVGTransformFromMatrix(
       dom::SVGMatrix& matrix);
   already_AddRefed<dom::SVGTransform> Consolidate(ErrorResult& error);
   uint32_t Length() const { return NumberOfItems(); }
 
  private:
-  nsSVGElement* Element() const { return mAList->mElement; }
+  dom::SVGElement* Element() const { return mAList->mElement; }
 
   /// Used to determine if this list is the baseVal or animVal list.
   bool IsAnimValList() const {
     MOZ_ASSERT(this == mAList->mBaseVal || this == mAList->mAnimVal,
                "Calling IsAnimValList() too early?!");
     return this == mAList->mAnimVal;
   }
 
--- a/dom/svg/SVGAElement.cpp
+++ b/dom/svg/SVGAElement.cpp
@@ -22,17 +22,17 @@ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(A)
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGAElement::WrapNode(JSContext* aCx,
                                 JS::Handle<JSObject*> aGivenProto) {
   return SVGAElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringInfo SVGAElement::sStringInfo[3] = {
+SVGElement::StringInfo SVGAElement::sStringInfo[3] = {
     {nsGkAtoms::href, kNameSpaceID_None, true},
     {nsGkAtoms::href, kNameSpaceID_XLink, true},
     {nsGkAtoms::target, kNameSpaceID_None, true}};
 
 // static
 const DOMTokenListSupportedToken SVGAElement::sSupportedRelValues[] = {
     "noreferrer", "noopener", nullptr};
 
@@ -336,17 +336,17 @@ nsresult SVGAElement::AfterSetAttr(int32
     Link::ResetLinkState(aNotify, aValue || Link::ElementHasHref());
   }
 
   return SVGAElementBase::AfterSetAttr(aNameSpaceID, aName, aValue, aOldValue,
                                        aMaybeScriptedPrincipal, aNotify);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::StringAttributesInfo SVGAElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGAElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGAngle.h
+++ b/dom/svg/SVGAngle.h
@@ -3,36 +3,36 @@
 /* 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_SVGAngle_h
 #define mozilla_dom_SVGAngle_h
 
 #include "nsWrapperCache.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "mozilla/Attributes.h"
 
 class nsSVGAngle;
 
 namespace mozilla {
 namespace dom {
 
 class SVGAngle final : public nsWrapperCache {
  public:
   typedef enum { BaseValue, AnimValue, CreatedValue } AngleType;
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAngle)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAngle)
 
-  SVGAngle(nsSVGAngle* aVal, nsSVGElement* aSVGElement, AngleType aType)
+  SVGAngle(nsSVGAngle* aVal, SVGElement* aSVGElement, AngleType aType)
       : mVal(aVal), mSVGElement(aSVGElement), mType(aType) {}
 
   // WebIDL
-  nsSVGElement* GetParentObject() { return mSVGElement; }
+  SVGElement* GetParentObject() { return mSVGElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
   uint16_t UnitType() const;
   float Value() const;
   void GetValueAsString(nsAString& aValue);
   void SetValue(float aValue, ErrorResult& rv);
   float ValueInSpecifiedUnits() const;
   void SetValueInSpecifiedUnits(float aValue, ErrorResult& rv);
@@ -40,16 +40,16 @@ class SVGAngle final : public nsWrapperC
   void NewValueSpecifiedUnits(uint16_t unitType, float value, ErrorResult& rv);
   void ConvertToSpecifiedUnits(uint16_t unitType, ErrorResult& rv);
 
  protected:
   ~SVGAngle();
 
   nsSVGAngle* mVal;  // if mType is CreatedValue, we own the angle.  Otherwise,
                      // the element does.
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
   AngleType mType;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAngle_h
--- a/dom/svg/SVGAnimateMotionElement.h
+++ b/dom/svg/SVGAnimateMotionElement.h
@@ -34,17 +34,17 @@ class SVGAnimateMotionElement final : pu
   // nsINode specializations
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
   // SVGAnimationElement
   virtual nsSMILAnimationFunction& AnimationFunction() override;
   virtual bool GetTargetAttributeName(int32_t* aNamespaceID,
                                       nsAtom** aLocalName) const override;
 
-  // nsSVGElement
+  // SVGElement
   virtual nsStaticAtom* GetPathDataAttrName() const override {
     return nsGkAtoms::path;
   }
 
   // Utility method to let our <mpath> children tell us when they've changed,
   // so we can make sure our mAnimationFunction is marked as having changed.
   void MpathChanged() { mAnimationFunction.MpathChanged(); }
 };
--- a/dom/svg/SVGAnimatedAngle.h
+++ b/dom/svg/SVGAnimatedAngle.h
@@ -3,44 +3,44 @@
 /* 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_SVGAnimatedAngle_h
 #define mozilla_dom_SVGAnimatedAngle_h
 
 #include "nsWrapperCache.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "mozilla/Attributes.h"
 
 class nsSVGAngle;
 
 namespace mozilla {
 namespace dom {
 
 class SVGAngle;
 
 class SVGAnimatedAngle final : public nsWrapperCache {
  public:
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedAngle)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedAngle)
 
-  SVGAnimatedAngle(nsSVGAngle* aVal, nsSVGElement* aSVGElement)
+  SVGAnimatedAngle(nsSVGAngle* aVal, SVGElement* aSVGElement)
       : mVal(aVal), mSVGElement(aSVGElement) {}
 
   // WebIDL
-  nsSVGElement* GetParentObject() { return mSVGElement; }
+  SVGElement* GetParentObject() { return mSVGElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
   already_AddRefed<SVGAngle> BaseVal();
   already_AddRefed<SVGAngle> AnimVal();
 
  protected:
   ~SVGAnimatedAngle();
 
   nsSVGAngle* mVal;  // kept alive because it belongs to content
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedAngle_h
--- a/dom/svg/SVGAnimatedBoolean.h
+++ b/dom/svg/SVGAnimatedBoolean.h
@@ -3,44 +3,44 @@
 /* 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_SVGAnimatedBoolean_h
 #define mozilla_dom_SVGAnimatedBoolean_h
 
 #include "nsWrapperCache.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "mozilla/Attributes.h"
 #include "nsSVGBoolean.h"
 
 namespace mozilla {
 namespace dom {
 
 class SVGAnimatedBoolean final : public nsWrapperCache {
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedBoolean)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedBoolean)
 
-  SVGAnimatedBoolean(nsSVGBoolean* aVal, nsSVGElement* aSVGElement)
+  SVGAnimatedBoolean(nsSVGBoolean* aVal, SVGElement* aSVGElement)
       : mVal(aVal), mSVGElement(aSVGElement) {}
 
   // WebIDL
-  nsSVGElement* GetParentObject() const { return mSVGElement; }
+  SVGElement* GetParentObject() const { return mSVGElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
   bool BaseVal() const { return mVal->GetBaseValue(); }
   void SetBaseVal(bool aValue) { mVal->SetBaseValue(aValue, mSVGElement); }
   bool AnimVal() const {
     mSVGElement->FlushAnimations();
     return mVal->GetAnimValue();
   }
 
  protected:
   ~SVGAnimatedBoolean();
 
   nsSVGBoolean* mVal;  // kept alive because it belongs to content
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedBoolean_h
--- a/dom/svg/SVGAnimatedEnumeration.h
+++ b/dom/svg/SVGAnimatedEnumeration.h
@@ -4,38 +4,38 @@
  * 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_SVGAnimatedEnumeration_h
 #define mozilla_dom_SVGAnimatedEnumeration_h
 
 #include "nsWrapperCache.h"
 
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class SVGAnimatedEnumeration : public nsISupports, public nsWrapperCache {
  public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedEnumeration)
 
-  nsSVGElement* GetParentObject() const { return mSVGElement; }
+  SVGElement* GetParentObject() const { return mSVGElement; }
 
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
 
   virtual uint16_t BaseVal() = 0;
   virtual void SetBaseVal(uint16_t aBaseVal, ErrorResult& aRv) = 0;
   virtual uint16_t AnimVal() = 0;
 
  protected:
-  explicit SVGAnimatedEnumeration(nsSVGElement* aSVGElement)
+  explicit SVGAnimatedEnumeration(SVGElement* aSVGElement)
       : mSVGElement(aSVGElement) {}
   virtual ~SVGAnimatedEnumeration(){};
 
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedEnumeration_h
--- a/dom/svg/SVGAnimatedInteger.h
+++ b/dom/svg/SVGAnimatedInteger.h
@@ -4,38 +4,38 @@
  * 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_SVGAnimatedInteger_h
 #define mozilla_dom_SVGAnimatedInteger_h
 
 #include "nsWrapperCache.h"
 
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class SVGAnimatedInteger : public nsISupports, public nsWrapperCache {
  public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedInteger)
 
-  nsSVGElement* GetParentObject() const { return mSVGElement; }
+  SVGElement* GetParentObject() const { return mSVGElement; }
 
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
 
   virtual int32_t BaseVal() = 0;
   virtual void SetBaseVal(int32_t aBaseVal) = 0;
   virtual int32_t AnimVal() = 0;
 
  protected:
-  explicit SVGAnimatedInteger(nsSVGElement* aSVGElement)
+  explicit SVGAnimatedInteger(SVGElement* aSVGElement)
       : mSVGElement(aSVGElement) {}
   virtual ~SVGAnimatedInteger(){};
 
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedInteger_h
--- a/dom/svg/SVGAnimatedLength.h
+++ b/dom/svg/SVGAnimatedLength.h
@@ -3,44 +3,44 @@
 /* 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_SVGAnimatedLength_h
 #define mozilla_dom_SVGAnimatedLength_h
 
 #include "mozilla/Attributes.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 class nsSVGLength2;
 
 namespace mozilla {
 
 class DOMSVGLength;
 
 namespace dom {
 
 class SVGAnimatedLength final : public nsWrapperCache {
  public:
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedLength)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedLength)
 
-  SVGAnimatedLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement)
+  SVGAnimatedLength(nsSVGLength2* aVal, SVGElement* aSVGElement)
       : mVal(aVal), mSVGElement(aSVGElement) {}
 
   // WebIDL
-  nsSVGElement* GetParentObject() { return mSVGElement; }
+  SVGElement* GetParentObject() { return mSVGElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
   already_AddRefed<DOMSVGLength> BaseVal();
   already_AddRefed<DOMSVGLength> AnimVal();
 
  protected:
   ~SVGAnimatedLength();
 
   nsSVGLength2* mVal;  // kept alive because it belongs to content
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedLength_h
--- a/dom/svg/SVGAnimatedLengthList.cpp
+++ b/dom/svg/SVGAnimatedLengthList.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGAnimatedLengthList.h"
 
 #include "DOMSVGAnimatedLengthList.h"
 #include "mozilla/Move.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SVGLengthListSMILType.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 
 namespace mozilla {
 
 using namespace dom;
@@ -32,17 +32,17 @@ nsresult SVGAnimatedLengthList::SetBaseV
     // of our baseVal is being reduced, our baseVal's DOM wrapper list may have
     // to remove DOM items from itself, and any removed DOM items need to copy
     // their internal counterpart values *before* we change them.
     //
     domWrapper->InternalBaseValListWillChangeTo(newBaseValue);
   }
 
   // We don't need to call DidChange* here - we're only called by
-  // nsSVGElement::ParseAttribute under Element::SetAttr,
+  // SVGElement::ParseAttribute under Element::SetAttr,
   // which takes care of notifying.
 
   rv = mBaseVal.CopyFrom(newBaseValue);
   if (NS_FAILED(rv) && domWrapper) {
     // Attempting to increase mBaseVal's length failed - reduce domWrapper
     // back to the same length:
     domWrapper->InternalBaseValListWillChangeTo(mBaseVal);
   }
@@ -56,17 +56,17 @@ void SVGAnimatedLengthList::ClearBaseVal
     // We must send this notification *before* changing mBaseVal! (See above.)
     domWrapper->InternalBaseValListWillChangeTo(SVGLengthList());
   }
   mBaseVal.Clear();
   // Caller notifies
 }
 
 nsresult SVGAnimatedLengthList::SetAnimValue(const SVGLengthList &aNewAnimValue,
-                                             nsSVGElement *aElement,
+                                             SVGElement *aElement,
                                              uint32_t aAttrEnum) {
   DOMSVGAnimatedLengthList *domWrapper =
       DOMSVGAnimatedLengthList::GetDOMWrapperIfExists(this);
   if (domWrapper) {
     // A new animation may totally change the number of items in the animVal
     // list, replacing what was essentially a mirror of the baseVal list, or
     // else replacing and overriding an existing animation. When this happens
     // we must try and keep our animVal's DOM wrapper in sync (see the comment
@@ -93,34 +93,34 @@ nsresult SVGAnimatedLengthList::SetAnimV
     // that mAnimVal and its DOM wrapper (if any) will have the same length!
     ClearAnimValue(aElement, aAttrEnum);
     return rv;
   }
   aElement->DidAnimateLengthList(aAttrEnum);
   return NS_OK;
 }
 
-void SVGAnimatedLengthList::ClearAnimValue(nsSVGElement *aElement,
+void SVGAnimatedLengthList::ClearAnimValue(SVGElement *aElement,
                                            uint32_t aAttrEnum) {
   DOMSVGAnimatedLengthList *domWrapper =
       DOMSVGAnimatedLengthList::GetDOMWrapperIfExists(this);
   if (domWrapper) {
     // When all animation ends, animVal simply mirrors baseVal, which may have
     // a different number of items to the last active animated value. We must
     // keep the length of our animVal's DOM wrapper list in sync, and again we
     // must do that before touching mAnimVal. See comments above.
     //
     domWrapper->InternalAnimValListWillChangeTo(mBaseVal);
   }
   mAnimVal = nullptr;
   aElement->DidAnimateLengthList(aAttrEnum);
 }
 
 UniquePtr<nsISMILAttr> SVGAnimatedLengthList::ToSMILAttr(
-    nsSVGElement *aSVGElement, uint8_t aAttrEnum, uint8_t aAxis,
+    SVGElement *aSVGElement, uint8_t aAttrEnum, uint8_t aAxis,
     bool aCanZeroPadList) {
   return MakeUnique<SMILAnimatedLengthList>(this, aSVGElement, aAttrEnum, aAxis,
                                             aCanZeroPadList);
 }
 
 nsresult SVGAnimatedLengthList::SMILAnimatedLengthList::ValueFromString(
     const nsAString &aStr, const dom::SVGAnimationElement * /*aSrcElement*/,
     nsSMILValue &aValue, bool &aPreventCachingOfSandwich) const {
--- a/dom/svg/SVGAnimatedLengthList.h
+++ b/dom/svg/SVGAnimatedLengthList.h
@@ -9,22 +9,22 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/UniquePtr.h"
 #include "nsAutoPtr.h"
 #include "nsISMILAttr.h"
 #include "SVGLengthList.h"
 
 class nsSMILValue;
-class nsSVGElement;
 
 namespace mozilla {
 
 namespace dom {
 class SVGAnimationElement;
+class SVGElement;
 }  // namespace dom
 
 /**
  * Class SVGAnimatedLengthList
  *
  * This class is very different to the SVG DOM interface of the same name found
  * in the SVG specification. This is a lightweight internal class - see
  * DOMSVGAnimatedLengthList for the heavier DOM class that wraps instances of
@@ -56,52 +56,52 @@ class SVGAnimatedLengthList {
   nsresult SetBaseValueString(const nsAString& aValue);
 
   void ClearBaseValue(uint32_t aAttrEnum);
 
   const SVGLengthList& GetAnimValue() const {
     return mAnimVal ? *mAnimVal : mBaseVal;
   }
 
-  nsresult SetAnimValue(const SVGLengthList& aValue, nsSVGElement* aElement,
+  nsresult SetAnimValue(const SVGLengthList& aValue, dom::SVGElement* aElement,
                         uint32_t aAttrEnum);
 
-  void ClearAnimValue(nsSVGElement* aElement, uint32_t aAttrEnum);
+  void ClearAnimValue(dom::SVGElement* aElement, uint32_t aAttrEnum);
 
   bool IsAnimating() const { return !!mAnimVal; }
 
-  UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aSVGElement,
+  UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aSVGElement,
                                     uint8_t aAttrEnum, uint8_t aAxis,
                                     bool aCanZeroPadList);
 
  private:
   // mAnimVal is a pointer to allow us to determine if we're being animated or
   // not. Making it a non-pointer member and using mAnimVal.IsEmpty() to check
   // if we're animating is not an option, since that would break animation *to*
   // the empty string (<set to="">).
 
   SVGLengthList mBaseVal;
   nsAutoPtr<SVGLengthList> mAnimVal;
 
   struct SMILAnimatedLengthList : public nsISMILAttr {
    public:
     SMILAnimatedLengthList(SVGAnimatedLengthList* aVal,
-                           nsSVGElement* aSVGElement, uint8_t aAttrEnum,
+                           dom::SVGElement* aSVGElement, uint8_t aAttrEnum,
                            uint8_t aAxis, bool aCanZeroPadList)
         : mVal(aVal),
           mElement(aSVGElement),
           mAttrEnum(aAttrEnum),
           mAxis(aAxis),
           mCanZeroPadList(aCanZeroPadList) {}
 
     // 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.
     SVGAnimatedLengthList* mVal;
-    nsSVGElement* mElement;
+    dom::SVGElement* mElement;
     uint8_t mAttrEnum;
     uint8_t mAxis;
     bool mCanZeroPadList;  // See SVGLengthListAndInfo::CanZeroPadList
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(
         const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
         nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
--- a/dom/svg/SVGAnimatedNumber.h
+++ b/dom/svg/SVGAnimatedNumber.h
@@ -5,38 +5,38 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_SVGAnimatedNumber_h
 #define mozilla_dom_SVGAnimatedNumber_h
 
 #include "nsISupports.h"
 #include "nsWrapperCache.h"
 
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class SVGAnimatedNumber : public nsISupports, public nsWrapperCache {
  public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedNumber)
 
-  nsSVGElement* GetParentObject() const { return mSVGElement; }
+  SVGElement* GetParentObject() const { return mSVGElement; }
 
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
 
   virtual float BaseVal() = 0;
   virtual void SetBaseVal(float aBaseVal) = 0;
   virtual float AnimVal() = 0;
 
  protected:
-  explicit SVGAnimatedNumber(nsSVGElement* aSVGElement)
+  explicit SVGAnimatedNumber(SVGElement* aSVGElement)
       : mSVGElement(aSVGElement) {}
   virtual ~SVGAnimatedNumber(){};
 
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedNumber_h
--- a/dom/svg/SVGAnimatedNumberList.cpp
+++ b/dom/svg/SVGAnimatedNumberList.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGAnimatedNumberList.h"
 
 #include "DOMSVGAnimatedNumberList.h"
 #include "mozilla/Move.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SVGNumberListSMILType.h"
 
 namespace mozilla {
 
 nsresult SVGAnimatedNumberList::SetBaseValueString(const nsAString &aValue) {
   SVGNumberList newBaseValue;
@@ -29,17 +29,17 @@ nsresult SVGAnimatedNumberList::SetBaseV
     // of our baseVal is being reduced, our baseVal's DOM wrapper list may have
     // to remove DOM items from itself, and any removed DOM items need to copy
     // their internal counterpart values *before* we change them.
     //
     domWrapper->InternalBaseValListWillChangeTo(newBaseValue);
   }
 
   // We don't need to call DidChange* here - we're only called by
-  // nsSVGElement::ParseAttribute under Element::SetAttr,
+  // SVGElement::ParseAttribute under Element::SetAttr,
   // which takes care of notifying.
 
   mIsBaseSet = true;
   rv = mBaseVal.CopyFrom(newBaseValue);
   if (NS_FAILED(rv) && domWrapper) {
     // Attempting to increase mBaseVal's length failed - reduce domWrapper
     // back to the same length:
     domWrapper->InternalBaseValListWillChangeTo(mBaseVal);
@@ -55,17 +55,17 @@ void SVGAnimatedNumberList::ClearBaseVal
     domWrapper->InternalBaseValListWillChangeTo(SVGNumberList());
   }
   mBaseVal.Clear();
   mIsBaseSet = false;
   // Caller notifies
 }
 
 nsresult SVGAnimatedNumberList::SetAnimValue(const SVGNumberList &aNewAnimValue,
-                                             nsSVGElement *aElement,
+                                             SVGElement *aElement,
                                              uint32_t aAttrEnum) {
   DOMSVGAnimatedNumberList *domWrapper =
       DOMSVGAnimatedNumberList::GetDOMWrapperIfExists(this);
   if (domWrapper) {
     // A new animation may totally change the number of items in the animVal
     // list, replacing what was essentially a mirror of the baseVal list, or
     // else replacing and overriding an existing animation. When this happens
     // we must try and keep our animVal's DOM wrapper in sync (see the comment
@@ -92,34 +92,34 @@ nsresult SVGAnimatedNumberList::SetAnimV
     // that mAnimVal and its DOM wrapper (if any) will have the same length!
     ClearAnimValue(aElement, aAttrEnum);
     return rv;
   }
   aElement->DidAnimateNumberList(aAttrEnum);
   return NS_OK;
 }
 
-void SVGAnimatedNumberList::ClearAnimValue(nsSVGElement *aElement,
+void SVGAnimatedNumberList::ClearAnimValue(SVGElement *aElement,
                                            uint32_t aAttrEnum) {
   DOMSVGAnimatedNumberList *domWrapper =
       DOMSVGAnimatedNumberList::GetDOMWrapperIfExists(this);
   if (domWrapper) {
     // When all animation ends, animVal simply mirrors baseVal, which may have
     // a different number of items to the last active animated value. We must
     // keep the length of our animVal's DOM wrapper list in sync, and again we
     // must do that before touching mAnimVal. See comments above.
     //
     domWrapper->InternalAnimValListWillChangeTo(mBaseVal);
   }
   mAnimVal = nullptr;
   aElement->DidAnimateNumberList(aAttrEnum);
 }
 
 UniquePtr<nsISMILAttr> SVGAnimatedNumberList::ToSMILAttr(
-    nsSVGElement *aSVGElement, uint8_t aAttrEnum) {
+    SVGElement *aSVGElement, uint8_t aAttrEnum) {
   return MakeUnique<SMILAnimatedNumberList>(this, aSVGElement, aAttrEnum);
 }
 
 nsresult SVGAnimatedNumberList::SMILAnimatedNumberList::ValueFromString(
     const nsAString &aStr, const dom::SVGAnimationElement * /*aSrcElement*/,
     nsSMILValue &aValue, bool &aPreventCachingOfSandwich) const {
   nsSMILValue val(&SVGNumberListSMILType::sSingleton);
   SVGNumberListAndInfo *nlai = static_cast<SVGNumberListAndInfo *>(val.mU.mPtr);
--- a/dom/svg/SVGAnimatedNumberList.h
+++ b/dom/svg/SVGAnimatedNumberList.h
@@ -9,22 +9,22 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/UniquePtr.h"
 #include "nsAutoPtr.h"
 #include "nsISMILAttr.h"
 #include "SVGNumberList.h"
 
 class nsSMILValue;
-class nsSVGElement;
 
 namespace mozilla {
 
 namespace dom {
 class SVGAnimationElement;
+class SVGElement;
 }  // namespace dom
 
 /**
  * Class SVGAnimatedNumberList
  *
  * This class is very different to the SVG DOM interface of the same name found
  * in the SVG specification. This is a lightweight internal class - see
  * DOMSVGAnimatedNumberList for the heavier DOM class that wraps instances of
@@ -56,54 +56,54 @@ class SVGAnimatedNumberList {
   nsresult SetBaseValueString(const nsAString& aValue);
 
   void ClearBaseValue(uint32_t aAttrEnum);
 
   const SVGNumberList& GetAnimValue() const {
     return mAnimVal ? *mAnimVal : mBaseVal;
   }
 
-  nsresult SetAnimValue(const SVGNumberList& aValue, nsSVGElement* aElement,
+  nsresult SetAnimValue(const SVGNumberList& aValue, dom::SVGElement* aElement,
                         uint32_t aAttrEnum);
 
-  void ClearAnimValue(nsSVGElement* aElement, uint32_t aAttrEnum);
+  void ClearAnimValue(dom::SVGElement* aElement, uint32_t aAttrEnum);
 
   // Returns true if the animated value of this list has been explicitly
   // set (either by animation, or by taking on the base value which has been
   // explicitly set by markup or a DOM call), false otherwise.
   // If this returns false, the animated value is still valid, that is,
   // usable, and represents the default base value of the attribute.
   bool IsExplicitlySet() const { return !!mAnimVal || mIsBaseSet; }
 
   bool IsAnimating() const { return !!mAnimVal; }
 
-  UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aSVGElement,
+  UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aSVGElement,
                                     uint8_t aAttrEnum);
 
  private:
   // mAnimVal is a pointer to allow us to determine if we're being animated or
   // not. Making it a non-pointer member and using mAnimVal.IsEmpty() to check
   // if we're animating is not an option, since that would break animation *to*
   // the empty string (<set to="">).
 
   SVGNumberList mBaseVal;
   nsAutoPtr<SVGNumberList> mAnimVal;
   bool mIsBaseSet;
 
   struct SMILAnimatedNumberList : public nsISMILAttr {
    public:
     SMILAnimatedNumberList(SVGAnimatedNumberList* aVal,
-                           nsSVGElement* aSVGElement, uint8_t aAttrEnum)
+                           dom::SVGElement* aSVGElement, uint8_t aAttrEnum)
         : mVal(aVal), mElement(aSVGElement), mAttrEnum(aAttrEnum) {}
 
     // 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.
     SVGAnimatedNumberList* mVal;
-    nsSVGElement* mElement;
+    dom::SVGElement* mElement;
     uint8_t mAttrEnum;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(
         const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
         nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
     virtual nsSMILValue GetBaseValue() const override;
     virtual void ClearAnimValue() override;
--- a/dom/svg/SVGAnimatedPathSegList.cpp
+++ b/dom/svg/SVGAnimatedPathSegList.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGAnimatedPathSegList.h"
 
 #include "DOMSVGPathSegList.h"
 #include "mozilla/Move.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SVGPathSegListSMILType.h"
 
 // See the comments in this file's header!
 
 namespace mozilla {
 
@@ -44,17 +44,17 @@ nsresult SVGAnimatedPathSegList::SetBase
     if (animValWrapper) {
       animValWrapper->InternalListWillChangeTo(newBaseValue);
     }
   }
 
   // Only now may we modify mBaseVal!
 
   // We don't need to call DidChange* here - we're only called by
-  // nsSVGElement::ParseAttribute under Element::SetAttr,
+  // SVGElement::ParseAttribute under Element::SetAttr,
   // which takes care of notifying.
 
   nsresult rv2 = mBaseVal.CopyFrom(newBaseValue);
   if (NS_FAILED(rv2)) {
     // Attempting to increase mBaseVal's length failed (mBaseVal is left
     // unmodified). We MUST keep any DOM wrappers in sync:
     if (baseValWrapper) {
       baseValWrapper->InternalListWillChangeTo(mBaseVal);
@@ -84,17 +84,17 @@ void SVGAnimatedPathSegList::ClearBaseVa
     }
   }
 
   mBaseVal.Clear();
   // Caller notifies
 }
 
 nsresult SVGAnimatedPathSegList::SetAnimValue(const SVGPathData &aNewAnimValue,
-                                              nsSVGElement *aElement) {
+                                              SVGElement *aElement) {
   // Note that a new animation may totally change the number of items in the
   // animVal list, either replacing what was essentially a mirror of the
   // baseVal list, or else replacing and overriding an existing animation.
   // Unfortunately it is not possible for us to reliably distinguish between
   // calls to this method that are setting a new sample for an existing
   // animation, and calls that are setting the first sample of an animation
   // that will override an existing animation. In the case of DOMSVGPathSegList
   // the InternalListWillChangeTo method is not virtually free as it is for the
@@ -116,17 +116,17 @@ nsresult SVGAnimatedPathSegList::SetAnim
     // OOM. We clear the animation and, importantly, ClearAnimValue() ensures
     // that mAnimVal's DOM wrapper (if any) is kept in sync!
     ClearAnimValue(aElement);
   }
   aElement->DidAnimatePathSegList();
   return rv;
 }
 
-void SVGAnimatedPathSegList::ClearAnimValue(nsSVGElement *aElement) {
+void SVGAnimatedPathSegList::ClearAnimValue(SVGElement *aElement) {
   // We must send these notifications *before* changing mAnimVal! (See above.)
 
   DOMSVGPathSegList *domWrapper =
       DOMSVGPathSegList::GetDOMWrapperIfExists(GetAnimValKey());
   if (domWrapper) {
     // When all animation ends, animVal simply mirrors baseVal, which may have
     // a different number of items to the last active animated value.
     //
@@ -136,17 +136,17 @@ void SVGAnimatedPathSegList::ClearAnimVa
   aElement->DidAnimatePathSegList();
 }
 
 bool SVGAnimatedPathSegList::IsRendered() const {
   return mAnimVal ? !mAnimVal->IsEmpty() : !mBaseVal.IsEmpty();
 }
 
 UniquePtr<nsISMILAttr> SVGAnimatedPathSegList::ToSMILAttr(
-    nsSVGElement *aElement) {
+    SVGElement *aElement) {
   return MakeUnique<SMILAnimatedPathSegList>(this, aElement);
 }
 
 nsresult SVGAnimatedPathSegList::SMILAnimatedPathSegList::ValueFromString(
     const nsAString &aStr, const dom::SVGAnimationElement * /*aSrcElement*/,
     nsSMILValue &aValue, bool &aPreventCachingOfSandwich) const {
   nsSMILValue val(SVGPathSegListSMILType::Singleton());
   SVGPathDataAndInfo *list = static_cast<SVGPathDataAndInfo *>(val.mU.mPtr);
--- a/dom/svg/SVGAnimatedPathSegList.h
+++ b/dom/svg/SVGAnimatedPathSegList.h
@@ -10,22 +10,22 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/UniquePtr.h"
 #include "nsAutoPtr.h"
 #include "nsISMILAttr.h"
 #include "SVGPathData.h"
 
 class nsSMILValue;
-class nsSVGElement;
 
 namespace mozilla {
 
 namespace dom {
 class SVGAnimationElement;
+class SVGElement;
 }  // namespace dom
 
 /**
  * Class SVGAnimatedPathSegList
  *
  * Despite the fact that no SVGAnimatedPathSegList interface or objects exist
  * in the SVG specification (unlike e.g. SVGAnimated*Length*List), we
  * nevertheless have this internal class. (Note that there is an
@@ -60,58 +60,58 @@ class SVGAnimatedPathSegList final {
 
   /**
    * const! See comment for GetBaseValue!
    */
   const SVGPathData& GetAnimValue() const {
     return mAnimVal ? *mAnimVal : mBaseVal;
   }
 
-  nsresult SetAnimValue(const SVGPathData& aValue, nsSVGElement* aElement);
+  nsresult SetAnimValue(const SVGPathData& aValue, dom::SVGElement* aElement);
 
-  void ClearAnimValue(nsSVGElement* aElement);
+  void ClearAnimValue(dom::SVGElement* aElement);
 
   /**
    * Empty paths are not rendered.
    */
   bool IsRendered() const;
 
   /**
    * Needed for correct DOM wrapper construction since GetAnimValue may
    * actually return the baseVal!
    */
   void* GetBaseValKey() const { return (void*)&mBaseVal; }
   void* GetAnimValKey() const { return (void*)&mAnimVal; }
 
   bool IsAnimating() const { return !!mAnimVal; }
 
-  UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aElement);
+  UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aElement);
 
   size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const;
 
  private:
   // mAnimVal is a pointer to allow us to determine if we're being animated or
   // not. Making it a non-pointer member and using mAnimVal.IsEmpty() to check
   // if we're animating is not an option, since that would break animation *to*
   // the empty string (<set to="">).
 
   SVGPathData mBaseVal;
   nsAutoPtr<SVGPathData> mAnimVal;
 
   struct SMILAnimatedPathSegList : public nsISMILAttr {
    public:
     SMILAnimatedPathSegList(SVGAnimatedPathSegList* aVal,
-                            nsSVGElement* aElement)
+                            dom::SVGElement* aElement)
         : mVal(aVal), mElement(aElement) {}
 
     // 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.
     SVGAnimatedPathSegList* mVal;
-    nsSVGElement* mElement;
+    dom::SVGElement* mElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(
         const nsAString& aStr, const 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;
--- a/dom/svg/SVGAnimatedPointList.cpp
+++ b/dom/svg/SVGAnimatedPointList.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGAnimatedPointList.h"
 
 #include "DOMSVGPointList.h"
 #include "mozilla/Move.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SVGPointListSMILType.h"
 
 // See the comments in this file's header!
 
 namespace mozilla {
 
@@ -44,17 +44,17 @@ nsresult SVGAnimatedPointList::SetBaseVa
     if (animValWrapper) {
       animValWrapper->InternalListWillChangeTo(newBaseValue);
     }
   }
 
   // Only now may we modify mBaseVal!
 
   // We don't need to call DidChange* here - we're only called by
-  // nsSVGElement::ParseAttribute under Element::SetAttr,
+  // SVGElement::ParseAttribute under Element::SetAttr,
   // which takes care of notifying.
 
   nsresult rv2 = mBaseVal.CopyFrom(newBaseValue);
   if (NS_FAILED(rv2)) {
     // Attempting to increase mBaseVal's length failed (mBaseVal is left
     // unmodified). We MUST keep any DOM wrappers in sync:
     if (baseValWrapper) {
       baseValWrapper->InternalListWillChangeTo(mBaseVal);
@@ -84,17 +84,17 @@ void SVGAnimatedPointList::ClearBaseValu
     }
   }
 
   mBaseVal.Clear();
   // Caller notifies
 }
 
 nsresult SVGAnimatedPointList::SetAnimValue(const SVGPointList &aNewAnimValue,
-                                            nsSVGElement *aElement) {
+                                            SVGElement *aElement) {
   // Note that a new animation may totally change the number of items in the
   // animVal list, either replacing what was essentially a mirror of the
   // baseVal list, or else replacing and overriding an existing animation.
   // It is not possible for us to reliably distinguish between calls to this
   // method that are setting a new sample for an existing animation (in which
   // case our list length isn't changing and we wouldn't need to notify our DOM
   // wrapper to keep its length in sync), and calls to this method that are
   // setting the first sample of a new animation that will override the base
@@ -119,33 +119,32 @@ nsresult SVGAnimatedPointList::SetAnimVa
     // that mAnimVal's DOM wrapper (if any) is kept in sync!
     ClearAnimValue(aElement);
     return rv;
   }
   aElement->DidAnimatePointList();
   return NS_OK;
 }
 
-void SVGAnimatedPointList::ClearAnimValue(nsSVGElement *aElement) {
+void SVGAnimatedPointList::ClearAnimValue(SVGElement *aElement) {
   // We must send these notifications *before* changing mAnimVal! (See above.)
 
   DOMSVGPointList *domWrapper =
       DOMSVGPointList::GetDOMWrapperIfExists(GetAnimValKey());
   if (domWrapper) {
     // When all animation ends, animVal simply mirrors baseVal, which may have
     // a different number of items to the last active animated value.
     //
     domWrapper->InternalListWillChangeTo(mBaseVal);
   }
   mAnimVal = nullptr;
   aElement->DidAnimatePointList();
 }
 
-UniquePtr<nsISMILAttr> SVGAnimatedPointList::ToSMILAttr(
-    nsSVGElement *aElement) {
+UniquePtr<nsISMILAttr> SVGAnimatedPointList::ToSMILAttr(SVGElement *aElement) {
   return MakeUnique<SMILAnimatedPointList>(this, aElement);
 }
 
 nsresult SVGAnimatedPointList::SMILAnimatedPointList::ValueFromString(
     const nsAString &aStr, const dom::SVGAnimationElement * /*aSrcElement*/,
     nsSMILValue &aValue, bool &aPreventCachingOfSandwich) const {
   nsSMILValue val(&SVGPointListSMILType::sSingleton);
   SVGPointListAndInfo *list = static_cast<SVGPointListAndInfo *>(val.mU.mPtr);
--- a/dom/svg/SVGAnimatedPointList.h
+++ b/dom/svg/SVGAnimatedPointList.h
@@ -9,22 +9,22 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/UniquePtr.h"
 #include "nsAutoPtr.h"
 #include "nsISMILAttr.h"
 #include "SVGPointList.h"
 
 class nsSMILValue;
-class nsSVGElement;
 
 namespace mozilla {
 
 namespace dom {
 class SVGAnimationElement;
+class SVGElement;
 }  // namespace dom
 
 /**
  * Class SVGAnimatedPointList
  *
  * Despite the fact that no SVGAnimatedPointList interface or objects exist
  * in the SVG specification (unlike e.g. SVGAnimated*Length*List), we
  * nevertheless have this internal class. (Note that there is an
@@ -59,50 +59,50 @@ class SVGAnimatedPointList {
 
   /**
    * const! See comment for GetBaseValue!
    */
   const SVGPointList& GetAnimValue() const {
     return mAnimVal ? *mAnimVal : mBaseVal;
   }
 
-  nsresult SetAnimValue(const SVGPointList& aValue, nsSVGElement* aElement);
+  nsresult SetAnimValue(const SVGPointList& aValue, dom::SVGElement* aElement);
 
-  void ClearAnimValue(nsSVGElement* aElement);
+  void ClearAnimValue(dom::SVGElement* aElement);
 
   /**
    * Needed for correct DOM wrapper construction since GetAnimValue may
    * actually return the baseVal!
    */
   void* GetBaseValKey() const { return (void*)&mBaseVal; }
   void* GetAnimValKey() const { return (void*)&mAnimVal; }
 
   bool IsAnimating() const { return !!mAnimVal; }
 
-  UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aElement);
+  UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aElement);
 
  private:
   // mAnimVal is a pointer to allow us to determine if we're being animated or
   // not. Making it a non-pointer member and using mAnimVal.IsEmpty() to check
   // if we're animating is not an option, since that would break animation *to*
   // the empty string (<set to="">).
 
   SVGPointList mBaseVal;
   nsAutoPtr<SVGPointList> mAnimVal;
 
   struct SMILAnimatedPointList : public nsISMILAttr {
    public:
-    SMILAnimatedPointList(SVGAnimatedPointList* aVal, nsSVGElement* aElement)
+    SMILAnimatedPointList(SVGAnimatedPointList* aVal, dom::SVGElement* aElement)
         : mVal(aVal), mElement(aElement) {}
 
     // 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.
     SVGAnimatedPointList* mVal;
-    nsSVGElement* mElement;
+    dom::SVGElement* mElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(
         const nsAString& aStr, const 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;
--- a/dom/svg/SVGAnimatedPreserveAspectRatio.cpp
+++ b/dom/svg/SVGAnimatedPreserveAspectRatio.cpp
@@ -74,18 +74,17 @@ DOMSVGAnimatedPreserveAspectRatio::AnimV
     domAnimVal = new DOMSVGPreserveAspectRatio(mVal, mSVGElement, false);
     sAnimSVGPAspectRatioTearoffTable.AddTearoff(mVal, domAnimVal);
   }
 
   return domAnimVal.forget();
 }
 
 nsresult SVGAnimatedPreserveAspectRatio::SetBaseValueString(
-    const nsAString& aValueAsString, nsSVGElement* aSVGElement,
-    bool aDoSetAttr) {
+    const nsAString& aValueAsString, SVGElement* aSVGElement, bool aDoSetAttr) {
   SVGPreserveAspectRatio val;
   nsresult res = SVGPreserveAspectRatio::FromString(aValueAsString, &val);
   if (NS_FAILED(res)) {
     return res;
   }
 
   nsAttrValue emptyOrOldValue;
   if (aDoSetAttr) {
@@ -108,17 +107,17 @@ nsresult SVGAnimatedPreserveAspectRatio:
 }
 
 void SVGAnimatedPreserveAspectRatio::GetBaseValueString(
     nsAString& aValueAsString) const {
   mBaseVal.ToString(aValueAsString);
 }
 
 void SVGAnimatedPreserveAspectRatio::SetBaseValue(
-    const SVGPreserveAspectRatio& aValue, nsSVGElement* aSVGElement) {
+    const SVGPreserveAspectRatio& aValue, SVGElement* aSVGElement) {
   if (mIsBaseSet && mBaseVal == aValue) {
     return;
   }
 
   nsAttrValue emptyOrOldValue = aSVGElement->WillChangePreserveAspectRatio();
   mBaseVal = aValue;
   mIsBaseSet = true;
 
@@ -136,46 +135,46 @@ static uint64_t PackPreserveAspectRatio(
   // can safely collate them and treat them as a single enum as for SMIL.
   uint64_t packed = 0;
   packed |= uint64_t(par.GetAlign()) << 8;
   packed |= uint64_t(par.GetMeetOrSlice());
   return packed;
 }
 
 void SVGAnimatedPreserveAspectRatio::SetAnimValue(uint64_t aPackedValue,
-                                                  nsSVGElement* aSVGElement) {
+                                                  SVGElement* aSVGElement) {
   if (mIsAnimated && PackPreserveAspectRatio(mAnimVal) == aPackedValue) {
     return;
   }
   mAnimVal.SetAlign(uint16_t((aPackedValue & 0xff00) >> 8));
   mAnimVal.SetMeetOrSlice(uint16_t(aPackedValue & 0xff));
   mIsAnimated = true;
   aSVGElement->DidAnimatePreserveAspectRatio();
 }
 
 already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
 SVGAnimatedPreserveAspectRatio::ToDOMAnimatedPreserveAspectRatio(
-    nsSVGElement* aSVGElement) {
+    SVGElement* aSVGElement) {
   RefPtr<DOMSVGAnimatedPreserveAspectRatio> domAnimatedPAspectRatio =
       sSVGAnimatedPAspectRatioTearoffTable.GetTearoff(this);
   if (!domAnimatedPAspectRatio) {
     domAnimatedPAspectRatio =
         new DOMSVGAnimatedPreserveAspectRatio(this, aSVGElement);
     sSVGAnimatedPAspectRatioTearoffTable.AddTearoff(this,
                                                     domAnimatedPAspectRatio);
   }
   return domAnimatedPAspectRatio.forget();
 }
 
 DOMSVGAnimatedPreserveAspectRatio::~DOMSVGAnimatedPreserveAspectRatio() {
   sSVGAnimatedPAspectRatioTearoffTable.RemoveTearoff(mVal);
 }
 
 UniquePtr<nsISMILAttr> SVGAnimatedPreserveAspectRatio::ToSMILAttr(
-    nsSVGElement* aSVGElement) {
+    SVGElement* aSVGElement) {
   return MakeUnique<SMILPreserveAspectRatio>(this, aSVGElement);
 }
 
 // typedef for inner class, to make function signatures shorter below:
 typedef SVGAnimatedPreserveAspectRatio::SMILPreserveAspectRatio
     SMILPreserveAspectRatio;
 
 nsresult SMILPreserveAspectRatio::ValueFromString(
--- a/dom/svg/SVGAnimatedPreserveAspectRatio.h
+++ b/dom/svg/SVGAnimatedPreserveAspectRatio.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOZILLA_SVGANIMATEDPRESERVEASPECTRATIO_H__
 #define MOZILLA_SVGANIMATEDPRESERVEASPECTRATIO_H__
 
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
 #include "nsISMILAttr.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "SVGPreserveAspectRatio.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/UniquePtr.h"
 
 class nsSMILValue;
 
 namespace mozilla {
 namespace dom {
@@ -31,68 +31,68 @@ class SVGAnimatedPreserveAspectRatio fin
     mBaseVal.mMeetOrSlice =
         dom::SVGPreserveAspectRatio_Binding::SVG_MEETORSLICE_MEET;
     mAnimVal = mBaseVal;
     mIsAnimated = false;
     mIsBaseSet = false;
   }
 
   nsresult SetBaseValueString(const nsAString& aValue,
-                              nsSVGElement* aSVGElement, bool aDoSetAttr);
+                              dom::SVGElement* aSVGElement, bool aDoSetAttr);
   void GetBaseValueString(nsAString& aValue) const;
 
   void SetBaseValue(const SVGPreserveAspectRatio& aValue,
-                    nsSVGElement* aSVGElement);
-  nsresult SetBaseAlign(uint16_t aAlign, nsSVGElement* aSVGElement) {
+                    dom::SVGElement* aSVGElement);
+  nsresult SetBaseAlign(uint16_t aAlign, dom::SVGElement* aSVGElement) {
     if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) {
       return NS_ERROR_FAILURE;
     }
     SetBaseValue(SVGPreserveAspectRatio(aAlign, mBaseVal.GetMeetOrSlice()),
                  aSVGElement);
     return NS_OK;
   }
   nsresult SetBaseMeetOrSlice(uint16_t aMeetOrSlice,
-                              nsSVGElement* aSVGElement) {
+                              dom::SVGElement* aSVGElement) {
     if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
         aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) {
       return NS_ERROR_FAILURE;
     }
     SetBaseValue(SVGPreserveAspectRatio(mBaseVal.GetAlign(), aMeetOrSlice),
                  aSVGElement);
     return NS_OK;
   }
-  void SetAnimValue(uint64_t aPackedValue, nsSVGElement* aSVGElement);
+  void SetAnimValue(uint64_t aPackedValue, dom::SVGElement* aSVGElement);
 
   const SVGPreserveAspectRatio& GetBaseValue() const { return mBaseVal; }
   const SVGPreserveAspectRatio& GetAnimValue() const { return mAnimVal; }
   bool IsAnimated() const { return mIsAnimated; }
   bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
 
   already_AddRefed<mozilla::dom::DOMSVGAnimatedPreserveAspectRatio>
-  ToDOMAnimatedPreserveAspectRatio(nsSVGElement* aSVGElement);
-  UniquePtr<nsISMILAttr> ToSMILAttr(nsSVGElement* aSVGElement);
+  ToDOMAnimatedPreserveAspectRatio(dom::SVGElement* aSVGElement);
+  UniquePtr<nsISMILAttr> ToSMILAttr(dom::SVGElement* aSVGElement);
 
  private:
   SVGPreserveAspectRatio mAnimVal;
   SVGPreserveAspectRatio mBaseVal;
   bool mIsAnimated;
   bool mIsBaseSet;
 
  public:
   struct SMILPreserveAspectRatio final : public nsISMILAttr {
    public:
     SMILPreserveAspectRatio(SVGAnimatedPreserveAspectRatio* aVal,
-                            nsSVGElement* aSVGElement)
+                            dom::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.
     SVGAnimatedPreserveAspectRatio* mVal;
-    nsSVGElement* mSVGElement;
+    dom::SVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(
         const nsAString& aStr, const 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;
@@ -104,30 +104,30 @@ class DOMSVGAnimatedPreserveAspectRatio 
                                                 public nsWrapperCache {
   ~DOMSVGAnimatedPreserveAspectRatio();
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(
       DOMSVGAnimatedPreserveAspectRatio)
 
   DOMSVGAnimatedPreserveAspectRatio(SVGAnimatedPreserveAspectRatio* aVal,
-                                    nsSVGElement* aSVGElement)
+                                    dom::SVGElement* aSVGElement)
       : mVal(aVal), mSVGElement(aSVGElement) {}
 
   // WebIDL
-  nsSVGElement* GetParentObject() const { return mSVGElement; }
+  dom::SVGElement* GetParentObject() const { return mSVGElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
   // These aren't weak refs because new objects are returned each time
   already_AddRefed<DOMSVGPreserveAspectRatio> BaseVal();
   already_AddRefed<DOMSVGPreserveAspectRatio> AnimVal();
 
  protected:
   // kept alive because it belongs to content:
   SVGAnimatedPreserveAspectRatio* mVal;
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<dom::SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // MOZILLA_SVGANIMATEDPRESERVEASPECTRATIO_H__
--- a/dom/svg/SVGAnimatedRect.cpp
+++ b/dom/svg/SVGAnimatedRect.cpp
@@ -1,29 +1,29 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGAnimatedRect.h"
 #include "mozilla/dom/SVGAnimatedRectBinding.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGViewBox.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, nsSVGElement* aSVGElement)
+SVGAnimatedRect::SVGAnimatedRect(nsSVGViewBox* aVal, SVGElement* aSVGElement)
     : mVal(aVal), mSVGElement(aSVGElement) {}
 
 SVGAnimatedRect::~SVGAnimatedRect() {
   nsSVGViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
 }
 
 already_AddRefed<SVGIRect> SVGAnimatedRect::GetBaseVal() {
   return mVal->ToDOMBaseVal(mSVGElement);
--- a/dom/svg/SVGAnimatedRect.h
+++ b/dom/svg/SVGAnimatedRect.h
@@ -7,42 +7,42 @@
 #ifndef mozilla_dom_SVGAnimatedRect_h
 #define mozilla_dom_SVGAnimatedRect_h
 
 #include "nsCycleCollectionParticipant.h"
 #include "mozilla/dom/SVGRectBinding.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "nsWrapperCache.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 class nsSVGViewBox;
 
 namespace mozilla {
 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, nsSVGElement* aSVGElement);
+  SVGAnimatedRect(nsSVGViewBox* aVal, SVGElement* aSVGElement);
 
-  nsSVGElement* GetParentObject() const { return mSVGElement; }
+  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
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedRect_h
--- a/dom/svg/SVGAnimatedString.h
+++ b/dom/svg/SVGAnimatedString.h
@@ -2,35 +2,35 @@
 /* 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/. */
 
 #ifndef mozilla_dom_SVGAnimatedString_h
 #define mozilla_dom_SVGAnimatedString_h
 
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class SVGAnimatedString : public nsISupports, public nsWrapperCache {
  public:
-  explicit SVGAnimatedString(nsSVGElement* aSVGElement)
+  explicit SVGAnimatedString(SVGElement* aSVGElement)
       : mSVGElement(aSVGElement) {}
 
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
   // WebIDL
-  nsSVGElement* GetParentObject() const { return mSVGElement; }
+  SVGElement* GetParentObject() const { return mSVGElement; }
 
   virtual void GetBaseVal(nsAString& aResult) = 0;
   virtual void SetBaseVal(const nsAString& aValue) = 0;
   virtual void GetAnimVal(nsAString& aResult) = 0;
 
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedString_h
--- a/dom/svg/SVGAnimatedTransformList.cpp
+++ b/dom/svg/SVGAnimatedTransformList.cpp
@@ -42,17 +42,17 @@ already_AddRefed<DOMSVGTransformList> SV
     mAnimVal = new DOMSVGTransformList(this, InternalAList().GetAnimValue());
   }
   RefPtr<DOMSVGTransformList> animVal = mAnimVal;
   return animVal.forget();
 }
 
 /* static */ already_AddRefed<SVGAnimatedTransformList>
 SVGAnimatedTransformList::GetDOMWrapper(nsSVGAnimatedTransformList* aList,
-                                        nsSVGElement* aElement) {
+                                        SVGElement* aElement) {
   RefPtr<SVGAnimatedTransformList> wrapper =
       sSVGAnimatedTransformListTearoffTable.GetTearoff(aList);
   if (!wrapper) {
     wrapper = new SVGAnimatedTransformList(aElement);
     sSVGAnimatedTransformListTearoffTable.AddTearoff(aList, wrapper);
   }
   return wrapper.forget();
 }
--- a/dom/svg/SVGAnimatedTransformList.h
+++ b/dom/svg/SVGAnimatedTransformList.h
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_SVGAnimatedTransformList_h
 #define mozilla_dom_SVGAnimatedTransformList_h
 
 #include "nsAutoPtr.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsWrapperCache.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 
 class DOMSVGTransformList;
 class nsSVGAnimatedTransformList;
 
@@ -51,17 +51,17 @@ class SVGAnimatedTransformList final : p
    * returned for the given nsSVGAnimatedTransformList each time it is
    * requested. The cached object is only removed from the cache when it is
    * destroyed due to there being no more references to it or to any of its
    * descendant objects. If that happens, any subsequent call requesting the DOM
    * wrapper for the nsSVGAnimatedTransformList will naturally result in a new
    * SVGAnimatedTransformList being returned.
    */
   static already_AddRefed<SVGAnimatedTransformList> GetDOMWrapper(
-      nsSVGAnimatedTransformList* aList, nsSVGElement* aElement);
+      nsSVGAnimatedTransformList* aList, SVGElement* aElement);
 
   /**
    * This method returns the SVGAnimatedTransformList wrapper for an internal
    * nsSVGAnimatedTransformList object if it currently has a wrapper. If it does
    * not, then nullptr is returned.
    */
   static SVGAnimatedTransformList* GetDOMWrapperIfExists(
       nsSVGAnimatedTransformList* aList);
@@ -83,44 +83,44 @@ class SVGAnimatedTransformList final : p
 
   /**
    * Returns true if our attribute is animating (in which case our animVal is
    * not simply a mirror of our baseVal).
    */
   bool IsAnimating() const;
 
   // WebIDL
-  nsSVGElement* GetParentObject() const { return mElement; }
+  SVGElement* GetParentObject() const { return mElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
   // These aren't weak refs because mBaseVal and mAnimVal are weak
   already_AddRefed<DOMSVGTransformList> BaseVal();
   already_AddRefed<DOMSVGTransformList> AnimVal();
 
  private:
   /**
    * Only our static GetDOMWrapper() factory method may create objects of our
    * type.
    */
-  explicit SVGAnimatedTransformList(nsSVGElement* aElement)
+  explicit SVGAnimatedTransformList(SVGElement* aElement)
       : mBaseVal(nullptr), mAnimVal(nullptr), mElement(aElement) {}
 
   ~SVGAnimatedTransformList();
 
   /// Get a reference to this DOM wrapper object's internal counterpart.
   nsSVGAnimatedTransformList& InternalAList();
   const nsSVGAnimatedTransformList& InternalAList() const;
 
   // Weak refs to our DOMSVGTransformList baseVal/animVal objects. These objects
   // are friends and take care of clearing these pointers when they die, making
   // these true weak references.
   DOMSVGTransformList* mBaseVal;
   DOMSVGTransformList* mAnimVal;
 
   // Strong ref to our element to keep it alive. We hold this not only for
   // ourself, but also for our base/animVal and all of their items.
-  RefPtr<nsSVGElement> mElement;
+  RefPtr<SVGElement> mElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedTransformList_h
--- a/dom/svg/SVGAnimationElement.cpp
+++ b/dom/svg/SVGAnimationElement.cpp
@@ -82,23 +82,23 @@ bool SVGAnimationElement::GetTargetAttri
       this, nsDependentAtomString(nameAttr->GetAtomValue()), aNamespaceID,
       aLocalName));
 }
 
 nsSMILTimedElement& SVGAnimationElement::TimedElement() {
   return mTimedElement;
 }
 
-nsSVGElement* SVGAnimationElement::GetTargetElement() {
+SVGElement* SVGAnimationElement::GetTargetElement() {
   FlushAnimations();
 
   // We'll just call the other GetTargetElement method, and QI to the right type
   nsIContent* target = GetTargetElementContent();
 
-  return (target && target->IsSVGElement()) ? static_cast<nsSVGElement*>(target)
+  return (target && target->IsSVGElement()) ? static_cast<SVGElement*>(target)
                                             : nullptr;
 }
 
 float SVGAnimationElement::GetStartTime(ErrorResult& rv) {
   FlushAnimations();
 
   nsSMILTimeValue startTime = mTimedElement.GetStartTime();
   if (!startTime.IsDefinite()) {
--- a/dom/svg/SVGAnimationElement.h
+++ b/dom/svg/SVGAnimationElement.h
@@ -6,23 +6,23 @@
 
 #ifndef mozilla_dom_SVGAnimationElement_h
 #define mozilla_dom_SVGAnimationElement_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/IDTracker.h"
 #include "mozilla/dom/SVGTests.h"
 #include "nsSMILTimedElement.h"
-#include "nsSVGElement.h"
-
-typedef nsSVGElement SVGAnimationElementBase;
+#include "SVGElement.h"
 
 namespace mozilla {
 namespace dom {
 
+typedef SVGElement SVGAnimationElementBase;
+
 enum nsSMILTargetAttrType {
   eSMILTargetAttrType_auto,
   eSMILTargetAttrType_CSS,
   eSMILTargetAttrType_XML
 };
 
 class SVGAnimationElement : public SVGAnimationElementBase, public SVGTests {
  protected:
@@ -66,30 +66,30 @@ class SVGAnimationElement : public SVGAn
   virtual nsSMILAnimationFunction& AnimationFunction() = 0;
 
   virtual bool IsEventAttributeNameInternal(nsAtom* aName) override;
 
   // Utility methods for within SVG
   void ActivateByHyperlink();
 
   // WebIDL
-  nsSVGElement* GetTargetElement();
+  SVGElement* GetTargetElement();
   float GetStartTime(ErrorResult& rv);
   float GetCurrentTime();
   float GetSimpleDuration(ErrorResult& rv);
   void BeginElement(ErrorResult& rv) { BeginElementAt(0.f, rv); }
   void BeginElementAt(float offset, ErrorResult& rv);
   void EndElement(ErrorResult& rv) { EndElementAt(0.f, rv); }
   void EndElementAt(float offset, ErrorResult& rv);
 
   // SVGTests
-  nsSVGElement* AsSVGElement() final { return this; }
+  SVGElement* AsSVGElement() final { return this; }
 
  protected:
-  // nsSVGElement overrides
+  // SVGElement overrides
 
   void UpdateHrefTarget(const nsAString& aHrefStr);
   void AnimationTargetChanged();
 
   /**
    * Helper that provides a reference to the element with the ID that is
    * referenced by the animation element's 'href' attribute, if any, and that
    * will notify the animation element if the element that that ID identifies
--- a/dom/svg/SVGCircleElement.cpp
+++ b/dom/svg/SVGCircleElement.cpp
@@ -17,17 +17,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGCircleElement::WrapNode(JSContext* aCx,
                                      JS::Handle<JSObject*> aGivenProto) {
   return SVGCircleElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGCircleElement::sLengthInfo[3] = {
+SVGElement::LengthInfo SVGCircleElement::sLengthInfo[3] = {
     {nsGkAtoms::cx, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::cy, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
     {nsGkAtoms::r, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::XY}};
 
 //----------------------------------------------------------------------
@@ -52,24 +52,24 @@ already_AddRefed<SVGAnimatedLength> SVGC
   return mLengthAttributes[ATTR_CY].ToDOMAnimatedLength(this);
 }
 
 already_AddRefed<SVGAnimatedLength> SVGCircleElement::R() {
   return mLengthAttributes[ATTR_R].ToDOMAnimatedLength(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ bool SVGCircleElement::HasValidDimensions() const {
   return mLengthAttributes[ATTR_R].IsExplicitlySet() &&
          mLengthAttributes[ATTR_R].GetAnimValInSpecifiedUnits() > 0;
 }
 
-nsSVGElement::LengthAttributesInfo SVGCircleElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGCircleElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
 // SVGGeometryElement methods
 
 bool SVGCircleElement::GetGeometryBounds(
--- a/dom/svg/SVGClipPathElement.cpp
+++ b/dom/svg/SVGClipPathElement.cpp
@@ -18,31 +18,31 @@ namespace dom {
 
 using namespace SVGUnitTypes_Binding;
 
 JSObject* SVGClipPathElement::WrapNode(JSContext* aCx,
                                        JS::Handle<JSObject*> aGivenProto) {
   return SVGClipPathElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::EnumInfo SVGClipPathElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGClipPathElement::sEnumInfo[1] = {
     {nsGkAtoms::clipPathUnits, sSVGUnitTypesMap, SVG_UNIT_TYPE_USERSPACEONUSE}};
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGClipPathElement::SVGClipPathElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : SVGClipPathElementBase(std::move(aNodeInfo)) {}
 
 already_AddRefed<SVGAnimatedEnumeration> SVGClipPathElement::ClipPathUnits() {
   return mEnumAttributes[CLIPPATHUNITS].ToDOMAnimatedEnum(this);
 }
 
-nsSVGElement::EnumAttributesInfo SVGClipPathElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGClipPathElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
 bool SVGClipPathElement::IsUnitsObjectBoundingBox() const {
   return mEnumAttributes[CLIPPATHUNITS].GetAnimValue() ==
          SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
 }
 
--- a/dom/svg/SVGContentUtils.cpp
+++ b/dom/svg/SVGContentUtils.cpp
@@ -35,17 +35,17 @@
 #include "SVGPathElement.h"
 
 using namespace mozilla::dom;
 using namespace mozilla::dom::SVGPreserveAspectRatio_Binding;
 using namespace mozilla::gfx;
 
 namespace mozilla {
 
-SVGSVGElement* SVGContentUtils::GetOuterSVGElement(nsSVGElement* aSVGElement) {
+SVGSVGElement* SVGContentUtils::GetOuterSVGElement(SVGElement* aSVGElement) {
   Element* element = nullptr;
   Element* ancestor = aSVGElement->GetParentElementCrossingShadowRoot();
 
   while (ancestor && ancestor->IsSVGElement() &&
          !ancestor->IsSVGElement(nsGkAtoms::foreignObject)) {
     element = ancestor;
     ancestor = element->GetParentElementCrossingShadowRoot();
   }
@@ -65,17 +65,17 @@ void SVGContentUtils::ActivateByHyperlin
 
 enum DashState {
   eDashedStroke,
   eContinuousStroke,  //< all dashes, no gaps
   eNoStroke           //< all gaps, no dashes
 };
 
 static DashState GetStrokeDashData(
-    SVGContentUtils::AutoStrokeOptions* aStrokeOptions, nsSVGElement* aElement,
+    SVGContentUtils::AutoStrokeOptions* aStrokeOptions, SVGElement* aElement,
     const nsStyleSVG* aStyleSVG, SVGContextPaint* aContextPaint) {
   size_t dashArrayLength;
   Float totalLengthOfDashes = 0.0, totalLengthOfGaps = 0.0;
   Float pathScale = 1.0;
 
   if (aContextPaint && aStyleSVG->StrokeDasharrayFromObject()) {
     const FallibleTArray<Float>& dashSrc = aContextPaint->GetStrokeDashArray();
     dashArrayLength = dashSrc.Length();
@@ -160,17 +160,17 @@ static DashState GetStrokeDashData(
         SVGContentUtils::CoordToFloat(aElement, aStyleSVG->mStrokeDashoffset) *
         pathScale;
   }
 
   return eDashedStroke;
 }
 
 void SVGContentUtils::GetStrokeOptions(AutoStrokeOptions* aStrokeOptions,
-                                       nsSVGElement* aElement,
+                                       SVGElement* aElement,
                                        ComputedStyle* aComputedStyle,
                                        SVGContextPaint* aContextPaint,
                                        StrokeOptionFlags aFlags) {
   RefPtr<ComputedStyle> computedStyle;
   if (aComputedStyle) {
     computedStyle = aComputedStyle;
   } else {
     computedStyle =
@@ -232,17 +232,17 @@ void SVGContentUtils::GetStrokeOptions(A
         break;
       case NS_STYLE_STROKE_LINECAP_SQUARE:
         aStrokeOptions->mLineCap = CapStyle::SQUARE;
         break;
     }
   }
 }
 
-Float SVGContentUtils::GetStrokeWidth(nsSVGElement* aElement,
+Float SVGContentUtils::GetStrokeWidth(SVGElement* aElement,
                                       ComputedStyle* aComputedStyle,
                                       SVGContextPaint* aContextPaint) {
   RefPtr<ComputedStyle> computedStyle;
   if (aComputedStyle) {
     computedStyle = aComputedStyle;
   } else {
     computedStyle =
         nsComputedDOMStyle::GetComputedStyleNoFlush(aElement, nullptr);
@@ -373,26 +373,26 @@ SVGViewportElement* SVGContentUtils::Get
                  "SVGViewportElement subclasses");
       return static_cast<SVGViewportElement*>(element);
     }
     element = element->GetFlattenedTreeParent();
   }
   return nullptr;
 }
 
-static gfx::Matrix GetCTMInternal(nsSVGElement* aElement, bool aScreenCTM,
+static gfx::Matrix GetCTMInternal(SVGElement* aElement, bool aScreenCTM,
                                   bool aHaveRecursed) {
   gfxMatrix matrix = aElement->PrependLocalTransformsTo(
       gfxMatrix(), aHaveRecursed ? eAllTransforms : eUserSpaceToParent);
-  nsSVGElement* element = aElement;
+  SVGElement* element = aElement;
   nsIContent* ancestor = aElement->GetFlattenedTreeParent();
 
   while (ancestor && ancestor->IsSVGElement() &&
          !ancestor->IsSVGElement(nsGkAtoms::foreignObject)) {
-    element = static_cast<nsSVGElement*>(ancestor);
+    element = static_cast<SVGElement*>(ancestor);
     matrix *= element->PrependLocalTransformsTo(gfxMatrix());  // i.e. *A*ppend
     if (!aScreenCTM && SVGContentUtils::EstablishesViewport(element)) {
       if (!element->NodeInfo()->Equals(nsGkAtoms::svg, kNameSpaceID_SVG) &&
           !element->NodeInfo()->Equals(nsGkAtoms::symbol, kNameSpaceID_SVG)) {
         NS_ERROR("New (SVG > 1.1) SVG viewport establishing element?");
         return gfx::Matrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);  // singular
       }
       // XXX spec seems to say x,y translation should be undone for IsInnerSVG
@@ -417,17 +417,17 @@ static gfx::Matrix GetCTMInternal(nsSVGE
     // really with the ambiguous spec).
     matrix = aElement->PrependLocalTransformsTo(gfxMatrix());
   }
   if (!ancestor || !ancestor->IsElement()) {
     return gfx::ToMatrix(matrix);
   }
   if (ancestor->IsSVGElement()) {
     return gfx::ToMatrix(matrix) *
-           GetCTMInternal(static_cast<nsSVGElement*>(ancestor), true, true);
+           GetCTMInternal(static_cast<SVGElement*>(ancestor), true, true);
   }
 
   // XXX this does not take into account CSS transform, or that the non-SVG
   // content that we've hit may itself be inside an SVG foreignObject higher up
   nsIDocument* currentDoc = aElement->GetComposedDoc();
   float x = 0.0f, y = 0.0f;
   if (currentDoc &&
       element->NodeInfo()->Equals(nsGkAtoms::svg, kNameSpaceID_SVG)) {
@@ -440,17 +440,17 @@ static gfx::Matrix GetCTMInternal(nsSVGE
         x = nsPresContext::AppUnitsToFloatCSSPixels(point.x);
         y = nsPresContext::AppUnitsToFloatCSSPixels(point.y);
       }
     }
   }
   return ToMatrix(matrix).PostTranslate(x, y);
 }
 
-gfx::Matrix SVGContentUtils::GetCTM(nsSVGElement* aElement, bool aScreenCTM) {
+gfx::Matrix SVGContentUtils::GetCTM(SVGElement* aElement, bool aScreenCTM) {
   return GetCTMInternal(aElement, aScreenCTM, false);
 }
 
 void SVGContentUtils::RectilinearGetStrokeBounds(
     const Rect& aRect, const Matrix& aToBoundsSpace,
     const Matrix& aToNonScalingStrokeSpace, float aStrokeWidth, Rect* aBounds) {
   MOZ_ASSERT(aToBoundsSpace.IsRectilinear(),
              "aToBoundsSpace must be rectilinear");
@@ -758,17 +758,17 @@ bool SVGContentUtils::ParseInteger(Range
 /* static */
 bool SVGContentUtils::ParseInteger(const nsAString& aString, int32_t& aValue) {
   RangedPtr<const char16_t> iter = GetStartRangedPtr(aString);
   const RangedPtr<const char16_t> end = GetEndRangedPtr(aString);
 
   return ParseInteger(iter, end, aValue) && iter == end;
 }
 
-float SVGContentUtils::CoordToFloat(nsSVGElement* aContent,
+float SVGContentUtils::CoordToFloat(SVGElement* aContent,
                                     const nsStyleCoord& aCoord) {
   switch (aCoord.GetUnit()) {
     case eStyleUnit_Factor:
       // user units
       return aCoord.GetFactorValue();
 
     case eStyleUnit_Coord:
       return nsPresContext::AppUnitsToFloatCSSPixels(aCoord.GetCoordValue());
--- a/dom/svg/SVGContentUtils.h
+++ b/dom/svg/SVGContentUtils.h
@@ -17,26 +17,26 @@
 #include "nsStringFwd.h"
 #include "gfx2DGlue.h"
 
 class nsIContent;
 class nsIDocument;
 class nsIFrame;
 class nsPresContext;
 class nsStyleCoord;
-class nsSVGElement;
 
 namespace mozilla {
 class ComputedStyle;
 class nsSVGAnimatedTransformList;
 class SVGAnimatedPreserveAspectRatio;
 class SVGContextPaint;
 class SVGPreserveAspectRatio;
 namespace dom {
 class Element;
+class SVGElement;
 class SVGSVGElement;
 class SVGViewportElement;
 }  // namespace dom
 
 #define SVG_ZERO_LENGTH_PATH_FIX_FACTOR 512
 
 /**
  * SVGTransformTypes controls the transforms that PrependLocalTransformsTo
@@ -76,17 +76,17 @@ class SVGContentUtils {
   typedef mozilla::gfx::Float Float;
   typedef mozilla::gfx::Matrix Matrix;
   typedef mozilla::gfx::Rect Rect;
   typedef mozilla::gfx::StrokeOptions StrokeOptions;
 
   /*
    * Get the outer SVG element of an nsIContent
    */
-  static dom::SVGSVGElement* GetOuterSVGElement(nsSVGElement* aSVGElement);
+  static dom::SVGSVGElement* GetOuterSVGElement(dom::SVGElement* aSVGElement);
 
   /**
    * Activates the animation element aContent as a result of navigation to the
    * fragment identifier that identifies aContent. aContent must be an instance
    * of nsSVGAnimationElement.
    *
    * This is just a shim to allow nsSVGAnimationElement::ActivateByHyperlink to
    * be called from layout/base without adding to that directory's include
@@ -143,31 +143,31 @@ class SVGContentUtils {
   enum StrokeOptionFlags { eAllStrokeOptions, eIgnoreStrokeDashing };
   /**
    * Note: the linecap style returned in aStrokeOptions is not valid when
    * ShapeTypeHasNoCorners(aElement) == true && aFlags == eIgnoreStrokeDashing,
    * since when aElement has no corners the rendered linecap style depends on
    * whether or not the stroke is dashed.
    */
   static void GetStrokeOptions(AutoStrokeOptions* aStrokeOptions,
-                               nsSVGElement* aElement,
+                               dom::SVGElement* aElement,
                                ComputedStyle* aComputedStyle,
                                mozilla::SVGContextPaint* aContextPaint,
                                StrokeOptionFlags aFlags = eAllStrokeOptions);
 
   /**
    * Returns the current computed value of the CSS property 'stroke-width' for
    * the given element. aComputedStyle may be provided as an optimization.
    * aContextPaint is also optional.
    *
    * Note that this function does NOT take account of the value of the 'stroke'
    * and 'stroke-opacity' properties to, say, return zero if they are "none" or
    * "0", respectively.
    */
-  static Float GetStrokeWidth(nsSVGElement* aElement,
+  static Float GetStrokeWidth(dom::SVGElement* aElement,
                               ComputedStyle* aComputedStyle,
                               mozilla::SVGContextPaint* aContextPaint);
 
   /*
    * Get the number of CSS px (user units) per em (i.e. the em-height in user
    * units) for an nsIContent
    *
    * XXX document the conditions under which these may fail, and what they
@@ -189,17 +189,17 @@ class SVGContentUtils {
 
   /*
    * Report a localized error message to the error console.
    */
   static nsresult ReportToConsole(nsIDocument* doc, const char* aWarning,
                                   const char16_t** aParams,
                                   uint32_t aParamsLength);
 
-  static Matrix GetCTM(nsSVGElement* aElement, bool aScreenCTM);
+  static Matrix GetCTM(dom::SVGElement* aElement, bool aScreenCTM);
 
   /**
    * Gets the tight bounds-space stroke bounds of the non-scaling-stroked rect
    * aRect.
    * @param aToBoundsSpace transforms from source space to the space aBounds
    *        should be computed in.  Must be rectilinear.
    * @param aToNonScalingStrokeSpace transforms from source
    *        space to the space in which non-scaling stroke should be applied.
@@ -316,17 +316,18 @@ class SVGContentUtils {
    */
   static bool ParseInteger(const nsAString& aString, int32_t& aValue);
 
   /**
    * Converts an nsStyleCoord into a userspace value.  Handles units
    * Factor (straight userspace), Coord (dimensioned), and Percent (of
    * aContent's SVG viewport)
    */
-  static float CoordToFloat(nsSVGElement* aContent, const nsStyleCoord& aCoord);
+  static float CoordToFloat(dom::SVGElement* aContent,
+                            const nsStyleCoord& aCoord);
   /**
    * Parse the SVG path string
    * Returns a path
    * string formatted as an SVG path
    */
   static already_AddRefed<mozilla::gfx::Path> GetPath(
       const nsAString& aPathString);
 
--- a/dom/svg/SVGDescElement.h
+++ b/dom/svg/SVGDescElement.h
@@ -3,26 +3,26 @@
 /* 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_SVGDescElement_h
 #define mozilla_dom_SVGDescElement_h
 
 #include "mozilla/Attributes.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 nsresult NS_NewSVGDescElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGElement SVGDescElementBase;
-
 namespace mozilla {
 namespace dom {
 
+typedef SVGElement SVGDescElementBase;
+
 class SVGDescElement final : public SVGDescElementBase {
  protected:
   friend nsresult(::NS_NewSVGDescElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGDescElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
   JSObject* WrapNode(JSContext* aCx,
--- a/dom/svg/SVGDocument.cpp
+++ b/dom/svg/SVGDocument.cpp
@@ -12,17 +12,17 @@
 #include "nsIStyleSheetService.h"
 #include "nsISupportsPrimitives.h"
 #include "nsLayoutStylesheetCache.h"
 #include "nsNetUtil.h"
 #include "nsServiceManagerUtils.h"
 #include "nsString.h"
 #include "nsLiteralString.h"
 #include "mozilla/dom/Element.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "mozilla/StyleSheet.h"
 #include "mozilla/StyleSheetInlines.h"
 
 using namespace mozilla::css;
 using namespace mozilla::dom;
 
 namespace mozilla {
 namespace dom {
--- a/dom/svg/SVGDocument.h
+++ b/dom/svg/SVGDocument.h
@@ -5,24 +5,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_SVGDocument_h
 #define mozilla_dom_SVGDocument_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/XMLDocument.h"
 
-class nsSVGElement;
-
 namespace mozilla {
 
 class SVGContextPaint;
 
 namespace dom {
 
+class SVGElement;
 class SVGForeignObjectElement;
 
 class SVGDocument final : public XMLDocument {
  public:
   SVGDocument() : XMLDocument("image/svg+xml") { mType = eSVG; }
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
rename from dom/svg/nsSVGElement.cpp
rename to dom/svg/SVGElement.cpp
--- a/dom/svg/nsSVGElement.cpp
+++ b/dom/svg/SVGElement.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/DebugOnly.h"
 #include "mozilla/Unused.h"
 
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 #include "mozilla/dom/SVGLengthBinding.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "mozilla/dom/SVGTests.h"
 #include "mozilla/dom/SVGUnitTypesBinding.h"
 #include "nsContentUtils.h"
 #include "nsICSSDeclaration.h"
 #include "nsIContentInlines.h"
@@ -51,63 +51,64 @@
 #include "nsAttrValueOrString.h"
 #include "nsSMILAnimationController.h"
 #include "mozilla/dom/MutationEventBinding.h"
 #include "mozilla/dom/SVGElementBinding.h"
 #include "mozilla/DeclarationBlock.h"
 #include "mozilla/Unused.h"
 #include "mozilla/RestyleManager.h"
 
-using namespace mozilla;
-using namespace mozilla::dom;
-using namespace mozilla::dom::SVGUnitTypes_Binding;
-
 // This is needed to ensure correct handling of calls to the
 // vararg-list methods in this file:
-//   nsSVGElement::GetAnimated{Length,Number,Integer}Values
+//   SVGElement::GetAnimated{Length,Number,Integer}Values
 // See bug 547964 for details:
 static_assert(sizeof(void*) == sizeof(nullptr),
               "nullptr should be the correct size");
 
 nsresult NS_NewSVGElement(
     Element** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) {
-  RefPtr<nsSVGElement> it = new nsSVGElement(std::move(aNodeInfo));
+  RefPtr<mozilla::dom::SVGElement> it =
+      new mozilla::dom::SVGElement(std::move(aNodeInfo));
   nsresult rv = it->Init();
 
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   it.forget(aResult);
   return rv;
 }
 
-NS_IMPL_ELEMENT_CLONE_WITH_INIT(nsSVGElement)
+namespace mozilla {
+namespace dom {
+using namespace SVGUnitTypes_Binding;
 
-nsSVGEnumMapping nsSVGElement::sSVGUnitTypesMap[] = {
+NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGElement)
+
+nsSVGEnumMapping SVGElement::sSVGUnitTypesMap[] = {
     {nsGkAtoms::userSpaceOnUse, SVG_UNIT_TYPE_USERSPACEONUSE},
     {nsGkAtoms::objectBoundingBox, SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
     {nullptr, 0}};
 
-nsSVGElement::nsSVGElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
-    : nsSVGElementBase(std::move(aNodeInfo)) {}
+SVGElement::SVGElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
+    : SVGElementBase(std::move(aNodeInfo)) {}
 
-nsSVGElement::~nsSVGElement() {
+SVGElement::~SVGElement() {
   OwnerDoc()->UnscheduleSVGForPresAttrEvaluation(this);
 }
 
-JSObject* nsSVGElement::WrapNode(JSContext* aCx,
-                                 JS::Handle<JSObject*> aGivenProto) {
+JSObject* SVGElement::WrapNode(JSContext* aCx,
+                               JS::Handle<JSObject*> aGivenProto) {
   return SVGElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-void nsSVGElement::DidAnimateClass() {
+void SVGElement::DidAnimateClass() {
   // For Servo, snapshot the element before we change it.
   nsIPresShell* shell = OwnerDoc()->GetShell();
   if (shell) {
     nsPresContext* presContext = shell->GetPresContext();
     if (presContext) {
       presContext->RestyleManager()->ClassAttributeWillBeChangedBySMIL(this);
     }
   }
@@ -119,17 +120,17 @@ void nsSVGElement::DidAnimateClass() {
   }
   mClassAnimAttr->ParseAtomArray(src);
 
   if (shell) {
     shell->RestyleForAnimation(this, eRestyle_Self);
   }
 }
 
-nsresult nsSVGElement::Init() {
+nsresult SVGElement::Init() {
   // Set up length attributes - can't do this in the constructor
   // because we can't do a virtual call at that point
 
   LengthAttributesInfo lengthInfo = GetLengthInfo();
 
   uint32_t i;
   for (i = 0; i < lengthInfo.mLengthCount; i++) {
     lengthInfo.Reset(i);
@@ -218,20 +219,19 @@ nsresult nsSVGElement::Init() {
 }
 
 //----------------------------------------------------------------------
 // Implementation
 
 //----------------------------------------------------------------------
 // nsIContent methods
 
-nsresult nsSVGElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
-                                  nsIContent* aBindingParent) {
-  nsresult rv =
-      nsSVGElementBase::BindToTree(aDocument, aParent, aBindingParent);
+nsresult SVGElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
+                                nsIContent* aBindingParent) {
+  nsresult rv = SVGElementBase::BindToTree(aDocument, aParent, aBindingParent);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!MayHaveStyle()) {
     return NS_OK;
   }
   const nsAttrValue* oldVal = mAttrs.GetAttr(nsGkAtoms::style);
 
   if (oldVal && oldVal->Type() == nsAttrValue::eCSSDeclaration) {
@@ -251,21 +251,21 @@ nsresult nsSVGElement::BindToTree(nsIDoc
     bool oldValueSet;
     rv = mAttrs.SetAndSwapAttr(nsGkAtoms::style, attrValue, &oldValueSet);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return NS_OK;
 }
 
-nsresult nsSVGElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
-                                    const nsAttrValue* aValue,
-                                    const nsAttrValue* aOldValue,
-                                    nsIPrincipal* aSubjectPrincipal,
-                                    bool aNotify) {
+nsresult SVGElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
+                                  const nsAttrValue* aValue,
+                                  const nsAttrValue* aOldValue,
+                                  nsIPrincipal* aSubjectPrincipal,
+                                  bool aNotify) {
   // We don't currently use nsMappedAttributes within SVG. If this changes, we
   // need to be very careful because some nsAttrValues used by SVG point to
   // member data of SVG elements and if an nsAttrValue outlives the SVG element
   // whose data it points to (by virtue of being stored in
   // mAttrs->mMappedAttributes, meaning it's shared between
   // elements), the pointer will dangle. See bug 724680.
   MOZ_ASSERT(!mAttrs.HasMappedAttrs(),
              "Unexpected use of nsMappedAttributes within SVG");
@@ -282,24 +282,24 @@ nsresult nsSVGElement::AfterSetAttr(int3
   if (IsEventAttributeName(aName) && aValue) {
     MOZ_ASSERT(aValue->Type() == nsAttrValue::eString,
                "Expected string value for script body");
     nsresult rv =
         SetEventHandler(GetEventNameForAttr(aName), aValue->GetStringValue());
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  return nsSVGElementBase::AfterSetAttr(aNamespaceID, aName, aValue, aOldValue,
-                                        aSubjectPrincipal, aNotify);
+  return SVGElementBase::AfterSetAttr(aNamespaceID, aName, aValue, aOldValue,
+                                      aSubjectPrincipal, aNotify);
 }
 
-bool nsSVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
-                                  const nsAString& aValue,
-                                  nsIPrincipal* aMaybeScriptedPrincipal,
-                                  nsAttrValue& aResult) {
+bool SVGElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
+                                const nsAString& aValue,
+                                nsIPrincipal* aMaybeScriptedPrincipal,
+                                nsAttrValue& aResult) {
   nsresult rv = NS_OK;
   bool foundMatch = false;
   bool didSetResult = false;
 
   if (aNamespaceID == kNameSpaceID_None) {
     // Check for nsSVGLength2 attribute
     LengthAttributesInfo lengthInfo = GetLengthInfo();
 
@@ -625,22 +625,22 @@ bool nsSVGElement::ParseAttribute(int32_
       return false;
     }
     if (!didSetResult) {
       aResult.SetTo(aValue);
     }
     return true;
   }
 
-  return nsSVGElementBase::ParseAttribute(aNamespaceID, aAttribute, aValue,
-                                          aMaybeScriptedPrincipal, aResult);
+  return SVGElementBase::ParseAttribute(aNamespaceID, aAttribute, aValue,
+                                        aMaybeScriptedPrincipal, aResult);
 }
 
-void nsSVGElement::UnsetAttrInternal(int32_t aNamespaceID, nsAtom* aName,
-                                     bool aNotify) {
+void SVGElement::UnsetAttrInternal(int32_t aNamespaceID, nsAtom* aName,
+                                   bool aNotify) {
   // XXXbz there's a bunch of redundancy here with AfterSetAttr.
   // Maybe consolidate?
 
   if (aNamespaceID == kNameSpaceID_None) {
     // If this is an svg presentation attribute, remove declaration block to
     // force an update
     if (IsAttributeMapped(aName)) {
       mContentDeclarationBlock = nullptr;
@@ -844,193 +844,193 @@ void nsSVGElement::UnsetAttrInternal(int
     if (aNamespaceID == stringInfo.mStringInfo[i].mNamespaceID &&
         aName == stringInfo.mStringInfo[i].mName) {
       stringInfo.Reset(i);
       return;
     }
   }
 }
 
-nsresult nsSVGElement::BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
-                                     const nsAttrValueOrString* aValue,
-                                     bool aNotify) {
+nsresult SVGElement::BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
+                                   const nsAttrValueOrString* aValue,
+                                   bool aNotify) {
   if (!aValue) {
     UnsetAttrInternal(aNamespaceID, aName, aNotify);
   }
-  return nsSVGElementBase::BeforeSetAttr(aNamespaceID, aName, aValue, aNotify);
+  return SVGElementBase::BeforeSetAttr(aNamespaceID, aName, aValue, aNotify);
 }
 
-nsChangeHint nsSVGElement::GetAttributeChangeHint(const nsAtom* aAttribute,
-                                                  int32_t aModType) const {
+nsChangeHint SVGElement::GetAttributeChangeHint(const nsAtom* aAttribute,
+                                                int32_t aModType) const {
   nsChangeHint retval =
-      nsSVGElementBase::GetAttributeChangeHint(aAttribute, aModType);
+      SVGElementBase::GetAttributeChangeHint(aAttribute, aModType);
 
-  nsCOMPtr<SVGTests> tests = do_QueryObject(const_cast<nsSVGElement*>(this));
+  nsCOMPtr<SVGTests> tests = do_QueryObject(const_cast<SVGElement*>(this));
   if (tests && tests->IsConditionalProcessingAttribute(aAttribute)) {
     // It would be nice to only reconstruct the frame if the value returned by
     // SVGTests::PassesConditionalProcessingTests has changed, but we don't
     // know that
     retval |= nsChangeHint_ReconstructFrame;
   }
   return retval;
 }
 
-bool nsSVGElement::IsNodeOfType(uint32_t aFlags) const { return false; }
+bool SVGElement::IsNodeOfType(uint32_t aFlags) const { return false; }
 
-void nsSVGElement::NodeInfoChanged(nsIDocument* aOldDoc) {
-  nsSVGElementBase::NodeInfoChanged(aOldDoc);
+void SVGElement::NodeInfoChanged(nsIDocument* aOldDoc) {
+  SVGElementBase::NodeInfoChanged(aOldDoc);
   aOldDoc->UnscheduleSVGForPresAttrEvaluation(this);
   mContentDeclarationBlock = nullptr;
   OwnerDoc()->ScheduleSVGForPresAttrEvaluation(this);
 }
 
 NS_IMETHODIMP_(bool)
-nsSVGElement::IsAttributeMapped(const nsAtom* name) const {
+SVGElement::IsAttributeMapped(const nsAtom* name) const {
   if (name == nsGkAtoms::lang) {
     return true;
   }
-  return nsSVGElementBase::IsAttributeMapped(name);
+  return SVGElementBase::IsAttributeMapped(name);
 }
 
 // PresentationAttributes-FillStroke
-/* static */ const Element::MappedAttributeEntry
-    nsSVGElement::sFillStrokeMap[] = {{nsGkAtoms::fill},
-                                      {nsGkAtoms::fill_opacity},
-                                      {nsGkAtoms::fill_rule},
-                                      {nsGkAtoms::paint_order},
-                                      {nsGkAtoms::stroke},
-                                      {nsGkAtoms::stroke_dasharray},
-                                      {nsGkAtoms::stroke_dashoffset},
-                                      {nsGkAtoms::stroke_linecap},
-                                      {nsGkAtoms::stroke_linejoin},
-                                      {nsGkAtoms::stroke_miterlimit},
-                                      {nsGkAtoms::stroke_opacity},
-                                      {nsGkAtoms::stroke_width},
-                                      {nsGkAtoms::vector_effect},
-                                      {nullptr}};
+/* static */ const Element::MappedAttributeEntry SVGElement::sFillStrokeMap[] =
+    {{nsGkAtoms::fill},
+     {nsGkAtoms::fill_opacity},
+     {nsGkAtoms::fill_rule},
+     {nsGkAtoms::paint_order},
+     {nsGkAtoms::stroke},
+     {nsGkAtoms::stroke_dasharray},
+     {nsGkAtoms::stroke_dashoffset},
+     {nsGkAtoms::stroke_linecap},
+     {nsGkAtoms::stroke_linejoin},
+     {nsGkAtoms::stroke_miterlimit},
+     {nsGkAtoms::stroke_opacity},
+     {nsGkAtoms::stroke_width},
+     {nsGkAtoms::vector_effect},
+     {nullptr}};
 
 // PresentationAttributes-Graphics
-/* static */ const Element::MappedAttributeEntry nsSVGElement::sGraphicsMap[] =
-    {{nsGkAtoms::clip_path},
-     {nsGkAtoms::clip_rule},
-     {nsGkAtoms::colorInterpolation},
-     {nsGkAtoms::cursor},
-     {nsGkAtoms::display},
-     {nsGkAtoms::filter},
-     {nsGkAtoms::image_rendering},
-     {nsGkAtoms::mask},
-     {nsGkAtoms::opacity},
-     {nsGkAtoms::pointer_events},
-     {nsGkAtoms::shape_rendering},
-     {nsGkAtoms::text_rendering},
-     {nsGkAtoms::visibility},
-     {nullptr}};
+/* static */ const Element::MappedAttributeEntry SVGElement::sGraphicsMap[] = {
+    {nsGkAtoms::clip_path},
+    {nsGkAtoms::clip_rule},
+    {nsGkAtoms::colorInterpolation},
+    {nsGkAtoms::cursor},
+    {nsGkAtoms::display},
+    {nsGkAtoms::filter},
+    {nsGkAtoms::image_rendering},
+    {nsGkAtoms::mask},
+    {nsGkAtoms::opacity},
+    {nsGkAtoms::pointer_events},
+    {nsGkAtoms::shape_rendering},
+    {nsGkAtoms::text_rendering},
+    {nsGkAtoms::visibility},
+    {nullptr}};
 
 // PresentationAttributes-TextContentElements
 /* static */ const Element::MappedAttributeEntry
-    nsSVGElement::sTextContentElementsMap[] = {
+    SVGElement::sTextContentElementsMap[] = {
         // Properties that we don't support are commented out.
         // { nsGkAtoms::alignment_baseline },
         // { nsGkAtoms::baseline_shift },
         {nsGkAtoms::direction},
         {nsGkAtoms::dominant_baseline},
         {nsGkAtoms::letter_spacing},
         {nsGkAtoms::text_anchor},
         {nsGkAtoms::text_decoration},
         {nsGkAtoms::unicode_bidi},
         {nsGkAtoms::word_spacing},
         {nsGkAtoms::writing_mode},
         {nullptr}};
 
 // PresentationAttributes-FontSpecification
 /* static */ const Element::MappedAttributeEntry
-    nsSVGElement::sFontSpecificationMap[] = {
+    SVGElement::sFontSpecificationMap[] = {
         {nsGkAtoms::font_family},      {nsGkAtoms::font_size},
         {nsGkAtoms::font_size_adjust}, {nsGkAtoms::font_stretch},
         {nsGkAtoms::font_style},       {nsGkAtoms::font_variant},
         {nsGkAtoms::fontWeight},       {nullptr}};
 
 // PresentationAttributes-GradientStop
 /* static */ const Element::MappedAttributeEntry
-    nsSVGElement::sGradientStopMap[] = {
+    SVGElement::sGradientStopMap[] = {
         {nsGkAtoms::stop_color}, {nsGkAtoms::stop_opacity}, {nullptr}};
 
 // PresentationAttributes-Viewports
-/* static */ const Element::MappedAttributeEntry nsSVGElement::sViewportsMap[] =
-    {{nsGkAtoms::overflow}, {nsGkAtoms::clip}, {nullptr}};
+/* static */ const Element::MappedAttributeEntry SVGElement::sViewportsMap[] = {
+    {nsGkAtoms::overflow}, {nsGkAtoms::clip}, {nullptr}};
 
 // PresentationAttributes-Makers
-/* static */ const Element::MappedAttributeEntry nsSVGElement::sMarkersMap[] = {
+/* static */ const Element::MappedAttributeEntry SVGElement::sMarkersMap[] = {
     {nsGkAtoms::marker_end},
     {nsGkAtoms::marker_mid},
     {nsGkAtoms::marker_start},
     {nullptr}};
 
 // PresentationAttributes-Color
-/* static */ const Element::MappedAttributeEntry nsSVGElement::sColorMap[] = {
+/* static */ const Element::MappedAttributeEntry SVGElement::sColorMap[] = {
     {nsGkAtoms::color}, {nullptr}};
 
 // PresentationAttributes-Filters
-/* static */ const Element::MappedAttributeEntry nsSVGElement::sFiltersMap[] = {
+/* static */ const Element::MappedAttributeEntry SVGElement::sFiltersMap[] = {
     {nsGkAtoms::colorInterpolationFilters}, {nullptr}};
 
 // PresentationAttributes-feFlood
-/* static */ const Element::MappedAttributeEntry nsSVGElement::sFEFloodMap[] = {
+/* static */ const Element::MappedAttributeEntry SVGElement::sFEFloodMap[] = {
     {nsGkAtoms::flood_color}, {nsGkAtoms::flood_opacity}, {nullptr}};
 
 // PresentationAttributes-LightingEffects
 /* static */ const Element::MappedAttributeEntry
-    nsSVGElement::sLightingEffectsMap[] = {{nsGkAtoms::lighting_color},
-                                           {nullptr}};
+    SVGElement::sLightingEffectsMap[] = {{nsGkAtoms::lighting_color},
+                                         {nullptr}};
 
 // PresentationAttributes-mask
-/* static */ const Element::MappedAttributeEntry nsSVGElement::sMaskMap[] = {
+/* static */ const Element::MappedAttributeEntry SVGElement::sMaskMap[] = {
     {nsGkAtoms::mask_type}, {nullptr}};
 
 //----------------------------------------------------------------------
 // Element methods
 
 // forwarded to Element implementations
 
 //----------------------------------------------------------------------
 
-SVGSVGElement* nsSVGElement::GetOwnerSVGElement() {
+SVGSVGElement* SVGElement::GetOwnerSVGElement() {
   nsIContent* ancestor = GetFlattenedTreeParent();
 
   while (ancestor && ancestor->IsSVGElement()) {
     if (ancestor->IsSVGElement(nsGkAtoms::foreignObject)) {
       return nullptr;
     }
     if (ancestor->IsSVGElement(nsGkAtoms::svg)) {
       return static_cast<SVGSVGElement*>(ancestor);
     }
     ancestor = ancestor->GetFlattenedTreeParent();
   }
 
   // we don't have an ancestor <svg> element...
   return nullptr;
 }
 
-nsSVGElement* nsSVGElement::GetViewportElement() {
+SVGElement* SVGElement::GetViewportElement() {
   return SVGContentUtils::GetNearestViewportElement(this);
 }
 
-already_AddRefed<SVGAnimatedString> nsSVGElement::ClassName() {
+already_AddRefed<SVGAnimatedString> SVGElement::ClassName() {
   return mClassAttribute.ToDOMAnimatedString(this);
 }
 
 //------------------------------------------------------------------------
 // Helper class: MappedAttrParser, for parsing values of mapped attributes
 
 namespace {
 
 class MOZ_STACK_CLASS MappedAttrParser {
  public:
   MappedAttrParser(css::Loader* aLoader, nsIURI* aDocURI,
-                   already_AddRefed<nsIURI> aBaseURI, nsSVGElement* aElement);
+                   already_AddRefed<nsIURI> aBaseURI, SVGElement* aElement);
   ~MappedAttrParser();
 
   // Parses a mapped attribute value.
   void ParseMappedAttrValue(nsAtom* aMappedAttrName,
                             const nsAString& aMappedAttrValue);
 
   // If we've parsed any values for mapped attributes, this method returns the
   // already_AddRefed css::Declaration that incorporates the parsed
@@ -1045,22 +1045,22 @@ class MOZ_STACK_CLASS MappedAttrParser {
   // Arguments for nsCSSParser::ParseProperty
   nsIURI* mDocURI;
   nsCOMPtr<nsIURI> mBaseURI;
 
   // Declaration for storing parsed values (lazily initialized)
   RefPtr<DeclarationBlock> mDecl;
 
   // For reporting use counters
-  nsSVGElement* mElement;
+  SVGElement* mElement;
 };
 
 MappedAttrParser::MappedAttrParser(css::Loader* aLoader, nsIURI* aDocURI,
                                    already_AddRefed<nsIURI> aBaseURI,
-                                   nsSVGElement* aElement)
+                                   SVGElement* aElement)
     : mLoader(aLoader),
       mDocURI(aDocURI),
       mBaseURI(aBaseURI),
       mElement(aElement) {}
 
 MappedAttrParser::~MappedAttrParser() {
   MOZ_ASSERT(!mDecl,
              "If mDecl was initialized, it should have been returned via "
@@ -1123,17 +1123,17 @@ already_AddRefed<DeclarationBlock> Mappe
   return mDecl.forget();
 }
 
 }  // namespace
 
 //----------------------------------------------------------------------
 // Implementation Helpers:
 
-void nsSVGElement::UpdateContentDeclarationBlock() {
+void SVGElement::UpdateContentDeclarationBlock() {
   NS_ASSERTION(!mContentDeclarationBlock,
                "we already have a content declaration block");
 
   uint32_t attrCount = mAttrs.AttrCount();
   if (!attrCount) {
     // nothing to do
     return;
   }
@@ -1176,17 +1176,17 @@ void nsSVGElement::UpdateContentDeclarat
 
     nsAutoString value;
     mAttrs.AttrAt(i)->ToString(value);
     mappedAttrParser.ParseMappedAttrValue(attrName->Atom(), value);
   }
   mContentDeclarationBlock = mappedAttrParser.GetDeclarationBlock();
 }
 
-const DeclarationBlock* nsSVGElement::GetContentDeclarationBlock() const {
+const DeclarationBlock* SVGElement::GetContentDeclarationBlock() const {
   return mContentDeclarationBlock;
 }
 
 /**
  * Helper methods for the type-specific WillChangeXXX methods.
  *
  * This method sends out appropriate pre-change notifications so that selector
  * restyles (e.g. due to changes that cause |elem[attr="val"]| to start/stop
@@ -1223,17 +1223,17 @@ const DeclarationBlock* nsSVGElement::Ge
  * calling Will/DidChangeXXX if they are.
  *
  * Also note that not all SVG types use this scheme. For types that can be
  * represented by an nsAttrValue without pointing back to an SVG object (e.g.
  * enums, booleans, integers) we can simply use SetParsedAttr which will do all
  * of the above for us. For such types there is no matching WillChangeXXX
  * method, only DidChangeXXX which calls SetParsedAttr.
  */
-nsAttrValue nsSVGElement::WillChangeValue(nsAtom* aName) {
+nsAttrValue SVGElement::WillChangeValue(nsAtom* aName) {
   // We need an empty attr value:
   //   a) to pass to BeforeSetAttr when GetParsedAttr returns nullptr
   //   b) to store the old value in the case we have mutation listeners
   //
   // We can use the same value for both purposes, because if GetParsedAttr
   // returns non-null its return value is what will get passed to BeforeSetAttr,
   // not matter what our mutation listener situation is.
   //
@@ -1280,19 +1280,19 @@ nsAttrValue nsSVGElement::WillChangeValu
  * a) WillChangeXXX will ensure the object is set when we have mutation
  *    listeners, and
  * b) WillChangeXXX will ensure the object represents a serialized version of
  *    the old attribute value so that the value doesn't change when the
  *    underlying SVG type is updated.
  *
  * aNewValue is replaced with the old value.
  */
-void nsSVGElement::DidChangeValue(nsAtom* aName,
-                                  const nsAttrValue& aEmptyOrOldValue,
-                                  nsAttrValue& aNewValue) {
+void SVGElement::DidChangeValue(nsAtom* aName,
+                                const nsAttrValue& aEmptyOrOldValue,
+                                nsAttrValue& aNewValue) {
   bool hasListeners = nsContentUtils::HasMutationListeners(
       this, NS_EVENT_BITS_MUTATION_ATTRMODIFIED, this);
   uint8_t modType =
       HasAttr(kNameSpaceID_None, aName)
           ? static_cast<uint8_t>(MutationEvent_Binding::MODIFICATION)
           : static_cast<uint8_t>(MutationEvent_Binding::ADDITION);
 
   nsIDocument* document = GetComposedDoc();
@@ -1302,123 +1302,122 @@ void nsSVGElement::DidChangeValue(nsAtom
   // attribute, but currently SVG elements do not even use the old attribute
   // value in |AfterSetAttr|, so this should be ok.
   SetAttrAndNotify(kNameSpaceID_None, aName, nullptr, &aEmptyOrOldValue,
                    aNewValue, nullptr, modType, hasListeners,
                    kNotifyDocumentObservers, kCallAfterSetAttr, document,
                    updateBatch);
 }
 
-void nsSVGElement::MaybeSerializeAttrBeforeRemoval(nsAtom* aName,
-                                                   bool aNotify) {
+void SVGElement::MaybeSerializeAttrBeforeRemoval(nsAtom* aName, bool aNotify) {
   if (!aNotify || !nsContentUtils::HasMutationListeners(
                       this, NS_EVENT_BITS_MUTATION_ATTRMODIFIED, this)) {
     return;
   }
 
   const nsAttrValue* attrValue = mAttrs.GetAttr(aName);
   if (!attrValue) return;
 
   nsAutoString serializedValue;
   attrValue->ToString(serializedValue);
   nsAttrValue oldAttrValue(serializedValue);
   bool oldValueSet;
   mAttrs.SetAndSwapAttr(aName, oldAttrValue, &oldValueSet);
 }
 
 /* static */
-nsAtom* nsSVGElement::GetEventNameForAttr(nsAtom* aAttr) {
+nsAtom* SVGElement::GetEventNameForAttr(nsAtom* aAttr) {
   if (aAttr == nsGkAtoms::onload) return nsGkAtoms::onSVGLoad;
   if (aAttr == nsGkAtoms::onunload) return nsGkAtoms::onSVGUnload;
   if (aAttr == nsGkAtoms::onresize) return nsGkAtoms::onSVGResize;
   if (aAttr == nsGkAtoms::onscroll) return nsGkAtoms::onSVGScroll;
   if (aAttr == nsGkAtoms::onzoom) return nsGkAtoms::onSVGZoom;
   if (aAttr == nsGkAtoms::onbegin) return nsGkAtoms::onbeginEvent;
   if (aAttr == nsGkAtoms::onrepeat) return nsGkAtoms::onrepeatEvent;
   if (aAttr == nsGkAtoms::onend) return nsGkAtoms::onendEvent;
 
   return aAttr;
 }
 
-SVGViewportElement* nsSVGElement::GetCtx() const {
+SVGViewportElement* SVGElement::GetCtx() const {
   return SVGContentUtils::GetNearestViewportElement(this);
 }
 
-/* virtual */ gfxMatrix nsSVGElement::PrependLocalTransformsTo(
+/* virtual */ gfxMatrix SVGElement::PrependLocalTransformsTo(
     const gfxMatrix& aMatrix, SVGTransformTypes aWhich) const {
   return aMatrix;
 }
 
-nsSVGElement::LengthAttributesInfo nsSVGElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGElement::GetLengthInfo() {
   return LengthAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::LengthAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::LengthAttributesInfo::Reset(uint8_t aAttrEnum) {
   mLengths[aAttrEnum].Init(mLengthInfo[aAttrEnum].mCtxType, aAttrEnum,
                            mLengthInfo[aAttrEnum].mDefaultValue,
                            mLengthInfo[aAttrEnum].mDefaultUnitType);
 }
 
-void nsSVGElement::SetLength(nsAtom* aName, const nsSVGLength2& aLength) {
+void SVGElement::SetLength(nsAtom* aName, const nsSVGLength2& aLength) {
   LengthAttributesInfo lengthInfo = GetLengthInfo();
 
   for (uint32_t i = 0; i < lengthInfo.mLengthCount; i++) {
     if (aName == lengthInfo.mLengthInfo[i].mName) {
       lengthInfo.mLengths[i] = aLength;
       DidAnimateLength(i);
       return;
     }
   }
   MOZ_ASSERT(false, "no length found to set");
 }
 
-nsAttrValue nsSVGElement::WillChangeLength(uint8_t aAttrEnum) {
+nsAttrValue SVGElement::WillChangeLength(uint8_t aAttrEnum) {
   return WillChangeValue(GetLengthInfo().mLengthInfo[aAttrEnum].mName);
 }
 
-void nsSVGElement::DidChangeLength(uint8_t aAttrEnum,
-                                   const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangeLength(uint8_t aAttrEnum,
+                                 const nsAttrValue& aEmptyOrOldValue) {
   LengthAttributesInfo info = GetLengthInfo();
 
   NS_ASSERTION(info.mLengthCount > 0,
                "DidChangeLength on element with no length attribs");
   NS_ASSERTION(aAttrEnum < info.mLengthCount, "aAttrEnum out of range");
 
   nsAttrValue newValue;
   newValue.SetTo(info.mLengths[aAttrEnum], nullptr);
 
   DidChangeValue(info.mLengthInfo[aAttrEnum].mName, aEmptyOrOldValue, newValue);
 }
 
-void nsSVGElement::DidAnimateLength(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateLength(uint8_t aAttrEnum) {
   ClearAnyCachedPath();
 
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     LengthAttributesInfo info = GetLengthInfo();
     frame->AttributeChanged(kNameSpaceID_None,
                             info.mLengthInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsSVGLength2* nsSVGElement::GetAnimatedLength(const nsAtom* aAttrName) {
+nsSVGLength2* SVGElement::GetAnimatedLength(const nsAtom* aAttrName) {
   LengthAttributesInfo lengthInfo = GetLengthInfo();
 
   for (uint32_t i = 0; i < lengthInfo.mLengthCount; i++) {
     if (aAttrName == lengthInfo.mLengthInfo[i].mName) {
       return &lengthInfo.mLengths[i];
     }
   }
   MOZ_ASSERT(false, "no matching length found");
   return nullptr;
 }
 
-void nsSVGElement::GetAnimatedLengthValues(float* aFirst, ...) {
+void SVGElement::GetAnimatedLengthValues(float* aFirst, ...) {
   LengthAttributesInfo info = GetLengthInfo();
 
   NS_ASSERTION(info.mLengthCount > 0,
                "GetAnimatedLengthValues on element with no length attribs");
 
   SVGViewportElement* ctx = nullptr;
 
   float* f = aFirst;
@@ -1440,56 +1439,56 @@ void nsSVGElement::GetAnimatedLengthValu
     else
       *f = info.mLengths[i++].GetAnimValue(ctx);
     f = va_arg(args, float*);
   }
 
   va_end(args);
 }
 
-nsSVGElement::LengthListAttributesInfo nsSVGElement::GetLengthListInfo() {
+SVGElement::LengthListAttributesInfo SVGElement::GetLengthListInfo() {
   return LengthListAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::LengthListAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::LengthListAttributesInfo::Reset(uint8_t aAttrEnum) {
   mLengthLists[aAttrEnum].ClearBaseValue(aAttrEnum);
   // caller notifies
 }
 
-nsAttrValue nsSVGElement::WillChangeLengthList(uint8_t aAttrEnum) {
+nsAttrValue SVGElement::WillChangeLengthList(uint8_t aAttrEnum) {
   return WillChangeValue(GetLengthListInfo().mLengthListInfo[aAttrEnum].mName);
 }
 
-void nsSVGElement::DidChangeLengthList(uint8_t aAttrEnum,
-                                       const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangeLengthList(uint8_t aAttrEnum,
+                                     const nsAttrValue& aEmptyOrOldValue) {
   LengthListAttributesInfo info = GetLengthListInfo();
 
   NS_ASSERTION(info.mLengthListCount > 0,
                "DidChangeLengthList on element with no length list attribs");
   NS_ASSERTION(aAttrEnum < info.mLengthListCount, "aAttrEnum out of range");
 
   nsAttrValue newValue;
   newValue.SetTo(info.mLengthLists[aAttrEnum].GetBaseValue(), nullptr);
 
   DidChangeValue(info.mLengthListInfo[aAttrEnum].mName, aEmptyOrOldValue,
                  newValue);
 }
 
-void nsSVGElement::DidAnimateLengthList(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateLengthList(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     LengthListAttributesInfo info = GetLengthListInfo();
     frame->AttributeChanged(kNameSpaceID_None,
                             info.mLengthListInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-void nsSVGElement::GetAnimatedLengthListValues(SVGUserUnitList* aFirst, ...) {
+void SVGElement::GetAnimatedLengthListValues(SVGUserUnitList* aFirst, ...) {
   LengthListAttributesInfo info = GetLengthListInfo();
 
   NS_ASSERTION(
       info.mLengthListCount > 0,
       "GetAnimatedLengthListValues on element with no length list attribs");
 
   SVGUserUnitList* list = aFirst;
   uint32_t i = 0;
@@ -1502,175 +1501,175 @@ void nsSVGElement::GetAnimatedLengthList
                info.mLengthListInfo[i].mAxis);
     ++i;
     list = va_arg(args, SVGUserUnitList*);
   }
 
   va_end(args);
 }
 
-SVGAnimatedLengthList* nsSVGElement::GetAnimatedLengthList(uint8_t aAttrEnum) {
+SVGAnimatedLengthList* SVGElement::GetAnimatedLengthList(uint8_t aAttrEnum) {
   LengthListAttributesInfo info = GetLengthListInfo();
   if (aAttrEnum < info.mLengthListCount) {
     return &(info.mLengthLists[aAttrEnum]);
   }
   MOZ_ASSERT_UNREACHABLE("Bad attrEnum");
   return nullptr;
 }
 
-nsSVGElement::NumberListAttributesInfo nsSVGElement::GetNumberListInfo() {
+SVGElement::NumberListAttributesInfo SVGElement::GetNumberListInfo() {
   return NumberListAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::NumberListAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::NumberListAttributesInfo::Reset(uint8_t aAttrEnum) {
   MOZ_ASSERT(aAttrEnum < mNumberListCount, "Bad attr enum");
   mNumberLists[aAttrEnum].ClearBaseValue(aAttrEnum);
   // caller notifies
 }
 
-nsAttrValue nsSVGElement::WillChangeNumberList(uint8_t aAttrEnum) {
+nsAttrValue SVGElement::WillChangeNumberList(uint8_t aAttrEnum) {
   return WillChangeValue(GetNumberListInfo().mNumberListInfo[aAttrEnum].mName);
 }
 
-void nsSVGElement::DidChangeNumberList(uint8_t aAttrEnum,
-                                       const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangeNumberList(uint8_t aAttrEnum,
+                                     const nsAttrValue& aEmptyOrOldValue) {
   NumberListAttributesInfo info = GetNumberListInfo();
 
   MOZ_ASSERT(info.mNumberListCount > 0,
              "DidChangeNumberList on element with no number list attribs");
   MOZ_ASSERT(aAttrEnum < info.mNumberListCount, "aAttrEnum out of range");
 
   nsAttrValue newValue;
   newValue.SetTo(info.mNumberLists[aAttrEnum].GetBaseValue(), nullptr);
 
   DidChangeValue(info.mNumberListInfo[aAttrEnum].mName, aEmptyOrOldValue,
                  newValue);
 }
 
-void nsSVGElement::DidAnimateNumberList(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateNumberList(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     NumberListAttributesInfo info = GetNumberListInfo();
     MOZ_ASSERT(aAttrEnum < info.mNumberListCount, "aAttrEnum out of range");
 
     frame->AttributeChanged(kNameSpaceID_None,
                             info.mNumberListInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-SVGAnimatedNumberList* nsSVGElement::GetAnimatedNumberList(uint8_t aAttrEnum) {
+SVGAnimatedNumberList* SVGElement::GetAnimatedNumberList(uint8_t aAttrEnum) {
   NumberListAttributesInfo info = GetNumberListInfo();
   if (aAttrEnum < info.mNumberListCount) {
     return &(info.mNumberLists[aAttrEnum]);
   }
   MOZ_ASSERT(false, "Bad attrEnum");
   return nullptr;
 }
 
-SVGAnimatedNumberList* nsSVGElement::GetAnimatedNumberList(nsAtom* aAttrName) {
+SVGAnimatedNumberList* SVGElement::GetAnimatedNumberList(nsAtom* aAttrName) {
   NumberListAttributesInfo info = GetNumberListInfo();
   for (uint32_t i = 0; i < info.mNumberListCount; i++) {
     if (aAttrName == info.mNumberListInfo[i].mName) {
       return &info.mNumberLists[i];
     }
   }
   MOZ_ASSERT(false, "Bad caller");
   return nullptr;
 }
 
-nsAttrValue nsSVGElement::WillChangePointList() {
+nsAttrValue SVGElement::WillChangePointList() {
   MOZ_ASSERT(GetPointListAttrName(), "Changing non-existent point list?");
   return WillChangeValue(GetPointListAttrName());
 }
 
-void nsSVGElement::DidChangePointList(const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangePointList(const nsAttrValue& aEmptyOrOldValue) {
   MOZ_ASSERT(GetPointListAttrName(), "Changing non-existent point list?");
 
   nsAttrValue newValue;
   newValue.SetTo(GetAnimatedPointList()->GetBaseValue(), nullptr);
 
   DidChangeValue(GetPointListAttrName(), aEmptyOrOldValue, newValue);
 }
 
-void nsSVGElement::DidAnimatePointList() {
+void SVGElement::DidAnimatePointList() {
   MOZ_ASSERT(GetPointListAttrName(), "Animating non-existent path data?");
 
   ClearAnyCachedPath();
 
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     frame->AttributeChanged(kNameSpaceID_None, GetPointListAttrName(),
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsAttrValue nsSVGElement::WillChangePathSegList() {
+nsAttrValue SVGElement::WillChangePathSegList() {
   MOZ_ASSERT(GetPathDataAttrName(), "Changing non-existent path seg list?");
   return WillChangeValue(GetPathDataAttrName());
 }
 
-void nsSVGElement::DidChangePathSegList(const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangePathSegList(const nsAttrValue& aEmptyOrOldValue) {
   MOZ_ASSERT(GetPathDataAttrName(), "Changing non-existent path seg list?");
 
   nsAttrValue newValue;
   newValue.SetTo(GetAnimPathSegList()->GetBaseValue(), nullptr);
 
   DidChangeValue(GetPathDataAttrName(), aEmptyOrOldValue, newValue);
 }
 
-void nsSVGElement::DidAnimatePathSegList() {
+void SVGElement::DidAnimatePathSegList() {
   MOZ_ASSERT(GetPathDataAttrName(), "Animating non-existent path data?");
 
   ClearAnyCachedPath();
 
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     frame->AttributeChanged(kNameSpaceID_None, GetPathDataAttrName(),
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsSVGElement::NumberAttributesInfo nsSVGElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGElement::GetNumberInfo() {
   return NumberAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::NumberAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::NumberAttributesInfo::Reset(uint8_t aAttrEnum) {
   mNumbers[aAttrEnum].Init(aAttrEnum, mNumberInfo[aAttrEnum].mDefaultValue);
 }
 
-void nsSVGElement::DidChangeNumber(uint8_t aAttrEnum) {
+void SVGElement::DidChangeNumber(uint8_t aAttrEnum) {
   NumberAttributesInfo info = GetNumberInfo();
 
   NS_ASSERTION(info.mNumberCount > 0,
                "DidChangeNumber on element with no number attribs");
   NS_ASSERTION(aAttrEnum < info.mNumberCount, "aAttrEnum out of range");
 
   nsAttrValue attrValue;
   attrValue.SetTo(info.mNumbers[aAttrEnum].GetBaseValue(), nullptr);
 
   SetParsedAttr(kNameSpaceID_None, info.mNumberInfo[aAttrEnum].mName, nullptr,
                 attrValue, true);
 }
 
-void nsSVGElement::DidAnimateNumber(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateNumber(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     NumberAttributesInfo info = GetNumberInfo();
     frame->AttributeChanged(kNameSpaceID_None,
                             info.mNumberInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-void nsSVGElement::GetAnimatedNumberValues(float* aFirst, ...) {
+void SVGElement::GetAnimatedNumberValues(float* aFirst, ...) {
   NumberAttributesInfo info = GetNumberInfo();
 
   NS_ASSERTION(info.mNumberCount > 0,
                "GetAnimatedNumberValues on element with no number attribs");
 
   float* f = aFirst;
   uint32_t i = 0;
 
@@ -1679,90 +1678,90 @@ void nsSVGElement::GetAnimatedNumberValu
 
   while (f && i < info.mNumberCount) {
     *f = info.mNumbers[i++].GetAnimValue();
     f = va_arg(args, float*);
   }
   va_end(args);
 }
 
-nsSVGElement::NumberPairAttributesInfo nsSVGElement::GetNumberPairInfo() {
+SVGElement::NumberPairAttributesInfo SVGElement::GetNumberPairInfo() {
   return NumberPairAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::NumberPairAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::NumberPairAttributesInfo::Reset(uint8_t aAttrEnum) {
   mNumberPairs[aAttrEnum].Init(aAttrEnum,
                                mNumberPairInfo[aAttrEnum].mDefaultValue1,
                                mNumberPairInfo[aAttrEnum].mDefaultValue2);
 }
 
-nsAttrValue nsSVGElement::WillChangeNumberPair(uint8_t aAttrEnum) {
+nsAttrValue SVGElement::WillChangeNumberPair(uint8_t aAttrEnum) {
   return WillChangeValue(GetNumberPairInfo().mNumberPairInfo[aAttrEnum].mName);
 }
 
-void nsSVGElement::DidChangeNumberPair(uint8_t aAttrEnum,
-                                       const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangeNumberPair(uint8_t aAttrEnum,
+                                     const nsAttrValue& aEmptyOrOldValue) {
   NumberPairAttributesInfo info = GetNumberPairInfo();
 
   NS_ASSERTION(info.mNumberPairCount > 0,
                "DidChangePairNumber on element with no number pair attribs");
   NS_ASSERTION(aAttrEnum < info.mNumberPairCount, "aAttrEnum out of range");
 
   nsAttrValue newValue;
   newValue.SetTo(info.mNumberPairs[aAttrEnum], nullptr);
 
   DidChangeValue(info.mNumberPairInfo[aAttrEnum].mName, aEmptyOrOldValue,
                  newValue);
 }
 
-void nsSVGElement::DidAnimateNumberPair(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateNumberPair(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     NumberPairAttributesInfo info = GetNumberPairInfo();
     frame->AttributeChanged(kNameSpaceID_None,
                             info.mNumberPairInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsSVGElement::IntegerAttributesInfo nsSVGElement::GetIntegerInfo() {
+SVGElement::IntegerAttributesInfo SVGElement::GetIntegerInfo() {
   return IntegerAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::IntegerAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::IntegerAttributesInfo::Reset(uint8_t aAttrEnum) {
   mIntegers[aAttrEnum].Init(aAttrEnum, mIntegerInfo[aAttrEnum].mDefaultValue);
 }
 
-void nsSVGElement::DidChangeInteger(uint8_t aAttrEnum) {
+void SVGElement::DidChangeInteger(uint8_t aAttrEnum) {
   IntegerAttributesInfo info = GetIntegerInfo();
 
   NS_ASSERTION(info.mIntegerCount > 0,
                "DidChangeInteger on element with no integer attribs");
   NS_ASSERTION(aAttrEnum < info.mIntegerCount, "aAttrEnum out of range");
 
   nsAttrValue attrValue;
   attrValue.SetTo(info.mIntegers[aAttrEnum].GetBaseValue(), nullptr);
 
   SetParsedAttr(kNameSpaceID_None, info.mIntegerInfo[aAttrEnum].mName, nullptr,
                 attrValue, true);
 }
 
-void nsSVGElement::DidAnimateInteger(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateInteger(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     IntegerAttributesInfo info = GetIntegerInfo();
     frame->AttributeChanged(kNameSpaceID_None,
                             info.mIntegerInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-void nsSVGElement::GetAnimatedIntegerValues(int32_t* aFirst, ...) {
+void SVGElement::GetAnimatedIntegerValues(int32_t* aFirst, ...) {
   IntegerAttributesInfo info = GetIntegerInfo();
 
   NS_ASSERTION(info.mIntegerCount > 0,
                "GetAnimatedIntegerValues on element with no integer attribs");
 
   int32_t* n = aFirst;
   uint32_t i = 0;
 
@@ -1771,236 +1770,236 @@ void nsSVGElement::GetAnimatedIntegerVal
 
   while (n && i < info.mIntegerCount) {
     *n = info.mIntegers[i++].GetAnimValue();
     n = va_arg(args, int32_t*);
   }
   va_end(args);
 }
 
-nsSVGElement::IntegerPairAttributesInfo nsSVGElement::GetIntegerPairInfo() {
+SVGElement::IntegerPairAttributesInfo SVGElement::GetIntegerPairInfo() {
   return IntegerPairAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::IntegerPairAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::IntegerPairAttributesInfo::Reset(uint8_t aAttrEnum) {
   mIntegerPairs[aAttrEnum].Init(aAttrEnum,
                                 mIntegerPairInfo[aAttrEnum].mDefaultValue1,
                                 mIntegerPairInfo[aAttrEnum].mDefaultValue2);
 }
 
-nsAttrValue nsSVGElement::WillChangeIntegerPair(uint8_t aAttrEnum) {
+nsAttrValue SVGElement::WillChangeIntegerPair(uint8_t aAttrEnum) {
   return WillChangeValue(
       GetIntegerPairInfo().mIntegerPairInfo[aAttrEnum].mName);
 }
 
-void nsSVGElement::DidChangeIntegerPair(uint8_t aAttrEnum,
-                                        const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangeIntegerPair(uint8_t aAttrEnum,
+                                      const nsAttrValue& aEmptyOrOldValue) {
   IntegerPairAttributesInfo info = GetIntegerPairInfo();
 
   NS_ASSERTION(info.mIntegerPairCount > 0,
                "DidChangeIntegerPair on element with no integer pair attribs");
   NS_ASSERTION(aAttrEnum < info.mIntegerPairCount, "aAttrEnum out of range");
 
   nsAttrValue newValue;
   newValue.SetTo(info.mIntegerPairs[aAttrEnum], nullptr);
 
   DidChangeValue(info.mIntegerPairInfo[aAttrEnum].mName, aEmptyOrOldValue,
                  newValue);
 }
 
-void nsSVGElement::DidAnimateIntegerPair(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateIntegerPair(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     IntegerPairAttributesInfo info = GetIntegerPairInfo();
     frame->AttributeChanged(kNameSpaceID_None,
                             info.mIntegerPairInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsSVGElement::AngleAttributesInfo nsSVGElement::GetAngleInfo() {
+SVGElement::AngleAttributesInfo SVGElement::GetAngleInfo() {
   return AngleAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::AngleAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::AngleAttributesInfo::Reset(uint8_t aAttrEnum) {
   mAngles[aAttrEnum].Init(aAttrEnum, mAngleInfo[aAttrEnum].mDefaultValue,
                           mAngleInfo[aAttrEnum].mDefaultUnitType);
 }
 
-nsAttrValue nsSVGElement::WillChangeAngle(uint8_t aAttrEnum) {
+nsAttrValue SVGElement::WillChangeAngle(uint8_t aAttrEnum) {
   return WillChangeValue(GetAngleInfo().mAngleInfo[aAttrEnum].mName);
 }
 
-void nsSVGElement::DidChangeAngle(uint8_t aAttrEnum,
-                                  const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangeAngle(uint8_t aAttrEnum,
+                                const nsAttrValue& aEmptyOrOldValue) {
   AngleAttributesInfo info = GetAngleInfo();
 
   NS_ASSERTION(info.mAngleCount > 0,
                "DidChangeAngle on element with no angle attribs");
   NS_ASSERTION(aAttrEnum < info.mAngleCount, "aAttrEnum out of range");
 
   nsAttrValue newValue;
   newValue.SetTo(info.mAngles[aAttrEnum], nullptr);
 
   DidChangeValue(info.mAngleInfo[aAttrEnum].mName, aEmptyOrOldValue, newValue);
 }
 
-void nsSVGElement::DidAnimateAngle(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateAngle(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     AngleAttributesInfo info = GetAngleInfo();
     frame->AttributeChanged(kNameSpaceID_None, info.mAngleInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsSVGElement::BooleanAttributesInfo nsSVGElement::GetBooleanInfo() {
+SVGElement::BooleanAttributesInfo SVGElement::GetBooleanInfo() {
   return BooleanAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::BooleanAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::BooleanAttributesInfo::Reset(uint8_t aAttrEnum) {
   mBooleans[aAttrEnum].Init(aAttrEnum, mBooleanInfo[aAttrEnum].mDefaultValue);
 }
 
-void nsSVGElement::DidChangeBoolean(uint8_t aAttrEnum) {
+void SVGElement::DidChangeBoolean(uint8_t aAttrEnum) {
   BooleanAttributesInfo info = GetBooleanInfo();
 
   NS_ASSERTION(info.mBooleanCount > 0,
                "DidChangeBoolean on element with no boolean attribs");
   NS_ASSERTION(aAttrEnum < info.mBooleanCount, "aAttrEnum out of range");
 
   nsAttrValue attrValue(info.mBooleans[aAttrEnum].GetBaseValueAtom());
   SetParsedAttr(kNameSpaceID_None, info.mBooleanInfo[aAttrEnum].mName, nullptr,
                 attrValue, true);
 }
 
-void nsSVGElement::DidAnimateBoolean(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateBoolean(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     BooleanAttributesInfo info = GetBooleanInfo();
     frame->AttributeChanged(kNameSpaceID_None,
                             info.mBooleanInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsSVGElement::EnumAttributesInfo nsSVGElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGElement::GetEnumInfo() {
   return EnumAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::EnumAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::EnumAttributesInfo::Reset(uint8_t aAttrEnum) {
   mEnums[aAttrEnum].Init(aAttrEnum, mEnumInfo[aAttrEnum].mDefaultValue);
 }
 
-void nsSVGElement::EnumAttributesInfo::SetUnknownValue(uint8_t aAttrEnum) {
+void SVGElement::EnumAttributesInfo::SetUnknownValue(uint8_t aAttrEnum) {
   // Fortunately in SVG every enum's unknown value is 0
   mEnums[aAttrEnum].Init(aAttrEnum, 0);
 }
 
-void nsSVGElement::DidChangeEnum(uint8_t aAttrEnum) {
+void SVGElement::DidChangeEnum(uint8_t aAttrEnum) {
   EnumAttributesInfo info = GetEnumInfo();
 
   NS_ASSERTION(info.mEnumCount > 0,
                "DidChangeEnum on element with no enum attribs");
   NS_ASSERTION(aAttrEnum < info.mEnumCount, "aAttrEnum out of range");
 
   nsAttrValue attrValue(info.mEnums[aAttrEnum].GetBaseValueAtom(this));
   SetParsedAttr(kNameSpaceID_None, info.mEnumInfo[aAttrEnum].mName, nullptr,
                 attrValue, true);
 }
 
-void nsSVGElement::DidAnimateEnum(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateEnum(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     EnumAttributesInfo info = GetEnumInfo();
     frame->AttributeChanged(kNameSpaceID_None, info.mEnumInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsSVGViewBox* nsSVGElement::GetViewBox() { return nullptr; }
+nsSVGViewBox* SVGElement::GetViewBox() { return nullptr; }
 
-nsAttrValue nsSVGElement::WillChangeViewBox() {
+nsAttrValue SVGElement::WillChangeViewBox() {
   return WillChangeValue(nsGkAtoms::viewBox);
 }
 
-void nsSVGElement::DidChangeViewBox(const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangeViewBox(const nsAttrValue& aEmptyOrOldValue) {
   nsSVGViewBox* viewBox = GetViewBox();
 
   NS_ASSERTION(viewBox, "DidChangeViewBox on element with no viewBox attrib");
 
   nsAttrValue newValue;
   newValue.SetTo(*viewBox, nullptr);
 
   DidChangeValue(nsGkAtoms::viewBox, aEmptyOrOldValue, newValue);
 }
 
-void nsSVGElement::DidAnimateViewBox() {
+void SVGElement::DidAnimateViewBox() {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     frame->AttributeChanged(kNameSpaceID_None, nsGkAtoms::viewBox,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-SVGAnimatedPreserveAspectRatio* nsSVGElement::GetPreserveAspectRatio() {
+SVGAnimatedPreserveAspectRatio* SVGElement::GetPreserveAspectRatio() {
   return nullptr;
 }
 
-nsAttrValue nsSVGElement::WillChangePreserveAspectRatio() {
+nsAttrValue SVGElement::WillChangePreserveAspectRatio() {
   return WillChangeValue(nsGkAtoms::preserveAspectRatio);
 }
 
-void nsSVGElement::DidChangePreserveAspectRatio(
+void SVGElement::DidChangePreserveAspectRatio(
     const nsAttrValue& aEmptyOrOldValue) {
   SVGAnimatedPreserveAspectRatio* preserveAspectRatio =
       GetPreserveAspectRatio();
 
   NS_ASSERTION(preserveAspectRatio,
                "DidChangePreserveAspectRatio on element with no "
                "preserveAspectRatio attrib");
 
   nsAttrValue newValue;
   newValue.SetTo(*preserveAspectRatio, nullptr);
 
   DidChangeValue(nsGkAtoms::preserveAspectRatio, aEmptyOrOldValue, newValue);
 }
 
-void nsSVGElement::DidAnimatePreserveAspectRatio() {
+void SVGElement::DidAnimatePreserveAspectRatio() {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     frame->AttributeChanged(kNameSpaceID_None, nsGkAtoms::preserveAspectRatio,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsAttrValue nsSVGElement::WillChangeTransformList() {
+nsAttrValue SVGElement::WillChangeTransformList() {
   return WillChangeValue(GetTransformListAttrName());
 }
 
-void nsSVGElement::DidChangeTransformList(const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangeTransformList(const nsAttrValue& aEmptyOrOldValue) {
   MOZ_ASSERT(GetTransformListAttrName(),
              "Changing non-existent transform list?");
 
   // The transform attribute is being set, so we must ensure that the
   // SVGAnimatedTransformList is/has been allocated:
   nsAttrValue newValue;
   newValue.SetTo(GetAnimatedTransformList(DO_ALLOCATE)->GetBaseValue(),
                  nullptr);
 
   DidChangeValue(GetTransformListAttrName(), aEmptyOrOldValue, newValue);
 }
 
-void nsSVGElement::DidAnimateTransformList(int32_t aModType) {
+void SVGElement::DidAnimateTransformList(int32_t aModType) {
   MOZ_ASSERT(GetTransformListAttrName(),
              "Animating non-existent transform data?");
 
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     nsAtom* transformAttr = GetTransformListAttrName();
     frame->AttributeChanged(kNameSpaceID_None, transformAttr, aModType);
@@ -2014,81 +2013,81 @@ void nsSVGElement::DidAnimateTransformLi
     // anyway), so we need to post the change event ourself.
     nsChangeHint changeHint = GetAttributeChangeHint(transformAttr, aModType);
     if (changeHint) {
       nsLayoutUtils::PostRestyleEvent(this, nsRestyleHint(0), changeHint);
     }
   }
 }
 
-nsSVGElement::StringAttributesInfo nsSVGElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGElement::GetStringInfo() {
   return StringAttributesInfo(nullptr, nullptr, 0);
 }
 
-void nsSVGElement::StringAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::StringAttributesInfo::Reset(uint8_t aAttrEnum) {
   mStrings[aAttrEnum].Init(aAttrEnum);
 }
 
-void nsSVGElement::GetStringBaseValue(uint8_t aAttrEnum,
-                                      nsAString& aResult) const {
-  nsSVGElement::StringAttributesInfo info =
-      const_cast<nsSVGElement*>(this)->GetStringInfo();
+void SVGElement::GetStringBaseValue(uint8_t aAttrEnum,
+                                    nsAString& aResult) const {
+  SVGElement::StringAttributesInfo info =
+      const_cast<SVGElement*>(this)->GetStringInfo();
 
   NS_ASSERTION(info.mStringCount > 0,
                "GetBaseValue on element with no string attribs");
 
   NS_ASSERTION(aAttrEnum < info.mStringCount, "aAttrEnum out of range");
 
   GetAttr(info.mStringInfo[aAttrEnum].mNamespaceID,
           info.mStringInfo[aAttrEnum].mName, aResult);
 }
 
-void nsSVGElement::SetStringBaseValue(uint8_t aAttrEnum,
-                                      const nsAString& aValue) {
-  nsSVGElement::StringAttributesInfo info = GetStringInfo();
+void SVGElement::SetStringBaseValue(uint8_t aAttrEnum,
+                                    const nsAString& aValue) {
+  SVGElement::StringAttributesInfo info = GetStringInfo();
 
   NS_ASSERTION(info.mStringCount > 0,
                "SetBaseValue on element with no string attribs");
 
   NS_ASSERTION(aAttrEnum < info.mStringCount, "aAttrEnum out of range");
 
   SetAttr(info.mStringInfo[aAttrEnum].mNamespaceID,
           info.mStringInfo[aAttrEnum].mName, aValue, true);
 }
 
-void nsSVGElement::DidAnimateString(uint8_t aAttrEnum) {
+void SVGElement::DidAnimateString(uint8_t aAttrEnum) {
   nsIFrame* frame = GetPrimaryFrame();
 
   if (frame) {
     StringAttributesInfo info = GetStringInfo();
     frame->AttributeChanged(info.mStringInfo[aAttrEnum].mNamespaceID,
                             info.mStringInfo[aAttrEnum].mName,
                             MutationEvent_Binding::SMIL);
   }
 }
 
-nsSVGElement::StringListAttributesInfo nsSVGElement::GetStringListInfo() {
+SVGElement::StringListAttributesInfo SVGElement::GetStringListInfo() {
   return StringListAttributesInfo(nullptr, nullptr, 0);
 }
 
-nsAttrValue nsSVGElement::WillChangeStringList(
+nsAttrValue SVGElement::WillChangeStringList(
     bool aIsConditionalProcessingAttribute, uint8_t aAttrEnum) {
   nsStaticAtom* name;
   if (aIsConditionalProcessingAttribute) {
     nsCOMPtr<SVGTests> tests(do_QueryInterface(this));
     name = tests->GetAttrName(aAttrEnum);
   } else {
     name = GetStringListInfo().mStringListInfo[aAttrEnum].mName;
   }
   return WillChangeValue(name);
 }
 
-void nsSVGElement::DidChangeStringList(bool aIsConditionalProcessingAttribute,
-                                       uint8_t aAttrEnum,
-                                       const nsAttrValue& aEmptyOrOldValue) {
+void SVGElement::DidChangeStringList(bool aIsConditionalProcessingAttribute,
+                                     uint8_t aAttrEnum,
+                                     const nsAttrValue& aEmptyOrOldValue) {
   nsStaticAtom* name;
   nsAttrValue newValue;
   nsCOMPtr<SVGTests> tests;
 
   if (aIsConditionalProcessingAttribute) {
     tests = do_QueryObject(this);
     name = tests->GetAttrName(aAttrEnum);
     tests->GetAttrValue(aAttrEnum, newValue);
@@ -2105,32 +2104,32 @@ void nsSVGElement::DidChangeStringList(b
 
   DidChangeValue(name, aEmptyOrOldValue, newValue);
 
   if (aIsConditionalProcessingAttribute) {
     tests->MaybeInvalidate();
   }
 }
 
-void nsSVGElement::StringListAttributesInfo::Reset(uint8_t aAttrEnum) {
+void SVGElement::StringListAttributesInfo::Reset(uint8_t aAttrEnum) {
   mStringLists[aAttrEnum].Clear();
   // caller notifies
 }
 
-nsresult nsSVGElement::ReportAttributeParseFailure(nsIDocument* aDocument,
-                                                   nsAtom* aAttribute,
-                                                   const nsAString& aValue) {
+nsresult SVGElement::ReportAttributeParseFailure(nsIDocument* aDocument,
+                                                 nsAtom* aAttribute,
+                                                 const nsAString& aValue) {
   const nsString& attributeValue = PromiseFlatString(aValue);
   const char16_t* strings[] = {aAttribute->GetUTF16String(),
                                attributeValue.get()};
   return SVGContentUtils::ReportToConsole(aDocument, "AttributeParseWarning",
                                           strings, ArrayLength(strings));
 }
 
-void nsSVGElement::RecompileScriptEventListeners() {
+void SVGElement::RecompileScriptEventListeners() {
   int32_t i, count = mAttrs.AttrCount();
   for (i = 0; i < count; ++i) {
     const nsAttrName* name = mAttrs.AttrNameAt(i);
 
     // Eventlistenener-attributes are always in the null namespace
     if (!name->IsAtom()) {
       continue;
     }
@@ -2141,18 +2140,18 @@ void nsSVGElement::RecompileScriptEventL
     }
 
     nsAutoString value;
     GetAttr(attr, value);
     SetEventHandler(GetEventNameForAttr(attr), value, true);
   }
 }
 
-UniquePtr<nsISMILAttr> nsSVGElement::GetAnimatedAttr(int32_t aNamespaceID,
-                                                     nsAtom* aName) {
+UniquePtr<nsISMILAttr> SVGElement::GetAnimatedAttr(int32_t aNamespaceID,
+                                                   nsAtom* aName) {
   if (aNamespaceID == kNameSpaceID_None) {
     // Transforms:
     if (GetTransformListAttrName() == aName) {
       // The transform attribute is being animated, so we must ensure that the
       // SVGAnimatedTransformList is/has been allocated:
       return GetAnimatedTransformList(DO_ALLOCATE)->ToSMILAttr(this);
     }
 
@@ -2311,21 +2310,24 @@ UniquePtr<nsISMILAttr> nsSVGElement::Get
         return info.mStrings[i].ToSMILAttr(this);
       }
     }
   }
 
   return nullptr;
 }
 
-void nsSVGElement::AnimationNeedsResample() {
+void SVGElement::AnimationNeedsResample() {
   nsIDocument* doc = GetComposedDoc();
   if (doc && doc->HasAnimationController()) {
     doc->GetAnimationController()->SetResampleNeeded();
   }
 }
 
-void nsSVGElement::FlushAnimations() {
+void SVGElement::FlushAnimations() {
   nsIDocument* doc = GetComposedDoc();
   if (doc && doc->HasAnimationController()) {
     doc->GetAnimationController()->FlushResampleRequests();
   }
 }
+
+}  // namespace dom
+}  // namespace mozilla
rename from dom/svg/nsSVGElement.h
rename to dom/svg/SVGElement.h
--- a/dom/svg/nsSVGElement.h
+++ b/dom/svg/SVGElement.h
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __NS_SVGELEMENT_H__
 #define __NS_SVGELEMENT_H__
 
 /*
-  nsSVGElement is the base class for all SVG content elements.
+  SVGElement is the base class for all SVG content elements.
   It implements all the common DOM interfaces and handles attributes.
 */
 
 #include "mozilla/Attributes.h"
 #include "nsAutoPtr.h"
 #include "nsChangeHint.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
@@ -33,51 +33,50 @@ class nsSVGEnum;
 class nsSVGInteger;
 class nsSVGIntegerPair;
 class nsSVGLength2;
 class nsSVGNumber2;
 class nsSVGNumberPair;
 class nsSVGString;
 class nsSVGViewBox;
 
+struct nsSVGEnumMapping;
+
+nsresult NS_NewSVGElement(mozilla::dom::Element** aResult,
+                          already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
+
 namespace mozilla {
 class DeclarationBlock;
 
-namespace dom {
-class SVGSVGElement;
-class SVGViewportElement;
-
-}  // namespace dom
-
 class SVGAnimatedNumberList;
 class SVGNumberList;
 class SVGAnimatedLengthList;
 class SVGUserUnitList;
 class SVGAnimatedPointList;
 class SVGAnimatedPathSegList;
 class SVGAnimatedPreserveAspectRatio;
 class nsSVGAnimatedTransformList;
 class SVGStringList;
 class DOMSVGStringList;
 
-}  // namespace mozilla
-
-struct nsSVGEnumMapping;
+namespace dom {
+class SVGSVGElement;
+class SVGViewportElement;
 
-typedef nsStyledElement nsSVGElementBase;
+typedef nsStyledElement SVGElementBase;
 
-class nsSVGElement : public nsSVGElementBase  // nsIContent
+class SVGElement : public SVGElementBase  // nsIContent
 {
  protected:
-  explicit nsSVGElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
-  friend nsresult NS_NewSVGElement(
-      mozilla::dom::Element** aResult,
-      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
+  explicit SVGElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
+  friend nsresult(
+      ::NS_NewSVGElement(mozilla::dom::Element** aResult,
+                         already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   nsresult Init();
-  virtual ~nsSVGElement();
+  virtual ~SVGElement();
 
  public:
   virtual nsresult Clone(mozilla::dom::NodeInfo*,
                          nsINode** aResult) const MOZ_MUST_OVERRIDE override;
 
   typedef mozilla::SVGNumberList SVGNumberList;
   typedef mozilla::SVGAnimatedNumberList SVGAnimatedNumberList;
   typedef mozilla::SVGUserUnitList SVGUserUnitList;
@@ -85,17 +84,17 @@ class nsSVGElement : public nsSVGElement
   typedef mozilla::SVGAnimatedPointList SVGAnimatedPointList;
   typedef mozilla::SVGAnimatedPathSegList SVGAnimatedPathSegList;
   typedef mozilla::SVGAnimatedPreserveAspectRatio
       SVGAnimatedPreserveAspectRatio;
   typedef mozilla::nsSVGAnimatedTransformList nsSVGAnimatedTransformList;
   typedef mozilla::SVGStringList SVGStringList;
 
   // nsISupports
-  NS_INLINE_DECL_REFCOUNTING_INHERITED(nsSVGElement, nsSVGElementBase)
+  NS_INLINE_DECL_REFCOUNTING_INHERITED(SVGElement, SVGElementBase)
 
   void DidAnimateClass();
 
   // nsIContent interface methods
 
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent) override;
 
@@ -120,17 +119,17 @@ class nsSVGElement : public nsSVGElement
   static const MappedAttributeEntry sViewportsMap[];
   static const MappedAttributeEntry sMarkersMap[];
   static const MappedAttributeEntry sColorMap[];
   static const MappedAttributeEntry sFiltersMap[];
   static const MappedAttributeEntry sFEFloodMap[];
   static const MappedAttributeEntry sLightingEffectsMap[];
   static const MappedAttributeEntry sMaskMap[];
 
-  NS_IMPL_FROMNODE(nsSVGElement, kNameSpaceID_SVG)
+  NS_IMPL_FROMNODE(SVGElement, kNameSpaceID_SVG)
 
   // Gets the element that establishes the rectangular viewport against which
   // we should resolve percentage lengths (our "coordinate context"). Returns
   // nullptr for outer <svg> or SVG without an <svg> parent (invalid SVG).
   mozilla::dom::SVGViewportElement* GetCtx() const;
 
   /**
    * Returns aMatrix pre-multiplied by (explicit or implicit) transforms that
@@ -152,17 +151,17 @@ class nsSVGElement : public nsSVGElement
    * If aWhich is eChildToUserSpace, then only the transforms from the
    * coordinate space established by this element for its childre to this
    * elements userspace are included. This includes any offsets due to e.g.
    * 'x'/'y' attributes, and any transform due to a 'viewBox' attribute, but
    * does not include any transforms due to the 'transform' attribute.
    */
   virtual gfxMatrix PrependLocalTransformsTo(
       const gfxMatrix& aMatrix,
-      mozilla::SVGTransformTypes aWhich = mozilla::eAllTransforms) const;
+      SVGTransformTypes aWhich = eAllTransforms) const;
 
   // Setter for to set the current <animateMotion> transformation
   // Only visible for nsSVGGraphicElement, so it's a no-op here, and that
   // subclass has the useful implementation.
   virtual void SetAnimateMotionTransform(
       const mozilla::gfx::Matrix* aMatrix) { /*no-op*/
   }
   virtual const mozilla::gfx::Matrix* GetAnimateMotionTransform() const {
@@ -296,31 +295,31 @@ class nsSVGElement : public nsSVGElement
     return mClassAnimAttr;
   }
 
   virtual void ClearAnyCachedPath() {}
   virtual bool IsTransformable() { return false; }
 
   // WebIDL
   mozilla::dom::SVGSVGElement* GetOwnerSVGElement();
-  nsSVGElement* GetViewportElement();
+  SVGElement* GetViewportElement();
   already_AddRefed<mozilla::dom::SVGAnimatedString> ClassName();
 
   void UpdateContentDeclarationBlock();
   const mozilla::DeclarationBlock* GetContentDeclarationBlock() const;
 
  protected:
   virtual JSObject* WrapNode(JSContext* cx,
                              JS::Handle<JSObject*> aGivenProto) override;
 
   // We define BeforeSetAttr here and mark it final to ensure it is NOT used
   // by SVG elements.
   // This is because we're not currently passing the correct value for aValue to
   // BeforeSetAttr since it would involve allocating extra SVG value types.
-  // See the comment in nsSVGElement::WillChangeValue.
+  // See the comment in SVGElement::WillChangeValue.
   nsresult BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
                          const nsAttrValueOrString* aValue, bool aNotify) final;
   virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
                                 const nsAttrValue* aValue,
                                 const nsAttrValue* aOldValue,
                                 nsIPrincipal* aSubjectPrincipal,
                                 bool aNotify) override;
   virtual bool ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
@@ -474,17 +473,17 @@ class nsSVGElement : public nsSVGElement
                           uint32_t aBooleanCount)
         : mBooleans(aBooleans),
           mBooleanInfo(aBooleanInfo),
           mBooleanCount(aBooleanCount) {}
 
     void Reset(uint8_t aAttrEnum);
   };
 
-  friend class nsSVGEnum;
+  friend class ::nsSVGEnum;
 
   struct EnumInfo {
     nsStaticAtom* const mName;
     const nsSVGEnumMapping* const mMapping;
     const uint16_t mDefaultValue;
   };
 
   struct EnumAttributesInfo {
@@ -692,9 +691,12 @@ class nsSVGElement : public nsSVGElement
   NS_IMPL_CYCLE_COLLECTION_UNLINK_END                                  \
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(_val)                        \
     NS_IMPL_CYCLE_COLLECTION_TRAVERSE(_element)                        \
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END                                \
   NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(_val)                           \
     NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER                   \
   NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
+}  // namespace dom
+}  // namespace mozilla
+
 #endif  // __NS_SVGELEMENT_H__
--- a/dom/svg/SVGEllipseElement.cpp
+++ b/dom/svg/SVGEllipseElement.cpp
@@ -18,17 +18,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGEllipseElement::WrapNode(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
   return SVGEllipseElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGEllipseElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGEllipseElement::sLengthInfo[4] = {
     {nsGkAtoms::cx, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::cy, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
     {nsGkAtoms::rx, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::ry, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
@@ -61,26 +61,26 @@ already_AddRefed<SVGAnimatedLength> SVGE
   return mLengthAttributes[RX].ToDOMAnimatedLength(this);
 }
 
 already_AddRefed<SVGAnimatedLength> SVGEllipseElement::Ry() {
   return mLengthAttributes[RY].ToDOMAnimatedLength(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ bool SVGEllipseElement::HasValidDimensions() const {
   return mLengthAttributes[RX].IsExplicitlySet() &&
          mLengthAttributes[RX].GetAnimValInSpecifiedUnits() > 0 &&
          mLengthAttributes[RY].IsExplicitlySet() &&
          mLengthAttributes[RY].GetAnimValInSpecifiedUnits() > 0;
 }
 
-nsSVGElement::LengthAttributesInfo SVGEllipseElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGEllipseElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
 // SVGGeometryElement methods
 
 bool SVGEllipseElement::GetGeometryBounds(
--- a/dom/svg/SVGFEBlendElement.cpp
+++ b/dom/svg/SVGFEBlendElement.cpp
@@ -34,20 +34,20 @@ nsSVGEnumMapping SVGFEBlendElement::sMod
     {nsGkAtoms::difference, SVG_FEBLEND_MODE_DIFFERENCE},
     {nsGkAtoms::exclusion, SVG_FEBLEND_MODE_EXCLUSION},
     {nsGkAtoms::hue, SVG_FEBLEND_MODE_HUE},
     {nsGkAtoms::saturation, SVG_FEBLEND_MODE_SATURATION},
     {nsGkAtoms::color, SVG_FEBLEND_MODE_COLOR},
     {nsGkAtoms::luminosity, SVG_FEBLEND_MODE_LUMINOSITY},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGFEBlendElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGFEBlendElement::sEnumInfo[1] = {
     {nsGkAtoms::mode, sModeMap, SVG_FEBLEND_MODE_NORMAL}};
 
-nsSVGElement::StringInfo SVGFEBlendElement::sStringInfo[3] = {
+SVGElement::StringInfo SVGFEBlendElement::sStringInfo[3] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true},
     {nsGkAtoms::in2, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEBlendElement)
@@ -88,21 +88,21 @@ bool SVGFEBlendElement::AttributeAffects
 
 void SVGFEBlendElement::GetSourceImageNames(
     nsTArray<nsSVGStringInfo>& aSources) {
   aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN1], this));
   aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN2], this));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::EnumAttributesInfo SVGFEBlendElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGFEBlendElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFEBlendElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEBlendElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEColorMatrixElement.cpp
+++ b/dom/svg/SVGFEColorMatrixElement.cpp
@@ -25,24 +25,24 @@ JSObject* SVGFEColorMatrixElement::WrapN
 
 nsSVGEnumMapping SVGFEColorMatrixElement::sTypeMap[] = {
     {nsGkAtoms::matrix, SVG_FECOLORMATRIX_TYPE_MATRIX},
     {nsGkAtoms::saturate, SVG_FECOLORMATRIX_TYPE_SATURATE},
     {nsGkAtoms::hueRotate, SVG_FECOLORMATRIX_TYPE_HUE_ROTATE},
     {nsGkAtoms::luminanceToAlpha, SVG_FECOLORMATRIX_TYPE_LUMINANCE_TO_ALPHA},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGFEColorMatrixElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGFEColorMatrixElement::sEnumInfo[1] = {
     {nsGkAtoms::type, sTypeMap, SVG_FECOLORMATRIX_TYPE_MATRIX}};
 
-nsSVGElement::StringInfo SVGFEColorMatrixElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGFEColorMatrixElement::sStringInfo[2] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true}};
 
-nsSVGElement::NumberListInfo SVGFEColorMatrixElement::sNumberListInfo[1] = {
+SVGElement::NumberListInfo SVGFEColorMatrixElement::sNumberListInfo[1] = {
     {nsGkAtoms::values}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEColorMatrixElement)
 
 //----------------------------------------------------------------------
@@ -102,27 +102,27 @@ bool SVGFEColorMatrixElement::AttributeA
   return SVGFEColorMatrixElementBase::AttributeAffectsRendering(aNameSpaceID,
                                                                 aAttribute) ||
          (aNameSpaceID == kNameSpaceID_None &&
           (aAttribute == nsGkAtoms::in || aAttribute == nsGkAtoms::type ||
            aAttribute == nsGkAtoms::values));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::EnumAttributesInfo SVGFEColorMatrixElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGFEColorMatrixElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFEColorMatrixElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEColorMatrixElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
-nsSVGElement::NumberListAttributesInfo
+SVGElement::NumberListAttributesInfo
 SVGFEColorMatrixElement::GetNumberListInfo() {
   return NumberListAttributesInfo(mNumberListAttributes, sNumberListInfo,
                                   ArrayLength(sNumberListInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEComponentTransferElement.cpp
+++ b/dom/svg/SVGFEComponentTransferElement.cpp
@@ -18,33 +18,33 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEComponentTransferElement::WrapNode(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SVGFEComponentTransferElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringInfo SVGFEComponentTransferElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGFEComponentTransferElement::sStringInfo[2] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEComponentTransferElement)
 
 already_AddRefed<SVGAnimatedString> SVGFEComponentTransferElement::In1() {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::StringAttributesInfo
+SVGElement::StringAttributesInfo
 SVGFEComponentTransferElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 //--------------------------------------------
 
 FilterPrimitiveDescription
--- a/dom/svg/SVGFECompositeElement.cpp
+++ b/dom/svg/SVGFECompositeElement.cpp
@@ -14,35 +14,35 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFECompositeElement::WrapNode(JSContext* aCx,
                                           JS::Handle<JSObject*> aGivenProto) {
   return SVGFECompositeElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGFECompositeElement::sNumberInfo[4] = {
+SVGElement::NumberInfo SVGFECompositeElement::sNumberInfo[4] = {
     {nsGkAtoms::k1, 0, false},
     {nsGkAtoms::k2, 0, false},
     {nsGkAtoms::k3, 0, false},
     {nsGkAtoms::k4, 0, false}};
 
 nsSVGEnumMapping SVGFECompositeElement::sOperatorMap[] = {
     {nsGkAtoms::over, SVG_FECOMPOSITE_OPERATOR_OVER},
     {nsGkAtoms::in, SVG_FECOMPOSITE_OPERATOR_IN},
     {nsGkAtoms::out, SVG_FECOMPOSITE_OPERATOR_OUT},
     {nsGkAtoms::atop, SVG_FECOMPOSITE_OPERATOR_ATOP},
     {nsGkAtoms::xor_, SVG_FECOMPOSITE_OPERATOR_XOR},
     {nsGkAtoms::arithmetic, SVG_FECOMPOSITE_OPERATOR_ARITHMETIC},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGFECompositeElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGFECompositeElement::sEnumInfo[1] = {
     {nsGkAtoms::_operator, sOperatorMap, SVG_FECOMPOSITE_OPERATOR_OVER}};
 
-nsSVGElement::StringInfo SVGFECompositeElement::sStringInfo[3] = {
+SVGElement::StringInfo SVGFECompositeElement::sStringInfo[3] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true},
     {nsGkAtoms::in2, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFECompositeElement)
@@ -112,26 +112,26 @@ bool SVGFECompositeElement::AttributeAff
 
 void SVGFECompositeElement::GetSourceImageNames(
     nsTArray<nsSVGStringInfo>& aSources) {
   aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN1], this));
   aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN2], this));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberAttributesInfo SVGFECompositeElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGFECompositeElement::GetNumberInfo() {
   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
                               ArrayLength(sNumberInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGFECompositeElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGFECompositeElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFECompositeElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFECompositeElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEConvolveMatrixElement.cpp
+++ b/dom/svg/SVGFEConvolveMatrixElement.cpp
@@ -19,45 +19,45 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEConvolveMatrixElement::WrapNode(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SVGFEConvolveMatrixElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGFEConvolveMatrixElement::sNumberInfo[2] = {
+SVGElement::NumberInfo SVGFEConvolveMatrixElement::sNumberInfo[2] = {
     {nsGkAtoms::divisor, 1, false}, {nsGkAtoms::bias, 0, false}};
 
-nsSVGElement::NumberPairInfo SVGFEConvolveMatrixElement::sNumberPairInfo[1] = {
+SVGElement::NumberPairInfo SVGFEConvolveMatrixElement::sNumberPairInfo[1] = {
     {nsGkAtoms::kernelUnitLength, 0, 0}};
 
-nsSVGElement::IntegerInfo SVGFEConvolveMatrixElement::sIntegerInfo[2] = {
+SVGElement::IntegerInfo SVGFEConvolveMatrixElement::sIntegerInfo[2] = {
     {nsGkAtoms::targetX, 0}, {nsGkAtoms::targetY, 0}};
 
-nsSVGElement::IntegerPairInfo SVGFEConvolveMatrixElement::sIntegerPairInfo[1] =
-    {{nsGkAtoms::order, 3, 3}};
+SVGElement::IntegerPairInfo SVGFEConvolveMatrixElement::sIntegerPairInfo[1] = {
+    {nsGkAtoms::order, 3, 3}};
 
-nsSVGElement::BooleanInfo SVGFEConvolveMatrixElement::sBooleanInfo[1] = {
+SVGElement::BooleanInfo SVGFEConvolveMatrixElement::sBooleanInfo[1] = {
     {nsGkAtoms::preserveAlpha, false}};
 
 nsSVGEnumMapping SVGFEConvolveMatrixElement::sEdgeModeMap[] = {
     {nsGkAtoms::duplicate, SVG_EDGEMODE_DUPLICATE},
     {nsGkAtoms::wrap, SVG_EDGEMODE_WRAP},
     {nsGkAtoms::none, SVG_EDGEMODE_NONE},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGFEConvolveMatrixElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGFEConvolveMatrixElement::sEnumInfo[1] = {
     {nsGkAtoms::edgeMode, sEdgeModeMap, SVG_EDGEMODE_DUPLICATE}};
 
-nsSVGElement::StringInfo SVGFEConvolveMatrixElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGFEConvolveMatrixElement::sStringInfo[2] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true}};
 
-nsSVGElement::NumberListInfo SVGFEConvolveMatrixElement::sNumberListInfo[1] = {
+SVGElement::NumberListInfo SVGFEConvolveMatrixElement::sNumberListInfo[1] = {
     {nsGkAtoms::kernelMatrix}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEConvolveMatrixElement)
 
 //----------------------------------------------------------------------
@@ -216,56 +216,54 @@ bool SVGFEConvolveMatrixElement::Attribu
            aAttribute == nsGkAtoms::targetX ||
            aAttribute == nsGkAtoms::targetY || aAttribute == nsGkAtoms::order ||
            aAttribute == nsGkAtoms::preserveAlpha ||
            aAttribute == nsGkAtoms::edgeMode ||
            aAttribute == nsGkAtoms::kernelMatrix));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberAttributesInfo SVGFEConvolveMatrixElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGFEConvolveMatrixElement::GetNumberInfo() {
   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
                               ArrayLength(sNumberInfo));
 }
 
-nsSVGElement::NumberPairAttributesInfo
+SVGElement::NumberPairAttributesInfo
 SVGFEConvolveMatrixElement::GetNumberPairInfo() {
   return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
                                   ArrayLength(sNumberPairInfo));
 }
 
-nsSVGElement::IntegerAttributesInfo
-SVGFEConvolveMatrixElement::GetIntegerInfo() {
+SVGElement::IntegerAttributesInfo SVGFEConvolveMatrixElement::GetIntegerInfo() {
   return IntegerAttributesInfo(mIntegerAttributes, sIntegerInfo,
                                ArrayLength(sIntegerInfo));
 }
 
-nsSVGElement::IntegerPairAttributesInfo
+SVGElement::IntegerPairAttributesInfo
 SVGFEConvolveMatrixElement::GetIntegerPairInfo() {
   return IntegerPairAttributesInfo(mIntegerPairAttributes, sIntegerPairInfo,
                                    ArrayLength(sIntegerPairInfo));
 }
 
-nsSVGElement::BooleanAttributesInfo
-SVGFEConvolveMatrixElement::GetBooleanInfo() {
+SVGElement::BooleanAttributesInfo SVGFEConvolveMatrixElement::GetBooleanInfo() {
   return BooleanAttributesInfo(mBooleanAttributes, sBooleanInfo,
                                ArrayLength(sBooleanInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGFEConvolveMatrixElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGFEConvolveMatrixElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFEConvolveMatrixElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEConvolveMatrixElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
-nsSVGElement::NumberListAttributesInfo
+SVGElement::NumberListAttributesInfo
 SVGFEConvolveMatrixElement::GetNumberListInfo() {
   return NumberListAttributesInfo(mNumberListAttributes, sNumberListInfo,
                                   ArrayLength(sNumberListInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEDisplacementMapElement.cpp
+++ b/dom/svg/SVGFEDisplacementMapElement.cpp
@@ -16,32 +16,32 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEDisplacementMapElement::WrapNode(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SVGFEDisplacementMapElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGFEDisplacementMapElement::sNumberInfo[1] = {
+SVGElement::NumberInfo SVGFEDisplacementMapElement::sNumberInfo[1] = {
     {nsGkAtoms::scale, 0, false},
 };
 
 nsSVGEnumMapping SVGFEDisplacementMapElement::sChannelMap[] = {
     {nsGkAtoms::R, SVG_CHANNEL_R},
     {nsGkAtoms::G, SVG_CHANNEL_G},
     {nsGkAtoms::B, SVG_CHANNEL_B},
     {nsGkAtoms::A, SVG_CHANNEL_A},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGFEDisplacementMapElement::sEnumInfo[2] = {
+SVGElement::EnumInfo SVGFEDisplacementMapElement::sEnumInfo[2] = {
     {nsGkAtoms::xChannelSelector, sChannelMap, SVG_CHANNEL_A},
     {nsGkAtoms::yChannelSelector, sChannelMap, SVG_CHANNEL_A}};
 
-nsSVGElement::StringInfo SVGFEDisplacementMapElement::sStringInfo[3] = {
+SVGElement::StringInfo SVGFEDisplacementMapElement::sStringInfo[3] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true},
     {nsGkAtoms::in2, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDisplacementMapElement)
@@ -106,28 +106,26 @@ bool SVGFEDisplacementMapElement::Attrib
 
 void SVGFEDisplacementMapElement::GetSourceImageNames(
     nsTArray<nsSVGStringInfo>& aSources) {
   aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN1], this));
   aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN2], this));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberAttributesInfo
-SVGFEDisplacementMapElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGFEDisplacementMapElement::GetNumberInfo() {
   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
                               ArrayLength(sNumberInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGFEDisplacementMapElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGFEDisplacementMapElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo
-SVGFEDisplacementMapElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEDisplacementMapElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEDistantLightElement.cpp
+++ b/dom/svg/SVGFEDistantLightElement.cpp
@@ -15,17 +15,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEDistantLightElement::WrapNode(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SVGFEDistantLightElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGFEDistantLightElement::sNumberInfo[2] = {
+SVGElement::NumberInfo SVGFEDistantLightElement::sNumberInfo[2] = {
     {nsGkAtoms::azimuth, 0, false}, {nsGkAtoms::elevation, 0, false}};
 
 //----------------------------------------------------------------------
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDistantLightElement)
 
@@ -53,17 +53,17 @@ already_AddRefed<SVGAnimatedNumber> SVGF
   return mNumberAttributes[AZIMUTH].ToDOMAnimatedNumber(this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFEDistantLightElement::Elevation() {
   return mNumberAttributes[ELEVATION].ToDOMAnimatedNumber(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberAttributesInfo SVGFEDistantLightElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGFEDistantLightElement::GetNumberInfo() {
   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
                               ArrayLength(sNumberInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEDropShadowElement.cpp
+++ b/dom/svg/SVGFEDropShadowElement.cpp
@@ -16,23 +16,23 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEDropShadowElement::WrapNode(JSContext* aCx,
                                            JS::Handle<JSObject*> aGivenProto) {
   return SVGFEDropShadowElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGFEDropShadowElement::sNumberInfo[2] = {
+SVGElement::NumberInfo SVGFEDropShadowElement::sNumberInfo[2] = {
     {nsGkAtoms::dx, 2, false}, {nsGkAtoms::dy, 2, false}};
 
-nsSVGElement::NumberPairInfo SVGFEDropShadowElement::sNumberPairInfo[1] = {
+SVGElement::NumberPairInfo SVGFEDropShadowElement::sNumberPairInfo[1] = {
     {nsGkAtoms::stdDeviation, 2, 2}};
 
-nsSVGElement::StringInfo SVGFEDropShadowElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGFEDropShadowElement::sStringInfo[2] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDropShadowElement)
 
@@ -123,28 +123,28 @@ NS_IMETHODIMP_(bool)
 SVGFEDropShadowElement::IsAttributeMapped(const nsAtom* name) const {
   static const MappedAttributeEntry* const map[] = {sFEFloodMap};
 
   return FindAttributeDependence(name, map) ||
          SVGFEDropShadowElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberAttributesInfo SVGFEDropShadowElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGFEDropShadowElement::GetNumberInfo() {
   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
                               ArrayLength(sNumberInfo));
 }
 
-nsSVGElement::NumberPairAttributesInfo
+SVGElement::NumberPairAttributesInfo
 SVGFEDropShadowElement::GetNumberPairInfo() {
   return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
                                   ArrayLength(sNumberPairInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFEDropShadowElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEDropShadowElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEFloodElement.cpp
+++ b/dom/svg/SVGFEFloodElement.cpp
@@ -18,17 +18,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEFloodElement::WrapNode(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
   return SVGFEFloodElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringInfo SVGFEFloodElement::sStringInfo[1] = {
+SVGElement::StringInfo SVGFEFloodElement::sStringInfo[1] = {
     {nsGkAtoms::result, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEFloodElement)
 
 FilterPrimitiveDescription SVGFEFloodElement::GetPrimitiveDescription(
@@ -55,17 +55,17 @@ NS_IMETHODIMP_(bool)
 SVGFEFloodElement::IsAttributeMapped(const nsAtom* name) const {
   static const MappedAttributeEntry* const map[] = {sColorMap, sFEFloodMap};
 
   return FindAttributeDependence(name, map) ||
          SVGFEFloodElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::StringAttributesInfo SVGFEFloodElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEFloodElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEGaussianBlurElement.cpp
+++ b/dom/svg/SVGFEGaussianBlurElement.cpp
@@ -16,20 +16,20 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEGaussianBlurElement::WrapNode(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SVGFEGaussianBlurElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberPairInfo SVGFEGaussianBlurElement::sNumberPairInfo[1] = {
+SVGElement::NumberPairInfo SVGFEGaussianBlurElement::sNumberPairInfo[1] = {
     {nsGkAtoms::stdDeviation, 0, 0}};
 
-nsSVGElement::StringInfo SVGFEGaussianBlurElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGFEGaussianBlurElement::sStringInfo[2] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEGaussianBlurElement)
 
@@ -84,23 +84,23 @@ bool SVGFEGaussianBlurElement::Attribute
 }
 
 void SVGFEGaussianBlurElement::GetSourceImageNames(
     nsTArray<nsSVGStringInfo>& aSources) {
   aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN1], this));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberPairAttributesInfo
+SVGElement::NumberPairAttributesInfo
 SVGFEGaussianBlurElement::GetNumberPairInfo() {
   return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
                                   ArrayLength(sNumberPairInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFEGaussianBlurElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEGaussianBlurElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEImageElement.cpp
+++ b/dom/svg/SVGFEImageElement.cpp
@@ -27,17 +27,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEImageElement::WrapNode(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
   return SVGFEImageElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringInfo SVGFEImageElement::sStringInfo[3] = {
+SVGElement::StringInfo SVGFEImageElement::sStringInfo[3] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::href, kNameSpaceID_None, true},
     {nsGkAtoms::href, kNameSpaceID_XLink, true}};
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
 NS_IMPL_ISUPPORTS_INHERITED(SVGFEImageElement, SVGFEImageElementBase,
@@ -277,28 +277,28 @@ bool SVGFEImageElement::OutputIsTainted(
     // The page is allowed to read from the image.
     return false;
   }
 
   return true;
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
 SVGFEImageElement::PreserveAspectRatio() {
   return mPreserveAspectRatio.ToDOMAnimatedPreserveAspectRatio(this);
 }
 
 SVGAnimatedPreserveAspectRatio* SVGFEImageElement::GetPreserveAspectRatio() {
   return &mPreserveAspectRatio;
 }
 
-nsSVGElement::StringAttributesInfo SVGFEImageElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEImageElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 //----------------------------------------------------------------------
 // nsIImageLoadingContent methods
 NS_IMETHODIMP_(void)
 SVGFEImageElement::FrameCreated(nsIFrame* aFrame) {
--- a/dom/svg/SVGFEMergeElement.cpp
+++ b/dom/svg/SVGFEMergeElement.cpp
@@ -15,17 +15,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEMergeElement::WrapNode(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
   return SVGFEMergeElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringInfo SVGFEMergeElement::sStringInfo[1] = {
+SVGElement::StringInfo SVGFEMergeElement::sStringInfo[1] = {
     {nsGkAtoms::result, kNameSpaceID_None, true}};
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEMergeElement)
 
 FilterPrimitiveDescription SVGFEMergeElement::GetPrimitiveDescription(
     nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     const nsTArray<bool>& aInputsAreTainted,
     nsTArray<RefPtr<SourceSurface>>& aInputImages) {
@@ -39,17 +39,17 @@ void SVGFEMergeElement::GetSourceImageNa
     if (child->IsSVGElement(nsGkAtoms::feMergeNode)) {
       SVGFEMergeNodeElement* node = static_cast<SVGFEMergeNodeElement*>(child);
       aSources.AppendElement(nsSVGStringInfo(node->GetIn1(), node));
     }
   }
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::StringAttributesInfo SVGFEMergeElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEMergeElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEMergeNodeElement.cpp
+++ b/dom/svg/SVGFEMergeNodeElement.cpp
@@ -12,17 +12,17 @@ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FE
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEMergeNodeElement::WrapNode(JSContext* aCx,
                                           JS::Handle<JSObject*> aGivenProto) {
   return SVGFEMergeNodeElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringInfo SVGFEMergeNodeElement::sStringInfo[1] = {
+SVGElement::StringInfo SVGFEMergeNodeElement::sStringInfo[1] = {
     {nsGkAtoms::in, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEMergeNodeElement)
 
 //----------------------------------------------------------------------
@@ -33,17 +33,17 @@ bool SVGFEMergeNodeElement::AttributeAff
   return aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::in;
 }
 
 already_AddRefed<SVGAnimatedString> SVGFEMergeNodeElement::In1() {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::StringAttributesInfo SVGFEMergeNodeElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEMergeNodeElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEMorphologyElement.cpp
+++ b/dom/svg/SVGFEMorphologyElement.cpp
@@ -15,28 +15,28 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEMorphologyElement::WrapNode(JSContext* aCx,
                                            JS::Handle<JSObject*> aGivenProto) {
   return SVGFEMorphologyElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberPairInfo SVGFEMorphologyElement::sNumberPairInfo[1] = {
+SVGElement::NumberPairInfo SVGFEMorphologyElement::sNumberPairInfo[1] = {
     {nsGkAtoms::radius, 0, 0}};
 
 nsSVGEnumMapping SVGFEMorphologyElement::sOperatorMap[] = {
     {nsGkAtoms::erode, SVG_OPERATOR_ERODE},
     {nsGkAtoms::dilate, SVG_OPERATOR_DILATE},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGFEMorphologyElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGFEMorphologyElement::sEnumInfo[1] = {
     {nsGkAtoms::_operator, sOperatorMap, SVG_OPERATOR_ERODE}};
 
-nsSVGElement::StringInfo SVGFEMorphologyElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGFEMorphologyElement::sStringInfo[2] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEMorphologyElement)
 
@@ -105,27 +105,27 @@ bool SVGFEMorphologyElement::AttributeAf
   return SVGFEMorphologyElementBase::AttributeAffectsRendering(aNameSpaceID,
                                                                aAttribute) ||
          (aNameSpaceID == kNameSpaceID_None &&
           (aAttribute == nsGkAtoms::in || aAttribute == nsGkAtoms::radius ||
            aAttribute == nsGkAtoms::_operator));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberPairAttributesInfo
+SVGElement::NumberPairAttributesInfo
 SVGFEMorphologyElement::GetNumberPairInfo() {
   return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
                                   ArrayLength(sNumberPairInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGFEMorphologyElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGFEMorphologyElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFEMorphologyElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEMorphologyElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEOffsetElement.cpp
+++ b/dom/svg/SVGFEOffsetElement.cpp
@@ -15,20 +15,20 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEOffsetElement::WrapNode(JSContext* aCx,
                                        JS::Handle<JSObject*> aGivenProto) {
   return SVGFEOffsetElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGFEOffsetElement::sNumberInfo[2] = {
+SVGElement::NumberInfo SVGFEOffsetElement::sNumberInfo[2] = {
     {nsGkAtoms::dx, 0, false}, {nsGkAtoms::dy, 0, false}};
 
-nsSVGElement::StringInfo SVGFEOffsetElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGFEOffsetElement::sStringInfo[2] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEOffsetElement)
 
@@ -69,22 +69,22 @@ bool SVGFEOffsetElement::AttributeAffect
 }
 
 void SVGFEOffsetElement::GetSourceImageNames(
     nsTArray<nsSVGStringInfo>& aSources) {
   aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN1], this));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberAttributesInfo SVGFEOffsetElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGFEOffsetElement::GetNumberInfo() {
   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
                               ArrayLength(sNumberInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFEOffsetElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFEOffsetElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFEPointLightElement.cpp
+++ b/dom/svg/SVGFEPointLightElement.cpp
@@ -15,17 +15,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEPointLightElement::WrapNode(JSContext* aCx,
                                            JS::Handle<JSObject*> aGivenProto) {
   return SVGFEPointLightElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGFEPointLightElement::sNumberInfo[3] = {
+SVGElement::NumberInfo SVGFEPointLightElement::sNumberInfo[3] = {
     {nsGkAtoms::x, 0, false},
     {nsGkAtoms::y, 0, false},
     {nsGkAtoms::z, 0, false}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEPointLightElement)
@@ -62,17 +62,17 @@ already_AddRefed<SVGAnimatedNumber> SVGF
   return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFEPointLightElement::Z() {
   return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberAttributesInfo SVGFEPointLightElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGFEPointLightElement::GetNumberInfo() {
   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
                               ArrayLength(sNumberInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFESpecularLightingElement.cpp
+++ b/dom/svg/SVGFESpecularLightingElement.cpp
@@ -53,17 +53,17 @@ SVGFESpecularLightingElement::KernelUnit
 
 already_AddRefed<SVGAnimatedNumber>
 SVGFESpecularLightingElement::KernelUnitLengthY() {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
       nsSVGNumberPair::eSecond, this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 FilterPrimitiveDescription
 SVGFESpecularLightingElement::GetPrimitiveDescription(
     nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     const nsTArray<bool>& aInputsAreTainted,
     nsTArray<RefPtr<SourceSurface>>& aInputImages) {
   float specularExponent = mNumberAttributes[SPECULAR_EXPONENT].GetAnimValue();
   float specularConstant = mNumberAttributes[SPECULAR_CONSTANT].GetAnimValue();
--- a/dom/svg/SVGFESpotLightElement.cpp
+++ b/dom/svg/SVGFESpotLightElement.cpp
@@ -15,17 +15,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFESpotLightElement::WrapNode(JSContext* aCx,
                                           JS::Handle<JSObject*> aGivenProto) {
   return SVGFESpotLightElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGFESpotLightElement::sNumberInfo[8] = {
+SVGElement::NumberInfo SVGFESpotLightElement::sNumberInfo[8] = {
     {nsGkAtoms::x, 0, false},
     {nsGkAtoms::y, 0, false},
     {nsGkAtoms::z, 0, false},
     {nsGkAtoms::pointsAtX, 0, false},
     {nsGkAtoms::pointsAtY, 0, false},
     {nsGkAtoms::pointsAtZ, 0, false},
     {nsGkAtoms::specularExponent, 1, false},
     {nsGkAtoms::limitingConeAngle, 0, false}};
@@ -99,17 +99,17 @@ already_AddRefed<SVGAnimatedNumber> SVGF
   return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this);
 }
 
 already_AddRefed<SVGAnimatedNumber> SVGFESpotLightElement::LimitingConeAngle() {
   return mNumberAttributes[LIMITING_CONE_ANGLE].ToDOMAnimatedNumber(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberAttributesInfo SVGFESpotLightElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGFESpotLightElement::GetNumberInfo() {
   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
                               ArrayLength(sNumberInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFETileElement.cpp
+++ b/dom/svg/SVGFETileElement.cpp
@@ -15,17 +15,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFETileElement::WrapNode(JSContext* aCx,
                                      JS::Handle<JSObject*> aGivenProto) {
   return SVGFETileElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringInfo SVGFETileElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGFETileElement::sStringInfo[2] = {
     {nsGkAtoms::result, kNameSpaceID_None, true},
     {nsGkAtoms::in, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFETileElement)
 
@@ -34,34 +34,34 @@ already_AddRefed<SVGAnimatedString> SVGF
 }
 
 void SVGFETileElement::GetSourceImageNames(
     nsTArray<nsSVGStringInfo>& aSources) {
   aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN1], this));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 FilterPrimitiveDescription SVGFETileElement::GetPrimitiveDescription(
     nsSVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     const nsTArray<bool>& aInputsAreTainted,
     nsTArray<RefPtr<SourceSurface>>& aInputImages) {
   return FilterPrimitiveDescription(AsVariant(TileAttributes()));
 }
 
 bool SVGFETileElement::AttributeAffectsRendering(int32_t aNameSpaceID,
                                                  nsAtom* aAttribute) const {
   return SVGFETileElementBase::AttributeAffectsRendering(aNameSpaceID,
                                                          aAttribute) ||
          (aNameSpaceID == kNameSpaceID_None && aAttribute == nsGkAtoms::in);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::StringAttributesInfo SVGFETileElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFETileElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFETurbulenceElement.cpp
+++ b/dom/svg/SVGFETurbulenceElement.cpp
@@ -22,40 +22,40 @@ static const unsigned short SVG_STITCHTY
 
 static const int32_t MAX_OCTAVES = 10;
 
 JSObject* SVGFETurbulenceElement::WrapNode(JSContext* aCx,
                                            JS::Handle<JSObject*> aGivenProto) {
   return SVGFETurbulenceElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGFETurbulenceElement::sNumberInfo[1] = {
+SVGElement::NumberInfo SVGFETurbulenceElement::sNumberInfo[1] = {
     {nsGkAtoms::seed, 0, false}};
 
-nsSVGElement::NumberPairInfo SVGFETurbulenceElement::sNumberPairInfo[1] = {
+SVGElement::NumberPairInfo SVGFETurbulenceElement::sNumberPairInfo[1] = {
     {nsGkAtoms::baseFrequency, 0, 0}};
 
-nsSVGElement::IntegerInfo SVGFETurbulenceElement::sIntegerInfo[1] = {
+SVGElement::IntegerInfo SVGFETurbulenceElement::sIntegerInfo[1] = {
     {nsGkAtoms::numOctaves, 1}};
 
 nsSVGEnumMapping SVGFETurbulenceElement::sTypeMap[] = {
     {nsGkAtoms::fractalNoise, SVG_TURBULENCE_TYPE_FRACTALNOISE},
     {nsGkAtoms::turbulence, SVG_TURBULENCE_TYPE_TURBULENCE},
     {nullptr, 0}};
 
 nsSVGEnumMapping SVGFETurbulenceElement::sStitchTilesMap[] = {
     {nsGkAtoms::stitch, SVG_STITCHTYPE_STITCH},
     {nsGkAtoms::noStitch, SVG_STITCHTYPE_NOSTITCH},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGFETurbulenceElement::sEnumInfo[2] = {
+SVGElement::EnumInfo SVGFETurbulenceElement::sEnumInfo[2] = {
     {nsGkAtoms::type, sTypeMap, SVG_TURBULENCE_TYPE_TURBULENCE},
     {nsGkAtoms::stitchTiles, sStitchTilesMap, SVG_STITCHTYPE_NOSTITCH}};
 
-nsSVGElement::StringInfo SVGFETurbulenceElement::sStringInfo[1] = {
+SVGElement::StringInfo SVGFETurbulenceElement::sStringInfo[1] = {
     {nsGkAtoms::result, kNameSpaceID_None, true}};
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFETurbulenceElement)
 
 //----------------------------------------------------------------------
@@ -147,37 +147,37 @@ bool SVGFETurbulenceElement::AttributeAf
           (aAttribute == nsGkAtoms::seed ||
            aAttribute == nsGkAtoms::baseFrequency ||
            aAttribute == nsGkAtoms::numOctaves ||
            aAttribute == nsGkAtoms::type ||
            aAttribute == nsGkAtoms::stitchTiles));
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::NumberAttributesInfo SVGFETurbulenceElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGFETurbulenceElement::GetNumberInfo() {
   return NumberAttributesInfo(mNumberAttributes, sNumberInfo,
                               ArrayLength(sNumberInfo));
 }
 
-nsSVGElement::NumberPairAttributesInfo
+SVGElement::NumberPairAttributesInfo
 SVGFETurbulenceElement::GetNumberPairInfo() {
   return NumberPairAttributesInfo(mNumberPairAttributes, sNumberPairInfo,
                                   ArrayLength(sNumberPairInfo));
 }
 
-nsSVGElement::IntegerAttributesInfo SVGFETurbulenceElement::GetIntegerInfo() {
+SVGElement::IntegerAttributesInfo SVGFETurbulenceElement::GetIntegerInfo() {
   return IntegerAttributesInfo(mIntegerAttributes, sIntegerInfo,
                                ArrayLength(sIntegerInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGFETurbulenceElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGFETurbulenceElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFETurbulenceElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFETurbulenceElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFilterElement.cpp
+++ b/dom/svg/SVGFilterElement.cpp
@@ -23,33 +23,33 @@ namespace dom {
 
 using namespace SVGUnitTypes_Binding;
 
 JSObject* SVGFilterElement::WrapNode(JSContext* aCx,
                                      JS::Handle<JSObject*> aGivenProto) {
   return SVGFilterElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGFilterElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGFilterElement::sLengthInfo[4] = {
     {nsGkAtoms::x, -10, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::y, -10, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
     {nsGkAtoms::width, 120, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::height, 120, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
 };
 
-nsSVGElement::EnumInfo SVGFilterElement::sEnumInfo[2] = {
+SVGElement::EnumInfo SVGFilterElement::sEnumInfo[2] = {
     {nsGkAtoms::filterUnits, sSVGUnitTypesMap, SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
     {nsGkAtoms::primitiveUnits, sSVGUnitTypesMap,
      SVG_UNIT_TYPE_USERSPACEONUSE}};
 
-nsSVGElement::StringInfo SVGFilterElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGFilterElement::sStringInfo[2] = {
     {nsGkAtoms::href, kNameSpaceID_None, true},
     {nsGkAtoms::href, kNameSpaceID_XLink, true}};
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGFilterElement::SVGFilterElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
@@ -103,33 +103,33 @@ SVGFilterElement::IsAttributeMapped(cons
       sGradientStopMap, sLightingEffectsMap,
       sMarkersMap,      sTextContentElementsMap,
       sViewportsMap};
   return FindAttributeDependence(name, map) ||
          SVGFilterElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ bool SVGFilterElement::HasValidDimensions() const {
   return (!mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() ||
           mLengthAttributes[ATTR_WIDTH].GetAnimValInSpecifiedUnits() > 0) &&
          (!mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet() ||
           mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0);
 }
 
-nsSVGElement::LengthAttributesInfo SVGFilterElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGFilterElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGFilterElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGFilterElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGFilterElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGFilterElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGFilterElement.h
+++ b/dom/svg/SVGFilterElement.h
@@ -3,33 +3,33 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_SVGFilterElement_h
 #define mozilla_dom_SVGFilterElement_h
 
 #include "nsSVGEnum.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGIntegerPair.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
 
-typedef nsSVGElement SVGFilterElementBase;
-
 class nsSVGFilterFrame;
 class nsSVGFilterInstance;
 
 nsresult NS_NewSVGFilterElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 class SVGAnimatedLength;
 
+typedef SVGElement SVGFilterElementBase;
+
 class SVGFilterElement : public SVGFilterElementBase {
   friend class ::nsSVGFilterFrame;
   friend class ::nsSVGFilterInstance;
 
  protected:
   friend nsresult(::NS_NewSVGFilterElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
--- a/dom/svg/SVGForeignObjectElement.cpp
+++ b/dom/svg/SVGForeignObjectElement.cpp
@@ -17,17 +17,17 @@ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Fo
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGForeignObjectElement::WrapNode(JSContext* aCx,
                                             JS::Handle<JSObject*> aGivenProto) {
   return SVGForeignObjectElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGForeignObjectElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGForeignObjectElement::sLengthInfo[4] = {
     {nsGkAtoms::x, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::y, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
     {nsGkAtoms::width, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::height, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
@@ -59,17 +59,17 @@ already_AddRefed<SVGAnimatedLength> SVGF
   return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
 }
 
 already_AddRefed<SVGAnimatedLength> SVGForeignObjectElement::Height() {
   return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ gfxMatrix SVGForeignObjectElement::PrependLocalTransformsTo(
     const gfxMatrix& aMatrix, SVGTransformTypes aWhich) const {
   // 'transform' attribute:
   gfxMatrix fromUserSpace =
       SVGGraphicsElement::PrependLocalTransformsTo(aMatrix, aWhich);
   if (aWhich == eUserSpaceToParent) {
     return fromUserSpace;
@@ -107,17 +107,17 @@ SVGForeignObjectElement::IsAttributeMapp
                                                     sTextContentElementsMap,
                                                     sViewportsMap};
 
   return FindAttributeDependence(name, map) ||
          SVGGraphicsElement::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::LengthAttributesInfo SVGForeignObjectElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGForeignObjectElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGForeignObjectElement.h
+++ b/dom/svg/SVGForeignObjectElement.h
@@ -26,17 +26,17 @@ class SVGForeignObjectElement final : pu
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGForeignObjectElement(
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
   virtual JSObject* WrapNode(JSContext* cx,
                              JS::Handle<JSObject*> aGivenProto) override;
 
  public:
-  // nsSVGElement specializations:
+  // SVGElement specializations:
   virtual gfxMatrix PrependLocalTransformsTo(
       const gfxMatrix& aMatrix,
       SVGTransformTypes aWhich = eAllTransforms) const override;
   virtual bool HasValidDimensions() const override;
 
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* name) const override;
 
--- a/dom/svg/SVGGeometryElement.cpp
+++ b/dom/svg/SVGGeometryElement.cpp
@@ -14,27 +14,27 @@
 #include "nsSVGUtils.h"
 #include "nsSVGLength2.h"
 #include "SVGContentUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
 using namespace mozilla::dom;
 
-nsSVGElement::NumberInfo SVGGeometryElement::sNumberInfo = {
-    nsGkAtoms::pathLength, 0, false};
+SVGElement::NumberInfo SVGGeometryElement::sNumberInfo = {nsGkAtoms::pathLength,
+                                                          0, false};
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGGeometryElement::SVGGeometryElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : SVGGeometryElementBase(std::move(aNodeInfo)) {}
 
-nsSVGElement::NumberAttributesInfo SVGGeometryElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGGeometryElement::GetNumberInfo() {
   return NumberAttributesInfo(&mPathLength, &sNumberInfo, 1);
 }
 
 nsresult SVGGeometryElement::AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
                                           const nsAttrValue* aValue,
                                           const nsAttrValue* aOldValue,
                                           nsIPrincipal* aSubjectPrincipal,
                                           bool aNotify) {
--- a/dom/svg/SVGGeometryElement.h
+++ b/dom/svg/SVGGeometryElement.h
@@ -208,17 +208,17 @@ class SVGGeometryElement : public SVGGeo
 
   // WebIDL
   already_AddRefed<SVGAnimatedNumber> PathLength();
   float GetTotalLength();
   already_AddRefed<nsISVGPoint> GetPointAtLength(float distance,
                                                  ErrorResult& rv);
 
  protected:
-  // nsSVGElement method
+  // SVGElement method
   virtual NumberAttributesInfo GetNumberInfo() override;
 
   nsSVGNumber2 mPathLength;
   static NumberInfo sNumberInfo;
   mutable RefPtr<Path> mCachedPath;
 };
 
 }  // namespace dom
--- a/dom/svg/SVGGradientElement.cpp
+++ b/dom/svg/SVGGradientElement.cpp
@@ -10,17 +10,17 @@
 #include "mozilla/dom/SVGAnimatedTransformList.h"
 #include "mozilla/dom/SVGGradientElementBinding.h"
 #include "mozilla/dom/SVGRadialGradientElementBinding.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 #include "mozilla/dom/SVGLinearGradientElementBinding.h"
 #include "mozilla/dom/SVGUnitTypesBinding.h"
 #include "nsCOMPtr.h"
 #include "nsGkAtoms.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(LinearGradient)
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(RadialGradient)
 
 namespace mozilla {
 namespace dom {
 
 using namespace SVGGradientElement_Binding;
@@ -29,40 +29,40 @@ using namespace SVGUnitTypes_Binding;
 //--------------------- Gradients------------------------
 
 nsSVGEnumMapping SVGGradientElement::sSpreadMethodMap[] = {
     {nsGkAtoms::pad, SVG_SPREADMETHOD_PAD},
     {nsGkAtoms::reflect, SVG_SPREADMETHOD_REFLECT},
     {nsGkAtoms::repeat, SVG_SPREADMETHOD_REPEAT},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGGradientElement::sEnumInfo[2] = {
+SVGElement::EnumInfo SVGGradientElement::sEnumInfo[2] = {
     {nsGkAtoms::gradientUnits, sSVGUnitTypesMap,
      SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
     {nsGkAtoms::spreadMethod, sSpreadMethodMap, SVG_SPREADMETHOD_PAD}};
 
-nsSVGElement::StringInfo SVGGradientElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGGradientElement::sStringInfo[2] = {
     {nsGkAtoms::href, kNameSpaceID_None, true},
     {nsGkAtoms::href, kNameSpaceID_XLink, true}};
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGGradientElement::SVGGradientElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : SVGGradientElementBase(std::move(aNodeInfo)) {}
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::EnumAttributesInfo SVGGradientElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGGradientElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGGradientElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGGradientElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 already_AddRefed<SVGAnimatedEnumeration> SVGGradientElement::GradientUnits() {
   return mEnumAttributes[GRADIENTUNITS].ToDOMAnimatedEnum(this);
 }
 
@@ -98,17 +98,17 @@ SVGGradientElement::IsAttributeMapped(co
 
 //---------------------Linear Gradients------------------------
 
 JSObject* SVGLinearGradientElement::WrapNode(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SVGLinearGradientElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGLinearGradientElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGLinearGradientElement::sLengthInfo[4] = {
     {nsGkAtoms::x1, 0, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::y1, 0, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
     {nsGkAtoms::x2, 100, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::y2, 0, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
@@ -140,39 +140,39 @@ already_AddRefed<SVGAnimatedLength> SVGL
   return mLengthAttributes[ATTR_X2].ToDOMAnimatedLength(this);
 }
 
 already_AddRefed<SVGAnimatedLength> SVGLinearGradientElement::Y2() {
   return mLengthAttributes[ATTR_Y2].ToDOMAnimatedLength(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 nsSVGAnimatedTransformList* SVGGradientElement::GetAnimatedTransformList(
     uint32_t aFlags) {
   if (!mGradientTransform && (aFlags & DO_ALLOCATE)) {
     mGradientTransform = new nsSVGAnimatedTransformList();
   }
   return mGradientTransform;
 }
 
-nsSVGElement::LengthAttributesInfo SVGLinearGradientElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGLinearGradientElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //-------------------------- Radial Gradients ----------------------------
 
 JSObject* SVGRadialGradientElement::WrapNode(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SVGRadialGradientElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGRadialGradientElement::sLengthInfo[6] = {
+SVGElement::LengthInfo SVGRadialGradientElement::sLengthInfo[6] = {
     {nsGkAtoms::cx, 50, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::cy, 50, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
     {nsGkAtoms::r, 50, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::XY},
     {nsGkAtoms::fx, 50, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
@@ -216,17 +216,17 @@ already_AddRefed<SVGAnimatedLength> SVGR
   return mLengthAttributes[ATTR_FY].ToDOMAnimatedLength(this);
 }
 
 already_AddRefed<SVGAnimatedLength> SVGRadialGradientElement::Fr() {
   return mLengthAttributes[ATTR_FR].ToDOMAnimatedLength(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::LengthAttributesInfo SVGRadialGradientElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGRadialGradientElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGGradientElement.h
+++ b/dom/svg/SVGGradientElement.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 __NS_SVGGRADIENTELEMENT_H__
 #define __NS_SVGGRADIENTELEMENT_H__
 
 #include "nsAutoPtr.h"
 #include "nsSVGAnimatedTransformList.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGLength2.h"
 #include "nsSVGEnum.h"
 #include "nsSVGString.h"
 
 class nsSVGGradientFrame;
 class nsSVGLinearGradientFrame;
 class nsSVGRadialGradientFrame;
 
@@ -25,17 +25,17 @@ nsresult NS_NewSVGRadialGradientElement(
 
 namespace mozilla {
 namespace dom {
 
 class SVGAnimatedTransformList;
 
 //--------------------- Gradients------------------------
 
-typedef nsSVGElement SVGGradientElementBase;
+typedef SVGElement SVGGradientElementBase;
 
 class SVGGradientElement : public SVGGradientElementBase {
   friend class ::nsSVGGradientFrame;
 
  protected:
   explicit SVGGradientElement(
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
   virtual JSObject* WrapNode(JSContext* aCx,
--- a/dom/svg/SVGGraphicsElement.h
+++ b/dom/svg/SVGGraphicsElement.h
@@ -21,17 +21,17 @@ class SVGGraphicsElement : public SVGGra
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
   ~SVGGraphicsElement();
 
  public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   bool IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) override;
-  nsSVGElement* AsSVGElement() final { return this; }
+  SVGElement* AsSVGElement() final { return this; }
 
  protected:
   // returns true if focusability has been definitively determined otherwise
   // false
   bool IsSVGFocusable(bool* aIsFocusable, int32_t* aTabIndex);
 };
 
 }  // namespace dom
--- a/dom/svg/SVGImageElement.cpp
+++ b/dom/svg/SVGImageElement.cpp
@@ -25,28 +25,28 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGImageElement::WrapNode(JSContext* aCx,
                                     JS::Handle<JSObject*> aGivenProto) {
   return SVGImageElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGImageElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGImageElement::sLengthInfo[4] = {
     {nsGkAtoms::x, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::y, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
     {nsGkAtoms::width, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::height, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
 };
 
-nsSVGElement::StringInfo SVGImageElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGImageElement::sStringInfo[2] = {
     {nsGkAtoms::href, kNameSpaceID_None, true},
     {nsGkAtoms::href, kNameSpaceID_XLink, true}};
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
 NS_IMPL_ISUPPORTS_INHERITED(SVGImageElement, SVGImageElementBase,
                             imgINotificationObserver, nsIImageLoadingContent)
@@ -260,35 +260,35 @@ already_AddRefed<Path> SVGImageElement::
   aBuilder->LineTo(r.BottomRight());
   aBuilder->LineTo(r.BottomLeft());
   aBuilder->Close();
 
   return aBuilder->Finish();
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ bool SVGImageElement::HasValidDimensions() const {
   return mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() &&
          mLengthAttributes[ATTR_WIDTH].GetAnimValInSpecifiedUnits() > 0 &&
          mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet() &&
          mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0;
 }
 
-nsSVGElement::LengthAttributesInfo SVGImageElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGImageElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 SVGAnimatedPreserveAspectRatio* SVGImageElement::GetPreserveAspectRatio() {
   return &mPreserveAspectRatio;
 }
 
-nsSVGElement::StringAttributesInfo SVGImageElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGImageElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 nsresult SVGImageElement::CopyInnerTo(Element* aDest) {
   if (aDest->OwnerDoc()->IsStaticDocument()) {
     CreateStaticImageClone(static_cast<SVGImageElement*>(aDest));
   }
--- a/dom/svg/SVGLength.cpp
+++ b/dom/svg/SVGLength.cpp
@@ -2,17 +2,17 @@
 /* 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 "mozilla/ArrayUtils.h"
 
 #include "SVGLength.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "nsTextFormatter.h"
 #include "SVGContentUtils.h"
 #include <limits>
 #include <algorithm>
 
 namespace mozilla {
 
@@ -86,17 +86,17 @@ inline static float GetAbsUnitsPerAbsUni
       {2.3622047244094489f, 0.23622047244094489f, 6.0f, 0.083333333333333333f,
        1.0f}};
 
   // First absolute unit is SVG_LENGTHTYPE_CM = 6
   return CSSAbsoluteUnitConversionFactors[aUnits - 6][aPerUnit - 6];
 }
 
 float SVGLength::GetValueInSpecifiedUnit(uint8_t aUnit,
-                                         const nsSVGElement* aElement,
+                                         const SVGElement* aElement,
                                          uint8_t aAxis) const {
   if (aUnit == mUnit) {
     return mValue;
   }
   if ((aUnit == SVGLength_Binding::SVG_LENGTHTYPE_NUMBER &&
        mUnit == SVGLength_Binding::SVG_LENGTHTYPE_PX) ||
       (aUnit == SVGLength_Binding::SVG_LENGTHTYPE_PX &&
        mUnit == SVGLength_Binding::SVG_LENGTHTYPE_NUMBER)) {
@@ -128,17 +128,17 @@ float SVGLength::GetValueInSpecifiedUnit
     return value;
   }
   return std::numeric_limits<float>::quiet_NaN();
 }
 
 #define INCHES_PER_MM_FLOAT float(0.0393700787)
 #define INCHES_PER_CM_FLOAT float(0.393700787)
 
-float SVGLength::GetUserUnitsPerUnit(const nsSVGElement* aElement,
+float SVGLength::GetUserUnitsPerUnit(const SVGElement* aElement,
                                      uint8_t aAxis) const {
   switch (mUnit) {
     case SVGLength_Binding::SVG_LENGTHTYPE_NUMBER:
     case SVGLength_Binding::SVG_LENGTHTYPE_PX:
       return 1.0f;
     case SVGLength_Binding::SVG_LENGTHTYPE_MM:
       return INCHES_PER_MM_FLOAT * GetUserUnitsPerInch();
     case SVGLength_Binding::SVG_LENGTHTYPE_CM:
@@ -147,28 +147,27 @@ float SVGLength::GetUserUnitsPerUnit(con
       return GetUserUnitsPerInch();
     case SVGLength_Binding::SVG_LENGTHTYPE_PT:
       return (1.0f / POINTS_PER_INCH_FLOAT) * GetUserUnitsPerInch();
     case SVGLength_Binding::SVG_LENGTHTYPE_PC:
       return (12.0f / POINTS_PER_INCH_FLOAT) * GetUserUnitsPerInch();
     case SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE:
       return GetUserUnitsPerPercent(aElement, aAxis);
     case SVGLength_Binding::SVG_LENGTHTYPE_EMS:
-      return SVGContentUtils::GetFontSize(const_cast<nsSVGElement*>(aElement));
+      return SVGContentUtils::GetFontSize(const_cast<SVGElement*>(aElement));
     case SVGLength_Binding::SVG_LENGTHTYPE_EXS:
-      return SVGContentUtils::GetFontXHeight(
-          const_cast<nsSVGElement*>(aElement));
+      return SVGContentUtils::GetFontXHeight(const_cast<SVGElement*>(aElement));
     default:
       MOZ_ASSERT_UNREACHABLE("Unknown unit type");
       return std::numeric_limits<float>::quiet_NaN();
   }
 }
 
-/* static */ float SVGLength::GetUserUnitsPerPercent(
-    const nsSVGElement* aElement, uint8_t aAxis) {
+/* static */ float SVGLength::GetUserUnitsPerPercent(const SVGElement* aElement,
+                                                     uint8_t aAxis) {
   if (aElement) {
     dom::SVGViewportElement* viewportElement = aElement->GetCtx();
     if (viewportElement) {
       return std::max(viewportElement->GetLength(aAxis) / 100.0f, 0.0f);
     }
   }
   return std::numeric_limits<float>::quiet_NaN();
 }
--- a/dom/svg/SVGLength.h
+++ b/dom/svg/SVGLength.h
@@ -7,19 +7,21 @@
 #ifndef MOZILLA_SVGLENGTH_H__
 #define MOZILLA_SVGLENGTH_H__
 
 #include "nsDebug.h"
 #include "nsMathUtils.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 
-class nsSVGElement;
+namespace mozilla {
 
-namespace mozilla {
+namespace dom {
+class SVGElement;
+}
 
 /**
  * This SVGLength class is currently used for SVGLength *list* attributes only.
  * The class that is currently used for <length> attributes is nsSVGLength2.
  *
  * The member mUnit should always be valid, but the member mValue may be
  * numeric_limits<float>::quiet_NaN() under one circumstances (see the comment
  * in SetValueAndUnit below). Even if mValue is valid, some methods may return
@@ -88,27 +90,28 @@ class SVGLength {
 
     NS_ASSERTION(IsValidUnitType(mUnit), "Set invalid SVGLength");
   }
 
   /**
    * If it's not possible to convert this length's value to user units, then
    * this method will return numeric_limits<float>::quiet_NaN().
    */
-  float GetValueInUserUnits(const nsSVGElement *aElement, uint8_t aAxis) const {
+  float GetValueInUserUnits(const dom::SVGElement *aElement,
+                            uint8_t aAxis) const {
     return mValue * GetUserUnitsPerUnit(aElement, aAxis);
   }
 
   /**
    * Get this length's value in the units specified.
    *
    * This method returns numeric_limits<float>::quiet_NaN() if it is not
    * possible to convert the value to the specified unit.
    */
-  float GetValueInSpecifiedUnit(uint8_t aUnit, const nsSVGElement *aElement,
+  float GetValueInSpecifiedUnit(uint8_t aUnit, const dom::SVGElement *aElement,
                                 uint8_t aAxis) const;
 
   bool IsPercentage() const {
     return mUnit == dom::SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE;
   }
 
   static bool IsValidUnitType(uint16_t unit) {
     return unit > dom::SVGLength_Binding::SVG_LENGTHTYPE_UNKNOWN &&
@@ -117,17 +120,18 @@ class SVGLength {
 
   /**
    * Returns the number of user units per current unit.
    *
    * This method returns numeric_limits<float>::quiet_NaN() if the conversion
    * factor between the length's current unit and user units is undefined (see
    * the comments for GetUserUnitsPerInch and GetUserUnitsPerPercent).
    */
-  float GetUserUnitsPerUnit(const nsSVGElement *aElement, uint8_t aAxis) const;
+  float GetUserUnitsPerUnit(const dom::SVGElement *aElement,
+                            uint8_t aAxis) const;
 
  private:
 #ifdef DEBUG
   bool IsValid() const { return IsFinite(mValue) && IsValidUnitType(mUnit); }
 #endif
 
   /**
    * The conversion factor between user units (CSS px) and CSS inches is
@@ -139,17 +143,17 @@ class SVGLength {
    * The conversion factor between user units and percentage units depends on
    * aElement being non-null, and on aElement having a viewport element
    * ancestor with only appropriate SVG elements between aElement and that
    * ancestor. If that's not the case, then the conversion factor is undefined.
    *
    * This function returns a non-negative value if the conversion factor is
    * defined, otherwise it returns numeric_limits<float>::quiet_NaN().
    */
-  static float GetUserUnitsPerPercent(const nsSVGElement *aElement,
+  static float GetUserUnitsPerPercent(const dom::SVGElement *aElement,
                                       uint8_t aAxis);
 
   float mValue;
   uint8_t mUnit;
 };
 
 }  // namespace mozilla
 
--- a/dom/svg/SVGLengthList.cpp
+++ b/dom/svg/SVGLengthList.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGLengthList.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "nsError.h"
 #include "nsString.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "SVGAnimatedLengthList.h"
 #include "SVGContentUtils.h"
 #include "SVGLength.h"
 
 namespace mozilla {
 
 nsresult SVGLengthList::CopyFrom(const SVGLengthList& rhs) {
   if (!mLengths.Assign(rhs.mLengths, fallible)) {
--- a/dom/svg/SVGLengthList.h
+++ b/dom/svg/SVGLengthList.h
@@ -7,17 +7,17 @@
 #ifndef MOZILLA_SVGLENGTHLIST_H__
 #define MOZILLA_SVGLENGTHLIST_H__
 
 #include "nsCOMPtr.h"
 #include "nsDebug.h"
 #include "nsIContent.h"
 #include "nsINode.h"
 #include "nsIWeakReferenceUtils.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsTArray.h"
 #include "SVGLength.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 
 namespace mozilla {
 
 /**
  * ATTENTION! WARNING! WATCH OUT!!
@@ -155,31 +155,31 @@ class SVGLengthList {
  * which element and attribute a length list belongs to so that it can convert
  * between unit types if necessary.
  */
 class SVGLengthListAndInfo : public SVGLengthList {
  public:
   SVGLengthListAndInfo()
       : mElement(nullptr), mAxis(0), mCanZeroPadList(false) {}
 
-  SVGLengthListAndInfo(nsSVGElement* aElement, uint8_t aAxis,
+  SVGLengthListAndInfo(dom::SVGElement* aElement, uint8_t aAxis,
                        bool aCanZeroPadList)
       : mElement(do_GetWeakReference(static_cast<nsINode*>(aElement))),
         mAxis(aAxis),
         mCanZeroPadList(aCanZeroPadList) {}
 
-  void SetInfo(nsSVGElement* aElement, uint8_t aAxis, bool aCanZeroPadList) {
+  void SetInfo(dom::SVGElement* aElement, uint8_t aAxis, bool aCanZeroPadList) {
     mElement = do_GetWeakReference(static_cast<nsINode*>(aElement));
     mAxis = aAxis;
     mCanZeroPadList = aCanZeroPadList;
   }
 
-  nsSVGElement* Element() const {
+  dom::SVGElement* Element() const {
     nsCOMPtr<nsIContent> e = do_QueryReferent(mElement);
-    return static_cast<nsSVGElement*>(e.get());
+    return static_cast<dom::SVGElement*>(e.get());
   }
 
   /**
    * Returns true if this object is an "identity" value, from the perspective
    * of SMIL. In other words, returns true until the initial value set up in
    * SVGLengthListSMILType::Init() has been changed with a SetInfo() call.
    */
   bool IsIdentity() const {
@@ -282,17 +282,18 @@ class SVGLengthListAndInfo : public SVGL
  * ComputedStyle to resolve absolute and em/ex units against, unit conversions
  * could still overflow. In that case the value returned will be
  * numeric_limits<float>::quiet_NaN().
  */
 class MOZ_STACK_CLASS SVGUserUnitList {
  public:
   SVGUserUnitList() : mList(nullptr), mElement(nullptr), mAxis(0) {}
 
-  void Init(const SVGLengthList* aList, nsSVGElement* aElement, uint8_t aAxis) {
+  void Init(const SVGLengthList* aList, dom::SVGElement* aElement,
+            uint8_t aAxis) {
     mList = aList;
     mElement = aElement;
     mAxis = aAxis;
   }
 
   void Clear() { mList = nullptr; }
 
   bool IsEmpty() const { return !mList || mList->IsEmpty(); }
@@ -307,15 +308,15 @@ class MOZ_STACK_CLASS SVGUserUnitList {
   bool HasPercentageValueAt(uint32_t aIndex) const {
     const SVGLength& length = (*mList)[aIndex];
     return length.GetUnit() ==
            dom::SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE;
   }
 
  private:
   const SVGLengthList* mList;
-  nsSVGElement* mElement;
+  dom::SVGElement* mElement;
   uint8_t mAxis;
 };
 
 }  // namespace mozilla
 
 #endif  // MOZILLA_SVGLENGTHLIST_H__
--- a/dom/svg/SVGLineElement.cpp
+++ b/dom/svg/SVGLineElement.cpp
@@ -16,17 +16,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGLineElement::WrapNode(JSContext* aCx,
                                    JS::Handle<JSObject*> aGivenProto) {
   return SVGLineElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGLineElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGLineElement::sLengthInfo[4] = {
     {nsGkAtoms::x1, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::y1, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
     {nsGkAtoms::x2, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::y2, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
@@ -84,19 +84,19 @@ NS_IMETHODIMP_(bool)
 SVGLineElement::IsAttributeMapped(const nsAtom* name) const {
   static const MappedAttributeEntry* const map[] = {sMarkersMap};
 
   return FindAttributeDependence(name, map) ||
          SVGLineElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::LengthAttributesInfo SVGLineElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGLineElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
 // SVGGeometryElement methods
 
 void SVGLineElement::GetMarkPoints(nsTArray<nsSVGMark>* aMarks) {
--- a/dom/svg/SVGMPathElement.cpp
+++ b/dom/svg/SVGMPathElement.cpp
@@ -19,17 +19,17 @@ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(MP
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGMPathElement::WrapNode(JSContext* aCx,
                                     JS::Handle<JSObject*> aGivenProto) {
   return SVGMPathElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringInfo SVGMPathElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGMPathElement::sStringInfo[2] = {
     {nsGkAtoms::href, kNameSpaceID_None, false},
     {nsGkAtoms::href, kNameSpaceID_XLink, false}};
 
 // Cycle collection magic -- based on SVGUseElement
 NS_IMPL_CYCLE_COLLECTION_CLASS(SVGMPathElement)
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(SVGMPathElement,
                                                 SVGMPathElementBase)
@@ -143,19 +143,19 @@ nsresult SVGMPathElement::AfterSetAttr(i
        // to href.
   }
 
   return SVGMPathElementBase::AfterSetAttr(
       aNamespaceID, aName, aValue, aOldValue, aMaybeScriptedPrincipal, aNotify);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::StringAttributesInfo SVGMPathElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGMPathElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 //----------------------------------------------------------------------
 // nsIMutationObserver methods
 
 void SVGMPathElement::AttributeChanged(Element* aElement, int32_t aNameSpaceID,
--- a/dom/svg/SVGMPathElement.h
+++ b/dom/svg/SVGMPathElement.h
@@ -3,29 +3,29 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_SVGMPathElement_h
 #define mozilla_dom_SVGMPathElement_h
 
 #include "mozilla/dom/IDTracker.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsStubMutationObserver.h"
 #include "nsSVGString.h"
 
 nsresult NS_NewSVGMPathElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGElement SVGMPathElementBase;
-
 namespace mozilla {
 namespace dom {
 class SVGPathElement;
 
+typedef SVGElement SVGMPathElementBase;
+
 class SVGMPathElement final : public SVGMPathElementBase,
                               public nsStubMutationObserver {
  protected:
   friend nsresult(::NS_NewSVGMPathElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGMPathElement(
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
--- a/dom/svg/SVGMarkerElement.cpp
+++ b/dom/svg/SVGMarkerElement.cpp
@@ -28,60 +28,60 @@ namespace dom {
 
 using namespace SVGAngle_Binding;
 
 JSObject* SVGMarkerElement::WrapNode(JSContext* aCx,
                                      JS::Handle<JSObject*> aGivenProto) {
   return SVGMarkerElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGMarkerElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGMarkerElement::sLengthInfo[4] = {
     {nsGkAtoms::refX, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::refY, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
     {nsGkAtoms::markerWidth, 3, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::markerHeight, 3, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
 };
 
 nsSVGEnumMapping SVGMarkerElement::sUnitsMap[] = {
     {nsGkAtoms::strokeWidth, SVG_MARKERUNITS_STROKEWIDTH},
     {nsGkAtoms::userSpaceOnUse, SVG_MARKERUNITS_USERSPACEONUSE},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGMarkerElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGMarkerElement::sEnumInfo[1] = {
     {nsGkAtoms::markerUnits, sUnitsMap, SVG_MARKERUNITS_STROKEWIDTH}};
 
-nsSVGElement::AngleInfo SVGMarkerElement::sAngleInfo[1] = {
+SVGElement::AngleInfo SVGMarkerElement::sAngleInfo[1] = {
     {nsGkAtoms::orient, 0, SVG_ANGLETYPE_UNSPECIFIED}};
 
 //----------------------------------------------------------------------
 // Implementation
 
 nsresult nsSVGOrientType::SetBaseValue(uint16_t aValue,
-                                       nsSVGElement* aSVGElement) {
+                                       SVGElement* aSVGElement) {
   if (aValue == SVG_MARKER_ORIENT_AUTO || aValue == SVG_MARKER_ORIENT_ANGLE ||
       aValue == SVG_MARKER_ORIENT_AUTO_START_REVERSE) {
     SetBaseValue(aValue);
     aSVGElement->SetAttr(kNameSpaceID_None, nsGkAtoms::orient, nullptr,
                          (aValue == SVG_MARKER_ORIENT_AUTO
                               ? NS_LITERAL_STRING("auto")
                               : aValue == SVG_MARKER_ORIENT_ANGLE
                                     ? NS_LITERAL_STRING("0")
                                     : NS_LITERAL_STRING("auto-start-reverse")),
                          true);
     return NS_OK;
   }
   return NS_ERROR_DOM_TYPE_ERR;
 }
 
 already_AddRefed<SVGAnimatedEnumeration> nsSVGOrientType::ToDOMAnimatedEnum(
-    nsSVGElement* aSVGElement) {
+    SVGElement* aSVGElement) {
   RefPtr<SVGAnimatedEnumeration> toReturn =
       new DOMAnimatedEnum(this, aSVGElement);
   return toReturn.forget();
 }
 
 SVGMarkerElement::SVGMarkerElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : SVGMarkerElementBase(std::move(aNodeInfo)), mCoordCtx(nullptr) {}
@@ -164,17 +164,17 @@ SVGMarkerElement::IsAttributeMapped(cons
                                                     sFillStrokeMap,
                                                     sGraphicsMap};
 
   return FindAttributeDependence(name, map) ||
          SVGMarkerElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 bool SVGMarkerElement::ParseAttribute(int32_t aNameSpaceID, nsAtom* aName,
                                       const nsAString& aValue,
                                       nsIPrincipal* aMaybeScriptedPrincipal,
                                       nsAttrValue& aResult) {
   if (aNameSpaceID == kNameSpaceID_None && aName == nsGkAtoms::orient) {
     if (aValue.EqualsLiteral("auto")) {
       mOrientType.SetBaseValue(SVG_MARKER_ORIENT_AUTO);
@@ -206,41 +206,41 @@ nsresult SVGMarkerElement::AfterSetAttr(
     mOrientType.SetBaseValue(SVG_MARKER_ORIENT_ANGLE);
   }
 
   return SVGMarkerElementBase::AfterSetAttr(
       aNamespaceID, aName, aValue, aOldValue, aMaybeScriptedPrincipal, aNotify);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 void SVGMarkerElement::SetParentCoordCtxProvider(SVGViewportElement* aContext) {
   mCoordCtx = aContext;
   mViewBoxToViewportTransform = nullptr;
 }
 
 /* virtual */ bool SVGMarkerElement::HasValidDimensions() const {
   return (!mLengthAttributes[MARKERWIDTH].IsExplicitlySet() ||
           mLengthAttributes[MARKERWIDTH].GetAnimValInSpecifiedUnits() > 0) &&
          (!mLengthAttributes[MARKERHEIGHT].IsExplicitlySet() ||
           mLengthAttributes[MARKERHEIGHT].GetAnimValInSpecifiedUnits() > 0);
 }
 
-nsSVGElement::LengthAttributesInfo SVGMarkerElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGMarkerElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
-nsSVGElement::AngleAttributesInfo SVGMarkerElement::GetAngleInfo() {
+SVGElement::AngleAttributesInfo SVGMarkerElement::GetAngleInfo() {
   return AngleAttributesInfo(mAngleAttributes, sAngleInfo,
                              ArrayLength(sAngleInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGMarkerElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGMarkerElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
 nsSVGViewBox* SVGMarkerElement::GetViewBox() { return &mViewBox; }
 
 SVGAnimatedPreserveAspectRatio* SVGMarkerElement::GetPreserveAspectRatio() {
   return &mPreserveAspectRatio;
 }
--- a/dom/svg/SVGMarkerElement.h
+++ b/dom/svg/SVGMarkerElement.h
@@ -8,17 +8,17 @@
 #define mozilla_dom_SVGMarkerElement_h
 
 #include "nsAutoPtr.h"
 #include "nsSVGAngle.h"
 #include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "nsSVGViewBox.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/SVGAnimatedEnumeration.h"
 #include "mozilla/dom/SVGMarkerElementBinding.h"
 
 class nsSVGMarkerFrame;
 struct nsSVGMark;
 
 nsresult NS_NewSVGMarkerElement(
@@ -31,17 +31,17 @@ namespace dom {
 static const uint16_t SVG_MARKER_ORIENT_AUTO_START_REVERSE = 3;
 
 class nsSVGOrientType {
  public:
   nsSVGOrientType()
       : mAnimVal(SVGMarkerElement_Binding::SVG_MARKER_ORIENT_ANGLE),
         mBaseVal(SVGMarkerElement_Binding::SVG_MARKER_ORIENT_ANGLE) {}
 
-  nsresult SetBaseValue(uint16_t aValue, nsSVGElement* aSVGElement);
+  nsresult SetBaseValue(uint16_t aValue, SVGElement* aSVGElement);
 
   // XXX FIXME like https://bugzilla.mozilla.org/show_bug.cgi?id=545550 but
   // without adding an mIsAnimated member...?
   void SetBaseValue(uint16_t aValue) { mAnimVal = mBaseVal = uint8_t(aValue); }
   // no need to notify, since nsSVGAngle does that
   void SetAnimValue(uint16_t aValue) { mAnimVal = uint8_t(aValue); }
 
   // we want to avoid exposing SVG_MARKER_ORIENT_AUTO_START_REVERSE to
@@ -54,38 +54,38 @@ class nsSVGOrientType {
   uint16_t GetAnimValue() const {
     return mAnimVal == SVG_MARKER_ORIENT_AUTO_START_REVERSE
                ? SVGMarkerElement_Binding::SVG_MARKER_ORIENT_UNKNOWN
                : mAnimVal;
   }
   uint16_t GetAnimValueInternal() const { return mAnimVal; }
 
   already_AddRefed<SVGAnimatedEnumeration> ToDOMAnimatedEnum(
-      nsSVGElement* aSVGElement);
+      SVGElement* aSVGElement);
 
  private:
   nsSVGEnumValue mAnimVal;
   nsSVGEnumValue mBaseVal;
 
   struct DOMAnimatedEnum final : public SVGAnimatedEnumeration {
-    DOMAnimatedEnum(nsSVGOrientType* aVal, nsSVGElement* aSVGElement)
+    DOMAnimatedEnum(nsSVGOrientType* aVal, SVGElement* aSVGElement)
         : SVGAnimatedEnumeration(aSVGElement), mVal(aVal) {}
 
     nsSVGOrientType* mVal;  // kept alive because it belongs to content
 
     using mozilla::dom::SVGAnimatedEnumeration::SetBaseVal;
     virtual uint16_t BaseVal() override { return mVal->GetBaseValue(); }
     virtual void SetBaseVal(uint16_t aBaseVal, ErrorResult& aRv) override {
       aRv = mVal->SetBaseValue(aBaseVal, mSVGElement);
     }
     virtual uint16_t AnimVal() override { return mVal->GetAnimValue(); }
   };
 };
 
-typedef nsSVGElement SVGMarkerElementBase;
+typedef SVGElement SVGMarkerElementBase;
 
 class SVGMarkerElement : public SVGMarkerElementBase {
   friend class ::nsSVGMarkerFrame;
 
  protected:
   friend nsresult(::NS_NewSVGMarkerElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
--- a/dom/svg/SVGMaskElement.cpp
+++ b/dom/svg/SVGMaskElement.cpp
@@ -22,28 +22,28 @@ using namespace SVGUnitTypes_Binding;
 
 JSObject* SVGMaskElement::WrapNode(JSContext* aCx,
                                    JS::Handle<JSObject*> aGivenProto) {
   return SVGMaskElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 //--------------------- Masks ------------------------
 
-nsSVGElement::LengthInfo SVGMaskElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGMaskElement::sLengthInfo[4] = {
     {nsGkAtoms::x, -10, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::y, -10, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
     {nsGkAtoms::width, 120, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::height, 120, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
 };
 
-nsSVGElement::EnumInfo SVGMaskElement::sEnumInfo[2] = {
+SVGElement::EnumInfo SVGMaskElement::sEnumInfo[2] = {
     {nsGkAtoms::maskUnits, sSVGUnitTypesMap, SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
     {nsGkAtoms::maskContentUnits, sSVGUnitTypesMap,
      SVG_UNIT_TYPE_USERSPACEONUSE}};
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGMaskElement::SVGMaskElement(
@@ -77,31 +77,31 @@ already_AddRefed<SVGAnimatedLength> SVGM
   return mLengthAttributes[ATTR_WIDTH].ToDOMAnimatedLength(this);
 }
 
 already_AddRefed<SVGAnimatedLength> SVGMaskElement::Height() {
   return mLengthAttributes[ATTR_HEIGHT].ToDOMAnimatedLength(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ bool SVGMaskElement::HasValidDimensions() const {
   return (!mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() ||
           mLengthAttributes[ATTR_WIDTH].GetAnimValInSpecifiedUnits() > 0) &&
          (!mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet() ||
           mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0);
 }
 
-nsSVGElement::LengthAttributesInfo SVGMaskElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGMaskElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGMaskElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGMaskElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
 //----------------------------------------------------------------------
 // nsIContent methods
 
 NS_IMETHODIMP_(bool)
 SVGMaskElement::IsAttributeMapped(const nsAtom* name) const {
--- a/dom/svg/SVGMaskElement.h
+++ b/dom/svg/SVGMaskElement.h
@@ -4,29 +4,29 @@
  * 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_SVGMaskElement_h
 #define mozilla_dom_SVGMaskElement_h
 
 #include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 class nsSVGMaskFrame;
 
 nsresult NS_NewSVGMaskElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 //--------------------- Masks ------------------------
 
-typedef nsSVGElement SVGMaskElementBase;
+typedef SVGElement SVGMaskElementBase;
 
 class SVGMaskElement final : public SVGMaskElementBase {
   friend class ::nsSVGMaskFrame;
 
  protected:
   friend nsresult(::NS_NewSVGMaskElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
--- a/dom/svg/SVGMetadataElement.h
+++ b/dom/svg/SVGMetadataElement.h
@@ -3,26 +3,26 @@
 /* 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_SVGMetadataElement_h
 #define mozilla_dom_SVGMetadataElement_h
 
 #include "mozilla/Attributes.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 nsresult NS_NewSVGMetadataElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGElement SVGMetadataElementBase;
-
 namespace mozilla {
 namespace dom {
 
+typedef SVGElement SVGMetadataElementBase;
+
 class SVGMetadataElement final : public SVGMetadataElementBase {
  protected:
   friend nsresult(::NS_NewSVGMetadataElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGMetadataElement(
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
--- a/dom/svg/SVGMotionSMILAnimationFunction.cpp
+++ b/dom/svg/SVGMotionSMILAnimationFunction.cpp
@@ -140,17 +140,17 @@ void SVGMotionSMILAnimationFunction::Reb
              "regenerating when we already have vertices");
 
   if (!aContextElem->IsSVGElement()) {
     NS_ERROR("Uh oh, SVG animateMotion element targeting a non-SVG node");
     return;
   }
 
   SVGMotionSMILPathUtils::PathGenerator pathGenerator(
-      static_cast<const nsSVGElement*>(aContextElem));
+      static_cast<const SVGElement*>(aContextElem));
 
   bool success = false;
   if (HasAttr(nsGkAtoms::values)) {
     // Generate path based on our values array
     mPathSourceType = ePathSourceType_ValuesAttr;
     const nsAString& valuesStr = GetAttr(nsGkAtoms::values)->GetStringValue();
     SVGMotionSMILPathUtils::MotionValueParser parser(&pathGenerator,
                                                      &mPathVertices);
--- a/dom/svg/SVGMotionSMILAttr.cpp
+++ b/dom/svg/SVGMotionSMILAttr.cpp
@@ -6,17 +6,17 @@
 
 /* representation of a dummy attribute targeted by <animateMotion> element */
 
 #include "SVGMotionSMILAttr.h"
 #include "SVGMotionSMILType.h"
 #include "mozilla/dom/SVGAnimationElement.h"
 #include "nsSMILValue.h"
 #include "nsDebug.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "gfx2DGlue.h"
 
 namespace mozilla {
 
 nsresult SVGMotionSMILAttr::ValueFromString(
     const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
     nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const {
   MOZ_ASSERT_UNREACHABLE(
--- a/dom/svg/SVGMotionSMILAttr.h
+++ b/dom/svg/SVGMotionSMILAttr.h
@@ -9,47 +9,47 @@
 #ifndef MOZILLA_SVGMOTIONSMILATTR_H_
 #define MOZILLA_SVGMOTIONSMILATTR_H_
 
 #include "mozilla/Attributes.h"
 #include "nsISMILAttr.h"
 
 class nsIContent;
 class nsSMILValue;
-class nsSVGElement;
 
 namespace mozilla {
 
 namespace dom {
 class SVGAnimationElement;
+class SVGElement;
 }  // namespace dom
 
 /**
  * SVGMotionSMILAttr: Implements the nsISMILAttr interface for SMIL animations
  * from <animateMotion>.
  *
  * NOTE: Even though there's technically no "motion" attribute, we behave in
  * many ways as if there were, for simplicity.
  */
 class SVGMotionSMILAttr : public nsISMILAttr {
  public:
-  explicit SVGMotionSMILAttr(nsSVGElement* aSVGElement)
+  explicit SVGMotionSMILAttr(dom::SVGElement* aSVGElement)
       : mSVGElement(aSVGElement) {}
 
   // nsISMILAttr methods
   virtual nsresult ValueFromString(
       const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
       nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
   virtual nsSMILValue GetBaseValue() const override;
   virtual nsresult SetAnimValue(const nsSMILValue& aValue) override;
   virtual void ClearAnimValue() override;
   virtual const nsIContent* GetTargetNode() const override;
 
  protected:
   // Raw pointers are OK here because this SVGMotionSMILAttr is both
   // created & destroyed during a SMIL sample-step, during which time the DOM
   // isn't modified.
-  nsSVGElement* mSVGElement;
+  dom::SVGElement* mSVGElement;
 };
 
 }  // namespace mozilla
 
 #endif  // MOZILLA_SVGMOTIONSMILATTR_H_
--- a/dom/svg/SVGMotionSMILPathUtils.h
+++ b/dom/svg/SVGMotionSMILPathUtils.h
@@ -14,31 +14,33 @@
 #include "gfxPlatform.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/RefPtr.h"
 #include "nsDebug.h"
 #include "nsSMILParserUtils.h"
 #include "nsStringFwd.h"
 #include "nsTArray.h"
 
-class nsSVGElement;
+namespace mozilla {
 
-namespace mozilla {
+namespace dom {
+class SVGElement;
+}
 
 class SVGMotionSMILPathUtils {
   typedef mozilla::gfx::DrawTarget DrawTarget;
   typedef mozilla::gfx::Path Path;
   typedef mozilla::gfx::PathBuilder PathBuilder;
 
  public:
   // Class to assist in generating a Path, based on
   // coordinates in the <animateMotion> from/by/to/values attributes.
   class PathGenerator {
    public:
-    explicit PathGenerator(const nsSVGElement* aSVGElement)
+    explicit PathGenerator(const dom::SVGElement* aSVGElement)
         : mSVGElement(aSVGElement), mHaveReceivedCommands(false) {
       RefPtr<DrawTarget> drawTarget =
           gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget();
       NS_ASSERTION(
           gfxPlatform::GetPlatform()->SupportsAzureContentForDrawTarget(
               drawTarget),
           "Should support Moz2D content drawing");
 
@@ -62,17 +64,17 @@ class SVGMotionSMILPathUtils {
     // Accessor to get the finalized path
     already_AddRefed<Path> GetResultingPath();
 
    protected:
     // Helper methods
     bool ParseCoordinatePair(const nsAString& aStr, float& aXVal, float& aYVal);
 
     // Member data
-    const nsSVGElement* mSVGElement;  // context for converting to user units
+    const dom::SVGElement* mSVGElement;  // context for converting to user units
     RefPtr<PathBuilder> mPathBuilder;
     bool mHaveReceivedCommands;
   };
 
   // Class to assist in passing each subcomponent of a |values| attribute to
   // a PathGenerator, for generating a corresponding Path.
   class MOZ_STACK_CLASS MotionValueParser
       : public nsSMILParserUtils::GenericValueParser {
--- a/dom/svg/SVGNumberList.h
+++ b/dom/svg/SVGNumberList.h
@@ -7,17 +7,17 @@
 #ifndef MOZILLA_SVGNUMBERLIST_H__
 #define MOZILLA_SVGNUMBERLIST_H__
 
 #include "nsCOMPtr.h"
 #include "nsDebug.h"
 #include "nsIContent.h"
 #include "nsINode.h"
 #include "nsIWeakReferenceUtils.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 
 /**
  * ATTENTION! WARNING! WATCH OUT!!
  *
  * Consumers that modify objects of this type absolutely MUST keep the DOM
@@ -126,26 +126,26 @@ class SVGNumberList {
  * be cached, it is necessary for us to hold a strong reference to our element
  * so that it doesn't disappear out from under us if, say, the element is
  * removed from the DOM tree.
  */
 class SVGNumberListAndInfo : public SVGNumberList {
  public:
   SVGNumberListAndInfo() : mElement(nullptr) {}
 
-  explicit SVGNumberListAndInfo(nsSVGElement* aElement)
+  explicit SVGNumberListAndInfo(dom::SVGElement* aElement)
       : mElement(do_GetWeakReference(static_cast<nsINode*>(aElement))) {}
 
-  void SetInfo(nsSVGElement* aElement) {
+  void SetInfo(dom::SVGElement* aElement) {
     mElement = do_GetWeakReference(static_cast<nsINode*>(aElement));
   }
 
-  nsSVGElement* Element() const {
+  dom::SVGElement* Element() const {
     nsCOMPtr<nsIContent> e = do_QueryReferent(mElement);
-    return static_cast<nsSVGElement*>(e.get());
+    return static_cast<dom::SVGElement*>(e.get());
   }
 
   nsresult CopyFrom(const SVGNumberListAndInfo& rhs) {
     mElement = rhs.mElement;
     return SVGNumberList::CopyFrom(rhs);
   }
 
   // Instances of this special subclass do not have DOM wrappers that we need
--- a/dom/svg/SVGPathData.h
+++ b/dom/svg/SVGPathData.h
@@ -11,17 +11,17 @@
 #include "nsDebug.h"
 #include "nsIContent.h"
 #include "nsINode.h"
 #include "nsIWeakReferenceUtils.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/Types.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/RefPtr.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsTArray.h"
 
 #include <string.h>
 
 class nsSVGPathDataParser;  // IWYU pragma: keep
 
 struct nsSVGMark;
 
@@ -226,26 +226,26 @@ class SVGPathData {
  * have write access to the lists it works with.
  *
  * Instances of this class do not have DOM wrappers that need to be kept in
  * sync, so we can safely expose any protected base class methods required by
  * the SMIL code.
  */
 class SVGPathDataAndInfo final : public SVGPathData {
  public:
-  explicit SVGPathDataAndInfo(nsSVGElement* aElement = nullptr)
+  explicit SVGPathDataAndInfo(dom::SVGElement* aElement = nullptr)
       : mElement(do_GetWeakReference(static_cast<nsINode*>(aElement))) {}
 
-  void SetElement(nsSVGElement* aElement) {
+  void SetElement(dom::SVGElement* aElement) {
     mElement = do_GetWeakReference(static_cast<nsINode*>(aElement));
   }
 
-  nsSVGElement* Element() const {
+  dom::SVGElement* Element() const {
     nsCOMPtr<nsIContent> e = do_QueryReferent(mElement);
-    return static_cast<nsSVGElement*>(e.get());
+    return static_cast<dom::SVGElement*>(e.get());
   }
 
   nsresult CopyFrom(const SVGPathDataAndInfo& rhs) {
     mElement = rhs.mElement;
     return SVGPathData::CopyFrom(rhs);
   }
 
   /**
--- a/dom/svg/SVGPathElement.cpp
+++ b/dom/svg/SVGPathElement.cpp
@@ -210,17 +210,17 @@ already_AddRefed<DOMSVGPathSegList> SVGP
   return DOMSVGPathSegList::GetDOMWrapper(mD.GetBaseValKey(), this, false);
 }
 
 already_AddRefed<DOMSVGPathSegList> SVGPathElement::AnimatedPathSegList() {
   return DOMSVGPathSegList::GetDOMWrapper(mD.GetAnimValKey(), this, true);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ bool SVGPathElement::HasValidDimensions() const {
   return !mD.GetAnimValue().IsEmpty();
 }
 
 //----------------------------------------------------------------------
 // nsIContent methods
 
--- a/dom/svg/SVGPatternElement.cpp
+++ b/dom/svg/SVGPatternElement.cpp
@@ -23,34 +23,34 @@ using namespace SVGUnitTypes_Binding;
 
 JSObject* SVGPatternElement::WrapNode(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
   return SVGPatternElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 //--------------------- Patterns ------------------------
 
-nsSVGElement::LengthInfo SVGPatternElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGPatternElement::sLengthInfo[4] = {
     {nsGkAtoms::x, 0, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::y, 0, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
     {nsGkAtoms::width, 0, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::height, 0, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
 };
 
-nsSVGElement::EnumInfo SVGPatternElement::sEnumInfo[2] = {
+SVGElement::EnumInfo SVGPatternElement::sEnumInfo[2] = {
     {nsGkAtoms::patternUnits, sSVGUnitTypesMap,
      SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
     {nsGkAtoms::patternContentUnits, sSVGUnitTypesMap,
      SVG_UNIT_TYPE_USERSPACEONUSE}};
 
-nsSVGElement::StringInfo SVGPatternElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGPatternElement::sStringInfo[2] = {
     {nsGkAtoms::href, kNameSpaceID_None, true},
     {nsGkAtoms::href, kNameSpaceID_XLink, true}};
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGPatternElement::SVGPatternElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
@@ -130,47 +130,47 @@ SVGPatternElement::IsAttributeMapped(con
                                                     sTextContentElementsMap,
                                                     sViewportsMap};
 
   return FindAttributeDependence(name, map) ||
          SVGPatternElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 nsSVGAnimatedTransformList* SVGPatternElement::GetAnimatedTransformList(
     uint32_t aFlags) {
   if (!mPatternTransform && (aFlags & DO_ALLOCATE)) {
     mPatternTransform = new nsSVGAnimatedTransformList();
   }
   return mPatternTransform;
 }
 
 /* virtual */ bool SVGPatternElement::HasValidDimensions() const {
   return mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() &&
          mLengthAttributes[ATTR_WIDTH].GetAnimValInSpecifiedUnits() > 0 &&
          mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet() &&
          mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0;
 }
 
-nsSVGElement::LengthAttributesInfo SVGPatternElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGPatternElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGPatternElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGPatternElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
 nsSVGViewBox* SVGPatternElement::GetViewBox() { return &mViewBox; }
 
 SVGAnimatedPreserveAspectRatio* SVGPatternElement::GetPreserveAspectRatio() {
   return &mPreserveAspectRatio;
 }
 
-nsSVGElement::StringAttributesInfo SVGPatternElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGPatternElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGPatternElement.h
+++ b/dom/svg/SVGPatternElement.h
@@ -6,31 +6,31 @@
 
 #ifndef mozilla_dom_SVGPatternElement_h
 #define mozilla_dom_SVGPatternElement_h
 
 #include "nsAutoPtr.h"
 #include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGViewBox.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "nsSVGAnimatedTransformList.h"
 
 class nsSVGPatternFrame;
 
 nsresult NS_NewSVGPatternElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 class SVGAnimatedTransformList;
 
-typedef nsSVGElement SVGPatternElementBase;
+typedef SVGElement SVGPatternElementBase;
 
 class SVGPatternElement final : public SVGPatternElementBase {
   friend class ::nsSVGPatternFrame;
 
  protected:
   friend nsresult(::NS_NewSVGPatternElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
--- a/dom/svg/SVGPointList.h
+++ b/dom/svg/SVGPointList.h
@@ -7,17 +7,17 @@
 #ifndef MOZILLA_SVGPOINTLIST_H__
 #define MOZILLA_SVGPOINTLIST_H__
 
 #include "nsCOMPtr.h"
 #include "nsDebug.h"
 #include "nsIContent.h"
 #include "nsINode.h"
 #include "nsIWeakReferenceUtils.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsTArray.h"
 #include "SVGPoint.h"
 
 #include <string.h>
 
 namespace mozilla {
 class nsISVGPoint;
 
@@ -137,26 +137,26 @@ class SVGPointList {
  * This class contains a strong reference to the element that instances of
  * this class are being used to animate. This is because the SMIL code stores
  * instances of this class in nsSMILValue objects, some of which are cached.
  * Holding a strong reference to the element here prevents the element from
  * disappearing out from under the SMIL code unexpectedly.
  */
 class SVGPointListAndInfo : public SVGPointList {
  public:
-  explicit SVGPointListAndInfo(nsSVGElement* aElement = nullptr)
+  explicit SVGPointListAndInfo(dom::SVGElement* aElement = nullptr)
       : mElement(do_GetWeakReference(static_cast<nsINode*>(aElement))) {}
 
-  void SetInfo(nsSVGElement* aElement) {
+  void SetInfo(dom::SVGElement* aElement) {
     mElement = do_GetWeakReference(static_cast<nsINode*>(aElement));
   }
 
-  nsSVGElement* Element() const {
+  dom::SVGElement* Element() const {
     nsCOMPtr<nsIContent> e = do_QueryReferent(mElement);
-    return static_cast<nsSVGElement*>(e.get());
+    return static_cast<dom::SVGElement*>(e.get());
   }
 
   /**
    * Returns true if this object is an "identity" value, from the perspective
    * of SMIL. In other words, returns true until the initial value set up in
    * SVGPointListSMILType::Init() has been changed with a SetInfo() call.
    */
   bool IsIdentity() const {
--- a/dom/svg/SVGPolyElement.cpp
+++ b/dom/svg/SVGPolyElement.cpp
@@ -44,17 +44,17 @@ NS_IMETHODIMP_(bool)
 SVGPolyElement::IsAttributeMapped(const nsAtom* name) const {
   static const MappedAttributeEntry* const map[] = {sMarkersMap};
 
   return FindAttributeDependence(name, map) ||
          SVGPolyElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ bool SVGPolyElement::HasValidDimensions() const {
   return !mPoints.GetAnimValue().IsEmpty();
 }
 
 //----------------------------------------------------------------------
 // SVGGeometryElement methods
 
--- a/dom/svg/SVGPolyElement.h
+++ b/dom/svg/SVGPolyElement.h
@@ -34,17 +34,17 @@ class SVGPolyElement : public SVGPolyEle
 
   virtual SVGAnimatedPointList* GetAnimatedPointList() override {
     return &mPoints;
   }
   virtual nsStaticAtom* GetPointListAttrName() const override {
     return nsGkAtoms::points;
   }
 
-  // nsSVGElement methods:
+  // SVGElement methods:
   virtual bool HasValidDimensions() const override;
 
   // SVGGeometryElement methods:
   virtual bool AttributeDefinesGeometry(const nsAtom* aName) override;
   virtual bool IsMarkable() override { return true; }
   virtual void GetMarkPoints(nsTArray<nsSVGMark>* aMarks) override;
   virtual bool GetGeometryBounds(
       Rect* aBounds, const StrokeOptions& aStrokeOptions,
--- a/dom/svg/SVGPreserveAspectRatio.h
+++ b/dom/svg/SVGPreserveAspectRatio.h
@@ -8,17 +8,17 @@
 #define MOZILLA_CONTENT_SVGPRESERVEASPECTRATIO_H_
 
 #include "mozilla/dom/SVGPreserveAspectRatioBinding.h"
 #include "mozilla/HashFunctions.h"  // for HashGeneric
 
 #include "nsWrapperCache.h"
 #include "nsCycleCollectionParticipant.h"
 #include "mozilla/ErrorResult.h"
-#include "nsSVGElement.h"
+#include "mozilla/dom/SVGElement.h"
 
 namespace mozilla {
 
 // These constants represent the range of valid enum values for the <align>
 // parameter. They exclude the sentinel _UNKNOWN value.
 const uint16_t SVG_ALIGN_MIN_VALID =
     dom::SVGPreserveAspectRatio_Binding::SVG_PRESERVEASPECTRATIO_NONE;
 const uint16_t SVG_ALIGN_MAX_VALID =
@@ -83,34 +83,34 @@ namespace dom {
 
 class DOMSVGPreserveAspectRatio final : public nsISupports,
                                         public nsWrapperCache {
  public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGPreserveAspectRatio)
 
   DOMSVGPreserveAspectRatio(SVGAnimatedPreserveAspectRatio* aVal,
-                            nsSVGElement* aSVGElement, bool aIsBaseValue)
+                            SVGElement* aSVGElement, bool aIsBaseValue)
       : mVal(aVal), mSVGElement(aSVGElement), mIsBaseValue(aIsBaseValue) {}
 
   // WebIDL
-  nsSVGElement* GetParentObject() const { return mSVGElement; }
+  SVGElement* GetParentObject() const { return mSVGElement; }
   virtual JSObject* WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) override;
 
   uint16_t Align();
   void SetAlign(uint16_t aAlign, ErrorResult& rv);
   uint16_t MeetOrSlice();
   void SetMeetOrSlice(uint16_t aMeetOrSlice, ErrorResult& rv);
 
  protected:
   ~DOMSVGPreserveAspectRatio();
 
   SVGAnimatedPreserveAspectRatio*
       mVal;  // kept alive because it belongs to mSVGElement
-  RefPtr<nsSVGElement> mSVGElement;
+  RefPtr<SVGElement> mSVGElement;
   const bool mIsBaseValue;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // MOZILLA_CONTENT_SVGPRESERVEASPECTRATIO_H_
--- a/dom/svg/SVGRect.cpp
+++ b/dom/svg/SVGRect.cpp
@@ -1,16 +1,16 @@
 /* -*- 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 "mozilla/dom/SVGRect.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 using namespace mozilla::gfx;
 
 namespace mozilla {
 namespace dom {
 
 //----------------------------------------------------------------------
 // implementation:
--- a/dom/svg/SVGRect.h
+++ b/dom/svg/SVGRect.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_SVGRect_h
 #define mozilla_dom_SVGRect_h
 
 #include "mozilla/dom/SVGIRect.h"
 #include "mozilla/gfx/Rect.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 
 ////////////////////////////////////////////////////////////////////////
 // SVGRect class
 
 namespace mozilla {
 namespace dom {
 
 class SVGRect final : public SVGIRect {
--- a/dom/svg/SVGRectElement.cpp
+++ b/dom/svg/SVGRectElement.cpp
@@ -23,17 +23,17 @@ namespace dom {
 
 class SVGAnimatedLength;
 
 JSObject* SVGRectElement::WrapNode(JSContext* aCx,
                                    JS::Handle<JSObject*> aGivenProto) {
   return SVGRectElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGRectElement::sLengthInfo[6] = {
+SVGElement::LengthInfo SVGRectElement::sLengthInfo[6] = {
     {nsGkAtoms::x, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::y, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
     {nsGkAtoms::width, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::height, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
@@ -76,26 +76,26 @@ already_AddRefed<SVGAnimatedLength> SVGR
   return mLengthAttributes[ATTR_RX].ToDOMAnimatedLength(this);
 }
 
 already_AddRefed<SVGAnimatedLength> SVGRectElement::Ry() {
   return mLengthAttributes[ATTR_RY].ToDOMAnimatedLength(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ bool SVGRectElement::HasValidDimensions() const {
   return mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() &&
          mLengthAttributes[ATTR_WIDTH].GetAnimValInSpecifiedUnits() > 0 &&
          mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet() &&
          mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0;
 }
 
-nsSVGElement::LengthAttributesInfo SVGRectElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGRectElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
 // SVGGeometryElement methods
 
 bool SVGRectElement::GetGeometryBounds(Rect* aBounds,
--- a/dom/svg/SVGSVGElement.cpp
+++ b/dom/svg/SVGSVGElement.cpp
@@ -35,17 +35,17 @@ namespace dom {
 using namespace SVGPreserveAspectRatio_Binding;
 using namespace SVGSVGElement_Binding;
 
 nsSVGEnumMapping SVGSVGElement::sZoomAndPanMap[] = {
     {nsGkAtoms::disable, SVG_ZOOMANDPAN_DISABLE},
     {nsGkAtoms::magnify, SVG_ZOOMANDPAN_MAGNIFY},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGSVGElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGSVGElement::sEnumInfo[1] = {
     {nsGkAtoms::zoomAndPan, sZoomAndPanMap, SVG_ZOOMANDPAN_MAGNIFY}};
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(DOMSVGTranslatePoint, nsISVGPoint, mElement)
 
 NS_IMPL_ADDREF_INHERITED(DOMSVGTranslatePoint, nsISVGPoint)
 NS_IMPL_RELEASE_INHERITED(DOMSVGTranslatePoint, nsISVGPoint)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGTranslatePoint)
@@ -370,17 +370,17 @@ nsSMILTimeContainer* SVGSVGElement::GetT
 
   if (outerSVGElement) {
     return outerSVGElement->GetTimedDocumentRoot();
   }
   // invalid structure
   return nullptr;
 }
 //----------------------------------------------------------------------
-// nsSVGElement
+// SVGElement
 nsresult SVGSVGElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                                    nsIContent* aBindingParent) {
   nsSMILAnimationController* smilController = nullptr;
 
   if (aDocument) {
     smilController = aDocument->GetAnimationController();
     if (smilController) {
       // SMIL is enabled in this document
@@ -517,17 +517,17 @@ void SVGSVGElement::InvalidateTransformN
   nsISVGSVGFrame* svgframe = do_QueryFrame(GetPrimaryFrame());
   // might fail this check if we've failed conditional processing
   if (svgframe) {
     svgframe->NotifyViewportOrTransformChanged(
         nsSVGDisplayableFrame::TRANSFORM_CHANGED);
   }
 }
 
-nsSVGElement::EnumAttributesInfo SVGSVGElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGSVGElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
 void SVGSVGElement::SetImageOverridePreserveAspectRatio(
     const SVGPreserveAspectRatio& aPAR) {
 #ifdef DEBUG
   MOZ_ASSERT(OwnerDoc()->IsBeingUsedAsImage(),
              "should only override preserveAspectRatio in images");
--- a/dom/svg/SVGSVGElement.h
+++ b/dom/svg/SVGSVGElement.h
@@ -139,17 +139,17 @@ class SVGSVGElement final : public SVGSV
   already_AddRefed<SVGIRect> CreateSVGRect();
   already_AddRefed<SVGTransform> CreateSVGTransform();
   already_AddRefed<SVGTransform> CreateSVGTransformFromMatrix(
       SVGMatrix& matrix);
   using nsINode::GetElementById;  // This does what we want
   uint16_t ZoomAndPan();
   void SetZoomAndPan(uint16_t aZoomAndPan, ErrorResult& rv);
 
-  // nsSVGElement overrides
+  // SVGElement overrides
 
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent) override;
   virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
   virtual nsSVGAnimatedTransformList* GetAnimatedTransformList(
       uint32_t aFlags = 0) override;
 
   // SVGSVGElement methods:
--- a/dom/svg/SVGScriptElement.cpp
+++ b/dom/svg/SVGScriptElement.cpp
@@ -16,17 +16,17 @@ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT_CH
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGScriptElement::WrapNode(JSContext* aCx,
                                      JS::Handle<JSObject*> aGivenProto) {
   return SVGScriptElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::StringInfo SVGScriptElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGScriptElement::sStringInfo[2] = {
     {nsGkAtoms::href, kNameSpaceID_None, false},
     {nsGkAtoms::href, kNameSpaceID_XLink, false}};
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
 NS_IMPL_ISUPPORTS_INHERITED(SVGScriptElement, SVGScriptElementBase,
                             nsIScriptLoaderObserver, nsIScriptElement,
@@ -166,19 +166,19 @@ void SVGScriptElement::FreezeExecutionAt
 bool SVGScriptElement::HasScriptContent() {
   return (mFrozen ? mExternal
                   : mStringAttributes[HREF].IsExplicitlySet() ||
                         mStringAttributes[XLINK_HREF].IsExplicitlySet()) ||
          nsContentUtils::HasNonEmptyTextContent(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::StringAttributesInfo SVGScriptElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGScriptElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 //----------------------------------------------------------------------
 // nsIContent methods
 
 nsresult SVGScriptElement::BindToTree(nsIDocument* aDocument,
--- a/dom/svg/SVGScriptElement.h
+++ b/dom/svg/SVGScriptElement.h
@@ -2,31 +2,31 @@
 /* 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/. */
 
 #ifndef mozilla_dom_SVGScriptElement_h
 #define mozilla_dom_SVGScriptElement_h
 
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsCOMPtr.h"
 #include "nsSVGString.h"
 #include "mozilla/dom/ScriptElement.h"
 
 class nsIDocument;
 
 nsresult NS_NewSVGScriptElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
     mozilla::dom::FromParser aFromParser);
 
 namespace mozilla {
 namespace dom {
 
-typedef nsSVGElement SVGScriptElementBase;
+typedef SVGElement SVGScriptElementBase;
 
 class SVGScriptElement final : public SVGScriptElementBase,
                                public ScriptElement {
  protected:
   friend nsresult(::NS_NewSVGScriptElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
       mozilla::dom::FromParser aFromParser));
--- a/dom/svg/SVGStopElement.cpp
+++ b/dom/svg/SVGStopElement.cpp
@@ -12,18 +12,18 @@ NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(St
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGStopElement::WrapNode(JSContext* aCx,
                                    JS::Handle<JSObject*> aGivenProto) {
   return SVGStopElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::NumberInfo SVGStopElement::sNumberInfo = {nsGkAtoms::offset, 0,
-                                                        true};
+SVGElement::NumberInfo SVGStopElement::sNumberInfo = {nsGkAtoms::offset, 0,
+                                                      true};
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGStopElement::SVGStopElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : SVGStopElementBase(std::move(aNodeInfo)) {}
 
@@ -36,17 +36,17 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGStopE
 
 already_AddRefed<SVGAnimatedNumber> SVGStopElement::Offset() {
   return mOffset.ToDOMAnimatedNumber(this);
 }
 
 //----------------------------------------------------------------------
 // sSVGElement methods
 
-nsSVGElement::NumberAttributesInfo SVGStopElement::GetNumberInfo() {
+SVGElement::NumberAttributesInfo SVGStopElement::GetNumberInfo() {
   return NumberAttributesInfo(&mOffset, &sNumberInfo, 1);
 }
 
 //----------------------------------------------------------------------
 // nsIContent methods
 
 NS_IMETHODIMP_(bool)
 SVGStopElement::IsAttributeMapped(const nsAtom* name) const {
--- a/dom/svg/SVGStopElement.h
+++ b/dom/svg/SVGStopElement.h
@@ -2,27 +2,27 @@
 /* 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/. */
 
 #ifndef mozilla_dom_SVGStopElement_h
 #define mozilla_dom_SVGStopElement_h
 
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGNumber2.h"
 
 nsresult NS_NewSVGStopElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGElement SVGStopElementBase;
-
 namespace mozilla {
 namespace dom {
 
+typedef SVGElement SVGStopElementBase;
+
 class SVGStopElement final : public SVGStopElementBase {
  protected:
   friend nsresult(::NS_NewSVGStopElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGStopElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
   virtual JSObject* WrapNode(JSContext* aCx,
                              JS::Handle<JSObject*> aGivenProto) override;
--- a/dom/svg/SVGStyleElement.h
+++ b/dom/svg/SVGStyleElement.h
@@ -3,28 +3,28 @@
 /* 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_SVGStyleElement_h
 #define mozilla_dom_SVGStyleElement_h
 
 #include "mozilla/Attributes.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsStyleLinkElement.h"
 #include "nsStubMutationObserver.h"
 
 nsresult NS_NewSVGStyleElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
-typedef nsSVGElement SVGStyleElementBase;
-
 namespace mozilla {
 namespace dom {
 
+typedef SVGElement SVGStyleElementBase;
+
 class SVGStyleElement final : public SVGStyleElementBase,
                               public nsStyleLinkElement,
                               public nsStubMutationObserver {
  protected:
   friend nsresult(::NS_NewSVGStyleElement(
       nsIContent** aResult,
       already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGStyleElement(
--- a/dom/svg/SVGTSpanElement.cpp
+++ b/dom/svg/SVGTSpanElement.cpp
@@ -19,21 +19,21 @@ JSObject* SVGTSpanElement::WrapNode(JSCo
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGTSpanElement::SVGTSpanElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : SVGTSpanElementBase(std::move(aNodeInfo)) {}
 
-nsSVGElement::EnumAttributesInfo SVGTSpanElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGTSpanElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::LengthAttributesInfo SVGTSpanElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGTSpanElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGTSpanElement)
--- a/dom/svg/SVGTests.h
+++ b/dom/svg/SVGTests.h
@@ -9,30 +9,31 @@
 
 #include "nsStringFwd.h"
 #include "SVGStringList.h"
 #include "nsCOMPtr.h"
 
 class nsAttrValue;
 class nsAtom;
 class nsStaticAtom;
-class nsSVGElement;
 
 namespace mozilla {
 class DOMSVGStringList;
 
 #define MOZILLA_DOMSVGTESTS_IID                      \
   {                                                  \
     0x92370da8, 0xda28, 0x4895, {                    \
       0x9b, 0x1b, 0xe0, 0x06, 0x0d, 0xb7, 0x3f, 0xc3 \
     }                                                \
   }
 
 namespace dom {
 
+class SVGElement;
+
 class SVGTests : public nsISupports {
  public:
   NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGTESTS_IID)
 
   SVGTests();
 
   friend class mozilla::DOMSVGStringList;
   typedef mozilla::SVGStringList SVGStringList;
@@ -92,19 +93,19 @@ class SVGTests : public nsISupports {
   void MaybeInvalidate();
 
   // WebIDL
   already_AddRefed<DOMSVGStringList> RequiredFeatures();
   already_AddRefed<DOMSVGStringList> RequiredExtensions();
   already_AddRefed<DOMSVGStringList> SystemLanguage();
   bool HasExtension(const nsAString& aExtension);
 
-  virtual nsSVGElement* AsSVGElement() = 0;
+  virtual SVGElement* AsSVGElement() = 0;
 
-  const nsSVGElement* AsSVGElement() const {
+  const SVGElement* AsSVGElement() const {
     return const_cast<SVGTests*>(this)->AsSVGElement();
   }
 
  protected:
   virtual ~SVGTests() {}
 
  private:
   enum { FEATURES, EXTENSIONS, LANGUAGE };
--- a/dom/svg/SVGTextContentElement.cpp
+++ b/dom/svg/SVGTextContentElement.cpp
@@ -21,20 +21,20 @@ namespace dom {
 
 using namespace SVGTextContentElement_Binding;
 
 nsSVGEnumMapping SVGTextContentElement::sLengthAdjustMap[] = {
     {nsGkAtoms::spacing, LENGTHADJUST_SPACING},
     {nsGkAtoms::spacingAndGlyphs, LENGTHADJUST_SPACINGANDGLYPHS},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGTextContentElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGTextContentElement::sEnumInfo[1] = {
     {nsGkAtoms::lengthAdjust, sLengthAdjustMap, LENGTHADJUST_SPACING}};
 
-nsSVGElement::LengthInfo SVGTextContentElement::sLengthInfo[1] = {
+SVGElement::LengthInfo SVGTextContentElement::sLengthInfo[1] = {
     {nsGkAtoms::textLength, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::XY}};
 
 SVGTextFrame* SVGTextContentElement::GetSVGTextFrame() {
   nsIFrame* frame = GetPrimaryFrame(FlushType::Layout);
   nsIFrame* textFrame =
       nsLayoutUtils::GetClosestFrameOfType(frame, LayoutFrameType::SVGText);
   return static_cast<SVGTextFrame*>(textFrame);
--- a/dom/svg/SVGTextElement.cpp
+++ b/dom/svg/SVGTextElement.cpp
@@ -19,21 +19,21 @@ JSObject* SVGTextElement::WrapNode(JSCon
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGTextElement::SVGTextElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : SVGTextElementBase(std::move(aNodeInfo)) {}
 
-nsSVGElement::EnumAttributesInfo SVGTextElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGTextElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::LengthAttributesInfo SVGTextElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGTextElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 //----------------------------------------------------------------------
 // nsINode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGTextElement)
--- a/dom/svg/SVGTextPathElement.cpp
+++ b/dom/svg/SVGTextPathElement.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/SVGTextPathElement.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 #include "mozilla/dom/SVGTextContentElementBinding.h"
 #include "mozilla/dom/SVGTextPathElementBinding.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsGkAtoms.h"
 #include "nsError.h"
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(TextPath)
 
 namespace mozilla {
 namespace dom {
 
@@ -22,17 +22,17 @@ using namespace SVGTextPathElement_Bindi
 
 class SVGAnimatedLength;
 
 JSObject* SVGTextPathElement::WrapNode(JSContext* aCx,
                                        JS::Handle<JSObject*> aGivenProto) {
   return SVGTextPathElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-nsSVGElement::LengthInfo SVGTextPathElement::sLengthInfo[2] = {
+SVGElement::LengthInfo SVGTextPathElement::sLengthInfo[2] = {
     // from SVGTextContentElement:
     {nsGkAtoms::textLength, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::XY},
     // from SVGTextPathElement:
     {nsGkAtoms::startOffset, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X}};
 
 nsSVGEnumMapping SVGTextPathElement::sMethodMap[] = {
@@ -45,25 +45,25 @@ nsSVGEnumMapping SVGTextPathElement::sSp
     {nsGkAtoms::exact, TEXTPATH_SPACINGTYPE_EXACT},
     {nullptr, 0}};
 
 nsSVGEnumMapping SVGTextPathElement::sSideMap[] = {
     {nsGkAtoms::left, TEXTPATH_SIDETYPE_LEFT},
     {nsGkAtoms::right, TEXTPATH_SIDETYPE_RIGHT},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGTextPathElement::sEnumInfo[4] = {
+SVGElement::EnumInfo SVGTextPathElement::sEnumInfo[4] = {
     // from SVGTextContentElement:
     {nsGkAtoms::lengthAdjust, sLengthAdjustMap, LENGTHADJUST_SPACING},
     // from SVGTextPathElement:
     {nsGkAtoms::method, sMethodMap, TEXTPATH_METHODTYPE_ALIGN},
     {nsGkAtoms::spacing, sSpacingMap, TEXTPATH_SPACINGTYPE_EXACT},
     {nsGkAtoms::side_, sSideMap, TEXTPATH_SIDETYPE_LEFT}};
 
-nsSVGElement::StringInfo SVGTextPathElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGTextPathElement::sStringInfo[2] = {
     {nsGkAtoms::href, kNameSpaceID_None, true},
     {nsGkAtoms::href, kNameSpaceID_XLink, true}};
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGTextPathElement::SVGTextPathElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
@@ -115,26 +115,26 @@ SVGTextPathElement::IsAttributeMapped(co
       sColorMap, sFillStrokeMap, sFontSpecificationMap, sGraphicsMap,
       sTextContentElementsMap};
 
   return FindAttributeDependence(name, map) ||
          SVGTextPathElementBase::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement overrides
+// SVGElement overrides
 
-nsSVGElement::LengthAttributesInfo SVGTextPathElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGTextPathElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
-nsSVGElement::EnumAttributesInfo SVGTextPathElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGTextPathElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGTextPathElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGTextPathElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGTextPositioningElement.cpp
+++ b/dom/svg/SVGTextPositioningElement.cpp
@@ -10,32 +10,32 @@
 #include "SVGAnimatedLengthList.h"
 #include "DOMSVGAnimatedLengthList.h"
 #include "DOMSVGAnimatedNumberList.h"
 #include "SVGContentUtils.h"
 
 namespace mozilla {
 namespace dom {
 
-nsSVGElement::LengthListInfo SVGTextPositioningElement::sLengthListInfo[4] = {
+SVGElement::LengthListInfo SVGTextPositioningElement::sLengthListInfo[4] = {
     {nsGkAtoms::x, SVGContentUtils::X, false},
     {nsGkAtoms::y, SVGContentUtils::Y, false},
     {nsGkAtoms::dx, SVGContentUtils::X, true},
     {nsGkAtoms::dy, SVGContentUtils::Y, true}};
 
-nsSVGElement::LengthListAttributesInfo
+SVGElement::LengthListAttributesInfo
 SVGTextPositioningElement::GetLengthListInfo() {
   return LengthListAttributesInfo(mLengthListAttributes, sLengthListInfo,
                                   ArrayLength(sLengthListInfo));
 }
 
-nsSVGElement::NumberListInfo SVGTextPositioningElement::sNumberListInfo[1] = {
+SVGElement::NumberListInfo SVGTextPositioningElement::sNumberListInfo[1] = {
     {nsGkAtoms::rotate}};
 
-nsSVGElement::NumberListAttributesInfo
+SVGElement::NumberListAttributesInfo
 SVGTextPositioningElement::GetNumberListInfo() {
   return NumberListAttributesInfo(mNumberListAttributes, sNumberListInfo,
                                   ArrayLength(sNumberListInfo));
 }
 
 //----------------------------------------------------------------------
 
 already_AddRefed<DOMSVGAnimatedLengthList> SVGTextPositioningElement::X() {
--- a/dom/svg/SVGTitleElement.h
+++ b/dom/svg/SVGTitleElement.h
@@ -3,26 +3,26 @@
 /* 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_SVGTitleElement_h
 #define mozilla_dom_SVGTitleElement_h
 
 #include "mozilla/Attributes.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsStubMutationObserver.h"
 
-typedef nsSVGElement SVGTitleElementBase;
-
 nsresult NS_NewSVGTitleElement(
     nsIContent **aResult, already_AddRefed<mozilla::dom::NodeInfo> &&aNodeInfo);
 namespace mozilla {
 namespace dom {
 
+typedef SVGElement SVGTitleElementBase;
+
 class SVGTitleElement final : public SVGTitleElementBase,
                               public nsStubMutationObserver {
  protected:
   friend nsresult(::NS_NewSVGTitleElement(
       nsIContent **aResult,
       already_AddRefed<mozilla::dom::NodeInfo> &&aNodeInfo));
   explicit SVGTitleElement(
       already_AddRefed<mozilla::dom::NodeInfo> &&aNodeInfo);
--- a/dom/svg/SVGTransform.h
+++ b/dom/svg/SVGTransform.h
@@ -12,23 +12,22 @@
 #include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDebug.h"
 #include "nsID.h"
 #include "nsSVGTransform.h"
 #include "nsWrapperCache.h"
 #include "mozilla/Attributes.h"
 
-class nsSVGElement;
-
 #define MOZ_SVG_LIST_INDEX_BIT_COUNT 31  // supports > 2 billion list items
 
 namespace mozilla {
 namespace dom {
 
+class SVGElement;
 class SVGMatrix;
 
 /**
  * DOM wrapper for an SVG transform. See DOMSVGLength.h.
  */
 class SVGTransform final : public nsWrapperCache {
   friend class AutoChangeTransformNotifier;
 
@@ -123,17 +122,17 @@ class SVGTransform final : public nsWrap
 
   // Interface for SVGMatrix's use
   friend class dom::SVGMatrix;
   bool IsAnimVal() const { return mIsAnimValItem; }
   const gfxMatrix& Matrixgfx() const { return Transform().GetMatrix(); }
   void SetMatrix(const gfxMatrix& aMatrix);
 
  private:
-  nsSVGElement* Element() { return mList->Element(); }
+  SVGElement* Element() { return mList->Element(); }
 
   /**
    * Get a reference to the internal nsSVGTransform list item that this DOM
    * wrapper object currently wraps.
    */
   nsSVGTransform& InternalItem();
   const nsSVGTransform& InternalItem() const;
 
--- a/dom/svg/SVGTransformableElement.cpp
+++ b/dom/svg/SVGTransformableElement.cpp
@@ -35,23 +35,23 @@ SVGTransformableElement::Transform() {
 // nsIContent methods
 
 NS_IMETHODIMP_(bool)
 SVGTransformableElement::IsAttributeMapped(const nsAtom* name) const {
   static const MappedAttributeEntry* const map[] = {sColorMap, sFillStrokeMap,
                                                     sGraphicsMap};
 
   return FindAttributeDependence(name, map) ||
-         nsSVGElement::IsAttributeMapped(name);
+         SVGElement::IsAttributeMapped(name);
 }
 
 nsChangeHint SVGTransformableElement::GetAttributeChangeHint(
     const nsAtom* aAttribute, int32_t aModType) const {
   nsChangeHint retval =
-      nsSVGElement::GetAttributeChangeHint(aAttribute, aModType);
+      SVGElement::GetAttributeChangeHint(aAttribute, aModType);
   if (aAttribute == nsGkAtoms::transform ||
       aAttribute == nsGkAtoms::mozAnimateMotionDummyAttr) {
     nsIFrame* frame =
         const_cast<SVGTransformableElement*>(this)->GetPrimaryFrame();
     retval |= nsChangeHint_InvalidateRenderingObservers;
     if (!frame || (frame->GetStateBits() & NS_FRAME_IS_NONDISPLAY)) {
       return retval;
     }
@@ -84,17 +84,17 @@ nsChangeHint SVGTransformableElement::Ge
   return retval;
 }
 
 bool SVGTransformableElement::IsEventAttributeNameInternal(nsAtom* aName) {
   return nsContentUtils::IsEventAttributeName(aName, EventNameType_SVGGraphic);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement overrides
+// SVGElement overrides
 
 gfxMatrix SVGTransformableElement::PrependLocalTransformsTo(
     const gfxMatrix& aMatrix, SVGTransformTypes aWhich) const {
   if (aWhich == eChildToUserSpace) {
     // We don't have any eUserSpaceToParent transforms. (Sub-classes that do
     // must override this function and handle that themselves.)
     return aMatrix;
   }
@@ -141,21 +141,21 @@ void SVGTransformableElement::SetAnimate
 nsSVGAnimatedTransformList* SVGTransformableElement::GetAnimatedTransformList(
     uint32_t aFlags) {
   if (!mTransforms && (aFlags & DO_ALLOCATE)) {
     mTransforms = new nsSVGAnimatedTransformList();
   }
   return mTransforms;
 }
 
-nsSVGElement* SVGTransformableElement::GetNearestViewportElement() {
+SVGElement* SVGTransformableElement::GetNearestViewportElement() {
   return SVGContentUtils::GetNearestViewportElement(this);
 }
 
-nsSVGElement* SVGTransformableElement::GetFarthestViewportElement() {
+SVGElement* SVGTransformableElement::GetFarthestViewportElement() {
   return SVGContentUtils::GetOuterSVGElement(this);
 }
 
 already_AddRefed<SVGIRect> SVGTransformableElement::GetBBox(
     const SVGBoundingBoxOptions& aOptions, ErrorResult& rv) {
   nsIFrame* frame = GetPrimaryFrame(FlushType::Layout);
 
   if (!frame || (frame->GetStateBits() & NS_FRAME_IS_NONDISPLAY)) {
--- a/dom/svg/SVGTransformableElement.h
+++ b/dom/svg/SVGTransformableElement.h
@@ -5,56 +5,56 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef SVGTransformableElement_h
 #define SVGTransformableElement_h
 
 #include "mozilla/Attributes.h"
 #include "nsAutoPtr.h"
 #include "nsSVGAnimatedTransformList.h"
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "gfxMatrix.h"
 #include "mozilla/gfx/Matrix.h"
 
 namespace mozilla {
 namespace dom {
 
 class SVGAnimatedTransformList;
 class SVGGraphicsElement;
 class SVGMatrix;
 class SVGIRect;
 struct SVGBoundingBoxOptions;
 
-class SVGTransformableElement : public nsSVGElement {
+class SVGTransformableElement : public SVGElement {
  public:
   explicit SVGTransformableElement(already_AddRefed<dom::NodeInfo>&& aNodeInfo)
-      : nsSVGElement(std::move(aNodeInfo)) {}
+      : SVGElement(std::move(aNodeInfo)) {}
   virtual ~SVGTransformableElement() {}
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override = 0;
 
   // WebIDL
   already_AddRefed<SVGAnimatedTransformList> Transform();
-  nsSVGElement* GetNearestViewportElement();
-  nsSVGElement* GetFarthestViewportElement();
+  SVGElement* GetNearestViewportElement();
+  SVGElement* GetFarthestViewportElement();
   MOZ_CAN_RUN_SCRIPT
   already_AddRefed<SVGIRect> GetBBox(const SVGBoundingBoxOptions& aOptions,
                                      ErrorResult& rv);
   already_AddRefed<SVGMatrix> GetCTM();
   already_AddRefed<SVGMatrix> GetScreenCTM();
   already_AddRefed<SVGMatrix> GetTransformToElement(
       SVGGraphicsElement& aElement, ErrorResult& rv);
 
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
 
   nsChangeHint GetAttributeChangeHint(const nsAtom* aAttribute,
                                       int32_t aModType) const override;
 
-  // nsSVGElement overrides
+  // SVGElement overrides
   virtual bool IsEventAttributeNameInternal(nsAtom* aName) override;
 
   virtual gfxMatrix PrependLocalTransformsTo(
       const gfxMatrix& aMatrix,
       SVGTransformTypes aWhich = eAllTransforms) const override;
   virtual const gfx::Matrix* GetAnimateMotionTransform() const override;
   virtual void SetAnimateMotionTransform(const gfx::Matrix* aMatrix) override;
 
--- a/dom/svg/SVGUseElement.cpp
+++ b/dom/svg/SVGUseElement.cpp
@@ -30,28 +30,28 @@ namespace dom {
 JSObject* SVGUseElement::WrapNode(JSContext* aCx,
                                   JS::Handle<JSObject*> aGivenProto) {
   return SVGUseElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 ////////////////////////////////////////////////////////////////////////
 // implementation
 
-nsSVGElement::LengthInfo SVGUseElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGUseElement::sLengthInfo[4] = {
     {nsGkAtoms::x, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::y, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
     {nsGkAtoms::width, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::height, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
 };
 
-nsSVGElement::StringInfo SVGUseElement::sStringInfo[2] = {
+SVGElement::StringInfo SVGUseElement::sStringInfo[2] = {
     {nsGkAtoms::href, kNameSpaceID_None, true},
     {nsGkAtoms::href, kNameSpaceID_XLink, true}};
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(SVGUseElement)
 
@@ -314,17 +314,17 @@ void SVGUseElement::UpdateShadowTree() {
       return;
     }
 
     MOZ_ASSERT(newNode->IsElement());
     newElement = newNode.forget().downcast<Element>();
   }
 
   if (newElement->IsAnyOfSVGElements(nsGkAtoms::svg, nsGkAtoms::symbol)) {
-    auto* newSVGElement = static_cast<nsSVGElement*>(newElement.get());
+    auto* newSVGElement = static_cast<SVGElement*>(newElement.get());
     if (mLengthAttributes[ATTR_WIDTH].IsExplicitlySet())
       newSVGElement->SetLength(nsGkAtoms::width, mLengthAttributes[ATTR_WIDTH]);
     if (mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet())
       newSVGElement->SetLength(nsGkAtoms::height,
                                mLengthAttributes[ATTR_HEIGHT]);
   }
 
   // The specs do not say which referrer policy we should use, pass RP_Unset for
@@ -363,17 +363,17 @@ void SVGUseElement::SyncWidthOrHeight(ns
   NS_ASSERTION(aName == nsGkAtoms::width || aName == nsGkAtoms::height,
                "The clue is in the function name");
   NS_ASSERTION(OurWidthAndHeightAreUsed(), "Don't call this");
 
   if (!OurWidthAndHeightAreUsed()) {
     return;
   }
 
-  auto* target = nsSVGElement::FromNode(GetClonedChild(*this));
+  auto* target = SVGElement::FromNode(GetClonedChild(*this));
   uint32_t index =
       sLengthInfo[ATTR_WIDTH].mName == aName ? ATTR_WIDTH : ATTR_HEIGHT;
 
   if (mLengthAttributes[index].IsExplicitlySet()) {
     target->SetLength(aName, mLengthAttributes[index]);
     return;
   }
   if (target->IsSVGElement(nsGkAtoms::svg)) {
@@ -428,17 +428,17 @@ void SVGUseElement::TriggerReclone() {
 void SVGUseElement::UnlinkSource() {
   if (mReferencedElementTracker.get()) {
     mReferencedElementTracker.get()->RemoveMutationObserver(this);
   }
   mReferencedElementTracker.Unlink();
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ gfxMatrix SVGUseElement::PrependLocalTransformsTo(
     const gfxMatrix& aMatrix, SVGTransformTypes aWhich) const {
   // 'transform' attribute:
   gfxMatrix userToParent;
 
   if (aWhich == eUserSpaceToParent || aWhich == eAllTransforms) {
     userToParent =
@@ -472,22 +472,22 @@ void SVGUseElement::UnlinkSource() {
 
 /* virtual */ bool SVGUseElement::HasValidDimensions() const {
   return (!mLengthAttributes[ATTR_WIDTH].IsExplicitlySet() ||
           mLengthAttributes[ATTR_WIDTH].GetAnimValInSpecifiedUnits() > 0) &&
          (!mLengthAttributes[ATTR_HEIGHT].IsExplicitlySet() ||
           mLengthAttributes[ATTR_HEIGHT].GetAnimValInSpecifiedUnits() > 0);
 }
 
-nsSVGElement::LengthAttributesInfo SVGUseElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGUseElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
-nsSVGElement::StringAttributesInfo SVGUseElement::GetStringInfo() {
+SVGElement::StringAttributesInfo SVGUseElement::GetStringInfo() {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
 nsSVGUseFrame* SVGUseElement::GetFrame() const {
   nsIFrame* frame = GetPrimaryFrame();
   // We might be a plain nsSVGContainerFrame if we didn't pass the conditional
   // processing checks.
--- a/dom/svg/SVGUseElement.h
+++ b/dom/svg/SVGUseElement.h
@@ -57,17 +57,17 @@ class SVGUseElement final : public SVGUs
 
   NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
   NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
   NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
 
-  // nsSVGElement specializations:
+  // SVGElement specializations:
   virtual gfxMatrix PrependLocalTransformsTo(
       const gfxMatrix& aMatrix,
       SVGTransformTypes aWhich = eAllTransforms) const override;
   virtual bool HasValidDimensions() const override;
 
   // nsIContent interface
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
--- a/dom/svg/SVGViewElement.cpp
+++ b/dom/svg/SVGViewElement.cpp
@@ -19,17 +19,17 @@ JSObject* SVGViewElement::WrapNode(JSCon
   return SVGViewElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 nsSVGEnumMapping SVGViewElement::sZoomAndPanMap[] = {
     {nsGkAtoms::disable, SVG_ZOOMANDPAN_DISABLE},
     {nsGkAtoms::magnify, SVG_ZOOMANDPAN_MAGNIFY},
     {nullptr, 0}};
 
-nsSVGElement::EnumInfo SVGViewElement::sEnumInfo[1] = {
+SVGElement::EnumInfo SVGViewElement::sEnumInfo[1] = {
     {nsGkAtoms::zoomAndPan, sZoomAndPanMap, SVG_ZOOMANDPAN_MAGNIFY}};
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGViewElement::SVGViewElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : SVGViewElementBase(std::move(aNodeInfo)) {}
@@ -56,19 +56,19 @@ already_AddRefed<SVGAnimatedRect> SVGVie
 }
 
 already_AddRefed<DOMSVGAnimatedPreserveAspectRatio>
 SVGViewElement::PreserveAspectRatio() {
   return mPreserveAspectRatio.ToDOMAnimatedPreserveAspectRatio(this);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
-nsSVGElement::EnumAttributesInfo SVGViewElement::GetEnumInfo() {
+SVGElement::EnumAttributesInfo SVGViewElement::GetEnumInfo() {
   return EnumAttributesInfo(mEnumAttributes, sEnumInfo, ArrayLength(sEnumInfo));
 }
 
 nsSVGViewBox* SVGViewElement::GetViewBox() { return &mViewBox; }
 
 SVGAnimatedPreserveAspectRatio* SVGViewElement::GetPreserveAspectRatio() {
   return &mPreserveAspectRatio;
 }
--- a/dom/svg/SVGViewElement.h
+++ b/dom/svg/SVGViewElement.h
@@ -2,35 +2,35 @@
 /* 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/. */
 
 #ifndef mozilla_dom_SVGViewElement_h
 #define mozilla_dom_SVGViewElement_h
 
-#include "nsSVGElement.h"
+#include "SVGElement.h"
 #include "nsSVGEnum.h"
 #include "nsSVGViewBox.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "SVGStringList.h"
 
-typedef nsSVGElement SVGViewElementBase;
-
 class nsSVGOuterSVGFrame;
 
 nsresult NS_NewSVGViewElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 class SVGFragmentIdentifier;
 
 namespace dom {
 class SVGViewportElement;
 
+typedef SVGElement SVGViewElementBase;
+
 class SVGViewElement : public SVGViewElementBase {
  protected:
   friend class mozilla::SVGFragmentIdentifier;
   friend class SVGSVGElement;
   friend class SVGViewportElement;
   friend class ::nsSVGOuterSVGFrame;
   explicit SVGViewElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
   friend nsresult(::NS_NewSVGViewElement(
@@ -44,17 +44,17 @@ class SVGViewElement : public SVGViewEle
 
   // WebIDL
   uint16_t ZoomAndPan() { return mEnumAttributes[ZOOMANDPAN].GetAnimValue(); }
   void SetZoomAndPan(uint16_t aZoomAndPan, ErrorResult& rv);
   already_AddRefed<SVGAnimatedRect> ViewBox();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
 
  private:
-  // nsSVGElement overrides
+  // SVGElement overrides
 
   virtual EnumAttributesInfo GetEnumInfo() override;
 
   enum { ZOOMANDPAN };
   nsSVGEnum mEnumAttributes[1];
   static nsSVGEnumMapping sZoomAndPanMap[];
   static EnumInfo sEnumInfo[1];
 
--- a/dom/svg/SVGViewportElement.cpp
+++ b/dom/svg/SVGViewportElement.cpp
@@ -33,17 +33,17 @@
 #include <algorithm>
 #include "prtime.h"
 
 using namespace mozilla::gfx;
 
 namespace mozilla {
 namespace dom {
 
-nsSVGElement::LengthInfo SVGViewportElement::sLengthInfo[4] = {
+SVGElement::LengthInfo SVGViewportElement::sLengthInfo[4] = {
     {nsGkAtoms::x, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::X},
     {nsGkAtoms::y, 0, SVGLength_Binding::SVG_LENGTHTYPE_NUMBER,
      SVGContentUtils::Y},
     {nsGkAtoms::width, 100, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::X},
     {nsGkAtoms::height, 100, SVGLength_Binding::SVG_LENGTHTYPE_PERCENTAGE,
      SVGContentUtils::Y},
@@ -75,19 +75,19 @@ SVGViewportElement::PreserveAspectRatio(
 //----------------------------------------------------------------------
 // nsIContent methods
 
 NS_IMETHODIMP_(bool)
 SVGViewportElement::IsAttributeMapped(const nsAtom* name) const {
   // We want to map the 'width' and 'height' attributes into style for
   // outer-<svg>, except when the attributes aren't set (since their default
   // values of '100%' can cause unexpected and undesirable behaviour for SVG
-  // inline in HTML). We rely on nsSVGElement::UpdateContentStyleRule() to
+  // inline in HTML). We rely on SVGElement::UpdateContentStyleRule() to
   // prevent mapping of the default values into style (it only maps attributes
-  // that are set). We also rely on a check in nsSVGElement::
+  // that are set). We also rely on a check in SVGElement::
   // UpdateContentStyleRule() to prevent us mapping the attributes when they're
   // given a <length> value that is not currently recognized by the SVG
   // specification.
 
   if (!IsInner() && (name == nsGkAtoms::width || name == nsGkAtoms::height)) {
     return true;
   }
 
@@ -103,17 +103,17 @@ SVGViewportElement::IsAttributeMapped(co
                                                     sTextContentElementsMap,
                                                     sViewportsMap};
 
   return FindAttributeDependence(name, map) ||
          SVGGraphicsElement::IsAttributeMapped(name);
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement overrides
+// SVGElement overrides
 
 // Helper for GetViewBoxTransform on root <svg> node
 // * aLength: internal value for our <svg> width or height attribute.
 // * aViewportLength: length of the corresponding dimension of the viewport.
 // * aSelf: the outermost <svg> node itself.
 // NOTE: aSelf is not an ancestor viewport element, so it can't be used to
 // resolve percentage lengths. (It can only be used to resolve
 // 'em'/'ex'-valued units).
@@ -232,17 +232,17 @@ float SVGViewportElement::GetLength(uint
       return h;
     case SVGContentUtils::XY:
       return float(SVGContentUtils::ComputeNormalizedHypotenuse(w, h));
   }
   return 0;
 }
 
 //----------------------------------------------------------------------
-// nsSVGElement methods
+// SVGElement methods
 
 /* virtual */ gfxMatrix SVGViewportElement::PrependLocalTransformsTo(
     const gfxMatrix& aMatrix, SVGTransformTypes aWhich) const {
   // 'transform' attribute (or an override from a fragment identifier):
   gfxMatrix userToParent;
 
   if (aWhich == eUserSpaceToParent || aWhich == eAllTransforms) {
     userToParent = GetUserToParentTransform(mAnimateMotionTransform,
@@ -327,15 +327,15 @@ nsSVGViewBoxRect SVGViewportElement::Get
                                            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);
 }
 
-nsSVGElement::LengthAttributesInfo SVGViewportElement::GetLengthInfo() {
+SVGElement::LengthAttributesInfo SVGViewportElement::GetLengthInfo() {
   return LengthAttributesInfo(mLengthAttributes, sLengthInfo,
                               ArrayLength(sLengthInfo));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGViewportElement.h
+++ b/dom/svg/SVGViewportElement.h
@@ -50,17 +50,17 @@ class SVGViewportElement : public SVGGra
  protected:
   SVGViewportElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
   ~SVGViewportElement();
 
  public:
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
 
-  // nsSVGElement specializations:
+  // SVGElement specializations:
   virtual gfxMatrix PrependLocalTransformsTo(
       const gfxMatrix& aMatrix,
       SVGTransformTypes aWhich = eAllTransforms) const override;
 
   virtual bool HasValidDimensions() const override;
 
   // SVGViewportElement methods:
 
--- a/dom/svg/moz.build
+++ b/dom/svg/moz.build
@@ -6,17 +6,16 @@
 
 with Files("**"):
     BUG_COMPONENT = ("Core", "SVG")
 
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
 
 EXPORTS += [
     'nsS