Bug 1753126 [wpt PR 32651] - Initial work on fragmenting NG tables., a=testonly
commit661b30a018b89133a796f5a3a02fa1a2b72890d6
authorMorten Stenshorne <mstensho@chromium.org>
Sat, 26 Feb 2022 22:09:31 +0000 (26 22:09 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 7 Mar 2022 14:48:11 +0000 (7 14:48 +0000)
tree28801d7bfed1a8f2ff74d656ebcd9c9f39270ec2
parentd3ff28cb0b6bff14c1e1adceff1faa294b42651a
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
testing/web-platform/tests/css/css-break/table/break-before-second-row.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/table/break-inside-cell-000.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/table/break-inside-cell-001.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/table/section-with-overflow-000.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/table/section-with-overflow-001.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/table/section-with-overflow-002.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/table/sections-and-captions-mixed-order-ref.html [new file with mode: 0644]
testing/web-platform/tests/css/css-break/table/sections-and-captions-mixed-order.html [new file with mode: 0644]