Closed Bug 812427 Opened 12 years ago Closed 12 years ago

Sort out event struct types in nsGUIEvent.h

Categories

(Core :: Widget, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: masayuki, Assigned: masayuki)

Details

Attachments

(3 files)

Looks like some struct types defined in nsGUIEvent.h isn't being used. We can remove it. And I think that for safety, we should change them to typed enum.
This change enables build time check if the struct type is used for other purpose. NS_POPUP_EVENT will be removed by next patch. I'm not sure why there are the SVG event types.
Attachment #683041 - Flags: review?(roc)
Attachment #683041 - Flags: review?(bugs)
Attachment #683042 - Flags: review?(roc)
Attachment #683042 - Flags: review?(bugs)
Comment on attachment 683041 [details] [diff] [review] part.2 Make event struct type named enumeration I would keep nsEventStructType in nsGUIEvent.h since that is where (almost) all the event structs are. That fixed, r=me
Attachment #683041 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #4) > I would keep nsEventStructType in nsGUIEvent.h since that is where (almost) > all the event structs are. > That fixed, r=me Hmm, nsEvent.h is included by nsGUIEvent.h. If some *.h files need nsEventStructType for arguments or members, including nsEvent.h is better since nsGUIEvent.h includes a lot of *.h files for implementing the all event structs. Roc, how do you think about that? # If we make nsGUIEvent.cpp, we don't need the separated header files though.
Comment on attachment 683041 [details] [diff] [review] part.2 Make event struct type named enumeration Review of attachment 683041 [details] [diff] [review]: ----------------------------------------------------------------- What Olli said.
Attachment #683041 - Flags: review?(roc) → review+
Comment on attachment 683042 [details] [diff] [review] part.3 Remove NS_POPUP_EVENT I wonder when NS_POPUP_EVENT was still used, and for what. Must be something really ancient, since even 1.8.0 doesn't seem to use it.
Attachment #683042 - Flags: review?(bugs) → review+
Okay, I'll move the enum to nsGUIEvent.h and land them tomorrow. Thank you roc and smaug!
I meant it's after the merging.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: