Closed Bug 2021715 Opened 1 month ago Closed 1 month ago

RFP: Return five touch points on Wayland when touch device is present

Categories

(Core :: Widget: Gtk, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: thorin, Assigned: pierov)

References

Details

Attachments

(1 file)

see Bug 2020170

In Bug 1991701 we made Linux/Windows always reflect as touch capable, i.e 3 x window.Touch* properties are present and we reflected a hardcoded maxTouchPoints - just like a real touch device - see https://github.com/arkenfox/TZP/blob/2f52e2f9f106eec0d6e3973bbef3adf7943067c4/js/devices.js#L696-L740

on linux maxTouchPoints is was always 0 - there are one or two open bugzillas about it (probably totally related to X11), but I can't find them now

In order to stay benign with our spoofing, we should adjust our code to report 5 on linux wayland. It won't affect TB stable as we're on X11 until at least the next ESR (I assume), but this would be good to land now ahead of time.

Type: defect → enhancement
Flags: needinfo?(pierov)

(In reply to Thorin [:thorin] from comment #0)

see Bug 2020170

In Bug 1991701 we made Linux/Windows always reflect as touch capable, i.e 3 x window.Touch* properties are present and we reflected a hardcoded maxTouchPoints - just like a real touch device - see https://github.com/arkenfox/TZP/blob/2f52e2f9f106eec0d6e3973bbef3adf7943067c4/js/devices.js#L696-L740

on linux maxTouchPoints is was always 0 - there are one or two open bugzillas about it (probably totally related to X11), but I can't find them now

In order to stay benign with our spoofing, we should adjust our code to report 5 on linux wayland. It won't affect TB stable as we're on X11 until at least the next ESR (I assume), but this would be good to land now ahead of time.

https://hg-edge.mozilla.org/mozilla-central/rev/14d0407ca9f6 reports five touch points.

Sure, the change should be simple.
Last change to the spoofed value was on e89632384620be236889223ba0754b42093f30b3, but that commit didn't change any tests 🤷‍♀️.
I'll send a try build to check if it breaks anything. If it doesn't, we should add some tests.

Assignee: nobody → pierov
Flags: needinfo?(pierov)

Note that we report touch devices on Wayland only (not X11) while majority of Linux testing is sill on X11. Also we add the touch points only if any touch device is actually present.

(In reply to Martin Stránský [:stransky] (ni? me) from comment #3)

Note that we report touch devices on Wayland only (not X11) while majority of Linux testing is sill on X11. Also we add the touch points only if any touch device is actually present.

In RFP, we pretend all devices are touch capable, with the idea that usually sites don't force users to actually use touch.
So, we're already reporting the touch types that Firefox normally exposes only when touch devices are available.

sites don't force users to actually use touch

only android exposes ontouch* properties (see https://github.com/arkenfox/TZP/blob/2f52e2f9f106eec0d6e3973bbef3adf7943067c4/js/devices.js#L696-L740) which is what websites use or get triggered by (at least in the past and referenced in ye olde bugzillas) - this is also what blink does

FYI: desktop blink regardless of touch capability always exposes 'Touch','TouchEvent','TouchList' window properties and the only thing they bother with is maxTouchPoints - whereas desktop gecko only exposes those three properties if actually touch capable

Make it consistent with the number of touch points now reported on
Wayland when a touch device is available (see Bug 2020170).

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
QA Whiteboard: [qa-triage-done-c151/b150]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: