Fix event targetting bugs by using paint layers in GetFrameForPoint, testing for visibility, and trying GetFrameForPoint on additional views if one fails. r=joki@netscape.com(, hyatt@netscape.com) b=12232,20051,21304,24474,26785, and remaining issues from 23161.
This commit is contained in:
@@ -400,10 +400,18 @@ nsHTMLButtonControlFrame::HandleEvent(nsIPresContext* aPresContext,
|
||||
NS_IMETHODIMP
|
||||
nsHTMLButtonControlFrame::GetFrameForPoint(nsIPresContext* aPresContext,
|
||||
const nsPoint& aPoint,
|
||||
nsFramePaintLayer aWhichLayer,
|
||||
nsIFrame** aFrame)
|
||||
{
|
||||
*aFrame = this;
|
||||
return NS_OK;
|
||||
if (mRect.Contains(aPoint)) {
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)
|
||||
mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
if (disp->IsVisible()) {
|
||||
*aFrame = this;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
||||
Reference in New Issue
Block a user