Closed
Bug 784256
Opened 13 years ago
Closed 13 years ago
Generate id->event type switch case from nsEventNameList.h
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Assigned: smaug)
Details
Attachments
(1 file, 2 obsolete files)
23.40 KB,
patch
|
Details | Diff | Splinter Review |
Right now nsDOMEvent.h/.cpp have ugly lists for events.
Assignee | ||
Comment 1•13 years ago
|
||
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 2•13 years ago
|
||
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+
Assignee | ||
Comment 3•13 years ago
|
||
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
Assignee | ||
Comment 4•13 years ago
|
||
Attachment #653654 -
Attachment is obsolete: true
Assignee | ||
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•