Tests for redistribution of table height to row group height.

This algorithm has not been standardized. Browsers implementations disagree a lot. Legacy Chrome used to always distribute all the height to the first tbody.

Major incompatibility: Legacy:
- ignores any height set on sections.
- does not size the table unless section has a TR
- does not grow sections without TDs
- only distributes height to the 1st tbody
FF
- does not prioritize thead for height distribution most of the time.
- y offset of multiple tbodies can be incorrect.

Empty table

Empty tables always grow to specified height in all browsers.

no sections

no sections, no border spacing

collapsed table no sections

fixed table no sections

One TBODY

The big difference here is between empty TBODY, and a body with an empty TR

  • FF: always sizes the table, only sizes TBODY if it has TR.
  • Legacy: does not size the table unless TBODY has TR
  • FF: sizes the table, but tbody size remains 0 unless tbody is not empty.

    Legacy table size remains 0, or border-spacing

    single empty tbody

    single tbody+tr

    border spacing

    FF/Legacy do not apply border-spacing

    collapsed table

    fixed table

    tbody has fixed height

    FF adds tbody height to table?

    tbody has fixed height > table

    Legacy: table size wins. FF: table size wins, but body grows to 300px?

    tr has fixed height > table

    FF: table size wins, but body is 300.

    tbody has percentage height > table

    tr has percentage height > table

    FF/Legacy: table wins. FF: body is 200px

    non-empty tbody

    non-empty thead

    THEAD TBODY

    empty thead, empty tbody

    FF thead/tbody both grow

    sized thead, empty tbody

    thead

    table layout fixed, thead with td, tbody

    thead
    x

    table layout fixed, thead+td, tbody+td

    thead
    x

    thead with td

    thead

    tfoot with td

    tfoot

    Multiple TBODY

    Legacy does not distribute any heights when tr is empty.

    Legacy always distributes everything to 1st tbody.

    2 tbody

    2 tbody, with non-empty tds

    Legacy distributes everything to 1st tbody

    x
    x

    2 tbody, 40%, auto, no td

    FF: distributes everything to auto when empty. Legacy does not distribute

    2 tbody, 40%, auto, non-empty td

    x
    x

    2 tbody, 40px, auto, non-empty td

    FF gets confused with 2nd body placement

    x
    x

    2 tbody, 40%, 40px, non-empty td

    FF splits evenly

    x
    x

    Sized THEAD/TBODY

    FF does not prioritize TBODY for distribution

    20px thead, 30px tbody

    x
    x

    20px thead's tr, 30px tbody's tr

    x
    x

    20px thead's td, 30px tbody's td

    x
    x