Bug 1518033 - Move nsSVGBoolean and nsSVGInteger to the mozilla namespace r=jwatt
authorlongsonr <longsonr@gmail.com>
Mon, 07 Jan 2019 19:23:13 +0000
changeset 509919 6b2a8ae7d91e1a4acfefd85379cba3e8962a8b9a
parent 509918 9b9dc72ed3444122f72145872490e75bbe9f3028
child 509920 096e9d2bdcb1d7d9ea029de2943f4b41c92cbd5b
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)
reviewersjwatt
bugs1518033
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 1518033 - Move nsSVGBoolean and nsSVGInteger to the mozilla namespace r=jwatt
dom/svg/SVGAnimatedBoolean.h
dom/svg/SVGBoolean.cpp
dom/svg/SVGBoolean.h
dom/svg/SVGElement.cpp
dom/svg/SVGElement.h
dom/svg/SVGFEConvolveMatrixElement.h
dom/svg/SVGFETurbulenceElement.h
dom/svg/SVGInteger.cpp
dom/svg/SVGInteger.h
dom/svg/moz.build
dom/svg/nsSVGBoolean.cpp
dom/svg/nsSVGBoolean.h
dom/svg/nsSVGInteger.cpp
dom/svg/nsSVGInteger.h
--- a/dom/svg/SVGAnimatedBoolean.h
+++ b/dom/svg/SVGAnimatedBoolean.h
@@ -2,45 +2,45 @@
 /* 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_SVGAnimatedBoolean_h
 #define mozilla_dom_SVGAnimatedBoolean_h
 
+#include "SVGBoolean.h"
 #include "nsWrapperCache.h"
-#include "SVGElement.h"
 #include "mozilla/Attributes.h"
-#include "nsSVGBoolean.h"
+#include "mozilla/dom/SVGElement.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, SVGElement* aSVGElement)
+  SVGAnimatedBoolean(SVGBoolean* aVal, SVGElement* aSVGElement)
       : mVal(aVal), mSVGElement(aSVGElement) {}
 
   // WebIDL
   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
+  SVGBoolean* mVal;  // kept alive because it belongs to content
   RefPtr<SVGElement> mSVGElement;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_SVGAnimatedBoolean_h
rename from dom/svg/nsSVGBoolean.cpp
rename to dom/svg/SVGBoolean.cpp
--- a/dom/svg/nsSVGBoolean.cpp
+++ b/dom/svg/SVGBoolean.cpp
@@ -1,30 +1,31 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsSVGBoolean.h"
+#include "SVGBoolean.h"
 
 #include "nsError.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SMILBoolType.h"
 #include "SVGAnimatedBoolean.h"
 
-using namespace mozilla;
 using namespace mozilla::dom;
 
+namespace mozilla {
+
 /* Implementation */
 
-static inline nsSVGAttrTearoffTable<nsSVGBoolean, SVGAnimatedBoolean>&
+static inline nsSVGAttrTearoffTable<SVGBoolean, SVGAnimatedBoolean>&
 SVGAnimatedBooleanTearoffTable() {
-  static nsSVGAttrTearoffTable<nsSVGBoolean, SVGAnimatedBoolean>
+  static nsSVGAttrTearoffTable<SVGBoolean, SVGAnimatedBoolean>
       sSVGAnimatedBooleanTearoffTable;
   return sSVGAnimatedBooleanTearoffTable;
 }
 
 static bool GetValueFromString(const nsAString& aValueAsString, bool& aValue) {
   if (aValueAsString.EqualsLiteral("true")) {
     aValue = true;
     return true;
@@ -43,18 +44,18 @@ static nsresult GetValueFromAtom(const n
   }
   if (aValueAsAtom == nsGkAtoms::_false) {
     *aValue = false;
     return NS_OK;
   }
   return NS_ERROR_DOM_SYNTAX_ERR;
 }
 
-nsresult nsSVGBoolean::SetBaseValueAtom(const nsAtom* aValue,
-                                        SVGElement* aSVGElement) {
+nsresult SVGBoolean::SetBaseValueAtom(const nsAtom* aValue,
+                                      SVGElement* aSVGElement) {
   bool val = false;
 
   nsresult rv = GetValueFromAtom(aValue, &val);
   if (NS_FAILED(rv)) {
     return rv;
   }
 
   mBaseVal = val;
@@ -65,93 +66,95 @@ nsresult nsSVGBoolean::SetBaseValueAtom(
   }
 
   // We don't need to call DidChange* here - we're only called by
   // SVGElement::ParseAttribute under Element::SetAttr,
   // which takes care of notifying.
   return NS_OK;
 }
 
-nsAtom* nsSVGBoolean::GetBaseValueAtom() const {
+nsAtom* SVGBoolean::GetBaseValueAtom() const {
   return mBaseVal ? nsGkAtoms::_true : nsGkAtoms::_false;
 }
 
-void nsSVGBoolean::SetBaseValue(bool aValue, SVGElement* aSVGElement) {
+void SVGBoolean::SetBaseValue(bool aValue, SVGElement* aSVGElement) {
   if (aValue == mBaseVal) {
     return;
   }
 
   mBaseVal = aValue;
   if (!mIsAnimated) {
     mAnimVal = mBaseVal;
   } else {
     aSVGElement->AnimationNeedsResample();
   }
   aSVGElement->DidChangeBoolean(mAttrEnum);
 }
 
-void nsSVGBoolean::SetAnimValue(bool aValue, SVGElement* aSVGElement) {
+void SVGBoolean::SetAnimValue(bool aValue, SVGElement* aSVGElement) {
   if (mIsAnimated && mAnimVal == aValue) {
     return;
   }
   mAnimVal = aValue;
   mIsAnimated = true;
   aSVGElement->DidAnimateBoolean(mAttrEnum);
 }
 
-already_AddRefed<SVGAnimatedBoolean> nsSVGBoolean::ToDOMAnimatedBoolean(
+already_AddRefed<SVGAnimatedBoolean> SVGBoolean::ToDOMAnimatedBoolean(
     SVGElement* aSVGElement) {
   RefPtr<SVGAnimatedBoolean> domAnimatedBoolean =
       SVGAnimatedBooleanTearoffTable().GetTearoff(this);
   if (!domAnimatedBoolean) {
     domAnimatedBoolean = new SVGAnimatedBoolean(this, aSVGElement);
     SVGAnimatedBooleanTearoffTable().AddTearoff(this, domAnimatedBoolean);
   }
 
   return domAnimatedBoolean.forget();
 }
 
 SVGAnimatedBoolean::~SVGAnimatedBoolean() {
   SVGAnimatedBooleanTearoffTable().RemoveTearoff(mVal);
 }
 
-UniquePtr<nsISMILAttr> nsSVGBoolean::ToSMILAttr(SVGElement* aSVGElement) {
+UniquePtr<nsISMILAttr> SVGBoolean::ToSMILAttr(SVGElement* aSVGElement) {
   return MakeUnique<SMILBool>(this, aSVGElement);
 }
 
-nsresult nsSVGBoolean::SMILBool::ValueFromString(
+nsresult SVGBoolean::SMILBool::ValueFromString(
     const nsAString& aStr, const SVGAnimationElement* /*aSrcElement*/,
     nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const {
   bool value;
   if (!GetValueFromString(aStr, value)) {
     return NS_ERROR_DOM_SYNTAX_ERR;
   }
 
   nsSMILValue val(SMILBoolType::Singleton());
   val.mU.mBool = value;
   aValue = val;
   aPreventCachingOfSandwich = false;
 
   return NS_OK;
 }
 
-nsSMILValue nsSVGBoolean::SMILBool::GetBaseValue() const {
+nsSMILValue SVGBoolean::SMILBool::GetBaseValue() const {
   nsSMILValue val(SMILBoolType::Singleton());
   val.mU.mBool = mVal->mBaseVal;
   return val;
 }
 
-void nsSVGBoolean::SMILBool::ClearAnimValue() {
+void SVGBoolean::SMILBool::ClearAnimValue() {
   if (mVal->mIsAnimated) {
     mVal->mIsAnimated = false;
     mVal->mAnimVal = mVal->mBaseVal;
     mSVGElement->DidAnimateBoolean(mVal->mAttrEnum);
   }
 }
 
-nsresult nsSVGBoolean::SMILBool::SetAnimValue(const nsSMILValue& aValue) {
+nsresult SVGBoolean::SMILBool::SetAnimValue(const nsSMILValue& aValue) {
   NS_ASSERTION(aValue.mType == SMILBoolType::Singleton(),
                "Unexpected type to assign animated value");
   if (aValue.mType == SMILBoolType::Singleton()) {
     mVal->SetAnimValue(uint16_t(aValue.mU.mBool), mSVGElement);
   }
   return NS_OK;
 }
+
+}  // namespace mozilla
rename from dom/svg/nsSVGBoolean.h
rename to dom/svg/SVGBoolean.h
--- a/dom/svg/nsSVGBoolean.h
+++ b/dom/svg/SVGBoolean.h
@@ -17,19 +17,18 @@ class nsAtom;
 class nsSMILValue;
 
 namespace mozilla {
 namespace dom {
 class SVGAnimationElement;
 class SVGAnimatedBoolean;
 class SVGElement;
 }  // namespace dom
-}  // namespace mozilla
 
-class nsSVGBoolean {
+class SVGBoolean {
  public:
   typedef mozilla::dom::SVGElement SVGElement;
 
   void Init(uint8_t aAttrEnum = 0xff, bool aValue = false) {
     mAnimVal = mBaseVal = aValue;
     mAttrEnum = aAttrEnum;
     mIsAnimated = false;
   }
@@ -51,28 +50,31 @@ class nsSVGBoolean {
   bool mAnimVal;
   bool mBaseVal;
   bool mIsAnimated;
   uint8_t mAttrEnum;  // element specified tracking for attribute
 
  public:
   struct SMILBool : public nsISMILAttr {
    public:
-    SMILBool(nsSVGBoolean* aVal, SVGElement* aSVGElement)
+    SMILBool(SVGBoolean* 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.
-    nsSVGBoolean* mVal;
+    SVGBoolean* 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_SVGBOOLEAN_H__
--- a/dom/svg/SVGElement.cpp
+++ b/dom/svg/SVGElement.cpp
@@ -39,19 +39,19 @@
 #include "nsQueryObject.h"
 #include "nsLayoutUtils.h"
 #include "SVGAngle.h"
 #include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedLengthList.h"
 #include "SVGAnimatedPointList.h"
 #include "SVGAnimatedPathSegList.h"
 #include "SVGAnimatedTransformList.h"
-#include "nsSVGBoolean.h"
+#include "SVGBoolean.h"
 #include "SVGEnum.h"
-#include "nsSVGInteger.h"
+#include "SVGInteger.h"
 #include "SVGIntegerPair.h"
 #include "nsSVGLength2.h"
 #include "SVGMotionSMILAttr.h"
 #include "nsSVGNumber2.h"
 #include "SVGNumberPair.h"
 #include "SVGString.h"
 #include "SVGViewBox.h"
 #include <stdarg.h>
@@ -420,17 +420,17 @@ bool SVGElement::ParseAttribute(int32_t 
           }
           foundMatch = true;
           break;
         }
       }
     }
 
     if (!foundMatch) {
-      // Check for nsSVGInteger attribute
+      // Check for SVGInteger attribute
       IntegerAttributesInfo integerInfo = GetIntegerInfo();
       for (i = 0; i < integerInfo.mIntegerCount; i++) {
         if (aAttribute == integerInfo.mIntegerInfo[i].mName) {
           rv = integerInfo.mIntegers[i].SetBaseValueString(aValue, this);
           if (NS_FAILED(rv)) {
             integerInfo.Reset(i);
           } else {
             aResult.SetTo(integerInfo.mIntegers[i].GetBaseValue(), &aValue);
@@ -475,17 +475,17 @@ bool SVGElement::ParseAttribute(int32_t 
           }
           foundMatch = true;
           break;
         }
       }
     }
 
     if (!foundMatch) {
-      // Check for nsSVGBoolean attribute
+      // Check for SVGBoolean attribute
       BooleanAttributesInfo booleanInfo = GetBooleanInfo();
       for (i = 0; i < booleanInfo.mBooleanCount; i++) {
         if (aAttribute == booleanInfo.mBooleanInfo[i].mName) {
           nsAtom* valAtom = NS_GetStaticAtom(aValue);
           rv = valAtom
                    ? booleanInfo.mBooleans[i].SetBaseValueAtom(valAtom, this)
                    : NS_ERROR_DOM_SYNTAX_ERR;
           if (NS_FAILED(rv)) {
--- a/dom/svg/SVGElement.h
+++ b/dom/svg/SVGElement.h
@@ -22,36 +22,36 @@
 #include "nsChangeHint.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
 #include "nsISupportsImpl.h"
 #include "nsStyledElement.h"
 #include "gfxMatrix.h"
 
-class nsSVGBoolean;
-class nsSVGInteger;
 class nsSVGLength2;
 class nsSVGNumber2;
 
 nsresult NS_NewSVGElement(mozilla::dom::Element** aResult,
                           already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 class DeclarationBlock;
 
 class SVGAngle;
 class SVGAnimatedNumberList;
 class SVGAnimatedPathSegList;
 class SVGAnimatedPointList;
 class SVGAnimatedPreserveAspectRatio;
 class SVGAnimatedTransformList;
 class SVGAnimatedLengthList;
+class SVGBoolean;
 class SVGEnum;
 class SVGUserUnitList;
+class SVGInteger;
 class SVGIntegerPair;
 class SVGNumberList;
 class SVGNumberPair;
 class SVGString;
 class SVGStringList;
 class DOMSVGStringList;
 class SVGViewBox;
 
@@ -404,21 +404,21 @@ class SVGElement : public SVGElementBase
   };
 
   struct IntegerInfo {
     nsStaticAtom* const mName;
     const int32_t mDefaultValue;
   };
 
   struct IntegerAttributesInfo {
-    nsSVGInteger* const mIntegers;
+    SVGInteger* const mIntegers;
     const IntegerInfo* const mIntegerInfo;
     const uint32_t mIntegerCount;
 
-    IntegerAttributesInfo(nsSVGInteger* aIntegers, IntegerInfo* aIntegerInfo,
+    IntegerAttributesInfo(SVGInteger* aIntegers, IntegerInfo* aIntegerInfo,
                           uint32_t aIntegerCount)
         : mIntegers(aIntegers),
           mIntegerInfo(aIntegerInfo),
           mIntegerCount(aIntegerCount) {}
 
     void Reset(uint8_t aAttrEnum);
   };
 
@@ -462,21 +462,21 @@ class SVGElement : public SVGElementBase
   };
 
   struct BooleanInfo {
     nsStaticAtom* const mName;
     const bool mDefaultValue;
   };
 
   struct BooleanAttributesInfo {
-    nsSVGBoolean* const mBooleans;
+    SVGBoolean* const mBooleans;
     const BooleanInfo* const mBooleanInfo;
     const uint32_t mBooleanCount;
 
-    BooleanAttributesInfo(nsSVGBoolean* aBooleans, BooleanInfo* aBooleanInfo,
+    BooleanAttributesInfo(SVGBoolean* aBooleans, BooleanInfo* aBooleanInfo,
                           uint32_t aBooleanCount)
         : mBooleans(aBooleans),
           mBooleanInfo(aBooleanInfo),
           mBooleanCount(aBooleanCount) {}
 
     void Reset(uint8_t aAttrEnum);
   };
 
--- a/dom/svg/SVGFEConvolveMatrixElement.h
+++ b/dom/svg/SVGFEConvolveMatrixElement.h
@@ -3,20 +3,20 @@
 /* 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 "SVGBoolean.h"
 #include "SVGEnum.h"
 #include "SVGFilters.h"
-#include "nsSVGInteger.h"
+#include "SVGInteger.h"
 #include "SVGIntegerPair.h"
 #include "nsSVGNumber2.h"
 #include "SVGString.h"
 
 nsresult NS_NewSVGFEConvolveMatrixElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
@@ -81,25 +81,25 @@ class SVGFEConvolveMatrixElement : publi
   nsSVGNumber2 mNumberAttributes[2];
   static NumberInfo sNumberInfo[2];
 
   enum { KERNEL_UNIT_LENGTH };
   SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { TARGET_X, TARGET_Y };
-  nsSVGInteger mIntegerAttributes[2];
+  SVGInteger mIntegerAttributes[2];
   static IntegerInfo sIntegerInfo[2];
 
   enum { ORDER };
   SVGIntegerPair mIntegerPairAttributes[1];
   static IntegerPairInfo sIntegerPairInfo[1];
 
   enum { PRESERVEALPHA };
-  nsSVGBoolean mBooleanAttributes[1];
+  SVGBoolean mBooleanAttributes[1];
   static BooleanInfo sBooleanInfo[1];
 
   enum { EDGEMODE };
   SVGEnum mEnumAttributes[1];
   static SVGEnumMapping sEdgeModeMap[];
   static EnumInfo sEnumInfo[1];
 
   enum { RESULT, IN1 };
--- a/dom/svg/SVGFETurbulenceElement.h
+++ b/dom/svg/SVGFETurbulenceElement.h
@@ -5,17 +5,17 @@
  * 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 "SVGFilters.h"
 #include "nsSVGNumber2.h"
-#include "nsSVGInteger.h"
+#include "SVGInteger.h"
 #include "SVGString.h"
 
 nsresult NS_NewSVGFETurbulenceElement(
     nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
@@ -67,17 +67,17 @@ class SVGFETurbulenceElement : public SV
   nsSVGNumber2 mNumberAttributes[1];
   static NumberInfo sNumberInfo[1];
 
   enum { BASE_FREQ };
   SVGNumberPair mNumberPairAttributes[1];
   static NumberPairInfo sNumberPairInfo[1];
 
   enum { OCTAVES };
-  nsSVGInteger mIntegerAttributes[1];
+  SVGInteger mIntegerAttributes[1];
   static IntegerInfo sIntegerInfo[1];
 
   enum { TYPE, STITCHTILES };
   SVGEnum mEnumAttributes[2];
   static SVGEnumMapping sTypeMap[];
   static SVGEnumMapping sStitchTilesMap[];
   static EnumInfo sEnumInfo[2];
 
rename from dom/svg/nsSVGInteger.cpp
rename to dom/svg/SVGInteger.cpp
--- a/dom/svg/nsSVGInteger.cpp
+++ b/dom/svg/SVGInteger.cpp
@@ -1,54 +1,55 @@
 /* -*- 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 "nsSVGInteger.h"
+#include "SVGInteger.h"
 
 #include "nsError.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SMILIntegerType.h"
 #include "SVGContentUtils.h"
 
-using namespace mozilla;
 using namespace mozilla::dom;
 
+namespace mozilla {
+
 /* Implementation */
 
-static nsSVGAttrTearoffTable<nsSVGInteger, nsSVGInteger::DOMAnimatedInteger>
+static nsSVGAttrTearoffTable<SVGInteger, SVGInteger::DOMAnimatedInteger>
     sSVGAnimatedIntegerTearoffTable;
 
-nsresult nsSVGInteger::SetBaseValueString(const nsAString &aValueAsString,
-                                          SVGElement *aSVGElement) {
+nsresult SVGInteger::SetBaseValueString(const nsAString &aValueAsString,
+                                        SVGElement *aSVGElement) {
   int32_t value;
 
   if (!SVGContentUtils::ParseInteger(aValueAsString, value)) {
     return NS_ERROR_DOM_SYNTAX_ERR;
   }
 
   mIsBaseSet = true;
   mBaseVal = value;
   if (!mIsAnimated) {
     mAnimVal = mBaseVal;
   } else {
     aSVGElement->AnimationNeedsResample();
   }
   return NS_OK;
 }
 
-void nsSVGInteger::GetBaseValueString(nsAString &aValueAsString) {
+void SVGInteger::GetBaseValueString(nsAString &aValueAsString) {
   aValueAsString.Truncate();
   aValueAsString.AppendInt(mBaseVal);
 }
 
-void nsSVGInteger::SetBaseValue(int aValue, SVGElement *aSVGElement) {
+void SVGInteger::SetBaseValue(int aValue, SVGElement *aSVGElement) {
   // We can't just rely on SetParsedAttrValue (as called by DidChangeInteger)
   // detecting redundant changes since it will compare false if the existing
   // attribute value has an associated serialized version (a string value) even
   // if the integers match due to the way integers are stored in nsAttrValue.
   if (aValue == mBaseVal && mIsBaseSet) {
     return;
   }
 
@@ -57,75 +58,77 @@ void nsSVGInteger::SetBaseValue(int aVal
   if (!mIsAnimated) {
     mAnimVal = mBaseVal;
   } else {
     aSVGElement->AnimationNeedsResample();
   }
   aSVGElement->DidChangeInteger(mAttrEnum);
 }
 
-void nsSVGInteger::SetAnimValue(int aValue, SVGElement *aSVGElement) {
+void SVGInteger::SetAnimValue(int aValue, SVGElement *aSVGElement) {
   if (mIsAnimated && aValue == mAnimVal) {
     return;
   }
   mAnimVal = aValue;
   mIsAnimated = true;
   aSVGElement->DidAnimateInteger(mAttrEnum);
 }
 
-already_AddRefed<SVGAnimatedInteger> nsSVGInteger::ToDOMAnimatedInteger(
+already_AddRefed<SVGAnimatedInteger> SVGInteger::ToDOMAnimatedInteger(
     SVGElement *aSVGElement) {
   RefPtr<DOMAnimatedInteger> domAnimatedInteger =
       sSVGAnimatedIntegerTearoffTable.GetTearoff(this);
   if (!domAnimatedInteger) {
     domAnimatedInteger = new DOMAnimatedInteger(this, aSVGElement);
     sSVGAnimatedIntegerTearoffTable.AddTearoff(this, domAnimatedInteger);
   }
 
   return domAnimatedInteger.forget();
 }
 
-nsSVGInteger::DOMAnimatedInteger::~DOMAnimatedInteger() {
+SVGInteger::DOMAnimatedInteger::~DOMAnimatedInteger() {
   sSVGAnimatedIntegerTearoffTable.RemoveTearoff(mVal);
 }
 
-UniquePtr<nsISMILAttr> nsSVGInteger::ToSMILAttr(SVGElement *aSVGElement) {
+UniquePtr<nsISMILAttr> SVGInteger::ToSMILAttr(SVGElement *aSVGElement) {
   return MakeUnique<SMILInteger>(this, aSVGElement);
 }
 
-nsresult nsSVGInteger::SMILInteger::ValueFromString(
+nsresult SVGInteger::SMILInteger::ValueFromString(
     const nsAString &aStr, const dom::SVGAnimationElement * /*aSrcElement*/,
     nsSMILValue &aValue, bool &aPreventCachingOfSandwich) const {
   int32_t val;
 
   if (!SVGContentUtils::ParseInteger(aStr, val)) {
     return NS_ERROR_DOM_SYNTAX_ERR;
   }
 
   nsSMILValue smilVal(SMILIntegerType::Singleton());
   smilVal.mU.mInt = val;
   aValue = smilVal;
   aPreventCachingOfSandwich = false;
   return NS_OK;
 }
 
-nsSMILValue nsSVGInteger::SMILInteger::GetBaseValue() const {
+nsSMILValue SVGInteger::SMILInteger::GetBaseValue() const {
   nsSMILValue val(SMILIntegerType::Singleton());
   val.mU.mInt = mVal->mBaseVal;
   return val;
 }
 
-void nsSVGInteger::SMILInteger::ClearAnimValue() {
+void SVGInteger::SMILInteger::ClearAnimValue() {
   if (mVal->mIsAnimated) {
     mVal->mIsAnimated = false;
     mVal->mAnimVal = mVal->mBaseVal;
     mSVGElement->DidAnimateInteger(mVal->mAttrEnum);
   }
 }
 
-nsresult nsSVGInteger::SMILInteger::SetAnimValue(const nsSMILValue &aValue) {
+nsresult SVGInteger::SMILInteger::SetAnimValue(const nsSMILValue &aValue) {
   NS_ASSERTION(aValue.mType == SMILIntegerType::Singleton(),
                "Unexpected type to assign animated value");
   if (aValue.mType == SMILIntegerType::Singleton()) {
     mVal->SetAnimValue(int(aValue.mU.mInt), mSVGElement);
   }
   return NS_OK;
 }
+
+}  // namespace mozilla
rename from dom/svg/nsSVGInteger.h
rename to dom/svg/SVGInteger.h
--- a/dom/svg/nsSVGInteger.h
+++ b/dom/svg/SVGInteger.h
@@ -16,19 +16,18 @@
 #include "mozilla/UniquePtr.h"
 
 class nsSMILValue;
 
 namespace mozilla {
 namespace dom {
 class SVGAnimationElement;
 }  // namespace dom
-}  // namespace mozilla
 
-class nsSVGInteger {
+class SVGInteger {
  public:
   typedef mozilla::dom::SVGElement SVGElement;
 
   void Init(uint8_t aAttrEnum = 0xff, int32_t aValue = 0) {
     mAnimVal = mBaseVal = aValue;
     mAttrEnum = aAttrEnum;
     mIsAnimated = false;
     mIsBaseSet = false;
@@ -58,50 +57,52 @@ class nsSVGInteger {
   int32_t mAnimVal;
   int32_t mBaseVal;
   uint8_t mAttrEnum;  // element specified tracking for attribute
   bool mIsAnimated;
   bool mIsBaseSet;
 
  public:
   struct DOMAnimatedInteger final : public mozilla::dom::SVGAnimatedInteger {
-    DOMAnimatedInteger(nsSVGInteger* aVal, SVGElement* aSVGElement)
+    DOMAnimatedInteger(SVGInteger* aVal, SVGElement* aSVGElement)
         : mozilla::dom::SVGAnimatedInteger(aSVGElement), mVal(aVal) {}
     virtual ~DOMAnimatedInteger();
 
-    nsSVGInteger* mVal;  // kept alive because it belongs to content
+    SVGInteger* mVal;  // kept alive because it belongs to content
 
     virtual int32_t BaseVal() override { return mVal->GetBaseValue(); }
     virtual void SetBaseVal(int32_t aValue) override {
       mVal->SetBaseValue(aValue, mSVGElement);
     }
 
     // Script may have modified animation parameters or timeline -- DOM getters
     // need to flush any resample requests to reflect these modifications.
     virtual int32_t AnimVal() override {
       mSVGElement->FlushAnimations();
       return mVal->GetAnimValue();
     }
   };
 
   struct SMILInteger : public nsISMILAttr {
    public:
-    SMILInteger(nsSVGInteger* aVal, SVGElement* aSVGElement)
+    SMILInteger(SVGInteger* 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.
-    nsSVGInteger* mVal;
+    SVGInteger* 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_SVGINTEGER_H__
--- a/dom/svg/moz.build
+++ b/dom/svg/moz.build
@@ -118,18 +118,16 @@ UNIFIED_SOURCES += [
     'DOMSVGPathSeg.cpp',
     'DOMSVGPathSegList.cpp',
     'DOMSVGPoint.cpp',
     'DOMSVGPointList.cpp',
     'DOMSVGStringList.cpp',
     'DOMSVGTransform.cpp',
     'DOMSVGTransformList.cpp',
     'nsISVGPoint.cpp',
-    'nsSVGBoolean.cpp',
-    'nsSVGInteger.cpp',
     'nsSVGLength2.cpp',
     'nsSVGNumber2.cpp',
     'SVGAElement.cpp',
     'SVGAngle.cpp',
     'SVGAnimatedAngle.cpp',
     'SVGAnimatedBoolean.cpp',
     'SVGAnimatedEnumeration.cpp',
     'SVGAnimatedInteger.cpp',
@@ -143,16 +141,17 @@ UNIFIED_SOURCES += [
     'SVGAnimatedRect.cpp',
     'SVGAnimatedString.cpp',
     'SVGAnimatedTransformList.cpp',
     'SVGAnimateElement.cpp',
     'SVGAnimateMotionElement.cpp',
     'SVGAnimateTransformElement.cpp',
     'SVGAnimationElement.cpp',
     'SVGAttrValueWrapper.cpp',
+    'SVGBoolean.cpp',
     'SVGCircleElement.cpp',
     'SVGClass.cpp',
     'SVGClipPathElement.cpp',
     'SVGContentUtils.cpp',
     'SVGDataParser.cpp',
     'SVGDefsElement.cpp',
     'SVGDescElement.cpp',
     'SVGDocument.cpp',
@@ -185,16 +184,17 @@ UNIFIED_SOURCES += [
     'SVGFilters.cpp',
     'SVGForeignObjectElement.cpp',
     'SVGFragmentIdentifier.cpp',
     'SVGGElement.cpp',
     'SVGGeometryElement.cpp',
     'SVGGradientElement.cpp',
     'SVGGraphicsElement.cpp',
     'SVGImageElement.cpp',
+    'SVGInteger.cpp',
     'SVGIntegerPair.cpp',
     'SVGIntegerPairSMILType.cpp',
     'SVGLength.cpp',
     'SVGLengthList.cpp',
     'SVGLengthListSMILType.cpp',
     'SVGLineElement.cpp',
     'SVGMarkerElement.cpp',
     'SVGMaskElement.cpp',