W3C home > Mailing lists > Public > www-style@w3.org > November 2012

RE: Behavior of device-pixel-ratio under zoom

From: Belov, Charles <Charles.Belov@sfmta.com>
Date: Thu, 15 Nov 2012 00:03:26 +0000
To: 'Sylvain Galineau' <sylvaing@microsoft.com>, Boris Zbarsky <bzbarsky@MIT.EDU>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <C1BED60DEFFFB2479E3EE227BF749D2D5316BA0D@SV6EX10MBX1.muni.sfgov.org>

> -----Original Message-----
> From: Sylvain Galineau [mailto:sylvaing@microsoft.com]
> Sent: Wednesday, November 14, 2012 3:47 PM
> To: Boris Zbarsky; www-style@w3.org
> Subject: RE: Behavior of device-pixel-ratio under zoom
> [Boris Zbarsky:]
> >
> > On 11/13/12 6:02 PM, James Robinson wrote:
> > > Neither change
> > > window.devicePixelRatio - that's an artifact of the display and
> > > cannot be changed by user interaction.
> >
> > How is it an artifact of the display?  It's a ratio of CSS pixels to
> > device pixels; the display knows nothing about CSS pixels, and in fact
> > "page zoom" in your terminology changes this ratio!
> >
> Right. In 'legacy' rescaling zooms the page content reflows because the
> viewport is smaller; the viewport is smaller because the Zoom/Ctrl+
> operation remapped the number of device pixels per CSS pixel.
> What we at MSFT call optical zooms - as on smartphones - are treated a
> display 'artifact'. And in fairness it gets a bit confusing here because
> in this case the UA adds a level of indirection whereby the ratio of
> layout viewport [1] pixels to CSS pixels remains the same; but the number
> of raw device pixels per layout viewport pixels changes as you pinch
> in/out.
> (snip)
> While it'd be nice to make everyone agree on a single approach across all
> UAs I agree with Roc it'd be nicer for now to agree on how we make the
> property consistently reflect both approaches at runtime. (At least I
> think that is the intent; correct me if wrong)

What would be nice is if the end user has the choice as to whether zoom occurs with or without reflow.  Specifically, zoom with reflow obviates the need to scroll horizontally multiple times in order to read a single paragraph.  On the other hand, zoom without reflow is good for navigation pages.

Hope this helps, 
Charles Belov 
SFMTA Webmaster 

Received on Thursday, 15 November 2012 00:05:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:23 UTC