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" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 bidi_level_(UBIDI_LTR), | 89 bidi_level_(UBIDI_LTR), |
90 script_(USCRIPT_INVALID_CODE), | 90 script_(USCRIPT_INVALID_CODE), |
91 fallback_priority_(FontFallbackPriority::Invalid), | 91 fallback_priority_(FontFallbackPriority::Invalid), |
92 rotate_sideways_(false), | 92 rotate_sideways_(false), |
93 style_(style) { | 93 style_(style) { |
94 DCHECK(end >= start); | 94 DCHECK(end >= start); |
95 } | 95 } |
96 | 96 |
97 unsigned StartOffset() const { return start_offset_; } | 97 unsigned StartOffset() const { return start_offset_; } |
98 unsigned EndOffset() const { return end_offset_; } | 98 unsigned EndOffset() const { return end_offset_; } |
99 TextDirection Direction() const { return bidi_level_ & 1 ? RTL : LTR; } | 99 TextDirection Direction() const { |
| 100 return bidi_level_ & 1 ? TextDirection::Rtl : TextDirection::Ltr; |
| 101 } |
100 UBiDiLevel BidiLevel() const { return bidi_level_; } | 102 UBiDiLevel BidiLevel() const { return bidi_level_; } |
101 UScriptCode Script() const { return script_; } | 103 UScriptCode Script() const { return script_; } |
102 const ComputedStyle* Style() const { return style_; } | 104 const ComputedStyle* Style() const { return style_; } |
103 | 105 |
104 void SetEndOffset(unsigned); | 106 void SetEndOffset(unsigned); |
105 | 107 |
106 static void Split(Vector<NGLayoutInlineItem>&, | 108 static void Split(Vector<NGLayoutInlineItem>&, |
107 unsigned index, | 109 unsigned index, |
108 unsigned offset); | 110 unsigned offset); |
109 static unsigned SetBidiLevel(Vector<NGLayoutInlineItem>&, | 111 static unsigned SetBidiLevel(Vector<NGLayoutInlineItem>&, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 166 |
165 private: | 167 private: |
166 NGLayoutInlineItem* start_item_; | 168 NGLayoutInlineItem* start_item_; |
167 unsigned size_; | 169 unsigned size_; |
168 unsigned start_index_; | 170 unsigned start_index_; |
169 }; | 171 }; |
170 | 172 |
171 } // namespace blink | 173 } // namespace blink |
172 | 174 |
173 #endif // NGInlineNode_h | 175 #endif // NGInlineNode_h |
OLD | NEW |