Bug 886289 - Move SVGAnimatedNumber to WebIDL; r=dzbarsky
authorMs2ger <ms2ger@gmail.com>
Mon, 01 Jul 2013 09:03:04 +0200
changeset 149266 a115585785748f7a748f8e21e2847d78a24677c0
parent 149265 e8151bf1db51412f681287415569dbed0f8fe312
child 149267 5663ee7151259d0b3a7ef48fb706abe09cb3cb44
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdzbarsky
bugs886289
milestone25.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 886289 - Move SVGAnimatedNumber to WebIDL; r=dzbarsky
content/svg/content/src/SVGAnimatedNumber.cpp
content/svg/content/src/SVGAnimatedNumber.h
content/svg/content/src/SVGComponentTransferFunctionElement.h
content/svg/content/src/SVGFECompositeElement.cpp
content/svg/content/src/SVGFECompositeElement.h
content/svg/content/src/SVGFEConvolveMatrixElement.cpp
content/svg/content/src/SVGFEConvolveMatrixElement.h
content/svg/content/src/SVGFEDiffuseLightingElement.cpp
content/svg/content/src/SVGFEDiffuseLightingElement.h
content/svg/content/src/SVGFEDisplacementMapElement.cpp
content/svg/content/src/SVGFEDisplacementMapElement.h
content/svg/content/src/SVGFEDistantLightElement.cpp
content/svg/content/src/SVGFEDistantLightElement.h
content/svg/content/src/SVGFEGaussianBlurElement.cpp
content/svg/content/src/SVGFEGaussianBlurElement.h
content/svg/content/src/SVGFEMorphologyElement.cpp
content/svg/content/src/SVGFEMorphologyElement.h
content/svg/content/src/SVGFEOffsetElement.cpp
content/svg/content/src/SVGFEOffsetElement.h
content/svg/content/src/SVGFEPointLightElement.cpp
content/svg/content/src/SVGFEPointLightElement.h
content/svg/content/src/SVGFESpecularLightingElement.cpp
content/svg/content/src/SVGFESpecularLightingElement.h
content/svg/content/src/SVGFESpotLightElement.cpp
content/svg/content/src/SVGFESpotLightElement.h
content/svg/content/src/SVGFETurbulenceElement.cpp
content/svg/content/src/SVGFETurbulenceElement.h
content/svg/content/src/SVGPathElement.cpp
content/svg/content/src/SVGPathElement.h
content/svg/content/src/SVGStopElement.cpp
content/svg/content/src/SVGStopElement.h
content/svg/content/src/moz.build
content/svg/content/src/nsSVGFilters.cpp
content/svg/content/src/nsSVGNumber2.cpp
content/svg/content/src/nsSVGNumber2.h
content/svg/content/src/nsSVGNumberPair.cpp
content/svg/content/src/nsSVGNumberPair.h
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/webidl/SVGAnimatedNumber.webidl
dom/webidl/SVGFECompositeElement.webidl
dom/webidl/SVGFEConvolveMatrixElement.webidl
dom/webidl/SVGFEDiffuseLightingElement.webidl
dom/webidl/SVGFEDisplacementMapElement.webidl
dom/webidl/SVGFEDistantLightElement.webidl
dom/webidl/SVGFEGaussianBlurElement.webidl
dom/webidl/SVGFEMorphologyElement.webidl
dom/webidl/SVGFEOffsetElement.webidl
dom/webidl/SVGFEPointLightElement.webidl
dom/webidl/SVGFESpecularLightingElement.webidl
dom/webidl/SVGFESpotLightElement.webidl
dom/webidl/SVGFETurbulenceElement.webidl
dom/webidl/SVGStopElement.webidl
dom/webidl/WebIDL.mk
new file mode 100644
--- /dev/null
+++ b/content/svg/content/src/SVGAnimatedNumber.cpp
@@ -0,0 +1,32 @@
+/* -*- 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/SVGAnimatedNumber.h"
+
+#include "mozilla/dom/SVGAnimatedNumberBinding.h"
+
+namespace mozilla {
+namespace dom {
+
+NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedNumber,
+                                               mSVGElement)
+
+NS_IMPL_CYCLE_COLLECTING_ADDREF(SVGAnimatedNumber)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGAnimatedNumber)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGAnimatedNumber)
+  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
+  NS_INTERFACE_MAP_ENTRY(nsISupports)
+NS_INTERFACE_MAP_END
+
+JSObject*
+SVGAnimatedNumber::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
+{
+  return SVGAnimatedNumberBinding::Wrap(aCx, aScope, this);
+}
+
+} // namespace dom
+} // namespace mozilla
new file mode 100644
--- /dev/null
+++ b/content/svg/content/src/SVGAnimatedNumber.h
@@ -0,0 +1,51 @@
+/* -*- 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/. */
+
+#ifndef mozilla_dom_SVGAnimatedNumber_h
+#define mozilla_dom_SVGAnimatedNumber_h
+
+#include "nsISupports.h"
+#include "nsWrapperCache.h"
+
+#include "nsSVGElement.h"
+
+namespace mozilla {
+namespace dom {
+
+class SVGAnimatedNumber : public nsISupports
+                        , public nsWrapperCache
+{
+public:
+  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedNumber)
+
+  nsSVGElement* GetParentObject() const
+  {
+    return mSVGElement;
+  }
+
+  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
+    MOZ_OVERRIDE MOZ_FINAL;
+
+  virtual float BaseVal() = 0;
+  virtual void SetBaseVal(float aBaseVal) = 0;
+  virtual float AnimVal() = 0;
+
+protected:
+  explicit SVGAnimatedNumber(nsSVGElement* aSVGElement)
+    : mSVGElement(aSVGElement)
+  {
+    SetIsDOMBinding();
+  }
+  virtual ~SVGAnimatedNumber() {};
+
+  nsRefPtr<nsSVGElement> mSVGElement;
+};
+
+} // namespace dom
+} // namespace mozilla
+
+#endif // mozilla_dom_SVGAnimatedNumber_h
--- a/content/svg/content/src/SVGComponentTransferFunctionElement.h
+++ b/content/svg/content/src/SVGComponentTransferFunctionElement.h
@@ -44,21 +44,21 @@ public:
   virtual int32_t GetChannel() = 0;
   bool GenerateLookupTable(uint8_t* aTable);
 
   // WebIDL
   virtual JSObject* WrapNode(JSContext* aCx,
                              JS::Handle<JSObject*> aScope) MOZ_OVERRIDE = 0;
   already_AddRefed<SVGAnimatedEnumeration> Type();
   already_AddRefed<DOMSVGAnimatedNumberList> TableValues();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Slope();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Intercept();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Amplitude();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Exponent();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Offset();
+  already_AddRefed<SVGAnimatedNumber> Slope();
+  already_AddRefed<SVGAnimatedNumber> Intercept();
+  already_AddRefed<SVGAnimatedNumber> Amplitude();
+  already_AddRefed<SVGAnimatedNumber> Exponent();
+  already_AddRefed<SVGAnimatedNumber> Offset();
 
 protected:
   virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;
   virtual EnumAttributesInfo GetEnumInfo() MOZ_OVERRIDE;
   virtual NumberListAttributesInfo GetNumberListInfo() MOZ_OVERRIDE;
 
   enum { TABLEVALUES };
   SVGAnimatedNumberList mNumberListAttributes[1];
--- a/content/svg/content/src/SVGFECompositeElement.cpp
+++ b/content/svg/content/src/SVGFECompositeElement.cpp
@@ -68,35 +68,35 @@ SVGFECompositeElement::In2()
 }
 
 already_AddRefed<SVGAnimatedEnumeration>
 SVGFECompositeElement::Operator()
 {
   return mEnumAttributes[OPERATOR].ToDOMAnimatedEnum(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFECompositeElement::K1()
 {
   return mNumberAttributes[ATTR_K1].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFECompositeElement::K2()
 {
   return mNumberAttributes[ATTR_K2].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFECompositeElement::K3()
 {
   return mNumberAttributes[ATTR_K3].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFECompositeElement::K4()
 {
   return mNumberAttributes[ATTR_K4].ToDOMAnimatedNumber(this);
 }
 
 void
 SVGFECompositeElement::SetK(float k1, float k2, float k3, float k4)
 {
--- a/content/svg/content/src/SVGFECompositeElement.h
+++ b/content/svg/content/src/SVGFECompositeElement.h
@@ -53,20 +53,20 @@ public:
 
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
   already_AddRefed<SVGAnimatedString> In2();
   already_AddRefed<SVGAnimatedEnumeration> Operator();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> K1();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> K2();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> K3();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> K4();
+  already_AddRefed<SVGAnimatedNumber> K1();
+  already_AddRefed<SVGAnimatedNumber> K2();
+  already_AddRefed<SVGAnimatedNumber> K3();
+  already_AddRefed<SVGAnimatedNumber> K4();
   void SetK(float k1, float k2, float k3, float k4);
 
 protected:
   virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;
   virtual EnumAttributesInfo GetEnumInfo() MOZ_OVERRIDE;
   virtual StringAttributesInfo GetStringInfo() MOZ_OVERRIDE;
 
   enum { ATTR_K1, ATTR_K2, ATTR_K3, ATTR_K4 };
--- a/content/svg/content/src/SVGFEConvolveMatrixElement.cpp
+++ b/content/svg/content/src/SVGFEConvolveMatrixElement.cpp
@@ -129,36 +129,36 @@ SVGFEConvolveMatrixElement::EdgeMode()
 }
 
 already_AddRefed<SVGAnimatedBoolean>
 SVGFEConvolveMatrixElement::PreserveAlpha()
 {
   return mBooleanAttributes[PRESERVEALPHA].ToDOMAnimatedBoolean(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEConvolveMatrixElement::Divisor()
 {
   return mNumberAttributes[DIVISOR].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEConvolveMatrixElement::Bias()
 {
   return mNumberAttributes[BIAS].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEConvolveMatrixElement::KernelUnitLengthX()
 {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(nsSVGNumberPair::eFirst,
                                                                        this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEConvolveMatrixElement::KernelUnitLengthY()
 {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond,
                                                                        this);
 }
 
 void
 SVGFEConvolveMatrixElement::GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources)
--- a/content/svg/content/src/SVGFEConvolveMatrixElement.h
+++ b/content/svg/content/src/SVGFEConvolveMatrixElement.h
@@ -61,20 +61,20 @@ public:
   already_AddRefed<SVGAnimatedString> In1();
   already_AddRefed<SVGAnimatedInteger> OrderX();
   already_AddRefed<SVGAnimatedInteger> OrderY();
   already_AddRefed<DOMSVGAnimatedNumberList> KernelMatrix();
   already_AddRefed<SVGAnimatedInteger> TargetX();
   already_AddRefed<SVGAnimatedInteger> TargetY();
   already_AddRefed<SVGAnimatedEnumeration> EdgeMode();
   already_AddRefed<SVGAnimatedBoolean> PreserveAlpha();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Divisor();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Bias();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthX();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthY();
+  already_AddRefed<SVGAnimatedNumber> Divisor();
+  already_AddRefed<SVGAnimatedNumber> Bias();
+  already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX();
+  already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY();
 
 protected:
   virtual bool OperatesOnPremultipledAlpha(int32_t) MOZ_OVERRIDE {
     return !mBooleanAttributes[PRESERVEALPHA].GetAnimValue();
   }
 
   virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;
   virtual NumberPairAttributesInfo GetNumberPairInfo() MOZ_OVERRIDE;
--- a/content/svg/content/src/SVGFEDiffuseLightingElement.cpp
+++ b/content/svg/content/src/SVGFEDiffuseLightingElement.cpp
@@ -26,36 +26,36 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDif
 //----------------------------------------------------------------------
 
 already_AddRefed<SVGAnimatedString>
 SVGFEDiffuseLightingElement::In1()
 {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEDiffuseLightingElement::SurfaceScale()
 {
   return mNumberAttributes[SURFACE_SCALE].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEDiffuseLightingElement::DiffuseConstant()
 {
   return mNumberAttributes[DIFFUSE_CONSTANT].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEDiffuseLightingElement::KernelUnitLengthX()
 {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
     nsSVGNumberPair::eFirst, this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEDiffuseLightingElement::KernelUnitLengthY()
 {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
     nsSVGNumberPair::eSecond, this);
 }
 
 bool
 SVGFEDiffuseLightingElement::AttributeAffectsRendering(int32_t aNameSpaceID,
--- a/content/svg/content/src/SVGFEDiffuseLightingElement.h
+++ b/content/svg/content/src/SVGFEDiffuseLightingElement.h
@@ -31,20 +31,20 @@ protected:
 public:
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> SurfaceScale();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> DiffuseConstant();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthX();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthY();
+  already_AddRefed<SVGAnimatedNumber> SurfaceScale();
+  already_AddRefed<SVGAnimatedNumber> DiffuseConstant();
+  already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX();
+  already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY();
 
 protected:
   virtual void LightPixel(const float *N, const float *L,
                           nscolor color, uint8_t *targetData);
 
 };
 
 } // namespace dom
--- a/content/svg/content/src/SVGFEDisplacementMapElement.cpp
+++ b/content/svg/content/src/SVGFEDisplacementMapElement.cpp
@@ -72,17 +72,17 @@ SVGFEDisplacementMapElement::In1()
 }
 
 already_AddRefed<SVGAnimatedString>
 SVGFEDisplacementMapElement::In2()
 {
   return mStringAttributes[IN2].ToDOMAnimatedString(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEDisplacementMapElement::Scale()
 {
   return mNumberAttributes[SCALE].ToDOMAnimatedNumber(this);
 }
 
 already_AddRefed<SVGAnimatedEnumeration>
 SVGFEDisplacementMapElement::XChannelSelector()
 {
--- a/content/svg/content/src/SVGFEDisplacementMapElement.h
+++ b/content/svg/content/src/SVGFEDisplacementMapElement.h
@@ -46,17 +46,17 @@ public:
           const nsSVGFilterInstance& aInstance) MOZ_OVERRIDE;
 
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
   already_AddRefed<SVGAnimatedString> In2();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Scale();
+  already_AddRefed<SVGAnimatedNumber> Scale();
   already_AddRefed<SVGAnimatedEnumeration> XChannelSelector();
   already_AddRefed<SVGAnimatedEnumeration> YChannelSelector();
 
 protected:
   virtual bool OperatesOnSRGB(nsSVGFilterInstance* aInstance,
                               int32_t aInput, Image* aImage) MOZ_OVERRIDE {
     switch (aInput) {
     case 0:
--- a/content/svg/content/src/SVGFEDistantLightElement.cpp
+++ b/content/svg/content/src/SVGFEDistantLightElement.cpp
@@ -35,23 +35,23 @@ bool
 SVGFEDistantLightElement::AttributeAffectsRendering(int32_t aNameSpaceID,
                                                     nsIAtom* aAttribute) const
 {
   return aNameSpaceID == kNameSpaceID_None &&
          (aAttribute == nsGkAtoms::azimuth ||
           aAttribute == nsGkAtoms::elevation);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEDistantLightElement::Azimuth()
 {
   return mNumberAttributes[AZIMUTH].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEDistantLightElement::Elevation()
 {
   return mNumberAttributes[ELEVATION].ToDOMAnimatedNumber(this);
 }
 
 //----------------------------------------------------------------------
 // nsSVGElement methods
 
--- a/content/svg/content/src/SVGFEDistantLightElement.h
+++ b/content/svg/content/src/SVGFEDistantLightElement.h
@@ -31,18 +31,18 @@ protected:
 
 public:
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const MOZ_OVERRIDE;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Azimuth();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Elevation();
+  already_AddRefed<SVGAnimatedNumber> Azimuth();
+  already_AddRefed<SVGAnimatedNumber> Elevation();
 
 protected:
   virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;
 
   enum { AZIMUTH, ELEVATION };
   nsSVGNumber2 mNumberAttributes[2];
   static NumberInfo sNumberInfo[2];
 };
--- a/content/svg/content/src/SVGFEGaussianBlurElement.cpp
+++ b/content/svg/content/src/SVGFEGaussianBlurElement.cpp
@@ -38,23 +38,23 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEGau
 //----------------------------------------------------------------------
 
 already_AddRefed<SVGAnimatedString>
 SVGFEGaussianBlurElement::In1()
 {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEGaussianBlurElement::StdDeviationX()
 {
   return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(nsSVGNumberPair::eFirst, this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEGaussianBlurElement::StdDeviationY()
 {
   return mNumberPairAttributes[STD_DEV].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond, this);
 }
 
 void
 SVGFEGaussianBlurElement::SetStdDeviation(float stdDeviationX, float stdDeviationY)
 {
--- a/content/svg/content/src/SVGFEGaussianBlurElement.h
+++ b/content/svg/content/src/SVGFEGaussianBlurElement.h
@@ -46,18 +46,18 @@ public:
   virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
           const nsSVGFilterInstance& aInstance) MOZ_OVERRIDE;
 
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> StdDeviationX();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> StdDeviationY();
+  already_AddRefed<SVGAnimatedNumber> StdDeviationX();
+  already_AddRefed<SVGAnimatedNumber> StdDeviationY();
   void SetStdDeviation(float stdDeviationX, float stdDeviationY);
 
 protected:
   virtual NumberPairAttributesInfo GetNumberPairInfo() MOZ_OVERRIDE;
   virtual StringAttributesInfo GetStringInfo() MOZ_OVERRIDE;
 
   enum { STD_DEV };
   nsSVGNumberPair mNumberPairAttributes[1];
--- a/content/svg/content/src/SVGFEMorphologyElement.cpp
+++ b/content/svg/content/src/SVGFEMorphologyElement.cpp
@@ -65,23 +65,23 @@ SVGFEMorphologyElement::In1()
 }
 
 already_AddRefed<SVGAnimatedEnumeration>
 SVGFEMorphologyElement::Operator()
 {
   return mEnumAttributes[OPERATOR].ToDOMAnimatedEnum(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEMorphologyElement::RadiusX()
 {
   return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(nsSVGNumberPair::eFirst, this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEMorphologyElement::RadiusY()
 {
   return mNumberPairAttributes[RADIUS].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond, this);
 }
 
 void
 SVGFEMorphologyElement::SetRadius(float rx, float ry)
 {
--- a/content/svg/content/src/SVGFEMorphologyElement.h
+++ b/content/svg/content/src/SVGFEMorphologyElement.h
@@ -47,18 +47,18 @@ public:
   virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
           const nsSVGFilterInstance& aInstance) MOZ_OVERRIDE;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
   already_AddRefed<SVGAnimatedEnumeration> Operator();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> RadiusX();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> RadiusY();
+  already_AddRefed<SVGAnimatedNumber> RadiusX();
+  already_AddRefed<SVGAnimatedNumber> RadiusY();
   void SetRadius(float rx, float ry);
 
 protected:
   void GetRXY(int32_t *aRX, int32_t *aRY, const nsSVGFilterInstance& aInstance);
   nsIntRect InflateRect(const nsIntRect& aRect, const nsSVGFilterInstance& aInstance);
 
   virtual NumberPairAttributesInfo GetNumberPairInfo() MOZ_OVERRIDE;
   virtual EnumAttributesInfo GetEnumInfo() MOZ_OVERRIDE;
--- a/content/svg/content/src/SVGFEOffsetElement.cpp
+++ b/content/svg/content/src/SVGFEOffsetElement.cpp
@@ -40,23 +40,23 @@ NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEOff
 //----------------------------------------------------------------------
 
 already_AddRefed<SVGAnimatedString>
 SVGFEOffsetElement::In1()
 {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEOffsetElement::Dx()
 {
   return mNumberAttributes[DX].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEOffsetElement::Dy()
 {
   return mNumberAttributes[DY].ToDOMAnimatedNumber(this);
 }
 
 nsIntPoint
 SVGFEOffsetElement::GetOffset(const nsSVGFilterInstance& aInstance)
 {
--- a/content/svg/content/src/SVGFEOffsetElement.h
+++ b/content/svg/content/src/SVGFEOffsetElement.h
@@ -45,18 +45,18 @@ public:
           nsTArray<nsIntRect>& aSourceBBoxes, const nsSVGFilterInstance& aInstance) MOZ_OVERRIDE;
   virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
           const nsSVGFilterInstance& aInstance) MOZ_OVERRIDE;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Dx();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Dy();
+  already_AddRefed<SVGAnimatedNumber> Dx();
+  already_AddRefed<SVGAnimatedNumber> Dy();
 
 protected:
   nsIntPoint GetOffset(const nsSVGFilterInstance& aInstance);
 
   virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;
   virtual StringAttributesInfo GetStringInfo() MOZ_OVERRIDE;
 
   enum { DX, DY };
--- a/content/svg/content/src/SVGFEPointLightElement.cpp
+++ b/content/svg/content/src/SVGFEPointLightElement.cpp
@@ -39,29 +39,29 @@ SVGFEPointLightElement::AttributeAffects
   return aNameSpaceID == kNameSpaceID_None &&
          (aAttribute == nsGkAtoms::x ||
           aAttribute == nsGkAtoms::y ||
           aAttribute == nsGkAtoms::z);
 }
 
 //----------------------------------------------------------------------
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEPointLightElement::X()
 {
   return mNumberAttributes[ATTR_X].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEPointLightElement::Y()
 {
   return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFEPointLightElement::Z()
 {
   return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this);
 }
 
 //----------------------------------------------------------------------
 // nsSVGElement methods
 
--- a/content/svg/content/src/SVGFEPointLightElement.h
+++ b/content/svg/content/src/SVGFEPointLightElement.h
@@ -31,19 +31,19 @@ protected:
 
 public:
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const MOZ_OVERRIDE;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
-  already_AddRefed<nsIDOMSVGAnimatedNumber> X();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Y();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Z();
+  already_AddRefed<SVGAnimatedNumber> X();
+  already_AddRefed<SVGAnimatedNumber> Y();
+  already_AddRefed<SVGAnimatedNumber> Z();
 
 protected:
   virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;
 
   enum { ATTR_X, ATTR_Y, ATTR_Z };
   nsSVGNumber2 mNumberAttributes[3];
   static NumberInfo sNumberInfo[3];
 };
--- a/content/svg/content/src/SVGFESpecularLightingElement.cpp
+++ b/content/svg/content/src/SVGFESpecularLightingElement.cpp
@@ -24,42 +24,42 @@ SVGFESpecularLightingElement::WrapNode(J
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFESpecularLightingElement)
 
 already_AddRefed<SVGAnimatedString>
 SVGFESpecularLightingElement::In1()
 {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpecularLightingElement::SurfaceScale()
 {
   return mNumberAttributes[SURFACE_SCALE].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpecularLightingElement::SpecularConstant()
 {
   return mNumberAttributes[SPECULAR_CONSTANT].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpecularLightingElement::SpecularExponent()
 {
   return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpecularLightingElement::KernelUnitLengthX()
 {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
     nsSVGNumberPair::eFirst, this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpecularLightingElement::KernelUnitLengthY()
 {
   return mNumberPairAttributes[KERNEL_UNIT_LENGTH].ToDOMAnimatedNumber(
     nsSVGNumberPair::eSecond, this);
 }
 
 //----------------------------------------------------------------------
 // nsSVGElement methods
--- a/content/svg/content/src/SVGFESpecularLightingElement.h
+++ b/content/svg/content/src/SVGFESpecularLightingElement.h
@@ -37,21 +37,21 @@ public:
                           const nsTArray<const Image*>& aSources,
                           const Image* aTarget,
                           const nsIntRect& aDataRect);
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
 
   // WebIDL
   already_AddRefed<SVGAnimatedString> In1();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> SurfaceScale();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> SpecularConstant();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> SpecularExponent();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthX();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthY();
+  already_AddRefed<SVGAnimatedNumber> SurfaceScale();
+  already_AddRefed<SVGAnimatedNumber> SpecularConstant();
+  already_AddRefed<SVGAnimatedNumber> SpecularExponent();
+  already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX();
+  already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY();
 
 protected:
   virtual void LightPixel(const float *N, const float *L,
                           nscolor color, uint8_t *targetData);
 
 };
 
 } // namespace dom
--- a/content/svg/content/src/SVGFESpotLightElement.cpp
+++ b/content/svg/content/src/SVGFESpotLightElement.cpp
@@ -49,59 +49,59 @@ SVGFESpotLightElement::AttributeAffectsR
           aAttribute == nsGkAtoms::pointsAtY ||
           aAttribute == nsGkAtoms::pointsAtZ ||
           aAttribute == nsGkAtoms::specularExponent ||
           aAttribute == nsGkAtoms::limitingConeAngle);
 }
 
 //----------------------------------------------------------------------
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpotLightElement::X()
 {
   return mNumberAttributes[ATTR_X].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpotLightElement::Y()
 {
   return mNumberAttributes[ATTR_Y].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpotLightElement::Z()
 {
   return mNumberAttributes[ATTR_Z].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpotLightElement::PointsAtX()
 {
   return mNumberAttributes[POINTS_AT_X].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpotLightElement::PointsAtY()
 {
   return mNumberAttributes[POINTS_AT_Y].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpotLightElement::PointsAtZ()
 {
   return mNumberAttributes[POINTS_AT_Z].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpotLightElement::SpecularExponent()
 {
   return mNumberAttributes[SPECULAR_EXPONENT].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFESpotLightElement::LimitingConeAngle()
 {
   return mNumberAttributes[LIMITING_CONE_ANGLE].ToDOMAnimatedNumber(this);
 }
 
 //----------------------------------------------------------------------
 // nsSVGElement methods
 
--- a/content/svg/content/src/SVGFESpotLightElement.h
+++ b/content/svg/content/src/SVGFESpotLightElement.h
@@ -34,24 +34,24 @@ protected:
 
 public:
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const MOZ_OVERRIDE;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
-  already_AddRefed<nsIDOMSVGAnimatedNumber> X();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Y();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Z();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> PointsAtX();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> PointsAtY();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> PointsAtZ();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> SpecularExponent();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> LimitingConeAngle();
+  already_AddRefed<SVGAnimatedNumber> X();
+  already_AddRefed<SVGAnimatedNumber> Y();
+  already_AddRefed<SVGAnimatedNumber> Z();
+  already_AddRefed<SVGAnimatedNumber> PointsAtX();
+  already_AddRefed<SVGAnimatedNumber> PointsAtY();
+  already_AddRefed<SVGAnimatedNumber> PointsAtZ();
+  already_AddRefed<SVGAnimatedNumber> SpecularExponent();
+  already_AddRefed<SVGAnimatedNumber> LimitingConeAngle();
 
 protected:
   virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;
 
   enum { ATTR_X, ATTR_Y, ATTR_Z, POINTS_AT_X, POINTS_AT_Y, POINTS_AT_Z,
          SPECULAR_EXPONENT, LIMITING_CONE_ANGLE };
   nsSVGNumber2 mNumberAttributes[8];
   static NumberInfo sNumberInfo[8];
--- a/content/svg/content/src/SVGFETurbulenceElement.cpp
+++ b/content/svg/content/src/SVGFETurbulenceElement.cpp
@@ -81,35 +81,35 @@ nsSVGElement::StringInfo SVGFETurbulence
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFETurbulenceElement)
 
 //----------------------------------------------------------------------
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFETurbulenceElement::BaseFrequencyX()
 {
   return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(nsSVGNumberPair::eFirst, this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFETurbulenceElement::BaseFrequencyY()
 {
   return mNumberPairAttributes[BASE_FREQ].ToDOMAnimatedNumber(nsSVGNumberPair::eSecond, this);
 }
 
 already_AddRefed<SVGAnimatedInteger>
 SVGFETurbulenceElement::NumOctaves()
 {
   return mIntegerAttributes[OCTAVES].ToDOMAnimatedInteger(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGFETurbulenceElement::Seed()
 {
   return mNumberAttributes[SEED].ToDOMAnimatedNumber(this);
 }
 
 already_AddRefed<SVGAnimatedEnumeration>
 SVGFETurbulenceElement::StitchTiles()
 {
--- a/content/svg/content/src/SVGFETurbulenceElement.h
+++ b/content/svg/content/src/SVGFETurbulenceElement.h
@@ -43,20 +43,20 @@ public:
           int32_t aNameSpaceID, nsIAtom* aAttribute) const MOZ_OVERRIDE;
   virtual nsSVGString& GetResultImageName() MOZ_OVERRIDE { return mStringAttributes[RESULT]; }
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance) MOZ_OVERRIDE;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
-  already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyX();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyY();
+  already_AddRefed<SVGAnimatedNumber> BaseFrequencyX();
+  already_AddRefed<SVGAnimatedNumber> BaseFrequencyY();
   already_AddRefed<SVGAnimatedInteger> NumOctaves();
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Seed();
+  already_AddRefed<SVGAnimatedNumber> Seed();
   already_AddRefed<SVGAnimatedEnumeration> StitchTiles();
   already_AddRefed<SVGAnimatedEnumeration> Type();
 
 protected:
   virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;
   virtual NumberPairAttributesInfo GetNumberPairInfo() MOZ_OVERRIDE;
   virtual IntegerAttributesInfo GetIntegerInfo() MOZ_OVERRIDE;
   virtual EnumAttributesInfo GetEnumInfo() MOZ_OVERRIDE;
--- a/content/svg/content/src/SVGPathElement.cpp
+++ b/content/svg/content/src/SVGPathElement.cpp
@@ -37,22 +37,20 @@ SVGPathElement::SVGPathElement(already_A
 {
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPathElement)
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGPathElement::PathLength()
 {
-  nsCOMPtr<nsIDOMSVGAnimatedNumber> number;
-  mPathLength.ToDOMAnimatedNumber(getter_AddRefs(number), this);
-  return number.forget();
+  return mPathLength.ToDOMAnimatedNumber(this);
 }
 
 float
 SVGPathElement::GetTotalLength(ErrorResult& rv)
 {
   nsRefPtr<gfxFlattenedPath> flat = GetFlattenedPath(gfxMatrix());
 
   if (!flat) {
--- a/content/svg/content/src/SVGPathElement.h
+++ b/content/svg/content/src/SVGPathElement.h
@@ -69,17 +69,17 @@ public:
   /**
    * Gets the ratio of the actual path length to the content author's estimated
    * length (as provided by the <path> element's 'pathLength' attribute). This
    * is used to scale stroke dashing, and to scale offsets along a textPath.
    */
   gfxFloat GetPathLengthScale(PathLengthScaleForType aFor);
 
   // WebIDL
-  already_AddRefed<nsIDOMSVGAnimatedNumber> PathLength();
+  already_AddRefed<SVGAnimatedNumber> PathLength();
   float GetTotalLength(ErrorResult& rv);
   already_AddRefed<nsISVGPoint> GetPointAtLength(float distance, ErrorResult& rv);
   uint32_t GetPathSegAtLength(float distance);
   already_AddRefed<DOMSVGPathSegClosePath> CreateSVGPathSegClosePath();
   already_AddRefed<DOMSVGPathSegMovetoAbs> CreateSVGPathSegMovetoAbs(float x, float y);
   already_AddRefed<DOMSVGPathSegMovetoRel> CreateSVGPathSegMovetoRel(float x, float y);
   already_AddRefed<DOMSVGPathSegLinetoAbs> CreateSVGPathSegLinetoAbs(float x, float y);
   already_AddRefed<DOMSVGPathSegLinetoRel> CreateSVGPathSegLinetoRel(float x, float y);
--- a/content/svg/content/src/SVGStopElement.cpp
+++ b/content/svg/content/src/SVGStopElement.cpp
@@ -30,22 +30,20 @@ SVGStopElement::SVGStopElement(already_A
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGStopElement)
 
 //----------------------------------------------------------------------
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGStopElement::Offset()
 {
-  nsCOMPtr<nsIDOMSVGAnimatedNumber> offset;
-  mOffset.ToDOMAnimatedNumber(getter_AddRefs(offset), this);
-  return offset.forget();
+  return mOffset.ToDOMAnimatedNumber(this);
 }
 
 //----------------------------------------------------------------------
 // sSVGElement methods
 
 nsSVGElement::NumberAttributesInfo
 SVGStopElement::GetNumberInfo()
 {
--- a/content/svg/content/src/SVGStopElement.h
+++ b/content/svg/content/src/SVGStopElement.h
@@ -28,17 +28,17 @@ protected:
 
 public:
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   // WebIDL
-  already_AddRefed<nsIDOMSVGAnimatedNumber> Offset();
+  already_AddRefed<SVGAnimatedNumber> Offset();
 
 protected:
 
   virtual NumberAttributesInfo GetNumberInfo() MOZ_OVERRIDE;
   nsSVGNumber2 mOffset;
   static NumberInfo sNumberInfo;
 };
 
--- a/content/svg/content/src/moz.build
+++ b/content/svg/content/src/moz.build
@@ -21,16 +21,17 @@ EXPORTS.mozilla.dom += [
     'SVGAnimateElement.h',
     'SVGAnimateMotionElement.h',
     'SVGAnimateTransformElement.h',
     'SVGAnimatedAngle.h',
     'SVGAnimatedBoolean.h',
     'SVGAnimatedEnumeration.h',
     'SVGAnimatedInteger.h',
     'SVGAnimatedLength.h',
+    'SVGAnimatedNumber.h',
     'SVGAnimatedRect.h',
     'SVGAnimatedString.h',
     'SVGAnimatedTransformList.h',
     'SVGAnimationElement.h',
     'SVGCircleElement.h',
     'SVGClipPathElement.h',
     'SVGComponentTransferFunctionElement.h',
     'SVGDefsElement.h',
@@ -117,16 +118,17 @@ CPP_SOURCES += [
     'SVGAnimateMotionElement.cpp',
     'SVGAnimateTransformElement.cpp',
     'SVGAnimatedAngle.cpp',
     'SVGAnimatedBoolean.cpp',
     'SVGAnimatedEnumeration.cpp',
     'SVGAnimatedInteger.cpp',
     'SVGAnimatedLength.cpp',
     'SVGAnimatedLengthList.cpp',
+    'SVGAnimatedNumber.cpp',
     'SVGAnimatedNumberList.cpp',
     'SVGAnimatedPathSegList.cpp',
     'SVGAnimatedPointList.cpp',
     'SVGAnimatedPreserveAspectRatio.cpp',
     'SVGAnimatedRect.cpp',
     'SVGAnimatedString.cpp',
     'SVGAnimatedTransformList.cpp',
     'SVGAnimationElement.cpp',
--- a/content/svg/content/src/nsSVGFilters.cpp
+++ b/content/svg/content/src/nsSVGFilters.cpp
@@ -395,41 +395,41 @@ SVGComponentTransferFunctionElement::Typ
 
 already_AddRefed<DOMSVGAnimatedNumberList>
 SVGComponentTransferFunctionElement::TableValues()
 {
   return DOMSVGAnimatedNumberList::GetDOMWrapper(
     &mNumberListAttributes[TABLEVALUES], this, TABLEVALUES);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGComponentTransferFunctionElement::Slope()
 {
   return mNumberAttributes[SLOPE].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGComponentTransferFunctionElement::Intercept()
 {
   return mNumberAttributes[INTERCEPT].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGComponentTransferFunctionElement::Amplitude()
 {
   return mNumberAttributes[AMPLITUDE].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGComponentTransferFunctionElement::Exponent()
 {
   return mNumberAttributes[EXPONENT].ToDOMAnimatedNumber(this);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 SVGComponentTransferFunctionElement::Offset()
 {
   return mNumberAttributes[OFFSET].ToDOMAnimatedNumber(this);
 }
 
 bool
 SVGComponentTransferFunctionElement::GenerateLookupTable(uint8_t *aTable)
 {
--- a/content/svg/content/src/nsSVGNumber2.cpp
+++ b/content/svg/content/src/nsSVGNumber2.cpp
@@ -9,16 +9,19 @@
 #include "prdtoa.h"
 #include "nsMathUtils.h"
 #include "nsContentUtils.h" // NS_ENSURE_FINITE
 #include "nsSMILValue.h"
 #include "nsSMILFloatType.h"
 #include "nsIDOMSVGNumber.h"
 #include "mozilla/Attributes.h"
 
+using namespace mozilla;
+using namespace mozilla::dom;
+
 class DOMSVGNumber MOZ_FINAL : public nsIDOMSVGNumber
 {
 public:
   NS_DECL_ISUPPORTS
 
   DOMSVGNumber() 
     : mVal(0) {}
     
@@ -28,32 +31,19 @@ public:
     { NS_ENSURE_FINITE(aValue, NS_ERROR_ILLEGAL_VALUE);
       mVal = aValue;
       return NS_OK; }
 
 private:
   float mVal;
 };
 
-NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGNumber2::DOMAnimatedNumber, mSVGElement)
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGNumber2::DOMAnimatedNumber)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGNumber2::DOMAnimatedNumber)
-
 NS_IMPL_ADDREF(DOMSVGNumber)
 NS_IMPL_RELEASE(DOMSVGNumber)
 
-DOMCI_DATA(SVGAnimatedNumber, nsSVGNumber2::DOMAnimatedNumber)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGNumber2::DOMAnimatedNumber)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedNumber)
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedNumber)
-NS_INTERFACE_MAP_END
-
 NS_INTERFACE_MAP_BEGIN(DOMSVGNumber)
   NS_INTERFACE_MAP_ENTRY(nsIDOMSVGNumber)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGNumber)
 NS_INTERFACE_MAP_END
 
 /* Implementation */
 
@@ -145,37 +135,29 @@ nsSVGNumber2::SetAnimValue(float aValue,
   if (mIsAnimated && aValue == mAnimVal) {
     return;
   }
   mAnimVal = aValue;
   mIsAnimated = true;
   aSVGElement->DidAnimateNumber(mAttrEnum);
 }
 
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 nsSVGNumber2::ToDOMAnimatedNumber(nsSVGElement* aSVGElement)
 {
   nsRefPtr<DOMAnimatedNumber> domAnimatedNumber =
     sSVGAnimatedNumberTearoffTable.GetTearoff(this);
   if (!domAnimatedNumber) {
     domAnimatedNumber = new DOMAnimatedNumber(this, aSVGElement);
     sSVGAnimatedNumberTearoffTable.AddTearoff(this, domAnimatedNumber);
   }
 
   return domAnimatedNumber.forget();
 }
 
-nsresult
-nsSVGNumber2::ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult,
-                                  nsSVGElement *aSVGElement)
-{
-  *aResult = ToDOMAnimatedNumber(aSVGElement).get();
-  return NS_OK;
-}
-
 nsSVGNumber2::DOMAnimatedNumber::~DOMAnimatedNumber()
 {
   sSVGAnimatedNumberTearoffTable.RemoveTearoff(mVal);
 }
 
 nsISMILAttr*
 nsSVGNumber2::ToSMILAttr(nsSVGElement *aSVGElement)
 {
--- a/content/svg/content/src/nsSVGNumber2.h
+++ b/content/svg/content/src/nsSVGNumber2.h
@@ -4,21 +4,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __NS_SVGNUMBER2_H__
 #define __NS_SVGNUMBER2_H__
 
 #include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
-#include "nsIDOMSVGAnimatedNumber.h"
 #include "nsISMILAttr.h"
 #include "nsMathUtils.h"
 #include "nsSVGElement.h"
 #include "mozilla/Attributes.h"
+#include "mozilla/dom/SVGAnimatedNumber.h"
 
 class nsSMILValue;
 
 namespace mozilla {
 namespace dom {
 class SVGAnimationElement;
 }
 }
@@ -48,62 +48,56 @@ public:
   // Returns true if the animated value of this number has been explicitly
   // set (either by animation, or by taking on the base value which has been
   // explicitly set by markup or a DOM call), false otherwise.
   // If this returns false, the animated value is still valid, that is,
   // useable, and represents the default base value of the attribute.
   bool IsExplicitlySet() const
     { return mIsAnimated || mIsBaseSet; }
 
-  already_AddRefed<nsIDOMSVGAnimatedNumber>
+  already_AddRefed<mozilla::dom::SVGAnimatedNumber>
   ToDOMAnimatedNumber(nsSVGElement* aSVGElement);
-  nsresult ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult,
-                               nsSVGElement* aSVGElement);
   // Returns a new nsISMILAttr object that the caller must delete
   nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement);
 
 private:
 
   float mAnimVal;
   float mBaseVal;
   uint8_t mAttrEnum; // element specified tracking for attribute
   bool mIsAnimated;
   bool mIsBaseSet;
 
 public:
-  struct DOMAnimatedNumber MOZ_FINAL : public nsIDOMSVGAnimatedNumber
+  struct DOMAnimatedNumber MOZ_FINAL : public mozilla::dom::SVGAnimatedNumber
   {
-    NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-    NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedNumber)
-
-    DOMAnimatedNumber(nsSVGNumber2* aVal, nsSVGElement *aSVGElement)
-      : mVal(aVal), mSVGElement(aSVGElement) {}
+    DOMAnimatedNumber(nsSVGNumber2* aVal, nsSVGElement* aSVGElement)
+      : mozilla::dom::SVGAnimatedNumber(aSVGElement)
+      , mVal(aVal)
+    {}
     virtual ~DOMAnimatedNumber();
 
     nsSVGNumber2* mVal; // kept alive because it belongs to content
-    nsRefPtr<nsSVGElement> mSVGElement;
 
-    NS_IMETHOD GetBaseVal(float* aResult) MOZ_OVERRIDE
-      { *aResult = mVal->GetBaseValue(); return NS_OK; }
-    NS_IMETHOD SetBaseVal(float aValue) MOZ_OVERRIDE
-      {
-        if (!NS_finite(aValue)) {
-          return NS_ERROR_ILLEGAL_VALUE;
-        }
-        mVal->SetBaseValue(aValue, mSVGElement);
-        return NS_OK;
-      }
+    virtual float BaseVal() MOZ_OVERRIDE
+    {
+      return mVal->GetBaseValue();
+    }
+    virtual void SetBaseVal(float aValue) MOZ_OVERRIDE
+    {
+      MOZ_ASSERT(NS_finite(aValue));
+      mVal->SetBaseValue(aValue, mSVGElement);
+    }
 
     // Script may have modified animation parameters or timeline -- DOM getters
     // need to flush any resample requests to reflect these modifications.
-    NS_IMETHOD GetAnimVal(float* aResult) MOZ_OVERRIDE
+    virtual float AnimVal() MOZ_OVERRIDE
     {
       mSVGElement->FlushAnimations();
-      *aResult = mVal->GetAnimValue();
-      return NS_OK;
+      return mVal->GetAnimValue();
     }
   };
 
   struct SMILNumber : public nsISMILAttr
   {
   public:
     SMILNumber(nsSVGNumber2* aVal, nsSVGElement* aSVGElement)
     : mVal(aVal), mSVGElement(aSVGElement) {}
--- a/content/svg/content/src/nsSVGNumberPair.cpp
+++ b/content/svg/content/src/nsSVGNumberPair.cpp
@@ -9,31 +9,17 @@
 #include "prdtoa.h"
 #include "nsError.h"
 #include "nsMathUtils.h"
 #include "nsSMILValue.h"
 #include "SVGContentUtils.h"
 #include "SVGNumberPairSMILType.h"
 
 using namespace mozilla;
-
-NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGNumberPair::DOMAnimatedNumber, mSVGElement)
-
-NS_IMPL_CYCLE_COLLECTING_ADDREF(nsSVGNumberPair::DOMAnimatedNumber)
-NS_IMPL_CYCLE_COLLECTING_RELEASE(nsSVGNumberPair::DOMAnimatedNumber)
-
-DOMCI_DATA(SVGAnimatedNumberPair, nsSVGNumberPair::DOMAnimatedNumber)
-
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGNumberPair::DOMAnimatedNumber)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMSVGAnimatedNumber)
-  NS_INTERFACE_MAP_ENTRY(nsISupports)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGAnimatedNumber)
-NS_INTERFACE_MAP_END
-
-/* Implementation */
+using namespace mozilla::dom;
 
 static nsSVGAttrTearoffTable<nsSVGNumberPair, nsSVGNumberPair::DOMAnimatedNumber>
   sSVGFirstAnimatedNumberTearoffTable;
 static nsSVGAttrTearoffTable<nsSVGNumberPair, nsSVGNumberPair::DOMAnimatedNumber>
   sSVGSecondAnimatedNumberTearoffTable;
 
 static nsresult
 ParseNumberOptionalNumber(const nsAString& aValue,
@@ -161,26 +147,17 @@ nsSVGNumberPair::SetAnimValue(const floa
     return;
   }
   mAnimVal[0] = aValue[0];
   mAnimVal[1] = aValue[1];
   mIsAnimated = true;
   aSVGElement->DidAnimateNumberPair(mAttrEnum);
 }
 
-nsresult
-nsSVGNumberPair::ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber** aResult,
-                                     PairIndex aIndex,
-                                     nsSVGElement* aSVGElement)
-{
-  *aResult = ToDOMAnimatedNumber(aIndex, aSVGElement).get();
-  return NS_OK;
-}
-
-already_AddRefed<nsIDOMSVGAnimatedNumber>
+already_AddRefed<SVGAnimatedNumber>
 nsSVGNumberPair::ToDOMAnimatedNumber(PairIndex aIndex,
                                      nsSVGElement* aSVGElement)
 {
   nsRefPtr<DOMAnimatedNumber> domAnimatedNumber =
     aIndex == eFirst ? sSVGFirstAnimatedNumberTearoffTable.GetTearoff(this) :
                        sSVGSecondAnimatedNumberTearoffTable.GetTearoff(this);
   if (!domAnimatedNumber) {
     domAnimatedNumber = new DOMAnimatedNumber(this, aIndex, aSVGElement);
--- a/content/svg/content/src/nsSVGNumberPair.h
+++ b/content/svg/content/src/nsSVGNumberPair.h
@@ -4,21 +4,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __NS_SVGNUMBERPAIR_H__
 #define __NS_SVGNUMBERPAIR_H__
 
 #include "nsAutoPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsError.h"
-#include "nsIDOMSVGAnimatedNumber.h"
 #include "nsISMILAttr.h"
 #include "nsMathUtils.h"
 #include "nsSVGElement.h"
 #include "mozilla/Attributes.h"
+#include "mozilla/dom/SVGAnimatedNumber.h"
 
 class nsSMILValue;
 
 namespace mozilla {
 namespace dom {
 class SVGAnimationElement;
 }
 }
@@ -55,65 +55,59 @@ public:
   // Returns true if the animated value of this number has been explicitly
   // set (either by animation, or by taking on the base value which has been
   // explicitly set by markup or a DOM call), false otherwise.
   // If this returns false, the animated value is still valid, that is,
   // useable, and represents the default base value of the attribute.
   bool IsExplicitlySet() const
     { return mIsAnimated || mIsBaseSet; }
 
-  nsresult ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber** aResult,
-                               PairIndex aIndex,
-                               nsSVGElement* aSVGElement);
-  already_AddRefed<nsIDOMSVGAnimatedNumber>
+  already_AddRefed<mozilla::dom::SVGAnimatedNumber>
     ToDOMAnimatedNumber(PairIndex aIndex,
                         nsSVGElement* aSVGElement);
   // Returns a new nsISMILAttr object that the caller must delete
   nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement);
 
 private:
 
   float mAnimVal[2];
   float mBaseVal[2];
   uint8_t mAttrEnum; // element specified tracking for attribute
   bool mIsAnimated;
   bool mIsBaseSet;
 
 public:
-  struct DOMAnimatedNumber MOZ_FINAL : public nsIDOMSVGAnimatedNumber
+  struct DOMAnimatedNumber MOZ_FINAL : public mozilla::dom::SVGAnimatedNumber
   {
-    NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-    NS_DECL_CYCLE_COLLECTION_CLASS(DOMAnimatedNumber)
-
     DOMAnimatedNumber(nsSVGNumberPair* aVal, PairIndex aIndex, nsSVGElement *aSVGElement)
-      : mVal(aVal), mSVGElement(aSVGElement), mIndex(aIndex) {}
+      : mozilla::dom::SVGAnimatedNumber(aSVGElement)
+      , mVal(aVal)
+      , mIndex(aIndex)
+    {}
     virtual ~DOMAnimatedNumber();
 
     nsSVGNumberPair* mVal; // kept alive because it belongs to content
-    nsRefPtr<nsSVGElement> mSVGElement;
     PairIndex mIndex; // are we the first or second number
 
-    NS_IMETHOD GetBaseVal(float* aResult) MOZ_OVERRIDE
-      { *aResult = mVal->GetBaseValue(mIndex); return NS_OK; }
-    NS_IMETHOD SetBaseVal(float aValue) MOZ_OVERRIDE
-      {
-        if (!NS_finite(aValue)) {
-          return NS_ERROR_ILLEGAL_VALUE;
-        }
-        mVal->SetBaseValue(aValue, mIndex, mSVGElement);
-        return NS_OK;
-      }
+    virtual float BaseVal() MOZ_OVERRIDE
+    {
+      return mVal->GetBaseValue(mIndex);
+    }
+    virtual void SetBaseVal(float aValue) MOZ_OVERRIDE
+    {
+      MOZ_ASSERT(NS_finite(aValue));
+      mVal->SetBaseValue(aValue, mIndex, mSVGElement);
+    }
 
     // Script may have modified animation parameters or timeline -- DOM getters
     // need to flush any resample requests to reflect these modifications.
-    NS_IMETHOD GetAnimVal(float* aResult) MOZ_OVERRIDE
+    virtual float AnimVal() MOZ_OVERRIDE
     {
       mSVGElement->FlushAnimations();
-      *aResult = mVal->GetAnimValue(mIndex);
-      return NS_OK;
+      return mVal->GetAnimValue(mIndex);
     }
   };
 
   struct SMILNumberPair : public nsISMILAttr
   {
   public:
     SMILNumberPair(nsSVGNumberPair* aVal, nsSVGElement* aSVGElement)
       : mVal(aVal), mSVGElement(aSVGElement) {}
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -178,17 +178,16 @@
 #include "nsTreeColumns.h"
 #endif
 #include "nsIDOMXPathExpression.h"
 #include "nsIDOMNSXPathExpression.h"
 #include "nsIDOMXPathNSResolver.h"
 #include "nsIDOMXPathResult.h"
 #include "nsIDOMMozBrowserFrame.h"
 
-#include "nsIDOMSVGAnimatedNumber.h"
 #include "nsIDOMSVGLength.h"
 #include "nsIDOMSVGNumber.h"
 
 // Storage includes
 #include "DOMStorage.h"
 
 // Drag and drop
 #include "nsIDOMDataTransfer.h"
@@ -564,18 +563,16 @@ static nsDOMClassInfoData sClassInfoData
 
   NS_DEFINE_CLASSINFO_DATA(CSSMozDocumentRule, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(CSSSupportsRule, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   // other SVG classes
-  NS_DEFINE_CLASSINFO_DATA(SVGAnimatedNumber, nsDOMGenericSH,
-                           DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGLength, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGNumber, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
   NS_DEFINE_CLASSINFO_DATA(MozCanvasPrintState, nsDOMGenericSH,
                            DOM_DEFAULT_SCRIPTABLE_FLAGS)
 
@@ -1500,20 +1497,16 @@ nsDOMClassInfo::Init()
 
   DOM_CLASSINFO_MAP_BEGIN(CSSSupportsRule, nsIDOMCSSSupportsRule)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSSupportsRule)
   DOM_CLASSINFO_MAP_END
 
   // The SVG document
 
   // other SVG classes
-  DOM_CLASSINFO_MAP_BEGIN(SVGAnimatedNumber, nsIDOMSVGAnimatedNumber)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGAnimatedNumber)
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN(SVGLength, nsIDOMSVGLength)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLength)
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGNumber, nsIDOMSVGNumber)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGNumber)
   DOM_CLASSINFO_MAP_END
 
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -69,17 +69,16 @@ DOMCI_CLASS(DOMStringList)
 #ifdef MOZ_XUL
 DOMCI_CLASS(TreeColumn)
 #endif
 
 DOMCI_CLASS(CSSMozDocumentRule)
 DOMCI_CLASS(CSSSupportsRule)
 
 // other SVG classes
-DOMCI_CLASS(SVGAnimatedNumber)
 DOMCI_CLASS(SVGLength)
 DOMCI_CLASS(SVGNumber)
 
 // Canvas
 DOMCI_CLASS(MozCanvasPrintState)
 
 // WindowUtils
 DOMCI_CLASS(WindowUtils)
new file mode 100644
--- /dev/null
+++ b/dom/webidl/SVGAnimatedNumber.webidl
@@ -0,0 +1,16 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* 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/.
+ *
+ * The origin of this IDL file is
+ * https://svgwg.org/svg2-draft/types.html#InterfaceSVGAnimatedNumber
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
+ * W3C liability, trademark and document use rules apply.
+ */
+
+interface SVGAnimatedNumber {
+           attribute float baseVal;
+  readonly attribute float animVal;
+};
--- a/dom/webidl/SVGFECompositeElement.webidl
+++ b/dom/webidl/SVGFECompositeElement.webidl
@@ -5,18 +5,16 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFECompositeElement : SVGElement {
 
   // Composite Operators
   const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
   const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER = 1;
   const unsigned short SVG_FECOMPOSITE_OPERATOR_IN = 2;
   const unsigned short SVG_FECOMPOSITE_OPERATOR_OUT = 3;
   const unsigned short SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
--- a/dom/webidl/SVGFEConvolveMatrixElement.webidl
+++ b/dom/webidl/SVGFEConvolveMatrixElement.webidl
@@ -5,18 +5,16 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFEConvolveMatrixElement : SVGElement {
 
   // Edge Mode Values
   const unsigned short SVG_EDGEMODE_UNKNOWN = 0;
   const unsigned short SVG_EDGEMODE_DUPLICATE = 1;
   const unsigned short SVG_EDGEMODE_WRAP = 2;
   const unsigned short SVG_EDGEMODE_NONE = 3;
 
--- a/dom/webidl/SVGFEDiffuseLightingElement.webidl
+++ b/dom/webidl/SVGFEDiffuseLightingElement.webidl
@@ -5,18 +5,16 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFEDiffuseLightingElement : SVGElement {
   readonly attribute SVGAnimatedString in1;
   readonly attribute SVGAnimatedNumber surfaceScale;
   readonly attribute SVGAnimatedNumber diffuseConstant;
   readonly attribute SVGAnimatedNumber kernelUnitLengthX;
   readonly attribute SVGAnimatedNumber kernelUnitLengthY;
 };
 
--- a/dom/webidl/SVGFEDisplacementMapElement.webidl
+++ b/dom/webidl/SVGFEDisplacementMapElement.webidl
@@ -5,18 +5,16 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFEDisplacementMapElement : SVGElement {
 
   // Channel Selectors
   const unsigned short SVG_CHANNEL_UNKNOWN = 0;
   const unsigned short SVG_CHANNEL_R = 1;
   const unsigned short SVG_CHANNEL_G = 2;
   const unsigned short SVG_CHANNEL_B = 3;
   const unsigned short SVG_CHANNEL_A = 4;
--- a/dom/webidl/SVGFEDistantLightElement.webidl
+++ b/dom/webidl/SVGFEDistantLightElement.webidl
@@ -5,14 +5,12 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFEDistantLightElement : SVGElement {
   readonly attribute SVGAnimatedNumber azimuth;
   readonly attribute SVGAnimatedNumber elevation;
 };
--- a/dom/webidl/SVGFEGaussianBlurElement.webidl
+++ b/dom/webidl/SVGFEGaussianBlurElement.webidl
@@ -5,17 +5,15 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFEGaussianBlurElement : SVGElement {
   readonly attribute SVGAnimatedString in1;
   readonly attribute SVGAnimatedNumber stdDeviationX;
   readonly attribute SVGAnimatedNumber stdDeviationY;
 
   void setStdDeviation(float stdDeviationX, float stdDeviationY);
 };
--- a/dom/webidl/SVGFEMorphologyElement.webidl
+++ b/dom/webidl/SVGFEMorphologyElement.webidl
@@ -5,18 +5,16 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFEMorphologyElement : SVGElement {
 
   // Morphology Operators
   const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
   const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
   const unsigned short SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
 
   readonly attribute SVGAnimatedString in1;
--- a/dom/webidl/SVGFEOffsetElement.webidl
+++ b/dom/webidl/SVGFEOffsetElement.webidl
@@ -5,17 +5,15 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFEOffsetElement : SVGElement {
   readonly attribute SVGAnimatedString in1;
   readonly attribute SVGAnimatedNumber dx;
   readonly attribute SVGAnimatedNumber dy;
 };
 
 SVGFEOffsetElement implements SVGFilterPrimitiveStandardAttributes;
--- a/dom/webidl/SVGFEPointLightElement.webidl
+++ b/dom/webidl/SVGFEPointLightElement.webidl
@@ -5,15 +5,13 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFEPointLightElement : SVGElement {
   readonly attribute SVGAnimatedNumber x;
   readonly attribute SVGAnimatedNumber y;
   readonly attribute SVGAnimatedNumber z;
 };
--- a/dom/webidl/SVGFESpecularLightingElement.webidl
+++ b/dom/webidl/SVGFESpecularLightingElement.webidl
@@ -5,18 +5,16 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFESpecularLightingElement : SVGElement {
   readonly attribute SVGAnimatedString in1;
   readonly attribute SVGAnimatedNumber surfaceScale;
   readonly attribute SVGAnimatedNumber specularConstant;
   readonly attribute SVGAnimatedNumber specularExponent;
   readonly attribute SVGAnimatedNumber kernelUnitLengthX;
   readonly attribute SVGAnimatedNumber kernelUnitLengthY;
 };
--- a/dom/webidl/SVGFESpotLightElement.webidl
+++ b/dom/webidl/SVGFESpotLightElement.webidl
@@ -5,18 +5,16 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFESpotLightElement : SVGElement {
   readonly attribute SVGAnimatedNumber x;
   readonly attribute SVGAnimatedNumber y;
   readonly attribute SVGAnimatedNumber z;
   readonly attribute SVGAnimatedNumber pointsAtX;
   readonly attribute SVGAnimatedNumber pointsAtY;
   readonly attribute SVGAnimatedNumber pointsAtZ;
   readonly attribute SVGAnimatedNumber specularExponent;
--- a/dom/webidl/SVGFETurbulenceElement.webidl
+++ b/dom/webidl/SVGFETurbulenceElement.webidl
@@ -5,18 +5,16 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGFETurbulenceElement : SVGElement {
 
   // Turbulence Types
   const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0;
   const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
   const unsigned short SVG_TURBULENCE_TYPE_TURBULENCE = 2;
 
   // Stitch Options
--- a/dom/webidl/SVGStopElement.webidl
+++ b/dom/webidl/SVGStopElement.webidl
@@ -5,14 +5,12 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGAnimatedNumber;
-
 interface SVGStopElement : SVGElement {
   readonly attribute SVGAnimatedNumber offset;
 };
 
--- a/dom/webidl/WebIDL.mk
+++ b/dom/webidl/WebIDL.mk
@@ -227,16 +227,17 @@ webidl_files = \
   SVGAltGlyphElement.webidl \
   SVGAngle.webidl \
   SVGAnimatedAngle.webidl \
   SVGAnimatedBoolean.webidl \
   SVGAnimatedEnumeration.webidl \
   SVGAnimatedInteger.webidl \
   SVGAnimatedLength.webidl \
   SVGAnimatedLengthList.webidl \
+  SVGAnimatedNumber.webidl \
   SVGAnimatedNumberList.webidl \
   SVGAnimatedPathData.webidl \
   SVGAnimatedPoints.webidl \
   SVGAnimatedPreserveAspectRatio.webidl \
   SVGAnimatedRect.webidl \
   SVGAnimatedString.webidl \
   SVGAnimatedTransformList.webidl \
   SVGAnimateElement.webidl \