Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc |
| index 238c3b0dc9b0e67b3b35ff7d137341c747ca0ecb..045d35587316e7401d7946b5f2af492f3e2d92ba 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc |
| @@ -219,10 +219,7 @@ bool NGBlockLayoutAlgorithm::ComputeMinAndMaxContentSizes( |
| return true; |
| } |
| -NGLayoutStatus NGBlockLayoutAlgorithm::Layout( |
| - NGPhysicalFragment* child_fragment, |
| - NGPhysicalFragment** fragment_out, |
| - NGLayoutAlgorithm** algorithm_out) { |
| +NGPhysicalFragment* NGBlockLayoutAlgorithm::Layout() { |
| WTF::Optional<MinAndMaxContentSizes> sizes; |
| if (NeedMinAndMaxContentSizes(ConstraintSpace(), Style())) { |
| // TODO(ikilpatrick): Change ComputeMinAndMaxContentSizes to return |
| @@ -291,13 +288,8 @@ NGLayoutStatus NGBlockLayoutAlgorithm::Layout( |
| SpaceAvailableForCurrentChild() > LayoutUnit()); |
| space_for_current_child_ = CreateConstraintSpaceForCurrentChild(); |
| - NGFragment* fragment; |
| - current_child_->LayoutSync(space_for_current_child_, &fragment); |
| - NGPhysicalFragment* child_fragment = fragment->PhysicalFragment(); |
| - |
| - // TODO(layout_ng): Seems like a giant hack to call this here. |
| - current_child_->UpdateLayoutBox(toNGPhysicalBoxFragment(child_fragment), |
|
cbiesinger
2017/01/20 21:21:56
Oh I see... this was only needed because we did no
ikilpatrick
2017/01/20 23:19:57
Yeah going through the boxes now might make things
|
| - space_for_current_child_); |
| + NGPhysicalFragment* child_fragment = |
| + current_child_->Layout(space_for_current_child_); |
| FinishCurrentChildLayout(new NGBoxFragment( |
| ConstraintSpace().WritingMode(), ConstraintSpace().Direction(), |
| @@ -329,8 +321,7 @@ NGLayoutStatus NGBlockLayoutAlgorithm::Layout( |
| if (ConstraintSpace().HasBlockFragmentation()) |
| FinalizeForFragmentation(); |
| - *fragment_out = builder_->ToBoxFragment(); |
| - return kNewFragment; |
| + return builder_->ToBoxFragment(); |
| } |
| void NGBlockLayoutAlgorithm::FinishCurrentChildLayout(NGFragment* fragment) { |