| Index: third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc b/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
|
| index 9c25b24660c515ad6fc3fa4562aa5892f717d2ba..3d090f3471fd0b606f07161b642f5a7d9ab71aef 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
|
| @@ -23,13 +23,8 @@ void LayoutNGBlockFlow::UpdateBlockLayout(bool relayout_children) {
|
|
|
| RefPtr<NGConstraintSpace> constraint_space =
|
| NGConstraintSpace::CreateFromLayoutObject(*this);
|
| -
|
| - // TODO(layout-dev): This should be created in the constructor once instead.
|
| - // There is some internal state which needs to be cleared between layout
|
| - // passes (probably FirstChild(), etc).
|
| - box_ = new NGBlockNode(this);
|
| -
|
| - RefPtr<NGLayoutResult> result = box_->Layout(constraint_space.Get());
|
| + RefPtr<NGLayoutResult> result =
|
| + NGBlockNode(this).Layout(constraint_space.Get());
|
|
|
| if (IsOutOfFlowPositioned()) {
|
| // In legacy layout, abspos differs from regular blocks in that abspos
|
| @@ -46,8 +41,8 @@ void LayoutNGBlockFlow::UpdateBlockLayout(bool relayout_children) {
|
| SetLogicalTop(computed_values.position_);
|
| }
|
|
|
| - for (auto& descendant : result->OutOfFlowDescendants())
|
| - descendant->UseOldOutOfFlowPositioning();
|
| + for (NGBlockNode descendant : result->OutOfFlowDescendants())
|
| + descendant.UseOldOutOfFlowPositioning();
|
|
|
| UpdateAfterLayout();
|
| ClearNeedsLayout();
|
|
|