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_layout_algorithm.h" | 5 #include "core/layout/ng/ng_block_layout_algorithm.h" |
6 | 6 |
7 #include "core/layout/ng/ng_block_node.h" | 7 #include "core/layout/ng/ng_block_node.h" |
8 #include "core/layout/ng/ng_constraint_space.h" | 8 #include "core/layout/ng/ng_constraint_space.h" |
9 #include "core/layout/ng/ng_constraint_space_builder.h" | 9 #include "core/layout/ng/ng_constraint_space_builder.h" |
10 #include "core/layout/ng/ng_layout_coordinator.h" | 10 #include "core/layout/ng/ng_layout_coordinator.h" |
11 #include "core/layout/ng/ng_length_utils.h" | 11 #include "core/layout/ng/ng_length_utils.h" |
| 12 #include "core/layout/ng/ng_physical_box_fragment.h" |
| 13 #include "core/layout/ng/ng_physical_fragment.h" |
12 #include "core/layout/ng/ng_units.h" | 14 #include "core/layout/ng/ng_units.h" |
13 #include "core/style/ComputedStyle.h" | 15 #include "core/style/ComputedStyle.h" |
14 #include "core/layout/ng/ng_physical_box_fragment.h" | |
15 #include "core/layout/ng/ng_physical_fragment.h" | |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 namespace { | 19 namespace { |
20 | 20 |
21 NGConstraintSpace* ConstructConstraintSpace(NGWritingMode writing_mode, | 21 NGConstraintSpace* ConstructConstraintSpace(NGWritingMode writing_mode, |
22 TextDirection direction, | 22 TextDirection direction, |
23 NGLogicalSize size, | 23 NGLogicalSize size, |
24 bool shrink_to_fit = false) { | 24 bool shrink_to_fit = false) { |
25 return NGConstraintSpaceBuilder(writing_mode) | 25 return NGConstraintSpaceBuilder(writing_mode) |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 auto* space = ConstructConstraintSpace( | 842 auto* space = ConstructConstraintSpace( |
843 kHorizontalTopBottom, TextDirection::kLtr, | 843 kHorizontalTopBottom, TextDirection::kLtr, |
844 NGLogicalSize(LayoutUnit(100), NGSizeIndefinite), true); | 844 NGLogicalSize(LayoutUnit(100), NGSizeIndefinite), true); |
845 NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, first_child); | 845 NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, first_child); |
846 | 846 |
847 EXPECT_EQ(LayoutUnit(30), frag->Width()); | 847 EXPECT_EQ(LayoutUnit(30), frag->Width()); |
848 } | 848 } |
849 | 849 |
850 } // namespace | 850 } // namespace |
851 } // namespace blink | 851 } // namespace blink |
OLD | NEW |