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 NGInlineLayoutAlgorithm_h | 5 #ifndef NGInlineLayoutAlgorithm_h |
6 #define NGInlineLayoutAlgorithm_h | 6 #define NGInlineLayoutAlgorithm_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_layout_algorithm.h" | 9 #include "core/layout/ng/ng_layout_algorithm.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 class CORE_EXPORT NGTextLayoutAlgorithm : public NGLayoutAlgorithm { | 24 class CORE_EXPORT NGTextLayoutAlgorithm : public NGLayoutAlgorithm { |
25 public: | 25 public: |
26 // Default constructor. | 26 // Default constructor. |
27 // @param inline_box The inline box to produce fragments from. | 27 // @param inline_box The inline box to produce fragments from. |
28 // @param space The constraint space which the algorithm should generate a | 28 // @param space The constraint space which the algorithm should generate a |
29 // fragments within. | 29 // fragments within. |
30 NGTextLayoutAlgorithm(NGInlineNode* inline_box, | 30 NGTextLayoutAlgorithm(NGInlineNode* inline_box, |
31 NGConstraintSpace* space, | 31 NGConstraintSpace* space, |
32 NGBreakToken* break_token = nullptr); | 32 NGBreakToken* break_token = nullptr); |
33 | 33 |
34 NGLayoutStatus Layout(NGPhysicalFragmentBase*, | 34 NGLayoutStatus Layout(NGPhysicalFragment*, |
35 NGPhysicalFragmentBase**, | 35 NGPhysicalFragment**, |
36 NGLayoutAlgorithm**) override; | 36 NGLayoutAlgorithm**) override; |
37 bool LayoutInline(NGLineBuilder*); | 37 bool LayoutInline(NGLineBuilder*); |
38 | 38 |
39 DECLARE_VIRTUAL_TRACE(); | 39 DECLARE_VIRTUAL_TRACE(); |
40 | 40 |
41 private: | 41 private: |
42 Member<NGInlineNode> inline_box_; | 42 Member<NGInlineNode> inline_box_; |
43 Member<NGConstraintSpace> constraint_space_; | 43 Member<NGConstraintSpace> constraint_space_; |
44 Member<NGBreakToken> break_token_; | 44 Member<NGBreakToken> break_token_; |
45 | 45 |
46 friend class NGInlineNodeTest; | 46 friend class NGInlineNodeTest; |
47 }; | 47 }; |
48 | 48 |
49 DEFINE_TYPE_CASTS(NGTextLayoutAlgorithm, | 49 DEFINE_TYPE_CASTS(NGTextLayoutAlgorithm, |
50 NGLayoutAlgorithm, | 50 NGLayoutAlgorithm, |
51 algorithm, | 51 algorithm, |
52 algorithm->algorithmType() == kTextLayoutAlgorithm, | 52 algorithm->algorithmType() == kTextLayoutAlgorithm, |
53 algorithm.algorithmType() == kTextLayoutAlgorithm); | 53 algorithm.algorithmType() == kTextLayoutAlgorithm); |
54 | 54 |
55 } // namespace blink | 55 } // namespace blink |
56 | 56 |
57 #endif // NGInlineLayoutAlgorithm_h | 57 #endif // NGInlineLayoutAlgorithm_h |
OLD | NEW |