-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance Gamepad interface description for Touch #168
Conversation
@bradleyneedham could you associate your GitHub account with your W3C account, please? It will help to resolve the IRP issue. Thank you. |
Absolutely would if I had one :-). Does this work better if @sagoston submits the changes? |
Ok, done, GitHub account should now be associated with my W3C account. |
Excellent, thank you! The editors are expected to review this pull request and merge it when ready. |
extensions.html
Outdated
device max x-axis coordinate. | ||
</li> | ||
<li>Set |touchEvent|.{{GamepadTouch/surfaceDimensions}}[1] to be | ||
device max y-axis coordinate.<p>(<i>note: surfaceDimensions can be set to `null`</i>)</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rewrite these steps with a branch where surfaceDimensions is set to null. We can leave "why is it null?" up to the browser implementer, but if we don't have steps where it can be set to null then it should never be null.
It should be something like:
- If the touch surface exposes maximum surface dimensions in device units:
- Set touchEvent.surfaceDimensions[0] to ...
- Set touchEvent.surfaceDimensions[1] to ...
- Otherwise:
- Set touchEvent.surfaceDimensions to null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may need more discussion. Perhaps there is not a case where surfaceDimensions can be null. For the DS4 touch coordinates are normalized using the device touch point and the surface dimensions. Should the algorithm include receiving input from a device that sends already normalized touch points and does not report surface dimensions?
extensions.html
Outdated
<li>Set |touchEvent|.{{GamepadTouch/surfaceDimensions}}[1] to be | ||
device max y-axis coordinate.<p>(<i>note: surfaceDimensions can be set to `null`</i>)</p> | ||
</li> | ||
<li>Add |touchEvent| to |gamepad|.{{Gamepad/[[touchEvents]]}}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're adding to the touchEvents internal slot but never remove from it. This algorithm should start by emptying touchEvents since we plan to replace the whole list each time we update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added step to empty out any existing events from touchEvents.
extensions.html
Outdated
`touchData.touchID`. | ||
</li> | ||
<li>Set |touchEvent|.{{GamepadTouch/surfaceId}} to be | ||
device surfaceId. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unclear where the device surfaceId comes from. I think it would be simpler to specify it as an index into whatever the surface ordering happens to be:
- Let surfaceId be 0
- For each touch surface:
- For each touch input on that surface:
- Create and add the touch event (with surfaceId)
- Increment surfaceId
- For each touch input on that surface:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added outer loop to iterate surfaces.
extensions.html
Outdated
<li>Let |touchEvent:GamepadTouch| be a {{GamepadTouch}}. | ||
</li> | ||
<li>Set |touchEvent|.{{GamepadTouch/touchId}} to be | ||
`touchData.touchID`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to specify more of how the touch event's touchID is initialized since it's important for how applications will interact with the API. Let's try to leverage the Touch Events specification which already defines "active touch point":
https://w3c.github.io/touch-events/#dfn-active-touch-point
- If the touch data is part of an existing [=active touch point=] tracked by the user agent:
- Set touchID to the touchID of the active touch point
- Otherwise, set touchID to nextTouchID and increment nextTouchID
nextTouchID should be a Gamepad internal slot so it's always unique even when there are multiple touch surfaces on the same gamepad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nondebug I manually added the link, it appears that the dfn is not exported (or possibly, probably, I am not using xref correctly). I am also a little concerned that we are making the spec too restrictive to implementers, e.g. I am working on the DS4 GamepadTouch implementation in chromium and find that normalizing the touchId is much easier at the ds4_controller than the device/gamepad (this may be a bad assumption on my part that when you refer to an "internal slot" it would translate to that object). Requiring the nextTouchId in device/gamepad might cause difficulty in implementing other touch controllers. The specification just needs to be clear that implementers support 32 bit value starting at 0 and incrementing with each new touch event not associated with an existing active touch point. How this is accomplished should be open.
I will try and add some "Usage Examples" to better explain how applications will interact with the API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it appears that the dfn is not exported
I'm not sure why the xref dfn doesn't work. It doesn't show up in https://respec.org/xref/ either. https://respec.org/docs/#xref suggests it needs a change to the touch-events spec to export it. I'm okay with leaving it as-is for now, we can clean this up later when the extension is merged into the main specification.
normalizing the touchId is much easier at the ds4_controller than the device/gamepad (this may be a bad assumption on my part that when you refer to an "internal slot" it would translate to that object)
Normalizing touchId in Dualshock4Controller won't work because a device::Gamepad isn't 1-to-1 with a blink::Gamepad. Most of the time, "internal slot" should be read as "1-to-1 with blink::Gamepad". The only time we can attach internal slots to device::Gamepad is if all tabs should see the same value. This isn't true for touchId and nextTouchId since they may differ between tabs even for the same gamepad.
Suppose there's a tab accessing a DS4 through Gamepad API and it receives a touch point with ID 0. Then a second tab is opened and begins accessing DS4 through Gamepad API. When the next touch occurs, the first tab should get a touch point with ID 1 and the second tab should get touch ID 0. If we deliver touch ID 1 to both tabs then the second tab can deduce that another tab was accessing Gamepad API.
We can store raw touchIds in the device::Gamepad buffer and normalize them in blink::Gamepad::UpdateFromDeviceState. To normalize the ID, blink::Gamepad will need to maintain nextTouchId along with a mapping from raw->normalized touchIds for all active touch points. The rest of the touch data (surfaceId, position, surfaceDimensions) won't change between tabs so we can store it in the device::Gamepad buffer.
Requiring the nextTouchId in device/gamepad might cause difficulty in implementing other touch controllers. The specification just needs to be clear that implementers support 32 bit value starting at 0 and incrementing with each new touch event not associated with an existing active touch point. How this is accomplished should be open.
Agreed, the spec should not care how active touch points are identified. We only need to be able to enumerate them and somehow associate current set of active touch points with the set of active touch points from the previous update.
extensions.html
Outdated
</dd> | ||
<dt> | ||
<dfn>touchEvents</dfn> | ||
</dt> | ||
<dd> | ||
A list of touch events generated from all touch surfaces. | ||
<code>null</code> if the device does not support touch events. | ||
If the device does not support touch events, MUST be set to `null`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
touchEvents should define a getter algorithm that returns the data from the internal slot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
extensions.html
Outdated
<p> | ||
In addtion to the steps defined in the main | ||
<a href="https://w3c.github.io/gamepad/">Gamepad specification</a>. | ||
When the system receives new touch input values, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the system receives new touch input values,
This seems ambiguous to me, it's unclear whether "new touch input values" includes updates where there are no touches, for example a DS4 input report that doesn't contain any active touch points. We want this method to run for every DS4 input report, even when there are no active touch points.
Perhaps something like:
"When the user agent modifies the list of [=active touch points=] for a touch surface by adding touch points, removing touch points, or updating the values of existing touch points, update touchEvents by running the following steps:"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
extensions.html
Outdated
<ol> | ||
<li>Let |gamepad:Gamepad| be a newly created {{Gamepad}} instance: | ||
<ol> | ||
<li>Initialize |gamepad|'s {{Gamepad/touchEvents}} to the result of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here we should initialize the touchEvents internal slot to an empty list if the gamepad has any touch surfaces, otherwise null. The [=updating touchEvents=] algorithm will be called automatically whenever the first touch inputs are received so we don't need to call it here.
The actual touchEvents attribute (not the internal slot) should define a getter algorithm that returns the data from the internal slot. That way the attribute is initialized when we initialize the internal slot. We use the internal slot because the attribute is readonly so technically it has no setter but we still need a way to update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
extensions.html
Outdated
<li>Let |touchEvent:GamepadTouch| be a {{GamepadTouch}}. | ||
</li> | ||
<li>Set |touchEvent|.{{GamepadTouch/touchId}} to be | ||
`touchData.touchID`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it appears that the dfn is not exported
I'm not sure why the xref dfn doesn't work. It doesn't show up in https://respec.org/xref/ either. https://respec.org/docs/#xref suggests it needs a change to the touch-events spec to export it. I'm okay with leaving it as-is for now, we can clean this up later when the extension is merged into the main specification.
normalizing the touchId is much easier at the ds4_controller than the device/gamepad (this may be a bad assumption on my part that when you refer to an "internal slot" it would translate to that object)
Normalizing touchId in Dualshock4Controller won't work because a device::Gamepad isn't 1-to-1 with a blink::Gamepad. Most of the time, "internal slot" should be read as "1-to-1 with blink::Gamepad". The only time we can attach internal slots to device::Gamepad is if all tabs should see the same value. This isn't true for touchId and nextTouchId since they may differ between tabs even for the same gamepad.
Suppose there's a tab accessing a DS4 through Gamepad API and it receives a touch point with ID 0. Then a second tab is opened and begins accessing DS4 through Gamepad API. When the next touch occurs, the first tab should get a touch point with ID 1 and the second tab should get touch ID 0. If we deliver touch ID 1 to both tabs then the second tab can deduce that another tab was accessing Gamepad API.
We can store raw touchIds in the device::Gamepad buffer and normalize them in blink::Gamepad::UpdateFromDeviceState. To normalize the ID, blink::Gamepad will need to maintain nextTouchId along with a mapping from raw->normalized touchIds for all active touch points. The rest of the touch data (surfaceId, position, surfaceDimensions) won't change between tabs so we can store it in the device::Gamepad buffer.
Requiring the nextTouchId in device/gamepad might cause difficulty in implementing other touch controllers. The specification just needs to be clear that implementers support 32 bit value starting at 0 and incrementing with each new touch event not associated with an existing active touch point. How this is accomplished should be open.
Agreed, the spec should not care how active touch points are identified. We only need to be able to enumerate them and somehow associate current set of active touch points with the set of active touch points from the previous update.
extensions.html
Outdated
<ol> | ||
<li>Let |surfaceId:unsigned long| be 0. | ||
</li> | ||
<li>Let |touchSurfaces:list| be an [=ordered set=] of touch surfaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this algorithm we describe touchSurfaces
, touchInputs
, touchData
but there's no instructions on how to construct those objects.
We want to emphasize the assumptions we're making about the inputs but we also don't want to specify more than we have to. I think we can modify the algorithm to be more specific about the assumptions we're making while being less specific about how the data is presented. For example, if we specify that a gamepad's touch surfaces need to have some consistent ordering then we can iterate over them without creating lists:
- Let |surfaceId| be 0.
- Repeat these steps for each [=touch surface=] on |gamepad| in [=touch surface enumeration order=]:
- Let |surfaceDimensions| be
null
. - If the [=touch surface=] exposes maximum dimensions in device units:
- Set |surfaceDimensions| to a [=new=] {{Array}} with length 2.
- Set |surfaceDimensions|[0] to the maximum X dimension of the current [=touch surface=] in device units.
- Set |surfaceDimensions|[1] to the maximum Y dimension of the current [=touch surface=] in device units.
- Repeat these steps for each [=active touch point=] on the current [=touch surface=]:
- Let |x:float| be the X coordinate for the current [=active touch point=] in device units.
- Let |y:float| be the Y coordinate for the current [=active touch point=] in device units.
- Let |position| be a [=new=] {{Array}} with length 2.
- If |surfaceDimensions| is
null
:- Set |position|[0] to ???.
- Set |position|[1] to ???.
- Otherwise:
- Set |position|[0] to a value calculated from |x| and |surfaceDimensions|[0] and normalized to [-1,1].
- Set |position|[1] to a value calculated from |y| and |surfaceDimensions|[1] and normalized to [-1,1].
- Let |touchEvent| be a [=new=] {{GamepadTouch}}:
- Initialize |touchEvent|.{{GamepadTouch/surfaceId}} to |surfaceId|.
- Initialize |touchEvent|.{{GamepadTouch/position}} to |position|.
- Initialize |touchEvent|.{{GamepadTouch/surfaceDimensions}} to |surfaceDimensions|.
- [=list/Append=] |touchEvent| to |gamepad|.{{Gamepad/[[touchEvents]]}}.
- Increment |surfaceId|.
- Let |surfaceDimensions| be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normalizing touchId in Dualshock4Controller won't work because a device::Gamepad isn't 1-to-1 with a blink::Gamepad. Most of the time, "internal slot" should be read as "1-to-1 with blink::Gamepad". The only time we can attach internal slots to device::Gamepad is if all tabs should see the same value. This isn't true for touchId and nextTouchId since they may differ between tabs even for the same gamepad.
I went back and double checked and what I have observed is that the lifetime of a blink::Gamepad is very short maybe each render, so will not work for touchId and nextTouchId. This is probably not the forum for this discussion (I need to figure out how to start it over on the chromium site).
This does create an issue with implementing the specification since the lifetime of the device::Gamepad is not correct either as you point out.
We want to emphasize the assumptions we're making about the inputs but we also don't want to specify more than we have to. I think we can modify the algorithm to be more specific about the assumptions we're making while being less specific about how the data is presented. For example, if we specify that a gamepad's touch surfaces need to have some consistent ordering then we can iterate over them without creating lists:
Agreed, I will work on addressing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, blink::Gamepad is short-lived. The specification says it should behave like a live object but the Chromium implementation hasn't been updated to match that behavior yet. (Relevant spec issue: #8)
We've worked around this by attaching the internal state to blink::NavigatorGamepad instead of blink::Gamepad and creating a Gamepad::Client interface to provide access to this internal state so it's persisted even when the blink::Gamepad is destroyed and recreated.
This is probably not the forum for this discussion (I need to figure out how to start it over on the chromium site).
Let's use this crbug to discuss the Chromium implementation: 1143942: Gamepad Multitouch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nondebug I have restructured the Receiving inputs section and added a Glossary for terms. Several updates to your other comments we made a bit back, should I just resolve those comments?
There is a suggestion at the top "Still in progress? Convert to draft", does that make since?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extensions.html content looks good to me, I think this can be merged once the formatting issues are fixed.
extensions.html
Outdated
@@ -50,7 +50,7 @@ | |||
company: "Google", companyURL: "http://www.google.com/", | |||
w3cid: 87824 }, | |||
], | |||
|
|||
xref: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this xref
in favor of the xref
below with a list of specification short names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@bradleyneedham, would you mind rebasing so it's easier to review? |
b6f4fc7
to
e8b34cb
Compare
Hi @marcoscaceres, took me a little but I think I got the rebase correct. This will hopefully be easier to see the changes. |
extensions.html
Outdated
"updating touchEvents">update touchEvents</dfn> by running the | ||
following steps: | ||
</p> | ||
<ol> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<ol> | |
<ol class="algorithm"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
extensions.html
Outdated
<dfn data-dfn-for="Gamepad">[[\touchEvents]]</dfn> | ||
</td> | ||
<td> | ||
<code>null</code> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<code>null</code> | |
`null` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should initially just be an empty list? Then we don't need to deal with list and null
as types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because not all Gamepads support touch pads, it is better this way to distinguish between a Gamepad that will never have touchIds (null) and a Gamepad that just has no new input (empty list).
extensions.html
Outdated
</dt> | ||
<dd> | ||
An enumeration that indicates which hand the controller is being held | ||
in or is most likely to be held in. `"left"`, `"right"`, or `""`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would "both" be better than ""?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enumeration is better described above in the document. I changed this to refer to the above definition. I think "" can mean "both", "either", or "NA", and perhaps it only matters to the developer if it is "left" or "right".
Perhaps @nondebug has more insight.
e8b34cb
to
24ff5fe
Compare
Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53
Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53
Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53
Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53
Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53
Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53
Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3866373 Reviewed-by: Matt Reynolds <[email protected]> Commit-Queue: Matt Reynolds <[email protected]> Cr-Commit-Position: refs/heads/main@{#1126297}
Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3866373 Reviewed-by: Matt Reynolds <[email protected]> Commit-Queue: Matt Reynolds <[email protected]> Cr-Commit-Position: refs/heads/main@{#1126297}
Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3866373 Reviewed-by: Matt Reynolds <[email protected]> Commit-Queue: Matt Reynolds <[email protected]> Cr-Commit-Position: refs/heads/main@{#1126297}
…=testonly Automatic update from web-platform-tests Add multitouch support to Gamepad API Changes and updates have been made to Fernando Attia's patchset 1612050. The implementation has been changed to support the most recent changes to the spec w3c/gamepad#168. Support for DualShock4 controller is part of patch. This commit is a squash of several changes the last major one is: Normalize touchIds per Gamepad The same hardware may provide input to Gamepads in different tabs. This commit normalizes touchIds coming from the hardware to a single incremented value starting at zero per Gamepad instance. Extend the Gamepad API to support multitouch surfaces (touchpads). Intent to prototype : https://groups.google.com/a/chromium.org/g/blink-dev/c/4q_k23rPMos Chrome status entry: https://www.chromestatus.com/feature/4782975812108288 [email protected] Change-Id: I0fa2006c3fc36a908b316cc29b97d295aac798ca Update idl to match current spec draft Normalize touchid to 32bit value. Update web tests. Bug: 1143942 Change-Id: I80ed31ebf0c6a347906b91b3c178099d1e332c53 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3866373 Reviewed-by: Matt Reynolds <[email protected]> Commit-Queue: Matt Reynolds <[email protected]> Cr-Commit-Position: refs/heads/main@{#1126297} -- wpt-commits: c03609e36f4e7d3ad8888b7532650836fc1bc7ef wpt-pr: 39227
Move to a different branch
Other small formatting updates
@nondebug @sagoston @marcoscaceres Thank you all again for your review and comments. |
@marcoscaceres I have added links to the explainer, tests, and standards positions in the first comment. Thank you again for your time and consideration. |
Hi @nondebug, the failure I am getting here is the same as the failure that #172 is getting. |
Relevant error message:
I'm not sure why that reference fails, it appears to be correct according to the xref tool: https://respec.org/xref/?term=%22xr-standard%22+gamepad+mapping @marcoscaceres can you take a look? |
@@ -95,8 +95,7 @@ | |||
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood | |||
// Team Contact. | |||
wgPatentURI: "https://www.w3.org/2004/01/pp-impl/83482/status", | |||
|
|||
xref: ["DOM", "HTML", "INFRA", "gamepad"], | |||
xref: ["HTML", "DOM", "PERMISSIONS-POLICY", "HR-TIME", "INFRA", "gamepad"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xref: ["HTML", "DOM", "PERMISSIONS-POLICY", "HR-TIME", "INFRA", "gamepad"], | |
xref: ["HTML", "DOM", "PERMISSIONS-POLICY", "HR-TIME", "INFRA", "gamepad","webxr-gamepads-module"], |
This should solve the ReSpec/xref issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's not sufficient to solve the issue. The failure is in index.html in a part of the document not modified by the PR, so I suspect it was a change in respec that caused this failure.
@marcoscaceres said it looks like a respec bug. The xref sees " instead of double-quote characters so it fails to match against the webxr-gamepads-module reference.
Closes #167
The following tasks have been completed:
Implementation commitment:
Standards positions:
Resources: