Re: [css3-values][css3-mediaqueries] resolution in dpi / dppx

To my own understanding of what a CSS pixel is, both could be right in the 
sense that it's unspecified how the CSS pixels are mapped to physical 
pixels, but I remember that the deformation of a CSS inch had to be limited 
by the rounding of the real dppx to an integer (becaue it's much more 
efficient to have CSS pixels to map to whole physical pixels, the spec 
allows up-to-physical mapping of the css pixels).

Given that your DPI resolution is 312, I believe Opera is wrong because 
rounding 312/96=3.25 to 2 is invalid. Then returned value in dppx could have 
been anywhere between 3 and 4 (included) but should not lie outside those 
limits. While rounding to 320dpi seems strange to me, it seems to me it's 
valid anyway.

However, I think you should try to get a confirmation by an author of 
CSS3-Values to be sure. Just to be sure, what's the reported viewport size 
(in css pixels) in those two browsers?






-----Message d'origine----- 
From: Johannes Koch
Sent: Monday, January 28, 2013 1:29 PM
To: www-style@w3.org
Subject: [css3-values][css3-mediaqueries] resolution in dpi / dppx

Hi,

when testing mobile Opera and Firefox browsers, I encountered the
following inconsistency:

On a device with 2 CSS pixels per device pixel, Opera Mobi 12.10
reports a media quiery min-resolution of 2ppx or 192dpi. Firefox Mobile
18.0 on the same device  reports a media quiery min-resolution of about
3.3ppx or 320dpi. The device is said to have a display with 312ppi. So I
guess, Firefox rounds 312ppi to 320dpi and calculates

320/96 ~= 3.3 (dppx)

, whereas Opera accepts the 2 CSS pixels per device pixel for 2dppx and
calculates

2*96 = 192 (dpi)

. Is the Opera version correct and Firefox wrong, because a CSS inch is
not the same as a physical inch?

-- 
In te domine speravi; non confundar in aeternum
(Te deum, 4th century)

Received on Monday, 28 January 2013 16:56:29 UTC