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 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)) |