Currently we have a problem that the decision about whether a line fits on a page/column does not take bottom margins into account. We may decide to place a line on the current page even though the (possibly collapsed) bottom margin will protrude beyond the available height.
The obvious thing to do is to compute what the collapsed bottom margin will be and say that the line only fits if its YMost including the collapsed bottom margin is within the height constraint. Computing what the collapsed bottom margin will be is relatively easy *except* when the line in question has some empty line sibling(s) following it with their own margins. Currently, empty lines always fit so we should include their collapsed margins. But this is not really possible since those lines may have floats and clearance (which affects the margin collapsing) and we haven't reflowed them yet. I propose that we resolve this by allowing empty lines to not fit and be pushed to the next block. nsBlockReflowContext::PlaceBlock will compute the collapsed bottom margin for the current line and its ancestor blocks ignoring any following lines, on the grounds that they will be pushed if they turn out to not fit, even if they're empty. Any objections? Rob _______________________________________________ mozilla-layout mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-layout
