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

Issue 2465363003: Improve how the column balancer handles top margins on floats. (Closed)

Created:
4 years, 1 month ago by mstensho (USE GERRIT)
Modified:
4 years, 1 month ago
Reviewers:
eae
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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improve 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -34 lines) Patch
A third_party/WebKit/LayoutTests/fast/multicol/balance-float-with-margin-top-and-line-after-break-2.html View 1 chunk +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ColumnBalancer.h View 3 chunks +7 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ColumnBalancer.cpp View 1 2 11 chunks +46 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (14 generated)
mstensho (USE GERRIT)
4 years, 1 month ago (2016-11-01 21:42:34 UTC) #8
eae
Overall this looks great but I do have one (optional) suggestion. LGTM https://codereview.chromium.org/2465363003/diff/20001/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp File third_party/WebKit/Source/core/layout/ColumnBalancer.cpp ...
4 years, 1 month ago (2016-11-01 21:46:30 UTC) #9
mstensho (USE GERRIT)
https://codereview.chromium.org/2465363003/diff/20001/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp File third_party/WebKit/Source/core/layout/ColumnBalancer.cpp (right): https://codereview.chromium.org/2465363003/diff/20001/third_party/WebKit/Source/core/layout/ColumnBalancer.cpp#newcode113 third_party/WebKit/Source/core/layout/ColumnBalancer.cpp:113: m_flowThreadOffset += borderBoxOffset; On 2016/11/01 21:46:30, eae wrote: > ...
4 years, 1 month ago (2016-11-01 22:09:38 UTC) #12
eae
OK, please at least add a comment explaining why.
4 years, 1 month ago (2016-11-01 22:10:44 UTC) #13
mstensho (USE GERRIT)
On 2016/11/01 22:10:44, eae wrote: > OK, please at least add a comment explaining why. ...
4 years, 1 month ago (2016-11-01 22:26:26 UTC) #14
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/2465363003/40001
4 years, 1 month ago (2016-11-01 22:27:08 UTC) #17
eae
Thanks! (still LGTM)
4 years, 1 month ago (2016-11-01 22:27:43 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/254433) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 1 month ago (2016-11-01 23:01:01 UTC) #20
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/2465363003/40001
4 years, 1 month ago (2016-11-02 08:51:47 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 1 month ago (2016-11-02 09:34:43 UTC) #23
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/7c82da727f64121aa34aa1decf82452c37ef7a2d Cr-Commit-Position: refs/heads/master@{#429245}
4 years, 1 month ago (2016-11-02 09:36:53 UTC) #25
please use gerrit instead
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2468193002/ by rouslan@chromium.org. ...
4 years, 1 month ago (2016-11-02 13:43:55 UTC) #26
mstensho (USE GERRIT)
Relanded. csspaint/invalidation-background-image.html was flaky before this CL landed.
4 years, 1 month ago (2016-11-03 08:42:58 UTC) #27
mstensho (USE GERRIT)
4 years, 1 month ago (2016-11-03 08:43:23 UTC) #28
Message was sent while issue was closed.
This also fixes bug 624784.

Powered by Google App Engine
This is Rietveld 408576698