| 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 |
| 228 content_size_ = border_and_padding_.block_start; | 231 content_size_ = border_and_padding_.block_start; |
| 229 | 232 |
| 230 builder_ = new NGFragmentBuilder(NGPhysicalFragmentBase::FragmentBox); | 233 builder_ = new NGFragmentBuilder(NGPhysicalFragmentBase::FragmentBox); |
| 231 builder_->SetDirection(constraint_space_->Direction()); | 234 builder_->SetDirection(constraint_space_->Direction()); |
| 232 builder_->SetWritingMode(constraint_space_->WritingMode()); | 235 builder_->SetWritingMode(constraint_space_->WritingMode()); |
| 233 builder_->SetInlineSize(inline_size).SetBlockSize(block_size); | 236 builder_->SetInlineSize(inline_size).SetBlockSize(block_size); |
| 234 current_child_ = first_child_; | 237 current_child_ = first_child_; |
| 235 if (current_child_) | 238 if (current_child_) |
| 236 space_for_current_child_ = CreateConstraintSpaceForCurrentChild(); | 239 space_for_current_child_ = CreateConstraintSpaceForCurrentChild(); |
| 237 | 240 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 visitor->trace(first_child_); | 448 visitor->trace(first_child_); |
| 446 visitor->trace(constraint_space_); | 449 visitor->trace(constraint_space_); |
| 447 visitor->trace(break_token_); | 450 visitor->trace(break_token_); |
| 448 visitor->trace(builder_); | 451 visitor->trace(builder_); |
| 449 visitor->trace(space_builder_); | 452 visitor->trace(space_builder_); |
| 450 visitor->trace(space_for_current_child_); | 453 visitor->trace(space_for_current_child_); |
| 451 visitor->trace(current_child_); | 454 visitor->trace(current_child_); |
| 452 } | 455 } |
| 453 | 456 |
| 454 } // namespace blink | 457 } // namespace blink |
| OLD | NEW |