Closed Bug 784256 Opened 8 years ago Closed 8 years ago

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

Categories

(Core :: DOM: Events, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch untested WIP (obsolete) — Splinter Review
Right now nsDOMEvent.h/.cpp have ugly lists for events.
Attached patch patch (obsolete) — Splinter Review
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+
Attached patch patchSplinter Review
Attachment #653654 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/2033b92222eb
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.