[webkit-dev] innerWidth Behavior and webkit transform

Charles Pritchard chuck at jumis.com
Fri Aug 19 04:31:18 PDT 2011


Related to my work on innerWidth, outerWidth and devicePixelRatio:
https://lists.webkit.org/pipermail/webkit-dev/2011-April/016412.html
https://bugs.webkit.org/show_bug.cgi?id=51190

It seems that running -webkit-transform on an iframe now sets
the innerWidth of that iframe to the post-transformation value.

e.g.: <iframe style="width: 100px; -webkit-transform: scale(.5,.5)">
will result in  innerWidth = outerWidth / 2 (approximately).
(innerWidth == 25)  document.body.width is still 100px.

I believe this is new behavior (I'm not sure). I'm not sure that this is 
correct behavior.
 From what I recall, webkit-transform should not be exposing itself to
the iframe's environment.

To get the actual width for painting, within the iframe, I now have to 
run something like:
document.body.width.

-Charles





More information about the webkit-dev mailing list