-
Notifications
You must be signed in to change notification settings - Fork 35
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
Update azimuth/altitude/tiltX/tiltY to not require default values in pointer events web idl #323
Update azimuth/altitude/tiltX/tiltY to not require default values in pointer events web idl #323
Conversation
…pointer events web interfaces Remove default values for `tiltX`,`tiltY`,`azimuthAngle`,`altitudeAngle`. Change default value for `altitudeAngle` to `π/2`. Describe rounding method for calculated `tiltX`,`tiltY`. If only the value for one attribute is specified, the other attribute must be populated with the default value.
<p>The altitude (in radians) of the transducer (e.g. pen stylus), in the range [0,π/2] - where 0 is parallel to the surface (X-Y plane), and π/2 is perpendicular to the surface. For hardware and platforms that do not report tilt or angle, the value MUST be π/2.</p> | ||
<div class="note"> | ||
When the hardware or platform does not report the tilt or angle, as opposed to the default value of 0 defined for <code>altitudeAngle</code> | ||
in <a href="https://w3c.github.io/touch-events/">Touch Events - Level 2</a> specification, |
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.
Just an editorial comment and not important really. You can also reference the touch events with brackets similar to other places in this spec so that it appear in the normative references.
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 checked the reference database and there is no entry for Touch Events - Level 2. I believe this is why it is referenced like this here.
index.html
Outdated
If <code>azimuth</code> and <code>altitude</code> are provided, the user agent MUST initialize <code>tiltX</code>, <code>tiltY</code> | ||
with the calculated values rounded to the nearest integer value. For values falling exactly midway between integers, the user agend MUST always round up. | ||
</p> | ||
<p>If only the value of one of the two attributes is provided, the other attribute MUST be initialized to the default value.</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.
So does this line refer to both when out of 4 only 1 is present and when out of 4 only 3 is present?
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.
So does this line refer to both when out of 4 only 1 is present and when out of 4 only 3 is present?
My intention was to cover both cases. Basically I would like to apply formulas only in these 2 cases:
(hasTiltX || hasTiltY) && !hasAzimuthAngle && !hasAltitudeAngle
(hasAzimuthAngle || hasAltitudeAngle) && !hasTiltX && !hasTiltY
If tiltX
and tiltY
and one of azimuthAngle
/altitudeAngle
values are provided, I cannot guarantee that azimuthAngle
/altitudeAngle
value as provided by the user matches the formula with regards to tiltX
and tiltY
. Same goes if azimuthAngle
and altitudeAngle
and one of tiltX
/tiltY
values are provided.
My assumption is that the user agent is not going to overwrite a value provided by the user. If the user provides values that are not correct it is an authoring problem.
@liviutinta btw, did this solve our implementation problem we see in Chromium code for "has*" functions? |
Yes, removing default values for |
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.
Sounds good to me.
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 looks good but I would ask for a few minor edits.
Separate explanations for `tiltX` / `tiltY` and `altitudeAngle`/ `azimuthAngle` into 3 paragraphs: first a general description and how a user agent needs to populate trusted events, second about calculations for untrusted events and the last one a note related to rounding resulting `tiltX` / `tiltY` angles to degrees.
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.
Thanks Liviu, this looks good to me now.
We will need approvals from @smaug---- and @patrickhlauke. |
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add tr 10000 ansform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6
@smaug---- and @patrickhlauke does this look okay? |
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165457 Reviewed-by: David Bokan <bokan@chromium.org> Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> Commit-Queue: Liviu Tinta <liviutinta@chromium.org> Cr-Commit-Position: refs/heads/master@{#790586}
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165457 Reviewed-by: David Bokan <bokan@chromium.org> Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> Commit-Queue: Liviu Tinta <liviutinta@chromium.org> Cr-Commit-Position: refs/heads/master@{#790586}
Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165457 Reviewed-by: David Bokan <bokan@chromium.org> Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> Commit-Queue: Liviu Tinta <liviutinta@chromium.org> Cr-Commit-Position: refs/heads/master@{#790586}
…a=testonly Automatic update from web-platform-tests Add Azimuth/Altitude to Pointer Events Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165457 Reviewed-by: David Bokan <bokan@chromium.org> Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> Commit-Queue: Liviu Tinta <liviutinta@chromium.org> Cr-Commit-Position: refs/heads/master@{#790586} -- wpt-commits: 7a5f4a4eff43a231973fba9ba9527e1b88f54c74 wpt-pr: 23242
…a=testonly Automatic update from web-platform-tests Add Azimuth/Altitude to Pointer Events Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165457 Reviewed-by: David Bokan <bokan@chromium.org> Reviewed-by: Mustaq Ahmed <mustaq@chromium.org> Commit-Queue: Liviu Tinta <liviutinta@chromium.org> Cr-Commit-Position: refs/heads/master@{#790586} -- wpt-commits: 7a5f4a4eff43a231973fba9ba9527e1b88f54c74 wpt-pr: 23242
…a=testonly Automatic update from web-platform-tests Add Azimuth/Altitude to Pointer Events Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165457 Reviewed-by: David Bokan <bokanchromium.org> Reviewed-by: Mustaq Ahmed <mustaqchromium.org> Commit-Queue: Liviu Tinta <liviutintachromium.org> Cr-Commit-Position: refs/heads/master{#790586} -- wpt-commits: 7a5f4a4eff43a231973fba9ba9527e1b88f54c74 wpt-pr: 23242 UltraBlame original commit: f438aea49eaefede895bbd0aeeecc6f5c42a721f
…a=testonly Automatic update from web-platform-tests Add Azimuth/Altitude to Pointer Events Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165457 Reviewed-by: David Bokan <bokanchromium.org> Reviewed-by: Mustaq Ahmed <mustaqchromium.org> Commit-Queue: Liviu Tinta <liviutintachromium.org> Cr-Commit-Position: refs/heads/master{#790586} -- wpt-commits: 7a5f4a4eff43a231973fba9ba9527e1b88f54c74 wpt-pr: 23242 UltraBlame original commit: f438aea49eaefede895bbd0aeeecc6f5c42a721f
…a=testonly Automatic update from web-platform-tests Add Azimuth/Altitude to Pointer Events Add azimuthAngle/altitudeAngle to pointer_events.idl and pointer_events_init.idl. Remove tiltX/tiltY default values from pointer_events.idl Add transform functions from tiltX/tiltY to azimuth/altitude. Add web platform test. Change default values for tiltX/tiltY. See Pointer Events spec Pull Request here: w3c/pointerevents#323 Bug: 1069500 Change-Id: Ie04dd991e0223a793a037c784631ddf3a14e70a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2165457 Reviewed-by: David Bokan <bokanchromium.org> Reviewed-by: Mustaq Ahmed <mustaqchromium.org> Commit-Queue: Liviu Tinta <liviutintachromium.org> Cr-Commit-Position: refs/heads/master{#790586} -- wpt-commits: 7a5f4a4eff43a231973fba9ba9527e1b88f54c74 wpt-pr: 23242 UltraBlame original commit: f438aea49eaefede895bbd0aeeecc6f5c42a721f
We have this WPT for this change: pointerevent_tiltX_tiltY_to_azimuth_altitude.html. |
Remove default values for
tiltX
,tiltY
,azimuthAngle
,altitudeAngle
.Change default value for
altitudeAngle
toπ/2
.Describe rounding method for calculated
tiltX
,tiltY
.If only the value for one attribute is specified, the other attribute must be populated with the default value.
+@patrickhlauke
+@smaug----
+@NavidZ
+@domenic
Preview | Diff