Open Bug 1951231 Opened 1 year ago Updated 1 year ago

Touch pointer events are getting a badly wrong pressure (where pressure isn’t supported)

Categories

(Firefox for Android :: Browser Engine, defect)

Firefox 137
defect

Tracking

()

UNCONFIRMED

People

(Reporter: me, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0

Steps to reproduce:

Maybe these should be split into two different bug reports, I’m not certain. I’ll start with them together. Two different systems:

  1. On my Linux computer, Sway, XP-Pen Artist 16 display with stylus, without the PenTablet software running (which means the stylus appears as a touch device, rather than as a pen device; no idea why, but it is what it is—with it running, it behaves properly, pointerType pen, meaningful pressure, &c.).

  2. On my Android phone, running Firefox for Android.

Actual results:

pressure is set to a spurious value, consistent across both dispatched and coalesced events:

  1. 0.007843137718737125 (suspiciously close to 2¯⁷, 0.0078125).

(pointerType is touch in both cases.)

Expected results:

Per spec https://w3c.github.io/pointerevents/:

For hardware and platforms that do not support pressure, the value MUST be 0.5 when in the active buttons state and 0 otherwise.

Since neither of these devices supports pressure, the pressure value should be 0.5 when pressed.

(On the Android device, I note width and height do vary, though the values are honestly unrealistically low by a factor of ten or so, so it could even be possible to synthesise pressure, if desired, but a constant of less than 1% is clearly incorrect.)

The Bugbug bot thinks this bug should belong to the 'Fenix::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → Fenix

The severity field is not set for this bug.
:zmckenney, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(zmckenney)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:calu, since the bug doesn't have a severity set, could you please set the severity or close the bug?

For more information, please visit BugBot documentation.

Flags: needinfo?(zmckenney) → needinfo?(calu)
Severity: -- → S3
Component: General → Browser Engine
Flags: needinfo?(calu)
You need to log in before you can comment on or make changes to this bug.