Gamepad: Implement gamepad buttons to be array, removing GamepadList#44357
Conversation
|
@rovertrack The |
|
Thanks @Gae24 , all suggested improvements have been made |
|
is there any changes to be done on this @jdm? |
Actually could you check if |
| readonly attribute DOMString mapping; | ||
| readonly attribute Float64Array axes; | ||
| [SameObject] readonly attribute GamepadButtonList buttons; | ||
| readonly attribute any buttons; |
There was a problem hiding this comment.
I think instead of the suggested "any" this must be FrozenArray<GamepadButton>so it checks the type of the buttons in
servo/tests/wpt/tests/resources/idlharness.js
Lines 528 to 530 in 9189fe0
There was a problem hiding this comment.
Our webidl codegen doesn't support FrozenArray types.
There was a problem hiding this comment.
Thanks for the clarity 🙂
I'm editing the original description to include a more clear commit message (since it will be used for the squashed commits). Here's the original message for posterity. |
Thanks @jdm. |
|
@jdm Merge Failed due to |
|
Excellent, thanks! This just needs to be rebased against main and run |
Signed-off-by: Rover track <rishan.pgowda@gmail.com>
Signed-off-by: Rover track <rishan.pgowda@gmail.com>
Signed-off-by: Rover track <rishan.pgowda@gmail.com>
Rebased and updated the manifest! |
|
Thanks @Gae24. |


Replaced
GamepadButtonListinterface with a frozen array of gamepad buttons to match the gamepad webidl specification.Testing: No idlharness tests possible since the values can't be accessed without a real gamepad.
Fixes: #44333