Headless Firefox on Linux reports no pointing device
Categories
(Firefox :: Headless, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: dgozman, Assigned: dgozman)
References
Details
Attachments
(1 external file)
Steps to reproduce
Linux-only steps:
MOZ_HEADLESS=1 firefox --marionette # or any headless automation
matchMedia("(hover: hover)").matches // false
matchMedia("(pointer: fine)").matches // false
matchMedia("(hover: none)").matches // true
matchMedia("(pointer: none)").matches // true
Headed Firefox on the same Linux machine, and headless Firefox on macOS and
Windows, all answer (hover: hover) / (pointer: fine).
Actual results
Pages served to headless Firefox (often automated test) get the touch-only layout: hover-revealed menus hidden, enlarged tap targets, :hover styles never applied.
Expected results
Headless mode is a desktop without a display, not a device without a pointing device, so it should report mouse-related values by default.
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
HeadlessLookAndFeel returns PointerCapabilities::None for
PrimaryPointerCapabilities and AllPointerCapabilities, so headless
Firefox on Linux matches (hover: none) and (pointer: none) and gets the
touch-only layout of every site that uses the interaction media
features. The headed GTK nsLookAndFeel doesn't implement these IDs at
all, in which case nsMediaFeatures falls back to the desktop default,
Fine | Hover; headless on macOS and Windows use the native LookAndFeel
and already report a mouse.
Report Fine | Hover in headless GTK as well, and add a Marionette unit
test, since its headless variant is the only job that runs the headless
widget.
Updated•1 month ago
|
Comment 3•17 days ago
|
||
| bugherder | ||
Description
•