Bug 833446: Remove nsIDOMSVGGradientElement and subclasses r=peterv
authorDavid Zbarsky <dzbarsky@gmail.com>
Sat, 02 Feb 2013 15:23:16 -0500
changeset 130551 a9ced016d1e716dac78bd22c8a1117ef22f80fbe
parent 130550 194005810283a882c6c5a33c2c60a3e0426efa9f
child 130552 cf5acd1ad7c4236b536a5b1d640867767a170f00
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs833446
milestone21.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 833446: Remove nsIDOMSVGGradientElement and subclasses r=peterv
content/svg/content/src/SVGGradientElement.cpp
content/svg/content/src/SVGGradientElement.h
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfoClasses.h
dom/interfaces/svg/Makefile.in
dom/interfaces/svg/nsIDOMSVGGradientElement.idl
layout/svg/nsSVGGradientFrame.cpp
--- a/content/svg/content/src/SVGGradientElement.cpp
+++ b/content/svg/content/src/SVGGradientElement.cpp
@@ -9,47 +9,43 @@
 #include "mozilla/dom/SVGAnimatedLength.h"
 #include "mozilla/dom/SVGRadialGradientElementBinding.h"
 #include "mozilla/dom/SVGLinearGradientElementBinding.h"
 #include "mozilla/Util.h"
 #include "nsCOMPtr.h"
 #include "nsGkAtoms.h"
 #include "nsIDOMMutationEvent.h"
 #include "nsIDOMSVGAnimatedEnum.h"
-#include "nsIDOMSVGGradientElement.h"
 #include "nsIDOMSVGURIReference.h"
 #include "nsSVGElement.h"
 
-DOMCI_NODE_DATA(SVGRadialGradientElement, mozilla::dom::SVGRadialGradientElement)
-DOMCI_NODE_DATA(SVGLinearGradientElement, mozilla::dom::SVGLinearGradientElement)
-
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(LinearGradient)
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(RadialGradient)
 
 namespace mozilla {
 namespace dom {
 
 //--------------------- Gradients------------------------
 
 nsSVGEnumMapping SVGGradientElement::sSpreadMethodMap[] = {
-  {&nsGkAtoms::pad, nsIDOMSVGGradientElement::SVG_SPREADMETHOD_PAD},
-  {&nsGkAtoms::reflect, nsIDOMSVGGradientElement::SVG_SPREADMETHOD_REFLECT},
-  {&nsGkAtoms::repeat, nsIDOMSVGGradientElement::SVG_SPREADMETHOD_REPEAT},
+  {&nsGkAtoms::pad, SVG_SPREADMETHOD_PAD},
+  {&nsGkAtoms::reflect, SVG_SPREADMETHOD_REFLECT},
+  {&nsGkAtoms::repeat, SVG_SPREADMETHOD_REPEAT},
   {nullptr, 0}
 };
 
 nsSVGElement::EnumInfo SVGGradientElement::sEnumInfo[2] =
 {
   { &nsGkAtoms::gradientUnits,
     sSVGUnitTypesMap,
     nsIDOMSVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
   },
   { &nsGkAtoms::spreadMethod,
     sSpreadMethodMap,
-    nsIDOMSVGGradientElement::SVG_SPREADMETHOD_PAD
+    SVG_SPREADMETHOD_PAD
   }
 };
 
 nsSVGElement::StringInfo SVGGradientElement::sStringInfo[1] =
 {
   { &nsGkAtoms::href, kNameSpaceID_XLink, true }
 };
 
@@ -85,61 +81,38 @@ SVGGradientElement::GetEnumInfo()
 
 nsSVGElement::StringAttributesInfo
 SVGGradientElement::GetStringInfo()
 {
   return StringAttributesInfo(mStringAttributes, sStringInfo,
                               ArrayLength(sStringInfo));
 }
 
-//----------------------------------------------------------------------
-// nsIDOMSVGGradientElement methods
-
-/* readonly attribute nsIDOMSVGAnimatedEnumeration gradientUnits; */
 already_AddRefed<nsIDOMSVGAnimatedEnumeration>
 SVGGradientElement::GradientUnits()
 {
   return mEnumAttributes[GRADIENTUNITS].ToDOMAnimatedEnum(this);
 }
 
-NS_IMETHODIMP SVGGradientElement::GetGradientUnits(nsIDOMSVGAnimatedEnumeration * *aGradientUnits)
-{
-  *aGradientUnits = GradientUnits().get();
-  return NS_OK;
-}
-
 /* readonly attribute SVGAnimatedTransformList gradientTransform; */
 already_AddRefed<DOMSVGAnimatedTransformList>
 SVGGradientElement::GradientTransform()
 {
   // We're creating a DOM wrapper, so we must tell GetAnimatedTransformList
   // to allocate the SVGAnimatedTransformList if it hasn't already done so:
   return DOMSVGAnimatedTransformList::GetDOMWrapper(
            GetAnimatedTransformList(DO_ALLOCATE), this);
 }
 
-NS_IMETHODIMP SVGGradientElement::GetGradientTransform(nsISupports * *aGradientTransform)
-{
-  *aGradientTransform = GradientTransform().get();
-  return NS_OK;
-}
-
-/* readonly attribute nsIDOMSVGAnimatedEnumeration spreadMethod; */
 already_AddRefed<nsIDOMSVGAnimatedEnumeration>
 SVGGradientElement::SpreadMethod()
 {
   return mEnumAttributes[SPREADMETHOD].ToDOMAnimatedEnum(this);
 }
 
-NS_IMETHODIMP SVGGradientElement::GetSpreadMethod(nsIDOMSVGAnimatedEnumeration * *aSpreadMethod)
-{
-  *aSpreadMethod = SpreadMethod().get();
-  return NS_OK;
-}
-
 //----------------------------------------------------------------------
 // nsIDOMSVGURIReference methods:
 
 /* readonly attribute nsIDOMSVGAnimatedString href; */
 already_AddRefed<nsIDOMSVGAnimatedString>
 SVGGradientElement::Href()
 {
   nsCOMPtr<nsIDOMSVGAnimatedString> href;
@@ -184,96 +157,59 @@ nsSVGElement::LengthInfo SVGLinearGradie
   { &nsGkAtoms::y1, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
   { &nsGkAtoms::x2, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
   { &nsGkAtoms::y2, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
 };
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
-NS_IMPL_ADDREF_INHERITED(SVGLinearGradientElement,SVGLinearGradientElementBase)
-NS_IMPL_RELEASE_INHERITED(SVGLinearGradientElement,SVGLinearGradientElementBase)
-
-NS_INTERFACE_TABLE_HEAD(SVGLinearGradientElement)
-  NS_NODE_INTERFACE_TABLE5(SVGLinearGradientElement, nsIDOMNode,
-                           nsIDOMElement, nsIDOMSVGElement,
-                           nsIDOMSVGGradientElement,
-                           nsIDOMSVGLinearGradientElement)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGLinearGradientElement)
-NS_INTERFACE_MAP_END_INHERITING(SVGLinearGradientElementBase)
+NS_IMPL_ISUPPORTS_INHERITED3(SVGLinearGradientElement, SVGLinearGradientElementBase,
+                             nsIDOMNode,
+                             nsIDOMElement, nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGLinearGradientElement::SVGLinearGradientElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGLinearGradientElementBase(aNodeInfo)
 {
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGLinearGradientElement)
 
 //----------------------------------------------------------------------
-// nsIDOMSVGLinearGradientElement methods
-
-/* readonly attribute nsIDOMSVGAnimatedLength x1; */
-NS_IMETHODIMP SVGLinearGradientElement::GetX1(nsIDOMSVGAnimatedLength * *aX1)
-{
-  *aX1 = X1().get();
-  return NS_OK;
-}
 
 already_AddRefed<SVGAnimatedLength>
 SVGLinearGradientElement::X1()
 {
   return mLengthAttributes[ATTR_X1].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength y1; */
-NS_IMETHODIMP SVGLinearGradientElement::GetY1(nsIDOMSVGAnimatedLength * *aY1)
-{
-  *aY1 = Y1().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGLinearGradientElement::Y1()
 {
   return mLengthAttributes[ATTR_Y1].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength x2; */
-NS_IMETHODIMP SVGLinearGradientElement::GetX2(nsIDOMSVGAnimatedLength * *aX2)
-{
-  *aX2 = X2().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGLinearGradientElement::X2()
 {
   return mLengthAttributes[ATTR_X2].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength y2; */
-NS_IMETHODIMP SVGLinearGradientElement::GetY2(nsIDOMSVGAnimatedLength * *aY2)
-{
-  *aY2 = Y2().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGLinearGradientElement::Y2()
 {
   return mLengthAttributes[ATTR_Y2].ToDOMAnimatedLength(this);
 }
 
-
 //----------------------------------------------------------------------
 // nsSVGElement methods
 
 SVGAnimatedTransformList*
 SVGGradientElement::GetAnimatedTransformList(uint32_t aFlags)
 {
   if (!mGradientTransform && (aFlags & DO_ALLOCATE)) {
     mGradientTransform = new SVGAnimatedTransformList();
@@ -304,102 +240,59 @@ nsSVGElement::LengthInfo SVGRadialGradie
   { &nsGkAtoms::r, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY },
   { &nsGkAtoms::fx, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
   { &nsGkAtoms::fy, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
 };
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
-NS_IMPL_ADDREF_INHERITED(SVGRadialGradientElement, SVGRadialGradientElementBase)
-NS_IMPL_RELEASE_INHERITED(SVGRadialGradientElement, SVGRadialGradientElementBase)
-
-NS_INTERFACE_TABLE_HEAD(SVGRadialGradientElement)
-  NS_NODE_INTERFACE_TABLE5(SVGRadialGradientElement, nsIDOMNode,
-                           nsIDOMElement, nsIDOMSVGElement,
-                           nsIDOMSVGGradientElement,
-                           nsIDOMSVGRadialGradientElement)
-  NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGRadialGradientElement)
-NS_INTERFACE_MAP_END_INHERITING(SVGRadialGradientElementBase)
+NS_IMPL_ISUPPORTS_INHERITED3(SVGRadialGradientElement, SVGRadialGradientElementBase,
+                             nsIDOMNode,
+                             nsIDOMElement, nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGRadialGradientElement::SVGRadialGradientElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGRadialGradientElementBase(aNodeInfo)
 {
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGRadialGradientElement)
 
 //----------------------------------------------------------------------
-// nsIDOMSVGRadialGradientElement methods
-
-/* readonly attribute nsIDOMSVGAnimatedLength cx; */
-NS_IMETHODIMP SVGRadialGradientElement::GetCx(nsIDOMSVGAnimatedLength * *aCx)
-{
-  *aCx = Cx().get();
-  return NS_OK;
-}
 
 already_AddRefed<SVGAnimatedLength>
 SVGRadialGradientElement::Cx()
 {
   return mLengthAttributes[ATTR_CX].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength cy; */
-NS_IMETHODIMP SVGRadialGradientElement::GetCy(nsIDOMSVGAnimatedLength * *aCy)
-{
-  *aCy = Cy().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGRadialGradientElement::Cy()
 {
   return mLengthAttributes[ATTR_CY].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength r; */
-NS_IMETHODIMP SVGRadialGradientElement::GetR(nsIDOMSVGAnimatedLength * *aR)
-{
-  *aR = R().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGRadialGradientElement::R()
 {
   return mLengthAttributes[ATTR_R].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength fx; */
-NS_IMETHODIMP SVGRadialGradientElement::GetFx(nsIDOMSVGAnimatedLength * *aFx)
-{
-  *aFx = Fx().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGRadialGradientElement::Fx()
 {
   return mLengthAttributes[ATTR_FX].ToDOMAnimatedLength(this);
 }
 
-/* readonly attribute nsIDOMSVGAnimatedLength fy; */
-NS_IMETHODIMP SVGRadialGradientElement::GetFy(nsIDOMSVGAnimatedLength * *aFy)
-{
-  *aFy = Fy().get();
-  return NS_OK;
-}
-
 already_AddRefed<SVGAnimatedLength>
 SVGRadialGradientElement::Fy()
 {
   return mLengthAttributes[ATTR_FY].ToDOMAnimatedLength(this);
 }
 
 //----------------------------------------------------------------------
 // nsSVGElement methods
--- a/content/svg/content/src/SVGGradientElement.h
+++ b/content/svg/content/src/SVGGradientElement.h
@@ -2,24 +2,28 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef __NS_SVGGRADIENTELEMENT_H__
 #define __NS_SVGGRADIENTELEMENT_H__
 
 #include "nsIDOMSVGURIReference.h"
-#include "nsIDOMSVGGradientElement.h"
 #include "nsIDOMSVGUnitTypes.h"
 #include "nsSVGElement.h"
 #include "nsSVGLength2.h"
 #include "nsSVGEnum.h"
 #include "nsSVGString.h"
 #include "SVGAnimatedTransformList.h"
 
+static const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
+static const unsigned short SVG_SPREADMETHOD_PAD     = 1;
+static const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
+static const unsigned short SVG_SPREADMETHOD_REPEAT  = 3;
+
 class nsSVGGradientFrame;
 class nsSVGLinearGradientFrame;
 class nsSVGRadialGradientFrame;
 
 nsresult
 NS_NewSVGLinearGradientElement(nsIContent** aResult,
                                already_AddRefed<nsINodeInfo> aNodeInfo);
 nsresult
@@ -46,19 +50,16 @@ protected:
   SVGGradientElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject*
   WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE = 0;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  // Gradient Element
-  NS_DECL_NSIDOMSVGGRADIENTELEMENT
-
   // URI Reference
   NS_DECL_NSIDOMSVGURIREFERENCE
 
   // nsIContent
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual SVGAnimatedTransformList*
     GetAnimatedTransformList(uint32_t aFlags = 0);
@@ -80,125 +81,107 @@ protected:
   nsSVGEnum mEnumAttributes[2];
   static nsSVGEnumMapping sSpreadMethodMap[];
   static EnumInfo sEnumInfo[2];
 
   enum { HREF };
   nsSVGString mStringAttributes[1];
   static StringInfo sStringInfo[1];
 
-  // nsIDOMSVGGradientElement values
+  // SVGGradientElement values
   nsAutoPtr<SVGAnimatedTransformList> mGradientTransform;
 };
 
 //---------------------Linear Gradients------------------------
 
 typedef SVGGradientElement SVGLinearGradientElementBase;
 
 class SVGLinearGradientElement : public SVGLinearGradientElementBase
-                               , public nsIDOMSVGLinearGradientElement
+                               , public nsIDOMSVGElement
 {
   friend class ::nsSVGLinearGradientFrame;
   friend nsresult
     (::NS_NewSVGLinearGradientElement(nsIContent** aResult,
                                       already_AddRefed<nsINodeInfo> aNodeInfo));
 
 protected:
   SVGLinearGradientElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject*
   WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  // Gradient Element
-  NS_FORWARD_NSIDOMSVGGRADIENTELEMENT(SVGLinearGradientElementBase::)
-
-  // Linear Gradient
-  NS_DECL_NSIDOMSVGLINEARGRADIENTELEMENT
-
   // The Gradient Element base class implements these
   NS_FORWARD_NSIDOMSVGELEMENT(SVGLinearGradientElementBase::)
 
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsXPCClassInfo* GetClassInfo();
-
   virtual nsIDOMNode* AsDOMNode() { return this; }
 
   // WebIDL
   already_AddRefed<SVGAnimatedLength> X1();
   already_AddRefed<SVGAnimatedLength> Y1();
   already_AddRefed<SVGAnimatedLength> X2();
   already_AddRefed<SVGAnimatedLength> Y2();
 
 protected:
 
   virtual LengthAttributesInfo GetLengthInfo();
 
-  // nsIDOMSVGLinearGradientElement values
   enum { ATTR_X1, ATTR_Y1, ATTR_X2, ATTR_Y2 };
   nsSVGLength2 mLengthAttributes[4];
   static LengthInfo sLengthInfo[4];
 };
 
 //-------------------------- Radial Gradients ----------------------------
 
 typedef SVGGradientElement SVGRadialGradientElementBase;
 
 class SVGRadialGradientElement : public SVGRadialGradientElementBase
-                               , public nsIDOMSVGRadialGradientElement
+                               , public nsIDOMSVGElement
 {
   friend class ::nsSVGRadialGradientFrame;
   friend nsresult
     (::NS_NewSVGRadialGradientElement(nsIContent** aResult,
                                       already_AddRefed<nsINodeInfo> aNodeInfo));
 
 protected:
   SVGRadialGradientElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject*
   WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // Gradient Element
-  NS_FORWARD_NSIDOMSVGGRADIENTELEMENT(SVGRadialGradientElementBase::)
-
-  // Radial Gradient
-  NS_DECL_NSIDOMSVGRADIALGRADIENTELEMENT
-
   // xxx I wish we could use virtual inheritance
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
   NS_FORWARD_NSIDOMSVGELEMENT(SVGRadialGradientElementBase::)
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsXPCClassInfo* GetClassInfo();
-
   virtual nsIDOMNode* AsDOMNode() { return this; }
 
   // WebIDL
   already_AddRefed<SVGAnimatedLength> Cx();
   already_AddRefed<SVGAnimatedLength> Cy();
   already_AddRefed<SVGAnimatedLength> R();
   already_AddRefed<SVGAnimatedLength> Fx();
   already_AddRefed<SVGAnimatedLength> Fy();
 protected:
 
   virtual LengthAttributesInfo GetLengthInfo();
 
-  // nsIDOMSVGRadialGradientElement values
   enum { ATTR_CX, ATTR_CY, ATTR_R, ATTR_FX, ATTR_FY };
   nsSVGLength2 mLengthAttributes[5];
   static LengthInfo sLengthInfo[5];
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -319,17 +319,16 @@
 #include "nsIDOMSVGMpathElement.h"
 #include "nsIDOMTimeEvent.h"
 #include "nsIDOMSVGClipPathElement.h"
 #include "nsIDOMSVGDocument.h"
 #include "nsIDOMSVGElement.h"
 #include "nsIDOMSVGEvent.h"
 #include "nsIDOMSVGFilterElement.h"
 #include "nsIDOMSVGFilters.h"
-#include "nsIDOMSVGGradientElement.h"
 #include "nsIDOMSVGImageElement.h"
 #include "nsIDOMSVGLength.h"
 #include "nsIDOMSVGLineElement.h"
 #include "nsIDOMSVGMarkerElement.h"
 #include "nsIDOMSVGMaskElement.h"
 #include "nsIDOMSVGMetadataElement.h"
 #include "nsIDOMSVGNumber.h"
 #include "nsIDOMSVGPathElement.h"
@@ -1113,36 +1112,32 @@ static nsDOMClassInfoData sClassInfoData
   NS_DEFINE_CLASSINFO_DATA(SVGFETileElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGFETurbulenceElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGFilterElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGImageElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(SVGLinearGradientElement, nsElementSH,
-                           ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGLineElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGMarkerElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGMaskElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGMetadataElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGPathElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGPatternElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGPolygonElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGPolylineElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
-  NS_DEFINE_CLASSINFO_DATA(SVGRadialGradientElement, nsElementSH,
-                           ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGRectElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGScriptElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGStopElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
   NS_DEFINE_CLASSINFO_DATA(SVGStyleElement, nsElementSH,
                            ELEMENT_SCRIPTABLE_FLAGS)
@@ -3141,24 +3136,16 @@ nsDOMClassInfo::Init()
 
   DOM_CLASSINFO_MAP_BEGIN(SVGImageElement, nsIDOMSVGImageElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGImageElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIImageLoadingContent)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
     DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(SVGLinearGradientElement, nsIDOMSVGLinearGradientElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGGradientElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLinearGradientElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGUnitTypes)
-    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN(SVGLineElement, nsIDOMSVGLineElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLineElement)
     DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGMarkerElement, nsIDOMSVGMarkerElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGMarkerElement)
     DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
@@ -3192,24 +3179,16 @@ nsDOMClassInfo::Init()
     DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGPolylineElement, nsIDOMSVGPolylineElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGPolylineElement)
     DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
-  DOM_CLASSINFO_MAP_BEGIN(SVGRadialGradientElement, nsIDOMSVGRadialGradientElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGGradientElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGRadialGradientElement)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
-    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGUnitTypes)
-    DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
-  DOM_CLASSINFO_MAP_END
-
   DOM_CLASSINFO_MAP_BEGIN(SVGRectElement, nsIDOMSVGRectElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGRectElement)
     DOM_CLASSINFO_SVG_GRAPHIC_ELEMENT_MAP_ENTRIES
   DOM_CLASSINFO_MAP_END
 
   DOM_CLASSINFO_MAP_BEGIN(SVGScriptElement, nsIDOMSVGScriptElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGScriptElement)
     DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGURIReference)
--- a/dom/base/nsDOMClassInfoClasses.h
+++ b/dom/base/nsDOMClassInfoClasses.h
@@ -216,26 +216,24 @@ DOMCI_CLASS(SVGFEMorphologyElement)
 DOMCI_CLASS(SVGFEOffsetElement)
 DOMCI_CLASS(SVGFEPointLightElement)
 DOMCI_CLASS(SVGFESpecularLightingElement)
 DOMCI_CLASS(SVGFESpotLightElement)
 DOMCI_CLASS(SVGFETileElement)
 DOMCI_CLASS(SVGFETurbulenceElement)
 DOMCI_CLASS(SVGFilterElement)
 DOMCI_CLASS(SVGImageElement)
-DOMCI_CLASS(SVGLinearGradientElement)
 DOMCI_CLASS(SVGLineElement)
 DOMCI_CLASS(SVGMarkerElement)
 DOMCI_CLASS(SVGMaskElement)
 DOMCI_CLASS(SVGMetadataElement)
 DOMCI_CLASS(SVGPathElement)
 DOMCI_CLASS(SVGPatternElement)
 DOMCI_CLASS(SVGPolygonElement)
 DOMCI_CLASS(SVGPolylineElement)
-DOMCI_CLASS(SVGRadialGradientElement)
 DOMCI_CLASS(SVGRectElement)
 DOMCI_CLASS(SVGScriptElement)
 DOMCI_CLASS(SVGStopElement)
 DOMCI_CLASS(SVGStyleElement)
 DOMCI_CLASS(SVGSVGElement)
 DOMCI_CLASS(SVGSwitchElement)
 DOMCI_CLASS(SVGSymbolElement)
 DOMCI_CLASS(SVGTextElement)
--- a/dom/interfaces/svg/Makefile.in
+++ b/dom/interfaces/svg/Makefile.in
@@ -25,17 +25,16 @@ XPIDLSRCS	= \
 		nsIDOMSVGAnimatedRect.idl \
 		nsIDOMSVGAnimatedString.idl \
 		nsIDOMSVGClipPathElement.idl \
 		nsIDOMSVGDocument.idl \
 		nsIDOMSVGElement.idl \
 		nsIDOMSVGEvent.idl \
 		nsIDOMSVGFilterElement.idl \
 		nsIDOMSVGFilters.idl \
-		nsIDOMSVGGradientElement.idl \
 		nsIDOMSVGImageElement.idl \
 		nsIDOMSVGLength.idl \
 		nsIDOMSVGLineElement.idl \
 		nsIDOMSVGMarkerElement.idl \
 		nsIDOMSVGMaskElement.idl \
 		nsIDOMSVGMetadataElement.idl \
 		nsIDOMSVGMpathElement.idl \
 		nsIDOMSVGNumber.idl \
deleted file mode 100644
--- a/dom/interfaces/svg/nsIDOMSVGGradientElement.idl
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- 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/. */
-
-#include "nsIDOMSVGElement.idl"
-
-/**
- * The nsIDOMSVGGradientElement interface is the interface to an SVG
- * gradient element.
- *
- * For more information on this interface please see
- * http://www.w3.org/TR/SVG11/pservers.html
- *
- */
-
-interface nsIDOMSVGAnimatedEnumeration;
-
-[scriptable, uuid(5056512E-2ACE-4B68-8F52-124E24CF0F55)]
-interface nsIDOMSVGGradientElement
-  : nsIDOMSVGElement
-/*
-        The SVG DOM makes use of multiple interface inheritance.
-        Since XPCOM only supports single interface inheritance,
-        the best thing that we can do is to promise that whenever
-        an object implements _this_ interface it will also
-        implement the following interfaces. (We then have to QI to
-        hop between them.)
-        
-    nsIDOMSVGURIReference,
-    nsIDOMSVGStylable
-*/
-{ 
-  const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
-  const unsigned short SVG_SPREADMETHOD_PAD     = 1;
-  const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
-  const unsigned short SVG_SPREADMETHOD_REPEAT  = 3;
-
-  readonly attribute nsIDOMSVGAnimatedEnumeration gradientUnits;
-  // SVGAnimatedTransformList
-  readonly attribute nsISupports                  gradientTransform;
-  readonly attribute nsIDOMSVGAnimatedEnumeration spreadMethod;
-};
-
-
-/**
- * The nsIDOMSVGLinearGradientElement interface is the interface to an SVG
- * linear gradient element.
- *
- * For more information on this interface please see
- * http://www.w3.org/TR/SVG11/pservers.html
- *
- */
-
-// Linear gradient
-interface nsIDOMSVGAnimatedLength;
-
-[scriptable, uuid(AC3E0464-5B49-4323-850D-563573F754EC)]
-interface nsIDOMSVGLinearGradientElement
-  : nsIDOMSVGGradientElement
-{ 
-  readonly attribute nsIDOMSVGAnimatedLength x1;
-  readonly attribute nsIDOMSVGAnimatedLength y1;
-  readonly attribute nsIDOMSVGAnimatedLength x2;
-  readonly attribute nsIDOMSVGAnimatedLength y2;
-};
-
-/**
- * The nsIDOMSVGRadialGradientElement interface is the interface to an SVG
- * radial gradient element.
- *
- * For more information on this interface please see
- * http://www.w3.org/TR/SVG11/pservers.html
- *
- */
-
-// Radial gradient
-interface nsIDOMSVGAnimatedLength;
-
-[scriptable, uuid(7300FBAB-84AE-425E-BB3B-CF8C1E584CCD)]
-interface nsIDOMSVGRadialGradientElement
-  : nsIDOMSVGGradientElement
-{ 
-  readonly attribute nsIDOMSVGAnimatedLength cx;
-  readonly attribute nsIDOMSVGAnimatedLength cy;
-  readonly attribute nsIDOMSVGAnimatedLength r;
-  readonly attribute nsIDOMSVGAnimatedLength fx;
-  readonly attribute nsIDOMSVGAnimatedLength fy;
-};
-
-
--- a/layout/svg/nsSVGGradientFrame.cpp
+++ b/layout/svg/nsSVGGradientFrame.cpp
@@ -286,21 +286,21 @@ nsSVGGradientFrame::GetPaintServerPatter
 
   patternMatrix.Invert();
 
   nsRefPtr<gfxPattern> gradient = CreateGradient();
   if (!gradient || gradient->CairoStatus())
     return nullptr;
 
   uint16_t aSpread = GetSpreadMethod();
-  if (aSpread == nsIDOMSVGGradientElement::SVG_SPREADMETHOD_PAD)
+  if (aSpread == SVG_SPREADMETHOD_PAD)
     gradient->SetExtend(gfxPattern::EXTEND_PAD);
-  else if (aSpread == nsIDOMSVGGradientElement::SVG_SPREADMETHOD_REFLECT)
+  else if (aSpread == SVG_SPREADMETHOD_REFLECT)
     gradient->SetExtend(gfxPattern::EXTEND_REFLECT);
-  else if (aSpread == nsIDOMSVGGradientElement::SVG_SPREADMETHOD_REPEAT)
+  else if (aSpread == SVG_SPREADMETHOD_REPEAT)
     gradient->SetExtend(gfxPattern::EXTEND_REPEAT);
 
   gradient->SetMatrix(patternMatrix);
 
   // setup stops
   float lastOffset = 0.0f;
 
   for (uint32_t i = 0; i < nStops; i++) {