Closed Bug 2022644 Opened 2 months ago Closed 2 months ago

Add support for "altitudeAngle" and "azimuthAngle" to pointer actions of subtype "touch"

Categories

(Remote Protocol :: Agent, task, P3)

task
Points:
3

Tracking

(firefox151 fixed)

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [webdriver:m19], [wptsync upstream][webdriver:relnote])

Attachments

(2 files)

Bug 2013990 added platform support for both altitudeAngle and azimuthAngle. It would be good to have support for both parameters so that I can properly check the behavior for async touch events as well.

Summary: Add support for "altitudeAngle" and "azimuthAngle" to pointer events of type "touch" → Add support for "altitudeAngle" and "azimuthAngle" to pointer actions of subtype "touch"

When adding support for altitudeAngle and azimuthAngle in WebDriver I noticed a difference in behavior between us and Chrome/Safari. This all is around https://www.w3.org/TR/pointerevents3/#dom-pointerevent-altitudeangle vs https://w3c.github.io/touch-events/#dom-touch-altitudeangle. What should actually be the default behavior? In our WebDriver specification we define 0 as default, and when I eg. set altitudeAngle: 1 when dispatching the event the resulting pointerdown event contains 1 as well while in both Chrome and Safari the value is Pi/2.

I assume that our implementation might not be correct here?

Edit: Both tiltX and tiltY are in these cases 0 for Chrome and Safari.

Flags: needinfo?(echen)

(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #1)

In our WebDriver specification we define 0 as default, and when I eg. set altitudeAngle: 1 when dispatching the event the resulting pointerdown event contains 1 as well while in both Chrome and Safari the value is Pi/2.

On our implementation, if the event is synthesized with specifying altitudeAngle and azumuthAngle value, the event will use the specified value for altitudeAngle and azumuthAngle, and use them to generate tiltX and tiltY, per https://www.w3.org/TR/pointerevents3/#converting-between-tiltx-tilty-and-altitudeangle-azimuthangle.

So it look like Chrome/Safari returns default value even when altitudeAngle and azumuthAngle value is specified explicitly, that is strange. What if you set altitudeAngle and azumuthAngle to different value? I wonder if they always return default value. If that is the case, maybe they don't support specifying altitudeAngle and azumuthAngle?

Flags: needinfo?(echen) → needinfo?(hskupin)

Indeed. It doesn't matter which value I set both browsers return the same value all the time. Same for the azimuthAngle as well. I checked with Firefox what we return if no value is set and it's Pi/2 as well. That means we should not default to 0 in WebDriver BiDi as value but should leave it to the platform to decide which value to use. Thanks!

Flags: needinfo?(hskupin)
Depends on: 2022910
Assignee: nobody → hskupin
Status: NEW → ASSIGNED

Removing all the default values including from pressure results in wpt failures for pointerevents:

https://treeherder.mozilla.org/logviewer?job_id=553285177&repo=try&task=EkP5RzQNS4-gUzhAo5ANjA.1&lineNumber=8819

As per pointerevents spec the defaults should be 0.5 and 0 depending on the active button state.

Assignee: hskupin → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(echen)
Assignee: nobody → hskupin
Status: NEW → ASSIGNED

(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #7)

Removing all the default values including from pressure results in wpt failures for pointerevents:

https://treeherder.mozilla.org/logviewer?job_id=553285177&repo=try&task=EkP5RzQNS4-gUzhAo5ANjA.1&lineNumber=8819

As per pointerevents spec the defaults should be 0.5 and 0 depending on the active button state.

Yes, I think there is something wrong with the default value for pressure. I will investigate and file a bug.

I filed bug 2023139.

Depends on: 2023139
Flags: needinfo?(echen)
Points: --- → 3
Priority: -- → P3
Whiteboard: [webdriver:m19]

I pushed another try build: https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=186847. Hopefully only the Puppeteer fix is remaining now.

(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #13)

I pushed another try build: https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=186847. Hopefully only the Puppeteer fix is remaining now.

This looks good. We are only waiting for the Puppeteer changes now.

See Also: → 2024719
Pushed by hskupin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fa06c59f02ed https://hg.mozilla.org/integration/autoland/rev/fd9e95090c14 [remote] Add support for "altitudeAngle" and "azimuthAngle" to pointer actions of subtype "touch". r=jdescottes https://github.com/mozilla-firefox/firefox/commit/0df3e195f255 https://hg.mozilla.org/integration/autoland/rev/6df7da9d8247 [wdspec] Improve tests for pointer events of type touch for altitudeAngle and azimuthAngle. r=jdescottes

Backed out for causing puppeteer failures

Flags: needinfo?(hskupin)
Flags: needinfo?(hskupin)
Pushed by hskupin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/193ed32cd9a1 https://hg.mozilla.org/integration/autoland/rev/b6bbda49bf6f [remote] Add support for "altitudeAngle" and "azimuthAngle" to pointer actions of subtype "touch". r=jdescottes https://github.com/mozilla-firefox/firefox/commit/85bd1ac68f35 https://hg.mozilla.org/integration/autoland/rev/75d64e79a239 [wdspec] Improve tests for pointer events of type touch for altitudeAngle and azimuthAngle. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/58760 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m19] → [webdriver:m19], [wptsync upstream]
Upstream PR merged by moz-wptsync-bot
Duplicate of this bug: 1863539
Whiteboard: [webdriver:m19], [wptsync upstream] → [webdriver:m19], [wptsync upstream][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: