Re: [CSSOM View] Units for window.screen

(2012/09/26 14:37), Henri Sivonen wrote:>
> According to http://mpulp.mobi/labs/ppk/widthtest_vpdevice.html and
> http://www.quirksmode.org/m/tests/widthtest_vpdevice.html (be sure to
> test both; see http://www.quirksmode.org/blog/archives/2012/09
> /apples_mobi_ins.html) as tested on Galaxy Nexus/JB, Firefox (tested
>  Nightly), Chrome, Opera Mobile and Android stock all make
> window.screen.width and .height return in device pixels. The spec
> says the unit should be CSS px.

On the other hand, on my MacBook Pro with Retina Screen, none of
Firefox, Presto-Opera, Safari, Chrome returns 2560 / 1600. They all
return 1280 / 800.

(By the way, what's the difference between these two tests?)

> I don’t have iDevices here, but this is worth testing in Safari on
> retina iPad&iPhone. If Safari agrees with the browsers available for
> Android, perhaps the spec should accept this oddity instead of trying
> to change it. (I don’t know what the screen stuff is good for
> anyway—it’s the viewport that should matter to Web developers.)

And it seems worse to have more Desktop UA/Small screen UA difference.
Given that screen.width/height might have been used widely for tracking
devices, it seems easier to change Desktop browsers.



By the way, our folks complained that it's not easy to find the CSS unit
requirment (3.1) from where Screen is defined (5.2). Perhaps it would be
a good idea to have some more links here and there?



Cheers,
Kenny
-- 
Web Specialist, Opera Sphinx Game Force, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/

Received on Friday, 5 July 2013 02:21:08 UTC