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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 NGInlineItemsBuilder*); | 86 NGInlineItemsBuilder*); |
87 void SegmentText(); | 87 void SegmentText(); |
88 void ShapeText(); | 88 void ShapeText(); |
89 | 89 |
90 NGInlineNodeData& MutableData() { return block_->GetNGInlineNodeData(); } | 90 NGInlineNodeData& MutableData() { return block_->GetNGInlineNodeData(); } |
91 const NGInlineNodeData& Data() const { return block_->GetNGInlineNodeData(); } | 91 const NGInlineNodeData& Data() const { return block_->GetNGInlineNodeData(); } |
92 | 92 |
93 LayoutObject* start_inline_; | 93 LayoutObject* start_inline_; |
94 LayoutNGBlockFlow* block_; | 94 LayoutNGBlockFlow* block_; |
95 Member<NGLayoutInputNode> next_sibling_; | 95 Member<NGLayoutInputNode> next_sibling_; |
| 96 |
| 97 friend class NGLineBreakerTest; |
96 }; | 98 }; |
97 | 99 |
98 inline void NGInlineNode::AssertOffset(unsigned index, unsigned offset) const { | 100 inline void NGInlineNode::AssertOffset(unsigned index, unsigned offset) const { |
99 Data().items_[index].AssertOffset(offset); | 101 Data().items_[index].AssertOffset(offset); |
100 } | 102 } |
101 | 103 |
102 inline void NGInlineNode::AssertEndOffset(unsigned index, | 104 inline void NGInlineNode::AssertEndOffset(unsigned index, |
103 unsigned offset) const { | 105 unsigned offset) const { |
104 Data().items_[index].AssertEndOffset(offset); | 106 Data().items_[index].AssertEndOffset(offset); |
105 } | 107 } |
106 | 108 |
107 DEFINE_TYPE_CASTS(NGInlineNode, | 109 DEFINE_TYPE_CASTS(NGInlineNode, |
108 NGLayoutInputNode, | 110 NGLayoutInputNode, |
109 node, | 111 node, |
110 node->IsInline(), | 112 node->IsInline(), |
111 node.IsInline()); | 113 node.IsInline()); |
112 | 114 |
113 } // namespace blink | 115 } // namespace blink |
114 | 116 |
115 #endif // NGInlineNode_h | 117 #endif // NGInlineNode_h |
OLD | NEW |