From 9ac66bb66fd8774a8b3a22857b8d0aec2db101f8 Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Wed, 27 Mar 2013 21:23:09 -0400 Subject: [PATCH] Bug 840417 Part 1: Move nsIDOMSVGElement up to nsSVGElement r=Ms2ger --- content/base/public/nsINode.h | 6 +++ content/svg/content/src/DOMSVGStringList.cpp | 2 +- content/svg/content/src/SVGAElement.cpp | 1 - content/svg/content/src/SVGAElement.h | 10 ----- .../svg/content/src/SVGAltGlyphElement.cpp | 1 - content/svg/content/src/SVGAltGlyphElement.h | 12 +----- content/svg/content/src/SVGAnimateElement.h | 10 +---- .../svg/content/src/SVGAnimateMotionElement.h | 10 +---- .../content/src/SVGAnimateTransformElement.h | 10 +---- .../svg/content/src/SVGAnimationElement.cpp | 1 - content/svg/content/src/SVGCircleElement.cpp | 1 - content/svg/content/src/SVGCircleElement.h | 11 +----- .../svg/content/src/SVGClipPathElement.cpp | 1 - content/svg/content/src/SVGClipPathElement.h | 9 ----- .../src/SVGComponentTransferFunctionElement.h | 38 ++----------------- content/svg/content/src/SVGDefsElement.cpp | 1 - content/svg/content/src/SVGDefsElement.h | 11 +----- content/svg/content/src/SVGDescElement.cpp | 1 - content/svg/content/src/SVGDescElement.h | 11 +----- content/svg/content/src/SVGEllipseElement.cpp | 1 - content/svg/content/src/SVGEllipseElement.h | 11 +----- content/svg/content/src/SVGFEBlendElement.h | 11 +----- .../svg/content/src/SVGFEColorMatrixElement.h | 11 +----- .../src/SVGFEComponentTransferElement.h | 11 +----- .../svg/content/src/SVGFECompositeElement.cpp | 3 -- .../svg/content/src/SVGFECompositeElement.h | 10 +---- .../content/src/SVGFEConvolveMatrixElement.h | 10 +---- .../content/src/SVGFEDiffuseLightingElement.h | 10 +---- .../content/src/SVGFEDisplacementMapElement.h | 10 +---- .../content/src/SVGFEDistantLightElement.cpp | 1 - .../content/src/SVGFEDistantLightElement.h | 10 +---- content/svg/content/src/SVGFEFloodElement.h | 10 +---- .../content/src/SVGFEGaussianBlurElement.cpp | 2 - .../content/src/SVGFEGaussianBlurElement.h | 10 +---- content/svg/content/src/SVGFEImageElement.cpp | 1 - content/svg/content/src/SVGFEImageElement.h | 8 ---- content/svg/content/src/SVGFEMergeElement.h | 11 +----- .../svg/content/src/SVGFEMergeNodeElement.h | 12 +----- .../svg/content/src/SVGFEMorphologyElement.h | 11 +----- content/svg/content/src/SVGFEOffsetElement.h | 11 +----- .../svg/content/src/SVGFEPointLightElement.h | 10 +---- .../src/SVGFESpecularLightingElement.h | 10 +---- .../svg/content/src/SVGFESpotLightElement.h | 10 +---- content/svg/content/src/SVGFETileElement.h | 11 +----- .../svg/content/src/SVGFETurbulenceElement.h | 11 +----- content/svg/content/src/SVGFilterElement.cpp | 1 - content/svg/content/src/SVGFilterElement.h | 9 ----- .../content/src/SVGForeignObjectElement.cpp | 1 - .../svg/content/src/SVGForeignObjectElement.h | 11 +----- content/svg/content/src/SVGGElement.cpp | 1 - content/svg/content/src/SVGGElement.h | 11 +----- .../svg/content/src/SVGGradientElement.cpp | 1 - content/svg/content/src/SVGGradientElement.h | 19 ---------- content/svg/content/src/SVGImageElement.cpp | 1 - content/svg/content/src/SVGImageElement.h | 8 ---- content/svg/content/src/SVGLineElement.cpp | 1 - content/svg/content/src/SVGLineElement.h | 10 +---- content/svg/content/src/SVGMPathElement.cpp | 1 - content/svg/content/src/SVGMPathElement.h | 8 ---- content/svg/content/src/SVGMarkerElement.cpp | 1 - content/svg/content/src/SVGMarkerElement.h | 10 +---- content/svg/content/src/SVGMaskElement.cpp | 1 - content/svg/content/src/SVGMaskElement.h | 7 ---- .../svg/content/src/SVGMetadataElement.cpp | 1 - content/svg/content/src/SVGMetadataElement.h | 10 +---- content/svg/content/src/SVGPathElement.cpp | 1 - content/svg/content/src/SVGPathElement.h | 11 +----- content/svg/content/src/SVGPatternElement.cpp | 1 - content/svg/content/src/SVGPatternElement.h | 7 ---- content/svg/content/src/SVGPolygonElement.cpp | 1 - content/svg/content/src/SVGPolygonElement.h | 10 +---- .../svg/content/src/SVGPolylineElement.cpp | 1 - content/svg/content/src/SVGPolylineElement.h | 9 +---- content/svg/content/src/SVGRectElement.cpp | 1 - content/svg/content/src/SVGRectElement.h | 10 +---- content/svg/content/src/SVGSVGElement.cpp | 1 - content/svg/content/src/SVGSVGElement.h | 10 +---- content/svg/content/src/SVGScriptElement.cpp | 1 - content/svg/content/src/SVGScriptElement.h | 9 ----- content/svg/content/src/SVGSetElement.h | 9 +---- content/svg/content/src/SVGStopElement.cpp | 1 - content/svg/content/src/SVGStopElement.h | 11 +----- content/svg/content/src/SVGStyleElement.cpp | 1 - content/svg/content/src/SVGStyleElement.h | 8 ---- content/svg/content/src/SVGSwitchElement.cpp | 1 - content/svg/content/src/SVGSwitchElement.h | 10 +---- content/svg/content/src/SVGSymbolElement.cpp | 1 - content/svg/content/src/SVGSymbolElement.h | 8 ---- content/svg/content/src/SVGTSpanElement.cpp | 1 - content/svg/content/src/SVGTSpanElement.h | 11 +----- content/svg/content/src/SVGTests.cpp | 12 ++++-- content/svg/content/src/SVGTextElement.cpp | 1 - content/svg/content/src/SVGTextElement.h | 11 +----- .../svg/content/src/SVGTextPathElement.cpp | 1 - content/svg/content/src/SVGTextPathElement.h | 12 +----- content/svg/content/src/SVGTitleElement.cpp | 1 - content/svg/content/src/SVGTitleElement.h | 10 +---- .../svg/content/src/SVGTransformableElement.h | 2 + content/svg/content/src/SVGUseElement.cpp | 1 - content/svg/content/src/SVGUseElement.h | 8 ---- content/svg/content/src/SVGViewElement.cpp | 1 - content/svg/content/src/SVGViewElement.h | 11 +----- content/svg/content/src/nsSVGElement.cpp | 19 +++++----- content/svg/content/src/nsSVGElement.h | 14 +++---- content/svg/content/src/nsSVGPolyElement.cpp | 1 - .../svg/content/src/nsSVGUnknownElement.cpp | 11 +----- content/svg/document/src/SVGDocument.cpp | 2 +- layout/svg/nsSVGGFrame.cpp | 4 +- 108 files changed, 87 insertions(+), 657 deletions(-) diff --git a/content/base/public/nsINode.h b/content/base/public/nsINode.h index 9dad2e925fcc..4016169610f8 100644 --- a/content/base/public/nsINode.h +++ b/content/base/public/nsINode.h @@ -1812,6 +1812,12 @@ extern const nsIID kThisPtrOffsetsSID; 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) \ diff --git a/content/svg/content/src/DOMSVGStringList.cpp b/content/svg/content/src/DOMSVGStringList.cpp index 8240d70df9f6..9a311fe6d62c 100644 --- a/content/svg/content/src/DOMSVGStringList.cpp +++ b/content/svg/content/src/DOMSVGStringList.cpp @@ -185,7 +185,7 @@ SVGStringList & DOMSVGStringList::InternalList() { if (mIsConditionalProcessingAttribute) { - nsCOMPtr tests = do_QueryInterface(mElement); + nsCOMPtr tests = do_QueryObject(mElement); return tests->mStringListAttributes[mAttrEnum]; } return mElement->GetStringListInfo().mStringLists[mAttrEnum]; diff --git a/content/svg/content/src/SVGAElement.cpp b/content/svg/content/src/SVGAElement.cpp index 96da97b6b5c6..0425be0a33d9 100644 --- a/content/svg/content/src/SVGAElement.cpp +++ b/content/svg/content/src/SVGAElement.cpp @@ -49,7 +49,6 @@ SVGAElement::SVGAElement(already_AddRefed aNodeInfo) : SVGAElementBase(aNodeInfo), Link(this) { - SetIsDOMBinding(); } already_AddRefed diff --git a/content/svg/content/src/SVGAElement.h b/content/svg/content/src/SVGAElement.h index 383671b66ffa..16556b642990 100644 --- a/content/svg/content/src/SVGAElement.h +++ b/content/svg/content/src/SVGAElement.h @@ -20,7 +20,6 @@ namespace dom { typedef SVGGraphicsElement SVGAElementBase; class SVGAElement MOZ_FINAL : public SVGAElementBase, - public nsIDOMSVGElement, public nsILink, public Link { @@ -31,15 +30,8 @@ protected: 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); @@ -73,8 +65,6 @@ public: virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute, bool aNotify); - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed Href(); already_AddRefed Target(); diff --git a/content/svg/content/src/SVGAltGlyphElement.cpp b/content/svg/content/src/SVGAltGlyphElement.cpp index 0daa10158d5e..319a528fa3ca 100644 --- a/content/svg/content/src/SVGAltGlyphElement.cpp +++ b/content/svg/content/src/SVGAltGlyphElement.cpp @@ -37,7 +37,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGAltGlyphElement, SVGAltGlyphElementBase, SVGAltGlyphElement::SVGAltGlyphElement(already_AddRefed aNodeInfo) : SVGAltGlyphElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGAltGlyphElement.h b/content/svg/content/src/SVGAltGlyphElement.h index 32a2e9f0e8bc..316159f65c8c 100644 --- a/content/svg/content/src/SVGAltGlyphElement.h +++ b/content/svg/content/src/SVGAltGlyphElement.h @@ -17,8 +17,7 @@ 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, @@ -27,23 +26,14 @@ protected: 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 Href(); void GetGlyphRef(nsAString & aGlyphRef); diff --git a/content/svg/content/src/SVGAnimateElement.h b/content/svg/content/src/SVGAnimateElement.h index bef8b94b21ee..88b67bc4c3c5 100644 --- a/content/svg/content/src/SVGAnimateElement.h +++ b/content/svg/content/src/SVGAnimateElement.h @@ -15,8 +15,7 @@ nsresult NS_NewSVGAnimateElement(nsIContent **aResult, namespace mozilla { namespace dom { -class SVGAnimateElement MOZ_FINAL : public SVGAnimationElement, - public nsIDOMSVGElement +class SVGAnimateElement MOZ_FINAL : public SVGAnimationElement { protected: SVGAnimateElement(already_AddRefed aNodeInfo); @@ -29,20 +28,13 @@ protected: 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 diff --git a/content/svg/content/src/SVGAnimateMotionElement.h b/content/svg/content/src/SVGAnimateMotionElement.h index 79823c5e5283..f4cd9446f0d3 100644 --- a/content/svg/content/src/SVGAnimateMotionElement.h +++ b/content/svg/content/src/SVGAnimateMotionElement.h @@ -15,8 +15,7 @@ nsresult NS_NewSVGAnimateMotionElement(nsIContent **aResult, namespace mozilla { namespace dom { -class SVGAnimateMotionElement MOZ_FINAL : public SVGAnimationElement, - public nsIDOMSVGElement +class SVGAnimateMotionElement MOZ_FINAL : public SVGAnimationElement { protected: SVGAnimateMotionElement(already_AddRefed aNodeInfo); @@ -29,13 +28,8 @@ protected: 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; @@ -53,8 +47,6 @@ public: // Utility method to let our 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 diff --git a/content/svg/content/src/SVGAnimateTransformElement.h b/content/svg/content/src/SVGAnimateTransformElement.h index 0f4abe459c4a..785c25958113 100644 --- a/content/svg/content/src/SVGAnimateTransformElement.h +++ b/content/svg/content/src/SVGAnimateTransformElement.h @@ -15,8 +15,7 @@ nsresult NS_NewSVGAnimateTransformElement(nsIContent **aResult, namespace mozilla { namespace dom { -class SVGAnimateTransformElement MOZ_FINAL : public SVGAnimationElement, - public nsIDOMSVGElement +class SVGAnimateTransformElement MOZ_FINAL : public SVGAnimationElement { protected: SVGAnimateTransformElement(already_AddRefed aNodeInfo); @@ -29,13 +28,8 @@ protected: 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; @@ -47,8 +41,6 @@ public: // SVGAnimationElement virtual nsSMILAnimationFunction& AnimationFunction(); - - virtual nsIDOMNode* AsDOMNode() { return this; } }; } // namespace dom diff --git a/content/svg/content/src/SVGAnimationElement.cpp b/content/svg/content/src/SVGAnimationElement.cpp index dd3356c611ea..63f49add673a 100644 --- a/content/svg/content/src/SVGAnimationElement.cpp +++ b/content/svg/content/src/SVGAnimationElement.cpp @@ -53,7 +53,6 @@ SVGAnimationElement::SVGAnimationElement(already_AddRefed aNodeInfo #pragma warning(pop) #endif { - SetIsDOMBinding(); } nsresult diff --git a/content/svg/content/src/SVGCircleElement.cpp b/content/svg/content/src/SVGCircleElement.cpp index 72d535f42464..102afb22d57c 100644 --- a/content/svg/content/src/SVGCircleElement.cpp +++ b/content/svg/content/src/SVGCircleElement.cpp @@ -39,7 +39,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGCircleElement, SVGCircleElementBase, SVGCircleElement::SVGCircleElement(already_AddRefed aNodeInfo) : SVGCircleElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGCircleElement.h b/content/svg/content/src/SVGCircleElement.h index a5c3609ac413..6ae3e0644b73 100644 --- a/content/svg/content/src/SVGCircleElement.h +++ b/content/svg/content/src/SVGCircleElement.h @@ -17,8 +17,7 @@ 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 aNodeInfo); @@ -27,14 +26,8 @@ protected: already_AddRefed 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; @@ -43,8 +36,6 @@ public: virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed Cx(); already_AddRefed Cy(); diff --git a/content/svg/content/src/SVGClipPathElement.cpp b/content/svg/content/src/SVGClipPathElement.cpp index feaae19d31e4..9455cea09ed3 100644 --- a/content/svg/content/src/SVGClipPathElement.cpp +++ b/content/svg/content/src/SVGClipPathElement.cpp @@ -41,7 +41,6 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGClipPathElement, SVGClipPathElementBase, SVGClipPathElement::SVGClipPathElement(already_AddRefed aNodeInfo) : SVGClipPathElementBase(aNodeInfo) { - SetIsDOMBinding(); } already_AddRefed diff --git a/content/svg/content/src/SVGClipPathElement.h b/content/svg/content/src/SVGClipPathElement.h index 89cad255655c..57c6cf7598b1 100644 --- a/content/svg/content/src/SVGClipPathElement.h +++ b/content/svg/content/src/SVGClipPathElement.h @@ -21,7 +21,6 @@ namespace dom { typedef SVGTransformableElement SVGClipPathElementBase; class SVGClipPathElement MOZ_FINAL : public SVGClipPathElementBase, - public nsIDOMSVGElement, public nsIDOMSVGUnitTypes { friend class ::nsSVGClipPathFrame; @@ -33,19 +32,11 @@ protected: 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 ClipPathUnits(); diff --git a/content/svg/content/src/SVGComponentTransferFunctionElement.h b/content/svg/content/src/SVGComponentTransferFunctionElement.h index 5ed4b690c60e..a288d253e2ae 100644 --- a/content/svg/content/src/SVGComponentTransferFunctionElement.h +++ b/content/svg/content/src/SVGComponentTransferFunctionElement.h @@ -30,7 +30,6 @@ protected: SVGComponentTransferFunctionElement(already_AddRefed aNodeInfo) : SVGComponentTransferFunctionElementBase(aNodeInfo) { - SetIsDOMBinding(); } public: @@ -84,8 +83,7 @@ nsresult NS_NewSVGFEFuncRElement( namespace mozilla { namespace dom { -class SVGFEFuncRElement : public SVGComponentTransferFunctionElement, - public nsIDOMSVGElement +class SVGFEFuncRElement : public SVGComponentTransferFunctionElement { friend nsresult (::NS_NewSVGFEFuncRElement( nsIContent** aResult, already_AddRefed aNodeInfo)); @@ -94,19 +92,12 @@ protected: : 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; }; @@ -120,8 +111,7 @@ nsresult NS_NewSVGFEFuncGElement( namespace mozilla { namespace dom { -class SVGFEFuncGElement : public SVGComponentTransferFunctionElement, - public nsIDOMSVGElement +class SVGFEFuncGElement : public SVGComponentTransferFunctionElement { friend nsresult (::NS_NewSVGFEFuncGElement( nsIContent** aResult, already_AddRefed aNodeInfo)); @@ -135,14 +125,8 @@ public: 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; }; @@ -156,8 +140,7 @@ nsresult NS_NewSVGFEFuncBElement( namespace mozilla { namespace dom { -class SVGFEFuncBElement : public SVGComponentTransferFunctionElement, - public nsIDOMSVGElement +class SVGFEFuncBElement : public SVGComponentTransferFunctionElement { friend nsresult (::NS_NewSVGFEFuncBElement( nsIContent** aResult, already_AddRefed aNodeInfo)); @@ -171,14 +154,8 @@ public: 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; }; @@ -192,8 +169,7 @@ nsresult NS_NewSVGFEFuncAElement( namespace mozilla { namespace dom { -class SVGFEFuncAElement : public SVGComponentTransferFunctionElement, - public nsIDOMSVGElement +class SVGFEFuncAElement : public SVGComponentTransferFunctionElement { friend nsresult (::NS_NewSVGFEFuncAElement( nsIContent** aResult, already_AddRefed aNodeInfo)); @@ -207,14 +183,8 @@ public: 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; }; diff --git a/content/svg/content/src/SVGDefsElement.cpp b/content/svg/content/src/SVGDefsElement.cpp index 45863fefb8a4..325ed596acc6 100644 --- a/content/svg/content/src/SVGDefsElement.cpp +++ b/content/svg/content/src/SVGDefsElement.cpp @@ -30,7 +30,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGDefsElement, SVGGraphicsElement, SVGDefsElement::SVGDefsElement(already_AddRefed aNodeInfo) : SVGGraphicsElement(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGDefsElement.h b/content/svg/content/src/SVGDefsElement.h index 85f483ff9051..9c54bb9c0272 100644 --- a/content/svg/content/src/SVGDefsElement.h +++ b/content/svg/content/src/SVGDefsElement.h @@ -14,8 +14,7 @@ nsresult NS_NewSVGDefsElement(nsIContent **aResult, 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, @@ -24,21 +23,13 @@ protected: 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 diff --git a/content/svg/content/src/SVGDescElement.cpp b/content/svg/content/src/SVGDescElement.cpp index 7bd6286a93d6..3d41a5b3b1b9 100644 --- a/content/svg/content/src/SVGDescElement.cpp +++ b/content/svg/content/src/SVGDescElement.cpp @@ -30,7 +30,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGDescElement, SVGDescElementBase, SVGDescElement::SVGDescElement(already_AddRefed aNodeInfo) : SVGDescElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGDescElement.h b/content/svg/content/src/SVGDescElement.h index e8a7e9277f47..4b8120fe6293 100644 --- a/content/svg/content/src/SVGDescElement.h +++ b/content/svg/content/src/SVGDescElement.h @@ -16,8 +16,7 @@ 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, @@ -27,18 +26,10 @@ protected: 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 diff --git a/content/svg/content/src/SVGEllipseElement.cpp b/content/svg/content/src/SVGEllipseElement.cpp index 55d2da281f4e..32013e3ca999 100644 --- a/content/svg/content/src/SVGEllipseElement.cpp +++ b/content/svg/content/src/SVGEllipseElement.cpp @@ -39,7 +39,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGEllipseElement, SVGEllipseElementBase, SVGEllipseElement::SVGEllipseElement(already_AddRefed aNodeInfo) : SVGEllipseElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGEllipseElement.h b/content/svg/content/src/SVGEllipseElement.h index ca05964afbbd..1cd8fe27c7f2 100644 --- a/content/svg/content/src/SVGEllipseElement.h +++ b/content/svg/content/src/SVGEllipseElement.h @@ -17,8 +17,7 @@ namespace dom { typedef nsSVGPathGeometryElement SVGEllipseElementBase; -class SVGEllipseElement MOZ_FINAL : public SVGEllipseElementBase, - public nsIDOMSVGElement +class SVGEllipseElement MOZ_FINAL : public SVGEllipseElementBase { protected: SVGEllipseElement(already_AddRefed aNodeInfo); @@ -27,14 +26,8 @@ protected: already_AddRefed 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; @@ -43,8 +36,6 @@ public: virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed Cx(); already_AddRefed Cy(); diff --git a/content/svg/content/src/SVGFEBlendElement.h b/content/svg/content/src/SVGFEBlendElement.h index 5da09147f0af..929d6256e43b 100644 --- a/content/svg/content/src/SVGFEBlendElement.h +++ b/content/svg/content/src/SVGFEBlendElement.h @@ -23,8 +23,7 @@ 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 aNodeInfo)); @@ -32,7 +31,6 @@ protected: SVGFEBlendElement(already_AddRefed aNodeInfo) : SVGFEBlendElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; @@ -49,15 +47,8 @@ public: virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; } virtual void GetSourceImageNames(nsTArray& 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 In1(); already_AddRefed In2(); diff --git a/content/svg/content/src/SVGFEColorMatrixElement.h b/content/svg/content/src/SVGFEColorMatrixElement.h index 79213b2b98f8..1102a8dc02a4 100644 --- a/content/svg/content/src/SVGFEColorMatrixElement.h +++ b/content/svg/content/src/SVGFEColorMatrixElement.h @@ -24,8 +24,7 @@ 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 aNodeInfo)); @@ -33,7 +32,6 @@ protected: SVGFEColorMatrixElement(already_AddRefed aNodeInfo) : SVGFEColorMatrixElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -50,15 +48,8 @@ public: virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; } virtual void GetSourceImageNames(nsTArray& 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 In1(); already_AddRefed Type(); diff --git a/content/svg/content/src/SVGFEComponentTransferElement.h b/content/svg/content/src/SVGFEComponentTransferElement.h index 51dc18ec7fa2..3386c95d53e0 100644 --- a/content/svg/content/src/SVGFEComponentTransferElement.h +++ b/content/svg/content/src/SVGFEComponentTransferElement.h @@ -16,8 +16,7 @@ nsresult NS_NewSVGFEComponentTransferElement(nsIContent **aResult, namespace mozilla { namespace dom { -class SVGFEComponentTransferElement : public SVGFEComponentTransferElementBase, - public nsIDOMSVGElement +class SVGFEComponentTransferElement : public SVGFEComponentTransferElementBase { friend nsresult (::NS_NewSVGFEComponentTransferElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -25,7 +24,6 @@ protected: SVGFEComponentTransferElement(already_AddRefed aNodeInfo) : SVGFEComponentTransferElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -42,16 +40,9 @@ public: virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; } virtual void GetSourceImageNames(nsTArray& 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 In1(); diff --git a/content/svg/content/src/SVGFECompositeElement.cpp b/content/svg/content/src/SVGFECompositeElement.cpp index b2a62ca5f424..4f2a662b8cef 100644 --- a/content/svg/content/src/SVGFECompositeElement.cpp +++ b/content/svg/content/src/SVGFECompositeElement.cpp @@ -66,9 +66,6 @@ NS_INTERFACE_MAP_END_INHERITING(SVGFECompositeElementBase) NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFECompositeElement) -//---------------------------------------------------------------------- -// SVGFECompositeElement methods - already_AddRefed SVGFECompositeElement::In1() { diff --git a/content/svg/content/src/SVGFECompositeElement.h b/content/svg/content/src/SVGFECompositeElement.h index a9394d1d1600..dc5130665508 100644 --- a/content/svg/content/src/SVGFECompositeElement.h +++ b/content/svg/content/src/SVGFECompositeElement.h @@ -27,8 +27,7 @@ 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 aNodeInfo)); @@ -36,7 +35,6 @@ protected: SVGFECompositeElement(already_AddRefed aNodeInfo) : SVGFECompositeElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -55,15 +53,9 @@ public: virtual nsIntRect ComputeTargetBBox(const nsTArray& 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 In1(); already_AddRefed In2(); diff --git a/content/svg/content/src/SVGFEConvolveMatrixElement.h b/content/svg/content/src/SVGFEConvolveMatrixElement.h index 2599c0f8d484..55dfa370ef6a 100644 --- a/content/svg/content/src/SVGFEConvolveMatrixElement.h +++ b/content/svg/content/src/SVGFEConvolveMatrixElement.h @@ -26,8 +26,7 @@ class SVGAnimatedBoolean; typedef nsSVGFE SVGFEConvolveMatrixElementBase; -class SVGFEConvolveMatrixElement : public SVGFEConvolveMatrixElementBase, - public nsIDOMSVGElement +class SVGFEConvolveMatrixElement : public SVGFEConvolveMatrixElementBase { friend nsresult (::NS_NewSVGFEConvolveMatrixElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -35,7 +34,6 @@ protected: SVGFEConvolveMatrixElement(already_AddRefed aNodeInfo) : SVGFEConvolveMatrixElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -58,15 +56,9 @@ public: virtual nsIntRect ComputeChangeBBox(const nsTArray& 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 In1(); already_AddRefed OrderX(); diff --git a/content/svg/content/src/SVGFEDiffuseLightingElement.h b/content/svg/content/src/SVGFEDiffuseLightingElement.h index 3c6c5ff7853c..d6e65bd5d02b 100644 --- a/content/svg/content/src/SVGFEDiffuseLightingElement.h +++ b/content/svg/content/src/SVGFEDiffuseLightingElement.h @@ -16,8 +16,7 @@ namespace dom { typedef nsSVGFELightingElement SVGFEDiffuseLightingElementBase; -class SVGFEDiffuseLightingElement : public SVGFEDiffuseLightingElementBase, - public nsIDOMSVGElement +class SVGFEDiffuseLightingElement : public SVGFEDiffuseLightingElementBase { friend nsresult (::NS_NewSVGFEDiffuseLightingElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -25,7 +24,6 @@ protected: SVGFEDiffuseLightingElement(already_AddRefed aNodeInfo) : SVGFEDiffuseLightingElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -33,17 +31,11 @@ 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 In1(); already_AddRefed SurfaceScale(); diff --git a/content/svg/content/src/SVGFEDisplacementMapElement.h b/content/svg/content/src/SVGFEDisplacementMapElement.h index 318758382b43..4321a551325c 100644 --- a/content/svg/content/src/SVGFEDisplacementMapElement.h +++ b/content/svg/content/src/SVGFEDisplacementMapElement.h @@ -17,8 +17,7 @@ namespace dom { typedef nsSVGFE SVGFEDisplacementMapElementBase; -class SVGFEDisplacementMapElement : public SVGFEDisplacementMapElementBase, - public nsIDOMSVGElement +class SVGFEDisplacementMapElement : public SVGFEDisplacementMapElementBase { protected: friend nsresult (::NS_NewSVGFEDisplacementMapElement(nsIContent **aResult, @@ -26,7 +25,6 @@ protected: SVGFEDisplacementMapElement(already_AddRefed aNodeInfo) : SVGFEDisplacementMapElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -49,15 +47,9 @@ public: virtual nsIntRect ComputeChangeBBox(const nsTArray& 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 In1(); already_AddRefed In2(); diff --git a/content/svg/content/src/SVGFEDistantLightElement.cpp b/content/svg/content/src/SVGFEDistantLightElement.cpp index e610f3ce7b01..caee470d657c 100644 --- a/content/svg/content/src/SVGFEDistantLightElement.cpp +++ b/content/svg/content/src/SVGFEDistantLightElement.cpp @@ -39,7 +39,6 @@ NS_INTERFACE_MAP_END_INHERITING(SVGFEDistantLightElementBase) NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEDistantLightElement) -//---------------------------------------------------------------------- // nsFEUnstyledElement methods bool diff --git a/content/svg/content/src/SVGFEDistantLightElement.h b/content/svg/content/src/SVGFEDistantLightElement.h index 675c98454560..89037847d361 100644 --- a/content/svg/content/src/SVGFEDistantLightElement.h +++ b/content/svg/content/src/SVGFEDistantLightElement.h @@ -17,8 +17,7 @@ nsresult NS_NewSVGFEDistantLightElement(nsIContent **aResult, namespace mozilla { namespace dom { -class SVGFEDistantLightElement : public SVGFEDistantLightElementBase, - public nsIDOMSVGElement +class SVGFEDistantLightElement : public SVGFEDistantLightElementBase { friend nsresult (::NS_NewSVGFEDistantLightElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -26,7 +25,6 @@ protected: SVGFEDistantLightElement(already_AddRefed aNodeInfo) : SVGFEDistantLightElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -34,17 +32,11 @@ 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 Azimuth(); already_AddRefed Elevation(); diff --git a/content/svg/content/src/SVGFEFloodElement.h b/content/svg/content/src/SVGFEFloodElement.h index 1ddb555d01a3..965a84257e4f 100644 --- a/content/svg/content/src/SVGFEFloodElement.h +++ b/content/svg/content/src/SVGFEFloodElement.h @@ -16,8 +16,7 @@ namespace dom { typedef nsSVGFE SVGFEFloodElementBase; -class SVGFEFloodElement : public SVGFEFloodElementBase, - public nsIDOMSVGElement +class SVGFEFloodElement : public SVGFEFloodElementBase { friend nsresult (::NS_NewSVGFEFloodElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -25,7 +24,6 @@ protected: SVGFEFloodElement(already_AddRefed aNodeInfo) : SVGFEFloodElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; @@ -43,17 +41,11 @@ public: virtual nsIntRect ComputeTargetBBox(const nsTArray& 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; } diff --git a/content/svg/content/src/SVGFEGaussianBlurElement.cpp b/content/svg/content/src/SVGFEGaussianBlurElement.cpp index c218e790e86f..451fcf861162 100644 --- a/content/svg/content/src/SVGFEGaussianBlurElement.cpp +++ b/content/svg/content/src/SVGFEGaussianBlurElement.cpp @@ -44,10 +44,8 @@ NS_INTERFACE_MAP_END_INHERITING(SVGFEGaussianBlurElementBase) //---------------------------------------------------------------------- // nsIDOMNode methods - NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEGaussianBlurElement) - //---------------------------------------------------------------------- already_AddRefed diff --git a/content/svg/content/src/SVGFEGaussianBlurElement.h b/content/svg/content/src/SVGFEGaussianBlurElement.h index 8f830b6ddd7e..9f70d77ed3d0 100644 --- a/content/svg/content/src/SVGFEGaussianBlurElement.h +++ b/content/svg/content/src/SVGFEGaussianBlurElement.h @@ -18,8 +18,7 @@ namespace dom { typedef nsSVGFE SVGFEGaussianBlurElementBase; -class SVGFEGaussianBlurElement : public SVGFEGaussianBlurElementBase, - public nsIDOMSVGElement +class SVGFEGaussianBlurElement : public SVGFEGaussianBlurElementBase { friend nsresult (::NS_NewSVGFEGaussianBlurElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -27,7 +26,6 @@ protected: SVGFEGaussianBlurElement(already_AddRefed aNodeInfo) : SVGFEGaussianBlurElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -50,15 +48,9 @@ public: virtual nsIntRect ComputeChangeBBox(const nsTArray& 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 In1(); already_AddRefed StdDeviationX(); diff --git a/content/svg/content/src/SVGFEImageElement.cpp b/content/svg/content/src/SVGFEImageElement.cpp index 0b344b3141c6..5b447f241ff2 100644 --- a/content/svg/content/src/SVGFEImageElement.cpp +++ b/content/svg/content/src/SVGFEImageElement.cpp @@ -46,7 +46,6 @@ NS_INTERFACE_MAP_END_INHERITING(SVGFEImageElementBase) SVGFEImageElement::SVGFEImageElement(already_AddRefed aNodeInfo) : SVGFEImageElementBase(aNodeInfo) { - SetIsDOMBinding(); // We start out broken AddStatesSilently(NS_EVENT_STATE_BROKEN); } diff --git a/content/svg/content/src/SVGFEImageElement.h b/content/svg/content/src/SVGFEImageElement.h index a9c9f007a9d7..e6e6ae1f857b 100644 --- a/content/svg/content/src/SVGFEImageElement.h +++ b/content/svg/content/src/SVGFEImageElement.h @@ -19,7 +19,6 @@ namespace dom { typedef nsSVGFE SVGFEImageElementBase; class SVGFEImageElement : public SVGFEImageElementBase, - public nsIDOMSVGElement, public nsImageLoadingContent { friend class ::SVGFEImageFrame; @@ -47,11 +46,6 @@ public: virtual nsIntRect ComputeTargetBBox(const nsTArray& 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; @@ -69,8 +63,6 @@ public: void MaybeLoadSVGImage(); - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed Href(); already_AddRefed PreserveAspectRatio(); diff --git a/content/svg/content/src/SVGFEMergeElement.h b/content/svg/content/src/SVGFEMergeElement.h index 3854e62af8cc..cbba70f5b176 100644 --- a/content/svg/content/src/SVGFEMergeElement.h +++ b/content/svg/content/src/SVGFEMergeElement.h @@ -16,8 +16,7 @@ namespace dom { typedef nsSVGFE SVGFEMergeElementBase; -class SVGFEMergeElement : public SVGFEMergeElementBase, - public nsIDOMSVGElement +class SVGFEMergeElement : public SVGFEMergeElementBase { friend nsresult (::NS_NewSVGFEMergeElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -25,7 +24,6 @@ protected: SVGFEMergeElement(already_AddRefed aNodeInfo) : SVGFEMergeElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; @@ -40,15 +38,8 @@ public: virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; } virtual void GetSourceImageNames(nsTArray& 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(); diff --git a/content/svg/content/src/SVGFEMergeNodeElement.h b/content/svg/content/src/SVGFEMergeNodeElement.h index 644e787ca7fd..06e43f00b133 100644 --- a/content/svg/content/src/SVGFEMergeNodeElement.h +++ b/content/svg/content/src/SVGFEMergeNodeElement.h @@ -16,8 +16,7 @@ namespace dom { typedef SVGFEUnstyledElement SVGFEMergeNodeElementBase; -class SVGFEMergeNodeElement : public SVGFEMergeNodeElementBase, - public nsIDOMSVGElement +class SVGFEMergeNodeElement : public SVGFEMergeNodeElementBase { friend nsresult (::NS_NewSVGFEMergeNodeElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -25,18 +24,11 @@ protected: SVGFEMergeNodeElement(already_AddRefed 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( @@ -44,8 +36,6 @@ public: const nsSVGString* GetIn1() { return &mStringAttributes[IN1]; } - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed In1(); diff --git a/content/svg/content/src/SVGFEMorphologyElement.h b/content/svg/content/src/SVGFEMorphologyElement.h index fc0c46893fff..6738f9dd9cc5 100644 --- a/content/svg/content/src/SVGFEMorphologyElement.h +++ b/content/svg/content/src/SVGFEMorphologyElement.h @@ -19,8 +19,7 @@ namespace dom { typedef nsSVGFE SVGFEMorphologyElementBase; -class SVGFEMorphologyElement : public SVGFEMorphologyElementBase, - public nsIDOMSVGElement +class SVGFEMorphologyElement : public SVGFEMorphologyElementBase { friend nsresult (::NS_NewSVGFEMorphologyElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -28,7 +27,6 @@ protected: SVGFEMorphologyElement(already_AddRefed aNodeInfo) : SVGFEMorphologyElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -51,15 +49,8 @@ public: virtual nsIntRect ComputeChangeBBox(const nsTArray& 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 In1(); already_AddRefed Operator(); diff --git a/content/svg/content/src/SVGFEOffsetElement.h b/content/svg/content/src/SVGFEOffsetElement.h index 1b6c8e0926f0..572ca96cc5b6 100644 --- a/content/svg/content/src/SVGFEOffsetElement.h +++ b/content/svg/content/src/SVGFEOffsetElement.h @@ -18,8 +18,7 @@ namespace dom { typedef nsSVGFE SVGFEOffsetElementBase; -class SVGFEOffsetElement : public SVGFEOffsetElementBase, - public nsIDOMSVGElement +class SVGFEOffsetElement : public SVGFEOffsetElementBase { friend nsresult (::NS_NewSVGFEOffsetElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -27,7 +26,6 @@ protected: SVGFEOffsetElement(already_AddRefed aNodeInfo) : SVGFEOffsetElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -50,15 +48,8 @@ public: virtual nsIntRect ComputeChangeBBox(const nsTArray& 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 In1(); already_AddRefed Dx(); diff --git a/content/svg/content/src/SVGFEPointLightElement.h b/content/svg/content/src/SVGFEPointLightElement.h index f2375b51b988..892fe4222264 100644 --- a/content/svg/content/src/SVGFEPointLightElement.h +++ b/content/svg/content/src/SVGFEPointLightElement.h @@ -17,8 +17,7 @@ nsresult NS_NewSVGFEPointLightElement(nsIContent **aResult, namespace mozilla { namespace dom { -class SVGFEPointLightElement : public SVGFEPointLightElementBase, - public nsIDOMSVGElement +class SVGFEPointLightElement : public SVGFEPointLightElementBase { friend nsresult (::NS_NewSVGFEPointLightElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -26,7 +25,6 @@ protected: SVGFEPointLightElement(already_AddRefed aNodeInfo) : SVGFEPointLightElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; @@ -34,17 +32,11 @@ 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 X(); already_AddRefed Y(); diff --git a/content/svg/content/src/SVGFESpecularLightingElement.h b/content/svg/content/src/SVGFESpecularLightingElement.h index ab13b596a726..1c2e5a5fb75e 100644 --- a/content/svg/content/src/SVGFESpecularLightingElement.h +++ b/content/svg/content/src/SVGFESpecularLightingElement.h @@ -18,8 +18,7 @@ namespace dom { typedef nsSVGFELightingElement SVGFESpecularLightingElementBase; -class SVGFESpecularLightingElement : public SVGFESpecularLightingElementBase, - public nsIDOMSVGElement +class SVGFESpecularLightingElement : public SVGFESpecularLightingElementBase { friend nsresult (::NS_NewSVGFESpecularLightingElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -27,7 +26,6 @@ protected: SVGFESpecularLightingElement(already_AddRefed aNodeInfo) : SVGFESpecularLightingElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -35,10 +33,6 @@ 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, @@ -48,8 +42,6 @@ public: virtual bool AttributeAffectsRendering( int32_t aNameSpaceID, nsIAtom* aAttribute) const; - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed In1(); already_AddRefed SurfaceScale(); diff --git a/content/svg/content/src/SVGFESpotLightElement.h b/content/svg/content/src/SVGFESpotLightElement.h index 6aa78df28c39..accad0d029ee 100644 --- a/content/svg/content/src/SVGFESpotLightElement.h +++ b/content/svg/content/src/SVGFESpotLightElement.h @@ -19,8 +19,7 @@ namespace dom { typedef SVGFEUnstyledElement SVGFESpotLightElementBase; -class SVGFESpotLightElement : public SVGFESpotLightElementBase, - public nsIDOMSVGElement +class SVGFESpotLightElement : public SVGFESpotLightElementBase { friend nsresult (::NS_NewSVGFESpotLightElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -29,7 +28,6 @@ protected: SVGFESpotLightElement(already_AddRefed aNodeInfo) : SVGFESpotLightElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -37,17 +35,11 @@ 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 X(); already_AddRefed Y(); diff --git a/content/svg/content/src/SVGFETileElement.h b/content/svg/content/src/SVGFETileElement.h index ee71eb62e18c..4f65405c8946 100644 --- a/content/svg/content/src/SVGFETileElement.h +++ b/content/svg/content/src/SVGFETileElement.h @@ -16,8 +16,7 @@ namespace dom { typedef nsSVGFE SVGFETileElementBase; -class SVGFETileElement : public SVGFETileElementBase, - public nsIDOMSVGElement +class SVGFETileElement : public SVGFETileElementBase { friend nsresult (::NS_NewSVGFETileElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -25,7 +24,6 @@ protected: SVGFETileElement(already_AddRefed aNodeInfo) : SVGFETileElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext *cx, JSObject *scope) MOZ_OVERRIDE; @@ -50,15 +48,8 @@ public: virtual nsIntRect ComputeChangeBBox(const nsTArray& 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 In1(); diff --git a/content/svg/content/src/SVGFETurbulenceElement.h b/content/svg/content/src/SVGFETurbulenceElement.h index 1edb9bace274..3f60fcb25151 100644 --- a/content/svg/content/src/SVGFETurbulenceElement.h +++ b/content/svg/content/src/SVGFETurbulenceElement.h @@ -20,8 +20,7 @@ namespace dom { typedef nsSVGFE SVGFETurbulenceElementBase; -class SVGFETurbulenceElement : public SVGFETurbulenceElementBase, - public nsIDOMSVGElement +class SVGFETurbulenceElement : public SVGFETurbulenceElementBase { friend nsresult (::NS_NewSVGFETurbulenceElement(nsIContent **aResult, already_AddRefed aNodeInfo)); @@ -29,7 +28,6 @@ protected: SVGFETurbulenceElement(already_AddRefed aNodeInfo) : SVGFETurbulenceElementBase(aNodeInfo) { - SetIsDOMBinding(); } virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE; @@ -49,15 +47,8 @@ public: virtual nsIntRect ComputeTargetBBox(const nsTArray& 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 BaseFrequencyX(); already_AddRefed BaseFrequencyY(); diff --git a/content/svg/content/src/SVGFilterElement.cpp b/content/svg/content/src/SVGFilterElement.cpp index 00d4a0172479..a85f4bb38fd9 100644 --- a/content/svg/content/src/SVGFilterElement.cpp +++ b/content/svg/content/src/SVGFilterElement.cpp @@ -65,7 +65,6 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGFilterElement, SVGFilterElementBase, SVGFilterElement::SVGFilterElement(already_AddRefed aNodeInfo) : SVGFilterElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGFilterElement.h b/content/svg/content/src/SVGFilterElement.h index b1403c36d573..32bc21a259e8 100644 --- a/content/svg/content/src/SVGFilterElement.h +++ b/content/svg/content/src/SVGFilterElement.h @@ -26,7 +26,6 @@ namespace dom { class SVGAnimatedLength; class SVGFilterElement : public SVGFilterElementBase, - public nsIDOMSVGElement, public nsIDOMSVGUnitTypes { friend class ::nsSVGFilterFrame; @@ -39,15 +38,9 @@ protected: 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; @@ -55,8 +48,6 @@ public: // Invalidate users of this filter void Invalidate(); - virtual nsIDOMNode* AsDOMNode() { return this; } - // nsSVGSVGElement methods: virtual bool HasValidDimensions() const; diff --git a/content/svg/content/src/SVGForeignObjectElement.cpp b/content/svg/content/src/SVGForeignObjectElement.cpp index 9ca4eab5ae52..c0751012d249 100644 --- a/content/svg/content/src/SVGForeignObjectElement.cpp +++ b/content/svg/content/src/SVGForeignObjectElement.cpp @@ -41,7 +41,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGForeignObjectElement, SVGGraphicsElement, SVGForeignObjectElement::SVGForeignObjectElement(already_AddRefed aNodeInfo) : SVGGraphicsElement(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGForeignObjectElement.h b/content/svg/content/src/SVGForeignObjectElement.h index bd6b9112a71d..e8386a4f16b3 100644 --- a/content/svg/content/src/SVGForeignObjectElement.h +++ b/content/svg/content/src/SVGForeignObjectElement.h @@ -17,8 +17,7 @@ class nsSVGForeignObjectFrame; namespace mozilla { namespace dom { -class SVGForeignObjectElement MOZ_FINAL : public SVGGraphicsElement, - public nsIDOMSVGElement +class SVGForeignObjectElement MOZ_FINAL : public SVGGraphicsElement { friend class ::nsSVGForeignObjectFrame; @@ -29,15 +28,9 @@ protected: 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; @@ -48,8 +41,6 @@ public: virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed X(); already_AddRefed Y(); diff --git a/content/svg/content/src/SVGGElement.cpp b/content/svg/content/src/SVGGElement.cpp index 171f6c346944..0ad5e9cc7dc2 100644 --- a/content/svg/content/src/SVGGElement.cpp +++ b/content/svg/content/src/SVGGElement.cpp @@ -30,7 +30,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGGElement, SVGGraphicsElement, SVGGElement::SVGGElement(already_AddRefed aNodeInfo) : SVGGraphicsElement(aNodeInfo) { - SetIsDOMBinding(); } diff --git a/content/svg/content/src/SVGGElement.h b/content/svg/content/src/SVGGElement.h index 8bdd5a3e5a2a..dc81ada05e4d 100644 --- a/content/svg/content/src/SVGGElement.h +++ b/content/svg/content/src/SVGGElement.h @@ -14,8 +14,7 @@ nsresult NS_NewSVGGElement(nsIContent **aResult, namespace mozilla { namespace dom { -class SVGGElement MOZ_FINAL : public SVGGraphicsElement, - public nsIDOMSVGElement +class SVGGElement MOZ_FINAL : public SVGGraphicsElement { protected: SVGGElement(already_AddRefed aNodeInfo); @@ -24,21 +23,13 @@ protected: already_AddRefed 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 diff --git a/content/svg/content/src/SVGGradientElement.cpp b/content/svg/content/src/SVGGradientElement.cpp index 18bba492380d..575869e91d87 100644 --- a/content/svg/content/src/SVGGradientElement.cpp +++ b/content/svg/content/src/SVGGradientElement.cpp @@ -62,7 +62,6 @@ NS_INTERFACE_MAP_END_INHERITING(SVGGradientElementBase) SVGGradientElement::SVGGradientElement(already_AddRefed aNodeInfo) : SVGGradientElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGGradientElement.h b/content/svg/content/src/SVGGradientElement.h index 595b41f98bae..b04c0821dc47 100644 --- a/content/svg/content/src/SVGGradientElement.h +++ b/content/svg/content/src/SVGGradientElement.h @@ -90,7 +90,6 @@ protected: typedef SVGGradientElement SVGLinearGradientElementBase; class SVGLinearGradientElement : public SVGLinearGradientElementBase - , public nsIDOMSVGElement { friend class ::nsSVGLinearGradientFrame; friend nsresult @@ -103,19 +102,10 @@ protected: 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 X1(); already_AddRefed Y1(); @@ -136,7 +126,6 @@ protected: typedef SVGGradientElement SVGRadialGradientElementBase; class SVGRadialGradientElement : public SVGRadialGradientElementBase - , public nsIDOMSVGElement { friend class ::nsSVGRadialGradientFrame; friend nsresult @@ -149,19 +138,11 @@ protected: 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 Cx(); already_AddRefed Cy(); diff --git a/content/svg/content/src/SVGImageElement.cpp b/content/svg/content/src/SVGImageElement.cpp index 47bb4f5a4e12..95997e4db851 100644 --- a/content/svg/content/src/SVGImageElement.cpp +++ b/content/svg/content/src/SVGImageElement.cpp @@ -53,7 +53,6 @@ NS_IMPL_ISUPPORTS_INHERITED6(SVGImageElement, SVGImageElementBase, SVGImageElement::SVGImageElement(already_AddRefed aNodeInfo) : SVGImageElementBase(aNodeInfo) { - SetIsDOMBinding(); // We start out broken AddStatesSilently(NS_EVENT_STATE_BROKEN); } diff --git a/content/svg/content/src/SVGImageElement.h b/content/svg/content/src/SVGImageElement.h index 93792916f7d1..47c43bc5d99b 100644 --- a/content/svg/content/src/SVGImageElement.h +++ b/content/svg/content/src/SVGImageElement.h @@ -24,7 +24,6 @@ namespace dom { class DOMSVGAnimatedPreserveAspectRatio; class SVGImageElement : public SVGImageElementBase, - public nsIDOMSVGElement, public nsImageLoadingContent { friend class ::nsSVGImageFrame; @@ -41,11 +40,6 @@ public: 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); @@ -72,8 +66,6 @@ public: bool IsImageSrcSetDisabled() const; - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed X(); already_AddRefed Y(); diff --git a/content/svg/content/src/SVGLineElement.cpp b/content/svg/content/src/SVGLineElement.cpp index 3dc4e000b0d2..1ddd49a7470b 100644 --- a/content/svg/content/src/SVGLineElement.cpp +++ b/content/svg/content/src/SVGLineElement.cpp @@ -39,7 +39,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGLineElement, SVGLineElementBase, SVGLineElement::SVGLineElement(already_AddRefed aNodeInfo) : SVGLineElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGLineElement.h b/content/svg/content/src/SVGLineElement.h index 3725b972917f..c3d9f5de4dd6 100644 --- a/content/svg/content/src/SVGLineElement.h +++ b/content/svg/content/src/SVGLineElement.h @@ -17,8 +17,7 @@ namespace dom { typedef nsSVGPathGeometryElement SVGLineElementBase; -class SVGLineElement MOZ_FINAL : public SVGLineElementBase, - public nsIDOMSVGElement +class SVGLineElement MOZ_FINAL : public SVGLineElementBase { protected: SVGLineElement(already_AddRefed aNodeInfo); @@ -30,11 +29,6 @@ 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; @@ -45,8 +39,6 @@ public: virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed X1(); already_AddRefed Y1(); diff --git a/content/svg/content/src/SVGMPathElement.cpp b/content/svg/content/src/SVGMPathElement.cpp index bf8ee0e32527..562a84265e83 100644 --- a/content/svg/content/src/SVGMPathElement.cpp +++ b/content/svg/content/src/SVGMPathElement.cpp @@ -66,7 +66,6 @@ SVGMPathElement::SVGMPathElement(already_AddRefed aNodeInfo) #pragma warning(pop) #endif { - SetIsDOMBinding(); } SVGMPathElement::~SVGMPathElement() diff --git a/content/svg/content/src/SVGMPathElement.h b/content/svg/content/src/SVGMPathElement.h index ea856f5237da..919c1431d090 100644 --- a/content/svg/content/src/SVGMPathElement.h +++ b/content/svg/content/src/SVGMPathElement.h @@ -21,7 +21,6 @@ namespace dom { class SVGPathElement; class SVGMPathElement MOZ_FINAL : public SVGMPathElementBase, - public nsIDOMSVGElement, public nsStubMutationObserver { protected: @@ -41,11 +40,6 @@ public: 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, @@ -66,8 +60,6 @@ public: // this returns nullptr. SVGPathElement* GetReferencedPath(); - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed Href(); diff --git a/content/svg/content/src/SVGMarkerElement.cpp b/content/svg/content/src/SVGMarkerElement.cpp index 9193adecd6e8..5e94d6e5a886 100644 --- a/content/svg/content/src/SVGMarkerElement.cpp +++ b/content/svg/content/src/SVGMarkerElement.cpp @@ -101,7 +101,6 @@ nsSVGOrientType::ToDOMAnimatedEnum(nsSVGElement *aSVGElement) SVGMarkerElement::SVGMarkerElement(already_AddRefed aNodeInfo) : SVGMarkerElementBase(aNodeInfo), mCoordCtx(nullptr) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGMarkerElement.h b/content/svg/content/src/SVGMarkerElement.h index ab3c320f4c54..1d1022193aa7 100644 --- a/content/svg/content/src/SVGMarkerElement.h +++ b/content/svg/content/src/SVGMarkerElement.h @@ -86,8 +86,7 @@ private: typedef nsSVGElement SVGMarkerElementBase; -class SVGMarkerElement : public SVGMarkerElementBase, - public nsIDOMSVGElement +class SVGMarkerElement : public SVGMarkerElementBase { friend class ::nsSVGMarkerFrame; @@ -102,11 +101,6 @@ public: 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; @@ -126,8 +120,6 @@ public: nsSVGOrientType* GetOrientType() { return &mOrientType; } - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed ViewBox(); already_AddRefed PreserveAspectRatio(); diff --git a/content/svg/content/src/SVGMaskElement.cpp b/content/svg/content/src/SVGMaskElement.cpp index ad80577181fd..ee1d33f22eaf 100644 --- a/content/svg/content/src/SVGMaskElement.cpp +++ b/content/svg/content/src/SVGMaskElement.cpp @@ -56,7 +56,6 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGMaskElement, SVGMaskElementBase, SVGMaskElement::SVGMaskElement(already_AddRefed aNodeInfo) : SVGMaskElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGMaskElement.h b/content/svg/content/src/SVGMaskElement.h index 96b3c6fabe20..7ef27b6960db 100644 --- a/content/svg/content/src/SVGMaskElement.h +++ b/content/svg/content/src/SVGMaskElement.h @@ -24,7 +24,6 @@ namespace dom { typedef nsSVGElement SVGMaskElementBase; class SVGMaskElement MOZ_FINAL : public SVGMaskElementBase, - public nsIDOMSVGElement, public nsIDOMSVGUnitTypes { friend class ::nsSVGMaskFrame; @@ -39,16 +38,10 @@ 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; diff --git a/content/svg/content/src/SVGMetadataElement.cpp b/content/svg/content/src/SVGMetadataElement.cpp index ce1ee35354e7..fe2b2266dd7f 100644 --- a/content/svg/content/src/SVGMetadataElement.cpp +++ b/content/svg/content/src/SVGMetadataElement.cpp @@ -31,7 +31,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGMetadataElement, SVGMetadataElementBase, SVGMetadataElement::SVGMetadataElement(already_AddRefed aNodeInfo) : SVGMetadataElementBase(aNodeInfo) { - SetIsDOMBinding(); } diff --git a/content/svg/content/src/SVGMetadataElement.h b/content/svg/content/src/SVGMetadataElement.h index 646a26247dd8..f7ed76369048 100644 --- a/content/svg/content/src/SVGMetadataElement.h +++ b/content/svg/content/src/SVGMetadataElement.h @@ -16,8 +16,7 @@ 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, @@ -32,14 +31,7 @@ public: 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 diff --git a/content/svg/content/src/SVGPathElement.cpp b/content/svg/content/src/SVGPathElement.cpp index 159176d4efa7..2d5a9fae9d14 100644 --- a/content/svg/content/src/SVGPathElement.cpp +++ b/content/svg/content/src/SVGPathElement.cpp @@ -42,7 +42,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGPathElement, SVGPathElementBase, SVGPathElement::SVGPathElement(already_AddRefed aNodeInfo) : SVGPathElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGPathElement.h b/content/svg/content/src/SVGPathElement.h index 28416484d85c..1f7c42b4d403 100644 --- a/content/svg/content/src/SVGPathElement.h +++ b/content/svg/content/src/SVGPathElement.h @@ -24,8 +24,7 @@ class nsISVGPoint; namespace dom { -class SVGPathElement MOZ_FINAL : public SVGPathElementBase, - public nsIDOMSVGElement +class SVGPathElement MOZ_FINAL : public SVGPathElementBase { friend class nsSVGPathFrame; @@ -36,16 +35,10 @@ protected: SVGPathElement(already_AddRefed 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; @@ -63,8 +56,6 @@ public: // nsIContent interface virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; - virtual nsIDOMNode* AsDOMNode() { return this; } - virtual SVGAnimatedPathSegList* GetAnimPathSegList() { return &mD; } diff --git a/content/svg/content/src/SVGPatternElement.cpp b/content/svg/content/src/SVGPatternElement.cpp index e41d77988961..166aa139485e 100644 --- a/content/svg/content/src/SVGPatternElement.cpp +++ b/content/svg/content/src/SVGPatternElement.cpp @@ -62,7 +62,6 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGPatternElement, SVGPatternElementBase, SVGPatternElement::SVGPatternElement(already_AddRefed aNodeInfo) : SVGPatternElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGPatternElement.h b/content/svg/content/src/SVGPatternElement.h index 64eb1b998535..1bde8888427d 100644 --- a/content/svg/content/src/SVGPatternElement.h +++ b/content/svg/content/src/SVGPatternElement.h @@ -28,7 +28,6 @@ namespace dom { typedef nsSVGElement SVGPatternElementBase; class SVGPatternElement MOZ_FINAL : public SVGPatternElementBase, - public nsIDOMSVGElement, public nsIDOMSVGUnitTypes { friend class ::nsSVGPatternFrame; @@ -45,17 +44,11 @@ public: // 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; diff --git a/content/svg/content/src/SVGPolygonElement.cpp b/content/svg/content/src/SVGPolygonElement.cpp index 253d1bbc8718..fd4ebe6bf1b8 100644 --- a/content/svg/content/src/SVGPolygonElement.cpp +++ b/content/svg/content/src/SVGPolygonElement.cpp @@ -32,7 +32,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGPolygonElement, SVGPolygonElementBase, SVGPolygonElement::SVGPolygonElement(already_AddRefed aNodeInfo) : SVGPolygonElementBase(aNodeInfo) { - } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGPolygonElement.h b/content/svg/content/src/SVGPolygonElement.h index ffe69a54ffac..95ff27971f19 100644 --- a/content/svg/content/src/SVGPolygonElement.h +++ b/content/svg/content/src/SVGPolygonElement.h @@ -16,8 +16,7 @@ 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 aNodeInfo); @@ -30,18 +29,11 @@ public: 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 *aMarks); virtual void ConstructPath(gfxContext *aCtx); virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; - - virtual nsIDOMNode* AsDOMNode() { return this; } }; } // namespace dom diff --git a/content/svg/content/src/SVGPolylineElement.cpp b/content/svg/content/src/SVGPolylineElement.cpp index 3eeb083fb773..ce1c7e5960b3 100644 --- a/content/svg/content/src/SVGPolylineElement.cpp +++ b/content/svg/content/src/SVGPolylineElement.cpp @@ -30,7 +30,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGPolylineElement, SVGPolylineElementBase, SVGPolylineElement::SVGPolylineElement(already_AddRefed aNodeInfo) : SVGPolylineElementBase(aNodeInfo) { - } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGPolylineElement.h b/content/svg/content/src/SVGPolylineElement.h index b8d67627e674..fffd3fe7e155 100644 --- a/content/svg/content/src/SVGPolylineElement.h +++ b/content/svg/content/src/SVGPolylineElement.h @@ -16,8 +16,7 @@ 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 aNodeInfo); @@ -30,14 +29,8 @@ public: 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 diff --git a/content/svg/content/src/SVGRectElement.cpp b/content/svg/content/src/SVGRectElement.cpp index 2e684091e72e..272bded73e28 100644 --- a/content/svg/content/src/SVGRectElement.cpp +++ b/content/svg/content/src/SVGRectElement.cpp @@ -45,7 +45,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGRectElement, SVGRectElementBase, SVGRectElement::SVGRectElement(already_AddRefed aNodeInfo) : SVGRectElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGRectElement.h b/content/svg/content/src/SVGRectElement.h index 4a03aa666285..ae347cd98397 100644 --- a/content/svg/content/src/SVGRectElement.h +++ b/content/svg/content/src/SVGRectElement.h @@ -17,8 +17,7 @@ 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 aNodeInfo); @@ -30,11 +29,6 @@ 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; @@ -43,8 +37,6 @@ public: virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed X(); already_AddRefed Y(); diff --git a/content/svg/content/src/SVGSVGElement.cpp b/content/svg/content/src/SVGSVGElement.cpp index fdbed1a60f34..5958e5c75dad 100644 --- a/content/svg/content/src/SVGSVGElement.cpp +++ b/content/svg/content/src/SVGSVGElement.cpp @@ -174,7 +174,6 @@ SVGSVGElement::SVGSVGElement(already_AddRefed aNodeInfo, mHasChildrenOnlyTransform(false), mUseCurrentView(false) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGSVGElement.h b/content/svg/content/src/SVGSVGElement.h index b1e680864a18..ccf1ca794939 100644 --- a/content/svg/content/src/SVGSVGElement.h +++ b/content/svg/content/src/SVGSVGElement.h @@ -81,8 +81,7 @@ public: typedef SVGGraphicsElement SVGSVGElementBase; -class SVGSVGElement MOZ_FINAL : public SVGSVGElementBase, - public nsIDOMSVGElement +class SVGSVGElement MOZ_FINAL : public SVGSVGElementBase { friend class ::nsSVGOuterSVGFrame; friend class ::nsSVGInnerSVGFrame; @@ -102,11 +101,6 @@ public: 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 @@ -218,8 +212,6 @@ public: mViewportHeight = aSize.height; } - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed X(); already_AddRefed Y(); diff --git a/content/svg/content/src/SVGScriptElement.cpp b/content/svg/content/src/SVGScriptElement.cpp index e5d084782d5d..8ef87ad72cb4 100644 --- a/content/svg/content/src/SVGScriptElement.cpp +++ b/content/svg/content/src/SVGScriptElement.cpp @@ -43,7 +43,6 @@ SVGScriptElement::SVGScriptElement(already_AddRefed aNodeInfo, : SVGScriptElementBase(aNodeInfo) , nsScriptElement(aFromParser) { - SetIsDOMBinding(); AddMutationObserver(this); } diff --git a/content/svg/content/src/SVGScriptElement.h b/content/svg/content/src/SVGScriptElement.h index dd0d518c9f06..aee7cd10a18e 100644 --- a/content/svg/content/src/SVGScriptElement.h +++ b/content/svg/content/src/SVGScriptElement.h @@ -24,7 +24,6 @@ namespace dom { typedef nsSVGElement SVGScriptElementBase; class SVGScriptElement MOZ_FINAL : public SVGScriptElementBase, - public nsIDOMSVGElement, public nsScriptElement { protected: @@ -41,12 +40,6 @@ public: 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); @@ -70,8 +63,6 @@ public: 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); diff --git a/content/svg/content/src/SVGSetElement.h b/content/svg/content/src/SVGSetElement.h index 913f845e7213..e42fcec7cf87 100644 --- a/content/svg/content/src/SVGSetElement.h +++ b/content/svg/content/src/SVGSetElement.h @@ -15,8 +15,7 @@ nsresult NS_NewSVGSetElement(nsIContent **aResult, namespace mozilla { namespace dom { -class SVGSetElement MOZ_FINAL : public SVGAnimationElement, - public nsIDOMSVGElement +class SVGSetElement MOZ_FINAL : public SVGAnimationElement { protected: SVGSetElement(already_AddRefed aNodeInfo); @@ -32,17 +31,11 @@ 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 diff --git a/content/svg/content/src/SVGStopElement.cpp b/content/svg/content/src/SVGStopElement.cpp index 7208aa00d792..a0a8a1a9f70c 100644 --- a/content/svg/content/src/SVGStopElement.cpp +++ b/content/svg/content/src/SVGStopElement.cpp @@ -33,7 +33,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGStopElement, SVGStopElementBase, SVGStopElement::SVGStopElement(already_AddRefed aNodeInfo) : SVGStopElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGStopElement.h b/content/svg/content/src/SVGStopElement.h index b75e3732ba84..2c72c3db129b 100644 --- a/content/svg/content/src/SVGStopElement.h +++ b/content/svg/content/src/SVGStopElement.h @@ -17,8 +17,7 @@ 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, @@ -31,19 +30,11 @@ public: 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 Offset(); diff --git a/content/svg/content/src/SVGStyleElement.cpp b/content/svg/content/src/SVGStyleElement.cpp index 72ed079e0c6d..e5d10da71b88 100644 --- a/content/svg/content/src/SVGStyleElement.cpp +++ b/content/svg/content/src/SVGStyleElement.cpp @@ -47,7 +47,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END SVGStyleElement::SVGStyleElement(already_AddRefed aNodeInfo) : SVGStyleElementBase(aNodeInfo) { - SetIsDOMBinding(); AddMutationObserver(this); } diff --git a/content/svg/content/src/SVGStyleElement.h b/content/svg/content/src/SVGStyleElement.h index f524d8c013e9..e241acc89e2d 100644 --- a/content/svg/content/src/SVGStyleElement.h +++ b/content/svg/content/src/SVGStyleElement.h @@ -19,7 +19,6 @@ namespace mozilla { namespace dom { class SVGStyleElement MOZ_FINAL : public SVGStyleElementBase, - public nsIDOMSVGElement, public nsStyleLinkElement, public nsStubMutationObserver { @@ -36,11 +35,6 @@ public: 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, @@ -70,8 +64,6 @@ public: 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); diff --git a/content/svg/content/src/SVGSwitchElement.cpp b/content/svg/content/src/SVGSwitchElement.cpp index 2cf5fb395af9..1b76cabde676 100644 --- a/content/svg/content/src/SVGSwitchElement.cpp +++ b/content/svg/content/src/SVGSwitchElement.cpp @@ -47,7 +47,6 @@ NS_INTERFACE_MAP_END_INHERITING(SVGSwitchElementBase) SVGSwitchElement::SVGSwitchElement(already_AddRefed aNodeInfo) : SVGSwitchElementBase(aNodeInfo) { - SetIsDOMBinding(); } void diff --git a/content/svg/content/src/SVGSwitchElement.h b/content/svg/content/src/SVGSwitchElement.h index 1fb0e2cb56b5..0789e71d6702 100644 --- a/content/svg/content/src/SVGSwitchElement.h +++ b/content/svg/content/src/SVGSwitchElement.h @@ -16,8 +16,7 @@ namespace dom { typedef SVGGraphicsElement SVGSwitchElementBase; -class SVGSwitchElement MOZ_FINAL : public SVGSwitchElementBase, - public nsIDOMSVGElement +class SVGSwitchElement MOZ_FINAL : public SVGSwitchElementBase { friend class nsSVGSwitchFrame; protected: @@ -36,11 +35,6 @@ public: 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); @@ -50,8 +44,6 @@ public: 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(); } diff --git a/content/svg/content/src/SVGSymbolElement.cpp b/content/svg/content/src/SVGSymbolElement.cpp index 2155031fb34f..634c0dd68156 100644 --- a/content/svg/content/src/SVGSymbolElement.cpp +++ b/content/svg/content/src/SVGSymbolElement.cpp @@ -30,7 +30,6 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGSymbolElement, SVGSymbolElementBase, SVGSymbolElement::SVGSymbolElement(already_AddRefed aNodeInfo) : SVGSymbolElementBase(aNodeInfo) { - SetIsDOMBinding(); } diff --git a/content/svg/content/src/SVGSymbolElement.h b/content/svg/content/src/SVGSymbolElement.h index a817907a9696..2d43895c5ed7 100644 --- a/content/svg/content/src/SVGSymbolElement.h +++ b/content/svg/content/src/SVGSymbolElement.h @@ -20,7 +20,6 @@ namespace dom { typedef nsSVGElement SVGSymbolElementBase; class SVGSymbolElement MOZ_FINAL : public SVGSymbolElementBase, - public nsIDOMSVGElement, public SVGTests { protected: @@ -34,18 +33,11 @@ public: 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 ViewBox(); already_AddRefed PreserveAspectRatio(); diff --git a/content/svg/content/src/SVGTSpanElement.cpp b/content/svg/content/src/SVGTSpanElement.cpp index 5f87731655c1..8dfa24c75f71 100644 --- a/content/svg/content/src/SVGTSpanElement.cpp +++ b/content/svg/content/src/SVGTSpanElement.cpp @@ -32,7 +32,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGTSpanElement, SVGTSpanElementBase, SVGTSpanElement::SVGTSpanElement(already_AddRefed aNodeInfo) : SVGTSpanElementBase(aNodeInfo) { - SetIsDOMBinding(); } diff --git a/content/svg/content/src/SVGTSpanElement.h b/content/svg/content/src/SVGTSpanElement.h index 573ddd36c16d..ca47a9e2945e 100644 --- a/content/svg/content/src/SVGTSpanElement.h +++ b/content/svg/content/src/SVGTSpanElement.h @@ -16,8 +16,7 @@ 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, @@ -30,18 +29,10 @@ public: 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 diff --git a/content/svg/content/src/SVGTests.cpp b/content/svg/content/src/SVGTests.cpp index 8ac13710f375..ed6d63fda6ef 100644 --- a/content/svg/content/src/SVGTests.cpp +++ b/content/svg/content/src/SVGTests.cpp @@ -31,7 +31,8 @@ SVGTests::SVGTests() already_AddRefed SVGTests::RequiredFeatures() { - nsCOMPtr element = do_QueryInterface(this); + nsCOMPtr elem = do_QueryInterface(this); + nsSVGElement* element = static_cast(elem.get()); return DOMSVGStringList::GetDOMWrapper( &mStringListAttributes[FEATURES], element, true, FEATURES).get(); } @@ -39,7 +40,8 @@ SVGTests::RequiredFeatures() already_AddRefed SVGTests::RequiredExtensions() { - nsCOMPtr element = do_QueryInterface(this); + nsCOMPtr elem = do_QueryInterface(this); + nsSVGElement* element = static_cast(elem.get()); return DOMSVGStringList::GetDOMWrapper( &mStringListAttributes[EXTENSIONS], element, true, EXTENSIONS).get(); } @@ -47,7 +49,8 @@ SVGTests::RequiredExtensions() already_AddRefed SVGTests::SystemLanguage() { - nsCOMPtr element = do_QueryInterface(this); + nsCOMPtr elem = do_QueryInterface(this); + nsSVGElement* element = static_cast(elem.get()); return DOMSVGStringList::GetDOMWrapper( &mStringListAttributes[LANGUAGE], element, true, LANGUAGE).get(); } @@ -229,7 +232,8 @@ SVGTests::GetAttrValue(uint8_t aAttrEnum, nsAttrValue& aValue) const void SVGTests::MaybeInvalidate() { - nsCOMPtr element = do_QueryInterface(this); + nsCOMPtr elem = do_QueryInterface(this); + nsSVGElement* element = static_cast(elem.get()); nsIContent* parent = element->GetFlattenedTreeParent(); diff --git a/content/svg/content/src/SVGTextElement.cpp b/content/svg/content/src/SVGTextElement.cpp index c7200cb56762..f71dfeb5398f 100644 --- a/content/svg/content/src/SVGTextElement.cpp +++ b/content/svg/content/src/SVGTextElement.cpp @@ -30,7 +30,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGTextElement, SVGTextElementBase, SVGTextElement::SVGTextElement(already_AddRefed aNodeInfo) : SVGTextElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGTextElement.h b/content/svg/content/src/SVGTextElement.h index 315033ca17dc..55534598385b 100644 --- a/content/svg/content/src/SVGTextElement.h +++ b/content/svg/content/src/SVGTextElement.h @@ -16,8 +16,7 @@ namespace dom { typedef SVGTextPositioningElement SVGTextElementBase; -class SVGTextElement MOZ_FINAL : public SVGTextElementBase, - public nsIDOMSVGElement +class SVGTextElement MOZ_FINAL : public SVGTextElementBase { protected: SVGTextElement(already_AddRefed aNodeInfo); @@ -31,18 +30,10 @@ public: 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 diff --git a/content/svg/content/src/SVGTextPathElement.cpp b/content/svg/content/src/SVGTextPathElement.cpp index 6c624299911e..015c0ab7a647 100644 --- a/content/svg/content/src/SVGTextPathElement.cpp +++ b/content/svg/content/src/SVGTextPathElement.cpp @@ -71,7 +71,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGTextPathElement, SVGTextPathElementBase, SVGTextPathElement::SVGTextPathElement(already_AddRefed aNodeInfo) : SVGTextPathElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGTextPathElement.h b/content/svg/content/src/SVGTextPathElement.h index def4101b848a..3cf66db7e4ed 100644 --- a/content/svg/content/src/SVGTextPathElement.h +++ b/content/svg/content/src/SVGTextPathElement.h @@ -6,7 +6,6 @@ #ifndef mozilla_dom_SVGTextPathElement_h #define mozilla_dom_SVGTextPathElement_h -#include "nsIDOMSVGElement.h" #include "nsSVGEnum.h" #include "nsSVGLength2.h" #include "nsSVGString.h" @@ -34,8 +33,7 @@ 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; @@ -51,19 +49,11 @@ public: 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 diff --git a/content/svg/content/src/SVGTitleElement.cpp b/content/svg/content/src/SVGTitleElement.cpp index e68c405c1b76..fa78179d6a9b 100644 --- a/content/svg/content/src/SVGTitleElement.cpp +++ b/content/svg/content/src/SVGTitleElement.cpp @@ -31,7 +31,6 @@ NS_IMPL_ISUPPORTS_INHERITED4(SVGTitleElement, SVGTitleElementBase, SVGTitleElement::SVGTitleElement(already_AddRefed aNodeInfo) : SVGTitleElementBase(aNodeInfo) { - SetIsDOMBinding(); AddMutationObserver(this); } diff --git a/content/svg/content/src/SVGTitleElement.h b/content/svg/content/src/SVGTitleElement.h index 83408efd6efa..586f7607bcdc 100644 --- a/content/svg/content/src/SVGTitleElement.h +++ b/content/svg/content/src/SVGTitleElement.h @@ -17,8 +17,7 @@ namespace mozilla { namespace dom { class SVGTitleElement MOZ_FINAL : public SVGTitleElementBase, - public nsStubMutationObserver, - public nsIDOMSVGElement + public nsStubMutationObserver { protected: friend nsresult (::NS_NewSVGTitleElement(nsIContent **aResult, @@ -32,11 +31,6 @@ public: 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 @@ -53,8 +47,6 @@ public: bool aNullParent = true); virtual void DoneAddingChildren(bool aHaveNotified); - - virtual nsIDOMNode* AsDOMNode() { return this; } private: void SendTitleChangeEvent(bool aBound); }; diff --git a/content/svg/content/src/SVGTransformableElement.h b/content/svg/content/src/SVGTransformableElement.h index 2b74651ba5eb..62a70a4e8060 100644 --- a/content/svg/content/src/SVGTransformableElement.h +++ b/content/svg/content/src/SVGTransformableElement.h @@ -59,6 +59,8 @@ public: return nsGkAtoms::transform; } + virtual bool IsTransformable() { return true; } + protected: // nsSVGElement overrides diff --git a/content/svg/content/src/SVGUseElement.cpp b/content/svg/content/src/SVGUseElement.cpp index 8f51fdb1fed2..297dd06b8c15 100644 --- a/content/svg/content/src/SVGUseElement.cpp +++ b/content/svg/content/src/SVGUseElement.cpp @@ -83,7 +83,6 @@ SVGUseElement::SVGUseElement(already_AddRefed aNodeInfo) #pragma warning(pop) #endif { - SetIsDOMBinding(); } SVGUseElement::~SVGUseElement() diff --git a/content/svg/content/src/SVGUseElement.h b/content/svg/content/src/SVGUseElement.h index b79d254435a4..bd41bb794631 100644 --- a/content/svg/content/src/SVGUseElement.h +++ b/content/svg/content/src/SVGUseElement.h @@ -31,7 +31,6 @@ namespace dom { typedef SVGGraphicsElement SVGUseElementBase; class SVGUseElement MOZ_FINAL : public SVGUseElementBase, - public nsIDOMSVGElement, public nsStubMutationObserver { friend class ::nsSVGUseFrame; @@ -55,11 +54,6 @@ public: 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; } @@ -74,8 +68,6 @@ public: virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const; NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const; - virtual nsIDOMNode* AsDOMNode() { return this; } - // WebIDL already_AddRefed Href(); already_AddRefed X(); diff --git a/content/svg/content/src/SVGViewElement.cpp b/content/svg/content/src/SVGViewElement.cpp index 343b6df334c7..fe1217bb75d6 100644 --- a/content/svg/content/src/SVGViewElement.cpp +++ b/content/svg/content/src/SVGViewElement.cpp @@ -50,7 +50,6 @@ NS_IMPL_ISUPPORTS_INHERITED3(SVGViewElement, SVGViewElementBase, SVGViewElement::SVGViewElement(already_AddRefed aNodeInfo) : SVGViewElementBase(aNodeInfo) { - SetIsDOMBinding(); } //---------------------------------------------------------------------- diff --git a/content/svg/content/src/SVGViewElement.h b/content/svg/content/src/SVGViewElement.h index c02054b4a0dc..5b6a0b2880cf 100644 --- a/content/svg/content/src/SVGViewElement.h +++ b/content/svg/content/src/SVGViewElement.h @@ -30,8 +30,7 @@ class SVGFragmentIdentifier; namespace dom { class SVGSVGElement; -class SVGViewElement : public SVGViewElementBase, - public nsIDOMSVGElement +class SVGViewElement : public SVGViewElementBase { protected: friend class mozilla::SVGFragmentIdentifier; @@ -47,16 +46,8 @@ public: 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); diff --git a/content/svg/content/src/nsSVGElement.cpp b/content/svg/content/src/nsSVGElement.cpp index a20477897104..718803e30513 100644 --- a/content/svg/content/src/nsSVGElement.cpp +++ b/content/svg/content/src/nsSVGElement.cpp @@ -67,6 +67,7 @@ nsSVGEnumMapping nsSVGElement::sSVGUnitTypesMap[] = { nsSVGElement::nsSVGElement(already_AddRefed aNodeInfo) : nsSVGElementBase(aNodeInfo) { + SetIsDOMBinding(); } JSObject* @@ -214,8 +215,9 @@ 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) //---------------------------------------------------------------------- @@ -533,7 +535,7 @@ nsSVGElement::ParseAttribute(int32_t aNamespaceID, if (!foundMatch) { // Check for conditional processing attributes - nsCOMPtr tests(do_QueryInterface(this)); + nsCOMPtr tests = do_QueryObject(this); if (tests && tests->ParseConditionalProcessingAttribute( aAttribute, aValue, aResult)) { foundMatch = true; @@ -817,7 +819,7 @@ nsSVGElement::UnsetAttrInternal(int32_t aNamespaceID, nsIAtom* aName, } // Check for conditional processing attributes - nsCOMPtr tests(do_QueryInterface(this)); + nsCOMPtr tests = do_QueryObject(this); if (tests && tests->IsConditionalProcessingAttribute(aName)) { MaybeSerializeAttrBeforeRemoval(aName, aNotify); tests->UnsetAttr(aName); @@ -868,7 +870,7 @@ nsSVGElement::GetAttributeChangeHint(const nsIAtom* aAttribute, nsChangeHint retval = nsSVGElementBase::GetAttributeChangeHint(aAttribute, aModType); - nsCOMPtr tests(do_QueryInterface(const_cast(this))); + nsCOMPtr tests = do_QueryObject(const_cast(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 @@ -1120,8 +1122,7 @@ NS_IMETHODIMP nsSVGElement::GetViewportElement(nsIDOMSVGElement * *aViewportElement) { nsSVGElement* elem = GetViewportElement(); - nsCOMPtr svgElem = do_QueryInterface(elem); - svgElem.forget(aViewportElement); + NS_ADDREF(*aViewportElement = elem); return NS_OK; } @@ -2425,7 +2426,7 @@ nsSVGElement::WillChangeStringList(bool aIsConditionalProcessingAttribute, { nsIAtom* name; if (aIsConditionalProcessingAttribute) { - nsCOMPtr tests(do_QueryInterface(this)); + nsCOMPtr tests(do_QueryInterface(static_cast(this))); name = tests->GetAttrName(aAttrEnum); } else { name = *GetStringListInfo().mStringListInfo[aAttrEnum].mName; @@ -2443,7 +2444,7 @@ nsSVGElement::DidChangeStringList(bool aIsConditionalProcessingAttribute, nsCOMPtr tests; if (aIsConditionalProcessingAttribute) { - tests = do_QueryInterface(this); + tests = do_QueryObject(this); name = tests->GetAttrName(aAttrEnum); tests->GetAttrValue(aAttrEnum, newValue); } else { diff --git a/content/svg/content/src/nsSVGElement.h b/content/svg/content/src/nsSVGElement.h index a5d51ad36ddb..bfb25f5ec8be 100644 --- a/content/svg/content/src/nsSVGElement.h +++ b/content/svg/content/src/nsSVGElement.h @@ -63,6 +63,7 @@ struct nsSVGEnumMapping; typedef nsStyledElementNotElementCSSInlineStyle nsSVGElementBase; class nsSVGElement : public nsSVGElementBase // nsIContent + , public nsIDOMSVGElement { protected: nsSVGElement(already_AddRefed aNodeInfo); @@ -117,13 +118,9 @@ public: 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 @@ -297,6 +294,9 @@ public: return nullptr; } + virtual nsIDOMNode* AsDOMNode() MOZ_FINAL { return this; } + virtual bool IsTransformable() { return false; } + // WebIDL mozilla::dom::SVGSVGElement* GetOwnerSVGElement(mozilla::ErrorResult& rv); nsSVGElement* GetViewportElement(); diff --git a/content/svg/content/src/nsSVGPolyElement.cpp b/content/svg/content/src/nsSVGPolyElement.cpp index cf8fdb5ed9db..7692ebec69c9 100644 --- a/content/svg/content/src/nsSVGPolyElement.cpp +++ b/content/svg/content/src/nsSVGPolyElement.cpp @@ -25,7 +25,6 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGPolyElementBase) nsSVGPolyElement::nsSVGPolyElement(already_AddRefed aNodeInfo) : nsSVGPolyElementBase(aNodeInfo) { - SetIsDOMBinding(); } already_AddRefed diff --git a/content/svg/content/src/nsSVGUnknownElement.cpp b/content/svg/content/src/nsSVGUnknownElement.cpp index eb1685e6715f..509f8798474a 100644 --- a/content/svg/content/src/nsSVGUnknownElement.cpp +++ b/content/svg/content/src/nsSVGUnknownElement.cpp @@ -4,14 +4,12 @@ * 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, @@ -21,17 +19,10 @@ protected: 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) diff --git a/content/svg/document/src/SVGDocument.cpp b/content/svg/document/src/SVGDocument.cpp index 73fcc915b395..5f546b627841 100644 --- a/content/svg/document/src/SVGDocument.cpp +++ b/content/svg/document/src/SVGDocument.cpp @@ -78,7 +78,7 @@ NS_IMETHODIMP SVGDocument::GetRootElement(nsIDOMSVGElement** aRootElement) { ErrorResult rv; - nsCOMPtr retval = do_QueryInterface(GetRootElement(rv)); + nsCOMPtr retval = GetRootElement(rv); retval.forget(aRootElement); return rv.ErrorCode(); } diff --git a/layout/svg/nsSVGGFrame.cpp b/layout/svg/nsSVGGFrame.cpp index c17e4d3e0f86..e0b9dbf72ea0 100644 --- a/layout/svg/nsSVGGFrame.cpp +++ b/layout/svg/nsSVGGFrame.cpp @@ -33,8 +33,8 @@ nsSVGGFrame::Init(nsIContent* aContent, nsIFrame* aParent, nsIFrame* aPrevInFlow) { - nsCOMPtr transformable = do_QueryInterface(aContent); - NS_ASSERTION(transformable, + NS_ASSERTION(aContent->IsSVG() && + static_cast(aContent)->IsTransformable(), "The element doesn't support nsIDOMSVGTransformable"); nsSVGGFrameBase::Init(aContent, aParent, aPrevInFlow);