DescriptionInitialColumnHeightFinder needs to take all expected rows into account.
When a balanced multicol is nested inside another balanced multicol, it will
not be able to create any fragmentainer groups in the first layout pass, since
the height of the outer columns is still unknown.
We need to detect this situation, so that we don't limit the number of content
runs (content portions without explicit breaks) to the used value of
column-count. We are going to need ALL content runs, and group them into
imaginary rows, to figure out a minimal height of the entire inner multicol
container in the first balancing pass.
This will help set a better initial outer column height, and, more importantly,
set some sensible height on the inner multicol container right away, so that
we're not going to believe that it's super-short, which might prevent us from
marking it for re-layout when the outer coulmns have been sized.
childNeedsRelayoutForPagination() would simply fail to see that it's actually
going to cross outer column boundaries, and just bail.
We also treat tallestUnbreakableLogicalHeight() somewhat differently in such
situations. We require that the last "row" alone (rather than the entire
multicol container) be at least as tall as this.
Broke a newFragmentainerGroupsAllowed() out of
appendNewFragmentainerGroupIfNeeded(), since the column balancer code now also
needs to know when we're nested but are not allowed to create fragmentainer
groups.
Some, but not all, new tests used to fail before the code changes in this CL.
The passing ones are there to point out regressions that I nearly introduced
while working on this CL.
This is a patch in preparation for removing the relayoutChildren = true thing
in LayoutBlockFlow::layoutBlockFlow() when page logical height changes.
Committed: https://crrev.com/d19d51259c048132deb253a9d7441b40eceb55e9
Cr-Commit-Position: refs/heads/master@{#431844}
Patch Set 1 #
Total comments: 5
Patch Set 2 : Code review #Messages
Total messages: 14 (8 generated)
|