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 #
Messages
Total messages: 13 (5 generated)
|