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_box_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 NGPhysicalFragment* NGLegacyBlockLayoutAlgorithm::Layout() { |
19 NGPhysicalFragment*, | 19 return block_->RunOldLayout(*constraint_space_); |
20 NGPhysicalFragment** fragment_out, | |
21 NGLayoutAlgorithm**) { | |
22 *fragment_out = block_->RunOldLayout(*constraint_space_); | |
23 return kNewFragment; | |
24 } | 20 } |
25 | 21 |
26 DEFINE_TRACE(NGLegacyBlockLayoutAlgorithm) { | 22 DEFINE_TRACE(NGLegacyBlockLayoutAlgorithm) { |
27 NGLayoutAlgorithm::trace(visitor); | 23 NGLayoutAlgorithm::trace(visitor); |
28 visitor->trace(block_); | 24 visitor->trace(block_); |
29 visitor->trace(constraint_space_); | 25 visitor->trace(constraint_space_); |
30 } | 26 } |
31 } | 27 } |
OLD | NEW |