Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Issue 261383004: [New Multicolumn] Improve balancing for border/padding and empty block content. (Closed)

Created:
6 years, 7 months ago by mstensho (USE GERRIT)
Modified:
6 years, 7 months ago
CC:
blink-reviews, mstensho+blink_opera.com, blink-reviews-rendering, zoltan1, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, pdr., rune+blink
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+169 lines, -20 lines) Patch
A LayoutTests/fast/multicol/balance-short-trailing-empty-block.html View 1 2 3 4 5 1 chunk +17 lines, -0 lines 0 comments Download
A + LayoutTests/fast/multicol/balance-short-trailing-empty-block-expected.txt View 1 2 3 4 5 1 chunk +6 lines, -3 lines 0 comments Download
A LayoutTests/fast/multicol/balance-trailing-border.html View 1 2 3 4 5 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/fast/multicol/balance-trailing-border-expected.txt View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/fast/multicol/balance-trailing-border2.html View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A LayoutTests/fast/multicol/balance-trailing-border2-expected.txt View 1 2 3 4 1 chunk +20 lines, -0 lines 0 comments Download
A LayoutTests/fast/multicol/balance-unbreakable.html View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/fast/multicol/balance-unbreakable-expected.txt View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
M LayoutTests/fast/multicol/border-padding-pagination.html View 1 chunk +9 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderBlockFlow.cpp View 1 2 3 2 chunks +26 lines, -17 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
mstensho (USE GERRIT)
6 years, 7 months ago (2014-05-06 09:19:33 UTC) #1
Julien - ping for review
https://codereview.chromium.org/261383004/diff/1/Source/core/rendering/RenderBlockFlow.cpp File Source/core/rendering/RenderBlockFlow.cpp (right): https://codereview.chromium.org/261383004/diff/1/Source/core/rendering/RenderBlockFlow.cpp#newcode704 Source/core/rendering/RenderBlockFlow.cpp:704: setPageBreak(result, childLogicalHeight - unsplittableAdjustmentDelta); Wouldn't that report a page ...
6 years, 7 months ago (2014-05-08 15:10:48 UTC) #2
mstensho (USE GERRIT)
https://codereview.chromium.org/261383004/diff/1/Source/core/rendering/RenderBlockFlow.cpp File Source/core/rendering/RenderBlockFlow.cpp (right): https://codereview.chromium.org/261383004/diff/1/Source/core/rendering/RenderBlockFlow.cpp#newcode704 Source/core/rendering/RenderBlockFlow.cpp:704: setPageBreak(result, childLogicalHeight - unsplittableAdjustmentDelta); On 2014/05/08 15:10:48, Julien Chaffraix ...
6 years, 7 months ago (2014-05-08 15:32:54 UTC) #3
mstensho (USE GERRIT)
Sorry about the turbulence. While working on a demo for BlinkOn2, I discovered that this ...
6 years, 7 months ago (2014-05-09 10:57:45 UTC) #4
mstensho (USE GERRIT)
And it becomes more and more clear to me that setPageBreak() is an over-abstracted name. ...
6 years, 7 months ago (2014-05-09 11:17:16 UTC) #5
Julien - ping for review
lgtm https://codereview.chromium.org/261383004/diff/80001/LayoutTests/fast/multicol/balance-short-trailing-empty-block.html File LayoutTests/fast/multicol/balance-short-trailing-empty-block.html (right): https://codereview.chromium.org/261383004/diff/80001/LayoutTests/fast/multicol/balance-short-trailing-empty-block.html#newcode8 LayoutTests/fast/multicol/balance-short-trailing-empty-block.html:8: <p>Both words below should be in the the ...
6 years, 7 months ago (2014-05-09 18:23:53 UTC) #6
Julien - ping for review
On 2014/05/09 11:17:16, Morten Stenshorne wrote: > And it becomes more and more clear to ...
6 years, 7 months ago (2014-05-09 18:24:44 UTC) #7
mstensho (USE GERRIT)
https://codereview.chromium.org/261383004/diff/80001/LayoutTests/fast/multicol/balance-short-trailing-empty-block.html File LayoutTests/fast/multicol/balance-short-trailing-empty-block.html (right): https://codereview.chromium.org/261383004/diff/80001/LayoutTests/fast/multicol/balance-short-trailing-empty-block.html#newcode8 LayoutTests/fast/multicol/balance-short-trailing-empty-block.html:8: <p>Both words below should be in the the right ...
6 years, 7 months ago (2014-05-10 16:28:21 UTC) #8
mstensho (USE GERRIT)
Address code review issues raised together with lgtm
6 years, 7 months ago (2014-05-10 16:28:27 UTC) #9
mstensho (USE GERRIT)
The CQ bit was checked by mstensho@opera.com
6 years, 7 months ago (2014-05-10 16:28:40 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mstensho@opera.com/261383004/100001
6 years, 7 months ago (2014-05-10 16:29:16 UTC) #11
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-10 17:41:29 UTC) #12
commit-bot: I haz the power
6 years, 7 months ago (2014-05-10 18:21:52 UTC) #13
Message was sent while issue was closed.
Change committed as 173826

Powered by Google App Engine
This is Rietveld 408576698