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 NGFragment_h | 5 #ifndef NGFragment_h |
6 #define NGFragment_h | 6 #define NGFragment_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 "platform/LayoutUnit.h" | 10 #include "platform/LayoutUnit.h" |
11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
12 #include "wtf/Vector.h" | 12 #include "wtf/Vector.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class CORE_EXPORT NGFragment final : public NGFragmentBase { | 16 class CORE_EXPORT NGFragment final : public NGFragmentBase { |
17 public: | 17 public: |
18 NGFragment(LayoutUnit inlineSize, | 18 NGFragment(LayoutUnit inlineSize, |
19 LayoutUnit blockSize, | 19 LayoutUnit blockSize, |
20 LayoutUnit inlineOverflow, | 20 LayoutUnit inlineOverflow, |
21 LayoutUnit blockOverflow) | 21 LayoutUnit blockOverflow, |
22 : NGFragmentBase(inlineSize, blockSize, inlineOverflow, blockOverflow) { | 22 NGWritingMode writingMode, |
23 m_isText = false; | 23 NGDirection direction) |
24 } | 24 : NGFragmentBase(inlineSize, |
| 25 blockSize, |
| 26 inlineOverflow, |
| 27 blockOverflow, |
| 28 writingMode, |
| 29 direction, |
| 30 FragmentBox) {} |
25 | 31 |
26 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { | 32 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { |
27 visitor->trace(m_children); | 33 visitor->trace(m_children); |
28 NGFragmentBase::traceAfterDispatch(visitor); | 34 NGFragmentBase::traceAfterDispatch(visitor); |
29 } | 35 } |
30 | 36 |
31 void swapChildren(HeapVector<Member<const NGFragmentBase>>& children) { | 37 void swapChildren(HeapVector<Member<const NGFragmentBase>>& children) { |
32 m_children.swap(children); | 38 m_children.swap(children); |
33 } | 39 } |
34 | 40 |
35 private: | 41 private: |
36 HeapVector<Member<const NGFragmentBase>> m_children; | 42 HeapVector<Member<const NGFragmentBase>> m_children; |
37 bool m_isText; | |
38 }; | 43 }; |
39 | 44 |
40 } // namespace blink | 45 } // namespace blink |
41 | 46 |
42 #endif // NGFragment_h | 47 #endif // NGFragment_h |
OLD | NEW |