Re: [csswg-drafts] [css-tables] Background rendering model

Definitions: 
CCTT = col/colgroup/tr/tbody
Large cell = cell with colspan/rowspan > 1

Chrome renders CCTT backgrounds badly. It fails in many cases, and will evolve a lot. FF is the golden standard of table rendering. I've attached my homemade torture test case.[span.txt](https://github.com/w3c/csswg-drafts/files/1184293/span.txt)

Chrome code renders CCTT backgrounds and borders on cells. Interesting things I've learned while wresting with the code:

a) frame rect of a CCTT background image is not CCTT frame rect. It is a rectangle defined by first and last cell inside CCTT. But not exactly: if a cell is a large cell, we pretend it is a regular cell for frame rect computation.

b) a large cell might cause normally non-repeating background (background-size: 100%;) to repeat.

c) in actual implemenation, borders of border-collapse:collapse tables should be painted at the table level. Single border can span multiple cells. If you are painting on cell level you have to paint the same border on multiple cells, and clip, which is inefficient. Painting borders on cells can work in a spec because you do not care about efficiency.

d) deciding which border wins in border intersections of collapsed cells in different writing modes is tricky. My torture test case is attached.
[intersections.txt](https://github.com/w3c/csswg-drafts/files/1184310/intersections.txt)

The "render background of row under hidden cell" question is interesting.FF renders it, Chrome does not. From the implementation point of view, two are equivalent, it is all one big special case. But, from a webdev point of view, hiding a cell in the middle of my table with a red background should not leave a white rectangle in the middle. Here I lean towards: hidden cells should expose CCTT backgrounds.

If we answer yes to the question above, then backgrounds should be painted not by cells, but by TTCC,

Points a) and b) above make painting of TTCC backgrounds unlike any other backgrounds painted in CSS.

-- 
GitHub Notification of comment by atotic
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1657#issuecomment-318771299 using your GitHub account

Received on Friday, 28 July 2017 21:57:40 UTC