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

Issue 2693193002: [LayoutNG] A different approach to multi-col. (Closed)

Created:
3 years, 10 months ago by ikilpatrick
Modified:
3 years, 6 months ago
CC:
chromium-reviews, cbiesinger, ojan+watch_chromium.org, pdr+renderingwatchlist_chromium.org, glebl+reviews_chromium.org, dgrogan+ng_chromium.org, atotic+reviews_chromium.org, zoltan1, blink-reviews-layout_chromium.org, szager+layoutwatch_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews, kinuko+watch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[LayoutNG] A different approach to multi-col. DO NOT SUBMIT This is just a prototype patch to see if this approach to multi-col would work. Instead of emmbedding the knowledge of how to perform multi-col layout inside of block flow, this creates a new layout algorithm: NGMutiColumnLayoutAlgorithm. This essentially only ever performs layout on one child - itself. It will initially perform layout on itself using block-flow to determine where all the break opportunities are. In the second pass it would create constraint spaces, with appropriate fragmentation lines, to create anonymous fragments for each of the columns. This is be biggest difference from the block-flow approach, it introduces the concept of anonymous wrapping fragments. I think we'll need this anyway for line layout. I don't this we have any reason to shy-away from them as they are relatively small. Once it fragments itself it can place the columns in the appropriate position, and return its fragment. Other things we'll need (that aren't in this patch): - Anonymous flag on fragments; we'll need this to communicate to the paint code that it should just paint the children. - Muti-col estimation flag on constraint space; we'll need this to communicate to child multi-cols that we are in the estimation phase, and the children shouldn't fragment during this step. - Anonymous wrapper flag on constraint space; we'll need this to have a few small switches inside block-flow to not include border-and-padding etc. - Multi-col spanner box list on fragment; we'll need this to bubble up spanner input nodes to that the fragmentainer (conceptually the NGMutiColumnLayoutAlgorithm) here to perform layout at the top level. This also fixes a few things which were missing in the previous implementation: - Removes side effect of "Finished" on the NGBlockNode. This allows us to properly cache the output, and perform re-layouts without constructing a new NGBlockNode. BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_layout_ng

Patch Set 1 #

Total comments: 16

Patch Set 2 : rebase... #

Patch Set 3 : rebase \o/ #

Patch Set 4 : remove some stuff. #

Patch Set 5 : a rebase for myself. #

Total comments: 1

Patch Set 6 : tmp upload #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -0 lines) Patch
M third_party/WebKit/Source/core/layout/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/ng/ng_block_node.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.h View 1 2 3 4 5 1 chunk +63 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.cc View 1 2 3 4 5 1 chunk +124 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/ng_paged_layout_algorithm.h View 1 2 3 4 5 1 chunk +95 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/layout/ng/ng_paged_layout_algorithm.cc View 1 2 3 4 5 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
ikilpatrick
This is obviously not for committing... rather just a "high-level-approach" review if that makes sense. ...
3 years, 10 months ago (2017-02-14 17:48:36 UTC) #3
mstensho (USE GERRIT)
OK, probably time for me to stop this nitpicking and comment writing. :) As for ...
3 years, 10 months ago (2017-02-15 21:12:23 UTC) #5
ikilpatrick
Thanks for the high level review. :) Yeah, I talked yesterday with eae&koji and they'll ...
3 years, 10 months ago (2017-02-16 16:48:32 UTC) #6
mstensho (USE GERRIT)
https://codereview.chromium.org/2693193002/diff/1/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/2693193002/diff/1/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc#newcode716 third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc:716: space_available -= builder_->BfcOffset().value().block_offset; On 2017/02/16 16:48:31, ikilpatrick wrote: > ...
3 years, 10 months ago (2017-02-16 21:14:48 UTC) #7
atotic
> > I think just that's what all the other builders looked like; I'm fine ...
3 years, 10 months ago (2017-02-16 21:34:15 UTC) #8
Gleb Lanbin
https://codereview.chromium.org/2693193002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.cc File third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.cc (right): https://codereview.chromium.org/2693193002/diff/80001/third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.cc#newcode105 third_party/WebKit/Source/core/layout/ng/ng_multi_column_layout_algorithm.cc:105: RefPtr<NGLayoutResult> layout_result = this should be declared out of ...
3 years, 8 months ago (2017-04-03 16:54:55 UTC) #9
mstensho (USE GERRIT)
Anything left here?
3 years, 6 months ago (2017-06-13 12:05:16 UTC) #11
ikilpatrick
3 years, 6 months ago (2017-06-20 23:59:51 UTC) #12
On 2017/06/13 12:05:16, mstensho wrote:
> Anything left here?

There is, but nothing useful in this patch :) - closing.

Powered by Google App Engine
This is Rietveld 408576698