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

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

Issue 2724133003: [LayoutNG] Switch NGConstraintSpace to being RefCounted. (Closed)
Patch Set: moar. Created 3 years, 9 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_out_of_flow_layout_part.h" 5 #include "core/layout/ng/ng_out_of_flow_layout_part.h"
6 6
7 #include "core/layout/ng/ng_absolute_utils.h" 7 #include "core/layout/ng/ng_absolute_utils.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_box_fragment.h" 9 #include "core/layout/ng/ng_box_fragment.h"
10 #include "core/layout/ng/ng_constraint_space_builder.h" 10 #include "core/layout/ng/ng_constraint_space_builder.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 NGLogicalSize available_size{inline_size, block_size}; 172 NGLogicalSize available_size{inline_size, block_size};
173 173
174 NGConstraintSpaceBuilder builder(container_space_->WritingMode()); 174 NGConstraintSpaceBuilder builder(container_space_->WritingMode());
175 builder.SetAvailableSize(available_size); 175 builder.SetAvailableSize(available_size);
176 builder.SetPercentageResolutionSize(container_space_->AvailableSize()); 176 builder.SetPercentageResolutionSize(container_space_->AvailableSize());
177 if (block_estimate) 177 if (block_estimate)
178 builder.SetIsFixedSizeBlock(true); 178 builder.SetIsFixedSizeBlock(true);
179 builder.SetIsFixedSizeInline(true); 179 builder.SetIsFixedSizeInline(true);
180 builder.SetIsNewFormattingContext(true); 180 builder.SetIsNewFormattingContext(true);
181 NGConstraintSpace* space = 181 RefPtr<NGConstraintSpace> space =
182 builder.ToConstraintSpace(container_space_->WritingMode()); 182 builder.ToConstraintSpace(container_space_->WritingMode());
183 183
184 return descendant.Layout(space); 184 return descendant.Layout(space.get());
185 } 185 }
186 186
187 } // namespace blink 187 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698