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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } | 100 } |
101 | 101 |
102 NGFragmentationType NGConstraintSpace::BlockFragmentationType() const { | 102 NGFragmentationType NGConstraintSpace::BlockFragmentationType() const { |
103 return static_cast<NGFragmentationType>(block_direction_fragmentation_type_); | 103 return static_cast<NGFragmentationType>(block_direction_fragmentation_type_); |
104 } | 104 } |
105 | 105 |
106 void NGConstraintSpace::Subtract(const NGBoxFragment*) { | 106 void NGConstraintSpace::Subtract(const NGBoxFragment*) { |
107 // TODO(layout-ng): Implement. | 107 // TODO(layout-ng): Implement. |
108 } | 108 } |
109 | 109 |
110 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunities( | |
111 const WTF::Optional<NGLogicalOffset>& opt_origin_point) { | |
112 NGLayoutOpportunityIterator* iterator = | |
113 new NGLayoutOpportunityIterator(this, opt_origin_point); | |
114 return iterator; | |
115 } | |
116 | |
117 String NGConstraintSpace::ToString() const { | 110 String NGConstraintSpace::ToString() const { |
118 return String::format("Offset: %s,%s Size: %sx%s MarginStrut: %s", | 111 return String::format("Offset: %s,%s Size: %sx%s MarginStrut: %s", |
119 bfc_offset_.inline_offset.toString().ascii().data(), | 112 bfc_offset_.inline_offset.toString().ascii().data(), |
120 bfc_offset_.block_offset.toString().ascii().data(), | 113 bfc_offset_.block_offset.toString().ascii().data(), |
121 AvailableSize().inline_size.toString().ascii().data(), | 114 AvailableSize().inline_size.toString().ascii().data(), |
122 AvailableSize().block_size.toString().ascii().data(), | 115 AvailableSize().block_size.toString().ascii().data(), |
123 margin_strut_.ToString().ascii().data()); | 116 margin_strut_.ToString().ascii().data()); |
124 } | 117 } |
125 | 118 |
126 } // namespace blink | 119 } // namespace blink |
OLD | NEW |