The launcher set layout.css.devPixelsPerPx only when the identity's
devicePixelRatio was not 1, on the assumption that the host renders at 1.
On a HiDPI host (a Retina Mac, Linux with GDK_SCALE=2, Windows at 200%) the
browser then rendered at the host's scale, so a page read devicePixelRatio 1
while (resolution: 2dppx) matched (#964). Measured on 158.0.1-beta.41 headed on a
MacBook Pro's 2x Retina panel and on an Xvfb display with GDK_SCALE=2. Both
launchers now set the pref whenever the identity carries a ratio; a pref the
caller passes still wins.
On the Retina panel, innerWidth, visualViewport and the (width) media query
are unchanged by the pref. The window draws at half its physical size there,
as a 1x display's window would.
display-scale-resolution now also launches a ratio-1 identity on a 2x host,
which fails on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the display_scale option with the one behaviour: the browser renders
at the final config's window.devicePixelRatio (layout.css.devPixelsPerPx), so
(resolution) and the CSS geometry agree with it, whether the identity was
drawn, a preset or supplied. A pref the caller passes still wins. The fpgen
draw's ratio is no longer read, which gave a supplied 2.5 identity no scale
or a scale of 2.
Headful on a real monitor, the display clamp divides by the scale, and a
window that still needs more pixels than the monitor has raises a ValueError
saying so. The monitor is only known in pixels at scale 1 on Linux, so the
scale is applied to the bound there.
New guard: display-scale-resolution (spoofing), which fails on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After MAX_SCALE_FIT_DRAWS fresh draws that did not fit the monitor at
their display scale, or for a supplied identity that did not, the
launchers rendered at 1 without a word, which is the contradiction
display_scale exists to remove. A preset was ignored the same way.
Both now emit a LeakWarning (display_scale_unfit, display_scale_preset
in warnings.yml). It is not silenced by i_know_what_im_doing, which a
supplied fingerprint requires anyway.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fpgen draws a screen at a display scale (1536x864 is a 1920x1080 panel
at 125%) and the browser reports that devicePixelRatio, but renders at
1: (resolution: 1dppx) and the CSS geometry then contradict the screen,
a pair no real machine reports (36% of Windows draws, 74% of macOS
ones; lang315/camoufox#41).
The new launch option display_scale renders at the drawn scale through
layout.css.devPixelsPerPx, snapped to a scaling step the OS offers.
Headful on a real monitor, the identity must fit the panel physically
at that scale: fresh draws are redrawn until one does, a supplied one
that cannot stays at 1, and the display clamp bounds the physical size.
It is off by default, since it changes how every page is rendered and
how large screenshots are. Both launchers take it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>