On 9/27/09 10:10 AM, Robert O'Callahan wrote:
On 26/09/09 1:38 PM, Boris Zbarsky wrote:
Right now floats use the nearest block as their containing block. If we
start doing blocks-of-blocks-or-inlines, I think it might be good to
have the block-of-blocks be the float containing block for all the
floats whose nearest block is a block-of-inlines for the
block-of-blocks... Could we conceivably get that working in nsBlockFrame
before we try splitting classes?

What exactly do you mean by "get that working" in the current world?
Currently the float containing block is just the nearest block parent of
the placeholder ... what would you change?

If we go to blocks-of-inlines and blocks-of-blocks there are two questions (which I sadly conflated in my original mail; that's what I get for mailing at night):

1) What is the CSS containing block for the float (e.g. what should be used as the basis for percentage sizes)? Per CSS spec, this is ambiguous given Bert's claims that "box" in section 10.1 actually means "element". If one assumes it really means box, then the containing block seems like it should be the block-of-inlines. Which answer is correct?

I just tested, and Webkit uses the block-of-inlines. Everyone else (Opera 10, IE8, us) uses the block-of-blocks or equivalent. I've posted to www-style about this disagreement.

2) If the block-of-blocks is the containing block (which I think it should be), then what should the parent frame of the floats be? If the containing block is the block-of-inlines then floats should unambiguously be parented to it, I think.

Having the floats be kids of the block-of-blocks would be somewhat simpler from a frame construction perspective, since then inserting a block between two inlines would only need to split its parent block-of-inlines in two and reparent the inlines without having to worry about float reparenting, right? On the other hand if floats are tied to line boxes, maybe that's difficult...

So the "changing" wouldn't be quite in the current world, but in the world where frame construction has been changed (or is about to be changed) to do blocks-of-inlines and we haven't split up the two block classes yet. If floats are parented to the block-of-blocks, then its reflow will need to reflow them correctly; I believe right now blocks rely on float placeholders being found on one of their inline lines, right?

-Boris
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to