Re: [css-device-adaptation] New draft

  On 10/18/2010 10:52 AM, timeless wrote:
> On Mon, Oct 18, 2010 at 6:50 PM, Charles Pritchard<chuck@jumis.com>  wrote:
>> The fix, for some time, has been to allow authors to disable zoom in the UA:
>> this is a standard on mobile devices.
> Hrm, no one told us. We've shipped the n800, n810 and n900 w/o support
> for this. We have an open bug database and I don't recall anyone
> complaining about it either. -- And they do complain about all sorts
> of things we've screwed up.
I've confused this issue: there is a wide difference between the Mobile 
Safari "zoom"
and the pixel scaling+resize event of most desktop and other mobile 
browsers.

Mobile Safari does not fire a resize for: window.innerWidth

There are two "zoom" styles in practice:
magnficiation + panning and pixel scaling + resize


Here's a meta-complaint about deploying web apps on mobile:

Currently, no mobile browser gives a seamless experience with web apps; 
they fight for screen real estate,
Windowed web apps require proprietary packaging at the moment.

>> In this case, I think it's important to recognize that there are use-cases
>> where zoom becomes a usability issue, and "magnify" is more appropriate.
I've some input for user-zoom:

user-zoom: zoom
"When user-zoom is zoom, UAs should scale window dimensions and units 
accordingly."
user-zoom: fixed
"When user-zoom is fixed, UAs should magnify and/or pan the viewport 
upon receiving a zoom event."

The first case reflows the page, the second does not.


>> On the topic of zoom in web-apps:
>> I recently did some quirk-work, using window.outerWidth and
>> window.innerWidth  to guesstimate the current zoom factor.
>> It seems to me that the UA should alter window.devicePixelRatio upon zoom
>> actions -- the one I was working in does not.
> Lists of UAs and how they behave would actually be useful if published :)
Disclaimer: Research hasn't been verified.
FF 3.6 Win, Chrome 8 Win, IE 9 Win. Mobile Safari iOS 4.

IE9, WebKit, Mozilla: user-zoom: zoom
Mobile Safari: user-zoom: fixed

When zoom is initiated by a pointing device in IE and Mobile Safari,
the coordinates are taken into account during the zoom.

WebKit sends a resize event on each zoom step. IE seems to reflow, but 
does not send a resize event.

WebKit (via Chrome) looks to keep window.outerWidth and screen in device 
pixels, window.innerWidth.
Mozilla alters all of window.screen. I've not found a workaround.
IE9 added window.screen.deviceXDPI
Mobile Safari requires window.devicePixelRatio the value is static.

Richard Fink proposed adding window.screenRight some years ago.
Mozilla does not implement window.screenLeft.

Quirks mode has more study on resize events.
http://www.quirksmode.org/dom/events/resize.html

> I was playing with an iPad while on vacation and I seem to recall the
> store clerk demoing some platform zooming features, I'd hope they
> applied to the iPhone too.
There are some proposals out by Apple meant to expose more platform 
interfaces:
http://lists.w3.org/Archives/Public/www-dom/2010JulSep/att-0106/UserInterfaceIndependence.html
>> I think, as discussion goes on around viewport, magnify should be further
>> reviewed.
With hypertext, all of this is up to the UA.

Apple's proposals, bring some information for zoom and magnification 
into the scripting environment.
window.devicePixelRatio and device-pixel-ratio selectors are quite 
handy,  target-densityDpi is a useful addition,
but not supported by Apple (afaik).

I don't believe that any implementations are setting devicePixelRatio 
upon zoom events. It seems that they should.
This would allow CSS selectors to come into use at different "zoom" levels.

IE9s extensions to screen are very welcome, they expose the greatest 
amount of information,
sharing logical and device pixels. I don't know if they have proposed 
CSS extensions to match that information.

Received on Monday, 18 October 2010 19:50:31 UTC