Closed Bug 856373 Opened 12 years ago Closed 12 years ago

WebIDL-ify Gamepad events

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: ted, Assigned: dzbarsky)

References

Details

Attachments

(4 files)

This is harder than just changing the Gamepad interface to WebIDL because it relies on WebIDL for generated events, bug 847611.
bug 847611 added .webidl versions of the event interfaces, but the xpidl ones still exist for the time being.
Attached patch gamepadeventsSplinter Review
We're still generating some unnecessary boilerplate for derived events, but it's probably not worth complicating the code to avoid.
Assignee: nobody → dzbarsky
Status: NEW → ASSIGNED
Attachment #803167 - Flags: review?(bugs)
Could you upload also the generated files. They are in <objdir>/dom/bindings/<YourEvent>.[h|cpp]
Attached file GamepadButtonEvent.h
Attached file GamepadButtonEvent.cpp
Attachment #803174 - Attachment mime type: text/x-chdr → text/plain
I believe the events were the only things keeping nsIDOMGamepad.idl alive as well, since the API was converted to WebIDL.
Comment on attachment 803167 [details] [diff] [review] gamepadevents I guess just including config.getDescriptor(parent, False).headerFile should work, and nsDOMEvent.h can be dropped.
Attachment #803167 - Flags: review?(bugs) → review+
Comment on attachment 803167 [details] [diff] [review] gamepadevents Er, wait
Attachment #803167 - Flags: review+ → review-
The patch doesn't initialize members in the parent.
Attachment #803197 - Flags: review?(bugs)
Comment on attachment 803197 [details] [diff] [review] Init parent members Yeah, this should do it. Tiny bit duplication in the generated code, but ok. Make sure to check the generated code, also that nsDOMEvent is included when needed (though the code just shouldn't compile if it is missing)
Attachment #803197 - Flags: review?(bugs) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Blocks: 925812
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: