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 NGTextFragment_h | 5 #ifndef NGTextFragment_h |
6 #define NGTextFragment_h | 6 #define NGTextFragment_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_fragment_base.h" | 9 #include "core/layout/ng/ng_fragment_base.h" |
10 #include "core/layout/ng/ng_layout_input_text.h" | 10 #include "core/layout/ng/ng_layout_input_text.h" |
11 #include "platform/LayoutUnit.h" | 11 #include "platform/LayoutUnit.h" |
12 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
13 #include "wtf/text/WTFString.h" | 13 #include "wtf/text/WTFString.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 class CORE_EXPORT NGTextFragment final : public NGFragmentBase { | 17 class CORE_EXPORT NGTextFragment final : public NGFragmentBase { |
18 public: | 18 public: |
19 NGTextFragment(LayoutUnit inlineSize, | 19 NGTextFragment(NGLogicalSize size, |
20 LayoutUnit blockSize, | 20 NGLogicalSize overflow, |
21 LayoutUnit inlineOverflow, | |
22 LayoutUnit blockOverflow, | |
23 NGWritingMode writingMode, | 21 NGWritingMode writingMode, |
24 NGDirection direction) | 22 NGDirection direction) |
25 : NGFragmentBase(inlineSize, | 23 : NGFragmentBase(size, overflow, writingMode, direction, FragmentText) {} |
26 blockSize, | |
27 inlineOverflow, | |
28 blockOverflow, | |
29 writingMode, | |
30 direction, | |
31 FragmentText) {} | |
32 | 24 |
33 String text() const; | 25 String text() const; |
34 | 26 |
35 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { | 27 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { |
36 visitor->trace(text_list_); | 28 visitor->trace(text_list_); |
37 NGFragmentBase::traceAfterDispatch(visitor); | 29 NGFragmentBase::traceAfterDispatch(visitor); |
38 } | 30 } |
39 | 31 |
40 private: | 32 private: |
41 Member<NGLayoutInputText> text_list_; | 33 Member<NGLayoutInputText> text_list_; |
42 unsigned start_offset_; | 34 unsigned start_offset_; |
43 unsigned end_offset_; | 35 unsigned end_offset_; |
44 }; | 36 }; |
45 | 37 |
46 } // namespace blink | 38 } // namespace blink |
47 | 39 |
48 #endif // NGTextFragment_h | 40 #endif // NGTextFragment_h |
OLD | NEW |