Bug 48886, fix UMR and clean up some ugly code. r=jst, a=vidur.

This commit is contained in:
heikki%netscape.com 2000-11-08 00:31:06 +00:00
parent 6b989cdd28
commit de2d514804
4 changed files with 14 additions and 18 deletions

View File

@ -1679,15 +1679,13 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
default:
break;
}
//XXX This is going away
*aEventStatus = (NS_OK == ret)
? *aEventStatus
: nsEventStatus_eConsumeNoDefault;
// This is correct
*aEventStatus = (aEvent->flags & NS_EVENT_FLAG_NO_DEFAULT)
? nsEventStatus_eConsumeNoDefault
: *aEventStatus;
// XXX (NS_OK != ret) is going away,
// (aEvent->flags & NS_EVENT_FLAG_NO_DEFAULT) is correct
if ((NS_OK != ret) ||
(aEvent->flags & NS_EVENT_FLAG_NO_DEFAULT)) {
*aEventStatus = nsEventStatus_eConsumeNoDefault;
}
return NS_OK;
}

View File

@ -2479,7 +2479,7 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
//Send resize event from here.
nsEvent event;
nsEventStatus status;
nsEventStatus status = nsEventStatus_eIgnore;
event.eventStructType = NS_EVENT;
event.message = NS_RESIZE_EVENT;
event.time = 0;

View File

@ -1679,15 +1679,13 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext* aPresContext,
default:
break;
}
//XXX This is going away
*aEventStatus = (NS_OK == ret)
? *aEventStatus
: nsEventStatus_eConsumeNoDefault;
// This is correct
*aEventStatus = (aEvent->flags & NS_EVENT_FLAG_NO_DEFAULT)
? nsEventStatus_eConsumeNoDefault
: *aEventStatus;
// XXX (NS_OK != ret) is going away,
// (aEvent->flags & NS_EVENT_FLAG_NO_DEFAULT) is correct
if ((NS_OK != ret) ||
(aEvent->flags & NS_EVENT_FLAG_NO_DEFAULT)) {
*aEventStatus = nsEventStatus_eConsumeNoDefault;
}
return NS_OK;
}

View File

@ -2479,7 +2479,7 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
//Send resize event from here.
nsEvent event;
nsEventStatus status;
nsEventStatus status = nsEventStatus_eIgnore;
event.eventStructType = NS_EVENT;
event.message = NS_RESIZE_EVENT;
event.time = 0;