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/geometry/ng_logical_offset.h" | 9 #include "core/layout/ng/geometry/ng_logical_offset.h" |
10 #include "core/layout/ng/geometry/ng_margin_strut.h" | 10 #include "core/layout/ng/geometry/ng_margin_strut.h" |
11 #include "core/layout/ng/ng_physical_fragment.h" | 11 #include "core/layout/ng/ng_physical_fragment.h" |
12 #include "core/layout/ng/ng_positioned_float.h" | 12 #include "core/layout/ng/ng_positioned_float.h" |
13 #include "platform/wtf/Optional.h" | 13 #include "platform/wtf/Optional.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
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(LayoutObject* layout_object, | 20 NGPhysicalBoxFragment(LayoutObject* layout_object, |
21 NGPhysicalSize size, | 21 NGPhysicalSize size, |
22 NGPhysicalSize overflow, | 22 NGPhysicalSize overflow, |
23 Vector<RefPtr<NGPhysicalFragment>>& children, | 23 Vector<RefPtr<NGPhysicalFragment>>& children, |
24 Vector<NGPositionedFloat>& positioned_floats, | 24 Vector<NGPositionedFloat>& positioned_floats, |
25 const WTF::Optional<NGLogicalOffset>& bfc_offset, | 25 const WTF::Optional<NGLogicalOffset>& bfc_offset, |
26 const NGMarginStrut& end_margin_strut, | 26 const NGMarginStrut& end_margin_strut, |
27 NGBorderEdges::Physical, | 27 unsigned, // NGBorderEdges::Physical |
28 RefPtr<NGBreakToken> break_token = nullptr); | 28 RefPtr<NGBreakToken> break_token = nullptr); |
29 | 29 |
30 // Returns the total size, including the contents outside of the border-box. | 30 // Returns the total size, including the contents outside of the border-box. |
31 NGPhysicalSize OverflowSize() const { return overflow_; } | 31 NGPhysicalSize OverflowSize() const { return overflow_; } |
32 | 32 |
33 const Vector<RefPtr<NGPhysicalFragment>>& Children() const { | 33 const Vector<RefPtr<NGPhysicalFragment>>& Children() const { |
34 return children_; | 34 return children_; |
35 } | 35 } |
36 | 36 |
37 // List of positioned floats that need to be copied to the old layout tree. | 37 // List of positioned floats that need to be copied to the old layout tree. |
(...skipping 19 matching lines...) Expand all Loading... |
57 | 57 |
58 DEFINE_TYPE_CASTS(NGPhysicalBoxFragment, | 58 DEFINE_TYPE_CASTS(NGPhysicalBoxFragment, |
59 NGPhysicalFragment, | 59 NGPhysicalFragment, |
60 fragment, | 60 fragment, |
61 fragment->Type() == NGPhysicalFragment::kFragmentBox, | 61 fragment->Type() == NGPhysicalFragment::kFragmentBox, |
62 fragment.Type() == NGPhysicalFragment::kFragmentBox); | 62 fragment.Type() == NGPhysicalFragment::kFragmentBox); |
63 | 63 |
64 } // namespace blink | 64 } // namespace blink |
65 | 65 |
66 #endif // NGPhysicalBoxFragment_h | 66 #endif // NGPhysicalBoxFragment_h |
OLD | NEW |