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

Unified Diff: third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc

Issue 2921463004: [LayoutNG] PODify NGLayoutInputNode and sub-classes. (Closed)
Patch Set: new ng-bot expectations Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698