L. David Baron wrote:
So about this business of ignoring the CSS specified width...
nsLayoutUtils::IntrinsicForContainer really doesn't like that. I'm ending
For tables it's handled in nsTableOuterFrame::GetPrefWidth and
GetMinWidth. Maybe we need something more general.
Well, the problem is that GetPrefWidth/GetMinWidth are never called from
nsLayoutUtils::IntrinsicForContainer when a width is specified...
I do think we need something more general. The way I ran into this is testing a
fieldset with a specified width and auto margins:
<fieldset style="width: 5px; margin: auto">
<legend style="width: 50px">This is a test of the fieldset centering code, I
believe</legend>
Some actual text goes here.
</fieldset>
But tables have a similar issue:
<table style="width: 10px; margin: auto" border="1">
<tr><td>
ThisIsALongWordThisIsALongWordThisIsALongWordThisIsALongWord
</td></tr>
</table>
It seems to me that what we need to do for these frames is to allow them to
override the mComputedWidth (either via some hook or by hardcoding checks in the
reflow state) in ComputeBlockBoxData... Come to think of it, this is where your
XXX comment about tables is, right? So perhaps for table and fieldset we should
simply set the computed min-width to the intrinsic min-width (with appropriate
song-and-dance to handle box-sizing)?
-Boris
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout