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.
git-svn-id: svn://10.0.0.236/trunk@63689 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -440,13 +440,18 @@ nsFileControlFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
NS_IMETHODIMP
|
||||
nsFileControlFrame::GetFrameForPoint(nsIPresContext* aPresContext,
|
||||
const nsPoint& aPoint,
|
||||
nsFramePaintLayer aWhichLayer,
|
||||
nsIFrame** aFrame)
|
||||
{
|
||||
if (nsFormFrame::GetDisabled(this)) {
|
||||
*aFrame = this;
|
||||
return NS_OK;
|
||||
if ( nsFormFrame::GetDisabled(this) && mRect.Contains(aPoint) ) {
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)
|
||||
mStyleContext->GetStyleData(eStyleStruct_Display);
|
||||
if (disp->IsVisible()) {
|
||||
*aFrame = this;
|
||||
return NS_OK;
|
||||
}
|
||||
} else {
|
||||
return nsAreaFrame::GetFrameForPoint(aPresContext, aPoint, aFrame);
|
||||
return nsAreaFrame::GetFrameForPoint(aPresContext, aPoint, aWhichLayer, aFrame);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user