OLD | NEW |
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_block_layout_algorithm.h" | 5 #include "core/layout/ng/ng_block_layout_algorithm.h" |
6 | 6 |
7 #include "core/layout/ng/ng_break_token.h" | 7 #include "core/layout/ng/ng_break_token.h" |
8 #include "core/layout/ng/ng_constraint_space.h" | 8 #include "core/layout/ng/ng_constraint_space.h" |
9 #include "core/layout/ng/ng_constraint_space_builder.h" | 9 #include "core/layout/ng/ng_constraint_space_builder.h" |
10 #include "core/layout/ng/ng_fragment_base.h" | 10 #include "core/layout/ng/ng_fragment_base.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 if (adjusted_block_size != NGSizeIndefinite) | 218 if (adjusted_block_size != NGSizeIndefinite) |
219 adjusted_block_size -= border_and_padding_.BlockSum(); | 219 adjusted_block_size -= border_and_padding_.BlockSum(); |
220 | 220 |
221 space_builder_ = | 221 space_builder_ = |
222 new NGConstraintSpaceBuilder(constraint_space_->WritingMode()); | 222 new NGConstraintSpaceBuilder(constraint_space_->WritingMode()); |
223 space_builder_->SetAvailableSize( | 223 space_builder_->SetAvailableSize( |
224 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); | 224 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); |
225 space_builder_->SetPercentageResolutionSize( | 225 space_builder_->SetPercentageResolutionSize( |
226 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); | 226 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); |
227 | 227 |
228 constraint_space_->SetSize( | |
229 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); | |
230 | |
231 content_size_ = border_and_padding_.block_start; | 228 content_size_ = border_and_padding_.block_start; |
232 | 229 |
233 builder_ = new NGFragmentBuilder(NGPhysicalFragmentBase::FragmentBox); | 230 builder_ = new NGFragmentBuilder(NGPhysicalFragmentBase::FragmentBox); |
234 builder_->SetDirection(constraint_space_->Direction()); | 231 builder_->SetDirection(constraint_space_->Direction()); |
235 builder_->SetWritingMode(constraint_space_->WritingMode()); | 232 builder_->SetWritingMode(constraint_space_->WritingMode()); |
236 builder_->SetInlineSize(inline_size).SetBlockSize(block_size); | 233 builder_->SetInlineSize(inline_size).SetBlockSize(block_size); |
237 current_child_ = first_child_; | 234 current_child_ = first_child_; |
238 if (current_child_) | 235 if (current_child_) |
239 space_for_current_child_ = CreateConstraintSpaceForCurrentChild(); | 236 space_for_current_child_ = CreateConstraintSpaceForCurrentChild(); |
240 | 237 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 visitor->trace(first_child_); | 445 visitor->trace(first_child_); |
449 visitor->trace(constraint_space_); | 446 visitor->trace(constraint_space_); |
450 visitor->trace(break_token_); | 447 visitor->trace(break_token_); |
451 visitor->trace(builder_); | 448 visitor->trace(builder_); |
452 visitor->trace(space_builder_); | 449 visitor->trace(space_builder_); |
453 visitor->trace(space_for_current_child_); | 450 visitor->trace(space_for_current_child_); |
454 visitor->trace(current_child_); | 451 visitor->trace(current_child_); |
455 } | 452 } |
456 | 453 |
457 } // namespace blink | 454 } // namespace blink |
OLD | NEW |