Bug 1181323 - Move nsSVGRenderingObserver's isupports/refcounting decl to subclasses, since one subclass (nsSVGFilterReference) already has its own redundant copy of the decl. r=dholbert

This commit is contained in:
Michael Layzell 2015-07-09 20:32:00 +02:00
parent f2e6cdf030
commit 7b46066b22
3 changed files with 15 additions and 10 deletions

View File

@ -47,6 +47,8 @@ namespace image {
// Helper-class: SVGRootRenderingObserver
class SVGRootRenderingObserver final : public nsSVGRenderingObserver {
public:
NS_DECL_ISUPPORTS
SVGRootRenderingObserver(SVGDocumentWrapper* aDocWrapper,
VectorImage* aVectorImage)
: nsSVGRenderingObserver()
@ -65,10 +67,6 @@ public:
mInObserverList = true;
}
virtual ~SVGRootRenderingObserver()
{
StopListening();
}
void ResumeHonoringInvalidations()
{
@ -76,6 +74,11 @@ public:
}
protected:
virtual ~SVGRootRenderingObserver()
{
StopListening();
}
virtual Element* GetTarget() override
{
return mDocWrapper->GetRootSVGElem();
@ -113,6 +116,8 @@ protected:
bool mHonoringInvalidations;
};
NS_IMPL_ISUPPORTS(SVGRootRenderingObserver, nsIMutationObserver)
class SVGParseCompleteListener final : public nsStubDocumentObserver {
public:
NS_DECL_ISUPPORTS

View File

@ -21,9 +21,6 @@
using namespace mozilla;
using namespace mozilla::dom;
// nsSVGRenderingObserver impl
NS_IMPL_ISUPPORTS(nsSVGRenderingObserver, nsIMutationObserver)
void
nsSVGRenderingObserver::StartListening()
{
@ -219,6 +216,8 @@ nsSVGFrameReferenceFromProperty::Get()
return mFrame;
}
NS_IMPL_ISUPPORTS(nsSVGRenderingObserverProperty, nsIMutationObserver)
void
nsSVGRenderingObserverProperty::DoUpdate()
{

View File

@ -55,9 +55,6 @@ public:
: mInObserverList(false)
{}
// nsISupports
NS_DECL_ISUPPORTS
// nsIMutationObserver
NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
@ -174,6 +171,8 @@ private:
class nsSVGRenderingObserverProperty : public nsSVGIDRenderingObserver {
public:
NS_DECL_ISUPPORTS
nsSVGRenderingObserverProperty(nsIURI* aURI, nsIFrame *aFrame,
bool aReferenceImage)
: nsSVGIDRenderingObserver(aURI, aFrame->GetContent(), aReferenceImage)
@ -181,6 +180,8 @@ public:
{}
protected:
virtual ~nsSVGRenderingObserverProperty() {}
virtual void DoUpdate() override;
nsSVGFrameReferenceFromProperty mFrameReference;