DescriptionMove table row pagination strut insertion to the first layout pass.
Pagination struts are inserted before a table row, when we should avoid
breaking inside it, and it doesn't fit as a whole in its current fragmentainer.
We should avoid breaking inside rows when their break-inside is "avoid", or
when there are repeating table headers (which turns on break-inside:avoid for
all rows in the table).
This CL also includes the code that deals with repeating headers, since it
proved hard to separate it from the rest.
We need to make sure to subtract the struts from previous rows' height now;
just like we don't include border spacing in the rows, we should also omit the
pagination strut of the next row. In order to be consistent about this,
layoutRows() in LayoutTableSection now uses the rows' logical heighs more
extensively than before (rather than using the m_rowPos array to calculate
heights). This has an implication for rowspanned cells. We now need to wait
until we are at their last row before processing them, since we calculate row
heights on the fly. There's a small fix here. Previously, the strut wasn't
baked into the logical top of a table row, unlike all other layout objects.
This resulted in wrong offsets for table rows after fragmentainer breaks,
but the cells in there still had correct offsets, so it wasn't possible
to observe this bug in any visual test. It does affect a couple of
dump-render-tree printing tests, though. Added a couple of tests for this
on my own, which use offsetTop and offsetHeight.
table-disable-fragmentation.html is just a regression test. We need to be
careful to ignore struts when not fragmented. It passed before and it passes
now, but I nearly broke it while working on this.
BUG=534751
Committed: https://crrev.com/7360974b322ce25f50726e1722f5bcca977577da
Cr-Commit-Position: refs/heads/master@{#426265}
Patch Set 1 #Patch Set 2 : Need to size all rows before applying vertical alignment and flexing, to handle overlapping cells c… #Patch Set 3 : Rebaseline semi-manually thank you very much. #Messages
Total messages: 23 (18 generated)
|