Bug 108310. Make GetFrameForPoint take frame-relative coordinates, not bogus relative-to-some-view-or-other, and simplify the signature. r+sr=roc, patch by Eli Friedman.

This commit is contained in:
roc+@cs.cmu.edu
2005-09-19 02:15:54 +00:00
parent 5a3f8f9836
commit 5d1b988569
70 changed files with 476 additions and 660 deletions

View File

@@ -278,19 +278,16 @@ nsHTMLButtonControlFrame::HandleEvent(nsPresContext* aPresContext,
}
NS_IMETHODIMP
nsIFrame*
nsHTMLButtonControlFrame::GetFrameForPoint(const nsPoint& aPoint,
nsFramePaintLayer aWhichLayer,
nsIFrame** aFrame)
nsFramePaintLayer aWhichLayer)
{
nsRect thisRect(nsPoint(0,0), GetSize());
if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND &&
mRect.Contains(aPoint)) {
if (GetStyleVisibility()->IsVisible()) {
*aFrame = this;
return NS_OK;
}
thisRect.Contains(aPoint) && GetStyleVisibility()->IsVisible()) {
return this;
}
return NS_ERROR_FAILURE;
return nsnull;
}
NS_IMETHODIMP