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

Issue 2435803005: Initial implementation of LayoutNG's block layout algorithm for floats. (Closed)

Created:
4 years, 2 months ago by Gleb Lanbin
Modified:
4 years, 2 months ago
Reviewers:
cbiesinger, ikilpatrick
CC:
chromium-reviews, ojan+watch_chromium.org, szager+layoutwatch_chromium.org, glebl+reviews_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

Initial implementation of LayoutNG's block layout algorithm for floats. This patch adds support of left/right floats in LayoutNG code. Things that are not supported yet: - top aligning floats - clearing - child blocks in the same formatting formatting context BUG=635619 TEST=virtual/layout_ng/fast/block/float, NGBlockLayoutAlgorithmTest::PositionFloatFragments Committed: https://crrev.com/05059b38db14102048bfbe34bafbaf52b9fcc7ba Cr-Commit-Position: refs/heads/master@{#426982}

Patch Set 1 #

Total comments: 16

Patch Set 2 : move CreateExclusion to a separate function, fix other comments #

Total comments: 28

Patch Set 3 : fix a bunch of comments from cbiesinger@ #

Total comments: 10

Patch Set 4 : fix PositionFragment's doc, added TODO to fix floats with margins and add more test expectations. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+448 lines, -45 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 chunk +146 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/VirtualTestSuites View 1 chunk +5 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/virtual/layout_ng/fast/block/float/README.txt View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h View 1 2 chunks +23 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc View 1 2 7 chunks +135 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc View 1 chunk +55 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h View 1 2 2 chunks +15 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc View 1 3 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h View 2 chunks +8 lines, -15 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.cc View 1 chunk +32 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_units.h View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (11 generated)
Gleb Lanbin
4 years, 2 months ago (2016-10-19 19:00:28 UTC) #3
ikilpatrick
This looks nice and clean. Am i correct in thinking that they missing things here ...
4 years, 2 months ago (2016-10-20 16:27:09 UTC) #4
Gleb Lanbin
https://chromiumcodereview.appspot.com/2435803005/diff/20001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://chromiumcodereview.appspot.com/2435803005/diff/20001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode45 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:45: if (opportunity->Size().inline_size > fragment.InlineSize()) On 2016/10/20 16:27:09, ikilpatrick wrote: ...
4 years, 2 months ago (2016-10-20 20:11:42 UTC) #5
cbiesinger
https://chromiumcodereview.appspot.com/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://chromiumcodereview.appspot.com/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode39 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:39: exclusion_bottom += margins.BlockSum(); I'm not super-happy with naming it ...
4 years, 2 months ago (2016-10-20 20:41:51 UTC) #7
Gleb Lanbin
thanks for the review. PTAL https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode39 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:39: exclusion_bottom += margins.BlockSum(); On ...
4 years, 2 months ago (2016-10-20 23:30:36 UTC) #8
cbiesinger
https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode39 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:39: exclusion_bottom += margins.BlockSum(); On 2016/10/20 23:30:35, glebl wrote: > ...
4 years, 2 months ago (2016-10-20 23:37:53 UTC) #9
ikilpatrick
https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode39 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:39: exclusion_bottom += margins.BlockSum(); On 2016/10/20 23:37:53, cbiesinger wrote: > ...
4 years, 2 months ago (2016-10-20 23:46:11 UTC) #10
cbiesinger
On 2016/10/20 23:46:11, ikilpatrick wrote: > https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc > File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc > (right): > > https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode39 ...
4 years, 2 months ago (2016-10-20 23:47:45 UTC) #11
cbiesinger
On 2016/10/20 23:47:45, cbiesinger wrote: > On 2016/10/20 23:46:11, ikilpatrick wrote: > > > https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc ...
4 years, 2 months ago (2016-10-20 23:50:56 UTC) #12
ikilpatrick
On 2016/10/20 23:47:45, cbiesinger wrote: > On 2016/10/20 23:46:11, ikilpatrick wrote: > > > https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc ...
4 years, 2 months ago (2016-10-20 23:52:45 UTC) #13
ikilpatrick
On 2016/10/20 23:50:56, cbiesinger wrote: > On 2016/10/20 23:47:45, cbiesinger wrote: > > On 2016/10/20 ...
4 years, 2 months ago (2016-10-20 23:54:41 UTC) #14
cbiesinger
On 2016/10/20 23:54:41, ikilpatrick wrote: > On 2016/10/20 23:50:56, cbiesinger wrote: > > On 2016/10/20 ...
4 years, 2 months ago (2016-10-20 23:57:12 UTC) #15
Gleb Lanbin
PTAL https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://codereview.chromium.org/2435803005/diff/40001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode67 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:67: opportunity = opportunity_candidate; On 2016/10/20 23:37:53, cbiesinger wrote: ...
4 years, 2 months ago (2016-10-20 23:57:54 UTC) #16
ikilpatrick
looks really good. https://codereview.chromium.org/2435803005/diff/60001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://codereview.chromium.org/2435803005/diff/60001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode72 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:72: return opportunity; Cant' this function just ...
4 years, 2 months ago (2016-10-21 16:14:01 UTC) #17
Gleb Lanbin
https://codereview.chromium.org/2435803005/diff/60001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc (right): https://codereview.chromium.org/2435803005/diff/60001/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode72 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:72: return opportunity; On 2016/10/21 16:14:01, ikilpatrick wrote: > Cant' ...
4 years, 2 months ago (2016-10-21 19:30:52 UTC) #18
ikilpatrick
lgtm
4 years, 2 months ago (2016-10-21 19:35:04 UTC) #21
cbiesinger
lgtm, though if we do start storing exclusions with logical offsets, we should rename the ...
4 years, 2 months ago (2016-10-21 19:39:27 UTC) #22
Gleb Lanbin
On 2016/10/21 19:39:27, cbiesinger wrote: > lgtm, though if we do start storing exclusions with ...
4 years, 2 months ago (2016-10-21 19:45:04 UTC) #23
Gleb Lanbin
On 2016/10/21 19:39:27, cbiesinger wrote: > lgtm, though if we do start storing exclusions with ...
4 years, 2 months ago (2016-10-21 19:45:05 UTC) #24
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/2435803005/80001
4 years, 2 months ago (2016-10-21 21:57:00 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/321809)
4 years, 2 months ago (2016-10-22 01:49:36 UTC) #29
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/2435803005/80001
4 years, 2 months ago (2016-10-22 02:10:26 UTC) #31
commit-bot: I haz the power
Committed patchset #4 (id:80001)
4 years, 2 months ago (2016-10-22 05:47:10 UTC) #33
commit-bot: I haz the power
4 years, 2 months ago (2016-10-22 06:12:27 UTC) #35
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/05059b38db14102048bfbe34bafbaf52b9fcc7ba
Cr-Commit-Position: refs/heads/master@{#426982}

Powered by Google App Engine
This is Rietveld 408576698