Re: [w3c/gamepad] Enhance Gamepad interface description for Touch (PR #168)

@nondebug commented on this pull request.



> +          Receiving inputs</a> section of the main 
+          <a href="https://w3c.github.io/gamepad/">Gamepad specification</a>.
+        </p>
+        <p>
+          In addtion to the steps defined in the main 
+          <a href="https://w3c.github.io/gamepad/">Gamepad specification</a>.
+          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,
+          <dfn data-lt="updating touchEvents">update touchEvents</dfn>
+          by running the following steps:
+        </p>
+        <ol>
+          <li>Let |surfaceId:unsigned long| be 0.
+          </li>
+          <li>Let |touchSurfaces:list| be an [=ordered set=] of touch surfaces

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: https://github.com/w3c/gamepad/issues/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](https://crbug.com/1143942)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/gamepad/pull/168#discussion_r941882620
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/gamepad/pull/168/review/1067490626@github.com>

Received on Tuesday, 9 August 2022 23:27:47 UTC