Closed Bug 784256 Opened 8 years ago Closed 8 years ago
Generate id->event type switch case from ns
Event Name List .h
Right now nsDOMEvent.h/.cpp have ugly lists for events.
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
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+
It is because of the absolutely crazy event name <-> attribute mapping http://mxr.mozilla.org/mozilla-central/source/content/events/src/nsEventListenerManager.cpp#685 http://mxr.mozilla.org/mozilla-central/source/content/svg/content/src/nsSVGElement.cpp#1448
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.