Improve the way in which nsEvent and its subclasses are initialized. Commonly-used members can now be initialized via an inline constructor, and all other members are initialized to zero. eventStructType is set automatically. This also fixes some cases where an eventStructType was doubling as a message -- NS_TEXT_EVENT is now only used as an eventStructType, with a message of NS_TEXT_TEXT. NS_COMPOSITION_* events get an eventStructType of NS_COMPOSITION_EVENT, and ditto for NS_RECONVERSION_*. NS_DRAGDROP_EVENT is no longer an eventStructType since it is not a unique type of struct. There is also some miscellaneous cleanup to nsDOMEvent. Bug 220228, r=jst, sr=blizzard.

git-svn-id: svn://10.0.0.236/trunk@151191 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2004-01-12 08:25:18 +00:00
parent 95605dd12d
commit 3d8a7179f8
88 changed files with 944 additions and 2068 deletions

View File

@@ -3234,9 +3234,7 @@ nsresult nsPluginInstanceOwner::DispatchFocusToPlugin(nsIDOMEvent* aFocusEvent)
nsEvent * theEvent;
privateEvent->GetInternalNSEvent(&theEvent);
if (theEvent) {
nsGUIEvent focusEvent;
memset(&focusEvent, 0, sizeof(focusEvent));
focusEvent.message = theEvent->message; // we only care about the message in ProcessEvent
nsGUIEvent focusEvent(theEvent->message); // we only care about the message in ProcessEvent
nsEventStatus rv = ProcessEvent(focusEvent);
if (nsEventStatus_eConsumeNoDefault == rv) {
aFocusEvent->PreventDefault();