Description[New Multicolumn] Improve balancing for border/padding and empty block content.
In a balancing pass, when a break occurs at borders, padding or empty block
content (the trailing part of a block that has no lines or other content),
we need to report the correct amount of space shortage, so that the balancer
doesn't over-stretch the columns for the next balaning pass.
This fixes the actual failure reported by fast/multicol/border-padding-pagination.html ,
but rendering will still differ, because the new balancer is more correct
and causes shorter columns than before. Added new tests that will replace
border-padding-pagination.html for new multicol.
Breaks triggered by lines are already handled just fine in
adjustLinePositionForPagination(). What we need to handle in
adjustBlockChildForPagination() is everything that has to do with the
child block itself.
If a block is unbreakable and crosses a column/page boundary (and
therefore is moved as a whole to the next column/page), report space
shortage.
After applying pagination struts, if a block is breakable and crosses
yet another column/page boundary, report the space occupied in the next
columns/pages as shortage. We need to report something if all breaks
occur inside freely breakable block content, or the balancer will have
no clue.
If none of the above is true, and the child is at the top of a
column/page, report the total height of the child, in case that turns
out to be the smallest piece of content that causes a break. This also
needs to take place after having applied pagination struts.
BUG=361501
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173826
Patch Set 1 #
Total comments: 2
Patch Set 2 : rebase master #Patch Set 3 : Remove cruft from tests and add description() #Patch Set 4 : Only the part of the block that's after the last column boundary it crosses should count as space s… #Patch Set 5 : ... aaand, better expect the test to pass, now that it's actually fixed, hm? :-P #
Total comments: 8
Patch Set 6 : Address code review issues raised together with lgtm #Messages
Total messages: 13 (0 generated)
|