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_node.h" | 5 #include "core/layout/ng/ng_block_node.h" |
6 | 6 |
7 #include "core/layout/LayoutBlockFlow.h" | 7 #include "core/layout/LayoutBlockFlow.h" |
8 #include "core/layout/api/LineLayoutAPIShim.h" | 8 #include "core/layout/api/LineLayoutAPIShim.h" |
9 #include "core/layout/line/InlineIterator.h" | 9 #include "core/layout/line/InlineIterator.h" |
10 #include "core/layout/ng/layout_ng_block_flow.h" | 10 #include "core/layout/ng/layout_ng_block_flow.h" |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } | 196 } |
197 | 197 |
198 void NGBlockNode::SetNextSibling(NGBlockNode* sibling) { | 198 void NGBlockNode::SetNextSibling(NGBlockNode* sibling) { |
199 next_sibling_ = sibling; | 199 next_sibling_ = sibling; |
200 } | 200 } |
201 | 201 |
202 void NGBlockNode::SetFirstChild(NGLayoutInputNode* child) { | 202 void NGBlockNode::SetFirstChild(NGLayoutInputNode* child) { |
203 first_child_ = child; | 203 first_child_ = child; |
204 } | 204 } |
205 | 205 |
| 206 NGBreakToken* NGBlockNode::CurrentBreakToken() const { |
| 207 return fragment_ ? fragment_->BreakToken() : nullptr; |
| 208 } |
| 209 |
206 DEFINE_TRACE(NGBlockNode) { | 210 DEFINE_TRACE(NGBlockNode) { |
207 visitor->trace(layout_coordinator_); | 211 visitor->trace(layout_coordinator_); |
208 visitor->trace(minmax_algorithm_); | 212 visitor->trace(minmax_algorithm_); |
209 visitor->trace(fragment_); | 213 visitor->trace(fragment_); |
210 visitor->trace(next_sibling_); | 214 visitor->trace(next_sibling_); |
211 visitor->trace(first_child_); | 215 visitor->trace(first_child_); |
212 NGLayoutInputNode::trace(visitor); | 216 NGLayoutInputNode::trace(visitor); |
213 } | 217 } |
214 | 218 |
215 void NGBlockNode::PositionUpdated() { | 219 void NGBlockNode::PositionUpdated() { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 return builder.ToBoxFragment(); | 340 return builder.ToBoxFragment(); |
337 } | 341 } |
338 | 342 |
339 void NGBlockNode::UseOldOutOfFlowPositioning() { | 343 void NGBlockNode::UseOldOutOfFlowPositioning() { |
340 DCHECK(layout_box_); | 344 DCHECK(layout_box_); |
341 DCHECK(layout_box_->isOutOfFlowPositioned()); | 345 DCHECK(layout_box_->isOutOfFlowPositioned()); |
342 layout_box_->containingBlock()->insertPositionedObject(layout_box_); | 346 layout_box_->containingBlock()->insertPositionedObject(layout_box_); |
343 } | 347 } |
344 | 348 |
345 } // namespace blink | 349 } // namespace blink |
OLD | NEW |