Comment 14 for bug 1500282

Revision history for this message
In , Karlt (karlt) wrote :

(In reply to Stefan Seidel from comment #8)
> So is there a reason to apply the rounding *in Firefox* where my patch would
> remove it? From a GTK3 point of view, probably, because the reason you
> mentioned that an application can provide hi-res bitmaps etc. From a Firefox
> point of view, I can say that there is no *technical* reason, i.e. setting
> devPixelsPerPx to a float value by hand (as Kai Mast has reported), produces
> the desired result - Firefox scales the content according to the preference.

There are similar reasons re images from web content.
Firefox will scale, but will only render without interpolation if the web
content supports the resolution.

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1081142#c10

> Comparing this
> to the Windows behaviour: the set scaling it read from the system as is,
> with no rounding applied.

Windows usually scales in steps, 1, 1.25, 1.5, 2 (and maybe higher).

Adding a 1.5 step makes sense, I think, especially because this is supported
on Windows, and so has some chance of support from web authors.

I'm not so keen on adding 1.25 because the benefits of a different size don't
necessarily outweigh the disadvantage of likely interpolation. At 1.25, Windows defaults (in some versions at least) to XP scaling, which scales font sizes but not pixels. Doing this in web content broke too many sites.
The goal is to pick what will be best for most and layout.css.devPixelsPerPx is available for those where this doesn't work out.