From 8b3f3d0df5af49c2589f989a42803723435e3e74 Mon Sep 17 00:00:00 2001 From: "Olli.Pettay%helsinki.fi" Date: Mon, 19 Feb 2007 20:03:34 +0000 Subject: [PATCH] Bug 370454, make nsISVGValueObserver inherit nsISupportsWeakReference, r=tor, sr=roc --- content/svg/content/src/nsISVGValueObserver.h | 18 +++++------------- content/svg/content/src/nsSVGAngle.cpp | 3 +-- content/svg/content/src/nsSVGAnimatedAngle.cpp | 3 +-- .../content/src/nsSVGAnimatedEnumeration.cpp | 3 +-- .../content/src/nsSVGAnimatedLengthList.cpp | 3 +-- .../content/src/nsSVGAnimatedNumberList.cpp | 3 +-- .../src/nsSVGAnimatedPreserveAspectRatio.cpp | 3 +-- content/svg/content/src/nsSVGAnimatedRect.cpp | 3 +-- .../content/src/nsSVGAnimatedTransformList.cpp | 3 +-- .../svg/content/src/nsSVGCoordCtxProvider.h | 3 +-- content/svg/content/src/nsSVGElement.h | 3 +-- content/svg/content/src/nsSVGLength.cpp | 3 +-- content/svg/content/src/nsSVGLengthList.cpp | 3 +-- content/svg/content/src/nsSVGNumberList.cpp | 3 +-- content/svg/content/src/nsSVGPathSegList.cpp | 3 +-- content/svg/content/src/nsSVGPointList.h | 3 +-- .../svg/content/src/nsSVGStringProxyValue.cpp | 3 +-- content/svg/content/src/nsSVGTransform.cpp | 3 +-- content/svg/content/src/nsSVGTransformList.h | 3 +-- layout/svg/base/src/nsSVGGeometryFrame.h | 3 +-- layout/svg/base/src/nsSVGGradientFrame.h | 3 +-- layout/svg/base/src/nsSVGInnerSVGFrame.cpp | 1 - layout/svg/base/src/nsSVGPatternFrame.h | 3 +-- layout/svg/base/src/nsSVGTextPathFrame.h | 3 +-- 24 files changed, 27 insertions(+), 58 deletions(-) diff --git a/content/svg/content/src/nsISVGValueObserver.h b/content/svg/content/src/nsISVGValueObserver.h index 132cc41de875..7fa5a3279f32 100644 --- a/content/svg/content/src/nsISVGValueObserver.h +++ b/content/svg/content/src/nsISVGValueObserver.h @@ -40,26 +40,18 @@ #ifndef __NS_ISVGVALUEOBSERVER_H__ #define __NS_ISVGVALUEOBSERVER_H__ -#include "nsISupports.h" - -class nsISVGValue; +#include "nsWeakReference.h" #include "nsISVGValue.h" //////////////////////////////////////////////////////////////////////// // nsISVGValueObserver -/* - Implementors of this interface also need to implement - nsISupportsWeakReference so that svg-values can store safe owning - refs. -*/ - -// {62fa63b3-d94b-47f3-8dc1-56353a0ee7ff} +// {485029a4-2449-45c1-9814-08f38132ca4c} #define NS_ISVGVALUEOBSERVER_IID \ -{ 0x62fa63b3, 0xd94b, 0x47f3, { 0x8d, 0xc1, 0x56, 0x35, 0x3a, 0xe, 0xe7, 0xff } } + { 0x485029a4, 0x2449, 0x45c1, \ + { 0x98, 0x14, 0x08, 0xf3, 0x81, 0x32, 0xca, 0x4c } } - -class nsISVGValueObserver : public nsISupports +class nsISVGValueObserver : public nsSupportsWeakReference { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISVGVALUEOBSERVER_IID) diff --git a/content/svg/content/src/nsSVGAngle.cpp b/content/svg/content/src/nsSVGAngle.cpp index 992dcef915e8..dddb84abf97c 100644 --- a/content/svg/content/src/nsSVGAngle.cpp +++ b/content/svg/content/src/nsSVGAngle.cpp @@ -53,8 +53,7 @@ class nsSVGAngle : public nsIDOMSVGAngle, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult NS_NewSVGAngle(nsIDOMSVGAngle** result, diff --git a/content/svg/content/src/nsSVGAnimatedAngle.cpp b/content/svg/content/src/nsSVGAnimatedAngle.cpp index 21631ed9be7c..3363065b9f44 100644 --- a/content/svg/content/src/nsSVGAnimatedAngle.cpp +++ b/content/svg/content/src/nsSVGAnimatedAngle.cpp @@ -46,8 +46,7 @@ class nsSVGAnimatedAngle : public nsIDOMSVGAnimatedAngle, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult NS_NewSVGAnimatedAngle(nsIDOMSVGAnimatedAngle** result, diff --git a/content/svg/content/src/nsSVGAnimatedEnumeration.cpp b/content/svg/content/src/nsSVGAnimatedEnumeration.cpp index 24bee7d5b13c..3652c7b4e181 100644 --- a/content/svg/content/src/nsSVGAnimatedEnumeration.cpp +++ b/content/svg/content/src/nsSVGAnimatedEnumeration.cpp @@ -47,8 +47,7 @@ class nsSVGAnimatedEnumeration : public nsIDOMSVGAnimatedEnumeration, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult NS_NewSVGAnimatedEnumeration(nsIDOMSVGAnimatedEnumeration** result, diff --git a/content/svg/content/src/nsSVGAnimatedLengthList.cpp b/content/svg/content/src/nsSVGAnimatedLengthList.cpp index bb1ecdb03180..a9fdac70ed4d 100644 --- a/content/svg/content/src/nsSVGAnimatedLengthList.cpp +++ b/content/svg/content/src/nsSVGAnimatedLengthList.cpp @@ -47,8 +47,7 @@ class nsSVGAnimatedLengthList : public nsIDOMSVGAnimatedLengthList, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult diff --git a/content/svg/content/src/nsSVGAnimatedNumberList.cpp b/content/svg/content/src/nsSVGAnimatedNumberList.cpp index 33fa784a4ddd..2f91eca76712 100644 --- a/content/svg/content/src/nsSVGAnimatedNumberList.cpp +++ b/content/svg/content/src/nsSVGAnimatedNumberList.cpp @@ -47,8 +47,7 @@ class nsSVGAnimatedNumberList : public nsIDOMSVGAnimatedNumberList, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult diff --git a/content/svg/content/src/nsSVGAnimatedPreserveAspectRatio.cpp b/content/svg/content/src/nsSVGAnimatedPreserveAspectRatio.cpp index e8e1f7d669da..262fac9e198a 100644 --- a/content/svg/content/src/nsSVGAnimatedPreserveAspectRatio.cpp +++ b/content/svg/content/src/nsSVGAnimatedPreserveAspectRatio.cpp @@ -47,8 +47,7 @@ class nsSVGAnimatedPreserveAspectRatio : public nsIDOMSVGAnimatedPreserveAspectRatio, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult NS_NewSVGAnimatedPreserveAspectRatio( diff --git a/content/svg/content/src/nsSVGAnimatedRect.cpp b/content/svg/content/src/nsSVGAnimatedRect.cpp index dab57880cd4d..c7016da44ab5 100644 --- a/content/svg/content/src/nsSVGAnimatedRect.cpp +++ b/content/svg/content/src/nsSVGAnimatedRect.cpp @@ -47,8 +47,7 @@ class nsSVGAnimatedRect : public nsIDOMSVGAnimatedRect, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult NS_NewSVGAnimatedRect(nsIDOMSVGAnimatedRect** result, diff --git a/content/svg/content/src/nsSVGAnimatedTransformList.cpp b/content/svg/content/src/nsSVGAnimatedTransformList.cpp index 36b9e69e89e2..8aafc84f7eee 100644 --- a/content/svg/content/src/nsSVGAnimatedTransformList.cpp +++ b/content/svg/content/src/nsSVGAnimatedTransformList.cpp @@ -47,8 +47,7 @@ class nsSVGAnimatedTransformList : public nsIDOMSVGAnimatedTransformList, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult diff --git a/content/svg/content/src/nsSVGCoordCtxProvider.h b/content/svg/content/src/nsSVGCoordCtxProvider.h index 45ed8696b382..b842cb6154b3 100644 --- a/content/svg/content/src/nsSVGCoordCtxProvider.h +++ b/content/svg/content/src/nsSVGCoordCtxProvider.h @@ -54,8 +54,7 @@ // hide the nsISVGValueObserver interface which we require to listen // in on viewbox (mCtxRect) size changes. -class nsSVGCoordCtxHolder : nsISVGValueObserver, - nsSupportsWeakReference +class nsSVGCoordCtxHolder : nsISVGValueObserver { private: friend class nsSVGCoordCtxProvider; diff --git a/content/svg/content/src/nsSVGElement.h b/content/svg/content/src/nsSVGElement.h index 0d0021c010d7..e4d0bcd11ca9 100644 --- a/content/svg/content/src/nsSVGElement.h +++ b/content/svg/content/src/nsSVGElement.h @@ -58,8 +58,7 @@ class nsSVGLength2; class nsSVGNumber2; class nsSVGElement : public nsGenericElement, // nsIContent - public nsISVGValueObserver, - public nsSupportsWeakReference // :nsISupportsWeakReference + public nsISVGValueObserver // :nsISupportsWeakReference { protected: nsSVGElement(nsINodeInfo *aNodeInfo); diff --git a/content/svg/content/src/nsSVGLength.cpp b/content/svg/content/src/nsSVGLength.cpp index 7f2e04a4ed3a..b59b5e70d568 100644 --- a/content/svg/content/src/nsSVGLength.cpp +++ b/content/svg/content/src/nsSVGLength.cpp @@ -55,8 +55,7 @@ class nsSVGLength : public nsISVGLength, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult NS_NewSVGLength(nsISVGLength** result, diff --git a/content/svg/content/src/nsSVGLengthList.cpp b/content/svg/content/src/nsSVGLengthList.cpp index 526af9485bb1..94e8cec61c94 100644 --- a/content/svg/content/src/nsSVGLengthList.cpp +++ b/content/svg/content/src/nsSVGLengthList.cpp @@ -53,8 +53,7 @@ class nsSVGLengthList : public nsISVGLengthList, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult NS_NewSVGLengthList(nsISVGLengthList** result); diff --git a/content/svg/content/src/nsSVGNumberList.cpp b/content/svg/content/src/nsSVGNumberList.cpp index d9c4fff3c557..c2e7ec53be8a 100644 --- a/content/svg/content/src/nsSVGNumberList.cpp +++ b/content/svg/content/src/nsSVGNumberList.cpp @@ -53,8 +53,7 @@ class nsSVGNumberList : public nsIDOMSVGNumberList, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult NS_NewSVGNumberList(nsIDOMSVGNumberList** result); diff --git a/content/svg/content/src/nsSVGPathSegList.cpp b/content/svg/content/src/nsSVGPathSegList.cpp index 607d751e9e0c..16471f27c11d 100644 --- a/content/svg/content/src/nsSVGPathSegList.cpp +++ b/content/svg/content/src/nsSVGPathSegList.cpp @@ -52,8 +52,7 @@ class nsSVGPathSegList : public nsIDOMSVGPathSegList, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult NS_NewSVGPathSegList(nsIDOMSVGPathSegList** result); diff --git a/content/svg/content/src/nsSVGPointList.h b/content/svg/content/src/nsSVGPointList.h index 1853d5dbfb8c..fcb99f95453b 100644 --- a/content/svg/content/src/nsSVGPointList.h +++ b/content/svg/content/src/nsSVGPointList.h @@ -48,8 +48,7 @@ class nsSVGPointList : public nsSVGValue, public nsIDOMSVGPointList, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { public: static nsresult Create(const nsAString& aValue, nsISVGValue** aResult); diff --git a/content/svg/content/src/nsSVGStringProxyValue.cpp b/content/svg/content/src/nsSVGStringProxyValue.cpp index e63e8e541b59..d787c3a6268c 100644 --- a/content/svg/content/src/nsSVGStringProxyValue.cpp +++ b/content/svg/content/src/nsSVGStringProxyValue.cpp @@ -57,8 +57,7 @@ class nsSVGStringProxyValue : public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { protected: friend nsresult diff --git a/content/svg/content/src/nsSVGTransform.cpp b/content/svg/content/src/nsSVGTransform.cpp index 4615f061a31f..97c2e9981f88 100644 --- a/content/svg/content/src/nsSVGTransform.cpp +++ b/content/svg/content/src/nsSVGTransform.cpp @@ -54,8 +54,7 @@ class nsSVGTransform : public nsIDOMSVGTransform, public nsSVGValue, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { public: static nsresult Create(nsIDOMSVGTransform** aResult); diff --git a/content/svg/content/src/nsSVGTransformList.h b/content/svg/content/src/nsSVGTransformList.h index 0c600c2573d5..4362c07493b4 100644 --- a/content/svg/content/src/nsSVGTransformList.h +++ b/content/svg/content/src/nsSVGTransformList.h @@ -47,8 +47,7 @@ class nsSVGTransformList : public nsSVGValue, public nsIDOMSVGTransformList, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { public: static nsresult Create(nsIDOMSVGTransformList** aResult); diff --git a/layout/svg/base/src/nsSVGGeometryFrame.h b/layout/svg/base/src/nsSVGGeometryFrame.h index 92b50b00d78a..d8d6e9b7564c 100644 --- a/layout/svg/base/src/nsSVGGeometryFrame.h +++ b/layout/svg/base/src/nsSVGGeometryFrame.h @@ -53,8 +53,7 @@ typedef nsFrame nsSVGGeometryFrameBase; * servers. */ class nsSVGGeometryFrame : public nsSVGGeometryFrameBase, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { public: nsSVGGeometryFrame(nsStyleContext *aContext); diff --git a/layout/svg/base/src/nsSVGGradientFrame.h b/layout/svg/base/src/nsSVGGradientFrame.h index 8206a9837ffd..4dc54b37ec8d 100644 --- a/layout/svg/base/src/nsSVGGradientFrame.h +++ b/layout/svg/base/src/nsSVGGradientFrame.h @@ -51,8 +51,7 @@ class nsIDOMSVGStopElement; typedef nsSVGPaintServerFrame nsSVGGradientFrameBase; class nsSVGGradientFrame : public nsSVGGradientFrameBase, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { public: // nsSVGPaintServerFrame methods: diff --git a/layout/svg/base/src/nsSVGInnerSVGFrame.cpp b/layout/svg/base/src/nsSVGInnerSVGFrame.cpp index 8038441f0972..d158fc93d6e3 100644 --- a/layout/svg/base/src/nsSVGInnerSVGFrame.cpp +++ b/layout/svg/base/src/nsSVGInnerSVGFrame.cpp @@ -50,7 +50,6 @@ typedef nsSVGDisplayContainerFrame nsSVGInnerSVGFrameBase; class nsSVGInnerSVGFrame : public nsSVGInnerSVGFrameBase, public nsISVGValueObserver, - public nsSupportsWeakReference, public nsISVGSVGFrame { friend nsIFrame* diff --git a/layout/svg/base/src/nsSVGPatternFrame.h b/layout/svg/base/src/nsSVGPatternFrame.h index 2aee1fd11542..84282e68945c 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.h +++ b/layout/svg/base/src/nsSVGPatternFrame.h @@ -54,8 +54,7 @@ class gfxContext; typedef nsSVGPaintServerFrame nsSVGPatternFrameBase; class nsSVGPatternFrame : public nsSVGPatternFrameBase, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { public: friend nsIFrame* NS_NewSVGPatternFrame(nsIPresShell* aPresShell, diff --git a/layout/svg/base/src/nsSVGTextPathFrame.h b/layout/svg/base/src/nsSVGTextPathFrame.h index 461423532ddf..b64dc606d9a2 100644 --- a/layout/svg/base/src/nsSVGTextPathFrame.h +++ b/layout/svg/base/src/nsSVGTextPathFrame.h @@ -50,8 +50,7 @@ class nsSVGFlattenedPath; typedef nsSVGTSpanFrame nsSVGTextPathFrameBase; class nsSVGTextPathFrame : public nsSVGTextPathFrameBase, - public nsISVGValueObserver, - public nsSupportsWeakReference + public nsISVGValueObserver { public: nsSVGTextPathFrame(nsStyleContext* aContext) : nsSVGTextPathFrameBase(aContext) {}