Bug 974135: Get rid of NS_IMETHOD in nsISVGChildFrame.h and its implementations r=dholbert

This commit is contained in:
Arnaud Sourioux 2014-02-19 14:34:31 -08:00
parent d1a758eccb
commit 105d9f5192
15 changed files with 65 additions and 64 deletions

View File

@ -3539,7 +3539,7 @@ ShouldPaintCaret(const TextRenderedRun& aThisRun, nsCaret* aCaret)
return false;
}
NS_IMETHODIMP
nsresult
SVGTextFrame::PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot)
@ -3674,7 +3674,7 @@ SVGTextFrame::PaintSVG(nsRenderingContext* aContext,
return NS_OK;
}
NS_IMETHODIMP_(nsIFrame*)
nsIFrame*
SVGTextFrame::GetFrameForPoint(const nsPoint& aPoint)
{
NS_ASSERTION(GetFirstPrincipalChild(), "must have a child frame");
@ -3718,7 +3718,7 @@ SVGTextFrame::GetFrameForPoint(const nsPoint& aPoint)
return hit;
}
NS_IMETHODIMP_(nsRect)
nsRect
SVGTextFrame::GetCoveredRegion()
{
return nsSVGUtils::TransformFrameRectToOuterSVG(

View File

@ -314,12 +314,12 @@ public:
// nsISVGChildFrame interface:
virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
NS_IMETHOD PaintSVG(nsRenderingContext* aContext,
const nsIntRect* aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint& aPoint) MOZ_OVERRIDE;
virtual nsresult PaintSVG(nsRenderingContext* aContext,
const nsIntRect* aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
virtual nsIFrame* GetFrameForPoint(const nsPoint& aPoint) MOZ_OVERRIDE;
virtual void ReflowSVG() MOZ_OVERRIDE;
NS_IMETHOD_(nsRect) GetCoveredRegion() MOZ_OVERRIDE;
virtual nsRect GetCoveredRegion() MOZ_OVERRIDE;
virtual SVGBBox GetBBoxContribution(const Matrix& aToBBoxUserspace,
uint32_t aFlags) MOZ_OVERRIDE;

View File

@ -58,18 +58,18 @@ public:
// so the element's full transform needs to be applied; but we don't want to
// apply transforms from outside the actual glyph element, so we need to know
// how far up the ancestor chain to go.
NS_IMETHOD PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) = 0;
virtual nsresult PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) = 0;
// Check if this frame or children contain the given point,
// specified in app units relative to the origin of the outer
// svg frame (origin ill-defined in the case of borders - bug
// 290770). See bug 290852 for foreignObject complications.
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint)=0;
virtual nsIFrame* GetFrameForPoint(const nsPoint &aPoint)=0;
// Get bounds in our nsSVGOuterSVGFrame's coordinates space (in app units)
NS_IMETHOD_(nsRect) GetCoveredRegion()=0;
virtual nsRect GetCoveredRegion()=0;
// Called on SVG child frames (except NS_FRAME_IS_NONDISPLAY frames)
// to update and then invalidate their cached bounds. This method is not
@ -141,7 +141,7 @@ public:
uint32_t aFlags) = 0;
// Are we a container frame?
NS_IMETHOD_(bool) IsDisplayContainer()=0;
virtual bool IsDisplayContainer()=0;
};
#endif // __NS_ISVGCHILDFRAME_H__

View File

@ -254,7 +254,7 @@ nsSVGDisplayContainerFrame::IsSVGTransformed(gfx::Matrix *aOwnTransform,
//----------------------------------------------------------------------
// nsISVGChildFrame methods
NS_IMETHODIMP
nsresult
nsSVGDisplayContainerFrame::PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot)
@ -277,7 +277,7 @@ nsSVGDisplayContainerFrame::PaintSVG(nsRenderingContext* aContext,
return NS_OK;
}
NS_IMETHODIMP_(nsIFrame*)
nsIFrame*
nsSVGDisplayContainerFrame::GetFrameForPoint(const nsPoint &aPoint)
{
NS_ASSERTION(!NS_SVGDisplayListHitTestingEnabled() ||
@ -287,7 +287,7 @@ nsSVGDisplayContainerFrame::GetFrameForPoint(const nsPoint &aPoint)
return nsSVGUtils::HitTestChildren(this, aPoint);
}
NS_IMETHODIMP_(nsRect)
nsRect
nsSVGDisplayContainerFrame::GetCoveredRegion()
{
return nsSVGUtils::GetCoveredRegion(mFrames);

View File

@ -145,16 +145,16 @@ public:
Matrix *aFromParentTransform = nullptr) const MOZ_OVERRIDE;
// nsISVGChildFrame interface:
NS_IMETHOD PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
NS_IMETHOD_(nsRect) GetCoveredRegion() MOZ_OVERRIDE;
virtual nsresult PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
virtual nsIFrame* GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
virtual nsRect GetCoveredRegion() MOZ_OVERRIDE;
virtual void ReflowSVG() MOZ_OVERRIDE;
virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
virtual SVGBBox GetBBoxContribution(const Matrix &aToBBoxUserspace,
uint32_t aFlags) MOZ_OVERRIDE;
NS_IMETHOD_(bool) IsDisplayContainer() MOZ_OVERRIDE { return true; }
virtual bool IsDisplayContainer() MOZ_OVERRIDE { return true; }
};
#endif

View File

@ -191,7 +191,7 @@ nsSVGForeignObjectFrame::IsSVGTransformed(Matrix *aOwnTransform,
return foundTransform;
}
NS_IMETHODIMP
nsresult
nsSVGForeignObjectFrame::PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot)
@ -280,7 +280,7 @@ nsSVGForeignObjectFrame::PaintSVG(nsRenderingContext *aContext,
return rv;
}
NS_IMETHODIMP_(nsIFrame*)
nsIFrame*
nsSVGForeignObjectFrame::GetFrameForPoint(const nsPoint &aPoint)
{
NS_ASSERTION(!NS_SVGDisplayListHitTestingEnabled() ||
@ -323,7 +323,7 @@ nsSVGForeignObjectFrame::GetFrameForPoint(const nsPoint &aPoint)
return nullptr;
}
NS_IMETHODIMP_(nsRect)
nsRect
nsSVGForeignObjectFrame::GetCoveredRegion()
{
float x, y, w, h;

View File

@ -76,16 +76,16 @@ public:
#endif
// nsISVGChildFrame interface:
NS_IMETHOD PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
NS_IMETHOD_(nsRect) GetCoveredRegion() MOZ_OVERRIDE;
virtual nsresult PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
virtual nsIFrame* GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
virtual nsRect GetCoveredRegion() MOZ_OVERRIDE;
virtual void ReflowSVG() MOZ_OVERRIDE;
virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
virtual SVGBBox GetBBoxContribution(const Matrix &aToBBoxUserspace,
uint32_t aFlags) MOZ_OVERRIDE;
NS_IMETHOD_(bool) IsDisplayContainer() MOZ_OVERRIDE { return true; }
virtual bool IsDisplayContainer() MOZ_OVERRIDE { return true; }
gfxMatrix GetCanvasTM(uint32_t aFor, nsIFrame* aTransformRoot = nullptr);

View File

@ -57,9 +57,10 @@ public:
NS_DECL_FRAMEARENA_HELPERS
// nsISVGChildFrame interface:
NS_IMETHOD PaintSVG(nsRenderingContext *aContext, const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot) MOZ_OVERRIDE;
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint);
virtual nsresult PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot) MOZ_OVERRIDE;
virtual nsIFrame* GetFrameForPoint(const nsPoint &aPoint);
virtual void ReflowSVG();
// nsSVGPathGeometryFrame methods:
@ -294,7 +295,7 @@ nsSVGImageFrame::TransformContextForPainting(gfxContext* aGfxContext,
//----------------------------------------------------------------------
// nsISVGChildFrame methods:
NS_IMETHODIMP
nsresult
nsSVGImageFrame::PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot)
@ -409,7 +410,7 @@ nsSVGImageFrame::PaintSVG(nsRenderingContext *aContext,
return rv;
}
NS_IMETHODIMP_(nsIFrame*)
nsIFrame*
nsSVGImageFrame::GetFrameForPoint(const nsPoint &aPoint)
{
// Special case for raster images -- we only want to accept points that fall

View File

@ -57,7 +57,7 @@ nsSVGInnerSVGFrame::GetType() const
//----------------------------------------------------------------------
// nsISVGChildFrame methods
NS_IMETHODIMP
nsresult
nsSVGInnerSVGFrame::PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot)
@ -225,7 +225,7 @@ nsSVGInnerSVGFrame::AttributeChanged(int32_t aNameSpaceID,
return NS_OK;
}
NS_IMETHODIMP_(nsIFrame*)
nsIFrame*
nsSVGInnerSVGFrame::GetFrameForPoint(const nsPoint &aPoint)
{
NS_ASSERTION(!NS_SVGDisplayListHitTestingEnabled() ||

View File

@ -53,12 +53,12 @@ public:
int32_t aModType) MOZ_OVERRIDE;
// nsISVGChildFrame interface:
NS_IMETHOD PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
virtual nsresult PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
virtual void ReflowSVG() MOZ_OVERRIDE;
virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
virtual nsIFrame* GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
// nsSVGContainerFrame methods:
virtual gfxMatrix GetCanvasTM(uint32_t aFor,

View File

@ -789,7 +789,7 @@ nsSVGOuterSVGFrame::NotifyViewportOrTransformChanged(uint32_t aFlags)
//----------------------------------------------------------------------
// nsISVGChildFrame methods:
NS_IMETHODIMP
nsresult
nsSVGOuterSVGFrame::PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot)

View File

@ -109,9 +109,9 @@ public:
virtual void NotifyViewportOrTransformChanged(uint32_t aFlags) MOZ_OVERRIDE;
// nsISVGChildFrame methods:
NS_IMETHOD PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
virtual nsresult PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
virtual SVGBBox GetBBoxContribution(const Matrix &aToBBoxUserspace,
uint32_t aFlags) MOZ_OVERRIDE;

View File

@ -197,7 +197,7 @@ nsSVGPathGeometryFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
//----------------------------------------------------------------------
// nsISVGChildFrame methods
NS_IMETHODIMP
nsresult
nsSVGPathGeometryFrame::PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot)
@ -231,7 +231,7 @@ nsSVGPathGeometryFrame::PaintSVG(nsRenderingContext *aContext,
return NS_OK;
}
NS_IMETHODIMP_(nsIFrame*)
nsIFrame*
nsSVGPathGeometryFrame::GetFrameForPoint(const nsPoint &aPoint)
{
gfxMatrix canvasTM = GetCanvasTM(FOR_HIT_TESTING);
@ -287,7 +287,7 @@ nsSVGPathGeometryFrame::GetFrameForPoint(const nsPoint &aPoint)
return nullptr;
}
NS_IMETHODIMP_(nsRect)
nsRect
nsSVGPathGeometryFrame::GetCoveredRegion()
{
return nsSVGUtils::TransformFrameRectToOuterSVG(

View File

@ -93,16 +93,16 @@ public:
nsIFrame* aTransformRoot = nullptr);
protected:
// nsISVGChildFrame interface:
NS_IMETHOD PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
NS_IMETHOD_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
NS_IMETHOD_(nsRect) GetCoveredRegion() MOZ_OVERRIDE;
virtual nsresult PaintSVG(nsRenderingContext *aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot = nullptr) MOZ_OVERRIDE;
virtual nsIFrame* GetFrameForPoint(const nsPoint &aPoint) MOZ_OVERRIDE;
virtual nsRect GetCoveredRegion() MOZ_OVERRIDE;
virtual void ReflowSVG() MOZ_OVERRIDE;
virtual void NotifySVGChanged(uint32_t aFlags) MOZ_OVERRIDE;
virtual SVGBBox GetBBoxContribution(const Matrix &aToBBoxUserspace,
uint32_t aFlags) MOZ_OVERRIDE;
NS_IMETHOD_(bool) IsDisplayContainer() MOZ_OVERRIDE { return false; }
virtual bool IsDisplayContainer() MOZ_OVERRIDE { return false; }
void GeneratePath(gfxContext *aContext, const Matrix &aTransform);
/**

View File

@ -52,11 +52,11 @@ public:
const nsDisplayListSet& aLists) MOZ_OVERRIDE;
// nsISVGChildFrame interface:
NS_IMETHOD PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot) MOZ_OVERRIDE;
NS_IMETHODIMP_(nsIFrame*) GetFrameForPoint(const nsPoint &aPoint);
NS_IMETHODIMP_(nsRect) GetCoveredRegion();
virtual nsresult PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot) MOZ_OVERRIDE;
nsIFrame* GetFrameForPoint(const nsPoint &aPoint);
nsRect GetCoveredRegion();
virtual void ReflowSVG();
virtual SVGBBox GetBBoxContribution(const Matrix &aToBBoxUserspace,
uint32_t aFlags);
@ -106,7 +106,7 @@ nsSVGSwitchFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
}
NS_IMETHODIMP
nsresult
nsSVGSwitchFrame::PaintSVG(nsRenderingContext* aContext,
const nsIntRect *aDirtyRect,
nsIFrame* aTransformRoot)
@ -127,7 +127,7 @@ nsSVGSwitchFrame::PaintSVG(nsRenderingContext* aContext,
}
NS_IMETHODIMP_(nsIFrame*)
nsIFrame*
nsSVGSwitchFrame::GetFrameForPoint(const nsPoint &aPoint)
{
NS_ASSERTION(!NS_SVGDisplayListHitTestingEnabled() ||
@ -146,7 +146,7 @@ nsSVGSwitchFrame::GetFrameForPoint(const nsPoint &aPoint)
return nullptr;
}
NS_IMETHODIMP_(nsRect)
nsRect
nsSVGSwitchFrame::GetCoveredRegion()
{
nsRect rect;