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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.cc

Issue 2632523002: [LayoutNG] Initial support for multicol, introducing NGBlockBreakToken. (Closed)
Patch Set: Add TODO. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/ng/ng_layout_input_node.h" 5 #include "core/layout/ng/ng_layout_input_node.h"
6 6
7 #include "core/layout/ng/ng_block_layout_algorithm.h" 7 #include "core/layout/ng/ng_block_layout_algorithm.h"
8 #include "core/layout/ng/ng_block_node.h" 8 #include "core/layout/ng/ng_block_node.h"
9 #include "core/layout/ng/ng_constraint_space.h" 9 #include "core/layout/ng/ng_constraint_space.h"
10 #include "core/layout/ng/ng_inline_layout_algorithm.h" 10 #include "core/layout/ng/ng_inline_layout_algorithm.h"
(...skipping 13 matching lines...) Expand all
24 DCHECK(input_node->Type() == kLegacyBlock); 24 DCHECK(input_node->Type() == kLegacyBlock);
25 NGBlockNode* block = toNGBlockNode(input_node); 25 NGBlockNode* block = toNGBlockNode(input_node);
26 if (!block->CanUseNewLayout()) 26 if (!block->CanUseNewLayout())
27 return new NGLegacyBlockLayoutAlgorithm(block, constraint_space); 27 return new NGLegacyBlockLayoutAlgorithm(block, constraint_space);
28 const ComputedStyle* style = block->Style(); 28 const ComputedStyle* style = block->Style();
29 if (block->HasInlineChildren()) { 29 if (block->HasInlineChildren()) {
30 NGInlineNode* child = toNGInlineNode(block->FirstChild()); 30 NGInlineNode* child = toNGInlineNode(block->FirstChild());
31 return new NGInlineLayoutAlgorithm(style, child, constraint_space); 31 return new NGInlineLayoutAlgorithm(style, child, constraint_space);
32 } 32 }
33 NGBlockNode* child = toNGBlockNode(block->FirstChild()); 33 NGBlockNode* child = toNGBlockNode(block->FirstChild());
34 return new NGBlockLayoutAlgorithm(style, child, constraint_space); 34 // TODO(layout-ng): The break token should be passed as an argument to this
35 // method instead of getting it from the NGBlockNode
36 NGBreakToken* token = block->CurrentBreakToken();
37 return new NGBlockLayoutAlgorithm(style, child, constraint_space, token);
35 } 38 }
36 } 39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698