[webkit-dev] Canvas backing resolution
chuck at jumis.com
Tue Apr 5 21:52:00 PDT 2011
Did this move anywhere?
Firefox is a nasty CSS hack, but it does work, and that's something to
be happy about.
Microsoft makes it easy; Firefox developers have said they do not want
it to be "easy".
From Robert O, reflecting Mozilla's policy: "I don't want Web authors
to have easy access to information about screen pixels.
They'll try to defeat our zooming or size things to screen pixels, which
we don't want."
WebKit and MS already diverge from Firefox in handling of
window.innerWidth/innerHeight and window.screen properties.
That's not news.
I'd really like to see a resolution to this issue. The hacks I'm using
just aren't stable in the long term.
I'd prefer the property were just exposed to the DOM via window.screen,
as MS has done it,
but I'm ok doing CSS media queries.
It's just that media queries require something of a brute-force of case
I have about ~12 media queries to handle Firefox, all just repeating min
trying to narrow down the resolution.
Long-story-short, can we please expose some of the CSS pixel scaling,
either through window.devicePixelRatio,
through CSS media queries on device-pixel-ratio, or through the
window.screen object, in a way similar to
how MS has done it
Anything will work.. I just need one.
On 3/4/2011 12:02 PM, Kenneth Rohde Christiansen wrote:
> Hi Simon,
> I guess you could use the media query listener defined in
> We support that on trunk now. This of course means that we will need
> to reevaluate the CSS when a pinch zoom ends, which we might be doing
> already given media queries such as @media all and (min-width: 200px).
> On Fri, Mar 4, 2011 at 8:47 PM, Simon Fraser<simon.fraser at apple.com> wrote:
>> On Mar 4, 2011, at 11:24 AM, Kenneth Rohde Christiansen wrote:
>>> Hey Oliver!
>>> If you are saying that device-pixel-ratio should include the user
>>> scaling, then I can push that for Qt, but I would really like seeing
>>> it supported by iOS as well for compatibility reasons. If you create a
>>> bug for that, please cc me.
>> There's a problem with that, which is that the author can assume (possibly erroneously) that device-pixel-ratio doesn't change for the life of the page. However, the zoom level can change often, and there's no notification that the author can register for that will tell them when the zoom level changes, and thus when they'll need to redraw their canvas contents.
More information about the webkit-dev