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

Issue 2493833004: InitialColumnHeightFinder needs to take all expected rows into account. (Closed)

Created:
4 years, 1 month ago by mstensho (USE GERRIT)
Modified:
4 years, 1 month ago
Reviewers:
eae, szager1
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews, mstensho (USE GERRIT)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

InitialColumnHeightFinder 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -28 lines) Patch
A third_party/WebKit/LayoutTests/fast/multicol/nested-balanced-inner-column-count-1-with-forced-break-2.html View 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/multicol/nested-balanced-inner-with-many-breaks.html View 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/multicol/nested-balanced-inner-with-many-breaks-2.html View 1 chunk +14 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/multicol/nested-balanced-inner-with-many-breaks-2-expected.html View 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/multicol/nested-balanced-inner-with-many-breaks-expected.html View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ColumnBalancer.h View 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ColumnBalancer.cpp View 1 6 chunks +46 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMultiColumnFlowThread.cpp View 1 chunk +1 line, -15 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp View 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp View 1 chunk +2 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (8 generated)
mstensho (USE GERRIT)
You can tell from the long description and all the long comments in this CL ...
4 years, 1 month ago (2016-11-10 21:06:51 UTC) #4
eae
LGTM w/questions https://codereview.chromium.org/2493833004/diff/1/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp File third_party/WebKit/Source/core/layout/ColumnBalancer.cpp (right): https://codereview.chromium.org/2493833004/diff/1/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp#newcode159 third_party/WebKit/Source/core/layout/ColumnBalancer.cpp:159: rowLogicalTop += LayoutUnit::fromFloatCeil(rowHeight); why ceil? https://codereview.chromium.org/2493833004/diff/1/third_party/WebKit/Source/core/layout/ColumnBalancer.h File ...
4 years, 1 month ago (2016-11-10 23:37:12 UTC) #7
mstensho (USE GERRIT)
https://codereview.chromium.org/2493833004/diff/1/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp File third_party/WebKit/Source/core/layout/ColumnBalancer.cpp (right): https://codereview.chromium.org/2493833004/diff/1/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp#newcode159 third_party/WebKit/Source/core/layout/ColumnBalancer.cpp:159: rowLogicalTop += LayoutUnit::fromFloatCeil(rowHeight); On 2016/11/10 23:37:12, eae wrote: > ...
4 years, 1 month ago (2016-11-11 08:47:46 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2493833004/20001
4 years, 1 month ago (2016-11-14 07:31:47 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-14 08:52:10 UTC) #12
commit-bot: I haz the power
4 years, 1 month ago (2016-11-14 08:53:53 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/d19d51259c048132deb253a9d7441b40eceb55e9
Cr-Commit-Position: refs/heads/master@{#431844}

Powered by Google App Engine
This is Rietveld 408576698