| 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" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class NGDerivedConstraintSpace; | 14 class NGDerivedConstraintSpace; |
| 15 class NGExclusion; | 15 class NGExclusion; |
| 16 class NGFragment; | 16 class NGFragment; |
| 17 class NGLayoutOpportunityIterator; | 17 class NGLayoutOpportunityIterator; |
| 18 | 18 |
| 19 enum NGExclusionType { | 19 enum NGExclusionType { |
| 20 ClearNone = 0, | 20 NGClearNone = 0, |
| 21 ClearFloatLeft = 1, | 21 NGClearFloatLeft = 1, |
| 22 ClearFloatRight = 2, | 22 NGClearFloatRight = 2, |
| 23 ClearFragment = 4 | 23 NGClearFragment = 4 |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 enum NGFragmentationType { | 26 enum NGFragmentationType { |
| 27 FragmentNone, | 27 FragmentNone, |
| 28 FragmentPage, | 28 FragmentPage, |
| 29 FragmentColumn, | 29 FragmentColumn, |
| 30 FragmentRegion | 30 FragmentRegion |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 enum NGExclusionFlowType { | 33 enum NGExclusionFlowType { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // If specified a layout should produce a Fragment which fragments at the | 95 // If specified a layout should produce a Fragment which fragments at the |
| 96 // blockSize if possible. | 96 // blockSize if possible. |
| 97 NGFragmentationType blockFragmentationType() const | 97 NGFragmentationType blockFragmentationType() const |
| 98 { | 98 { |
| 99 return static_cast<NGFragmentationType>(m_blockFragmentationType); | 99 return static_cast<NGFragmentationType>(m_blockFragmentationType); |
| 100 } | 100 } |
| 101 | 101 |
| 102 DoublyLinkedList<const NGExclusion> exclusions(unsigned options = 0) const; | 102 DoublyLinkedList<const NGExclusion> exclusions(unsigned options = 0) const; |
| 103 | 103 |
| 104 NGLayoutOpportunityIterator layoutOpportunities( | 104 NGLayoutOpportunityIterator layoutOpportunities( |
| 105 unsigned clear = ClearNone, | 105 unsigned clear = NGClearNone, |
| 106 NGExclusionFlowType avoid = ExcludeNone) const; | 106 NGExclusionFlowType avoid = ExcludeNone) const; |
| 107 | 107 |
| 108 // Modifies constraint space to account for a placed fragment. Depending on | 108 // Modifies constraint space to account for a placed fragment. Depending on |
| 109 // the shape of the fragment this will either modify the inline or block | 109 // the shape of the fragment this will either modify the inline or block |
| 110 // size, or add an exclusion. | 110 // size, or add an exclusion. |
| 111 void subtract(const NGFragment); | 111 void subtract(const NGFragment); |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 LayoutUnit m_inlineContainerSize; | 114 LayoutUnit m_inlineContainerSize; |
| 115 LayoutUnit m_blockContainerSize; | 115 LayoutUnit m_blockContainerSize; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 LayoutUnit m_inlineOffset; | 157 LayoutUnit m_inlineOffset; |
| 158 LayoutUnit m_blockOffset; | 158 LayoutUnit m_blockOffset; |
| 159 LayoutUnit m_inlineSize; | 159 LayoutUnit m_inlineSize; |
| 160 LayoutUnit m_blockSize; | 160 LayoutUnit m_blockSize; |
| 161 NGConstraintSpace* m_original; | 161 NGConstraintSpace* m_original; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 } // namespace blink | 164 } // namespace blink |
| 165 | 165 |
| 166 #endif // NGConstraintSpace_h | 166 #endif // NGConstraintSpace_h |
| OLD | NEW |