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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user