-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add persistentDeviceId to PointerEvent #495
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
I'm okay with having a property directly on the PointerEvent, but would suggest some better differentiation from |
How does
|
That is quite reasonable. It is long and perhaps weird enough that one wouldn't likely mix that with pointerId. |
@annevk @flackr @mustaqahmed Are you all good with this suggestion and the overall direction we're taking here? |
… 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 <[email protected]> Reviewed-by: Mustaq Ahmed <[email protected]> Commit-Queue: Sahir Vellani <[email protected]> Reviewed-by: Olga Gerchikov <[email protected]> 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 <[email protected]> Reviewed-by: Olga Gerchikov <[email protected]> Reviewed-by: Robert Flack <[email protected]> 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 <[email protected]> Reviewed-by: Olga Gerchikov <[email protected]> Reviewed-by: Robert Flack <[email protected]> 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 <[email protected]> Reviewed-by: Olga Gerchikov <[email protected]> Reviewed-by: Robert Flack <[email protected]> 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 <[email protected]> Reviewed-by: Olga Gerchikov <[email protected]> Reviewed-by: Robert Flack <[email protected]> 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 <[email protected]> Reviewed-by: Olga Gerchikov <[email protected]> Reviewed-by: Robert Flack <[email protected]> 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 <[email protected]> Reviewed-by: Olga Gerchikov <[email protected]> Reviewed-by: Robert Flack <[email protected]> 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 |
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