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 NGPhysicalTextFragment_h | 5 #ifndef NGPhysicalTextFragment_h |
6 #define NGPhysicalTextFragment_h | 6 #define NGPhysicalTextFragment_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_block_node.h" | 9 #include "core/layout/ng/ng_block_node.h" |
10 #include "core/layout/ng/ng_inline_node.h" | 10 #include "core/layout/ng/ng_inline_node.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // TODO(kojii): NGInlineNode is to access text content and NGLayoutInlineItem. | 40 // TODO(kojii): NGInlineNode is to access text content and NGLayoutInlineItem. |
41 // Review if it's better to point them. | 41 // Review if it's better to point them. |
42 Persistent<const NGInlineNode> node_; | 42 Persistent<const NGInlineNode> node_; |
43 unsigned item_index_; | 43 unsigned item_index_; |
44 unsigned start_offset_; | 44 unsigned start_offset_; |
45 unsigned end_offset_; | 45 unsigned end_offset_; |
46 }; | 46 }; |
47 | 47 |
48 DEFINE_TYPE_CASTS(NGPhysicalTextFragment, | 48 DEFINE_TYPE_CASTS(NGPhysicalTextFragment, |
49 NGPhysicalFragment, | 49 NGPhysicalFragment, |
50 text, | 50 fragment, |
51 text->Type() == NGPhysicalFragment::kFragmentText, | 51 fragment->IsText(), |
52 text.Type() == NGPhysicalFragment::kFragmentText); | 52 fragment.IsText()); |
53 | 53 |
54 } // namespace blink | 54 } // namespace blink |
55 | 55 |
56 #endif // NGPhysicalTextFragment_h | 56 #endif // NGPhysicalTextFragment_h |
OLD | NEW |