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

@@ -578,22 +578,21 @@ nsFileControlFrame::IsLeaf() const
return PR_TRUE;
}
NS_IMETHODIMP
nsIFrame*
nsFileControlFrame::GetFrameForPoint(const nsPoint& aPoint,
nsFramePaintLayer aWhichLayer,
nsIFrame** aFrame)
nsFramePaintLayer aWhichLayer)
{
#ifndef DEBUG_NEWFRAME
if ( nsFormControlHelper::GetDisabled(mContent) && mRect.Contains(aPoint) ) {
nsRect thisRect(nsPoint(0,0), GetSize());
if (nsFormControlHelper::GetDisabled(mContent) && thisRect.Contains(aPoint)) {
if (GetStyleVisibility()->IsVisible()) {
*aFrame = this;
return NS_OK;
return this;
}
} else {
return nsAreaFrame::GetFrameForPoint(aPoint, aWhichLayer, aFrame);
return nsAreaFrame::GetFrameForPoint(aPoint, aWhichLayer);
}
#endif
return NS_ERROR_FAILURE;
return nsnull;
}
#ifdef NS_DEBUG