Bug 620274 - nsSVGForeignObjectFrame::PaintSVG null checks aDirtyRect when it is always non-null r=dholbert

--HG--
extra : rebase_source : b823f3edf4cc1585fa752233db6052945e47a23f
This commit is contained in:
Robert Longson 2011-04-24 20:55:58 +01:00
parent ec91578ded
commit 20df213442

View File

@ -197,6 +197,8 @@ NS_IMETHODIMP
nsSVGForeignObjectFrame::PaintSVG(nsSVGRenderState *aContext,
const nsIntRect *aDirtyRect)
{
NS_ABORT_IF_FALSE(aDirtyRect, "We expect aDirtyRect to be non-null");
if (IsDisabled())
return NS_OK;
@ -215,11 +217,9 @@ nsSVGForeignObjectFrame::PaintSVG(nsSVGRenderState *aContext,
}
/* Check if we need to draw anything. */
if (aDirtyRect) {
PRInt32 appUnitsPerDevPx = PresContext()->AppUnitsPerDevPixel();
if (!mRect.ToOutsidePixels(appUnitsPerDevPx).Intersects(*aDirtyRect))
return NS_OK;
}
PRInt32 appUnitsPerDevPx = PresContext()->AppUnitsPerDevPixel();
if (!mRect.ToOutsidePixels(appUnitsPerDevPx).Intersects(*aDirtyRect))
return NS_OK;
gfxContext *gfx = aContext->GetGfxContext();