Re: [css 2.2] [tables] Baseline on empty table cells

Le 2015-07-31 14:19, Robert Hogan a écrit :
> Hi there,

Hello Robert,

Sorry for the long delay. I am returning from some vacation time.

> 
> We've hit a bug in Blink while trying to confirm to
> http://test.csswg.org/harness/test/css21_dev/single/inline-table-valign-002/.


http://test.csswg.org/suites/css2.1/nightly-unstable/html4/inline-table-valign-002.htm


> It
> comes down to what height we should give the second cell box in:
> 
> <!DOCTYPE html> <style> .cell{ height:453px; vertical-align: baseline; 
> }
> </style> <table> <td class="cell"> crbug.com/513319: An empty cell even 
> if
> it has height should set the baseline for the row. This text should be 
> at
> the top of the page. </td> <td class="cell"> </td> </table>

"
The maximum distance between the top of the cell box and the baseline 
over all cells that have 'vertical-align: baseline' is used to set the 
baseline of the row.
"
CSS 2.1, section 17.5.3 Table height algorithms
http://www.w3.org/TR/CSS21/tables.html#height-layout


Robert, I have copied and then modified your test into 2 test cases:

- - - - -

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/baseline-empty-table-cells-RobertHogan-1.html

The "A" cell (first cell in document order) determines the baseline of 
the row as it creates (or is) the maximum distance between the top of 
the cell box and the baseline of its content.

- - - - -

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/baseline-empty-table-cells-RobertHogan-2.html

The "Z" cell (last cell in document order) determines the baseline of 
the row as it creates (or is) the maximum distance between the top of 
the cell box and the baseline of its content.

IE11 and Opera 12.16 pass both tests; the height of each cells is 200px.

Firefox 39 and Chrome 44.0.2403.130 fail these tests; the height of each 
cells is 320px !

- - - - -

Right now, this test

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/table-height-algorithm-025.htm

and

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/table-height-algorithm-026.htm

definitely need to be reviewed as well as some other tests on 
baseline-alignment of cells in a table in

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/chapter-17.htm#s17.5.3



> Everyone gives it a height of 453px but only FF and Blink currently put 
> the
> baseline on the bottom of the cell. (If you put an empty <div> in the
> second cell then FF puts the baseline at the top (i.e. below top border 
> and
> padding). I'm guessing it does this because the empty div has an empty
> linebox.)
> 
> Turning to the spec: "The baseline of a cell is the baseline of the 
> first
> in-flow line box in the cell, or the first in-flow table-row in the 
> cell,
> whichever comes first. If there is no such line box or table-row, the
> baseline is the bottom of content edge of the cell box." So with a 
> height
> of 453px, it looks like the baseline should be down at the bottom of 
> the
> cell like Blink and FF do.
> 
> But it's very hard to get away from : "The table cell's 'height' 
> property
> can influence the height of the row (see above), but it does not 
> increase
> the height of the cell box." (This is a recentish addition,
> https://lists.w3.org/Archives/Public/www-style/2010Jun/0048.html)
> 
> Accepting that the bottom content edge of the cell is not determined by 
> the
> computed height of the cell means that
> http://test.csswg.org/harness/test/css21_dev/single/inline-table-valign-002/
> is wrong. It looks like that test and FF (and us until we revert) are
> wrong.
> 
> Is there something I'm missing?
> 
> Thanks,
> Robert

I need to study more section 17.5.3 which I absolutely and obviously did 
*not* consider looking at when developing

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/inline-table-valign-002.htm

My inline-table-valign-002 test has not been reviewed and many other 
table-related tests in CSS2.1 test suite have not been reviewed.

But, right now, regardless of the fate of inline-table-valign-002 test, 
I am ready and open to submit

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/baseline-empty-table-cells-RobertHogan-1.html

http://www.gtalbot.org/BrowserBugsSection/css21testsuite/baseline-empty-table-cells-RobertHogan-2.html

into CSS2.1 test suite ... albeit under better and more appropriate 
filenames.

Gérard

Received on Wednesday, 5 August 2015 02:29:49 UTC