Fwd: CSSOM & browser scaling / zoom

Forwarding this piece of feedback on behalf of Jake. I think this is  
already clear in the CSSOM View draft, but it does not hurt to check again.

------- Forwarded message -------
From: "Jake Archibald" <jaffathecake@gmail.com>
To: annevk@opera.com
Cc:
Subject: CSSOM & browser scaling / zoom
Date: Tue, 29 Sep 2009 13:41:26 +0200

Hi,

I tried to post this to www-style, but it didn't make it for one
reason or another:

The specification doesn't mention scaling / zooming performed by
various modern browsers, I think it should as it's an area throwing up
a lot of inconsistencies.

A "zoom" feature is present in modern versions of all the major
browsers, but it's also common for mobile devices eg iphone & Opera
Mini.

The desktop browsers seem to agree that element sizes are returned as
their pixel size before scaling (although getBoundingClientRect
doesn't in some cases), but I think this should be written into the
standard.

One inconsistency is in measuring the window size. Eg, Webkit gives
(screenPixels / zoom), meaning the reported window size shrinks as the
zoom is increased. Firefox on the other hand gives actualWindowSize
(although I'm told it behaves like Webkit on a mac).

I'm not sure what the standard should be, but there should be one.
Perhaps Firefox is right as the document is zoomed rather than the
window, so values attached to window should be agnostic of zoom.

Values attached to document should report pixels as (screenPixels / zoom).

Obviously this wouldn't apply to zooming that only affects font-size
values.

Cheers,
Jake.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 29 September 2009 12:30:46 UTC