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/inline/ng_inline_item.h" | 9 #include "core/layout/ng/inline/ng_inline_item.h" |
10 #include "core/layout/ng/inline/ng_inline_node_data.h" | 10 #include "core/layout/ng/inline/ng_inline_node_data.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 return StringView(Data().text_content_, start_offset, | 54 return StringView(Data().text_content_, start_offset, |
55 end_offset - start_offset); | 55 end_offset - start_offset); |
56 } | 56 } |
57 | 57 |
58 const Vector<NGInlineItem>& Items() const { return Data().items_; } | 58 const Vector<NGInlineItem>& Items() const { return Data().items_; } |
59 NGInlineItemRange Items(unsigned start_index, unsigned end_index); | 59 NGInlineItemRange Items(unsigned start_index, unsigned end_index); |
60 | 60 |
61 void GetLayoutTextOffsets(Vector<unsigned, 32>*); | 61 void GetLayoutTextOffsets(Vector<unsigned, 32>*); |
62 | 62 |
63 bool IsBidiEnabled() const { return Data().is_bidi_enabled_; } | 63 bool IsBidiEnabled() const { return Data().is_bidi_enabled_; } |
| 64 TextDirection BaseDirection() const { return Data().BaseDirection(); } |
64 | 65 |
65 void AssertOffset(unsigned index, unsigned offset) const; | 66 void AssertOffset(unsigned index, unsigned offset) const; |
66 void AssertEndOffset(unsigned index, unsigned offset) const; | 67 void AssertEndOffset(unsigned index, unsigned offset) const; |
67 void CheckConsistency() const; | 68 void CheckConsistency() const; |
68 | 69 |
69 String ToString() const; | 70 String ToString() const; |
70 | 71 |
71 protected: | 72 protected: |
72 // Prepare inline and text content for layout. Must be called before | 73 // Prepare inline and text content for layout. Must be called before |
73 // calling the Layout method. | 74 // calling the Layout method. |
(...skipping 28 matching lines...) Expand all Loading... |
102 | 103 |
103 DEFINE_TYPE_CASTS(NGInlineNode, | 104 DEFINE_TYPE_CASTS(NGInlineNode, |
104 NGLayoutInputNode, | 105 NGLayoutInputNode, |
105 node, | 106 node, |
106 node->IsInline(), | 107 node->IsInline(), |
107 node.IsInline()); | 108 node.IsInline()); |
108 | 109 |
109 } // namespace blink | 110 } // namespace blink |
110 | 111 |
111 #endif // NGInlineNode_h | 112 #endif // NGInlineNode_h |
OLD | NEW |