Re: Columns as ancestors [and a digression]

--- Steve Clark <buster@netscape.com> wrote:
[snipped spec quote]
> > In this manner, the user agent can begin to lay out the table once the
> > entire first row has been received.
> > </blockquote>
> >
> > Really?
> 
> sure.
> 
> In mozilla, fixed table layout does the right thing with the data it has
> available.  If at any time it encounters data that invalidates the
> constraints
> already computed, it simply recomputes (that's a gross approximation,
> there are
> all kinds of performance enhancements in there.)  So, the effect is the
> table
> is laid out on a "best-effort" basis with partial data.  If the author
> has
> specified a reasonable table, one in which all column widths are
> computable
> from info in the first row (at worst), then the author gets the one-pass
> performance they intended.  If they don't specify the data correctly,
> they get
> degraded performance but still get correct layout according to the fixed
> table
> layout algorithm rules as if the total number of columns were known
> initially.

Indeed. I actually ran this example through Mozilla before posting (half
expecting a crash), but I still don't see how it can lay out the first row
after receiving it.

For example:
<table border style="table-layout: fixed; width: 100px">
<tr>
<td>
Cell
<td>
Cell
</table>

If it lays out that row (as the spec claims one can do), you get:
----------|----------|
|Cell     | Cell     |
---------------------|
|                    |
|--------------------|
100 pixels wide

Now if when we get to row 999999, we get:
<tr>
<td>
Cell
<td>
Cell
<td>
Cell
, then our incremental rendering thus far is:
----------|----------|
|Cell     | Cell     |
---------------------|
----------|----------|
|Cell     | Cell     |
---------------------|

If we try and stick this row on, we get:
----------|----------|
|Cell     | Cell     |
---------------------|
----------|----------|
|Cell     | Cell     |
---------------------|
----------|----------|----------|
|Cell     | Cell     |Cell      |
|---------|----------|----------|

Any browser that has chosen, as the spec suggests, to render the rows as
it receives them is in something of a quandary because its layout is
messed up.

Certainly one-pass rendering is possible, but this kind of incremental
rendering does not seem to be so.

=====
----------------------------------------------------------
From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Received on Thursday, 10 February 2000 13:31:12 UTC