| 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 NGConstraintSpace_h | 5 #ifndef NGConstraintSpace_h |
| 6 #define NGConstraintSpace_h | 6 #define NGConstraintSpace_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/layout/ng/ng_macros.h" | 9 #include "core/layout/ng/ng_macros.h" |
| 10 #include "core/layout/ng/ng_physical_constraint_space.h" | 10 #include "core/layout/ng/ng_physical_constraint_space.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // If specified a layout should produce a Fragment which fragments at the | 101 // If specified a layout should produce a Fragment which fragments at the |
| 102 // blockSize if possible. | 102 // blockSize if possible. |
| 103 NGFragmentationType BlockFragmentationType() const; | 103 NGFragmentationType BlockFragmentationType() const; |
| 104 | 104 |
| 105 // Modifies constraint space to account for a placed fragment. Depending on | 105 // Modifies constraint space to account for a placed fragment. Depending on |
| 106 // the shape of the fragment this will either modify the inline or block | 106 // the shape of the fragment this will either modify the inline or block |
| 107 // size, or add an exclusion. | 107 // size, or add an exclusion. |
| 108 void Subtract(const NGFragment*); | 108 void Subtract(const NGFragment*); |
| 109 | 109 |
| 110 NGLayoutOpportunityIterator* LayoutOpportunities( | 110 NGLayoutOpportunityIterator* LayoutOpportunities( |
| 111 unsigned clear = NGClearNone, | 111 unsigned clear = kNGClearNone, |
| 112 bool for_inline_or_bfc = false); | 112 bool for_inline_or_bfc = false); |
| 113 | 113 |
| 114 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(physical_space_); } | 114 DEFINE_INLINE_VIRTUAL_TRACE() { visitor->trace(physical_space_); } |
| 115 | 115 |
| 116 NGConstraintSpace* ChildSpace(const ComputedStyle* style) const; | 116 NGConstraintSpace* ChildSpace(const ComputedStyle* style) const; |
| 117 | 117 |
| 118 String ToString() const; | 118 String ToString() const; |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 Member<NGPhysicalConstraintSpace> physical_space_; | 121 Member<NGPhysicalConstraintSpace> physical_space_; |
| 122 NGLogicalOffset offset_; | 122 NGLogicalOffset offset_; |
| 123 unsigned writing_mode_ : 3; | 123 unsigned writing_mode_ : 3; |
| 124 unsigned direction_ : 1; | 124 unsigned direction_ : 1; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 inline std::ostream& operator<<(std::ostream& stream, | 127 inline std::ostream& operator<<(std::ostream& stream, |
| 128 const NGConstraintSpace& value) { | 128 const NGConstraintSpace& value) { |
| 129 return stream << value.ToString(); | 129 return stream << value.ToString(); |
| 130 } | 130 } |
| 131 | 131 |
| 132 } // namespace blink | 132 } // namespace blink |
| 133 | 133 |
| 134 #endif // NGConstraintSpace_h | 134 #endif // NGConstraintSpace_h |
| OLD | NEW |