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 NGPhysicalBoxFragment_h | 5 #ifndef NGPhysicalBoxFragment_h |
6 #define NGPhysicalBoxFragment_h | 6 #define NGPhysicalBoxFragment_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_physical_fragment.h" | 9 #include "core/layout/ng/ng_physical_fragment.h" |
10 #include "core/layout/ng/ng_units.h" | 10 #include "core/layout/ng/ng_units.h" |
11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class NGBlockNode; | 15 class NGBlockNode; |
16 | 16 |
17 class CORE_EXPORT NGPhysicalBoxFragment final : public NGPhysicalFragment { | 17 class CORE_EXPORT NGPhysicalBoxFragment final : public NGPhysicalFragment { |
18 public: | 18 public: |
19 // This modifies the passed-in children vector. | 19 // This modifies the passed-in children vector. |
20 NGPhysicalBoxFragment( | 20 NGPhysicalBoxFragment( |
21 NGPhysicalSize size, | 21 NGPhysicalSize size, |
22 NGPhysicalSize overflow, | 22 NGPhysicalSize overflow, |
23 HeapVector<Member<const NGPhysicalFragment>>& children, | 23 HeapVector<Member<const NGPhysicalFragment>>& children, |
24 HeapLinkedHashSet<WeakMember<NGBlockNode>>& out_of_flow_descendants, | 24 HeapLinkedHashSet<WeakMember<NGBlockNode>>& out_of_flow_descendants, |
25 Vector<NGStaticPosition>& out_of_flow_positions, | 25 Vector<NGStaticPosition>& out_of_flow_positions, |
26 NGMarginStrut margin_strut); | 26 NGMarginStrut margin_strut, |
| 27 NGBreakToken* break_token = nullptr); |
27 | 28 |
28 const HeapVector<Member<const NGPhysicalFragment>>& Children() const { | 29 const HeapVector<Member<const NGPhysicalFragment>>& Children() const { |
29 return children_; | 30 return children_; |
30 } | 31 } |
31 | 32 |
32 NGMarginStrut MarginStrut() const { return margin_strut_; } | 33 NGMarginStrut MarginStrut() const { return margin_strut_; } |
33 | 34 |
34 DECLARE_TRACE_AFTER_DISPATCH(); | 35 DECLARE_TRACE_AFTER_DISPATCH(); |
35 | 36 |
36 private: | 37 private: |
37 HeapVector<Member<const NGPhysicalFragment>> children_; | 38 HeapVector<Member<const NGPhysicalFragment>> children_; |
38 NGMarginStrut margin_strut_; | 39 NGMarginStrut margin_strut_; |
39 }; | 40 }; |
40 | 41 |
41 WILL_NOT_BE_EAGERLY_TRACED_CLASS(NGPhysicalBoxFragment); | 42 WILL_NOT_BE_EAGERLY_TRACED_CLASS(NGPhysicalBoxFragment); |
42 | 43 |
43 DEFINE_TYPE_CASTS(NGPhysicalBoxFragment, | 44 DEFINE_TYPE_CASTS(NGPhysicalBoxFragment, |
44 NGPhysicalFragment, | 45 NGPhysicalFragment, |
45 fragment, | 46 fragment, |
46 fragment->Type() == NGPhysicalFragment::kFragmentBox, | 47 fragment->Type() == NGPhysicalFragment::kFragmentBox, |
47 fragment.Type() == NGPhysicalFragment::kFragmentBox); | 48 fragment.Type() == NGPhysicalFragment::kFragmentBox); |
48 | 49 |
49 } // namespace blink | 50 } // namespace blink |
50 | 51 |
51 #endif // NGPhysicalBoxFragment_h | 52 #endif // NGPhysicalBoxFragment_h |
OLD | NEW |