Bug 367111 - Fix another crash with unrendered foreignObject. r+sr=tor

This commit is contained in:
longsonr%gmail.com 2007-01-19 09:06:13 +00:00
parent 170a2f2fa8
commit fe5c77c99a

View File

@ -249,6 +249,9 @@ nsSVGForeignObjectFrame::PaintSVG(nsSVGRenderState *aContext,
nsresult
nsSVGForeignObjectFrame::TransformPointFromOuterPx(float aX, float aY, nsPoint* aOut)
{
if (mParent->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMSVGMatrix> tm = GetTMIncludingOffset();
nsCOMPtr<nsIDOMSVGMatrix> inverse;
nsresult rv = tm->Inverse(getter_AddRefs(inverse));
@ -341,7 +344,8 @@ nsSVGForeignObjectFrame::NotifyRedrawSuspended()
NS_IMETHODIMP
nsSVGForeignObjectFrame::NotifyRedrawUnsuspended()
{
FlushDirtyRegion();
if (!(mParent->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD))
FlushDirtyRegion();
return NS_OK;
}
@ -481,6 +485,9 @@ nsSVGForeignObjectFrame::DoReflow()
printf("**nsSVGForeignObjectFrame::DoReflow()\n");
#endif
if (mParent->GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)
return;
nsPresContext *presContext = GetPresContext();
nsIFrame* kid = GetFirstChild(nsnull);
if (!kid)