Bug 840417 Part 1: Move nsIDOMSVGElement up to nsSVGElement r=Ms2ger
authorDavid Zbarsky <dzbarsky@gmail.com>
Wed, 27 Mar 2013 21:23:09 -0400
changeset 137704 4a86211079c7c86e7bf8318d578e807ce4d2432c
parent 137703 54e4bbd35f150dcad41aabd2df7c7c5921002cf5
child 137705 889cee343aea51f63a4defffdd2c691eca3a5585
push id336
push userakeybl@mozilla.com
push dateMon, 17 Jun 2013 22:53:19 +0000
treeherdermozilla-release@574a39cdf657 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs840417
milestone22.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 840417 Part 1: Move nsIDOMSVGElement up to nsSVGElement r=Ms2ger
content/base/public/nsINode.h
content/svg/content/src/DOMSVGStringList.cpp
content/svg/content/src/SVGAElement.cpp
content/svg/content/src/SVGAElement.h
content/svg/content/src/SVGAltGlyphElement.cpp
content/svg/content/src/SVGAltGlyphElement.h
content/svg/content/src/SVGAnimateElement.h
content/svg/content/src/SVGAnimateMotionElement.h
content/svg/content/src/SVGAnimateTransformElement.h
content/svg/content/src/SVGAnimationElement.cpp
content/svg/content/src/SVGCircleElement.cpp
content/svg/content/src/SVGCircleElement.h
content/svg/content/src/SVGClipPathElement.cpp
content/svg/content/src/SVGClipPathElement.h
content/svg/content/src/SVGComponentTransferFunctionElement.h
content/svg/content/src/SVGDefsElement.cpp
content/svg/content/src/SVGDefsElement.h
content/svg/content/src/SVGDescElement.cpp
content/svg/content/src/SVGDescElement.h
content/svg/content/src/SVGEllipseElement.cpp
content/svg/content/src/SVGEllipseElement.h
content/svg/content/src/SVGFEBlendElement.h
content/svg/content/src/SVGFEColorMatrixElement.h
content/svg/content/src/SVGFEComponentTransferElement.h
content/svg/content/src/SVGFECompositeElement.cpp
content/svg/content/src/SVGFECompositeElement.h
content/svg/content/src/SVGFEConvolveMatrixElement.h
content/svg/content/src/SVGFEDiffuseLightingElement.h
content/svg/content/src/SVGFEDisplacementMapElement.h
content/svg/content/src/SVGFEDistantLightElement.cpp
content/svg/content/src/SVGFEDistantLightElement.h
content/svg/content/src/SVGFEFloodElement.h
content/svg/content/src/SVGFEGaussianBlurElement.cpp
content/svg/content/src/SVGFEGaussianBlurElement.h
content/svg/content/src/SVGFEImageElement.cpp
content/svg/content/src/SVGFEImageElement.h
content/svg/content/src/SVGFEMergeElement.h
content/svg/content/src/SVGFEMergeNodeElement.h
content/svg/content/src/SVGFEMorphologyElement.h
content/svg/content/src/SVGFEOffsetElement.h
content/svg/content/src/SVGFEPointLightElement.h
content/svg/content/src/SVGFESpecularLightingElement.h
content/svg/content/src/SVGFESpotLightElement.h
content/svg/content/src/SVGFETileElement.h
content/svg/content/src/SVGFETurbulenceElement.h
content/svg/content/src/SVGFilterElement.cpp
content/svg/content/src/SVGFilterElement.h
content/svg/content/src/SVGForeignObjectElement.cpp
content/svg/content/src/SVGForeignObjectElement.h
content/svg/content/src/SVGGElement.cpp
content/svg/content/src/SVGGElement.h
content/svg/content/src/SVGGradientElement.cpp
content/svg/content/src/SVGGradientElement.h
content/svg/content/src/SVGImageElement.cpp
content/svg/content/src/SVGImageElement.h
content/svg/content/src/SVGLineElement.cpp
content/svg/content/src/SVGLineElement.h
content/svg/content/src/SVGMPathElement.cpp
content/svg/content/src/SVGMPathElement.h
content/svg/content/src/SVGMarkerElement.cpp
content/svg/content/src/SVGMarkerElement.h
content/svg/content/src/SVGMaskElement.cpp
content/svg/content/src/SVGMaskElement.h
content/svg/content/src/SVGMetadataElement.cpp
content/svg/content/src/SVGMetadataElement.h
content/svg/content/src/SVGPathElement.cpp
content/svg/content/src/SVGPathElement.h
content/svg/content/src/SVGPatternElement.cpp
content/svg/content/src/SVGPatternElement.h
content/svg/content/src/SVGPolygonElement.cpp
content/svg/content/src/SVGPolygonElement.h
content/svg/content/src/SVGPolylineElement.cpp
content/svg/content/src/SVGPolylineElement.h
content/svg/content/src/SVGRectElement.cpp
content/svg/content/src/SVGRectElement.h
content/svg/content/src/SVGSVGElement.cpp
content/svg/content/src/SVGSVGElement.h
content/svg/content/src/SVGScriptElement.cpp
content/svg/content/src/SVGScriptElement.h
content/svg/content/src/SVGSetElement.h
content/svg/content/src/SVGStopElement.cpp
content/svg/content/src/SVGStopElement.h
content/svg/content/src/SVGStyleElement.cpp
content/svg/content/src/SVGStyleElement.h
content/svg/content/src/SVGSwitchElement.cpp
content/svg/content/src/SVGSwitchElement.h
content/svg/content/src/SVGSymbolElement.cpp
content/svg/content/src/SVGSymbolElement.h
content/svg/content/src/SVGTSpanElement.cpp
content/svg/content/src/SVGTSpanElement.h
content/svg/content/src/SVGTests.cpp
content/svg/content/src/SVGTextElement.cpp
content/svg/content/src/SVGTextElement.h
content/svg/content/src/SVGTextPathElement.cpp
content/svg/content/src/SVGTextPathElement.h
content/svg/content/src/SVGTitleElement.cpp
content/svg/content/src/SVGTitleElement.h
content/svg/content/src/SVGTransformableElement.h
content/svg/content/src/SVGUseElement.cpp
content/svg/content/src/SVGUseElement.h
content/svg/content/src/SVGViewElement.cpp
content/svg/content/src/SVGViewElement.h
content/svg/content/src/nsSVGElement.cpp
content/svg/content/src/nsSVGElement.h
content/svg/content/src/nsSVGPolyElement.cpp
content/svg/content/src/nsSVGUnknownElement.cpp
content/svg/document/src/SVGDocument.cpp
layout/svg/nsSVGGFrame.cpp
--- a/content/base/public/nsINode.h
+++ b/content/base/public/nsINode.h
@@ -1807,16 +1807,22 @@ extern const nsIID kThisPtrOffsetsSID;
 
 // nsNodeSH::PreCreate() depends on the identity pointer being the same as
 // nsINode, so if you change the nsISupports line  below, make sure
 // nsNodeSH::PreCreate() still does the right thing!
 #define NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class)                      \
   NS_OFFSET_AND_INTERFACE_TABLE_BEGIN_AMBIGUOUS(_class, nsINode)              \
     NS_INTERFACE_TABLE_ENTRY(_class, nsINode)                       
 
+#define NS_NODE_INTERFACE_TABLE1(_class, _i1)                                 \
+  NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class)                            \
+    NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
+  NS_OFFSET_AND_INTERFACE_TABLE_END                                           \
+  NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE
+
 #define NS_NODE_INTERFACE_TABLE2(_class, _i1, _i2)                            \
   NS_NODE_OFFSET_AND_INTERFACE_TABLE_BEGIN(_class)                            \
     NS_INTERFACE_TABLE_ENTRY(_class, _i1)                                     \
     NS_INTERFACE_TABLE_ENTRY(_class, _i2)                                     \
   NS_OFFSET_AND_INTERFACE_TABLE_END                                           \
   NS_OFFSET_AND_INTERFACE_TABLE_TO_MAP_SEGUE
 
 #define NS_NODE_INTERFACE_TABLE3(_class, _i1, _i2, _i3)                       \
--- a/content/svg/content/src/DOMSVGStringList.cpp
+++ b/content/svg/content/src/DOMSVGStringList.cpp
@@ -180,15 +180,15 @@ DOMSVGStringList::AppendItem(const nsASt
 {
   return InsertItemBefore(newItem, InternalList().Length(), _retval);
 }
 
 SVGStringList &
 DOMSVGStringList::InternalList()
 {
   if (mIsConditionalProcessingAttribute) {
-    nsCOMPtr<dom::SVGTests> tests = do_QueryInterface(mElement);
+    nsCOMPtr<dom::SVGTests> tests = do_QueryObject(mElement);
     return tests->mStringListAttributes[mAttrEnum];
   }
   return mElement->GetStringListInfo().mStringLists[mAttrEnum];
 }
 
 } // namespace mozilla
--- a/content/svg/content/src/SVGAElement.cpp
+++ b/content/svg/content/src/SVGAElement.cpp
@@ -44,17 +44,16 @@ NS_IMPL_ISUPPORTS_INHERITED5(SVGAElement
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGAElement::SVGAElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGAElementBase(aNodeInfo),
     Link(this)
 {
-  SetIsDOMBinding();
 }
 
 already_AddRefed<nsIDOMSVGAnimatedString>
 SVGAElement::Href()
 {
   return mStringAttributes[HREF].ToDOMAnimatedString(this);
 }
 
--- a/content/svg/content/src/SVGAElement.h
+++ b/content/svg/content/src/SVGAElement.h
@@ -15,36 +15,28 @@ nsresult NS_NewSVGAElement(nsIContent **
                            already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGGraphicsElement SVGAElementBase;
 
 class SVGAElement MOZ_FINAL : public SVGAElementBase,
-                              public nsIDOMSVGElement,
                               public nsILink,
                               public Link
 {
 protected:
   SVGAElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   friend nsresult (::NS_NewSVGAElement(nsIContent **aResult,
                                        already_AddRefed<nsINodeInfo> aNodeInfo));
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
-
   NS_DECL_ISUPPORTS_INHERITED
 
-  // XXX: I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGAElementBase::)
-
   // nsINode interface methods
   virtual nsresult PreHandleEvent(nsEventChainPreVisitor& aVisitor);
   virtual nsresult PostHandleEvent(nsEventChainPostVisitor& aVisitor);
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   // nsILink
   NS_IMETHOD LinkAdded() { return NS_OK; }
   NS_IMETHOD LinkRemoved() { return NS_OK; }
@@ -68,18 +60,16 @@ public:
     return SetAttr(aNameSpaceID, aName, nullptr, aValue, aNotify);
   }
   virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
                            nsIAtom* aPrefix, const nsAString& aValue,
                            bool aNotify);
   virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
                              bool aNotify);
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> Href();
   already_AddRefed<nsIDOMSVGAnimatedString> Target();
   void GetDownload(nsAString & aDownload);
   void SetDownload(const nsAString & aDownload, ErrorResult& rv);
 
 protected:
 
--- a/content/svg/content/src/SVGAltGlyphElement.cpp
+++ b/content/svg/content/src/SVGAltGlyphElement.cpp
@@ -32,17 +32,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGAltGlyph
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGAltGlyphElement::SVGAltGlyphElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGAltGlyphElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGAltGlyphElement)
 
 already_AddRefed<nsIDOMSVGAnimatedString>
--- a/content/svg/content/src/SVGAltGlyphElement.h
+++ b/content/svg/content/src/SVGAltGlyphElement.h
@@ -12,43 +12,33 @@
 nsresult NS_NewSVGAltGlyphElement(nsIContent **aResult,
                                   already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGTextPositioningElement SVGAltGlyphElementBase;
 
-class SVGAltGlyphElement MOZ_FINAL : public SVGAltGlyphElementBase,
-                                     public nsIDOMSVGElement
+class SVGAltGlyphElement MOZ_FINAL : public SVGAltGlyphElementBase
 {
 protected:
   friend nsresult (::NS_NewSVGAltGlyphElement(nsIContent **aResult,
                                               already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGAltGlyphElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx If xpcom allowed virtual inheritance we wouldn't need to
-  // forward here :-(
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGAltGlyphElementBase::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> Href();
   void GetGlyphRef(nsAString & aGlyphRef);
   void SetGlyphRef(const nsAString & aGlyphRef, ErrorResult& rv);
   void GetFormat(nsAString & aFormat);
   void SetFormat(const nsAString & aFormat, ErrorResult& rv);
 
 protected:
--- a/content/svg/content/src/SVGAnimateElement.h
+++ b/content/svg/content/src/SVGAnimateElement.h
@@ -10,42 +10,34 @@
 #include "nsSMILAnimationFunction.h"
 
 nsresult NS_NewSVGAnimateElement(nsIContent **aResult,
                                  already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGAnimateElement MOZ_FINAL : public SVGAnimationElement,
-                                    public nsIDOMSVGElement
+class SVGAnimateElement MOZ_FINAL : public SVGAnimationElement
 {
 protected:
   SVGAnimateElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
   nsSMILAnimationFunction mAnimationFunction;
   friend nsresult
     (::NS_NewSVGAnimateElement(nsIContent **aResult,
                                already_AddRefed<nsINodeInfo> aNodeInfo));
 
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGAnimationElement::)
-
   // nsIDOMNode
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   // SVGAnimationElement
   virtual nsSMILAnimationFunction& AnimationFunction();
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGAnimateElement_h
--- a/content/svg/content/src/SVGAnimateMotionElement.h
+++ b/content/svg/content/src/SVGAnimateMotionElement.h
@@ -10,37 +10,31 @@
 #include "SVGMotionSMILAnimationFunction.h"
 
 nsresult NS_NewSVGAnimateMotionElement(nsIContent **aResult,
                                        already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGAnimateMotionElement MOZ_FINAL : public SVGAnimationElement,
-                                          public nsIDOMSVGElement
+class SVGAnimateMotionElement MOZ_FINAL : public SVGAnimationElement
 {
 protected:
   SVGAnimateMotionElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
   SVGMotionSMILAnimationFunction mAnimationFunction;
   friend nsresult
     (::NS_NewSVGAnimateMotionElement(nsIContent **aResult,
                                      already_AddRefed<nsINodeInfo> aNodeInfo));
 
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGAnimationElement::)
-
   // nsIDOMNode specializations
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   // SVGAnimationElement
   virtual nsSMILAnimationFunction& AnimationFunction();
   virtual bool GetTargetAttributeName(int32_t *aNamespaceID,
                                       nsIAtom **aLocalName) const;
   virtual nsSMILTargetAttrType GetTargetAttributeType() const;
@@ -48,16 +42,14 @@ public:
   // nsSVGElement
   virtual nsIAtom* GetPathDataAttrName() const {
     return nsGkAtoms::path;
   }
 
   // Utility method to let our <mpath> children tell us when they've changed,
   // so we can make sure our mAnimationFunction is marked as having changed.
   void MpathChanged() { mAnimationFunction.MpathChanged(); }
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGAnimateMotionElement_h
--- a/content/svg/content/src/SVGAnimateTransformElement.h
+++ b/content/svg/content/src/SVGAnimateTransformElement.h
@@ -10,48 +10,40 @@
 #include "nsSMILAnimationFunction.h"
 
 nsresult NS_NewSVGAnimateTransformElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGAnimateTransformElement MOZ_FINAL : public SVGAnimationElement,
-                                             public nsIDOMSVGElement
+class SVGAnimateTransformElement MOZ_FINAL : public SVGAnimationElement
 {
 protected:
   SVGAnimateTransformElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
   nsSMILAnimationFunction mAnimationFunction;
   friend nsresult
     (::NS_NewSVGAnimateTransformElement(nsIContent **aResult,
                                         already_AddRefed<nsINodeInfo> aNodeInfo));
 
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGAnimationElement::)
-
   // nsIDOMNode specializations
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   // Element specializations
   bool ParseAttribute(int32_t aNamespaceID,
                         nsIAtom* aAttribute,
                         const nsAString& aValue,
                         nsAttrValue& aResult);
 
   // SVGAnimationElement
   virtual nsSMILAnimationFunction& AnimationFunction();
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGAnimateTransformElement_h
--- a/content/svg/content/src/SVGAnimationElement.cpp
+++ b/content/svg/content/src/SVGAnimationElement.cpp
@@ -48,17 +48,16 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 #endif
 SVGAnimationElement::SVGAnimationElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGAnimationElementBase(aNodeInfo),
     mHrefTarget(this)
 #ifdef _MSC_VER
 #pragma warning(pop)
 #endif
 {
-  SetIsDOMBinding();
 }
 
 nsresult
 SVGAnimationElement::Init()
 {
   nsresult rv = SVGAnimationElementBase::Init();
   NS_ENSURE_SUCCESS(rv, rv);
 
--- a/content/svg/content/src/SVGCircleElement.cpp
+++ b/content/svg/content/src/SVGCircleElement.cpp
@@ -34,17 +34,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGCircleEl
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGCircleElement::SVGCircleElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGCircleElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGCircleElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGCircleElement.h
+++ b/content/svg/content/src/SVGCircleElement.h
@@ -12,44 +12,35 @@
 nsresult NS_NewSVGCircleElement(nsIContent **aResult,
                                 already_AddRefed<nsINodeInfo> aNodeInfo);
 
 typedef nsSVGPathGeometryElement SVGCircleElementBase;
 
 namespace mozilla {
 namespace dom {
 
-class SVGCircleElement MOZ_FINAL : public SVGCircleElementBase,
-                                   public nsIDOMSVGElement
+class SVGCircleElement MOZ_FINAL : public SVGCircleElementBase
 {
 protected:
   SVGCircleElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
   friend nsresult (::NS_NewSVGCircleElement(nsIContent **aResult,
                                             already_AddRefed<nsINodeInfo> aNodeInfo));
 
 public:
-  // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGCircleElementBase::)
-
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const;
 
   // nsSVGPathGeometryElement methods:
   virtual void ConstructPath(gfxContext *aCtx);
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<SVGAnimatedLength> Cx();
   already_AddRefed<SVGAnimatedLength> Cy();
   already_AddRefed<SVGAnimatedLength> R();
 
 protected:
 
   virtual LengthAttributesInfo GetLengthInfo();
--- a/content/svg/content/src/SVGClipPathElement.cpp
+++ b/content/svg/content/src/SVGClipPathElement.cpp
@@ -36,17 +36,16 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGClipPath
                              nsIDOMSVGElement, nsIDOMSVGUnitTypes)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGClipPathElement::SVGClipPathElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGClipPathElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 already_AddRefed<nsIDOMSVGAnimatedEnumeration>
 SVGClipPathElement::ClipPathUnits()
 {
   nsCOMPtr<nsIDOMSVGAnimatedEnumeration> unit;
   mEnumAttributes[CLIPPATHUNITS].ToDOMAnimatedEnum(getter_AddRefs(unit), this);
   return unit.forget();
--- a/content/svg/content/src/SVGClipPathElement.h
+++ b/content/svg/content/src/SVGClipPathElement.h
@@ -16,41 +16,32 @@ nsresult NS_NewSVGClipPathElement(nsICon
                                   already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGTransformableElement SVGClipPathElementBase;
 
 class SVGClipPathElement MOZ_FINAL : public SVGClipPathElementBase,
-                                     public nsIDOMSVGElement,
                                      public nsIDOMSVGUnitTypes
 {
   friend class ::nsSVGClipPathFrame;
 
 protected:
   friend nsresult (::NS_NewSVGClipPathElement(nsIContent **aResult,
                                               already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGClipPathElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGClipPathElementBase::)
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> ClipPathUnits();
 
 protected:
 
   enum { CLIPPATHUNITS };
   nsSVGEnum mEnumAttributes[1];
   static EnumInfo sEnumInfo[1];
--- a/content/svg/content/src/SVGComponentTransferFunctionElement.h
+++ b/content/svg/content/src/SVGComponentTransferFunctionElement.h
@@ -25,17 +25,16 @@ namespace dom {
 typedef SVGFEUnstyledElement SVGComponentTransferFunctionElementBase;
 
 class SVGComponentTransferFunctionElement : public SVGComponentTransferFunctionElementBase
 {
 protected:
   SVGComponentTransferFunctionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGComponentTransferFunctionElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
 
 public:
   // interfaces:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_SVG_FE_COMPONENT_TRANSFER_FUNCTION_ELEMENT_CID)
 
   NS_DECL_ISUPPORTS_INHERITED
 
@@ -79,147 +78,118 @@ protected:
 } // namespace mozilla
 
 nsresult NS_NewSVGFEFuncRElement(
     nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGFEFuncRElement : public SVGComponentTransferFunctionElement,
-                          public nsIDOMSVGElement
+class SVGFEFuncRElement : public SVGComponentTransferFunctionElement
 {
   friend nsresult (::NS_NewSVGFEFuncRElement(
     nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEFuncRElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGComponentTransferFunctionElement(aNodeInfo) {}
 
 public:
-  // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual int32_t GetChannel() { return 0; }
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGComponentTransferFunctionElement::)
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   virtual JSObject*
   WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 nsresult NS_NewSVGFEFuncGElement(
   nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGFEFuncGElement : public SVGComponentTransferFunctionElement,
-                          public nsIDOMSVGElement
+class SVGFEFuncGElement : public SVGComponentTransferFunctionElement
 {
   friend nsresult (::NS_NewSVGFEFuncGElement(
     nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEFuncGElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGComponentTransferFunctionElement(aNodeInfo) {}
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual int32_t GetChannel() { return 1; }
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGComponentTransferFunctionElement::)
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   virtual JSObject*
   WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 nsresult NS_NewSVGFEFuncBElement(
   nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGFEFuncBElement : public SVGComponentTransferFunctionElement,
-                          public nsIDOMSVGElement
+class SVGFEFuncBElement : public SVGComponentTransferFunctionElement
 {
   friend nsresult (::NS_NewSVGFEFuncBElement(
     nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEFuncBElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGComponentTransferFunctionElement(aNodeInfo) {}
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual int32_t GetChannel() { return 2; }
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGComponentTransferFunctionElement::)
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   virtual JSObject*
   WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 nsresult NS_NewSVGFEFuncAElement(
   nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGFEFuncAElement : public SVGComponentTransferFunctionElement,
-                          public nsIDOMSVGElement
+class SVGFEFuncAElement : public SVGComponentTransferFunctionElement
 {
   friend nsresult (::NS_NewSVGFEFuncAElement(
     nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEFuncAElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGComponentTransferFunctionElement(aNodeInfo) {}
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual int32_t GetChannel() { return 3; }
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGComponentTransferFunctionElement::)
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   virtual JSObject*
   WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGComponentTransferFunctionElement_h
--- a/content/svg/content/src/SVGDefsElement.cpp
+++ b/content/svg/content/src/SVGDefsElement.cpp
@@ -25,17 +25,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGDefsElem
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGDefsElement::SVGDefsElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGGraphicsElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGDefsElement)
 
--- a/content/svg/content/src/SVGDefsElement.h
+++ b/content/svg/content/src/SVGDefsElement.h
@@ -9,39 +9,30 @@
 #include "SVGGraphicsElement.h"
 
 nsresult NS_NewSVGDefsElement(nsIContent **aResult,
                               already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGDefsElement MOZ_FINAL : public SVGGraphicsElement,
-                                 public nsIDOMSVGElement
+class SVGDefsElement MOZ_FINAL : public SVGGraphicsElement
 {
 protected:
   friend nsresult (::NS_NewSVGDefsElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGDefsElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGGraphicsElement::)
-
   // nsIContent
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGDefsElement_h
--- a/content/svg/content/src/SVGDescElement.cpp
+++ b/content/svg/content/src/SVGDescElement.cpp
@@ -25,17 +25,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGDescElem
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGDescElement::SVGDescElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGDescElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGDescElement)
 
 } // namespace dom
--- a/content/svg/content/src/SVGDescElement.h
+++ b/content/svg/content/src/SVGDescElement.h
@@ -11,38 +11,29 @@
 nsresult NS_NewSVGDescElement(nsIContent **aResult,
                               already_AddRefed<nsINodeInfo> aNodeInfo);
 
 typedef nsSVGElement SVGDescElementBase;
 
 namespace mozilla {
 namespace dom {
 
-class SVGDescElement MOZ_FINAL : public SVGDescElementBase,
-                                 public nsIDOMSVGElement
+class SVGDescElement MOZ_FINAL : public SVGDescElementBase
 {
 protected:
   friend nsresult (::NS_NewSVGDescElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGDescElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGDescElementBase::)
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGDescElement_h
 
--- a/content/svg/content/src/SVGEllipseElement.cpp
+++ b/content/svg/content/src/SVGEllipseElement.cpp
@@ -34,17 +34,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGEllipseE
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGEllipseElement::SVGEllipseElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGEllipseElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGEllipseElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGEllipseElement.h
+++ b/content/svg/content/src/SVGEllipseElement.h
@@ -12,44 +12,35 @@
 nsresult NS_NewSVGEllipseElement(nsIContent **aResult,
                                  already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGPathGeometryElement SVGEllipseElementBase;
 
-class SVGEllipseElement MOZ_FINAL : public SVGEllipseElementBase,
-                                    public nsIDOMSVGElement
+class SVGEllipseElement MOZ_FINAL : public SVGEllipseElementBase
 {
 protected:
   SVGEllipseElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
   friend nsresult (::NS_NewSVGEllipseElement(nsIContent **aResult,
                                              already_AddRefed<nsINodeInfo> aNodeInfo));
 
 public:
-  // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGEllipseElementBase::)
-
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const;
 
   // nsSVGPathGeometryElement methods:
   virtual void ConstructPath(gfxContext *aCtx);
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<SVGAnimatedLength> Cx();
   already_AddRefed<SVGAnimatedLength> Cy();
   already_AddRefed<SVGAnimatedLength> Rx();
   already_AddRefed<SVGAnimatedLength> Ry();
 
 protected:
 
--- a/content/svg/content/src/SVGFEBlendElement.h
+++ b/content/svg/content/src/SVGFEBlendElement.h
@@ -18,51 +18,42 @@ static const unsigned short SVG_FEBLEND_
 static const unsigned short SVG_FEBLEND_MODE_NORMAL = 1;
 static const unsigned short SVG_FEBLEND_MODE_MULTIPLY = 2;
 static const unsigned short SVG_FEBLEND_MODE_SCREEN = 3;
 static const unsigned short SVG_FEBLEND_MODE_DARKEN = 4;
 static const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5;
 
 typedef nsSVGFE SVGFEBlendElementBase;
 
-class SVGFEBlendElement : public SVGFEBlendElementBase,
-                          public nsIDOMSVGElement
+class SVGFEBlendElement : public SVGFEBlendElementBase
 {
   friend nsresult (::NS_NewSVGFEBlendElement(nsIContent **aResult,
                                              already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEBlendElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEBlendElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
                           const nsTArray<const Image*>& aSources,
                           const Image* aTarget,
                           const nsIntRect& aDataRect);
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
   virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEBlendElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedString> In2();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> Mode();
 
 protected:
 
   virtual EnumAttributesInfo GetEnumInfo();
--- a/content/svg/content/src/SVGFEColorMatrixElement.h
+++ b/content/svg/content/src/SVGFEColorMatrixElement.h
@@ -19,51 +19,42 @@ namespace dom {
 typedef nsSVGFE SVGFEColorMatrixElementBase;
 
 static const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
 static const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
 static const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
 static const unsigned short SVG_FECOLORMATRIX_TYPE_HUE_ROTATE = 3;
 static const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCE_TO_ALPHA = 4;
 
-class SVGFEColorMatrixElement : public SVGFEColorMatrixElementBase,
-                                public nsIDOMSVGElement
+class SVGFEColorMatrixElement : public SVGFEColorMatrixElementBase
 {
   friend nsresult (::NS_NewSVGFEColorMatrixElement(nsIContent **aResult,
                                                    already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEColorMatrixElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEColorMatrixElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
                           const nsTArray<const Image*>& aSources,
                           const Image* aTarget,
                           const nsIntRect& aDataRect);
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
   virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEColorMatrixElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> Type();
   already_AddRefed<DOMSVGAnimatedNumberList> Values();
 
  protected:
   virtual bool OperatesOnPremultipledAlpha(int32_t) { return false; }
 
--- a/content/svg/content/src/SVGFEComponentTransferElement.h
+++ b/content/svg/content/src/SVGFEComponentTransferElement.h
@@ -11,52 +11,43 @@
 typedef nsSVGFE SVGFEComponentTransferElementBase;
 
 nsresult NS_NewSVGFEComponentTransferElement(nsIContent **aResult,
                                              already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGFEComponentTransferElement : public SVGFEComponentTransferElementBase,
-                                      public nsIDOMSVGElement
+class SVGFEComponentTransferElement : public SVGFEComponentTransferElementBase
 {
   friend nsresult (::NS_NewSVGFEComponentTransferElement(nsIContent **aResult,
                                                          already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEComponentTransferElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEComponentTransferElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
                           const nsTArray<const Image*>& aSources,
                           const Image* aTarget,
                           const nsIntRect& aDataRect);
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
   virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEComponentTransferElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   // nsIContent
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
 
 protected:
   virtual bool OperatesOnPremultipledAlpha(int32_t) { return false; }
 
   virtual StringAttributesInfo GetStringInfo();
 
--- a/content/svg/content/src/SVGFECompositeElement.cpp
+++ b/content/svg/content/src/SVGFECompositeElement.cpp
@@ -61,19 +61,16 @@ NS_INTERFACE_TABLE_HEAD(SVGFECompositeEl
                            nsIDOMSVGElement)
 NS_INTERFACE_MAP_END_INHERITING(SVGFECompositeElementBase)
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFECompositeElement)
 
-//----------------------------------------------------------------------
-// SVGFECompositeElement methods
-
 already_AddRefed<nsIDOMSVGAnimatedString>
 SVGFECompositeElement::In1()
 {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
 already_AddRefed<nsIDOMSVGAnimatedString>
 SVGFECompositeElement::In2()
--- a/content/svg/content/src/SVGFECompositeElement.h
+++ b/content/svg/content/src/SVGFECompositeElement.h
@@ -22,26 +22,24 @@ static const unsigned short SVG_FECOMPOS
 static const unsigned short SVG_FECOMPOSITE_OPERATOR_IN = 2;
 static const unsigned short SVG_FECOMPOSITE_OPERATOR_OUT = 3;
 static const unsigned short SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
 static const unsigned short SVG_FECOMPOSITE_OPERATOR_XOR = 5;
 static const unsigned short SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
 
 typedef nsSVGFE SVGFECompositeElementBase;
 
-class SVGFECompositeElement : public SVGFECompositeElementBase,
-                              public nsIDOMSVGElement
+class SVGFECompositeElement : public SVGFECompositeElementBase
 {
   friend nsresult (::NS_NewSVGFECompositeElement(nsIContent **aResult,
                                                  already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFECompositeElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFECompositeElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
@@ -50,25 +48,19 @@ public:
                           const nsIntRect& aDataRect);
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
   virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFECompositeElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedString> In2();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> Operator();
   already_AddRefed<nsIDOMSVGAnimatedNumber> K1();
   already_AddRefed<nsIDOMSVGAnimatedNumber> K2();
   already_AddRefed<nsIDOMSVGAnimatedNumber> K3();
   already_AddRefed<nsIDOMSVGAnimatedNumber> K4();
--- a/content/svg/content/src/SVGFEConvolveMatrixElement.h
+++ b/content/svg/content/src/SVGFEConvolveMatrixElement.h
@@ -21,26 +21,24 @@ nsresult NS_NewSVGFEConvolveMatrixElemen
 namespace mozilla {
 class DOMSVGAnimatedNumberList;
 
 namespace dom {
 class SVGAnimatedBoolean;
 
 typedef nsSVGFE SVGFEConvolveMatrixElementBase;
 
-class SVGFEConvolveMatrixElement : public SVGFEConvolveMatrixElementBase,
-                                   public nsIDOMSVGElement
+class SVGFEConvolveMatrixElement : public SVGFEConvolveMatrixElementBase
 {
   friend nsresult (::NS_NewSVGFEConvolveMatrixElement(nsIContent **aResult,
                                                       already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEConvolveMatrixElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEConvolveMatrixElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
@@ -53,25 +51,19 @@ public:
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
   virtual void ComputeNeededSourceBBoxes(const nsIntRect& aTargetBBox,
           nsTArray<nsIntRect>& aSourceBBoxes, const nsSVGFilterInstance& aInstance);
   virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEConvolveMatrixElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedInteger> OrderX();
   already_AddRefed<nsIDOMSVGAnimatedInteger> OrderY();
   already_AddRefed<DOMSVGAnimatedNumberList> KernelMatrix();
   already_AddRefed<nsIDOMSVGAnimatedInteger> TargetX();
   already_AddRefed<nsIDOMSVGAnimatedInteger> TargetY();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> EdgeMode();
--- a/content/svg/content/src/SVGFEDiffuseLightingElement.h
+++ b/content/svg/content/src/SVGFEDiffuseLightingElement.h
@@ -11,44 +11,36 @@
 nsresult NS_NewSVGFEDiffuseLightingElement(nsIContent **aResult,
                                            already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFELightingElement SVGFEDiffuseLightingElementBase;
 
-class SVGFEDiffuseLightingElement : public SVGFEDiffuseLightingElementBase,
-                                    public nsIDOMSVGElement
+class SVGFEDiffuseLightingElement : public SVGFEDiffuseLightingElementBase
 {
   friend nsresult (::NS_NewSVGFEDiffuseLightingElement(nsIContent **aResult,
                                                        already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEDiffuseLightingElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEDiffuseLightingElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEDiffuseLightingElementBase::)
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedNumber> SurfaceScale();
   already_AddRefed<nsIDOMSVGAnimatedNumber> DiffuseConstant();
   already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthX();
   already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthY();
 
 protected:
--- a/content/svg/content/src/SVGFEDisplacementMapElement.h
+++ b/content/svg/content/src/SVGFEDisplacementMapElement.h
@@ -12,26 +12,24 @@
 nsresult NS_NewSVGFEDisplacementMapElement(nsIContent **aResult,
                                            already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFE SVGFEDisplacementMapElementBase;
 
-class SVGFEDisplacementMapElement : public SVGFEDisplacementMapElementBase,
-                                    public nsIDOMSVGElement
+class SVGFEDisplacementMapElement : public SVGFEDisplacementMapElementBase
 {
 protected:
   friend nsresult (::NS_NewSVGFEDisplacementMapElement(nsIContent **aResult,
                                                        already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGFEDisplacementMapElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEDisplacementMapElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
@@ -44,25 +42,19 @@ public:
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
   virtual void ComputeNeededSourceBBoxes(const nsIntRect& aTargetBBox,
           nsTArray<nsIntRect>& aSourceBBoxes, const nsSVGFilterInstance& aInstance);
   virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEDisplacementMapElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedString> In2();
   already_AddRefed<nsIDOMSVGAnimatedNumber> Scale();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> XChannelSelector();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> YChannelSelector();
 
 protected:
--- a/content/svg/content/src/SVGFEDistantLightElement.cpp
+++ b/content/svg/content/src/SVGFEDistantLightElement.cpp
@@ -34,17 +34,16 @@ NS_INTERFACE_TABLE_HEAD(SVGFEDistantLigh
                            nsIDOMElement, nsIDOMSVGElement)
 NS_INTERFACE_MAP_END_INHERITING(SVGFEDistantLightElementBase)
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDistantLightElement)
 
-//----------------------------------------------------------------------
 // nsFEUnstyledElement methods
 
 bool
 SVGFEDistantLightElement::AttributeAffectsRendering(int32_t aNameSpaceID,
                                                     nsIAtom* aAttribute) const
 {
   return aNameSpaceID == kNameSpaceID_None &&
          (aAttribute == nsGkAtoms::azimuth ||
--- a/content/svg/content/src/SVGFEDistantLightElement.h
+++ b/content/svg/content/src/SVGFEDistantLightElement.h
@@ -12,44 +12,36 @@
 typedef SVGFEUnstyledElement SVGFEDistantLightElementBase;
 
 nsresult NS_NewSVGFEDistantLightElement(nsIContent **aResult,
                                         already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGFEDistantLightElement : public SVGFEDistantLightElementBase,
-                                 public nsIDOMSVGElement
+class SVGFEDistantLightElement : public SVGFEDistantLightElementBase
 {
   friend nsresult (::NS_NewSVGFEDistantLightElement(nsIContent **aResult,
                                                     already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEDistantLightElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEDistantLightElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEDistantLightElementBase::)
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedNumber> Azimuth();
   already_AddRefed<nsIDOMSVGAnimatedNumber> Elevation();
 
 protected:
   virtual NumberAttributesInfo GetNumberInfo();
 
   enum { AZIMUTH, ELEVATION };
--- a/content/svg/content/src/SVGFEFloodElement.h
+++ b/content/svg/content/src/SVGFEFloodElement.h
@@ -11,26 +11,24 @@
 nsresult NS_NewSVGFEFloodElement(nsIContent **aResult,
                                  already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFE SVGFEFloodElementBase;
 
-class SVGFEFloodElement : public SVGFEFloodElementBase,
-                          public nsIDOMSVGElement
+class SVGFEFloodElement : public SVGFEFloodElementBase
 {
   friend nsresult (::NS_NewSVGFEFloodElement(nsIContent **aResult,
                                              already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEFloodElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEFloodElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   virtual bool SubregionIsUnionOfRegions() { return false; }
 
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
@@ -38,27 +36,21 @@ public:
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
                           const nsTArray<const Image*>& aSources,
                           const Image* aTarget,
                           const nsIntRect& aDataRect);
   virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEFloodElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 protected:
   virtual bool OperatesOnSRGB(nsSVGFilterInstance*,
                               int32_t, Image*) { return true; }
 
   virtual StringAttributesInfo GetStringInfo();
 
   enum { RESULT };
   nsSVGString mStringAttributes[1];
--- a/content/svg/content/src/SVGFEGaussianBlurElement.cpp
+++ b/content/svg/content/src/SVGFEGaussianBlurElement.cpp
@@ -39,20 +39,18 @@ NS_IMPL_RELEASE_INHERITED(SVGFEGaussianB
 NS_INTERFACE_TABLE_HEAD(SVGFEGaussianBlurElement)
   NS_NODE_INTERFACE_TABLE3(SVGFEGaussianBlurElement, nsIDOMNode,
                            nsIDOMElement, nsIDOMSVGElement)
 NS_INTERFACE_MAP_END_INHERITING(SVGFEGaussianBlurElementBase)
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
-
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEGaussianBlurElement)
 
-
 //----------------------------------------------------------------------
 
 already_AddRefed<nsIDOMSVGAnimatedString>
 SVGFEGaussianBlurElement::In1()
 {
   return mStringAttributes[IN1].ToDOMAnimatedString(this);
 }
 
--- a/content/svg/content/src/SVGFEGaussianBlurElement.h
+++ b/content/svg/content/src/SVGFEGaussianBlurElement.h
@@ -13,26 +13,24 @@
 nsresult NS_NewSVGFEGaussianBlurElement(nsIContent **aResult,
                                         already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFE SVGFEGaussianBlurElementBase;
 
-class SVGFEGaussianBlurElement : public SVGFEGaussianBlurElementBase,
-                                 public nsIDOMSVGElement
+class SVGFEGaussianBlurElement : public SVGFEGaussianBlurElementBase
 {
   friend nsresult (::NS_NewSVGFEGaussianBlurElement(nsIContent **aResult,
                                                     already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEGaussianBlurElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEGaussianBlurElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
@@ -45,25 +43,19 @@ public:
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo >& aSources);
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
   virtual void ComputeNeededSourceBBoxes(const nsIntRect& aTargetBBox,
           nsTArray<nsIntRect>& aSourceBBoxes, const nsSVGFilterInstance& aInstance);
   virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEGaussianBlurElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedNumber> StdDeviationX();
   already_AddRefed<nsIDOMSVGAnimatedNumber> StdDeviationY();
   void SetStdDeviation(float stdDeviationX, float stdDeviationY);
 
 protected:
   virtual NumberPairAttributesInfo GetNumberPairInfo();
--- a/content/svg/content/src/SVGFEImageElement.cpp
+++ b/content/svg/content/src/SVGFEImageElement.cpp
@@ -41,17 +41,16 @@ NS_INTERFACE_TABLE_HEAD(SVGFEImageElemen
 NS_INTERFACE_MAP_END_INHERITING(SVGFEImageElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGFEImageElement::SVGFEImageElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGFEImageElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
   // We start out broken
   AddStatesSilently(NS_EVENT_STATE_BROKEN);
 }
 
 SVGFEImageElement::~SVGFEImageElement()
 {
   DestroyImageLoadingContent();
 }
--- a/content/svg/content/src/SVGFEImageElement.h
+++ b/content/svg/content/src/SVGFEImageElement.h
@@ -14,17 +14,16 @@ nsresult NS_NewSVGFEImageElement(nsICont
                                  already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFE SVGFEImageElementBase;
 
 class SVGFEImageElement : public SVGFEImageElementBase,
-                          public nsIDOMSVGElement,
                           public nsImageLoadingContent
 {
   friend class ::SVGFEImageFrame;
 
 protected:
   friend nsresult (::NS_NewSVGFEImageElement(nsIContent **aResult,
                                              already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGFEImageElement(already_AddRefed<nsINodeInfo> aNodeInfo);
@@ -42,21 +41,16 @@ public:
                           const Image* aTarget,
                           const nsIntRect& aDataRect);
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
   virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEImageElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   // nsIContent
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
                                 const nsAttrValue* aValue, bool aNotify);
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
@@ -64,18 +58,16 @@ public:
                               bool aCompileEventHandlers);
   virtual void UnbindFromTree(bool aDeep, bool aNullParent);
   virtual nsEventStates IntrinsicState() const;
 
   NS_IMETHODIMP Notify(imgIRequest *aRequest, int32_t aType, const nsIntRect* aData);
 
   void MaybeLoadSVGImage();
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> Href();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
 
 private:
   // Invalidate users of the filter containing this element.
   void Invalidate();
 
--- a/content/svg/content/src/SVGFEMergeElement.h
+++ b/content/svg/content/src/SVGFEMergeElement.h
@@ -11,49 +11,40 @@
 nsresult NS_NewSVGFEMergeElement(nsIContent **aResult,
                                  already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFE SVGFEMergeElementBase;
 
-class SVGFEMergeElement : public SVGFEMergeElementBase,
-                          public nsIDOMSVGElement
+class SVGFEMergeElement : public SVGFEMergeElementBase
 {
   friend nsresult (::NS_NewSVGFEMergeElement(nsIContent **aResult,
                                              already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEMergeElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEMergeElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
                           const nsTArray<const Image*>& aSources,
                           const Image* aTarget,
                           const nsIntRect& aDataRect);
   virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEMergeElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   // nsIContent
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 protected:
   virtual StringAttributesInfo GetStringInfo();
 
   enum { RESULT };
   nsSVGString mStringAttributes[1];
   static StringInfo sStringInfo[1];
 };
 
--- a/content/svg/content/src/SVGFEMergeNodeElement.h
+++ b/content/svg/content/src/SVGFEMergeNodeElement.h
@@ -11,46 +11,36 @@
 nsresult NS_NewSVGFEMergeNodeElement(nsIContent** aResult,
                                      already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGFEUnstyledElement SVGFEMergeNodeElementBase;
 
-class SVGFEMergeNodeElement : public SVGFEMergeNodeElementBase,
-                              public nsIDOMSVGElement
+class SVGFEMergeNodeElement : public SVGFEMergeNodeElementBase
 {
   friend nsresult (::NS_NewSVGFEMergeNodeElement(nsIContent **aResult,
                                                  already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEMergeNodeElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEMergeNodeElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEMergeNodeElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
 
   const nsSVGString* GetIn1() { return &mStringAttributes[IN1]; }
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
 
 protected:
   virtual StringAttributesInfo GetStringInfo();
 
   enum { IN1 };
   nsSVGString mStringAttributes[1];
--- a/content/svg/content/src/SVGFEMorphologyElement.h
+++ b/content/svg/content/src/SVGFEMorphologyElement.h
@@ -14,26 +14,24 @@
 nsresult NS_NewSVGFEMorphologyElement(nsIContent **aResult,
                                       already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFE SVGFEMorphologyElementBase;
 
-class SVGFEMorphologyElement : public SVGFEMorphologyElementBase,
-                               public nsIDOMSVGElement
+class SVGFEMorphologyElement : public SVGFEMorphologyElementBase
 {
   friend nsresult (::NS_NewSVGFEMorphologyElement(nsIContent **aResult,
                                                   already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEMorphologyElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEMorphologyElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
@@ -46,25 +44,18 @@ public:
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
   virtual void ComputeNeededSourceBBoxes(const nsIntRect& aTargetBBox,
           nsTArray<nsIntRect>& aSourceBBoxes, const nsSVGFilterInstance& aInstance);
   virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEMorphologyElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> Operator();
   already_AddRefed<nsIDOMSVGAnimatedNumber> RadiusX();
   already_AddRefed<nsIDOMSVGAnimatedNumber> RadiusY();
   void SetRadius(float rx, float ry);
 
 protected:
--- a/content/svg/content/src/SVGFEOffsetElement.h
+++ b/content/svg/content/src/SVGFEOffsetElement.h
@@ -13,26 +13,24 @@
 nsresult NS_NewSVGFEOffsetElement(nsIContent **aResult,
                                   already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFE SVGFEOffsetElementBase;
 
-class SVGFEOffsetElement : public SVGFEOffsetElementBase,
-                           public nsIDOMSVGElement
+class SVGFEOffsetElement : public SVGFEOffsetElementBase
 {
   friend nsresult (::NS_NewSVGFEOffsetElement(nsIContent **aResult,
                                               already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEOffsetElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEOffsetElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
@@ -45,25 +43,18 @@ public:
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
   virtual void ComputeNeededSourceBBoxes(const nsIntRect& aTargetBBox,
           nsTArray<nsIntRect>& aSourceBBoxes, const nsSVGFilterInstance& aInstance);
   virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEOffsetElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedNumber> Dx();
   already_AddRefed<nsIDOMSVGAnimatedNumber> Dy();
 
 protected:
   nsIntPoint GetOffset(const nsSVGFilterInstance& aInstance);
 
--- a/content/svg/content/src/SVGFEPointLightElement.h
+++ b/content/svg/content/src/SVGFEPointLightElement.h
@@ -12,44 +12,36 @@
 typedef SVGFEUnstyledElement SVGFEPointLightElementBase;
 
 nsresult NS_NewSVGFEPointLightElement(nsIContent **aResult,
                                       already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGFEPointLightElement : public SVGFEPointLightElementBase,
-                               public nsIDOMSVGElement
+class SVGFEPointLightElement : public SVGFEPointLightElementBase
 {
   friend nsresult (::NS_NewSVGFEPointLightElement(nsIContent **aResult,
                                                   already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFEPointLightElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFEPointLightElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFEPointLightElementBase::)
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedNumber> X();
   already_AddRefed<nsIDOMSVGAnimatedNumber> Y();
   already_AddRefed<nsIDOMSVGAnimatedNumber> Z();
 
 protected:
   virtual NumberAttributesInfo GetNumberInfo();
 
--- a/content/svg/content/src/SVGFESpecularLightingElement.h
+++ b/content/svg/content/src/SVGFESpecularLightingElement.h
@@ -13,48 +13,40 @@ nsresult NS_NewSVGFESpecularLightingElem
 
 namespace mozilla {
 namespace dom {
 
 //---------------------SpecularLighting------------------------
 
 typedef nsSVGFELightingElement SVGFESpecularLightingElementBase;
 
-class SVGFESpecularLightingElement : public SVGFESpecularLightingElementBase,
-                                     public nsIDOMSVGElement
+class SVGFESpecularLightingElement : public SVGFESpecularLightingElementBase
 {
   friend nsresult (::NS_NewSVGFESpecularLightingElement(nsIContent **aResult,
                                                         already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFESpecularLightingElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFESpecularLightingElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFESpecularLightingElementBase::)
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsresult Filter(nsSVGFilterInstance* aInstance,
                           const nsTArray<const Image*>& aSources,
                           const Image* aTarget,
                           const nsIntRect& aDataRect);
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
   already_AddRefed<nsIDOMSVGAnimatedNumber> SurfaceScale();
   already_AddRefed<nsIDOMSVGAnimatedNumber> SpecularConstant();
   already_AddRefed<nsIDOMSVGAnimatedNumber> SpecularExponent();
   already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthX();
   already_AddRefed<nsIDOMSVGAnimatedNumber> KernelUnitLengthY();
 
--- a/content/svg/content/src/SVGFESpotLightElement.h
+++ b/content/svg/content/src/SVGFESpotLightElement.h
@@ -14,45 +14,37 @@ class nsSVGFELightingElement;
 nsresult NS_NewSVGFESpotLightElement(nsIContent **aResult,
                                      already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGFEUnstyledElement SVGFESpotLightElementBase;
 
-class SVGFESpotLightElement : public SVGFESpotLightElementBase,
-                              public nsIDOMSVGElement
+class SVGFESpotLightElement : public SVGFESpotLightElementBase
 {
   friend nsresult (::NS_NewSVGFESpotLightElement(nsIContent **aResult,
                                                  already_AddRefed<nsINodeInfo> aNodeInfo));
   friend class ::nsSVGFELightingElement;
 protected:
   SVGFESpotLightElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFESpotLightElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFESpotLightElementBase::)
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // 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();
--- a/content/svg/content/src/SVGFETileElement.h
+++ b/content/svg/content/src/SVGFETileElement.h
@@ -11,26 +11,24 @@
 nsresult NS_NewSVGFETileElement(nsIContent **aResult,
                                 already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFE SVGFETileElementBase;
 
-class SVGFETileElement : public SVGFETileElementBase,
-                         public nsIDOMSVGElement
+class SVGFETileElement : public SVGFETileElementBase
 {
   friend nsresult (::NS_NewSVGFETileElement(nsIContent **aResult,
                                             already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFETileElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFETileElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   virtual bool SubregionIsUnionOfRegions() { return false; }
 
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
@@ -45,25 +43,18 @@ public:
   virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
   virtual void ComputeNeededSourceBBoxes(const nsIntRect& aTargetBBox,
           nsTArray<nsIntRect>& aSourceBBoxes, const nsSVGFilterInstance& aInstance);
   virtual nsIntRect ComputeChangeBBox(const nsTArray<nsIntRect>& aSourceChangeBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFETileElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> In1();
 
 protected:
   virtual StringAttributesInfo GetStringInfo();
 
   enum { RESULT, IN1 };
   nsSVGString mStringAttributes[2];
--- a/content/svg/content/src/SVGFETurbulenceElement.h
+++ b/content/svg/content/src/SVGFETurbulenceElement.h
@@ -15,26 +15,24 @@
 nsresult NS_NewSVGFETurbulenceElement(nsIContent **aResult,
                                       already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGFE SVGFETurbulenceElementBase;
 
-class SVGFETurbulenceElement : public SVGFETurbulenceElementBase,
-                               public nsIDOMSVGElement
+class SVGFETurbulenceElement : public SVGFETurbulenceElementBase
 {
   friend nsresult (::NS_NewSVGFETurbulenceElement(nsIContent **aResult,
                                                   already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGFETurbulenceElement(already_AddRefed<nsINodeInfo> aNodeInfo)
     : SVGFETurbulenceElementBase(aNodeInfo)
   {
-    SetIsDOMBinding();
   }
   virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
 
 public:
   virtual bool SubregionIsUnionOfRegions() { return false; }
 
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
@@ -44,25 +42,18 @@ public:
                           const Image* aTarget,
                           const nsIntRect& aDataRect);
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
   virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
   virtual nsIntRect ComputeTargetBBox(const nsTArray<nsIntRect>& aSourceBBoxes,
           const nsSVGFilterInstance& aInstance);
 
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFETurbulenceElementBase::)
-
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyX();
   already_AddRefed<nsIDOMSVGAnimatedNumber> BaseFrequencyY();
   already_AddRefed<nsIDOMSVGAnimatedInteger> NumOctaves();
   already_AddRefed<nsIDOMSVGAnimatedNumber> Seed();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> StitchTiles();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> Type();
 
--- a/content/svg/content/src/SVGFilterElement.cpp
+++ b/content/svg/content/src/SVGFilterElement.cpp
@@ -60,17 +60,16 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGFilterEl
                              nsIDOMSVGElement, nsIDOMSVGUnitTypes)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGFilterElement::SVGFilterElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGFilterElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFilterElement)
 
--- a/content/svg/content/src/SVGFilterElement.h
+++ b/content/svg/content/src/SVGFilterElement.h
@@ -21,47 +21,38 @@ class nsAutoFilterInstance;
 nsresult NS_NewSVGFilterElement(nsIContent **aResult,
                                 already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 class SVGAnimatedLength;
 
 class SVGFilterElement : public SVGFilterElementBase,
-                         public nsIDOMSVGElement,
                          public nsIDOMSVGUnitTypes
 {
   friend class ::nsSVGFilterFrame;
   friend class ::nsAutoFilterInstance;
 
 protected:
   friend nsresult (::NS_NewSVGFilterElement(nsIContent **aResult,
                                             already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGFilterElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGFilterElementBase::)
-
   // nsIContent
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   // Invalidate users of this filter
   void Invalidate();
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const;
 
   // WebIDL
   already_AddRefed<SVGAnimatedLength> X();
   already_AddRefed<SVGAnimatedLength> Y();
   already_AddRefed<SVGAnimatedLength> Width();
   already_AddRefed<SVGAnimatedLength> Height();
--- a/content/svg/content/src/SVGForeignObjectElement.cpp
+++ b/content/svg/content/src/SVGForeignObjectElement.cpp
@@ -36,17 +36,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGForeignO
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGForeignObjectElement::SVGForeignObjectElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGGraphicsElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGForeignObjectElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGForeignObjectElement.h
+++ b/content/svg/content/src/SVGForeignObjectElement.h
@@ -12,49 +12,40 @@
 nsresult NS_NewSVGForeignObjectElement(nsIContent **aResult,
                                        already_AddRefed<nsINodeInfo> aNodeInfo);
 
 class nsSVGForeignObjectFrame;
 
 namespace mozilla {
 namespace dom {
 
-class SVGForeignObjectElement MOZ_FINAL : public SVGGraphicsElement,
-                                          public nsIDOMSVGElement
+class SVGForeignObjectElement MOZ_FINAL : public SVGGraphicsElement
 {
   friend class ::nsSVGForeignObjectFrame;
 
 protected:
   friend nsresult (::NS_NewSVGForeignObjectElement(nsIContent **aResult,
                                                    already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGForeignObjectElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGGraphicsElement::)
-
   // nsSVGElement specializations:
   virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix,
                       TransformTypes aWhich = eAllTransforms) const;
   virtual bool HasValidDimensions() const;
 
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<SVGAnimatedLength> X();
   already_AddRefed<SVGAnimatedLength> Y();
   already_AddRefed<SVGAnimatedLength> Width();
   already_AddRefed<SVGAnimatedLength> Height();
 
 protected:
 
--- a/content/svg/content/src/SVGGElement.cpp
+++ b/content/svg/content/src/SVGGElement.cpp
@@ -25,17 +25,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGGElement
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGGElement::SVGGElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGGraphicsElement(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGGElement)
--- a/content/svg/content/src/SVGGElement.h
+++ b/content/svg/content/src/SVGGElement.h
@@ -9,39 +9,30 @@
 #include "mozilla/dom/SVGGraphicsElement.h"
 
 nsresult NS_NewSVGGElement(nsIContent **aResult,
                            already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGGElement MOZ_FINAL : public SVGGraphicsElement,
-                              public nsIDOMSVGElement
+class SVGGElement MOZ_FINAL : public SVGGraphicsElement
 {
 protected:
   SVGGElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
   friend nsresult (::NS_NewSVGGElement(nsIContent **aResult,
                                        already_AddRefed<nsINodeInfo> aNodeInfo));
 
 public:
-  // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGGraphicsElement::)
-
   // nsIContent
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGGElement_h
--- a/content/svg/content/src/SVGGradientElement.cpp
+++ b/content/svg/content/src/SVGGradientElement.cpp
@@ -57,17 +57,16 @@ NS_INTERFACE_MAP_BEGIN(SVGGradientElemen
 NS_INTERFACE_MAP_END_INHERITING(SVGGradientElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGGradientElement::SVGGradientElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGGradientElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsSVGElement methods
 
 nsSVGElement::EnumAttributesInfo
 SVGGradientElement::GetEnumInfo()
 {
--- a/content/svg/content/src/SVGGradientElement.h
+++ b/content/svg/content/src/SVGGradientElement.h
@@ -85,42 +85,32 @@ protected:
   nsAutoPtr<SVGAnimatedTransformList> mGradientTransform;
 };
 
 //---------------------Linear Gradients------------------------
 
 typedef SVGGradientElement SVGLinearGradientElementBase;
 
 class SVGLinearGradientElement : public SVGLinearGradientElementBase
-                               , 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) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  // 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 nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<SVGAnimatedLength> X1();
   already_AddRefed<SVGAnimatedLength> Y1();
   already_AddRefed<SVGAnimatedLength> X2();
   already_AddRefed<SVGAnimatedLength> Y2();
 
 protected:
 
@@ -131,42 +121,33 @@ protected:
   static LengthInfo sLengthInfo[4];
 };
 
 //-------------------------- Radial Gradients ----------------------------
 
 typedef SVGGradientElement SVGRadialGradientElementBase;
 
 class SVGRadialGradientElement : public SVGRadialGradientElementBase
-                               , 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) MOZ_OVERRIDE;
 
 public:
-  // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // 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 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:
 
--- a/content/svg/content/src/SVGImageElement.cpp
+++ b/content/svg/content/src/SVGImageElement.cpp
@@ -48,17 +48,16 @@ NS_IMPL_ISUPPORTS_INHERITED6(SVGImageEle
                              nsIImageLoadingContent, imgIOnloadBlocker)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGImageElement::SVGImageElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGImageElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
   // We start out broken
   AddStatesSilently(NS_EVENT_STATE_BROKEN);
 }
 
 SVGImageElement::~SVGImageElement()
 {
   DestroyImageLoadingContent();
 }
--- a/content/svg/content/src/SVGImageElement.h
+++ b/content/svg/content/src/SVGImageElement.h
@@ -19,38 +19,32 @@ typedef nsSVGPathGeometryElement SVGImag
 
 class nsSVGImageFrame;
 
 namespace mozilla {
 namespace dom {
 class DOMSVGAnimatedPreserveAspectRatio;
 
 class SVGImageElement : public SVGImageElementBase,
-                        public nsIDOMSVGElement,
                         public nsImageLoadingContent
 {
   friend class ::nsSVGImageFrame;
 
 protected:
   SVGImageElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual ~SVGImageElement();
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
   friend nsresult (::NS_NewSVGImageElement(nsIContent **aResult,
                                            already_AddRefed<nsINodeInfo> aNodeInfo));
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGImageElementBase::)
-
   // nsIContent interface
   virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
                                 const nsAttrValue* aValue, bool aNotify);
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers);
   virtual void UnbindFromTree(bool aDeep, bool aNullParent);
 
@@ -67,18 +61,16 @@ public:
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   nsresult CopyInnerTo(mozilla::dom::Element* aDest);
 
   void MaybeLoadSVGImage();
 
   bool IsImageSrcSetDisabled() const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<SVGAnimatedLength> X();
   already_AddRefed<SVGAnimatedLength> Y();
   already_AddRefed<SVGAnimatedLength> Width();
   already_AddRefed<SVGAnimatedLength> Height();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
   already_AddRefed<nsIDOMSVGAnimatedString> Href();
 
--- a/content/svg/content/src/SVGLineElement.cpp
+++ b/content/svg/content/src/SVGLineElement.cpp
@@ -34,17 +34,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGLineElem
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGLineElement::SVGLineElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGLineElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGLineElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGLineElement.h
+++ b/content/svg/content/src/SVGLineElement.h
@@ -12,46 +12,38 @@
 nsresult NS_NewSVGLineElement(nsIContent **aResult,
                               already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGPathGeometryElement SVGLineElementBase;
 
-class SVGLineElement MOZ_FINAL : public SVGLineElementBase,
-                                 public nsIDOMSVGElement
+class SVGLineElement MOZ_FINAL : public SVGLineElementBase
 {
 protected:
   SVGLineElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
   friend nsresult (::NS_NewSVGLineElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo));
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGLineElementBase::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;
 
   // nsSVGPathGeometryElement methods:
   virtual bool IsMarkable() { return true; }
   virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks);
   virtual void ConstructPath(gfxContext *aCtx);
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<SVGAnimatedLength> X1();
   already_AddRefed<SVGAnimatedLength> Y1();
   already_AddRefed<SVGAnimatedLength> X2();
   already_AddRefed<SVGAnimatedLength> Y2();
 
 protected:
 
--- a/content/svg/content/src/SVGMPathElement.cpp
+++ b/content/svg/content/src/SVGMPathElement.cpp
@@ -61,17 +61,16 @@ NS_INTERFACE_MAP_END_INHERITING(SVGMPath
 #endif
 SVGMPathElement::SVGMPathElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGMPathElementBase(aNodeInfo),
     mHrefTarget(this)
 #ifdef _MSC_VER
 #pragma warning(pop)
 #endif
 {
-  SetIsDOMBinding();
 }
 
 SVGMPathElement::~SVGMPathElement()
 {
   UnlinkHrefTarget(false);
 }
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGMPathElement.h
+++ b/content/svg/content/src/SVGMPathElement.h
@@ -16,17 +16,16 @@ nsresult NS_NewSVGMPathElement(nsIConten
 
 typedef nsSVGElement SVGMPathElementBase;
 
 namespace mozilla {
 namespace dom {
 class SVGPathElement;
 
 class SVGMPathElement MOZ_FINAL : public SVGMPathElementBase,
-                                  public nsIDOMSVGElement,
                                   public nsStubMutationObserver
 {
 protected:
   friend nsresult (::NS_NewSVGMPathElement(nsIContent **aResult,
                                            already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGMPathElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   ~SVGMPathElement();
 
@@ -36,21 +35,16 @@ public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SVGMPathElement,
                                            SVGMPathElementBase)
 
   NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
 
-  // Forward interface implementations to base class
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGMPathElementBase::)
-
   // nsIContent interface
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers);
   virtual void UnbindFromTree(bool aDeep, bool aNullParent);
 
   virtual nsresult UnsetAttr(int32_t aNamespaceID, nsIAtom* aAttribute,
@@ -61,18 +55,16 @@ public:
                                 const nsAString& aValue,
                                 nsAttrValue& aResult);
 
   // Public helper method: If our xlink:href attribute links to a <path>
   // element, this method returns a pointer to that element. Otherwise,
   // this returns nullptr.
   SVGPathElement* GetReferencedPath();
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> Href();
 
 protected:
   class PathReference : public nsReferencedElement {
   public:
     PathReference(SVGMPathElement* aMpathElement) :
       mMpathElement(aMpathElement) {}
--- a/content/svg/content/src/SVGMarkerElement.cpp
+++ b/content/svg/content/src/SVGMarkerElement.cpp
@@ -96,17 +96,16 @@ nsSVGOrientType::ToDOMAnimatedEnum(nsSVG
   nsCOMPtr<nsIDOMSVGAnimatedEnumeration> toReturn =
     new DOMAnimatedEnum(this, aSVGElement);
   return toReturn.forget();
 }
 
 SVGMarkerElement::SVGMarkerElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGMarkerElementBase(aNodeInfo), mCoordCtx(nullptr)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGMarkerElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGMarkerElement.h
+++ b/content/svg/content/src/SVGMarkerElement.h
@@ -81,37 +81,31 @@ private:
       { return mVal->SetBaseValue(aValue, mSVGElement); }
     NS_IMETHOD GetAnimVal(uint16_t* aResult)
       { *aResult = mVal->GetAnimValue(); return NS_OK; }
   };
 };
 
 typedef nsSVGElement SVGMarkerElementBase;
 
-class SVGMarkerElement : public SVGMarkerElementBase,
-                         public nsIDOMSVGElement
+class SVGMarkerElement : public SVGMarkerElementBase
 {
   friend class ::nsSVGMarkerFrame;
 
 protected:
   friend nsresult (::NS_NewSVGMarkerElement(nsIContent **aResult,
                                             already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGMarkerElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;
 
   virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
                              bool aNotify);
 
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const;
@@ -121,18 +115,16 @@ public:
                                float aX, float aY, float aAutoAngle);
   nsSVGViewBoxRect GetViewBoxRect();
   gfxMatrix GetViewBoxTransform();
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   nsSVGOrientType* GetOrientType() { return &mOrientType; }
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedRect> ViewBox();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
   already_AddRefed<SVGAnimatedLength> RefX();
   already_AddRefed<SVGAnimatedLength> RefY();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> MarkerUnits();
   already_AddRefed<SVGAnimatedLength> MarkerWidth();
   already_AddRefed<SVGAnimatedLength> MarkerHeight();
--- a/content/svg/content/src/SVGMaskElement.cpp
+++ b/content/svg/content/src/SVGMaskElement.cpp
@@ -51,17 +51,16 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGMaskElem
                              nsIDOMSVGElement, nsIDOMSVGUnitTypes)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGMaskElement::SVGMaskElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGMaskElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode method
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGMaskElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGMaskElement.h
+++ b/content/svg/content/src/SVGMaskElement.h
@@ -19,41 +19,34 @@ nsresult NS_NewSVGMaskElement(nsIContent
 namespace mozilla {
 namespace dom {
 
 //--------------------- Masks ------------------------
 
 typedef nsSVGElement SVGMaskElementBase;
 
 class SVGMaskElement MOZ_FINAL : public SVGMaskElementBase,
-                                 public nsIDOMSVGElement,
                                  public nsIDOMSVGUnitTypes
 {
   friend class ::nsSVGMaskFrame;
 
 protected:
   friend nsresult (::NS_NewSVGMaskElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGMaskElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
-
   // nsIContent interface
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const;
 
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> MaskUnits();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> MaskContentUnits();
   already_AddRefed<SVGAnimatedLength> X();
   already_AddRefed<SVGAnimatedLength> Y();
--- a/content/svg/content/src/SVGMetadataElement.cpp
+++ b/content/svg/content/src/SVGMetadataElement.cpp
@@ -26,17 +26,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGMetadata
 
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGMetadataElement::SVGMetadataElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGMetadataElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 
 nsresult
 SVGMetadataElement::Init()
 {
   return NS_OK;
 }
--- a/content/svg/content/src/SVGMetadataElement.h
+++ b/content/svg/content/src/SVGMetadataElement.h
@@ -11,38 +11,30 @@
 nsresult NS_NewSVGMetadataElement(nsIContent **aResult,
                                   already_AddRefed<nsINodeInfo> aNodeInfo);
 
 typedef nsSVGElement SVGMetadataElementBase;
 
 namespace mozilla {
 namespace dom {
 
-class SVGMetadataElement MOZ_FINAL : public SVGMetadataElementBase,
-                                     public nsIDOMSVGElement
+class SVGMetadataElement MOZ_FINAL : public SVGMetadataElementBase
 {
 protected:
   friend nsresult (::NS_NewSVGMetadataElement(nsIContent **aResult,
                                               already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGMetadataElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
   nsresult Init();
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGMetadataElement_h
--- a/content/svg/content/src/SVGPathElement.cpp
+++ b/content/svg/content/src/SVGPathElement.cpp
@@ -37,17 +37,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGPathElem
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGPathElement::SVGPathElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGPathElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPathElement)
 
 already_AddRefed<nsIDOMSVGAnimatedNumber>
--- a/content/svg/content/src/SVGPathElement.h
+++ b/content/svg/content/src/SVGPathElement.h
@@ -19,38 +19,31 @@ class gfxContext;
 typedef nsSVGPathGeometryElement SVGPathElementBase;
 
 namespace mozilla {
 
 class nsISVGPoint;
 
 namespace dom {
 
-class SVGPathElement MOZ_FINAL : public SVGPathElementBase,
-                                 public nsIDOMSVGElement
+class SVGPathElement MOZ_FINAL : public SVGPathElementBase
 {
 friend class nsSVGPathFrame;
 
 protected:
   friend nsresult (::NS_NewSVGPathElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo));
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
   SVGPathElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
 public:
-  typedef SVGAnimatedPathSegList SVGAnimatedPathSegList;
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGPathElementBase::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;
 
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const;
 
   // nsSVGPathGeometryElement methods:
   virtual bool AttributeDefinesGeometry(const nsIAtom *aName);
@@ -58,18 +51,16 @@ public:
   virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks);
   virtual void ConstructPath(gfxContext *aCtx);
 
   virtual already_AddRefed<gfxFlattenedPath> GetFlattenedPath(const gfxMatrix &aMatrix);
 
   // nsIContent interface
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   virtual SVGAnimatedPathSegList* GetAnimPathSegList() {
     return &mD;
   }
 
   virtual nsIAtom* GetPathDataAttrName() const {
     return nsGkAtoms::d;
   }
 
--- a/content/svg/content/src/SVGPatternElement.cpp
+++ b/content/svg/content/src/SVGPatternElement.cpp
@@ -57,17 +57,16 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGPatternE
                              nsIDOMSVGElement, nsIDOMSVGUnitTypes)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGPatternElement::SVGPatternElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGPatternElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode method
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPatternElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGPatternElement.h
+++ b/content/svg/content/src/SVGPatternElement.h
@@ -23,44 +23,37 @@ nsresult NS_NewSVGPatternElement(nsICont
 namespace mozilla {
 class DOMSVGAnimatedTransformList;
 
 namespace dom {
 
 typedef nsSVGElement SVGPatternElementBase;
 
 class SVGPatternElement MOZ_FINAL : public SVGPatternElementBase,
-                                    public nsIDOMSVGElement,
                                     public nsIDOMSVGUnitTypes
 {
   friend class ::nsSVGPatternFrame;
 
 protected:
   friend nsresult (::NS_NewSVGPatternElement(nsIContent **aResult,
                                              already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGPatternElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   typedef mozilla::SVGAnimatedPreserveAspectRatio SVGAnimatedPreserveAspectRatio;
 
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const;
 
   virtual mozilla::SVGAnimatedTransformList*
     GetAnimatedTransformList(uint32_t aFlags = 0);
   virtual nsIAtom* GetTransformListAttrName() const {
     return nsGkAtoms::patternTransform;
   }
--- a/content/svg/content/src/SVGPolygonElement.cpp
+++ b/content/svg/content/src/SVGPolygonElement.cpp
@@ -27,17 +27,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGPolygonE
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGPolygonElement::SVGPolygonElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGPolygonElementBase(aNodeInfo)
 {
-
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPolygonElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGPolygonElement.h
+++ b/content/svg/content/src/SVGPolygonElement.h
@@ -11,40 +11,32 @@
 nsresult NS_NewSVGPolygonElement(nsIContent **aResult,
                                  already_AddRefed<nsINodeInfo> aNodeInfo);
 
 typedef nsSVGPolyElement SVGPolygonElementBase;
 
 namespace mozilla {
 namespace dom {
 
-class SVGPolygonElement MOZ_FINAL : public SVGPolygonElementBase,
-                                    public nsIDOMSVGElement
+class SVGPolygonElement MOZ_FINAL : public SVGPolygonElementBase
 {
 protected:
   SVGPolygonElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
   friend nsresult (::NS_NewSVGPolygonElement(nsIContent **aResult,
                                              already_AddRefed<nsINodeInfo> aNodeInfo));
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGPolygonElementBase::)
-
   // nsSVGPathGeometryElement methods:
   virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks);
   virtual void ConstructPath(gfxContext *aCtx);
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGPolygonElement_h
--- a/content/svg/content/src/SVGPolylineElement.cpp
+++ b/content/svg/content/src/SVGPolylineElement.cpp
@@ -25,17 +25,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGPolyline
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGPolylineElement::SVGPolylineElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGPolylineElementBase(aNodeInfo)
 {
-
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGPolylineElement)
 
 } // namespace dom
--- a/content/svg/content/src/SVGPolylineElement.h
+++ b/content/svg/content/src/SVGPolylineElement.h
@@ -11,36 +11,29 @@
 nsresult NS_NewSVGPolylineElement(nsIContent **aResult,
                                   already_AddRefed<nsINodeInfo> aNodeInfo);
 
 typedef nsSVGPolyElement SVGPolylineElementBase;
 
 namespace mozilla {
 namespace dom {
 
-class SVGPolylineElement MOZ_FINAL : public SVGPolylineElementBase,
-                                     public nsIDOMSVGElement
+class SVGPolylineElement MOZ_FINAL : public SVGPolylineElementBase
 {
 protected:
   SVGPolylineElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
   friend nsresult (::NS_NewSVGPolylineElement(nsIContent **aResult,
                                               already_AddRefed<nsINodeInfo> aNodeInfo));
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGPolylineElementBase::)
-
   // nsIContent interface
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace mozilla
 } // namespace dom
 
 #endif // mozilla_dom_SVGPolylineElement_h
--- a/content/svg/content/src/SVGRectElement.cpp
+++ b/content/svg/content/src/SVGRectElement.cpp
@@ -40,17 +40,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGRectElem
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGRectElement::SVGRectElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGRectElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGRectElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGRectElement.h
+++ b/content/svg/content/src/SVGRectElement.h
@@ -12,44 +12,36 @@
 nsresult NS_NewSVGRectElement(nsIContent **aResult,
                               already_AddRefed<nsINodeInfo> aNodeInfo);
 
 typedef nsSVGPathGeometryElement SVGRectElementBase;
 
 namespace mozilla {
 namespace dom {
 
-class SVGRectElement MOZ_FINAL : public SVGRectElementBase,
-                                 public nsIDOMSVGElement
+class SVGRectElement MOZ_FINAL : public SVGRectElementBase
 {
 protected:
   SVGRectElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
   friend nsresult (::NS_NewSVGRectElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo));
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGRectElementBase::)
-
   // nsSVGSVGElement methods:
   virtual bool HasValidDimensions() const;
 
   // nsSVGPathGeometryElement methods:
   virtual void ConstructPath(gfxContext *aCtx);
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<SVGAnimatedLength> X();
   already_AddRefed<SVGAnimatedLength> Y();
   already_AddRefed<SVGAnimatedLength> Height();
   already_AddRefed<SVGAnimatedLength> Width();
   already_AddRefed<SVGAnimatedLength> Rx();
   already_AddRefed<SVGAnimatedLength> Ry();
 
--- a/content/svg/content/src/SVGSVGElement.cpp
+++ b/content/svg/content/src/SVGSVGElement.cpp
@@ -169,17 +169,16 @@ SVGSVGElement::SVGSVGElement(already_Add
     mStartAnimationOnBindToTree(aFromParser == NOT_FROM_PARSER ||
                                 aFromParser == FROM_PARSER_FRAGMENT ||
                                 aFromParser == FROM_PARSER_XSLT),
     mImageNeedsTransformInvalidation(false),
     mIsPaintingSVGImageElement(false),
     mHasChildrenOnlyTransform(false),
     mUseCurrentView(false)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 // From NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGSVGElement)
 nsresult
 SVGSVGElement::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
--- a/content/svg/content/src/SVGSVGElement.h
+++ b/content/svg/content/src/SVGSVGElement.h
@@ -76,18 +76,17 @@ public:
     return width != rhs.width || height != rhs.height;
   }
   float width;
   float height;
 };
 
 typedef SVGGraphicsElement SVGSVGElementBase;
 
-class SVGSVGElement MOZ_FINAL : public SVGSVGElementBase,
-                                public nsIDOMSVGElement
+class SVGSVGElement MOZ_FINAL : public SVGSVGElementBase
 {
   friend class ::nsSVGOuterSVGFrame;
   friend class ::nsSVGInnerSVGFrame;
   friend class mozilla::SVGFragmentIdentifier;
   friend class mozilla::AutoSVGRenderingState;
 
   SVGSVGElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                 FromParser aFromParser);
@@ -97,21 +96,16 @@ class SVGSVGElement MOZ_FINAL : public S
                                          already_AddRefed<nsINodeInfo> aNodeInfo,
                                          mozilla::dom::FromParser aFromParser));
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SVGSVGElement, SVGSVGElementBase)
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGSVGElementBase::)
-
   /**
    * For use by zoom controls to allow currentScale, currentTranslate.x and
    * currentTranslate.y to be set by a single operation that dispatches a
    * single SVGZoom event (instead of one SVGZoom and two SVGScroll events).
    */
   void SetCurrentScaleTranslate(float s, float x, float y);
 
   /**
@@ -213,18 +207,16 @@ public:
     return svgFloatSize(mViewportWidth, mViewportHeight);
   }
 
   void SetViewportSize(const svgFloatSize& aSize) {
     mViewportWidth  = aSize.width;
     mViewportHeight = aSize.height;
   }
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<SVGAnimatedLength> X();
   already_AddRefed<SVGAnimatedLength> Y();
   already_AddRefed<SVGAnimatedLength> Width();
   already_AddRefed<SVGAnimatedLength> Height();
   float PixelUnitToMillimeterX();
   float PixelUnitToMillimeterY();
   float ScreenPixelToMillimeterX();
--- a/content/svg/content/src/SVGScriptElement.cpp
+++ b/content/svg/content/src/SVGScriptElement.cpp
@@ -38,17 +38,16 @@ NS_IMPL_ISUPPORTS_INHERITED6(SVGScriptEl
 //----------------------------------------------------------------------
 // Implementation
 
 SVGScriptElement::SVGScriptElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                                    FromParser aFromParser)
   : SVGScriptElementBase(aNodeInfo)
   , nsScriptElement(aFromParser)
 {
-  SetIsDOMBinding();
   AddMutationObserver(this);
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 nsresult
 SVGScriptElement::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
--- a/content/svg/content/src/SVGScriptElement.h
+++ b/content/svg/content/src/SVGScriptElement.h
@@ -19,39 +19,32 @@ nsresult NS_NewSVGScriptElement(nsIConte
                                 mozilla::dom::FromParser aFromParser);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGElement SVGScriptElementBase;
 
 class SVGScriptElement MOZ_FINAL : public SVGScriptElementBase,
-                                   public nsIDOMSVGElement,
                                    public nsScriptElement
 {
 protected:
   friend nsresult (::NS_NewSVGScriptElement(nsIContent **aResult,
                                             already_AddRefed<nsINodeInfo> aNodeInfo,
                                             mozilla::dom::FromParser aFromParser));
   SVGScriptElement(already_AddRefed<nsINodeInfo> aNodeInfo,
                    FromParser aFromParser);
 
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx If xpcom allowed virtual inheritance we wouldn't need to
-  // forward here :-(
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGScriptElementBase::)
-
   // nsIScriptElement
   virtual void GetScriptType(nsAString& type);
   virtual void GetScriptText(nsAString& text);
   virtual void GetScriptCharset(nsAString& charset);
   virtual void FreezeUriAsyncDefer();
   virtual CORSMode GetCORSMode() const;
 
   // nsScriptElement
@@ -65,18 +58,16 @@ public:
                                 const nsAttrValue* aValue, bool aNotify);
   virtual bool ParseAttribute(int32_t aNamespaceID,
                               nsIAtom* aAttribute,
                               const nsAString& aValue,
                               nsAttrValue& aResult);
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   void GetType(nsAString & aType);
   void SetType(const nsAString & aType, ErrorResult& rv);
   void GetCrossOrigin(nsAString & aOrigin);
   void SetCrossOrigin(const nsAString & aOrigin, ErrorResult& rv);
   already_AddRefed<nsIDOMSVGAnimatedString> Href();
 
 protected:
--- a/content/svg/content/src/SVGSetElement.h
+++ b/content/svg/content/src/SVGSetElement.h
@@ -10,42 +10,35 @@
 #include "nsSMILSetAnimationFunction.h"
 
 nsresult NS_NewSVGSetElement(nsIContent **aResult,
                              already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
-class SVGSetElement MOZ_FINAL : public SVGAnimationElement,
-                                public nsIDOMSVGElement
+class SVGSetElement MOZ_FINAL : public SVGAnimationElement
 {
 protected:
   SVGSetElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
   nsSMILSetAnimationFunction mAnimationFunction;
 
   friend nsresult (::NS_NewSVGSetElement(nsIContent **aResult,
                                          already_AddRefed<nsINodeInfo> aNodeInfo));
 
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
 
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGAnimationElement::)
-
   // nsIDOMNode
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   // SVGAnimationElement
   virtual nsSMILAnimationFunction& AnimationFunction();
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGSetElement_h
--- a/content/svg/content/src/SVGStopElement.cpp
+++ b/content/svg/content/src/SVGStopElement.cpp
@@ -28,17 +28,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGStopElem
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGStopElement::SVGStopElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGStopElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGStopElement)
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGStopElement.h
+++ b/content/svg/content/src/SVGStopElement.h
@@ -12,43 +12,34 @@
 nsresult NS_NewSVGStopElement(nsIContent **aResult,
                               already_AddRefed<nsINodeInfo> aNodeInfo);
 
 typedef nsSVGElement SVGStopElementBase;
 
 namespace mozilla {
 namespace dom {
 
-class SVGStopElement MOZ_FINAL : public SVGStopElementBase,
-                                 public nsIDOMSVGElement
+class SVGStopElement MOZ_FINAL : public SVGStopElementBase
 {
 protected:
   friend nsresult (::NS_NewSVGStopElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGStopElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx If xpcom allowed virtual inheritance we wouldn't need to
-  // forward here :-(
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGStopElementBase::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedNumber> Offset();
 
 protected:
 
   virtual NumberAttributesInfo GetNumberInfo();
   nsSVGNumber2 mOffset;
   static NumberInfo sNumberInfo;
--- a/content/svg/content/src/SVGStyleElement.cpp
+++ b/content/svg/content/src/SVGStyleElement.cpp
@@ -42,17 +42,16 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_IN
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGStyleElement::SVGStyleElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGStyleElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
   AddMutationObserver(this);
 }
 
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 
--- a/content/svg/content/src/SVGStyleElement.h
+++ b/content/svg/content/src/SVGStyleElement.h
@@ -14,38 +14,32 @@ nsresult NS_NewSVGStyleElement(nsIConten
                                already_AddRefed<nsINodeInfo> aNodeInfo);
 
 typedef nsSVGElement SVGStyleElementBase;
 
 namespace mozilla {
 namespace dom {
 
 class SVGStyleElement MOZ_FINAL : public SVGStyleElementBase,
-                                  public nsIDOMSVGElement,
                                   public nsStyleLinkElement,
                                   public nsStubMutationObserver
 {
 protected:
   friend nsresult (::NS_NewSVGStyleElement(nsIContent **aResult,
                                            already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGStyleElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SVGStyleElement,
                                            SVGStyleElementBase)
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGStyleElementBase::)
-
   // nsIContent
   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers);
   virtual void UnbindFromTree(bool aDeep = true,
                               bool aNullParent = true);
   nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
                    const nsAString& aValue, bool aNotify)
@@ -65,18 +59,16 @@ public:
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   // nsIMutationObserver
   NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   void GetXmlspace(nsAString & aXmlspace);
   void SetXmlspace(const nsAString & aXmlspace, ErrorResult& rv);
   void GetMedia(nsAString & aMedia);
   void SetMedia(const nsAString& aMedia, ErrorResult& rv);
   bool Scoped() const;
   void SetScoped(bool aScoped, ErrorResult& rv);
   void GetType(nsAString & aType);
--- a/content/svg/content/src/SVGSwitchElement.cpp
+++ b/content/svg/content/src/SVGSwitchElement.cpp
@@ -42,17 +42,16 @@ NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION
 NS_INTERFACE_MAP_END_INHERITING(SVGSwitchElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGSwitchElement::SVGSwitchElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGSwitchElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 void
 SVGSwitchElement::MaybeInvalidate()
 {
   // We must not change mActiveChild until after
   // InvalidateAndScheduleBoundsUpdate has been called, otherwise
   // it will not correctly invalidate the old mActiveChild area.
--- a/content/svg/content/src/SVGSwitchElement.h
+++ b/content/svg/content/src/SVGSwitchElement.h
@@ -11,18 +11,17 @@
 nsresult NS_NewSVGSwitchElement(nsIContent **aResult,
                                 already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGGraphicsElement SVGSwitchElementBase;
 
-class SVGSwitchElement MOZ_FINAL : public SVGSwitchElementBase,
-                                   public nsIDOMSVGElement
+class SVGSwitchElement MOZ_FINAL : public SVGSwitchElementBase
 {
   friend class nsSVGSwitchFrame;
 protected:
   friend nsresult (::NS_NewSVGSwitchElement(nsIContent **aResult,
                                             already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGSwitchElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
 
@@ -31,32 +30,25 @@ public:
   { return mActiveChild; }
   void MaybeInvalidate();
 
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SVGSwitchElement,
                                            SVGSwitchElementBase)
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGSwitchElementBase::)
-
   // nsINode
   virtual nsresult InsertChildAt(nsIContent* aKid, uint32_t aIndex,
                                  bool aNotify);
   virtual void RemoveChildAt(uint32_t aIndex, bool aNotify);
 
   // nsIContent
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 private:
   void UpdateActiveChild()
   { mActiveChild = FindActiveChild(); }
   nsIContent* FindActiveChild() const;
 
   // only this child will be displayed
   nsCOMPtr<nsIContent> mActiveChild;
 };
--- a/content/svg/content/src/SVGSymbolElement.cpp
+++ b/content/svg/content/src/SVGSymbolElement.cpp
@@ -25,17 +25,16 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGSymbolEl
                              nsIDOMSVGElement, mozilla::dom::SVGTests)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGSymbolElement::SVGSymbolElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGSymbolElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGSymbolElement)
 
--- a/content/svg/content/src/SVGSymbolElement.h
+++ b/content/svg/content/src/SVGSymbolElement.h
@@ -15,42 +15,34 @@ nsresult NS_NewSVGSymbolElement(nsIConte
                                 already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGElement SVGSymbolElementBase;
 
 class SVGSymbolElement MOZ_FINAL : public SVGSymbolElementBase,
-                                   public nsIDOMSVGElement,
                                    public SVGTests
 {
 protected:
   friend nsresult (::NS_NewSVGSymbolElement(nsIContent **aResult,
                                             already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGSymbolElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(nsSVGElement::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedRect> ViewBox();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
 
 protected:
   virtual nsSVGViewBox *GetViewBox();
   virtual SVGAnimatedPreserveAspectRatio *GetPreserveAspectRatio();
 
--- a/content/svg/content/src/SVGTSpanElement.cpp
+++ b/content/svg/content/src/SVGTSpanElement.cpp
@@ -27,17 +27,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGTSpanEle
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGTSpanElement::SVGTSpanElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGTSpanElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGTSpanElement)
--- a/content/svg/content/src/SVGTSpanElement.h
+++ b/content/svg/content/src/SVGTSpanElement.h
@@ -11,42 +11,33 @@
 nsresult NS_NewSVGTSpanElement(nsIContent **aResult,
                                already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGTextPositioningElement SVGTSpanElementBase;
 
-class SVGTSpanElement MOZ_FINAL : public SVGTSpanElementBase,
-                                  public nsIDOMSVGElement
+class SVGTSpanElement MOZ_FINAL : public SVGTSpanElementBase
 {
 protected:
   friend nsresult (::NS_NewSVGTSpanElement(nsIContent **aResult,
                                            already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGTSpanElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx If xpcom allowed virtual inheritance we wouldn't need to
-  // forward here :-(
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGTSpanElementBase::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 protected:
 
   // nsSVGElement overrides
   virtual bool IsEventName(nsIAtom* aName);
 };
 
 } // namespace dom
 } // namespace mozilla
--- a/content/svg/content/src/SVGTests.cpp
+++ b/content/svg/content/src/SVGTests.cpp
@@ -26,33 +26,36 @@ nsIAtom** SVGTests::sStringListNames[3] 
 SVGTests::SVGTests()
 {
   mStringListAttributes[LANGUAGE].SetIsCommaSeparated(true);
 }
 
 already_AddRefed<nsIDOMSVGStringList>
 SVGTests::RequiredFeatures()
 {
-  nsCOMPtr<nsSVGElement> element = do_QueryInterface(this);
+  nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
+  nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
   return DOMSVGStringList::GetDOMWrapper(
            &mStringListAttributes[FEATURES], element, true, FEATURES).get();
 }
 
 already_AddRefed<nsIDOMSVGStringList>
 SVGTests::RequiredExtensions()
 {
-  nsCOMPtr<nsSVGElement> element = do_QueryInterface(this);
+  nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
+  nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
   return DOMSVGStringList::GetDOMWrapper(
            &mStringListAttributes[EXTENSIONS], element, true, EXTENSIONS).get();
 }
 
 already_AddRefed<nsIDOMSVGStringList>
 SVGTests::SystemLanguage()
 {
-  nsCOMPtr<nsSVGElement> element = do_QueryInterface(this);
+  nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
+  nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
   return DOMSVGStringList::GetDOMWrapper(
            &mStringListAttributes[LANGUAGE], element, true, LANGUAGE).get();
 }
 
 bool
 SVGTests::HasExtension(const nsAString& aExtension)
 {
   return nsSVGFeatures::HasExtension(aExtension);
@@ -224,17 +227,18 @@ SVGTests::GetAttrValue(uint8_t aAttrEnum
   MOZ_ASSERT(aAttrEnum < ArrayLength(sStringListNames),
              "aAttrEnum out of range");
   aValue.SetTo(mStringListAttributes[aAttrEnum], nullptr);
 }
 
 void
 SVGTests::MaybeInvalidate()
 {
-  nsCOMPtr<nsSVGElement> element = do_QueryInterface(this);
+  nsCOMPtr<nsIDOMSVGElement> elem = do_QueryInterface(this);
+  nsSVGElement* element = static_cast<nsSVGElement*>(elem.get());
 
   nsIContent* parent = element->GetFlattenedTreeParent();
 
   if (parent &&
       parent->NodeInfo()->Equals(nsGkAtoms::svgSwitch, kNameSpaceID_SVG)) {
     static_cast<dom::SVGSwitchElement*>(parent)->MaybeInvalidate();
   }
 }
--- a/content/svg/content/src/SVGTextElement.cpp
+++ b/content/svg/content/src/SVGTextElement.cpp
@@ -25,17 +25,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGTextElem
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGTextElement::SVGTextElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGTextElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGTextElement)
 
--- a/content/svg/content/src/SVGTextElement.h
+++ b/content/svg/content/src/SVGTextElement.h
@@ -11,41 +11,32 @@
 nsresult NS_NewSVGTextElement(nsIContent **aResult,
                               already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGTextPositioningElement SVGTextElementBase;
 
-class SVGTextElement MOZ_FINAL : public SVGTextElementBase,
-                                 public nsIDOMSVGElement
+class SVGTextElement MOZ_FINAL : public SVGTextElementBase
 {
 protected:
   SVGTextElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
   friend nsresult (::NS_NewSVGTextElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo));
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx If xpcom allowed virtual inheritance we wouldn't need to
-  // forward here :-(
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGTextElementBase::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGTextElement_h
--- a/content/svg/content/src/SVGTextPathElement.cpp
+++ b/content/svg/content/src/SVGTextPathElement.cpp
@@ -66,17 +66,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGTextPath
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGTextPathElement::SVGTextPathElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGTextPathElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGTextPathElement)
 
 already_AddRefed<nsIDOMSVGAnimatedString>
--- a/content/svg/content/src/SVGTextPathElement.h
+++ b/content/svg/content/src/SVGTextPathElement.h
@@ -1,17 +1,16 @@
 /* -*- Mode: C++; 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/. */
 
 #ifndef mozilla_dom_SVGTextPathElement_h
 #define mozilla_dom_SVGTextPathElement_h
 
-#include "nsIDOMSVGElement.h"
 #include "nsSVGEnum.h"
 #include "nsSVGLength2.h"
 #include "nsSVGString.h"
 #include "mozilla/dom/SVGTextContentElement.h"
 
 class nsIAtom;
 class nsIContent;
 class nsINodeInfo;
@@ -29,46 +28,37 @@ static const unsigned short TEXTPATH_MET
 static const unsigned short TEXTPATH_METHODTYPE_STRETCH  = 2;
 // textPath Spacing Types
 static const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
 static const unsigned short TEXTPATH_SPACINGTYPE_AUTO    = 1;
 static const unsigned short TEXTPATH_SPACINGTYPE_EXACT   = 2;
 
 typedef SVGTextContentElement SVGTextPathElementBase;
 
-class SVGTextPathElement MOZ_FINAL : public SVGTextPathElementBase,
-                                     public nsIDOMSVGElement
+class SVGTextPathElement MOZ_FINAL : public SVGTextPathElementBase
 {
 friend class ::nsSVGTextPathFrame;
 friend class ::nsSVGTextFrame2;
 
 protected:
   friend nsresult (::NS_NewSVGTextPathElement(nsIContent **aResult,
                                               already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGTextPathElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx If xpcom allowed virtual inheritance we wouldn't need to
-  // forward here :-(
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGTextPathElementBase::)
-
   // nsIContent interface
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   virtual bool IsEventAttributeName(nsIAtom* aName) MOZ_OVERRIDE;
 
   // WebIDL
   already_AddRefed<SVGAnimatedLength> StartOffset();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> Method();
   already_AddRefed<nsIDOMSVGAnimatedEnumeration> Spacing();
   already_AddRefed<nsIDOMSVGAnimatedString> Href();
 
--- a/content/svg/content/src/SVGTitleElement.cpp
+++ b/content/svg/content/src/SVGTitleElement.cpp
@@ -26,17 +26,16 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGTitleEle
                              nsIMutationObserver)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGTitleElement::SVGTitleElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGTitleElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
   AddMutationObserver(this);
 }
 
 void
 SVGTitleElement::CharacterDataChanged(nsIDocument *aDocument,
                                       nsIContent *aContent,
                                       CharacterDataChangeInfo *aInfo)
 {
--- a/content/svg/content/src/SVGTitleElement.h
+++ b/content/svg/content/src/SVGTitleElement.h
@@ -12,54 +12,46 @@
 typedef nsSVGElement SVGTitleElementBase;
 
 nsresult NS_NewSVGTitleElement(nsIContent **aResult,
                                already_AddRefed<nsINodeInfo> aNodeInfo);
 namespace mozilla {
 namespace dom {
 
 class SVGTitleElement MOZ_FINAL : public SVGTitleElementBase,
-                                  public nsStubMutationObserver,
-                                  public nsIDOMSVGElement
+                                  public nsStubMutationObserver
 {
 protected:
   friend nsresult (::NS_NewSVGTitleElement(nsIContent **aResult,
                                            already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGTitleElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
   virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGTitleElementBase::)
-
   // nsIMutationObserver
   NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsresult BindToTree(nsIDocument *aDocument, nsIContent *aParent,
                               nsIContent *aBindingParent,
                               bool aCompileEventHandlers);
 
   virtual void UnbindFromTree(bool aDeep = true,
                               bool aNullParent = true);
 
   virtual void DoneAddingChildren(bool aHaveNotified);
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 private:
   void SendTitleChangeEvent(bool aBound);
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGTitleElement_h
--- a/content/svg/content/src/SVGTransformableElement.h
+++ b/content/svg/content/src/SVGTransformableElement.h
@@ -54,16 +54,18 @@ public:
   virtual void SetAnimateMotionTransform(const gfxMatrix* aMatrix);
 
   virtual SVGAnimatedTransformList*
     GetAnimatedTransformList(uint32_t aFlags = 0);
   virtual nsIAtom* GetTransformListAttrName() const {
     return nsGkAtoms::transform;
   }
 
+  virtual bool IsTransformable() { return true; }
+
 protected:
   // nsSVGElement overrides
 
   nsAutoPtr<SVGAnimatedTransformList> mTransforms;
 
   // XXX maybe move this to property table, to save space on un-animated elems?
   nsAutoPtr<gfxMatrix> mAnimateMotionTransform;
 };
--- a/content/svg/content/src/SVGUseElement.cpp
+++ b/content/svg/content/src/SVGUseElement.cpp
@@ -78,17 +78,16 @@ NS_INTERFACE_MAP_END_INHERITING(SVGUseEl
 #pragma warning(disable:4355)
 #endif
 SVGUseElement::SVGUseElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGUseElementBase(aNodeInfo), mSource(this)
 #ifdef _MSC_VER
 #pragma warning(pop)
 #endif
 {
-  SetIsDOMBinding();
 }
 
 SVGUseElement::~SVGUseElement()
 {
   UnlinkSource();
 }
 
 //----------------------------------------------------------------------
--- a/content/svg/content/src/SVGUseElement.h
+++ b/content/svg/content/src/SVGUseElement.h
@@ -26,17 +26,16 @@ nsresult NS_NewSVGUseElement(nsIContent 
                              already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGGraphicsElement SVGUseElementBase;
 
 class SVGUseElement MOZ_FINAL : public SVGUseElementBase,
-                                public nsIDOMSVGElement,
                                 public nsStubMutationObserver
 {
   friend class ::nsSVGUseFrame;
 protected:
   friend nsresult (::NS_NewSVGUseElement(nsIContent **aResult,
                                          already_AddRefed<nsINodeInfo> aNodeInfo));
   SVGUseElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   virtual ~SVGUseElement();
@@ -50,37 +49,30 @@ public:
 
   NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
   NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
   NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
 
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGUseElementBase::)
-
   // for nsSVGUseFrame's nsIAnonymousContentCreator implementation.
   nsIContent* CreateAnonymousContent();
   nsIContent* GetAnonymousContent() const { return mClone; }
   void DestroyAnonymousContent();
 
   // nsSVGElement specializations:
   virtual gfxMatrix PrependLocalTransformsTo(const gfxMatrix &aMatrix,
                       TransformTypes aWhich = eAllTransforms) const;
   virtual bool HasValidDimensions() const;
 
   // nsIContent interface
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   already_AddRefed<nsIDOMSVGAnimatedString> Href();
   already_AddRefed<SVGAnimatedLength> X();
   already_AddRefed<SVGAnimatedLength> Y();
   already_AddRefed<SVGAnimatedLength> Width();
   already_AddRefed<SVGAnimatedLength> Height();
 
 protected:
--- a/content/svg/content/src/SVGViewElement.cpp
+++ b/content/svg/content/src/SVGViewElement.cpp
@@ -45,17 +45,16 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGViewElem
                              nsIDOMSVGElement)
 
 //----------------------------------------------------------------------
 // Implementation
 
 SVGViewElement::SVGViewElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : SVGViewElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 //----------------------------------------------------------------------
 // nsIDOMNode methods
 
 NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGViewElement)
 
 void
--- a/content/svg/content/src/SVGViewElement.h
+++ b/content/svg/content/src/SVGViewElement.h
@@ -25,43 +25,34 @@ nsresult NS_NewSVGViewElement(nsIContent
                               already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
 class SVGFragmentIdentifier;
 
 namespace dom {
 class SVGSVGElement;
 
-class SVGViewElement : public SVGViewElementBase,
-                       public nsIDOMSVGElement
+class SVGViewElement : public SVGViewElementBase
 {
 protected:
   friend class mozilla::SVGFragmentIdentifier;
   friend class SVGSVGElement;
   friend class ::nsSVGOuterSVGFrame;
   SVGViewElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   friend nsresult (::NS_NewSVGViewElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo));
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
 public:
   // interfaces:
 
   NS_DECL_ISUPPORTS_INHERITED
 
-  // xxx If xpcom allowed virtual inheritance we wouldn't need to
-  // forward here :-(
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(SVGViewElementBase::)
-
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
-  virtual nsIDOMNode* AsDOMNode() { return this; }
-
   // WebIDL
   uint16_t ZoomAndPan() { return mEnumAttributes[ZOOMANDPAN].GetAnimValue(); }
   void SetZoomAndPan(uint16_t aZoomAndPan, ErrorResult& rv);
   already_AddRefed<nsIDOMSVGAnimatedRect> ViewBox();
   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
   already_AddRefed<nsIDOMSVGStringList> ViewTarget();
 
 private:
--- a/content/svg/content/src/nsSVGElement.cpp
+++ b/content/svg/content/src/nsSVGElement.cpp
@@ -62,16 +62,17 @@ nsSVGEnumMapping nsSVGElement::sSVGUnitT
   {&nsGkAtoms::userSpaceOnUse, SVG_UNIT_TYPE_USERSPACEONUSE},
   {&nsGkAtoms::objectBoundingBox, SVG_UNIT_TYPE_OBJECTBOUNDINGBOX},
   {nullptr, 0}
 };
 
 nsSVGElement::nsSVGElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsSVGElementBase(aNodeInfo)
 {
+  SetIsDOMBinding();
 }
 
 JSObject*
 nsSVGElement::WrapNode(JSContext *aCx, JSObject *aScope)
 {
   return SVGElementBinding::Wrap(aCx, aScope, this);
 }
 
@@ -209,18 +210,19 @@ nsSVGElement::Init()
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
 NS_IMPL_ADDREF_INHERITED(nsSVGElement, nsSVGElementBase)
 NS_IMPL_RELEASE_INHERITED(nsSVGElement, nsSVGElementBase)
 
 NS_INTERFACE_MAP_BEGIN(nsSVGElement)
-// provided by Element:
-//  NS_INTERFACE_MAP_ENTRY(nsIContent)
+  NS_INTERFACE_MAP_ENTRY(nsIDOMSVGElement)
+  NS_INTERFACE_MAP_ENTRY(nsIDOMElement)
+  NS_INTERFACE_MAP_ENTRY(nsIDOMNode)
 NS_INTERFACE_MAP_END_INHERITING(nsSVGElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
   
 //----------------------------------------------------------------------
 // nsIContent methods
 
@@ -528,17 +530,17 @@ nsSVGElement::ParseAttribute(int32_t aNa
           foundMatch = true;
           break;
         }
       }
     }
 
     if (!foundMatch) {
       // Check for conditional processing attributes
-      nsCOMPtr<SVGTests> tests(do_QueryInterface(this));
+      nsCOMPtr<SVGTests> tests = do_QueryObject(this);
       if (tests && tests->ParseConditionalProcessingAttribute(
                             aAttribute, aValue, aResult)) {
         foundMatch = true;
       }
     }
 
     if (!foundMatch) {
       // Check for StringList attribute
@@ -812,17 +814,17 @@ nsSVGElement::UnsetAttrInternal(int32_t 
       if (transformList) {
         MaybeSerializeAttrBeforeRemoval(aName, aNotify);
         transformList->ClearBaseValue();
         return;
       }
     }
 
     // Check for conditional processing attributes
-    nsCOMPtr<SVGTests> tests(do_QueryInterface(this));
+    nsCOMPtr<SVGTests> tests = do_QueryObject(this);
     if (tests && tests->IsConditionalProcessingAttribute(aName)) {
       MaybeSerializeAttrBeforeRemoval(aName, aNotify);
       tests->UnsetAttr(aName);
       return;
     }
 
     // Check if this is a string list attribute going away
     StringListAttributesInfo stringListInfo = GetStringListInfo();
@@ -863,17 +865,17 @@ nsSVGElement::UnsetAttr(int32_t aNamespa
 
 nsChangeHint
 nsSVGElement::GetAttributeChangeHint(const nsIAtom* aAttribute,
                                      int32_t aModType) const
 {
   nsChangeHint retval =
     nsSVGElementBase::GetAttributeChangeHint(aAttribute, aModType);
 
-  nsCOMPtr<SVGTests> tests(do_QueryInterface(const_cast<nsSVGElement*>(this)));
+  nsCOMPtr<SVGTests> tests = do_QueryObject(const_cast<nsSVGElement*>(this));
   if (tests && tests->IsConditionalProcessingAttribute(aAttribute)) {
     // It would be nice to only reconstruct the frame if the value returned by
     // SVGTests::PassesConditionalProcessingTests has changed, but we don't
     // know that
     NS_UpdateHint(retval, nsChangeHint_ReconstructFrame);
   }
   return retval;
 }
@@ -1115,18 +1117,17 @@ nsSVGElement::GetOwnerSVGElement(ErrorRe
   return ownerSVGElement;
 }
 
 /* readonly attribute nsIDOMSVGElement viewportElement; */
 NS_IMETHODIMP
 nsSVGElement::GetViewportElement(nsIDOMSVGElement * *aViewportElement)
 {
   nsSVGElement* elem = GetViewportElement();
-  nsCOMPtr<nsIDOMSVGElement> svgElem = do_QueryInterface(elem);
-  svgElem.forget(aViewportElement);
+  NS_ADDREF(*aViewportElement = elem);
   return NS_OK;
 }
 
 nsSVGElement*
 nsSVGElement::GetViewportElement()
 {
   return SVGContentUtils::GetNearestViewportElement(this);
 }
@@ -2420,17 +2421,17 @@ nsSVGElement::GetStringListInfo()
 }
 
 nsAttrValue
 nsSVGElement::WillChangeStringList(bool aIsConditionalProcessingAttribute,
                                    uint8_t aAttrEnum)
 {
   nsIAtom* name;
   if (aIsConditionalProcessingAttribute) {
-    nsCOMPtr<SVGTests> tests(do_QueryInterface(this));
+    nsCOMPtr<SVGTests> tests(do_QueryInterface(static_cast<nsIDOMSVGElement*>(this)));
     name = tests->GetAttrName(aAttrEnum);
   } else {
     name = *GetStringListInfo().mStringListInfo[aAttrEnum].mName;
   }
   return WillChangeValue(name);
 }
 
 void
@@ -2438,17 +2439,17 @@ nsSVGElement::DidChangeStringList(bool a
                                   uint8_t aAttrEnum,
                                   const nsAttrValue& aEmptyOrOldValue)
 {
   nsIAtom* name;
   nsAttrValue newValue;
   nsCOMPtr<SVGTests> tests;
 
   if (aIsConditionalProcessingAttribute) {
-    tests = do_QueryInterface(this);
+    tests = do_QueryObject(this);
     name = tests->GetAttrName(aAttrEnum);
     tests->GetAttrValue(aAttrEnum, newValue);
   } else {
     StringListAttributesInfo info = GetStringListInfo();
 
     NS_ASSERTION(info.mStringListCount > 0,
                  "DidChangeStringList on element with no string list attribs");
     NS_ASSERTION(aAttrEnum < info.mStringListCount, "aAttrEnum out of range");
--- a/content/svg/content/src/nsSVGElement.h
+++ b/content/svg/content/src/nsSVGElement.h
@@ -58,16 +58,17 @@ class DOMSVGStringList;
 }
 
 struct gfxMatrix;
 struct nsSVGEnumMapping;
 
 typedef nsStyledElementNotElementCSSInlineStyle nsSVGElementBase;
 
 class nsSVGElement : public nsSVGElementBase    // nsIContent
+                   , public nsIDOMSVGElement
 {
 protected:
   nsSVGElement(already_AddRefed<nsINodeInfo> aNodeInfo);
   nsresult Init();
   virtual ~nsSVGElement(){}
 
 public:
   typedef mozilla::SVGNumberList SVGNumberList;
@@ -112,23 +113,19 @@ public:
   static const MappedAttributeEntry sViewportsMap[];
   static const MappedAttributeEntry sMarkersMap[];
   static const MappedAttributeEntry sColorMap[];
   static const MappedAttributeEntry sFiltersMap[];
   static const MappedAttributeEntry sFEFloodMap[];
   static const MappedAttributeEntry sLightingEffectsMap[];
   static const MappedAttributeEntry sMaskMap[];
 
-  // nsIDOMSVGElement
-  NS_IMETHOD GetId(nsAString & aId);
-  NS_IMETHOD SetId(const nsAString & aId);
-  NS_IMETHOD GetOwnerSVGElement(nsIDOMSVGElement** aOwnerSVGElement);
-  NS_IMETHOD GetViewportElement(nsIDOMSVGElement** aViewportElement);
-  NS_IMETHOD GetClassName(nsIDOMSVGAnimatedString** aClassName);
-  NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle);
+  NS_FORWARD_NSIDOMNODE_TO_NSINODE
+  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
+  NS_DECL_NSIDOMSVGELEMENT
 
   // Gets the element that establishes the rectangular viewport against which
   // we should resolve percentage lengths (our "coordinate context"). Returns
   // nullptr for outer <svg> or SVG without an <svg> parent (invalid SVG).
   mozilla::dom::SVGSVGElement* GetCtx() const;
 
   enum TransformTypes {
      eAllTransforms
@@ -292,16 +289,19 @@ public:
   }
   virtual nsIAtom* GetPathDataAttrName() const {
     return nullptr;
   }
   virtual nsIAtom* GetTransformListAttrName() const {
     return nullptr;
   }
 
+  virtual nsIDOMNode* AsDOMNode() MOZ_FINAL { return this; }
+  virtual bool IsTransformable() { return false; }
+
   // WebIDL
   mozilla::dom::SVGSVGElement* GetOwnerSVGElement(mozilla::ErrorResult& rv);
   nsSVGElement* GetViewportElement();
   already_AddRefed<nsIDOMSVGAnimatedString> ClassName();
   already_AddRefed<mozilla::dom::CSSValue> GetPresentationAttribute(const nsAString& aName, mozilla::ErrorResult& rv);
 protected:
   virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE;
 
--- a/content/svg/content/src/nsSVGPolyElement.cpp
+++ b/content/svg/content/src/nsSVGPolyElement.cpp
@@ -20,17 +20,16 @@ NS_INTERFACE_MAP_BEGIN(nsSVGPolyElement)
 NS_INTERFACE_MAP_END_INHERITING(nsSVGPolyElementBase)
 
 //----------------------------------------------------------------------
 // Implementation
 
 nsSVGPolyElement::nsSVGPolyElement(already_AddRefed<nsINodeInfo> aNodeInfo)
   : nsSVGPolyElementBase(aNodeInfo)
 {
-  SetIsDOMBinding();
 }
 
 already_AddRefed<DOMSVGPointList>
 nsSVGPolyElement::Points()
 {
   void *key = mPoints.GetBaseValKey();
   nsRefPtr<DOMSVGPointList> points = DOMSVGPointList::GetDOMWrapper(key, this, false);
   return points.forget();
--- a/content/svg/content/src/nsSVGUnknownElement.cpp
+++ b/content/svg/content/src/nsSVGUnknownElement.cpp
@@ -1,42 +1,33 @@
 /* -*- Mode: C++; 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 "nsSVGElement.h"
-#include "nsIDOMSVGElement.h"
 
 using namespace mozilla;
 
 typedef nsSVGElement nsSVGUnknownElementBase;
 
-class nsSVGUnknownElement : public nsSVGUnknownElementBase,
-                            public nsIDOMSVGElement
+class nsSVGUnknownElement : public nsSVGUnknownElementBase
 {
 protected:
   friend nsresult NS_NewSVGUnknownElement(nsIContent **aResult,
                                           already_AddRefed<nsINodeInfo> aNodeInfo);
   nsSVGUnknownElement(already_AddRefed<nsINodeInfo> aNodeInfo);
 
 public:
   // interfaces:
   NS_DECL_ISUPPORTS_INHERITED
-  
-  // xxx I wish we could use virtual inheritance
-  NS_FORWARD_NSIDOMNODE_TO_NSINODE
-  NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
-  NS_FORWARD_NSIDOMSVGELEMENT(nsSVGUnknownElementBase::)
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsXPCClassInfo* GetClassInfo();
-
-  virtual nsIDOMNode* AsDOMNode() { return this; }
 };
 
 NS_IMPL_NS_NEW_SVG_ELEMENT(Unknown)
 
 //----------------------------------------------------------------------
 // nsISupports methods
 
 NS_IMPL_ADDREF_INHERITED(nsSVGUnknownElement, nsSVGUnknownElementBase)
--- a/content/svg/document/src/SVGDocument.cpp
+++ b/content/svg/document/src/SVGDocument.cpp
@@ -73,17 +73,17 @@ SVGDocument::GetDomain(nsAString& aDomai
   }
 }
 
 /* readonly attribute SVGSVGElement rootElement; */
 NS_IMETHODIMP
 SVGDocument::GetRootElement(nsIDOMSVGElement** aRootElement)
 {
   ErrorResult rv;
-  nsCOMPtr<nsIDOMSVGElement> retval = do_QueryInterface(GetRootElement(rv));
+  nsCOMPtr<nsIDOMSVGElement> retval = GetRootElement(rv);
   retval.forget(aRootElement);
   return rv.ErrorCode();
 }
 
 nsSVGElement*
 SVGDocument::GetRootElement(ErrorResult& aRv)
 {
   Element* root = nsDocument::GetRootElement();
--- a/layout/svg/nsSVGGFrame.cpp
+++ b/layout/svg/nsSVGGFrame.cpp
@@ -28,18 +28,18 @@ NS_NewSVGGFrame(nsIPresShell* aPresShell
 NS_IMPL_FRAMEARENA_HELPERS(nsSVGGFrame)
 
 #ifdef DEBUG
 void
 nsSVGGFrame::Init(nsIContent* aContent,
                   nsIFrame* aParent,
                   nsIFrame* aPrevInFlow)
 {
-  nsCOMPtr<SVGTransformableElement> transformable = do_QueryInterface(aContent);
-  NS_ASSERTION(transformable,
+  NS_ASSERTION(aContent->IsSVG() &&
+               static_cast<nsSVGElement*>(aContent)->IsTransformable(),
                "The element doesn't support nsIDOMSVGTransformable");
 
   nsSVGGFrameBase::Init(aContent, aParent, aPrevInFlow);
 }
 #endif /* DEBUG */
 
 nsIAtom *
 nsSVGGFrame::GetType() const