Repository navigation
Gamepad: Align closer to spec and implement missing slots - #31385
Conversation
|
🔨 Triggering try run (#8016745639) for Linux WPT |
|
Test results for linux-wpt-layout-2020 from try job (#8016745639): Flaky unexpected result (15)
Stable unexpected results that are known to be intermittent (17)
|
|
✨ Try run (#8016745639) succeeded. |
| }), | ||
| window.upcast(), | ||
| ) | ||
| .unwrap(); |
There was a problem hiding this comment.
maybe you should check if gamepad_task_source is not None to avoid unwrap
There was a problem hiding this comment.
This is about the queuing of the task, but we should expect with a clear message.
- Fixes TODO's from initial gamepad implementation - Adds some missing spec steps
gterzian
left a comment
There was a problem hiding this comment.
Great start! Couple of comments...
| }), | ||
| window.upcast(), | ||
| ) | ||
| .unwrap(); |
There was a problem hiding this comment.
This is about the queuing of the task, but we should expect with a clear message.
- Change should_notify to has_gesture - Add spec links and TODO to navigator - Remove unneeded clone from GamepadList::list - Move gamepadconnected event firing into has_gesture block
gterzian
left a comment
There was a problem hiding this comment.
Ok thanks for the refactor, just one last thing and then good to go!
| return value > BUTTON_PRESS_THRESHOLD; | ||
| }, | ||
| }; | ||
| } |
There was a problem hiding this comment.
Let's just add a newline here.
There was a problem hiding this comment.
A second one? It ends at 297
This follows up from the initial Gamepad implementation and addresses some TODOs around
gamepad.[[exposed]]andnavigator.[[hasGamepadGesture]], as well as some missing spec steps. It also properly gates gamepad handling behind thedom.gamepad.enabledpref, as previously thegamepadconnectedandgamepaddisconnectedevents would fire regardless.This also allows one more WPT test to pass,
gamepad/not-fully-active../mach build -ddoes not report any errors./mach test-tidydoes not report any errors