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.

This commit is contained in:
bryner%brianryner.com 2006-04-20 03:38:43 +00:00
Родитель e6d703999d
Коммит b14d9fa790
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -1082,9 +1082,7 @@ nsXMLHttpRequest::RequestCompleted()
return NS_ERROR_FAILURE;
}
nsEvent event;
event.eventStructType = NS_EVENT;
event.message = NS_PAGE_LOAD;
nsEvent event(NS_PAGE_LOAD);
rv = manager->CreateEvent(nsnull, &event,
NS_LITERAL_STRING("HTMLEvents"),
getter_AddRefs(domevent));