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>

Suppose we only have enough room on the page for one line. The float
gets continued to the next page, but the red DIV doesn't because it
fits. So we have a problem because the float continuation can't be
parented by the next in flow of its parent. Currently we push the float
continuation up to the space manager, so it ends up parented by the
floatcontainer's next in flow. Since we're doing this *anyway* (and I
don't see any reasonable alternative), we might as well be consistent
and make floats be always parented by their space manager block.

This would require that when we reflow a line with leading floats, such
as the first line of the red DIV, we reflow the float which is actually
parented by floatcontainer. But I don't see any major problems with
this as long as we give it the correct reflow state chain.

Obviously this is 1.9 work. This would probably produce other benefits
--- simplified geometry translations, much more efficient float
recovery during incremental reflow.

I think for 1.8 I'm going to make floats not break across columns
because without this change it's just too hard to get everything
working reliably.

_______________________________________________
mozilla-layout mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-layout

Reply via email to