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.

git-svn-id: svn://10.0.0.236/trunk@180551 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2005-09-19 02:15:54 +00:00
parent 40dcd603aa
commit aeacb4d477
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