CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 36
Add persistentDeviceId to PointerEvent #495
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
Conversation
This change proposes the introduction of a new attribute to the PointerEvent interface - deviceId. See: https://github.com/WICG/pointer-event-extensions/blob/main/pointer-event-device-id-explainer.md
Worth adding, for context, #353 |
Happy to take any comments on the changes. The idea is based on that of pointer id; -1 is reserved for invalid ids. In Chromium, 1 is reserved for the mouse pointer (0 is unused); but I left the wording to be similar to the pointerId definition. As long as the deviceId is unique for each device, web devs should not have a problem. |
Made changes to introduce deviceProperties rather than having deviceId on PointerEvent. Rough draft- feedback appreciated |
This change replaces deviceId on the PointerEvent interface with a new interface, deviceProperties. DeviceProperties contains one member, uniqueId, which functionally behaves the same as the outgoing deviceId. Spec: w3c/pointerevents#495 This change also removes the setting of deviceId when creating a PointerCancel event, as there is no current application for device/unique id for a PointerCancel. Bug: 330760871 Change-Id: I0f1a9f7d5589f790d94f498a38bfdf55b6f51073
This change replaces deviceId on the PointerEvent interface with a new interface, deviceProperties. DeviceProperties contains one member, uniqueId, which functionally behaves the same as the outgoing deviceId. Spec: w3c/pointerevents#495 This change also removes the setting of deviceId when creating a PointerCancel event, as there is no current application for device/unique id for a PointerCancel. Bug: 330760871 Change-Id: I0f1a9f7d5589f790d94f498a38bfdf55b6f51073
This change replaces deviceId on the PointerEvent interface with a new interface, deviceProperties. DeviceProperties contains one member, uniqueId, which functionally behaves the same as the outgoing deviceId. Spec: w3c/pointerevents#495 This change also removes the setting of deviceId when creating a PointerCancel event, as there is no current application for device/unique id for a PointerCancel. Bug: 330760871 Change-Id: I0f1a9f7d5589f790d94f498a38bfdf55b6f51073
… 0, a=testonly Automatic update from web-platform-tests Set Invalid DeviceProperties.uniqueId to 0 Replace -1 with 0 for the invalid uniqueId as per recent spec consensus. Spec: w3c/pointerevents#495 Bug: 330760871 Change-Id: I063515535ee0510c89942f16098c6211bafb480c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5463741 Reviewed-by: Robert Flack <flackr@chromium.org> Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1290720} -- wpt-commits: a2bf027ec76e7f183c4f7e3fdcd62d5a0e818598 wpt-pr: 45765
@smaug---- @flackr @mustaqahmed I have updated this PR to introduce |
Gentle ping :) |
Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871
Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871
Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5643255 Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com> Reviewed-by: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1318886}
Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5643255 Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com> Reviewed-by: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1318886}
…PointerEvent.persistentDeviceId, a=testonly Automatic update from web-platform-tests Swap PointerEvent.deviceProperties with PointerEvent.persistentDeviceId Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5643255 Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com> Reviewed-by: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1318886} -- wpt-commits: b29c0837b336a17d4aca09b9afbb82ac30748385 wpt-pr: 46888
…PointerEvent.persistentDeviceId, a=testonly Automatic update from web-platform-tests Swap PointerEvent.deviceProperties with PointerEvent.persistentDeviceId Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5643255 Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com> Reviewed-by: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1318886} -- wpt-commits: b29c0837b336a17d4aca09b9afbb82ac30748385 wpt-pr: 46888
…PointerEvent.persistentDeviceId, a=testonly Automatic update from web-platform-tests Swap PointerEvent.deviceProperties with PointerEvent.persistentDeviceId Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5643255 Commit-Queue: Sahir Vellani <sahir.vellanimicrosoft.com> Reviewed-by: Olga Gerchikov <gerchikomicrosoft.com> Reviewed-by: Robert Flack <flackrchromium.org> Cr-Commit-Position: refs/heads/main{#1318886} -- wpt-commits: b29c0837b336a17d4aca09b9afbb82ac30748385 wpt-pr: 46888 UltraBlame original commit: 84225becd9d58cb4946fefdbbd42aeda5dc9445c
…PointerEvent.persistentDeviceId, a=testonly Automatic update from web-platform-tests Swap PointerEvent.deviceProperties with PointerEvent.persistentDeviceId Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5643255 Commit-Queue: Sahir Vellani <sahir.vellanimicrosoft.com> Reviewed-by: Olga Gerchikov <gerchikomicrosoft.com> Reviewed-by: Robert Flack <flackrchromium.org> Cr-Commit-Position: refs/heads/main{#1318886} -- wpt-commits: b29c0837b336a17d4aca09b9afbb82ac30748385 wpt-pr: 46888 UltraBlame original commit: 84225becd9d58cb4946fefdbbd42aeda5dc9445c
…PointerEvent.persistentDeviceId, a=testonly Automatic update from web-platform-tests Swap PointerEvent.deviceProperties with PointerEvent.persistentDeviceId Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5643255 Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com> Reviewed-by: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1318886} -- wpt-commits: b29c0837b336a17d4aca09b9afbb82ac30748385 wpt-pr: 46888
repointed this PR to the new |
Looks like the tests rely on window.internals. What is that? And why are the non-manual tests passing in all the browsers even if the API isn't implemented. Could the tests be fixed? |
Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5643255 Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com> Reviewed-by: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1318886}
Thanks for bringing the tests up! I'll look into it and report back here. |
The tests have been fixed. |
Merged into the next version of the spec, as discussed here https://www.w3.org/2024/07/31-pointerevents-minutes.html#t03 |
… a=testonly Automatic update from web-platform-tests Introduce PointerEvent.deviceProperties This change replaces deviceId on the PointerEvent interface with a new interface, deviceProperties. DeviceProperties contains one member, uniqueId, which functionally behaves the same as the outgoing deviceId. Spec: w3c/pointerevents#495 Bug: 330760871 Change-Id: I0f1a9f7d5589f790d94f498a38bfdf55b6f51073 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5388651 Reviewed-by: Robert Flack <flackr@chromium.org> Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1286827} -- wpt-commits: 4013b5285c0977d16542695ae2ed47184730f331 wpt-pr: 45420
… 0, a=testonly Automatic update from web-platform-tests Set Invalid DeviceProperties.uniqueId to 0 Replace -1 with 0 for the invalid uniqueId as per recent spec consensus. Spec: w3c/pointerevents#495 Bug: 330760871 Change-Id: I063515535ee0510c89942f16098c6211bafb480c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5463741 Reviewed-by: Robert Flack <flackr@chromium.org> Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1290720} -- wpt-commits: a2bf027ec76e7f183c4f7e3fdcd62d5a0e818598 wpt-pr: 45765
…roperties in PointerEventInit, a=testonly Automatic update from web-platform-tests Set null as the default value of deviceProperties in PointerEventInit Previously, the default for deviceProperties in PointerEventInit was undefined; although in chromium a value was set using the default constructor. This CL changes this behaviour such that the default value for deviceProperties is null. The corresponding WPT is updated as well. For further context, please see the discussion here: w3c/pointerevents#495 (comment) Bug: 330760871 Change-Id: I5becf25f76e8b8c4572a783bfba8c1c4f36f8a74 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526091 Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1298623} -- wpt-commits: aec353e3b1cae190e1c0485b1406ea522f38e661 wpt-pr: 46174
…PointerEvent.persistentDeviceId, a=testonly Automatic update from web-platform-tests Swap PointerEvent.deviceProperties with PointerEvent.persistentDeviceId Bring back a unique id on the base pointer event and remove deviceProperties. Rather than deviceId, this will be called persistentDeviceId. Spec: w3c/pointerevents#495 Change-Id: Ia284adc60bc4030b69dbec89d0e37117fecf3f83 Bug: 330760871 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5643255 Commit-Queue: Sahir Vellani <sahir.vellani@microsoft.com> Reviewed-by: Olga Gerchikov <gerchiko@microsoft.com> Reviewed-by: Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1318886} -- wpt-commits: b29c0837b336a17d4aca09b9afbb82ac30748385 wpt-pr: 46888
This change proposes the introduction of a new attribute to the PointerEvent interface - persistentDeviceId. See: https://github.com/WICG/pointer-event-extensions/blob/main/pointer-event-device-id-explainer.md
This pull request is expected to make the 4th iteration of the PointerEvent specification.
Preview | Diff