Closed Bug 857092 Opened 7 years ago Closed 6 years ago

Put non-standard gamepadbutton{down,up} and gamepadaxismove events behind a pref

Categories

(Core :: DOM: Events, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: ted, Assigned: ted)

Details

Attachments

(1 file, 2 obsolete files)

It doesn't look likely that we'll spec the gamepadbutton{down,up}/gamepadaxismove events any time soon, so we should just stop firing them. If we decide to add them back in a later version of the spec we can re-add them.
I had to rework a few of the mochitests because they were using gamepadbuttondown events. I replaced it with polling, which is probably not great. I guess what I really want to do is poll and have the frames notify the parent window when they detect button presses.
I removed the most problematic mochitest--test_gamepad_hidden_frame.html, since without button events it's functionally equivalent to test_gamepad_frame_state_sync.html. I think this should be fine, but I'll probably run this past the try server and spin a few extra mochitest runs to check.
Attachment #732364 - Flags: review?(bugs)
Attachment #732342 - Attachment is obsolete: true
Comment on attachment 732364 [details] [diff] [review]
stop firing gamepad button and axis events

I still think these should go to the spec. It is very un-webby if one is
_forced_ to use polling for event handling.
So I'd actually prefer keeping these in Gecko for now and get someone to
fix the spec.
Is there any reason why the events shouldn't go to the spec?
Attachment #732364 - Flags: review?(bugs) → review-
I agree that I would like to spec some sort of events. However, I'm fairly certain that they wouldn't be these exact events. I just made these up to have something to test out. I think we need to do some experimentation and discussion on what events we actually want to spec.

Would you be happier if I just put these events behind a separate pref, like dom.gamepad.events.enabled, so that even if we ship a version of the Gamepad API in a release, we wouldn't ship the events enabled?
Comment on attachment 732364 [details] [diff] [review]
stop firing gamepad button and axis events

Extra pref wouldn't really help.
I guess I'm just worried that if we ship the bad API, we might not find time
to fix it later. But if you don't think that is something to worry, we
could take this patch for now.
Attachment #732364 - Flags: review- → review+
Comment on attachment 732364 [details] [diff] [review]
stop firing gamepad button and axis events

After further discussion, I think I do want to try to spec at least the button events. The axis move events are more problematic. I have a simpler patch to add an additional pref, I'll attach it shortly.
Attachment #732364 - Attachment is obsolete: true
Okay, here's a totally different patch. This just adds a separate pref to disable "non-standard events". For now that covers both the button and axis events. If I add the button events to the spec (which I think I am likely to do) then it will probably just cover the axis events unless I decide to remove them.
Attachment #765338 - Flags: review?(bugs)
Attachment #765338 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/0c005a024c85
Summary: Stop firing gamepadbutton{down,up} and gamepadaxismove events → Put non-standard gamepadbutton{down,up} and gamepadaxismove events behind a pref
https://hg.mozilla.org/mozilla-central/rev/0c005a024c85
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.