mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 309514 - check clip-path when doing hit detection on containers. r=scooter
This commit is contained in:
parent
01b72caa0e
commit
89b89a22b3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user