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/LayoutBlockFlow.h" | 9 #include "core/layout/LayoutBlockFlow.h" |
10 #include "core/layout/ng/ng_layout_input_node.h" | 10 #include "core/layout/ng/ng_layout_input_node.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // Instruct to re-compute |PrepareLayout| on the next layout. | 55 // Instruct to re-compute |PrepareLayout| on the next layout. |
56 void InvalidatePrepareLayout(); | 56 void InvalidatePrepareLayout(); |
57 | 57 |
58 const String& Text() const { return text_content_; } | 58 const String& Text() const { return text_content_; } |
59 StringView Text(unsigned start_offset, unsigned end_offset) const { | 59 StringView Text(unsigned start_offset, unsigned end_offset) const { |
60 return StringView(text_content_, start_offset, end_offset - start_offset); | 60 return StringView(text_content_, start_offset, end_offset - start_offset); |
61 } | 61 } |
62 | 62 |
63 Vector<NGLayoutInlineItem>& Items() { return items_; } | 63 Vector<NGLayoutInlineItem>& Items() { return items_; } |
| 64 const Vector<NGLayoutInlineItem>& Items() const { return items_; } |
64 NGLayoutInlineItemRange Items(unsigned start_index, unsigned end_index); | 65 NGLayoutInlineItemRange Items(unsigned start_index, unsigned end_index); |
65 | 66 |
66 void GetLayoutTextOffsets(Vector<unsigned, 32>*); | 67 void GetLayoutTextOffsets(Vector<unsigned, 32>*); |
67 | 68 |
68 bool IsBidiEnabled() const { return is_bidi_enabled_; } | 69 bool IsBidiEnabled() const { return is_bidi_enabled_; } |
69 | 70 |
70 void AssertOffset(unsigned index, unsigned offset) const; | 71 void AssertOffset(unsigned index, unsigned offset) const; |
71 void AssertEndOffset(unsigned index, unsigned offset) const; | 72 void AssertEndOffset(unsigned index, unsigned offset) const; |
72 | 73 |
73 DECLARE_VIRTUAL_TRACE(); | 74 DECLARE_VIRTUAL_TRACE(); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 249 |
249 private: | 250 private: |
250 NGLayoutInlineItem* start_item_; | 251 NGLayoutInlineItem* start_item_; |
251 unsigned size_; | 252 unsigned size_; |
252 unsigned start_index_; | 253 unsigned start_index_; |
253 }; | 254 }; |
254 | 255 |
255 } // namespace blink | 256 } // namespace blink |
256 | 257 |
257 #endif // NGInlineNode_h | 258 #endif // NGInlineNode_h |
OLD | NEW |