[whatwg] High-density canvases

Rik Cabanier cabanier at gmail.com
Tue Sep 10 13:26:23 PDT 2013

On Tue, Sep 10, 2013 at 12:45 PM, Dean Jackson <dino at apple.com> wrote:

> On 11 Sep 2013, at 5:32 am, Ian Hickson <ian at hixie.ch> wrote:
> > On Wed, 11 Sep 2013, Dean Jackson wrote:
> >> On 11 Sep 2013, at 12:14 am, Stephen White <senorblanco at chromium.org>
> >> wrote:
> >>>
> >>> now that some browsers are including browser zoom (page zoom) in
> >>> window.devicePixelRatio
> >>
> >> Ouch. Who is doing this and why?
> >
> > Why ouch?
> Because we’ve always operated under the assumption that devicePixelRatio
> is the mapping from CSS px to device pixels at 1:1 scale/zoom, and that it
> is constant for a particular display. The only change content would see is
> if the window is dragged to/from a high resolution screen.
> There are other ways to query the page zoom.
> I fear this will break existing content. I don’t think we’d ever want to
> change the behaviour.

There's a thread on www-style:
It's been in firefox for a while and blink is going to ship it soon:

> >
> > Actually what I really think we should do is also change the
> > window.devicePixelRatio for pinch zoom. Combined with the suggestions for
> > canvas, that would allow (as Rik pointed out on IRC) for high-quality
> > canvas all the way zoomed in, and for cheap canvases when zoomed out

I believe pinch zoom should not change devicePixelRatio. It would be nice
if there was a standard way to determine pinch zoom though and if the
canvas could automatically resize.

More information about the whatwg mailing list