fix for setcapture. passes events to the nsHTMLFrame's areaframe when events are trapped to a given frame's view.

This commit is contained in:
mjudge@netscape.com
2000-04-12 03:04:11 +00:00
parent c54dc2465c
commit abfa134534
19 changed files with 401 additions and 120 deletions

View File

@@ -417,8 +417,17 @@ RootFrame::HandleEvent(nsIPresContext* aPresContext,
if (aEvent->message == NS_MOUSE_LEFT_BUTTON_UP ||
aEvent->message == NS_MOUSE_MIDDLE_BUTTON_UP ||
aEvent->message == NS_MOUSE_RIGHT_BUTTON_UP) {
nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
aEvent->message == NS_MOUSE_RIGHT_BUTTON_UP ||
aEvent->message == NS_MOUSE_MOVE ) {
nsIFrame *firstChild;
nsresult rv = FirstChild(aPresContext,nsnull,&firstChild);
//root frame needs to pass mouse events to its area frame so that mouse movement
//and selection code will work properly. this will still have the necessary effects
//that would have happened if nsFrame::HandleEvent was called.
if (NS_SUCCEEDED(rv) && firstChild)
firstChild->HandleEvent(aPresContext, aEvent, aEventStatus);
else
nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
}
return NS_OK;