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_physical_fragment_base.h" | 9 #include "core/layout/ng/ng_physical_fragment_base.h" |
10 #include "platform/LayoutUnit.h" | 10 #include "platform/LayoutUnit.h" |
11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
12 #include "wtf/text/WTFString.h" | 12 #include "wtf/text/WTFString.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragmentBase { | 16 class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragmentBase { |
17 public: | 17 public: |
18 NGPhysicalTextFragment(NGPhysicalSize size, NGPhysicalSize overflow) | 18 NGPhysicalTextFragment(NGPhysicalSize size, NGPhysicalSize overflow) |
19 : NGPhysicalFragmentBase(size, overflow, FragmentText) {} | 19 : NGPhysicalFragmentBase(size, overflow, kFragmentText) {} |
20 | 20 |
21 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { | 21 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { |
22 NGPhysicalFragmentBase::traceAfterDispatch(visitor); | 22 NGPhysicalFragmentBase::traceAfterDispatch(visitor); |
23 } | 23 } |
24 }; | 24 }; |
25 | 25 |
26 DEFINE_TYPE_CASTS(NGPhysicalTextFragment, | 26 DEFINE_TYPE_CASTS(NGPhysicalTextFragment, |
27 NGPhysicalFragmentBase, | 27 NGPhysicalFragmentBase, |
28 text, | 28 text, |
29 text->Type() == NGPhysicalFragmentBase::FragmentText, | 29 text->Type() == NGPhysicalFragmentBase::kFragmentText, |
30 text.Type() == NGPhysicalFragmentBase::FragmentText); | 30 text.Type() == NGPhysicalFragmentBase::kFragmentText); |
31 | 31 |
32 } // namespace blink | 32 } // namespace blink |
33 | 33 |
34 #endif // NGPhysicalTextFragment_h | 34 #endif // NGPhysicalTextFragment_h |
OLD | NEW |