Generate id->event type switch case from nsEventNameList.h

RESOLVED FIXED

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: smaug, Assigned: smaug)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Created attachment 653647 [details] [diff] [review]
untested WIP

Right now nsDOMEvent.h/.cpp have ugly lists for events.
Created attachment 653654 [details] [diff] [review]
patch

We can remove unused NS_SCROLLPORT_OVERFLOWCHANGED.
The only events which are now added to switch-case are before/afterprint.
But because those events are initialized using InitEvent, their type is known
and this doesn't affect to behavior.
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsDocumentViewer.cpp#295

https://tbpl.mozilla.org/?tree=Try&rev=ed85af7a1a52
Attachment #653647 - Attachment is obsolete: true
Attachment #653654 - Flags: review?(bzbarsky)
Comment on attachment 653654 [details] [diff] [review]
patch

Can we please at least document why some events are being excluded from ID_TO_EVENT?  Is it just the SMIL/SVG events?

We should probably #error if EVENT and so forth are defined when ID_TO_EVENT is defined, since we'll unconditionally undef them.

r=me for the rest, but I'd like to understand the SVG/SMIL stuff here....
Attachment #653654 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/2033b92222eb
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.