| 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" |
| 11 #include "core/layout/ng/ng_floating_object.h" | 11 #include "core/layout/ng/ng_floating_object.h" |
| 12 #include "core/layout/ng/ng_physical_fragment.h" | 12 #include "core/layout/ng/ng_physical_fragment.h" |
| 13 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment { | 17 class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment { |
| 18 public: | 18 public: |
| 19 NGPhysicalTextFragment( | 19 NGPhysicalTextFragment(LayoutObject* layout_object, |
| 20 LayoutObject* layout_object, | 20 const NGInlineNode* node, |
| 21 const NGInlineNode* node, | 21 unsigned item_index, |
| 22 unsigned item_index, | 22 unsigned start_offset, |
| 23 unsigned start_offset, | 23 unsigned end_offset, |
| 24 unsigned end_offset, | 24 NGPhysicalSize size, |
| 25 NGPhysicalSize size, | 25 NGPhysicalSize overflow) |
| 26 NGPhysicalSize overflow, | 26 : NGPhysicalFragment(layout_object, size, overflow, kFragmentText), |
| 27 PersistentHeapLinkedHashSet<WeakMember<NGBlockNode>>& | |
| 28 out_of_flow_descendants, | |
| 29 Vector<NGStaticPosition> out_of_flow_positions, | |
| 30 Vector<Persistent<NGFloatingObject>>& unpositioned_floats, | |
| 31 Vector<Persistent<NGFloatingObject>>& positioned_floats) | |
| 32 : NGPhysicalFragment(layout_object, | |
| 33 size, | |
| 34 overflow, | |
| 35 kFragmentText, | |
| 36 out_of_flow_descendants, | |
| 37 out_of_flow_positions, | |
| 38 unpositioned_floats, | |
| 39 positioned_floats), | |
| 40 node_(node), | 27 node_(node), |
| 41 item_index_(item_index), | 28 item_index_(item_index), |
| 42 start_offset_(start_offset), | 29 start_offset_(start_offset), |
| 43 end_offset_(end_offset) {} | 30 end_offset_(end_offset) {} |
| 44 | 31 |
| 45 const NGInlineNode* Node() const { return node_; } | 32 const NGInlineNode* Node() const { return node_; } |
| 46 | 33 |
| 47 // The range of NGLayoutInlineItem. | 34 // The range of NGLayoutInlineItem. |
| 48 unsigned ItemIndex() const { return item_index_; } | 35 unsigned ItemIndex() const { return item_index_; } |
| 49 unsigned StartOffset() const { return start_offset_; } | 36 unsigned StartOffset() const { return start_offset_; } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 60 | 47 |
| 61 DEFINE_TYPE_CASTS(NGPhysicalTextFragment, | 48 DEFINE_TYPE_CASTS(NGPhysicalTextFragment, |
| 62 NGPhysicalFragment, | 49 NGPhysicalFragment, |
| 63 text, | 50 text, |
| 64 text->Type() == NGPhysicalFragment::kFragmentText, | 51 text->Type() == NGPhysicalFragment::kFragmentText, |
| 65 text.Type() == NGPhysicalFragment::kFragmentText); | 52 text.Type() == NGPhysicalFragment::kFragmentText); |
| 66 | 53 |
| 67 } // namespace blink | 54 } // namespace blink |
| 68 | 55 |
| 69 #endif // NGPhysicalTextFragment_h | 56 #endif // NGPhysicalTextFragment_h |
| OLD | NEW |