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 #ifndef NGBlockLayoutAlgorithm_h | 5 #ifndef NGBlockLayoutAlgorithm_h |
6 #define NGBlockLayoutAlgorithm_h | 6 #define NGBlockLayoutAlgorithm_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/geometry/ng_margin_strut.h" | 9 #include "core/layout/ng/geometry/ng_margin_strut.h" |
10 #include "core/layout/ng/ng_block_node.h" | 10 #include "core/layout/ng/ng_block_node.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 Optional<MinMaxContentSize> ComputeMinMaxContentSize() const override; | 36 Optional<MinMaxContentSize> ComputeMinMaxContentSize() const override; |
37 RefPtr<NGLayoutResult> Layout() override; | 37 RefPtr<NGLayoutResult> Layout() override; |
38 | 38 |
39 private: | 39 private: |
40 NGBoxStrut CalculateMargins(NGBlockNode* child, | 40 NGBoxStrut CalculateMargins(NGBlockNode* child, |
41 const NGConstraintSpace& space); | 41 const NGConstraintSpace& space); |
42 | 42 |
43 // Creates a new constraint space for the current child. | 43 // Creates a new constraint space for the current child. |
44 RefPtr<NGConstraintSpace> CreateConstraintSpaceForChild(NGLayoutInputNode*); | 44 RefPtr<NGConstraintSpace> CreateConstraintSpaceForChild(NGLayoutInputNode*); |
| 45 void PrepareChildLayout(NGLayoutInputNode*); |
45 void FinishChildLayout(NGLayoutInputNode*, | 46 void FinishChildLayout(NGLayoutInputNode*, |
46 NGConstraintSpace*, | 47 NGConstraintSpace*, |
47 RefPtr<NGLayoutResult>); | 48 RefPtr<NGLayoutResult>); |
48 | 49 |
49 // Final adjustments before fragment creation. We need to prevent the | 50 // Final adjustments before fragment creation. We need to prevent the |
50 // fragment from crossing fragmentainer boundaries, and rather create a break | 51 // fragment from crossing fragmentainer boundaries, and rather create a break |
51 // token if we're out of space. | 52 // token if we're out of space. |
52 void FinalizeForFragmentation(); | 53 void FinalizeForFragmentation(); |
53 | 54 |
54 // Calculates logical offset for the current fragment using either | 55 // Calculates logical offset for the current fragment using either |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 LayoutUnit max_inline_size_; | 90 LayoutUnit max_inline_size_; |
90 // MarginStrut for the previous child. | 91 // MarginStrut for the previous child. |
91 NGMarginStrut curr_margin_strut_; | 92 NGMarginStrut curr_margin_strut_; |
92 NGLogicalOffset curr_bfc_offset_; | 93 NGLogicalOffset curr_bfc_offset_; |
93 NGBoxStrut curr_child_margins_; | 94 NGBoxStrut curr_child_margins_; |
94 }; | 95 }; |
95 | 96 |
96 } // namespace blink | 97 } // namespace blink |
97 | 98 |
98 #endif // NGBlockLayoutAlgorithm_h | 99 #endif // NGBlockLayoutAlgorithm_h |
OLD | NEW |