| 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_constraint_space.h" | 5 #include "core/layout/ng/ng_constraint_space.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutBlock.h" | 7 #include "core/layout/LayoutBlock.h" |
| 8 #include "core/layout/LayoutView.h" | 8 #include "core/layout/LayoutView.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_layout_opportunity_iterator.h" | 10 #include "core/layout/ng/ng_layout_opportunity_iterator.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 void NGConstraintSpace::AddExclusion(const NGExclusion& exclusion) { | 90 void NGConstraintSpace::AddExclusion(const NGExclusion& exclusion) { |
| 91 exclusions_->Add(exclusion); | 91 exclusions_->Add(exclusion); |
| 92 } | 92 } |
| 93 | 93 |
| 94 NGFragmentationType NGConstraintSpace::BlockFragmentationType() const { | 94 NGFragmentationType NGConstraintSpace::BlockFragmentationType() const { |
| 95 return static_cast<NGFragmentationType>(block_direction_fragmentation_type_); | 95 return static_cast<NGFragmentationType>(block_direction_fragmentation_type_); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void NGConstraintSpace::Subtract(const NGFragment*) { | 98 void NGConstraintSpace::Subtract(const NGBoxFragment*) { |
| 99 // TODO(layout-ng): Implement. | 99 // TODO(layout-ng): Implement. |
| 100 } | 100 } |
| 101 | 101 |
| 102 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunities( | 102 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunities( |
| 103 unsigned clear, | 103 unsigned clear, |
| 104 bool for_inline_or_bfc) { | 104 bool for_inline_or_bfc) { |
| 105 NGLayoutOpportunityIterator* iterator = new NGLayoutOpportunityIterator(this); | 105 NGLayoutOpportunityIterator* iterator = new NGLayoutOpportunityIterator(this); |
| 106 return iterator; | 106 return iterator; |
| 107 } | 107 } |
| 108 | 108 |
| 109 String NGConstraintSpace::ToString() const { | 109 String NGConstraintSpace::ToString() const { |
| 110 return String::format("%s,%s %sx%s", | 110 return String::format("%s,%s %sx%s", |
| 111 offset_.inline_offset.toString().ascii().data(), | 111 offset_.inline_offset.toString().ascii().data(), |
| 112 offset_.block_offset.toString().ascii().data(), | 112 offset_.block_offset.toString().ascii().data(), |
| 113 AvailableSize().inline_size.toString().ascii().data(), | 113 AvailableSize().inline_size.toString().ascii().data(), |
| 114 AvailableSize().block_size.toString().ascii().data()); | 114 AvailableSize().block_size.toString().ascii().data()); |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace blink | 117 } // namespace blink |
| OLD | NEW |