| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // TODO(layout-ng): Implement. | 95 // TODO(layout-ng): Implement. |
| 96 } | 96 } |
| 97 | 97 |
| 98 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunities( | 98 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunities( |
| 99 unsigned clear, | 99 unsigned clear, |
| 100 bool for_inline_or_bfc) { | 100 bool for_inline_or_bfc) { |
| 101 NGLayoutOpportunityIterator* iterator = new NGLayoutOpportunityIterator(this); | 101 NGLayoutOpportunityIterator* iterator = new NGLayoutOpportunityIterator(this); |
| 102 return iterator; | 102 return iterator; |
| 103 } | 103 } |
| 104 | 104 |
| 105 NGConstraintSpace* NGConstraintSpace::ChildSpace( | |
| 106 const ComputedStyle* style) const { | |
| 107 return NGConstraintSpaceBuilder(this) | |
| 108 .SetWritingMode(FromPlatformWritingMode(style->getWritingMode())) | |
| 109 .SetTextDirection(style->direction()) | |
| 110 .ToConstraintSpace(); | |
| 111 } | |
| 112 | |
| 113 String NGConstraintSpace::ToString() const { | 105 String NGConstraintSpace::ToString() const { |
| 114 return String::format("%s,%s %sx%s", | 106 return String::format("%s,%s %sx%s", |
| 115 offset_.inline_offset.toString().ascii().data(), | 107 offset_.inline_offset.toString().ascii().data(), |
| 116 offset_.block_offset.toString().ascii().data(), | 108 offset_.block_offset.toString().ascii().data(), |
| 117 AvailableSize().inline_size.toString().ascii().data(), | 109 AvailableSize().inline_size.toString().ascii().data(), |
| 118 AvailableSize().block_size.toString().ascii().data()); | 110 AvailableSize().block_size.toString().ascii().data()); |
| 119 } | 111 } |
| 120 | 112 |
| 121 } // namespace blink | 113 } // namespace blink |
| OLD | NEW |