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 NGLineBuilder_h | 5 #ifndef NGLineBuilder_h |
6 #define NGLineBuilder_h | 6 #define NGLineBuilder_h |
7 | 7 |
8 #include "core/layout/ng/ng_units.h" | 8 #include "core/layout/ng/ng_units.h" |
9 #include "core/CoreExport.h" | 9 #include "core/CoreExport.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
11 #include "wtf/Vector.h" | 11 #include "wtf/Vector.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class NGConstraintSpace; | 15 class NGConstraintSpace; |
16 class NGFragmentBase; | 16 class NGFragment; |
17 class NGFragmentBuilder; | 17 class NGFragmentBuilder; |
18 class NGInlineNode; | 18 class NGInlineNode; |
19 | 19 |
20 // NGLineBuilder creates the fragment tree for a line. | 20 // NGLineBuilder creates the fragment tree for a line. |
21 class CORE_EXPORT NGLineBuilder final | 21 class CORE_EXPORT NGLineBuilder final |
22 : public GarbageCollectedFinalized<NGLineBuilder> { | 22 : public GarbageCollectedFinalized<NGLineBuilder> { |
23 public: | 23 public: |
24 NGLineBuilder(NGInlineNode*, const NGConstraintSpace*); | 24 NGLineBuilder(NGInlineNode*, const NGConstraintSpace*); |
25 | 25 |
26 // Add a range of NGLayoutInlineItem to the line in the logical order. | 26 // Add a range of NGLayoutInlineItem to the line in the logical order. |
(...skipping 11 matching lines...) Expand all Loading... |
38 void BidiReorder(); | 38 void BidiReorder(); |
39 | 39 |
40 struct LineItemChunk { | 40 struct LineItemChunk { |
41 unsigned start_index; | 41 unsigned start_index; |
42 unsigned end_index; | 42 unsigned end_index; |
43 LayoutUnit inline_size; | 43 LayoutUnit inline_size; |
44 }; | 44 }; |
45 | 45 |
46 Member<NGInlineNode> inline_box_; | 46 Member<NGInlineNode> inline_box_; |
47 Member<const NGConstraintSpace> constraint_space_; | 47 Member<const NGConstraintSpace> constraint_space_; |
48 HeapVector<Member<NGFragmentBase>, 32> fragments_; | 48 HeapVector<Member<NGFragment>, 32> fragments_; |
49 Vector<NGLogicalOffset, 32> offsets_; | 49 Vector<NGLogicalOffset, 32> offsets_; |
50 Vector<LineItemChunk, 32> line_item_chunks_; | 50 Vector<LineItemChunk, 32> line_item_chunks_; |
51 LayoutUnit content_size_; | 51 LayoutUnit content_size_; |
52 LayoutUnit max_inline_size_; | 52 LayoutUnit max_inline_size_; |
53 | 53 |
54 #if DCHECK_IS_ON() | 54 #if DCHECK_IS_ON() |
55 unsigned is_bidi_reordered_ : 1; | 55 unsigned is_bidi_reordered_ : 1; |
56 #endif | 56 #endif |
57 }; | 57 }; |
58 | 58 |
59 } // namespace blink | 59 } // namespace blink |
60 | 60 |
61 #endif // NGLineBuilder_h | 61 #endif // NGLineBuilder_h |
OLD | NEW |