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 NGPhysicalConstraintSpace_h | 5 #ifndef NGPhysicalConstraintSpace_h |
6 #define NGPhysicalConstraintSpace_h | 6 #define NGPhysicalConstraintSpace_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_units.h" | 9 #include "core/layout/ng/ng_units.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 rect.location.top.toString().ascii().data(), | 47 rect.location.top.toString().ascii().data(), |
48 rect.size.width.toString().ascii().data(), | 48 rect.size.width.toString().ascii().data(), |
49 rect.size.height.toString().ascii().data()); | 49 rect.size.height.toString().ascii().data()); |
50 } | 50 } |
51 NGPhysicalRect rect; | 51 NGPhysicalRect rect; |
52 }; | 52 }; |
53 | 53 |
54 // The NGPhysicalConstraintSpace contains the underlying data for the | 54 // The NGPhysicalConstraintSpace contains the underlying data for the |
55 // NGConstraintSpace. It is not meant to be used directly as all members are in | 55 // NGConstraintSpace. It is not meant to be used directly as all members are in |
56 // the physical coordinate space. Instead NGConstraintSpace should be used. | 56 // the physical coordinate space. Instead NGConstraintSpace should be used. |
57 class CORE_EXPORT NGPhysicalConstraintSpace final | 57 class CORE_EXPORT NGPhysicalConstraintSpace { |
cbiesinger
2016/09/26 17:17:55
Why remove the final?
| |
58 : public GarbageCollectedFinalized<NGPhysicalConstraintSpace> { | |
59 public: | 58 public: |
60 NGPhysicalConstraintSpace(); | 59 NGPhysicalConstraintSpace(); |
61 NGPhysicalConstraintSpace(NGPhysicalSize); | 60 NGPhysicalConstraintSpace(NGPhysicalSize); |
62 NGPhysicalConstraintSpace(const NGPhysicalConstraintSpace&); | 61 |
62 ~NGPhysicalConstraintSpace() = default; | |
63 | 63 |
64 NGPhysicalSize ContainerSize() const { return container_size_; } | 64 NGPhysicalSize ContainerSize() const { return container_size_; } |
65 | 65 |
66 void AddExclusion(const NGExclusion, unsigned options = 0); | 66 void AddExclusion(const NGExclusion, unsigned options = 0); |
67 const Vector<NGExclusion>& Exclusions(unsigned options = 0) const; | 67 const Vector<NGExclusion>& Exclusions(unsigned options = 0) const; |
68 | 68 |
69 DEFINE_INLINE_TRACE() {} | |
70 | |
71 private: | 69 private: |
72 friend class NGConstraintSpace; | 70 friend class NGConstraintSpace; |
73 | 71 |
74 NGPhysicalSize container_size_; | 72 NGPhysicalSize container_size_; |
75 | 73 |
76 unsigned fixed_width_ : 1; | 74 unsigned fixed_width_ : 1; |
77 unsigned fixed_height_ : 1; | 75 unsigned fixed_height_ : 1; |
78 unsigned width_direction_triggers_scrollbar_ : 1; | 76 unsigned width_direction_triggers_scrollbar_ : 1; |
79 unsigned height_direction_triggers_scrollbar_ : 1; | 77 unsigned height_direction_triggers_scrollbar_ : 1; |
80 unsigned width_direction_fragmentation_type_ : 2; | 78 unsigned width_direction_fragmentation_type_ : 2; |
81 unsigned height_direction_fragmentation_type_ : 2; | 79 unsigned height_direction_fragmentation_type_ : 2; |
82 | 80 |
83 Vector<NGExclusion> exclusions_; | 81 Vector<NGExclusion> exclusions_; |
84 }; | 82 }; |
85 | 83 |
86 } // namespace blink | 84 } // namespace blink |
87 | 85 |
88 #endif // NGPhysicalConstraintSpace_h | 86 #endif // NGPhysicalConstraintSpace_h |
OLD | NEW |