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 | 15 |
16 #include <unicode/ubidi.h> | 16 #include <unicode/ubidi.h> |
17 #include <unicode/uscript.h> | 17 #include <unicode/uscript.h> |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 | 20 |
21 class ComputedStyle; | 21 class ComputedStyle; |
22 class LayoutBlockFlow; | 22 class LayoutBlockFlow; |
23 class LayoutObject; | 23 class LayoutObject; |
24 class LayoutUnit; | 24 class LayoutUnit; |
25 class NGConstraintSpace; | 25 class NGConstraintSpace; |
26 class NGLayoutInlineItem; | 26 class NGLayoutInlineItem; |
27 class NGLayoutInlineItemRange; | 27 class NGLayoutInlineItemRange; |
28 class NGLayoutInlineItemsBuilder; | 28 class NGLayoutInlineItemsBuilder; |
| 29 class NGLayoutResult; |
29 class NGLineBuilder; | 30 class NGLineBuilder; |
30 class NGPhysicalFragment; | |
31 | 31 |
32 // Represents an inline node to be laid out. | 32 // Represents an inline node to be laid out. |
33 class CORE_EXPORT NGInlineNode : public NGLayoutInputNode { | 33 class CORE_EXPORT NGInlineNode : public NGLayoutInputNode { |
34 public: | 34 public: |
35 NGInlineNode(LayoutObject* start_inline, const ComputedStyle* block_style); | 35 NGInlineNode(LayoutObject* start_inline, const ComputedStyle* block_style); |
36 ~NGInlineNode() override; | 36 ~NGInlineNode() override; |
37 | 37 |
38 RefPtr<NGPhysicalFragment> Layout(NGConstraintSpace*) override; | 38 RefPtr<NGLayoutResult> Layout(NGConstraintSpace*) override; |
39 void LayoutInline(NGConstraintSpace*, NGLineBuilder*); | 39 void LayoutInline(NGConstraintSpace*, NGLineBuilder*); |
40 NGInlineNode* NextSibling() override; | 40 NGInlineNode* NextSibling() override; |
41 LayoutObject* GetLayoutObject() override; | 41 LayoutObject* GetLayoutObject() override; |
42 | 42 |
43 // Prepare inline and text content for layout. Must be called before | 43 // Prepare inline and text content for layout. Must be called before |
44 // calling the Layout method. | 44 // calling the Layout method. |
45 void PrepareLayout(); | 45 void PrepareLayout(); |
46 | 46 |
47 const String& Text() const { return text_content_; } | 47 const String& Text() const { return text_content_; } |
48 String Text(unsigned start_offset, unsigned end_offset) const { | 48 String Text(unsigned start_offset, unsigned end_offset) const { |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 206 |
207 private: | 207 private: |
208 NGLayoutInlineItem* start_item_; | 208 NGLayoutInlineItem* start_item_; |
209 unsigned size_; | 209 unsigned size_; |
210 unsigned start_index_; | 210 unsigned start_index_; |
211 }; | 211 }; |
212 | 212 |
213 } // namespace blink | 213 } // namespace blink |
214 | 214 |
215 #endif // NGInlineNode_h | 215 #endif // NGInlineNode_h |
OLD | NEW |