Boris Zbarsky wrote:
Martijn wrote:
This is more or less an unxbl-ised example:
http://wargers.org/mozilla/margin_100_percent.html
Do you experience any difference here between a normal build and the
reflow branch build?

Ah, indeed. A reflow branch build doesn't seem to have a right margin. OK, that's what we should look into. ;)

Hmm... So the left and right margins are both set to "100%" on a box that has auto width and is doing shrink-wrap sizing. The box is a table.

We end up computing the intrinsic width of the table, and then enforcing the

    'margin-left' + 'border-left-width' + 'padding-left' + 'width' +
    'padding-right' + 'border-right-width' + 'margin-right' =
    width of containing block

equality that holds for blocks. But in this case, that makes the situation overconstrained, so we set the right margin to negative the width (since direction is ltr). This happens in nsHTMLReflowState::CalculateBlockSideMargins, which we call for tables to handle auto margins correctly.

Perhaps we shouldn't do that if we're using the shrink-to-fit width (as opposed to having a width style specified)?

Note that what happens on trunk is that the computed width is unconstrained when we hit CalculateBlockSideMargins, so we just bail out without resetting the margin....

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

Reply via email to