| 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 "core/layout/ng/ng_constraint_space.h" | 10 #include "core/layout/ng/ng_constraint_space.h" |
| 11 #include "core/layout/ng/ng_physical_fragment.h" |
| 11 #include "core/layout/ng/ng_units.h" | 12 #include "core/layout/ng/ng_units.h" |
| 12 #include "core/layout/ng/ng_writing_mode.h" | 13 #include "core/layout/ng/ng_writing_mode.h" |
| 13 #include "platform/LayoutUnit.h" | 14 #include "platform/LayoutUnit.h" |
| 14 #include "platform/heap/Handle.h" | 15 #include "platform/heap/Handle.h" |
| 15 #include "wtf/Vector.h" | 16 #include "wtf/Vector.h" |
| 16 | 17 |
| 17 namespace blink { | 18 namespace blink { |
| 18 | 19 |
| 19 class CORE_EXPORT NGFragment final : public NGFragmentBase { | 20 class CORE_EXPORT NGFragment final : public NGFragmentBase { |
| 20 public: | 21 public: |
| 21 // This modified the passed-in children vector. | 22 NGFragment(NGWritingMode writing_mode, |
| 22 NGFragment(NGLogicalSize size, | |
| 23 NGLogicalSize overflow, | |
| 24 NGWritingMode writingMode, | |
| 25 NGDirection direction, | 23 NGDirection direction, |
| 26 HeapVector<Member<const NGFragmentBase>>& children) | 24 NGPhysicalFragment* physical_fragment) |
| 27 : NGFragmentBase(size, overflow, writingMode, direction, FragmentBox) { | 25 : NGFragmentBase(writing_mode, direction, physical_fragment) {} |
| 28 children_.swap(children); | |
| 29 } | |
| 30 | |
| 31 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { | |
| 32 visitor->trace(children_); | |
| 33 NGFragmentBase::traceAfterDispatch(visitor); | |
| 34 } | |
| 35 | |
| 36 private: | |
| 37 HeapVector<Member<const NGFragmentBase>> children_; | |
| 38 }; | 26 }; |
| 39 | 27 |
| 40 } // namespace blink | 28 } // namespace blink |
| 41 | 29 |
| 42 #endif // NGFragment_h | 30 #endif // NGFragment_h |
| OLD | NEW |