DescriptionImprove how the column balancer handles top margins on floats.
Float margins do not collapse with column boundaries, so we should make room
for them after the break, if the border box of the float starts in the next
column.
Let the balancer work on the margin box of the float (and the border box for
all other objects). For floats, we want to insert breaks before the
margin-before edge, not the border-before edge. This lets us remove
some special-code for unbreakable floats in InitialColumnHeightFinder, which
was the only place that previously bothered about this.
Changed how we determine which objects to process. We used to include the
overflow both before and after the border box, but we really don't have to
bother with content preceding it, since that shouldn't undergo fragmentation
anyway.
Discovered (one test regressed) that logicalHeightIncludingOverflow() also
included clipped overflow, which certainly wasn't the intention. This didn't
make much of a difference as long as the method was only called to check if we
could skip re-layout. But now we also use it to determine the column height.
Fixed it to only include visible overflow and renamed it to
logicalHeightWithVisibleOverflow().
Committed: https://crrev.com/7c82da727f64121aa34aa1decf82452c37ef7a2d
Cr-Commit-Position: refs/heads/master@{#429245}
Patch Set 1 #Patch Set 2 : Back out some unnecessary changes that caused assertion failures in a test. #
Total comments: 2
Patch Set 3 : Rename to borderEdgeOffset and moar documentation. #
Messages
Total messages: 28 (14 generated)
|