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" |
(...skipping 10 matching lines...) Expand all Loading... |
21 LayoutUnit blockOverflow) | 21 LayoutUnit blockOverflow) |
22 : NGFragmentBase(inlineSize, blockSize, inlineOverflow, blockOverflow) { | 22 : NGFragmentBase(inlineSize, blockSize, inlineOverflow, blockOverflow) { |
23 m_isText = false; | 23 m_isText = false; |
24 } | 24 } |
25 | 25 |
26 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { | 26 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { |
27 visitor->trace(m_children); | 27 visitor->trace(m_children); |
28 NGFragmentBase::traceAfterDispatch(visitor); | 28 NGFragmentBase::traceAfterDispatch(visitor); |
29 } | 29 } |
30 | 30 |
| 31 void swapChildren(HeapVector<Member<const NGFragmentBase>>& children) { |
| 32 m_children.swap(children); |
| 33 } |
| 34 |
31 private: | 35 private: |
32 HeapVector<Member<const NGFragmentBase>> m_children; | 36 HeapVector<Member<const NGFragmentBase>> m_children; |
33 bool m_isText; | 37 bool m_isText; |
34 }; | 38 }; |
35 | 39 |
36 } // namespace blink | 40 } // namespace blink |
37 | 41 |
38 #endif // NGFragment_h | 42 #endif // NGFragment_h |
OLD | NEW |