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_legacy_block_layout_algorithm.h" | 5 #include "core/layout/ng/ng_legacy_block_layout_algorithm.h" |
6 | 6 |
7 #include "core/layout/ng/ng_physical_fragment.h" | 7 #include "core/layout/ng/ng_physical_box_fragment.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
11 NGLegacyBlockLayoutAlgorithm::NGLegacyBlockLayoutAlgorithm( | 11 NGLegacyBlockLayoutAlgorithm::NGLegacyBlockLayoutAlgorithm( |
12 NGBlockNode* block, | 12 NGBlockNode* block, |
13 const NGConstraintSpace* constraint_space) | 13 const NGConstraintSpace* constraint_space) |
14 : NGLayoutAlgorithm(kLegacyBlockLayoutAlgorithm), | 14 : NGLayoutAlgorithm(kLegacyBlockLayoutAlgorithm), |
15 block_(block), | 15 block_(block), |
16 constraint_space_(constraint_space) {} | 16 constraint_space_(constraint_space) {} |
17 | 17 |
18 NGLayoutStatus NGLegacyBlockLayoutAlgorithm::Layout( | 18 NGLayoutStatus NGLegacyBlockLayoutAlgorithm::Layout( |
19 NGPhysicalFragmentBase*, | 19 NGPhysicalFragment*, |
20 NGPhysicalFragmentBase** fragment_out, | 20 NGPhysicalFragment** fragment_out, |
21 NGLayoutAlgorithm**) { | 21 NGLayoutAlgorithm**) { |
22 *fragment_out = block_->RunOldLayout(*constraint_space_); | 22 *fragment_out = block_->RunOldLayout(*constraint_space_); |
23 return kNewFragment; | 23 return kNewFragment; |
24 } | 24 } |
25 | 25 |
26 DEFINE_TRACE(NGLegacyBlockLayoutAlgorithm) { | 26 DEFINE_TRACE(NGLegacyBlockLayoutAlgorithm) { |
27 NGLayoutAlgorithm::trace(visitor); | 27 NGLayoutAlgorithm::trace(visitor); |
28 visitor->trace(block_); | 28 visitor->trace(block_); |
29 visitor->trace(constraint_space_); | 29 visitor->trace(constraint_space_); |
30 } | 30 } |
31 } | 31 } |
OLD | NEW |