Chromium Code Reviews| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 if (adjusted_block_size != NGSizeIndefinite) | 179 if (adjusted_block_size != NGSizeIndefinite) |
| 180 adjusted_block_size -= border_and_padding_.BlockSum(); | 180 adjusted_block_size -= border_and_padding_.BlockSum(); |
| 181 | 181 |
| 182 space_builder_ = | 182 space_builder_ = |
| 183 new NGConstraintSpaceBuilder(constraint_space_->WritingMode()); | 183 new NGConstraintSpaceBuilder(constraint_space_->WritingMode()); |
| 184 space_builder_->SetAvailableSize( | 184 space_builder_->SetAvailableSize( |
| 185 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); | 185 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); |
| 186 space_builder_->SetPercentageResolutionSize( | 186 space_builder_->SetPercentageResolutionSize( |
| 187 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); | 187 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); |
| 188 | 188 |
| 189 constraint_space_->SetSize( | |
|
cbiesinger
2016/11/18 23:44:23
Why is the new code still correct? This was necess
Gleb Lanbin
2016/11/19 04:20:47
ConstraintSpace::Size() was only used in NGLayoutO
cbiesinger
2016/11/19 04:28:47
So I'm confused. I thought this specific SetSize c
| |
| 190 NGLogicalSize(adjusted_inline_size, adjusted_block_size)); | |
| 191 | |
| 192 content_size_ = border_and_padding_.block_start; | 189 content_size_ = border_and_padding_.block_start; |
| 193 | 190 |
| 194 builder_ = new NGFragmentBuilder(NGPhysicalFragmentBase::FragmentBox); | 191 builder_ = new NGFragmentBuilder(NGPhysicalFragmentBase::FragmentBox); |
| 195 builder_->SetDirection(constraint_space_->Direction()); | 192 builder_->SetDirection(constraint_space_->Direction()); |
| 196 builder_->SetWritingMode(constraint_space_->WritingMode()); | 193 builder_->SetWritingMode(constraint_space_->WritingMode()); |
| 197 builder_->SetInlineSize(inline_size).SetBlockSize(block_size); | 194 builder_->SetInlineSize(inline_size).SetBlockSize(block_size); |
| 198 current_child_ = first_child_; | 195 current_child_ = first_child_; |
| 199 if (current_child_) | 196 if (current_child_) |
| 200 space_for_current_child_ = CreateConstraintSpaceForCurrentChild(); | 197 space_for_current_child_ = CreateConstraintSpaceForCurrentChild(); |
| 201 | 198 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 398 visitor->trace(first_child_); | 395 visitor->trace(first_child_); |
| 399 visitor->trace(constraint_space_); | 396 visitor->trace(constraint_space_); |
| 400 visitor->trace(break_token_); | 397 visitor->trace(break_token_); |
| 401 visitor->trace(builder_); | 398 visitor->trace(builder_); |
| 402 visitor->trace(space_builder_); | 399 visitor->trace(space_builder_); |
| 403 visitor->trace(space_for_current_child_); | 400 visitor->trace(space_for_current_child_); |
| 404 visitor->trace(current_child_); | 401 visitor->trace(current_child_); |
| 405 } | 402 } |
| 406 | 403 |
| 407 } // namespace blink | 404 } // namespace blink |
| OLD | NEW |