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

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

Issue 2719373002: [LayoutNG] Move NGConstraintSpaceBuilder off Oilpan and DISALLOW_NEW. (Closed)
Patch Set: Created 3 years, 10 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/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 a755d5ac107dacdcbe1c428a14e894e3a1971784..ae52d4a8140e4068e681907ca622b7aa2a71e89c 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
@@ -311,7 +311,9 @@ NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm(
constraint_space_(constraint_space),
break_token_(break_token),
builder_(WTF::wrapUnique(
- new NGFragmentBuilder(NGPhysicalFragment::kFragmentBox, node))) {}
+ new NGFragmentBuilder(NGPhysicalFragment::kFragmentBox, node))),
+ space_builder_(
ikilpatrick 2017/02/28 18:28:05 We could also do: class NGConstraintSpaceBuilder
cbiesinger 2017/02/28 22:09:16 Hm... I guess we never reset it / we never need to
ikilpatrick 2017/02/28 22:59:26 I changed NGFragmentBuilder as well, and updated t
+ WTF::wrapUnique(new NGConstraintSpaceBuilder(constraint_space_))) {}
Optional<MinAndMaxContentSizes>
NGBlockLayoutAlgorithm::ComputeMinAndMaxContentSizes() const {
@@ -400,7 +402,6 @@ RefPtr<NGLayoutResult> NGBlockLayoutAlgorithm::Layout() {
if (adjusted_block_size != NGSizeIndefinite)
adjusted_block_size -= border_and_padding_.BlockSum();
- space_builder_ = new NGConstraintSpaceBuilder(constraint_space_);
space_builder_
->SetAvailableSize(
NGLogicalSize(adjusted_inline_size, adjusted_block_size))

Powered by Google App Engine
This is Rietveld 408576698