| 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_layout_coordinator.h" | 5 #include "core/layout/ng/ng_layout_coordinator.h" |
| 6 | 6 |
| 7 #include "core/layout/ng/ng_layout_input_node.h" | 7 #include "core/layout/ng/ng_layout_input_node.h" |
| 8 #include "core/layout/ng/ng_physical_fragment_base.h" | 8 #include "core/layout/ng/ng_physical_fragment_base.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 NGLayoutCoordinator::NGLayoutCoordinator( | 12 NGLayoutCoordinator::NGLayoutCoordinator(NGLayoutInputNode* input_node, |
| 13 NGLayoutInputNode* input_node, | 13 NGConstraintSpace* constraint_space) { |
| 14 const NGConstraintSpace* constraint_space) { | |
| 15 layout_algorithms_.append( | 14 layout_algorithms_.append( |
| 16 NGLayoutInputNode::AlgorithmForInputNode(input_node, constraint_space)); | 15 NGLayoutInputNode::AlgorithmForInputNode(input_node, constraint_space)); |
| 17 } | 16 } |
| 18 | 17 |
| 19 bool NGLayoutCoordinator::Tick(NGPhysicalFragmentBase** out_fragment) { | 18 bool NGLayoutCoordinator::Tick(NGPhysicalFragmentBase** out_fragment) { |
| 20 NGLayoutAlgorithm* child_algorithm; | 19 NGLayoutAlgorithm* child_algorithm; |
| 21 | 20 |
| 22 // Tick should never be called without a layout algorithm on the stack. | 21 // Tick should never be called without a layout algorithm on the stack. |
| 23 DCHECK(layout_algorithms_.size()); | 22 DCHECK(layout_algorithms_.size()); |
| 24 | 23 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 45 | 44 |
| 46 NOTREACHED(); | 45 NOTREACHED(); |
| 47 return false; | 46 return false; |
| 48 } | 47 } |
| 49 | 48 |
| 50 DEFINE_TRACE(NGLayoutCoordinator) { | 49 DEFINE_TRACE(NGLayoutCoordinator) { |
| 51 visitor->trace(layout_algorithms_); | 50 visitor->trace(layout_algorithms_); |
| 52 visitor->trace(fragment_); | 51 visitor->trace(fragment_); |
| 53 } | 52 } |
| 54 } | 53 } |
| OLD | NEW |