[whatwg] overflow of seamless iframes

On Mon, 18 Aug 2008, Robert O'Callahan wrote:
> On Fri, Aug 1, 2008 at 9:11 AM, Ian Hickson <ian at hixie.ch> wrote:
> 
> > My original idea (apparently not well conveyed in the spec) is that it 
> > doesn't actually affect the rendering model at all -- it's still an 
> > <iframe>, it just doesn't have a border, and the CSS style sheets 
> > cascade into it and properties inherit into it. So the answer would be 
> > "do the same as with regular iframes", which I guess is to only 
> > support overflow: hidden and overflow: visible (and 'auto' mapping to 
> > one of those dynamically), as derived from the viewport as for any 
> > browser context.
> 
> I'm not sure what you meant by that.

Sorry. I meant 'scroll' and 'hidden'.


> > Note that the default width and height are adjusted for seamless 
> > iframes to match the width that the element would have if it was a 
> > non-replaced block-level element with 'width: auto', and the height of 
> > the bounding box around the content rendered in the iframe at its 
> > current width, respectively.
> 
> "The bounding box" is a bit ambiguous. If the content overflows 
> vertically above the iframe's viewport, does that contribute to the 
> height of the bounding box?

As far as I can tell there is no ambiguity to the concept of the bounding 
box of the content in the canvas, especially given the way the initial 
containing block is forced to zero height.


> For greater seamlessness, I'd prefer to make the intrinsic height be the 
> height of the iframe's root element.

Why would that be more seamless? Surely that would be less seamless if 
there were things like negative margins, since then you'd have unsightly 
scrollbars appearing.


> Plus, as dbaron suggested, we'd like 'overflow' to apply to the content 
> of seamless iframes so that horizontal and vertical overflowing content 
> can be rendered as if the iframe was a regular overflow:visible block. 
> (We might want to recommend that the UA style sheet contain "iframe { 
> overflow:hidden; }" to make it easier for authors to avoid spoofing 
> attacks via seamless sandboxed iframes using clever positioning.)

Well, I guess I'm ok with that, but that will presumably require 
significantly changes to the CSS spec to define how it all works (e.g. 
with compositing and so forth). The current definition is intended to be 
really easy to implement without needing any changes to the CSS model.

It would be useful to get feedback from other vendors too on this.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Sunday, 17 August 2008 21:40:48 UTC