W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2010

[whatwg] Processing the zoom level - MS extensions to window.screen

From: Charles Pritchard <chuck@jumis.com>
Date: Thu, 16 Dec 2010 09:04:05 -0800
Message-ID: <4D0A4685.40303@jumis.com>
On 12/14/2010 9:51 PM, Simon Fraser wrote:
> On Dec 14, 2010, at 10:22 AM, Charles Pritchard wrote:
>> On 11/24/2010 1:12 AM, Robert O'Callahan wrote:
>>> On Wed, Nov 24, 2010 at 9:09 PM, Charles Pritchard <chuck at jumis.com 
>>> <mailto:chuck at jumis.com>> wrote:
>>>     On 11/21/2010 4:12 PM, Robert O'Callahan wrote:
>>>>     On Sun, Nov 21, 2010 at 9:59 AM, Charles Pritchard
>>>>     <chuck at jumis.com <mailto:chuck at jumis.com>> wrote:
>>>>         Rob: Mobile deployments using dpiPixelRatio (as has been
>>>>         adopted by Moz and Webkit) and target-DpiDensity work well
>>>>         on the mobile, they are not hooked to zoom on the desktop,
>>>>     It is in Firefox.
>>>     I just tested in 4b7, and it's not changing dpiPixelRatio.
>>> Try this:
>>> <style>
>>> div { display:none; }
>>> @media screen and (min--moz-device-pixel-ratio: 1.5) {
>>>   .in { display:block; }
>>> }
>>> @media screen and (max--moz-device-pixel-ratio: 0.66666666) {
>>>   .out { display:block; }
>>> }
>>> </style>
>>> <div class="in">Zoomed in by a factor of at least 1.5</div>
>>> <div class="out">Zoomed out by a factor of at least 1.5</div>
>>> Try zooming in a lot and zooming out a lot. It works for me.
>> I've started working to get this behavior supported in webkit.
> Do you have a bugs.webkit.org <http://bugs.webkit.org> bug about this 
> issue? It may be better to get consensus about how the feature should 
> work before you spend a lot of time implementing it.
> Simon

I brought it up to the webkit-dev mailing list, and was told that it 
should remain on the WHATWG:

As stated in the thread: "Most of us follow the WHATWG closely and 
generally prefer to discuss standardization issues such as this in that 
forum to get a broader feedback base."

Here's a bug report, for this particular issue:

Mozilla has agreed that such behavior is "correct" and asserted that it 
is implemented in FF4.
They do not update "window.devicePixelRatio", only the CSS selector metric:
Mozilla's policy on exposing screen metrics to the scripting environment 
is that it must happen through matchMedium.

At this point, I'm trying to get the CSS selector fixed via Chromium.
The broader concept of exposing CSS pixel ratios is filed as an a11y issue.

If you have any ideas, let me know. I'm rather frustrated on the issue, 
and have
certainly frustrated several list members in the process.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20101216/b71554b1/attachment.htm>
Received on Thursday, 16 December 2010 09:04:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:29 UTC