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

Re: Behavior of device-pixel-ratio under zoom

From: James Robinson <jamesr@google.com>
Date: Tue, 13 Nov 2012 18:02:09 -0800
Message-ID: <CAD73mdJhSZ1pOggmS26WfyOnHi1Z+Aqd5h=a4ySOEy1x_TEzQg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Robert O'Callahan" <robert@ocallahan.org>, Simon Fraser <smfr@me.com>, "L. David Baron" <dbaron@dbaron.org>, www-style <www-style@w3.org>
On Tue, Nov 13, 2012 at 5:21 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Tue, Nov 13, 2012 at 2:40 PM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
> > On Tue, Nov 13, 2012 at 11:47 AM, Tab Atkins Jr. <jackalmage@gmail.com>
> > wrote:
> >> Like others, I feel strongly that *that* kind of zoom should affect
> >> dPR and d-p-r.  (Perhaps we should call it "rescale", to separate it
> >> from the related-only-thematically "zoom" operation that mobile
> >> devices do?)
> >>
> >> I suspect that Simon's statements are about "zoom", not "rescale", and
> >> that he (and Apple in general) are fine with rescaling affecting dPR.
> >>
> >> In any case, it appears that FF and IE both change dPR when you
> >> "rescale", so that's the behavior we should go with.
> >
> > Great. Can you check that Chrome does the right thing? We don't want
> compat
> > problems to arise here, and we've already seen some pages that are making
> > some questionable assumptions.
>
> As far as I can tell, we do the wrong thing.  When I Ctrl-+ my way to
> maximum "zoom" (really "rescale", I think) on my desktop (such that
> <body> reports its width as being 272px wide instead of 1424px),
> window.dPR still returns 1.
>
>
That's a completely different type of 'zoom' from what happens on mobile.
 Ctrl+ in Chrome is 'Page Zoom' using the terminology here:
http://trac.webkit.org/wiki/ScalesAndZooms.  Pinch zooming on a mobile
device in WebKit is 'Page Scale' using that terminology.  Neither change
window.devicePixelRatio - that's an artifact of the display and cannot be
changed by user interaction.

- James


> ~TJ
>
>
Received on Wednesday, 14 November 2012 02:02:36 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT