Bug 309514 - check clip-path when doing hit detection on containers. r=scooter

This commit is contained in:
tor%cs.brown.edu 2005-09-27 17:10:21 +00:00
parent 01b72caa0e
commit 89b89a22b3

View File

@ -198,6 +198,24 @@ nsSVGGFrame::GetFrameForPointSVG(float x, float y, nsIFrame** hit)
}
}
}
if (*hit) {
PRBool clipHit = PR_TRUE;;
nsIURI *aURI;
nsSVGClipPathFrame *clip = NULL;
aURI = GetStyleSVGReset()->mClipPath;
if (aURI)
NS_GetSVGClipPathFrame(&clip, aURI, mContent);
if (clip) {
nsCOMPtr<nsIDOMSVGMatrix> matrix = GetCanvasTM();
clip->ClipHitTest(this, matrix, x, y, &clipHit);
}
if (!clipHit)
*hit = nsnull;
}
return *hit ? NS_OK : NS_ERROR_FAILURE;
}