OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NGPhysicalFragment_h |
| 6 #define NGPhysicalFragment_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "core/layout/ng/ng_physical_fragment_base.h" |
| 10 #include "core/layout/ng/ng_units.h" |
| 11 #include "platform/heap/Handle.h" |
| 12 #include "wtf/Vector.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 class CORE_EXPORT NGPhysicalFragment final : public NGPhysicalFragmentBase { |
| 17 public: |
| 18 // This modifies the passed-in children vector. |
| 19 NGPhysicalFragment(NGPhysicalSize size, |
| 20 NGPhysicalSize overflow, |
| 21 HeapVector<Member<const NGPhysicalFragmentBase>>& children) |
| 22 : NGPhysicalFragmentBase(size, overflow, FragmentBox) { |
| 23 children_.swap(children); |
| 24 } |
| 25 |
| 26 const HeapVector<Member<const NGPhysicalFragmentBase>>& Children() const { |
| 27 return children_; |
| 28 } |
| 29 |
| 30 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { |
| 31 visitor->trace(children_); |
| 32 NGPhysicalFragmentBase::traceAfterDispatch(visitor); |
| 33 } |
| 34 |
| 35 private: |
| 36 HeapVector<Member<const NGPhysicalFragmentBase>> children_; |
| 37 }; |
| 38 |
| 39 } // namespace blink |
| 40 |
| 41 #endif // NGPhysicalFragment_h |
OLD | NEW |