Backed out changeset c796403f5a29 since it landed with wrong bug number
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 02 Jan 2019 10:44:12 -0800
changeset 452307 9a2eafbf89d8406adc4c02c7523de5e8766c6b36
parent 452306 c796403f5a29c375fbeaeaec29f5a83823739cd4
child 452308 291f284eed9ef10fce35ffe4c69abb1d6ff581d6
push id35302
push userbtara@mozilla.com
push dateThu, 03 Jan 2019 04:25:12 +0000
treeherdermozilla-central@bf8d42d3382e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone66.0a1
backs outc796403f5a29c375fbeaeaec29f5a83823739cd4
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
Backed out changeset c796403f5a29 since it landed with wrong bug number
dom/svg/SVGClipPathElement.h
dom/svg/SVGComponentTransferFunctionElement.h
dom/svg/SVGElement.cpp
dom/svg/SVGElement.h
dom/svg/SVGEnum.cpp
dom/svg/SVGEnum.h
dom/svg/SVGFEBlendElement.cpp
dom/svg/SVGFEBlendElement.h
dom/svg/SVGFEColorMatrixElement.cpp
dom/svg/SVGFEColorMatrixElement.h
dom/svg/SVGFECompositeElement.cpp
dom/svg/SVGFECompositeElement.h
dom/svg/SVGFEConvolveMatrixElement.cpp
dom/svg/SVGFEConvolveMatrixElement.h
dom/svg/SVGFEDisplacementMapElement.cpp
dom/svg/SVGFEDisplacementMapElement.h
dom/svg/SVGFEMorphologyElement.cpp
dom/svg/SVGFEMorphologyElement.h
dom/svg/SVGFETurbulenceElement.cpp
dom/svg/SVGFETurbulenceElement.h
dom/svg/SVGFilterElement.h
dom/svg/SVGFilters.cpp
dom/svg/SVGGradientElement.cpp
dom/svg/SVGGradientElement.h
dom/svg/SVGMarkerElement.cpp
dom/svg/SVGMarkerElement.h
dom/svg/SVGMaskElement.h
dom/svg/SVGPatternElement.h
dom/svg/SVGSVGElement.cpp
dom/svg/SVGSVGElement.h
dom/svg/SVGTSpanElement.h
dom/svg/SVGTextContentElement.cpp
dom/svg/SVGTextContentElement.h
dom/svg/SVGTextElement.h
dom/svg/SVGTextPathElement.cpp
dom/svg/SVGTextPathElement.h
dom/svg/SVGViewElement.cpp
dom/svg/SVGViewElement.h
dom/svg/SVGViewportElement.h
dom/svg/moz.build
dom/svg/nsSVGEnum.cpp
dom/svg/nsSVGEnum.h
layout/svg/nsSVGClipPathFrame.cpp
layout/svg/nsSVGFilterFrame.cpp
layout/svg/nsSVGGradientFrame.cpp
layout/svg/nsSVGMaskFrame.cpp
layout/svg/nsSVGPatternFrame.cpp
layout/svg/nsSVGUtils.cpp
layout/svg/nsSVGUtils.h
--- a/dom/svg/SVGClipPathElement.h
+++ b/dom/svg/SVGClipPathElement.h
@@ -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/. */
 
 #ifndef mozilla_dom_SVGClipPathElement_h
 #define mozilla_dom_SVGClipPathElement_h
 
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "mozilla/dom/SVGTransformableElement.h"
 
 class nsSVGClipPathFrame;
 
 nsresult NS_NewSVGClipPathElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
@@ -39,17 +39,17 @@ class SVGClipPathElement final : public 
   already_AddRefed<SVGAnimatedEnumeration> ClipPathUnits();
 
   // This is an internal method that does not flush style, and thus
   // the answer may be out of date if there's a pending style flush.
   bool IsUnitsObjectBoundingBox() const;
 
  protected:
   enum { CLIPPATHUNITS };
-  SVGEnum mEnumAttributes[1];
+  nsSVGEnum mEnumAttributes[1];
   static EnumInfo sEnumInfo[1];
 
   virtual EnumAttributesInfo GetEnumInfo() override;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
--- a/dom/svg/SVGComponentTransferFunctionElement.h
+++ b/dom/svg/SVGComponentTransferFunctionElement.h
@@ -2,20 +2,20 @@
 /* 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_SVGComponentTransferFunctionElement_h
 #define mozilla_dom_SVGComponentTransferFunctionElement_h
 
-#include "SVGAnimatedNumberList.h"
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "SVGFilters.h"
 #include "nsSVGNumber2.h"
+#include "SVGAnimatedNumberList.h"
 
 #define NS_SVG_FE_COMPONENT_TRANSFER_FUNCTION_ELEMENT_CID \
   {                                                       \
     0xafab106d, 0xbc18, 0x4f7f, {                         \
       0x9e, 0x29, 0xfe, 0xb4, 0xb0, 0x16, 0x5f, 0xf4      \
     }                                                     \
   }
 
@@ -73,18 +73,18 @@ class SVGComponentTransferFunctionElemen
   SVGAnimatedNumberList mNumberListAttributes[1];
   static NumberListInfo sNumberListInfo[1];
 
   enum { SLOPE, INTERCEPT, AMPLITUDE, EXPONENT, OFFSET };
   nsSVGNumber2 mNumberAttributes[5];
   static NumberInfo sNumberInfo[5];
 
   enum { TYPE };
-  SVGEnum mEnumAttributes[1];
-  static SVGEnumMapping sTypeMap[];
+  nsSVGEnum mEnumAttributes[1];
+  static nsSVGEnumMapping sTypeMap[];
   static EnumInfo sEnumInfo[1];
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(SVGComponentTransferFunctionElement,
                               NS_SVG_FE_COMPONENT_TRANSFER_FUNCTION_ELEMENT_CID)
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/svg/SVGElement.cpp
+++ b/dom/svg/SVGElement.cpp
@@ -1,64 +1,64 @@
 /* -*- 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/SVGElement.h"
 
+#include "mozilla/ArrayUtils.h"
+#include "mozilla/DebugOnly.h"
+#include "mozilla/Unused.h"
+
 #include "mozilla/dom/MutationEventBinding.h"
 #include "mozilla/dom/SVGAnimatedEnumeration.h"
 #include "mozilla/dom/SVGElementBinding.h"
-#include "mozilla/dom/SVGGeometryElement.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "mozilla/dom/SVGTests.h"
 #include "mozilla/dom/SVGUnitTypesBinding.h"
-
-#include "mozilla/ArrayUtils.h"
-#include "mozilla/DebugOnly.h"
 #include "mozilla/DeclarationBlock.h"
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/InternalMutationEvent.h"
 #include "mozilla/RestyleManager.h"
 #include "mozilla/SMILAnimationController.h"
-#include "mozilla/SVGContentUtils.h"
 #include "mozilla/Unused.h"
-
 #include "mozAutoDocUpdate.h"
 #include "nsAttrValueOrString.h"
 #include "nsCSSProps.h"
 #include "nsContentUtils.h"
 #include "nsICSSDeclaration.h"
 #include "nsIContentInlines.h"
 #include "nsIDocument.h"
 #include "nsError.h"
 #include "nsGkAtoms.h"
 #include "nsIPresShell.h"
 #include "nsIFrame.h"
-#include "nsQueryObject.h"
 #include "nsLayoutUtils.h"
 #include "SVGAngle.h"
+#include "nsSVGBoolean.h"
+#include "nsSVGEnum.h"
+#include "nsSVGInteger.h"
+#include "nsSVGIntegerPair.h"
+#include "nsSVGLength2.h"
+#include "nsSVGNumber2.h"
+#include "nsSVGNumberPair.h"
+#include "nsSVGString.h"
+#include "nsSVGViewBox.h"
 #include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedLengthList.h"
 #include "SVGAnimatedPointList.h"
 #include "SVGAnimatedPathSegList.h"
 #include "SVGAnimatedTransformList.h"
-#include "nsSVGBoolean.h"
-#include "SVGEnum.h"
-#include "nsSVGInteger.h"
-#include "nsSVGIntegerPair.h"
-#include "nsSVGLength2.h"
+#include "SVGContentUtils.h"
+#include "SVGGeometryElement.h"
 #include "SVGMotionSMILAttr.h"
-#include "nsSVGNumber2.h"
-#include "nsSVGNumberPair.h"
-#include "nsSVGString.h"
-#include "nsSVGViewBox.h"
+#include "nsQueryObject.h"
 #include <stdarg.h>
 
 // This is needed to ensure correct handling of calls to the
 // vararg-list methods in this file:
 //   SVGElement::GetAnimated{Length,Number,Integer}Values
 // See bug 547964 for details:
 static_assert(sizeof(void*) == sizeof(nullptr),
               "nullptr should be the correct size");
@@ -78,17 +78,17 @@ nsresult NS_NewSVGElement(
 }
 
 namespace mozilla {
 namespace dom {
 using namespace SVGUnitTypes_Binding;
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGElement)
 
-SVGEnumMapping SVGElement::sSVGUnitTypesMap[] = {
+nsSVGEnumMapping SVGElement::sSVGUnitTypesMap[] = {
     {nsGkAtoms::userSpaceOnUse, SVG_UNIT_TYPE_USERSPACEONUSE},
     {nsGkAtoms::objectBoundingBox, SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
     {nullptr, 0}};
 
 SVGElement::SVGElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : SVGElementBase(std::move(aNodeInfo)) {}
 
 SVGElement::~SVGElement() {
@@ -496,17 +496,17 @@ bool SVGElement::ParseAttribute(int32_t 
           }
           foundMatch = true;
           break;
         }
       }
     }
 
     if (!foundMatch) {
-      // Check for SVGEnum attribute
+      // Check for nsSVGEnum attribute
       EnumAttributesInfo enumInfo = GetEnumInfo();
       for (i = 0; i < enumInfo.mEnumCount; i++) {
         if (aAttribute == enumInfo.mEnumInfo[i].mName) {
           RefPtr<nsAtom> valAtom = NS_Atomize(aValue);
           rv = enumInfo.mEnums[i].SetBaseValueAtom(valAtom, this);
           if (NS_FAILED(rv)) {
             enumInfo.SetUnknownValue(i);
           } else {
--- a/dom/svg/SVGElement.h
+++ b/dom/svg/SVGElement.h
@@ -23,45 +23,45 @@
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
 #include "nsISupportsImpl.h"
 #include "nsStyledElement.h"
 #include "gfxMatrix.h"
 
 class nsSVGBoolean;
+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;
 
 class SVGAngle;
 class SVGAnimatedNumberList;
 class SVGNumberList;
 class SVGAnimatedLengthList;
-class SVGEnum;
 class SVGUserUnitList;
 class SVGAnimatedPointList;
 class SVGAnimatedPathSegList;
 class SVGAnimatedPreserveAspectRatio;
 class SVGAnimatedTransformList;
 class SVGStringList;
 class DOMSVGStringList;
 
-struct SVGEnumMapping;
-
 namespace dom {
 class SVGSVGElement;
 class SVGViewportElement;
 
 typedef nsStyledElement SVGElementBase;
 
 class SVGElement : public SVGElementBase  // nsIContent
 {
@@ -72,18 +72,16 @@ class SVGElement : public SVGElementBase
                          already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   nsresult Init();
   virtual ~SVGElement();
 
  public:
   virtual nsresult Clone(mozilla::dom::NodeInfo*,
                          nsINode** aResult) const MOZ_MUST_OVERRIDE override;
 
-  typedef mozilla::SVGEnum SVGEnum;
-  typedef mozilla::SVGEnumMapping SVGEnumMapping;
   typedef mozilla::SVGNumberList SVGNumberList;
   typedef mozilla::SVGAnimatedNumberList SVGAnimatedNumberList;
   typedef mozilla::SVGUserUnitList SVGUserUnitList;
   typedef mozilla::SVGAnimatedLengthList SVGAnimatedLengthList;
   typedef mozilla::SVGAnimatedPointList SVGAnimatedPointList;
   typedef mozilla::SVGAnimatedPathSegList SVGAnimatedPathSegList;
   typedef mozilla::SVGAnimatedPreserveAspectRatio
       SVGAnimatedPreserveAspectRatio;
@@ -475,30 +473,30 @@ class SVGElement : public SVGElementBase
                           uint32_t aBooleanCount)
         : mBooleans(aBooleans),
           mBooleanInfo(aBooleanInfo),
           mBooleanCount(aBooleanCount) {}
 
     void Reset(uint8_t aAttrEnum);
   };
 
-  friend class mozilla::SVGEnum;
+  friend class ::nsSVGEnum;
 
   struct EnumInfo {
     nsStaticAtom* const mName;
-    const SVGEnumMapping* const mMapping;
+    const nsSVGEnumMapping* const mMapping;
     const uint16_t mDefaultValue;
   };
 
   struct EnumAttributesInfo {
-    SVGEnum* const mEnums;
+    nsSVGEnum* const mEnums;
     const EnumInfo* const mEnumInfo;
     const uint32_t mEnumCount;
 
-    EnumAttributesInfo(SVGEnum* aEnums, EnumInfo* aEnumInfo,
+    EnumAttributesInfo(nsSVGEnum* aEnums, EnumInfo* aEnumInfo,
                        uint32_t aEnumCount)
         : mEnums(aEnums), mEnumInfo(aEnumInfo), mEnumCount(aEnumCount) {}
 
     void Reset(uint8_t aAttrEnum);
     void SetUnknownValue(uint8_t aAttrEnum);
   };
 
   struct NumberListInfo {
@@ -602,17 +600,17 @@ class SVGElement : public SVGElementBase
   // so we don't need to wrap the class
   virtual nsSVGViewBox* GetViewBox();
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio();
   virtual NumberListAttributesInfo GetNumberListInfo();
   virtual LengthListAttributesInfo GetLengthListInfo();
   virtual StringAttributesInfo GetStringInfo();
   virtual StringListAttributesInfo GetStringListInfo();
 
-  static SVGEnumMapping sSVGUnitTypesMap[];
+  static nsSVGEnumMapping sSVGUnitTypesMap[];
 
  private:
   void UnsetAttrInternal(int32_t aNameSpaceID, nsAtom* aAttribute,
                          bool aNotify);
 
   SVGClass mClassAttribute;
   nsAutoPtr<nsAttrValue> mClassAnimAttr;
   RefPtr<mozilla::DeclarationBlock> mContentDeclarationBlock;
--- a/dom/svg/SVGFEBlendElement.cpp
+++ b/dom/svg/SVGFEBlendElement.cpp
@@ -15,17 +15,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEBlendElement::WrapNode(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
   return SVGFEBlendElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-SVGEnumMapping SVGFEBlendElement::sModeMap[] = {
+nsSVGEnumMapping SVGFEBlendElement::sModeMap[] = {
     {nsGkAtoms::normal, SVG_FEBLEND_MODE_NORMAL},
     {nsGkAtoms::multiply, SVG_FEBLEND_MODE_MULTIPLY},
     {nsGkAtoms::screen, SVG_FEBLEND_MODE_SCREEN},
     {nsGkAtoms::darken, SVG_FEBLEND_MODE_DARKEN},
     {nsGkAtoms::lighten, SVG_FEBLEND_MODE_LIGHTEN},
     {nsGkAtoms::overlay, SVG_FEBLEND_MODE_OVERLAY},
     {nsGkAtoms::colorDodge, SVG_FEBLEND_MODE_COLOR_DODGE},
     {nsGkAtoms::colorBurn, SVG_FEBLEND_MODE_COLOR_BURN},
--- a/dom/svg/SVGFEBlendElement.h
+++ b/dom/svg/SVGFEBlendElement.h
@@ -2,18 +2,18 @@
 /* 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_SVGFEBlendElement_h
 #define mozilla_dom_SVGFEBlendElement_h
 
-#include "SVGEnum.h"
 #include "SVGFilters.h"
+#include "nsSVGEnum.h"
 
 nsresult NS_NewSVGFEBlendElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 namespace mozilla {
 namespace dom {
 
 typedef SVGFE SVGFEBlendElementBase;
 
@@ -48,18 +48,18 @@ class SVGFEBlendElement : public SVGFEBl
   already_AddRefed<SVGAnimatedString> In2();
   already_AddRefed<SVGAnimatedEnumeration> Mode();
 
  protected:
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { MODE };
-  SVGEnum mEnumAttributes[1];
-  static SVGEnumMapping sModeMap[];
+  nsSVGEnum mEnumAttributes[1];
+  static nsSVGEnumMapping sModeMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1, IN2 };
   nsSVGString mStringAttributes[3];
   static StringInfo sStringInfo[3];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFEColorMatrixElement.cpp
+++ b/dom/svg/SVGFEColorMatrixElement.cpp
@@ -19,17 +19,17 @@ using namespace mozilla::gfx;
 namespace mozilla {
 namespace dom {
 
 JSObject* SVGFEColorMatrixElement::WrapNode(JSContext* aCx,
                                             JS::Handle<JSObject*> aGivenProto) {
   return SVGFEColorMatrixElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-SVGEnumMapping SVGFEColorMatrixElement::sTypeMap[] = {
+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}};
 
 SVGElement::EnumInfo SVGFEColorMatrixElement::sEnumInfo[1] = {
     {nsGkAtoms::type, sTypeMap, SVG_FECOLORMATRIX_TYPE_MATRIX}};
--- a/dom/svg/SVGFEColorMatrixElement.h
+++ b/dom/svg/SVGFEColorMatrixElement.h
@@ -2,19 +2,19 @@
 /* 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_SVGFEColorMatrixElement_h
 #define mozilla_dom_SVGFEColorMatrixElement_h
 
+#include "nsSVGEnum.h"
+#include "SVGFilters.h"
 #include "SVGAnimatedNumberList.h"
-#include "SVGEnum.h"
-#include "SVGFilters.h"
 
 nsresult NS_NewSVGFEColorMatrixElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 class DOMSVGAnimatedNumberList;
@@ -53,18 +53,18 @@ class SVGFEColorMatrixElement : public S
   already_AddRefed<DOMSVGAnimatedNumberList> Values();
 
  protected:
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
   virtual NumberListAttributesInfo GetNumberListInfo() override;
 
   enum { TYPE };
-  SVGEnum mEnumAttributes[1];
-  static SVGEnumMapping sTypeMap[];
+  nsSVGEnum mEnumAttributes[1];
+  static nsSVGEnumMapping sTypeMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1 };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   enum { VALUES };
   SVGAnimatedNumberList mNumberListAttributes[1];
--- a/dom/svg/SVGFECompositeElement.cpp
+++ b/dom/svg/SVGFECompositeElement.cpp
@@ -20,17 +20,17 @@ JSObject* SVGFECompositeElement::WrapNod
 }
 
 SVGElement::NumberInfo SVGFECompositeElement::sNumberInfo[4] = {
     {nsGkAtoms::k1, 0, false},
     {nsGkAtoms::k2, 0, false},
     {nsGkAtoms::k3, 0, false},
     {nsGkAtoms::k4, 0, false}};
 
-SVGEnumMapping SVGFECompositeElement::sOperatorMap[] = {
+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}};
 
--- a/dom/svg/SVGFECompositeElement.h
+++ b/dom/svg/SVGFECompositeElement.h
@@ -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/. */
 
 #ifndef mozilla_dom_SVGFECompositeElement_h
 #define mozilla_dom_SVGFECompositeElement_h
 
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "SVGFilters.h"
 #include "nsSVGNumber2.h"
 
 nsresult NS_NewSVGFECompositeElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
@@ -60,18 +60,18 @@ class SVGFECompositeElement : public SVG
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { ATTR_K1, ATTR_K2, ATTR_K3, ATTR_K4 };
   nsSVGNumber2 mNumberAttributes[4];
   static NumberInfo sNumberInfo[4];
 
   enum { OPERATOR };
-  SVGEnum mEnumAttributes[1];
-  static SVGEnumMapping sOperatorMap[];
+  nsSVGEnum mEnumAttributes[1];
+  static nsSVGEnumMapping sOperatorMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1, IN2 };
   nsSVGString mStringAttributes[3];
   static StringInfo sStringInfo[3];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFEConvolveMatrixElement.cpp
+++ b/dom/svg/SVGFEConvolveMatrixElement.cpp
@@ -34,17 +34,17 @@ SVGElement::IntegerInfo SVGFEConvolveMat
     {nsGkAtoms::targetX, 0}, {nsGkAtoms::targetY, 0}};
 
 SVGElement::IntegerPairInfo SVGFEConvolveMatrixElement::sIntegerPairInfo[1] = {
     {nsGkAtoms::order, 3, 3}};
 
 SVGElement::BooleanInfo SVGFEConvolveMatrixElement::sBooleanInfo[1] = {
     {nsGkAtoms::preserveAlpha, false}};
 
-SVGEnumMapping SVGFEConvolveMatrixElement::sEdgeModeMap[] = {
+nsSVGEnumMapping SVGFEConvolveMatrixElement::sEdgeModeMap[] = {
     {nsGkAtoms::duplicate, SVG_EDGEMODE_DUPLICATE},
     {nsGkAtoms::wrap, SVG_EDGEMODE_WRAP},
     {nsGkAtoms::none, SVG_EDGEMODE_NONE},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGFEConvolveMatrixElement::sEnumInfo[1] = {
     {nsGkAtoms::edgeMode, sEdgeModeMap, SVG_EDGEMODE_DUPLICATE}};
 
--- a/dom/svg/SVGFEConvolveMatrixElement.h
+++ b/dom/svg/SVGFEConvolveMatrixElement.h
@@ -2,24 +2,24 @@
 /* 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_SVGFEConvolveMatrixElement_h
 #define mozilla_dom_SVGFEConvolveMatrixElement_h
 
-#include "SVGAnimatedNumberList.h"
 #include "nsSVGBoolean.h"
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "SVGFilters.h"
 #include "nsSVGInteger.h"
 #include "nsSVGIntegerPair.h"
 #include "nsSVGNumber2.h"
 #include "nsSVGString.h"
+#include "SVGAnimatedNumberList.h"
 
 nsresult NS_NewSVGFEConvolveMatrixElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 
 namespace dom {
 class DOMSVGAnimatedNumberList;
@@ -93,18 +93,18 @@ class SVGFEConvolveMatrixElement : publi
   nsSVGIntegerPair mIntegerPairAttributes[1];
   static IntegerPairInfo sIntegerPairInfo[1];
 
   enum { PRESERVEALPHA };
   nsSVGBoolean mBooleanAttributes[1];
   static BooleanInfo sBooleanInfo[1];
 
   enum { EDGEMODE };
-  SVGEnum mEnumAttributes[1];
-  static SVGEnumMapping sEdgeModeMap[];
+  nsSVGEnum mEnumAttributes[1];
+  static nsSVGEnumMapping sEdgeModeMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1 };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   enum { KERNELMATRIX };
   SVGAnimatedNumberList mNumberListAttributes[1];
--- a/dom/svg/SVGFEDisplacementMapElement.cpp
+++ b/dom/svg/SVGFEDisplacementMapElement.cpp
@@ -20,17 +20,17 @@ JSObject* SVGFEDisplacementMapElement::W
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return SVGFEDisplacementMapElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 SVGElement::NumberInfo SVGFEDisplacementMapElement::sNumberInfo[1] = {
     {nsGkAtoms::scale, 0, false},
 };
 
-SVGEnumMapping SVGFEDisplacementMapElement::sChannelMap[] = {
+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}};
 
 SVGElement::EnumInfo SVGFEDisplacementMapElement::sEnumInfo[2] = {
     {nsGkAtoms::xChannelSelector, sChannelMap, SVG_CHANNEL_A},
--- a/dom/svg/SVGFEDisplacementMapElement.h
+++ b/dom/svg/SVGFEDisplacementMapElement.h
@@ -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/. */
 
 #ifndef mozilla_dom_SVGFEDisplacementMapElement_h
 #define mozilla_dom_SVGFEDisplacementMapElement_h
 
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "SVGFilters.h"
 
 nsresult NS_NewSVGFEDisplacementMapElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
@@ -69,18 +69,18 @@ class SVGFEDisplacementMapElement : publ
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { SCALE };
   nsSVGNumber2 mNumberAttributes[1];
   static NumberInfo sNumberInfo[1];
 
   enum { CHANNEL_X, CHANNEL_Y };
-  SVGEnum mEnumAttributes[2];
-  static SVGEnumMapping sChannelMap[];
+  nsSVGEnum mEnumAttributes[2];
+  static nsSVGEnumMapping sChannelMap[];
   static EnumInfo sEnumInfo[2];
 
   enum { RESULT, IN1, IN2 };
   nsSVGString mStringAttributes[3];
   static StringInfo sStringInfo[3];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFEMorphologyElement.cpp
+++ b/dom/svg/SVGFEMorphologyElement.cpp
@@ -18,17 +18,17 @@ namespace dom {
 JSObject* SVGFEMorphologyElement::WrapNode(JSContext* aCx,
                                            JS::Handle<JSObject*> aGivenProto) {
   return SVGFEMorphologyElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 SVGElement::NumberPairInfo SVGFEMorphologyElement::sNumberPairInfo[1] = {
     {nsGkAtoms::radius, 0, 0}};
 
-SVGEnumMapping SVGFEMorphologyElement::sOperatorMap[] = {
+nsSVGEnumMapping SVGFEMorphologyElement::sOperatorMap[] = {
     {nsGkAtoms::erode, SVG_OPERATOR_ERODE},
     {nsGkAtoms::dilate, SVG_OPERATOR_DILATE},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGFEMorphologyElement::sEnumInfo[1] = {
     {nsGkAtoms::_operator, sOperatorMap, SVG_OPERATOR_ERODE}};
 
 SVGElement::StringInfo SVGFEMorphologyElement::sStringInfo[2] = {
--- a/dom/svg/SVGFEMorphologyElement.h
+++ b/dom/svg/SVGFEMorphologyElement.h
@@ -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/. */
 
 #ifndef mozilla_dom_SVGFEMorphologyElement_h
 #define mozilla_dom_SVGFEMorphologyElement_h
 
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "SVGFilters.h"
 #include "nsSVGNumberPair.h"
 #include "nsSVGString.h"
 
 nsresult NS_NewSVGFEMorphologyElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
@@ -60,18 +60,18 @@ class SVGFEMorphologyElement : public SV
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { RADIUS };
   nsSVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { OPERATOR };
-  SVGEnum mEnumAttributes[1];
-  static SVGEnumMapping sOperatorMap[];
+  nsSVGEnum mEnumAttributes[1];
+  static nsSVGEnumMapping sOperatorMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1 };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFETurbulenceElement.cpp
+++ b/dom/svg/SVGFETurbulenceElement.cpp
@@ -31,22 +31,22 @@ SVGElement::NumberInfo SVGFETurbulenceEl
     {nsGkAtoms::seed, 0, false}};
 
 SVGElement::NumberPairInfo SVGFETurbulenceElement::sNumberPairInfo[1] = {
     {nsGkAtoms::baseFrequency, 0, 0}};
 
 SVGElement::IntegerInfo SVGFETurbulenceElement::sIntegerInfo[1] = {
     {nsGkAtoms::numOctaves, 1}};
 
-SVGEnumMapping SVGFETurbulenceElement::sTypeMap[] = {
+nsSVGEnumMapping SVGFETurbulenceElement::sTypeMap[] = {
     {nsGkAtoms::fractalNoise, SVG_TURBULENCE_TYPE_FRACTALNOISE},
     {nsGkAtoms::turbulence, SVG_TURBULENCE_TYPE_TURBULENCE},
     {nullptr, 0}};
 
-SVGEnumMapping SVGFETurbulenceElement::sStitchTilesMap[] = {
+nsSVGEnumMapping SVGFETurbulenceElement::sStitchTilesMap[] = {
     {nsGkAtoms::stitch, SVG_STITCHTYPE_STITCH},
     {nsGkAtoms::noStitch, SVG_STITCHTYPE_NOSTITCH},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGFETurbulenceElement::sEnumInfo[2] = {
     {nsGkAtoms::type, sTypeMap, SVG_TURBULENCE_TYPE_TURBULENCE},
     {nsGkAtoms::stitchTiles, sStitchTilesMap, SVG_STITCHTYPE_NOSTITCH}};
 
--- a/dom/svg/SVGFETurbulenceElement.h
+++ b/dom/svg/SVGFETurbulenceElement.h
@@ -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/. */
 
 #ifndef mozilla_dom_SVGFETurbulenceElement_h
 #define mozilla_dom_SVGFETurbulenceElement_h
 
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "SVGFilters.h"
 #include "nsSVGNumber2.h"
 #include "nsSVGInteger.h"
 #include "nsSVGString.h"
 
 nsresult NS_NewSVGFETurbulenceElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
@@ -71,19 +71,19 @@ class SVGFETurbulenceElement : public SV
   nsSVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { OCTAVES };
   nsSVGInteger mIntegerAttributes[1];
   static IntegerInfo sIntegerInfo[1];
 
   enum { TYPE, STITCHTILES };
-  SVGEnum mEnumAttributes[2];
-  static SVGEnumMapping sTypeMap[];
-  static SVGEnumMapping sStitchTilesMap[];
+  nsSVGEnum mEnumAttributes[2];
+  static nsSVGEnumMapping sTypeMap[];
+  static nsSVGEnumMapping sStitchTilesMap[];
   static EnumInfo sEnumInfo[2];
 
   enum { RESULT };
   nsSVGString mStringAttributes[1];
   static StringInfo sStringInfo[1];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFilterElement.h
+++ b/dom/svg/SVGFilterElement.h
@@ -2,21 +2,21 @@
 /* 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_SVGFilterElement_h
 #define mozilla_dom_SVGFilterElement_h
 
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
+#include "SVGElement.h"
 #include "nsSVGIntegerPair.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
-#include "mozilla/dom/SVGElement.h"
 
 class nsSVGFilterFrame;
 class nsSVGFilterInstance;
 
 nsresult NS_NewSVGFilterElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
@@ -60,17 +60,17 @@ class SVGFilterElement : public SVGFilte
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   enum { FILTERUNITS, PRIMITIVEUNITS };
-  SVGEnum mEnumAttributes[2];
+  nsSVGEnum mEnumAttributes[2];
   static EnumInfo sEnumInfo[2];
 
   enum { HREF, XLINK_HREF };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGFilters.cpp
+++ b/dom/svg/SVGFilters.cpp
@@ -1,48 +1,48 @@
 /* -*- 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 "SVGFilters.h"
 
-#include <algorithm>
-#include "DOMSVGAnimatedNumberList.h"
-#include "imgIContainer.h"
+#include "SVGElement.h"
 #include "nsGkAtoms.h"
-#include "nsCOMPtr.h"
-#include "nsIFrame.h"
-#include "nsLayoutUtils.h"
-#include "SVGAnimatedNumberList.h"
-#include "nsSVGBoolean.h"
-#include "SVGEnum.h"
-#include "nsSVGFilterInstance.h"
+#include "nsSVGNumber2.h"
+#include "nsSVGNumberPair.h"
 #include "nsSVGInteger.h"
 #include "nsSVGIntegerPair.h"
-#include "nsSVGNumber2.h"
-#include "nsSVGNumberPair.h"
+#include "nsSVGBoolean.h"
+#include "nsCOMPtr.h"
+#include "nsSVGFilterInstance.h"
+#include "nsSVGEnum.h"
 #include "SVGNumberList.h"
+#include "SVGAnimatedNumberList.h"
+#include "DOMSVGAnimatedNumberList.h"
+#include "nsLayoutUtils.h"
+#include "nsSVGUtils.h"
+#include "mozilla/ComputedStyle.h"
+#include "nsIFrame.h"
+#include "imgIContainer.h"
+#include "mozilla/dom/SVGFilterElement.h"
 #include "nsSVGString.h"
+#include "SVGContentUtils.h"
+#include <algorithm>
 #include "mozilla/ArrayUtils.h"
-#include "mozilla/ComputedStyle.h"
-#include "mozilla/SVGContentUtils.h"
-#include "nsSVGUtils.h"
 #include "mozilla/dom/SVGAnimatedLength.h"
 #include "mozilla/dom/SVGComponentTransferFunctionElement.h"
-#include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGFEDistantLightElement.h"
 #include "mozilla/dom/SVGFEFuncAElementBinding.h"
 #include "mozilla/dom/SVGFEFuncBElementBinding.h"
 #include "mozilla/dom/SVGFEFuncGElementBinding.h"
 #include "mozilla/dom/SVGFEFuncRElementBinding.h"
 #include "mozilla/dom/SVGFEPointLightElement.h"
 #include "mozilla/dom/SVGFESpotLightElement.h"
-#include "mozilla/dom/SVGFilterElement.h"
 #include "mozilla/dom/SVGLengthBinding.h"
 
 #if defined(XP_WIN)
 // Prevent Windows redefining LoadImage
 #undef LoadImage
 #endif
 
 using namespace mozilla::gfx;
@@ -171,17 +171,17 @@ SVGElement::NumberListInfo
 
 SVGElement::NumberInfo SVGComponentTransferFunctionElement::sNumberInfo[5] = {
     {nsGkAtoms::slope, 1, false},
     {nsGkAtoms::intercept, 0, false},
     {nsGkAtoms::amplitude, 1, false},
     {nsGkAtoms::exponent, 1, false},
     {nsGkAtoms::offset, 0, false}};
 
-SVGEnumMapping SVGComponentTransferFunctionElement::sTypeMap[] = {
+nsSVGEnumMapping SVGComponentTransferFunctionElement::sTypeMap[] = {
     {nsGkAtoms::identity, SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY},
     {nsGkAtoms::table, SVG_FECOMPONENTTRANSFER_TYPE_TABLE},
     {nsGkAtoms::discrete, SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE},
     {nsGkAtoms::linear, SVG_FECOMPONENTTRANSFER_TYPE_LINEAR},
     {nsGkAtoms::gamma, SVG_FECOMPONENTTRANSFER_TYPE_GAMMA},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGComponentTransferFunctionElement::sEnumInfo[1] = {
--- a/dom/svg/SVGGradientElement.cpp
+++ b/dom/svg/SVGGradientElement.cpp
@@ -23,17 +23,17 @@ NS_IMPL_NS_NEW_SVG_ELEMENT(RadialGradien
 namespace mozilla {
 namespace dom {
 
 using namespace SVGGradientElement_Binding;
 using namespace SVGUnitTypes_Binding;
 
 //--------------------- Gradients------------------------
 
-SVGEnumMapping SVGGradientElement::sSpreadMethodMap[] = {
+nsSVGEnumMapping SVGGradientElement::sSpreadMethodMap[] = {
     {nsGkAtoms::pad, SVG_SPREADMETHOD_PAD},
     {nsGkAtoms::reflect, SVG_SPREADMETHOD_REFLECT},
     {nsGkAtoms::repeat, SVG_SPREADMETHOD_REPEAT},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGGradientElement::sEnumInfo[2] = {
     {nsGkAtoms::gradientUnits, sSVGUnitTypesMap,
      SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
--- a/dom/svg/SVGGradientElement.h
+++ b/dom/svg/SVGGradientElement.h
@@ -3,21 +3,21 @@
 /* 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_SVGGRADIENTELEMENT_H__
 #define __NS_SVGGRADIENTELEMENT_H__
 
 #include "nsAutoPtr.h"
-#include "SVGEnum.h"
+#include "SVGAnimatedTransformList.h"
+#include "SVGElement.h"
+#include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
-#include "SVGAnimatedTransformList.h"
-#include "mozilla/dom/SVGElement.h"
 
 class nsSVGGradientFrame;
 class nsSVGLinearGradientFrame;
 class nsSVGRadialGradientFrame;
 
 nsresult NS_NewSVGLinearGradientElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 nsresult NS_NewSVGRadialGradientElement(
@@ -59,18 +59,18 @@ class SVGGradientElement : public SVGGra
   already_AddRefed<SVGAnimatedEnumeration> SpreadMethod();
   already_AddRefed<SVGAnimatedString> Href();
 
  protected:
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { GRADIENTUNITS, SPREADMETHOD };
-  SVGEnum mEnumAttributes[2];
-  static SVGEnumMapping sSpreadMethodMap[];
+  nsSVGEnum mEnumAttributes[2];
+  static nsSVGEnumMapping sSpreadMethodMap[];
   static EnumInfo sEnumInfo[2];
 
   enum { HREF, XLINK_HREF };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   // SVGGradientElement values
   nsAutoPtr<SVGAnimatedTransformList> mGradientTransform;
--- a/dom/svg/SVGMarkerElement.cpp
+++ b/dom/svg/SVGMarkerElement.cpp
@@ -40,17 +40,17 @@ SVGElement::LengthInfo SVGMarkerElement:
     {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},
 };
 
-SVGEnumMapping SVGMarkerElement::sUnitsMap[] = {
+nsSVGEnumMapping SVGMarkerElement::sUnitsMap[] = {
     {nsGkAtoms::strokeWidth, SVG_MARKERUNITS_STROKEWIDTH},
     {nsGkAtoms::userSpaceOnUse, SVG_MARKERUNITS_USERSPACEONUSE},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGMarkerElement::sEnumInfo[1] = {
     {nsGkAtoms::markerUnits, sUnitsMap, SVG_MARKERUNITS_STROKEWIDTH}};
 
 SVGElement::AngleInfo SVGMarkerElement::sAngleInfo[1] = {
--- a/dom/svg/SVGMarkerElement.h
+++ b/dom/svg/SVGMarkerElement.h
@@ -4,23 +4,23 @@
  * 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_SVGMarkerElement_h
 #define mozilla_dom_SVGMarkerElement_h
 
 #include "nsAutoPtr.h"
 #include "SVGAngle.h"
-#include "SVGAnimatedPreserveAspectRatio.h"
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "nsSVGViewBox.h"
+#include "SVGAnimatedPreserveAspectRatio.h"
+#include "SVGElement.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/SVGAnimatedEnumeration.h"
-#include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGMarkerElementBinding.h"
 
 class nsSVGMarkerFrame;
 struct nsSVGMark;
 
 nsresult NS_NewSVGMarkerElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
@@ -57,18 +57,18 @@ class nsSVGOrientType {
                : mAnimVal;
   }
   uint16_t GetAnimValueInternal() const { return mAnimVal; }
 
   already_AddRefed<SVGAnimatedEnumeration> ToDOMAnimatedEnum(
       SVGElement* aSVGElement);
 
  private:
-  SVGEnumValue mAnimVal;
-  SVGEnumValue mBaseVal;
+  nsSVGEnumValue mAnimVal;
+  nsSVGEnumValue mBaseVal;
 
   struct DOMAnimatedEnum final : public SVGAnimatedEnumeration {
     DOMAnimatedEnum(nsSVGOrientType* aVal, SVGElement* aSVGElement)
         : SVGAnimatedEnumeration(aSVGElement), mVal(aVal) {}
 
     nsSVGOrientType* mVal;  // kept alive because it belongs to content
 
     using mozilla::dom::SVGAnimatedEnumeration::SetBaseVal;
@@ -143,18 +143,18 @@ class SVGMarkerElement : public SVGMarke
   virtual nsSVGViewBox* GetViewBox() override;
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
 
   enum { REFX, REFY, MARKERWIDTH, MARKERHEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   enum { MARKERUNITS };
-  SVGEnum mEnumAttributes[1];
-  static SVGEnumMapping sUnitsMap[];
+  nsSVGEnum mEnumAttributes[1];
+  static nsSVGEnumMapping sUnitsMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { ORIENT };
   SVGAngle mAngleAttributes[1];
   static AngleInfo sAngleInfo[1];
 
   nsSVGViewBox mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
--- a/dom/svg/SVGMaskElement.h
+++ b/dom/svg/SVGMaskElement.h
@@ -2,19 +2,19 @@
 /* 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_SVGMaskElement_h
 #define mozilla_dom_SVGMaskElement_h
 
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
-#include "mozilla/dom/SVGElement.h"
+#include "SVGElement.h"
 
 class nsSVGMaskFrame;
 
 nsresult NS_NewSVGMaskElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
@@ -54,16 +54,16 @@ class SVGMaskElement final : public SVGM
   virtual LengthAttributesInfo GetLengthInfo() override;
   virtual EnumAttributesInfo GetEnumInfo() override;
 
   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   enum { MASKUNITS, MASKCONTENTUNITS };
-  SVGEnum mEnumAttributes[2];
+  nsSVGEnum mEnumAttributes[2];
   static EnumInfo sEnumInfo[2];
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGMaskElement_h
--- a/dom/svg/SVGPatternElement.h
+++ b/dom/svg/SVGPatternElement.h
@@ -3,23 +3,23 @@
 /* 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_SVGPatternElement_h
 #define mozilla_dom_SVGPatternElement_h
 
 #include "nsAutoPtr.h"
+#include "mozilla/dom/SVGElement.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
 #include "SVGAnimatedTransformList.h"
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
 #include "nsSVGViewBox.h"
-#include "mozilla/dom/SVGElement.h"
 
 class nsSVGPatternFrame;
 
 nsresult NS_NewSVGPatternElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
@@ -76,17 +76,17 @@ class SVGPatternElement final : public S
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
   virtual StringAttributesInfo GetStringInfo() override;
 
   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 
   enum { PATTERNUNITS, PATTERNCONTENTUNITS };
-  SVGEnum mEnumAttributes[2];
+  nsSVGEnum mEnumAttributes[2];
   static EnumInfo sEnumInfo[2];
 
   nsAutoPtr<mozilla::SVGAnimatedTransformList> mPatternTransform;
 
   enum { HREF, XLINK_HREF };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
--- a/dom/svg/SVGSVGElement.cpp
+++ b/dom/svg/SVGSVGElement.cpp
@@ -31,17 +31,17 @@ NS_IMPL_NS_NEW_SVG_ELEMENT_CHECK_PARSER(
 using namespace mozilla::gfx;
 
 namespace mozilla {
 namespace dom {
 
 using namespace SVGPreserveAspectRatio_Binding;
 using namespace SVGSVGElement_Binding;
 
-SVGEnumMapping SVGSVGElement::sZoomAndPanMap[] = {
+nsSVGEnumMapping SVGSVGElement::sZoomAndPanMap[] = {
     {nsGkAtoms::disable, SVG_ZOOMANDPAN_DISABLE},
     {nsGkAtoms::magnify, SVG_ZOOMANDPAN_MAGNIFY},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGSVGElement::sEnumInfo[1] = {
     {nsGkAtoms::zoomAndPan, sZoomAndPanMap, SVG_ZOOMANDPAN_MAGNIFY}};
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(DOMSVGTranslatePoint, nsISVGPoint, mElement)
--- a/dom/svg/SVGSVGElement.h
+++ b/dom/svg/SVGSVGElement.h
@@ -2,17 +2,16 @@
 /* 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_SVGSVGElement_h
 #define mozilla_dom_SVGSVGElement_h
 
-#include "SVGEnum.h"
 #include "SVGViewportElement.h"
 
 nsresult NS_NewSVGSVGElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
     mozilla::dom::FromParser aFromParser);
 
 namespace mozilla {
 class AutoSVGViewHandler;
@@ -28,17 +27,17 @@ class SVGMatrix;
 class SVGIRect;
 class SVGSVGElement;
 
 // Stores svgView arguments of SVG fragment identifiers.
 class SVGView {
  public:
   SVGView();
 
-  mozilla::SVGEnum mZoomAndPan;
+  nsSVGEnum mZoomAndPan;
   nsSVGViewBox mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
   nsAutoPtr<SVGAnimatedTransformList> mTransforms;
 };
 
 class DOMSVGTranslatePoint final : public nsISVGPoint {
  public:
   DOMSVGTranslatePoint(SVGPoint* aPt, SVGSVGElement* aElement)
@@ -220,18 +219,18 @@ class SVGSVGElement final : public SVGSV
   virtual float GetCurrentScale() const override { return mCurrentScale; }
 
   virtual const nsSVGViewBox& GetViewBoxInternal() const override;
   virtual SVGAnimatedTransformList* GetTransformInternal() const override;
 
   virtual EnumAttributesInfo GetEnumInfo() override;
 
   enum { ZOOMANDPAN };
-  mozilla::SVGEnum mEnumAttributes[1];
-  static mozilla::SVGEnumMapping sZoomAndPanMap[];
+  nsSVGEnum mEnumAttributes[1];
+  static nsSVGEnumMapping sZoomAndPanMap[];
   static EnumInfo sEnumInfo[1];
 
   // The time container for animations within this SVG document fragment. Set
   // for all outermost <svg> elements (not nested <svg> elements).
   nsAutoPtr<SMILTimeContainer> mTimedDocumentRoot;
 
   // zoom and pan
   // IMPORTANT: see the comment in RecordCurrentScaleTranslate before writing
--- a/dom/svg/SVGTSpanElement.h
+++ b/dom/svg/SVGTSpanElement.h
@@ -32,18 +32,18 @@ class SVGTSpanElement final : public SVG
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
  protected:
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual LengthAttributesInfo GetLengthInfo() override;
 
-  SVGEnum mEnumAttributes[1];
-  virtual SVGEnum* EnumAttributes() override { return mEnumAttributes; }
+  nsSVGEnum mEnumAttributes[1];
+  virtual nsSVGEnum* EnumAttributes() override { return mEnumAttributes; }
 
   nsSVGLength2 mLengthAttributes[1];
   virtual nsSVGLength2* LengthAttributes() override {
     return mLengthAttributes;
   }
 };
 
 }  // namespace dom
--- a/dom/svg/SVGTextContentElement.cpp
+++ b/dom/svg/SVGTextContentElement.cpp
@@ -16,17 +16,17 @@
 #include "nsTextNode.h"
 #include "SVGTextFrame.h"
 
 namespace mozilla {
 namespace dom {
 
 using namespace SVGTextContentElement_Binding;
 
-SVGEnumMapping SVGTextContentElement::sLengthAdjustMap[] = {
+nsSVGEnumMapping SVGTextContentElement::sLengthAdjustMap[] = {
     {nsGkAtoms::spacing, LENGTHADJUST_SPACING},
     {nsGkAtoms::spacingAndGlyphs, LENGTHADJUST_SPACINGANDGLYPHS},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGTextContentElement::sEnumInfo[1] = {
     {nsGkAtoms::lengthAdjust, sLengthAdjustMap, LENGTHADJUST_SPACING}};
 
 SVGElement::LengthInfo SVGTextContentElement::sLengthInfo[1] = {
--- a/dom/svg/SVGTextContentElement.h
+++ b/dom/svg/SVGTextContentElement.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_SVGTextContentElement_h
 #define mozilla_dom_SVGTextContentElement_h
 
 #include "mozilla/dom/SVGGraphicsElement.h"
 #include "mozilla/dom/SVGAnimatedEnumeration.h"
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 
 class SVGTextFrame;
 
 namespace mozilla {
 class nsISVGPoint;
 
 namespace dom {
@@ -55,18 +55,18 @@ class SVGTextContentElement : public SVG
       : SVGTextContentElementBase(std::move(aNodeInfo)) {}
 
   MOZ_CAN_RUN_SCRIPT SVGTextFrame* GetSVGTextFrame();
   MOZ_CAN_RUN_SCRIPT SVGTextFrame* GetSVGTextFrameForNonLayoutDependentQuery();
   MOZ_CAN_RUN_SCRIPT mozilla::Maybe<int32_t>
   GetNonLayoutDependentNumberOfChars();
 
   enum { LENGTHADJUST };
-  virtual SVGEnum* EnumAttributes() = 0;
-  static SVGEnumMapping sLengthAdjustMap[];
+  virtual nsSVGEnum* EnumAttributes() = 0;
+  static nsSVGEnumMapping sLengthAdjustMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { TEXTLENGTH };
   virtual nsSVGLength2* LengthAttributes() = 0;
   static LengthInfo sLengthInfo[1];
 };
 
 }  // namespace dom
--- a/dom/svg/SVGTextElement.h
+++ b/dom/svg/SVGTextElement.h
@@ -32,18 +32,18 @@ class SVGTextElement final : public SVGT
   NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
 
   virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
 
  protected:
   virtual EnumAttributesInfo GetEnumInfo() override;
   virtual LengthAttributesInfo GetLengthInfo() override;
 
-  SVGEnum mEnumAttributes[1];
-  virtual SVGEnum* EnumAttributes() override { return mEnumAttributes; }
+  nsSVGEnum mEnumAttributes[1];
+  virtual nsSVGEnum* EnumAttributes() override { return mEnumAttributes; }
 
   nsSVGLength2 mLengthAttributes[1];
   virtual nsSVGLength2* LengthAttributes() override {
     return mLengthAttributes;
   }
 };
 
 }  // namespace dom
--- a/dom/svg/SVGTextPathElement.cpp
+++ b/dom/svg/SVGTextPathElement.cpp
@@ -30,27 +30,27 @@ JSObject* SVGTextPathElement::WrapNode(J
 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}};
 
-SVGEnumMapping SVGTextPathElement::sMethodMap[] = {
+nsSVGEnumMapping SVGTextPathElement::sMethodMap[] = {
     {nsGkAtoms::align, TEXTPATH_METHODTYPE_ALIGN},
     {nsGkAtoms::stretch, TEXTPATH_METHODTYPE_STRETCH},
     {nullptr, 0}};
 
-SVGEnumMapping SVGTextPathElement::sSpacingMap[] = {
+nsSVGEnumMapping SVGTextPathElement::sSpacingMap[] = {
     {nsGkAtoms::_auto, TEXTPATH_SPACINGTYPE_AUTO},
     {nsGkAtoms::exact, TEXTPATH_SPACINGTYPE_EXACT},
     {nullptr, 0}};
 
-SVGEnumMapping SVGTextPathElement::sSideMap[] = {
+nsSVGEnumMapping SVGTextPathElement::sSideMap[] = {
     {nsGkAtoms::left, TEXTPATH_SIDETYPE_LEFT},
     {nsGkAtoms::right, TEXTPATH_SIDETYPE_RIGHT},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGTextPathElement::sEnumInfo[4] = {
     // from SVGTextContentElement:
     {nsGkAtoms::lengthAdjust, sLengthAdjustMap, LENGTHADJUST_SPACING},
     // from SVGTextPathElement:
--- a/dom/svg/SVGTextPathElement.h
+++ b/dom/svg/SVGTextPathElement.h
@@ -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/. */
 
 #ifndef mozilla_dom_SVGTextPathElement_h
 #define mozilla_dom_SVGTextPathElement_h
 
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
 #include "mozilla/dom/SVGAnimatedPathSegList.h"
 #include "mozilla/dom/SVGTextContentElement.h"
 
 class nsAtom;
 class nsIContent;
 
@@ -67,21 +67,21 @@ class SVGTextPathElement final : public 
   enum { /* TEXTLENGTH, */ STARTOFFSET = 1 };
   nsSVGLength2 mLengthAttributes[2];
   virtual nsSVGLength2* LengthAttributes() override {
     return mLengthAttributes;
   }
   static LengthInfo sLengthInfo[2];
 
   enum { /* LENGTHADJUST, */ METHOD = 1, SPACING, SIDE };
-  SVGEnum mEnumAttributes[4];
-  virtual SVGEnum* EnumAttributes() override { return mEnumAttributes; }
-  static SVGEnumMapping sMethodMap[];
-  static SVGEnumMapping sSpacingMap[];
-  static SVGEnumMapping sSideMap[];
+  nsSVGEnum mEnumAttributes[4];
+  virtual nsSVGEnum* EnumAttributes() override { return mEnumAttributes; }
+  static nsSVGEnumMapping sMethodMap[];
+  static nsSVGEnumMapping sSpacingMap[];
+  static nsSVGEnumMapping sSideMap[];
   static EnumInfo sEnumInfo[4];
 
   enum { HREF, XLINK_HREF };
   nsSVGString mStringAttributes[2];
   static StringInfo sStringInfo[2];
 
   SVGAnimatedPathSegList mPath;
 };
--- a/dom/svg/SVGViewElement.cpp
+++ b/dom/svg/SVGViewElement.cpp
@@ -14,17 +14,17 @@ namespace dom {
 
 using namespace SVGViewElement_Binding;
 
 JSObject* SVGViewElement::WrapNode(JSContext* aCx,
                                    JS::Handle<JSObject*> aGivenProto) {
   return SVGViewElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-SVGEnumMapping SVGViewElement::sZoomAndPanMap[] = {
+nsSVGEnumMapping SVGViewElement::sZoomAndPanMap[] = {
     {nsGkAtoms::disable, SVG_ZOOMANDPAN_DISABLE},
     {nsGkAtoms::magnify, SVG_ZOOMANDPAN_MAGNIFY},
     {nullptr, 0}};
 
 SVGElement::EnumInfo SVGViewElement::sEnumInfo[1] = {
     {nsGkAtoms::zoomAndPan, sZoomAndPanMap, SVG_ZOOMANDPAN_MAGNIFY}};
 
 //----------------------------------------------------------------------
--- a/dom/svg/SVGViewElement.h
+++ b/dom/svg/SVGViewElement.h
@@ -2,21 +2,21 @@
 /* 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 "SVGElement.h"
+#include "nsSVGEnum.h"
+#include "nsSVGViewBox.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
-#include "SVGEnum.h"
 #include "SVGStringList.h"
-#include "nsSVGViewBox.h"
-#include "mozilla/dom/SVGElement.h"
 
 class nsSVGOuterSVGFrame;
 
 nsresult NS_NewSVGViewElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 class SVGFragmentIdentifier;
@@ -49,18 +49,18 @@ class SVGViewElement : public SVGViewEle
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
 
  private:
   // SVGElement overrides
 
   virtual EnumAttributesInfo GetEnumInfo() override;
 
   enum { ZOOMANDPAN };
-  SVGEnum mEnumAttributes[1];
-  static SVGEnumMapping sZoomAndPanMap[];
+  nsSVGEnum mEnumAttributes[1];
+  static nsSVGEnumMapping sZoomAndPanMap[];
   static EnumInfo sEnumInfo[1];
 
   virtual nsSVGViewBox* GetViewBox() override;
   virtual SVGAnimatedPreserveAspectRatio* GetPreserveAspectRatio() override;
 
   nsSVGViewBox mViewBox;
   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
 };
--- a/dom/svg/SVGViewportElement.h
+++ b/dom/svg/SVGViewportElement.h
@@ -6,23 +6,23 @@
 
 #ifndef mozilla_dom_SVGViewportElement_h
 #define mozilla_dom_SVGViewportElement_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/dom/FromParser.h"
 #include "nsAutoPtr.h"
 #include "nsIContentInlines.h"
+#include "nsISVGPoint.h"
 #include "SVGAnimatedPreserveAspectRatio.h"
-#include "SVGEnum.h"
+#include "nsSVGEnum.h"
 #include "SVGGraphicsElement.h"
 #include "SVGImageContext.h"
+#include "SVGPreserveAspectRatio.h"
 #include "nsSVGLength2.h"
-#include "nsISVGPoint.h"
-#include "SVGPreserveAspectRatio.h"
 #include "nsSVGViewBox.h"
 
 class nsSVGOuterSVGFrame;
 class nsSVGViewportFrame;
 
 namespace mozilla {
 class AutoPreserveAspectRatioOverride;
 class DOMSVGAnimatedPreserveAspectRatio;
--- a/dom/svg/moz.build
+++ b/dom/svg/moz.build
@@ -119,16 +119,17 @@ UNIFIED_SOURCES += [
     'DOMSVGPathSegList.cpp',
     'DOMSVGPoint.cpp',
     'DOMSVGPointList.cpp',
     'DOMSVGStringList.cpp',
     'DOMSVGTransform.cpp',
     'DOMSVGTransformList.cpp',
     'nsISVGPoint.cpp',
     'nsSVGBoolean.cpp',
+    'nsSVGEnum.cpp',
     'nsSVGInteger.cpp',
     'nsSVGIntegerPair.cpp',
     'nsSVGLength2.cpp',
     'nsSVGNumber2.cpp',
     'nsSVGNumberPair.cpp',
     'nsSVGString.cpp',
     'nsSVGViewBox.cpp',
     'SVGAElement.cpp',
@@ -158,17 +159,16 @@ UNIFIED_SOURCES += [
     'SVGContentUtils.cpp',
     'SVGDataParser.cpp',
     'SVGDefsElement.cpp',
     'SVGDescElement.cpp',
     'SVGDocument.cpp',
     'SVGElement.cpp',
     'SVGElementFactory.cpp',
     'SVGEllipseElement.cpp',
-    'SVGEnum.cpp',
     'SVGFEBlendElement.cpp',
     'SVGFEColorMatrixElement.cpp',
     'SVGFEComponentTransferElement.cpp',
     'SVGFECompositeElement.cpp',
     'SVGFEConvolveMatrixElement.cpp',
     'SVGFEDiffuseLightingElement.cpp',
     'SVGFEDisplacementMapElement.cpp',
     'SVGFEDistantLightElement.cpp',
rename from dom/svg/SVGEnum.cpp
rename to dom/svg/nsSVGEnum.cpp
--- a/dom/svg/SVGEnum.cpp
+++ b/dom/svg/nsSVGEnum.cpp
@@ -1,42 +1,41 @@
 /* -*- 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 "SVGEnum.h"
+#include "nsSVGEnum.h"
 
-#include "mozilla/dom/SVGElement.h"
-#include "nsAtom.h"
 #include "nsError.h"
 #include "nsSVGAttrTearoffTable.h"
-#include "SMILEnumType.h"
+#include "nsAtom.h"
+#include "SVGElement.h"
 #include "nsSMILValue.h"
+#include "SMILEnumType.h"
 
+using namespace mozilla;
 using namespace mozilla::dom;
 
-namespace mozilla {
-
-static nsSVGAttrTearoffTable<SVGEnum, SVGEnum::DOMAnimatedEnum>
+static nsSVGAttrTearoffTable<nsSVGEnum, nsSVGEnum::DOMAnimatedEnum>
     sSVGAnimatedEnumTearoffTable;
 
-const SVGEnumMapping* SVGEnum::GetMapping(SVGElement* aSVGElement) {
+const nsSVGEnumMapping* nsSVGEnum::GetMapping(SVGElement* aSVGElement) {
   SVGElement::EnumAttributesInfo info = aSVGElement->GetEnumInfo();
 
   NS_ASSERTION(info.mEnumCount > 0 && mAttrEnum < info.mEnumCount,
                "mapping request for a non-attrib enum");
 
   return info.mEnumInfo[mAttrEnum].mMapping;
 }
 
-nsresult SVGEnum::SetBaseValueAtom(const nsAtom* aValue,
-                                   SVGElement* aSVGElement) {
-  const SVGEnumMapping* mapping = GetMapping(aSVGElement);
+nsresult nsSVGEnum::SetBaseValueAtom(const nsAtom* aValue,
+                                     SVGElement* aSVGElement) {
+  const nsSVGEnumMapping* mapping = GetMapping(aSVGElement);
 
   while (mapping && mapping->mKey) {
     if (aValue == mapping->mKey) {
       mIsBaseSet = true;
       if (mBaseVal != mapping->mVal) {
         mBaseVal = mapping->mVal;
         if (!mIsAnimated) {
           mAnimVal = mBaseVal;
@@ -50,31 +49,31 @@ nsresult SVGEnum::SetBaseValueAtom(const
       return NS_OK;
     }
     mapping++;
   }
 
   return NS_ERROR_DOM_TYPE_ERR;
 }
 
-nsAtom* SVGEnum::GetBaseValueAtom(SVGElement* aSVGElement) {
-  const SVGEnumMapping* mapping = GetMapping(aSVGElement);
+nsAtom* nsSVGEnum::GetBaseValueAtom(SVGElement* aSVGElement) {
+  const nsSVGEnumMapping* mapping = GetMapping(aSVGElement);
 
   while (mapping && mapping->mKey) {
     if (mBaseVal == mapping->mVal) {
       return mapping->mKey;
     }
     mapping++;
   }
   NS_ERROR("unknown enumeration value");
   return nsGkAtoms::_empty;
 }
 
-nsresult SVGEnum::SetBaseValue(uint16_t aValue, SVGElement* aSVGElement) {
-  const SVGEnumMapping* mapping = GetMapping(aSVGElement);
+nsresult nsSVGEnum::SetBaseValue(uint16_t aValue, SVGElement* aSVGElement) {
+  const nsSVGEnumMapping* mapping = GetMapping(aSVGElement);
 
   while (mapping && mapping->mKey) {
     if (mapping->mVal == aValue) {
       mIsBaseSet = true;
       if (mBaseVal != uint8_t(aValue)) {
         mBaseVal = uint8_t(aValue);
         if (!mIsAnimated) {
           mAnimVal = mBaseVal;
@@ -85,51 +84,51 @@ nsresult SVGEnum::SetBaseValue(uint16_t 
       }
       return NS_OK;
     }
     mapping++;
   }
   return NS_ERROR_DOM_TYPE_ERR;
 }
 
-void SVGEnum::SetAnimValue(uint16_t aValue, SVGElement* aSVGElement) {
+void nsSVGEnum::SetAnimValue(uint16_t aValue, SVGElement* aSVGElement) {
   if (mIsAnimated && aValue == mAnimVal) {
     return;
   }
   mAnimVal = aValue;
   mIsAnimated = true;
   aSVGElement->DidAnimateEnum(mAttrEnum);
 }
 
-already_AddRefed<SVGAnimatedEnumeration> SVGEnum::ToDOMAnimatedEnum(
+already_AddRefed<SVGAnimatedEnumeration> nsSVGEnum::ToDOMAnimatedEnum(
     SVGElement* aSVGElement) {
   RefPtr<DOMAnimatedEnum> domAnimatedEnum =
       sSVGAnimatedEnumTearoffTable.GetTearoff(this);
   if (!domAnimatedEnum) {
     domAnimatedEnum = new DOMAnimatedEnum(this, aSVGElement);
     sSVGAnimatedEnumTearoffTable.AddTearoff(this, domAnimatedEnum);
   }
 
   return domAnimatedEnum.forget();
 }
 
-SVGEnum::DOMAnimatedEnum::~DOMAnimatedEnum() {
+nsSVGEnum::DOMAnimatedEnum::~DOMAnimatedEnum() {
   sSVGAnimatedEnumTearoffTable.RemoveTearoff(mVal);
 }
 
-UniquePtr<nsISMILAttr> SVGEnum::ToSMILAttr(SVGElement* aSVGElement) {
+UniquePtr<nsISMILAttr> nsSVGEnum::ToSMILAttr(SVGElement* aSVGElement) {
   return MakeUnique<SMILEnum>(this, aSVGElement);
 }
 
-nsresult SVGEnum::SMILEnum::ValueFromString(
-    const nsAString& aStr, const SVGAnimationElement* /*aSrcElement*/,
+nsresult nsSVGEnum::SMILEnum::ValueFromString(
+    const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
     nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const {
   nsAtom* valAtom = NS_GetStaticAtom(aStr);
   if (valAtom) {
-    const SVGEnumMapping* mapping = mVal->GetMapping(mSVGElement);
+    const nsSVGEnumMapping* mapping = mVal->GetMapping(mSVGElement);
 
     while (mapping && mapping->mKey) {
       if (valAtom == mapping->mKey) {
         nsSMILValue val(SMILEnumType::Singleton());
         val.mU.mUint = mapping->mVal;
         aValue = val;
         aPreventCachingOfSandwich = false;
         return NS_OK;
@@ -138,34 +137,32 @@ nsresult SVGEnum::SMILEnum::ValueFromStr
     }
   }
 
   // only a warning since authors may mistype attribute values
   NS_WARNING("unknown enumeration key");
   return NS_ERROR_FAILURE;
 }
 
-nsSMILValue SVGEnum::SMILEnum::GetBaseValue() const {
+nsSMILValue nsSVGEnum::SMILEnum::GetBaseValue() const {
   nsSMILValue val(SMILEnumType::Singleton());
   val.mU.mUint = mVal->mBaseVal;
   return val;
 }
 
-void SVGEnum::SMILEnum::ClearAnimValue() {
+void nsSVGEnum::SMILEnum::ClearAnimValue() {
   if (mVal->mIsAnimated) {
     mVal->mIsAnimated = false;
     mVal->mAnimVal = mVal->mBaseVal;
     mSVGElement->DidAnimateEnum(mVal->mAttrEnum);
   }
 }
 
-nsresult SVGEnum::SMILEnum::SetAnimValue(const nsSMILValue& aValue) {
+nsresult nsSVGEnum::SMILEnum::SetAnimValue(const nsSMILValue& aValue) {
   NS_ASSERTION(aValue.mType == SMILEnumType::Singleton(),
                "Unexpected type to assign animated value");
   if (aValue.mType == SMILEnumType::Singleton()) {
     MOZ_ASSERT(aValue.mU.mUint <= USHRT_MAX,
                "Very large enumerated value - too big for uint16_t");
     mVal->SetAnimValue(uint16_t(aValue.mU.mUint), mSVGElement);
   }
   return NS_OK;
 }
-
-}  // namespace mozilla
rename from dom/svg/SVGEnum.h
rename to dom/svg/nsSVGEnum.h
--- a/dom/svg/SVGEnum.h
+++ b/dom/svg/nsSVGEnum.h
@@ -5,37 +5,38 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __NS_SVGENUM_H__
 #define __NS_SVGENUM_H__
 
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
 #include "nsISMILAttr.h"
+#include "SVGElement.h"
 #include "mozilla/Attributes.h"
+#include "mozilla/dom/SVGAnimatedEnumeration.h"
 #include "mozilla/UniquePtr.h"
-#include "mozilla/dom/SVGAnimatedEnumeration.h"
-#include "mozilla/dom/SVGElement.h"
 
 class nsAtom;
 class nsSMILValue;
 
 namespace mozilla {
 namespace dom {
 class SVGAnimationElement;
 }  // namespace dom
+}  // namespace mozilla
 
-typedef uint8_t SVGEnumValue;
+typedef uint8_t nsSVGEnumValue;
 
-struct SVGEnumMapping {
+struct nsSVGEnumMapping {
   nsStaticAtom* const mKey;
-  const SVGEnumValue mVal;
+  const nsSVGEnumValue mVal;
 };
 
-class SVGEnum {
+class nsSVGEnum {
  public:
   typedef mozilla::dom::SVGElement SVGElement;
 
   void Init(uint8_t aAttrEnum, uint16_t aValue) {
     mAnimVal = mBaseVal = uint8_t(aValue);
     mAttrEnum = aAttrEnum;
     mIsAnimated = false;
     mIsBaseSet = false;
@@ -51,31 +52,31 @@ class SVGEnum {
   bool IsExplicitlySet() const { return mIsAnimated || mIsBaseSet; }
 
   already_AddRefed<mozilla::dom::SVGAnimatedEnumeration> ToDOMAnimatedEnum(
       SVGElement* aSVGElement);
 
   mozilla::UniquePtr<nsISMILAttr> ToSMILAttr(SVGElement* aSVGElement);
 
  private:
-  SVGEnumValue mAnimVal;
-  SVGEnumValue mBaseVal;
+  nsSVGEnumValue mAnimVal;
+  nsSVGEnumValue mBaseVal;
   uint8_t mAttrEnum;  // element specified tracking for attribute
   bool mIsAnimated;
   bool mIsBaseSet;
 
-  const SVGEnumMapping* GetMapping(SVGElement* aSVGElement);
+  const nsSVGEnumMapping* GetMapping(SVGElement* aSVGElement);
 
  public:
   struct DOMAnimatedEnum final : public mozilla::dom::SVGAnimatedEnumeration {
-    DOMAnimatedEnum(SVGEnum* aVal, SVGElement* aSVGElement)
+    DOMAnimatedEnum(nsSVGEnum* aVal, SVGElement* aSVGElement)
         : mozilla::dom::SVGAnimatedEnumeration(aSVGElement), mVal(aVal) {}
     virtual ~DOMAnimatedEnum();
 
-    SVGEnum* mVal;  // kept alive because it belongs to content
+    nsSVGEnum* 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,
                             mozilla::ErrorResult& aRv) override {
       aRv = mVal->SetBaseValue(aBaseVal, mSVGElement);
     }
     virtual uint16_t AnimVal() override {
@@ -84,31 +85,29 @@ class SVGEnum {
       // modifications.
       mSVGElement->FlushAnimations();
       return mVal->GetAnimValue();
     }
   };
 
   struct SMILEnum : public nsISMILAttr {
    public:
-    SMILEnum(SVGEnum* aVal, SVGElement* aSVGElement)
+    SMILEnum(nsSVGEnum* aVal, SVGElement* aSVGElement)
         : mVal(aVal), mSVGElement(aSVGElement) {}
 
     // These will stay alive because a nsISMILAttr only lives as long
     // as the Compositing step, and DOM elements don't get a chance to
     // die during that.
-    SVGEnum* mVal;
+    nsSVGEnum* mVal;
     SVGElement* mSVGElement;
 
     // nsISMILAttr methods
     virtual nsresult ValueFromString(
         const nsAString& aStr,
         const mozilla::dom::SVGAnimationElement* aSrcElement,
         nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
     virtual nsSMILValue GetBaseValue() const override;
     virtual void ClearAnimValue() override;
     virtual nsresult SetAnimValue(const nsSMILValue& aValue) override;
   };
 };
 
-}  // namespace mozilla
-
 #endif  //__NS_SVGENUM_H__
--- a/layout/svg/nsSVGClipPathFrame.cpp
+++ b/layout/svg/nsSVGClipPathFrame.cpp
@@ -422,17 +422,17 @@ void nsSVGClipPathFrame::Init(nsIContent
 
 gfxMatrix nsSVGClipPathFrame::GetCanvasTM() { return mMatrixForChildren; }
 
 gfxMatrix nsSVGClipPathFrame::GetClipPathTransform(nsIFrame* aClippedFrame) {
   SVGClipPathElement* content = static_cast<SVGClipPathElement*>(GetContent());
 
   gfxMatrix tm = content->PrependLocalTransformsTo(gfxMatrix());
 
-  SVGEnum* clipPathUnits =
+  nsSVGEnum* clipPathUnits =
       &content->mEnumAttributes[SVGClipPathElement::CLIPPATHUNITS];
 
   uint32_t flags = nsSVGUtils::eBBoxIncludeFillGeometry |
                    (aClippedFrame->StyleBorder()->mBoxDecorationBreak ==
                             StyleBoxDecorationBreak::Clone
                         ? nsSVGUtils::eIncludeOnlyCurrentFrameForNonSVGElement
                         : 0);
 
--- a/layout/svg/nsSVGFilterFrame.cpp
+++ b/layout/svg/nsSVGFilterFrame.cpp
@@ -25,17 +25,17 @@ using namespace mozilla::dom;
 nsIFrame* NS_NewSVGFilterFrame(nsIPresShell* aPresShell,
                                ComputedStyle* aStyle) {
   return new (aPresShell) nsSVGFilterFrame(aStyle);
 }
 
 NS_IMPL_FRAMEARENA_HELPERS(nsSVGFilterFrame)
 
 uint16_t nsSVGFilterFrame::GetEnumValue(uint32_t aIndex, nsIContent* aDefault) {
-  SVGEnum& thisEnum =
+  nsSVGEnum& thisEnum =
       static_cast<SVGFilterElement*>(GetContent())->mEnumAttributes[aIndex];
 
   if (thisEnum.IsExplicitlySet()) {
     return thisEnum.GetAnimValue();
   }
 
   // Before we recurse, make sure we'll break reference loops and over long
   // reference chains:
--- a/layout/svg/nsSVGGradientFrame.cpp
+++ b/layout/svg/nsSVGGradientFrame.cpp
@@ -60,18 +60,19 @@ nsresult nsSVGGradientFrame::AttributeCh
   return nsSVGPaintServerFrame::AttributeChanged(aNameSpaceID, aAttribute,
                                                  aModType);
 }
 
 //----------------------------------------------------------------------
 
 uint16_t nsSVGGradientFrame::GetEnumValue(uint32_t aIndex,
                                           nsIContent* aDefault) {
-  const SVGEnum& thisEnum = static_cast<dom::SVGGradientElement*>(GetContent())
-                                ->mEnumAttributes[aIndex];
+  const nsSVGEnum& thisEnum =
+      static_cast<dom::SVGGradientElement*>(GetContent())
+          ->mEnumAttributes[aIndex];
 
   if (thisEnum.IsExplicitlySet()) {
     return thisEnum.GetAnimValue();
   }
 
   // Before we recurse, make sure we'll break reference loops and over long
   // reference chains:
   static int16_t sRefChainLengthCounter = AutoReferenceChainGuard::noChain;
--- a/layout/svg/nsSVGMaskFrame.cpp
+++ b/layout/svg/nsSVGMaskFrame.cpp
@@ -199,17 +199,17 @@ void nsSVGMaskFrame::Init(nsIContent* aC
 }
 #endif /* DEBUG */
 
 gfxMatrix nsSVGMaskFrame::GetCanvasTM() { return mMatrixForChildren; }
 
 gfxMatrix nsSVGMaskFrame::GetMaskTransform(nsIFrame* aMaskedFrame) {
   SVGMaskElement* content = static_cast<SVGMaskElement*>(GetContent());
 
-  SVGEnum* maskContentUnits =
+  nsSVGEnum* maskContentUnits =
       &content->mEnumAttributes[SVGMaskElement::MASKCONTENTUNITS];
 
   uint32_t flags = nsSVGUtils::eBBoxIncludeFillGeometry |
                    (aMaskedFrame->StyleBorder()->mBoxDecorationBreak ==
                             StyleBoxDecorationBreak::Clone
                         ? nsSVGUtils::eIncludeOnlyCurrentFrameForNonSVGElement
                         : 0);
 
--- a/layout/svg/nsSVGPatternFrame.cpp
+++ b/layout/svg/nsSVGPatternFrame.cpp
@@ -405,17 +405,17 @@ nsSVGPatternFrame *nsSVGPatternFrame::Ge
     return nullptr;
   }
 
   return next->GetPatternWithChildren();
 }
 
 uint16_t nsSVGPatternFrame::GetEnumValue(uint32_t aIndex,
                                          nsIContent *aDefault) {
-  SVGEnum &thisEnum =
+  nsSVGEnum &thisEnum =
       static_cast<SVGPatternElement *>(GetContent())->mEnumAttributes[aIndex];
 
   if (thisEnum.IsExplicitlySet()) {
     return thisEnum.GetAnimValue();
   }
 
   // Before we recurse, make sure we'll break reference loops and over long
   // reference chains:
--- a/layout/svg/nsSVGUtils.cpp
+++ b/layout/svg/nsSVGUtils.cpp
@@ -1199,17 +1199,17 @@ bool nsSVGUtils::CanOptimizeOpacity(nsIF
 
   if (!style->HasFill() || !HasStroke(aFrame)) {
     return true;
   }
   return false;
 }
 
 gfxMatrix nsSVGUtils::AdjustMatrixForUnits(const gfxMatrix& aMatrix,
-                                           SVGEnum* aUnits, nsIFrame* aFrame,
+                                           nsSVGEnum* aUnits, nsIFrame* aFrame,
                                            uint32_t aFlags) {
   if (aFrame && aUnits->GetAnimValue() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
     gfxRect bbox = GetBBox(aFrame, aFlags);
     gfxMatrix tm = aMatrix;
     tm.PreTranslate(gfxPoint(bbox.X(), bbox.Y()));
     tm.PreScale(bbox.Width(), bbox.Height());
     return tm;
   }
--- a/layout/svg/nsSVGUtils.h
+++ b/layout/svg/nsSVGUtils.h
@@ -31,27 +31,27 @@
 class gfxContext;
 class nsFrameList;
 class nsIContent;
 class nsIDocument;
 class nsIFrame;
 class nsPresContext;
 class nsStyleSVGPaint;
 class nsSVGDisplayContainerFrame;
+class nsSVGEnum;
 class nsSVGLength2;
 class nsSVGOuterSVGFrame;
 class nsTextFrame;
 
 struct nsStyleSVG;
 struct nsRect;
 
 namespace mozilla {
 class SVGContextPaint;
 struct SVGContextPaintImpl;
-class SVGEnum;
 class SVGGeometryFrame;
 namespace dom {
 class Element;
 class SVGElement;
 class UserSpaceMetrics;
 }  // namespace dom
 namespace gfx {
 class DrawTarget;
@@ -339,18 +339,18 @@ class nsSVGUtils {
    * (I.e. so that [0,0] is at the top left of its bbox, and [1,1] is at the
    * bottom right of its bbox).
    *
    * If the bbox is empty, this will return a singular matrix.
    *
    * @param aFlags One or more of the BBoxFlags values defined below.
    */
   static gfxMatrix AdjustMatrixForUnits(const gfxMatrix& aMatrix,
-                                        mozilla::SVGEnum* aUnits,
-                                        nsIFrame* aFrame, uint32_t aFlags);
+                                        nsSVGEnum* aUnits, nsIFrame* aFrame,
+                                        uint32_t aFlags);
 
   enum BBoxFlags {
     eBBoxIncludeFill = 1 << 0,
     // Include the geometry of the fill even when the fill does not
     // actually render (e.g. when fill="none" or fill-opacity="0")
     eBBoxIncludeFillGeometry = 1 << 1,
     eBBoxIncludeStroke = 1 << 2,
     // Include the geometry of the stroke even when the stroke does not