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 struct NGFloatingObject; | 16 struct NGFloatingObject; |
17 | 17 |
18 class CORE_EXPORT NGPhysicalBoxFragment final : public NGPhysicalFragment { | 18 class CORE_EXPORT NGPhysicalBoxFragment final : public NGPhysicalFragment { |
19 public: | 19 public: |
20 // This modifies the passed-in children vector. | 20 // This modifies the passed-in children vector. |
21 NGPhysicalBoxFragment( | 21 NGPhysicalBoxFragment( |
22 NGPhysicalSize size, | 22 NGPhysicalSize size, |
23 NGPhysicalSize overflow, | 23 NGPhysicalSize overflow, |
24 HeapVector<Member<const NGPhysicalFragment>>& children, | 24 HeapVector<Member<const NGPhysicalFragment>>& children, |
25 HeapLinkedHashSet<WeakMember<NGBlockNode>>& out_of_flow_descendants, | 25 HeapLinkedHashSet<WeakMember<NGBlockNode>>& out_of_flow_descendants, |
26 Vector<NGStaticPosition>& out_of_flow_positions, | 26 Vector<NGStaticPosition>& out_of_flow_positions, |
27 NGMarginStrut margin_strut, | 27 NGDeprecatedMarginStrut margin_strut, |
28 HeapVector<Member<NGFloatingObject>>& unpositioned_floats, | 28 HeapVector<Member<NGFloatingObject>>& unpositioned_floats, |
29 HeapVector<Member<NGFloatingObject>>& positioned_floats, | 29 HeapVector<Member<NGFloatingObject>>& positioned_floats, |
30 NGBreakToken* break_token = nullptr); | 30 NGBreakToken* break_token = nullptr); |
31 | 31 |
32 const HeapVector<Member<const NGPhysicalFragment>>& Children() const { | 32 const HeapVector<Member<const NGPhysicalFragment>>& Children() const { |
33 return children_; | 33 return children_; |
34 } | 34 } |
35 | 35 |
36 NGMarginStrut MarginStrut() const { return margin_strut_; } | 36 NGDeprecatedMarginStrut MarginStrut() const { return margin_strut_; } |
37 | 37 |
38 DECLARE_TRACE_AFTER_DISPATCH(); | 38 DECLARE_TRACE_AFTER_DISPATCH(); |
39 | 39 |
40 private: | 40 private: |
41 HeapVector<Member<const NGPhysicalFragment>> children_; | 41 HeapVector<Member<const NGPhysicalFragment>> children_; |
42 NGMarginStrut margin_strut_; | 42 NGDeprecatedMarginStrut margin_strut_; |
43 }; | 43 }; |
44 | 44 |
45 WILL_NOT_BE_EAGERLY_TRACED_CLASS(NGPhysicalBoxFragment); | 45 WILL_NOT_BE_EAGERLY_TRACED_CLASS(NGPhysicalBoxFragment); |
46 | 46 |
47 DEFINE_TYPE_CASTS(NGPhysicalBoxFragment, | 47 DEFINE_TYPE_CASTS(NGPhysicalBoxFragment, |
48 NGPhysicalFragment, | 48 NGPhysicalFragment, |
49 fragment, | 49 fragment, |
50 fragment->Type() == NGPhysicalFragment::kFragmentBox, | 50 fragment->Type() == NGPhysicalFragment::kFragmentBox, |
51 fragment.Type() == NGPhysicalFragment::kFragmentBox); | 51 fragment.Type() == NGPhysicalFragment::kFragmentBox); |
52 | 52 |
53 } // namespace blink | 53 } // namespace blink |
54 | 54 |
55 #endif // NGPhysicalBoxFragment_h | 55 #endif // NGPhysicalBoxFragment_h |
OLD | NEW |