Bug
1753126 [wpt PR 32651] - Initial work on fragmenting NG tables., a=testonly
Automatic update from web-platform-tests
Initial work on fragmenting NG tables.
This introduces the general block fragmentation mechanisms to the table*
layout algorithms. There are a couple of things missing, such as
handling early-breaks, and break-before and break-after propagation from
cells to the containing row.
We also don't yet stretch / recalculate the row and section block-sizes
when we insert a break inside that consumes additional space (e.g. when
breaking before monolithic content such as line boxes).
The biggest change is in the table layout algorithm itself. We need to
include caption layout during regular child layout now, so that we break
and resume correctly before / inside captions. Had to restructure the
caption layout code, so that we can re-use it during actual table child
layout.
The table layout algorithm needed a special child iterator (table child
layout order are ordered as top captions, table header, table bodies,
table footer, bottom captions - regardless of DOM order). The section
and row algorithms can use the regular block child iterator.
However, since the table, table section and table row layout algorithms
need a section / row / cell index, that's updated when we iterate over
the children, and we now may skip finished children, the index
calculation is now a bit more complicated. Let the child iterator class
take care of this, instead of increasing it by one per iteration.
We may want to reconsider how we do table-cell vertical alignment. Right
now it performs fragment-based alignment (because that pretty much just
worked without any effort), but we may want to do "global" alignment
instead, so that contents of short cells in a fragmented row start in a
subsequent row fragment, rather than always in the first one.
Bug:
1078927
Change-Id: Iffe96022110b1bd6008676c3e46b78d33a94522c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
3427690
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#966638}
--
wpt-commits:
20bc2b4b05987e980ec18f0130884f04aef71466
wpt-pr: 32651