On Tuesday 2005-03-08 11:53 -0800, roc wrote:
> After flip-flopping on this a few times, I think we definitely need to
> make float frames be parented by the float containing block. The
> clincher argument for me is situations like this:
> 
> <div id="floatcontainer" style="overflow:auto">
>   <div style="background:red">
>     <div style="float:left">
>        <p>Hello Kitty
>        <p>Hello Kitty
>        <p>Hello Kitty
>        <p>Hello Kitty
>     </div>
>     <p>Hello Kitty
>   </div>
> </div>

This makes some sense (given that you meant formatting context rather
than containing block).  I made some "XXX" comments somewhere in
nsBlock*.cpp saying that I had no idea how even the simple cases for
that type of thing currently work (and I was surprised that they do).
If my memory is correct, I later found some very messy code that handles
those cases (but probably not very well, I expect).

As to getting widths from the containing block (bz's comment) -- we can
currently map from float to placeholder; from there it's not hard to get
to the block.  If needed, we could make it even easier.


However, it seems like it won't actually be much use to make this change
if, when we start splitting absolutely positioned elements for printing,
we have to do the same thing (that we're now doing for floats).  An
absolutely positioned element could be a child of a small relatively
positioned block.  The block could stay on one page, and the abs pos
element could need to be split onto the next.  This has the same problem
of how to parent the continuation.

So maybe this needs a little more thinking.  At the very least, we
should try to figure out what we *should* be doing for printing
absolutely positioned elements before forging ahead on this.

(And while I'm on the topic, do we print fixed pos elements on every
page as we should?  They should never be split.)

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
          Technical Lead, Layout & CSS, The Mozilla Foundation

Attachment: pgp91HBk6n5MR.pgp
Description: PGP signature

Reply via email to