[whatwg] overflow of seamless iframes

On Tue, 19 Aug 2008, Ian Hickson wrote:
> On Mon, 18 Aug 2008, Robert O'Callahan wrote:
> > On Mon, Aug 18, 2008 at 6:45 PM, Ian Hickson <ian at hixie.ch> wrote:
> > > On Mon, 18 Aug 2008, Robert O'Callahan wrote:
> > > > On Mon, Aug 18, 2008 at 4:40 PM, Ian Hickson <ian at hixie.ch> wrote:
> > > > > On Mon, 18 Aug 2008, Robert O'Callahan wrote:
> > > > > > Ian wrote:
> > > > > > >
> > > > > > > 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.
> > > >
> > > > What's the answer to my question then? Should I have been able to derive
> > > > it somehow?
> > >
> > > I don't understand the question. How does the viewport affect the bounding
> > > box?
> > 
> > Suppose the iframe's document is
> > <body style="position:relative; top:-100px; height:500px;
> > background:yellow;"></body>
> > What's the height of the bounding box? 400px or 500px?
>
> 500px.

To make sure this is clear even in the face of scrolling and fixed 
positioned content and so forth, I've adjusted the spec to say:

# In visual media, in a CSS-supporting user agent: the user agent should 
# set the intrinsic height of the iframe to the height of the bounding box 
# around the content rendered in the iframe at its current width (as given 
# in the previous bullet point), as it would be if the scrolling position 
# was such that the top of the viewport for the content rendered in the 
# iframe was aligned with the origin of that content's canvas.


On Tue, 19 Aug 2008, Robert O'Callahan wrote:
> > > >
> > > > If we allow the contents to flow out of the box, then we also 
> > > > allow blog comments to start overlapping other content on the 
> > > > page.
> > >
> > > Yeah, although setting overflow:hidden on the iframe could be used 
> > > to prevent that.
> >
> > Fair enough. In that case I'd rather we had this in the UA stylesheet:
> >
> >   iframe[seamless][sandbox] { overflow: hidden ! important; }
> 
> I'd suggest having that except without !important.
> 
> But never mind about this issue anyway. I think we can live without it.

Ok. I have not changed the spec to allow content in seamless iframes to 
overflow out of their frames.


On Tue, 19 Aug 2008, Samuel Santos wrote:
>
> It's not clear to me why "iframe { overflow: visible; }" won't do 
> anything.

There is no difference here with respect to the <iframe>'s browsing 
context being a regular browsing context. Browsing contexts don't render 
outside their edges.


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

Received on Tuesday, 17 February 2009 18:02:31 UTC