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 NGInlineNode_h | 5 #ifndef NGInlineNode_h |
6 #define NGInlineNode_h | 6 #define NGInlineNode_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_layout_input_node.h" | 9 #include "core/layout/ng/ng_layout_input_node.h" |
10 #include "platform/fonts/FontFallbackPriority.h" | 10 #include "platform/fonts/FontFallbackPriority.h" |
11 #include "platform/fonts/shaping/ShapeResult.h" | 11 #include "platform/fonts/shaping/ShapeResult.h" |
12 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
13 #include "platform/text/TextDirection.h" | 13 #include "platform/text/TextDirection.h" |
14 #include "wtf/text/WTFString.h" | 14 #include "wtf/text/WTFString.h" |
15 #include <unicode/ubidi.h> | 15 #include <unicode/ubidi.h> |
16 #include <unicode/uscript.h> | 16 #include <unicode/uscript.h> |
17 | 17 |
18 namespace blink { | 18 namespace blink { |
19 | 19 |
20 class ComputedStyle; | 20 class ComputedStyle; |
21 class LayoutObject; | 21 class LayoutObject; |
22 class LayoutUnit; | 22 class LayoutUnit; |
23 class NGConstraintSpace; | 23 class NGConstraintSpace; |
24 class NGFragmentBase; | 24 class NGFragment; |
25 class NGLayoutAlgorithm; | 25 class NGLayoutAlgorithm; |
26 class NGLayoutInlineItem; | 26 class NGLayoutInlineItem; |
27 class NGLayoutInlineItemRange; | 27 class NGLayoutInlineItemRange; |
28 class NGLayoutInlineItemsBuilder; | 28 class NGLayoutInlineItemsBuilder; |
29 class NGLineBuilder; | 29 class NGLineBuilder; |
30 | 30 |
31 // Represents an inline node to be laid out. | 31 // Represents an inline node to be laid out. |
32 class CORE_EXPORT NGInlineNode : public NGLayoutInputNode { | 32 class CORE_EXPORT NGInlineNode : public NGLayoutInputNode { |
33 public: | 33 public: |
34 NGInlineNode(LayoutObject* start_inline, ComputedStyle* block_style); | 34 NGInlineNode(LayoutObject* start_inline, ComputedStyle* block_style); |
35 ~NGInlineNode() override; | 35 ~NGInlineNode() override; |
36 | 36 |
37 bool Layout(NGConstraintSpace*, NGFragmentBase**) override; | 37 bool Layout(NGConstraintSpace*, NGFragment**) override; |
38 bool LayoutInline(NGConstraintSpace*, NGLineBuilder*); | 38 bool LayoutInline(NGConstraintSpace*, NGLineBuilder*); |
39 NGInlineNode* NextSibling() override; | 39 NGInlineNode* NextSibling() override; |
40 | 40 |
41 // Prepare inline and text content for layout. Must be called before | 41 // Prepare inline and text content for layout. Must be called before |
42 // calling the Layout method. | 42 // calling the Layout method. |
43 void PrepareLayout(); | 43 void PrepareLayout(); |
44 | 44 |
45 String Text(unsigned start_offset, unsigned end_offset) const { | 45 String Text(unsigned start_offset, unsigned end_offset) const { |
46 return text_content_.substring(start_offset, end_offset); | 46 return text_content_.substring(start_offset, end_offset); |
47 } | 47 } |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 private: | 172 private: |
173 NGLayoutInlineItem* start_item_; | 173 NGLayoutInlineItem* start_item_; |
174 unsigned size_; | 174 unsigned size_; |
175 unsigned start_index_; | 175 unsigned start_index_; |
176 }; | 176 }; |
177 | 177 |
178 } // namespace blink | 178 } // namespace blink |
179 | 179 |
180 #endif // NGInlineNode_h | 180 #endif // NGInlineNode_h |
OLD | NEW |