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_layout_opportunity_iterator.h" | 9 #include "core/layout/ng/ng_layout_opportunity_iterator.h" |
10 #include "core/layout/ng/ng_units.h" | 10 #include "core/layout/ng/ng_units.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 : physical_space_->width_direction_fragmentation_type_); | 125 : physical_space_->width_direction_fragmentation_type_); |
126 } | 126 } |
127 | 127 |
128 void NGConstraintSpace::Subtract(const NGFragment*) { | 128 void NGConstraintSpace::Subtract(const NGFragment*) { |
129 // TODO(layout-ng): Implement. | 129 // TODO(layout-ng): Implement. |
130 } | 130 } |
131 | 131 |
132 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunities( | 132 NGLayoutOpportunityIterator* NGConstraintSpace::LayoutOpportunities( |
133 unsigned clear, | 133 unsigned clear, |
134 bool for_inline_or_bfc) { | 134 bool for_inline_or_bfc) { |
135 NGLayoutOpportunityIterator* iterator = | 135 NGLayoutOpportunityIterator* iterator = new NGLayoutOpportunityIterator(this); |
136 new NGLayoutOpportunityIterator(this, clear, for_inline_or_bfc); | |
137 return iterator; | 136 return iterator; |
138 } | 137 } |
139 | 138 |
140 void NGConstraintSpace::SetOverflowTriggersScrollbar(bool inline_triggers, | 139 void NGConstraintSpace::SetOverflowTriggersScrollbar(bool inline_triggers, |
141 bool block_triggers) { | 140 bool block_triggers) { |
142 if (writing_mode_ == HorizontalTopBottom) { | 141 if (writing_mode_ == HorizontalTopBottom) { |
143 physical_space_->width_direction_triggers_scrollbar_ = inline_triggers; | 142 physical_space_->width_direction_triggers_scrollbar_ = inline_triggers; |
144 physical_space_->height_direction_triggers_scrollbar_ = block_triggers; | 143 physical_space_->height_direction_triggers_scrollbar_ = block_triggers; |
145 } else { | 144 } else { |
146 physical_space_->width_direction_triggers_scrollbar_ = block_triggers; | 145 physical_space_->width_direction_triggers_scrollbar_ = block_triggers; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 177 |
179 String NGConstraintSpace::ToString() const { | 178 String NGConstraintSpace::ToString() const { |
180 return String::format("%s,%s %sx%s", | 179 return String::format("%s,%s %sx%s", |
181 offset_.inline_offset.toString().ascii().data(), | 180 offset_.inline_offset.toString().ascii().data(), |
182 offset_.block_offset.toString().ascii().data(), | 181 offset_.block_offset.toString().ascii().data(), |
183 size_.inline_size.toString().ascii().data(), | 182 size_.inline_size.toString().ascii().data(), |
184 size_.block_size.toString().ascii().data()); | 183 size_.block_size.toString().ascii().data()); |
185 } | 184 } |
186 | 185 |
187 } // namespace blink | 186 } // namespace blink |
OLD | NEW |