| 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 "platform/LayoutUnit.h" | 9 #include "platform/LayoutUnit.h" |
| 10 #include "wtf/DoublyLinkedList.h" | 10 #include "wtf/DoublyLinkedList.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 enum NGExclusionFlowType { | 35 enum NGExclusionFlowType { |
| 36 ExcludeNone, | 36 ExcludeNone, |
| 37 ExcludeInlineFlow, | 37 ExcludeInlineFlow, |
| 38 ExcludeInlineStart, | 38 ExcludeInlineStart, |
| 39 ExcludeInlineEnd, | 39 ExcludeInlineEnd, |
| 40 ExcludeInlineBoth | 40 ExcludeInlineBoth |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 enum NGWritingMode { |
| 44 HorizontalTopBottom = 0, |
| 45 VerticalRightLeft = 1, |
| 46 VerticalLeftRight = 2, |
| 47 SidewaysRightLeft = 3, |
| 48 SidewaysLeftRight = 4 |
| 49 }; |
| 50 |
| 51 enum NGDirection { LeftToRight = 0, RightToLeft = 1 }; |
| 52 |
| 43 class NGExclusion { | 53 class NGExclusion { |
| 44 public: | 54 public: |
| 45 NGExclusion(); | 55 NGExclusion(); |
| 46 ~NGExclusion() {} | 56 ~NGExclusion() {} |
| 47 }; | 57 }; |
| 48 | 58 |
| 49 class CORE_EXPORT NGConstraintSpace { | 59 class CORE_EXPORT NGConstraintSpace { |
| 50 public: | 60 public: |
| 51 NGConstraintSpace(LayoutUnit inlineContainerSize, | 61 NGConstraintSpace(LayoutUnit inlineContainerSize, |
| 52 LayoutUnit blockContainerSize); | 62 LayoutUnit blockContainerSize); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 ~NGLayoutOpportunityIterator() {} | 133 ~NGLayoutOpportunityIterator() {} |
| 124 | 134 |
| 125 const NGDerivedConstraintSpace* next(); | 135 const NGDerivedConstraintSpace* next(); |
| 126 | 136 |
| 127 private: | 137 private: |
| 128 const NGConstraintSpace* m_constraintSpace; | 138 const NGConstraintSpace* m_constraintSpace; |
| 129 unsigned m_clear; | 139 unsigned m_clear; |
| 130 NGExclusionFlowType m_avoid; | 140 NGExclusionFlowType m_avoid; |
| 131 }; | 141 }; |
| 132 | 142 |
| 133 class CORE_EXPORT NGDerivedConstraintSpace final : NGConstraintSpace { | |
| 134 public: | |
| 135 ~NGDerivedConstraintSpace(); | |
| 136 | |
| 137 LayoutUnit inlineOffset() const; | |
| 138 LayoutUnit blockOffset() const; | |
| 139 LayoutUnit inlineSize() const; | |
| 140 LayoutUnit blockSize() const; | |
| 141 | |
| 142 private: | |
| 143 NGDerivedConstraintSpace(); | |
| 144 | |
| 145 LayoutUnit m_inlineOffset; | |
| 146 LayoutUnit m_blockOffset; | |
| 147 LayoutUnit m_inlineSize; | |
| 148 LayoutUnit m_blockSize; | |
| 149 NGConstraintSpace* m_original; | |
| 150 }; | |
| 151 | |
| 152 } // namespace blink | 143 } // namespace blink |
| 153 | 144 |
| 154 #endif // NGConstraintSpace_h | 145 #endif // NGConstraintSpace_h |
| OLD | NEW |