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 NGConstraintSpace; | |
14 class NGDerivedConstraintSpace; | 15 class NGDerivedConstraintSpace; |
15 class NGExclusion; | 16 class NGExclusion; |
16 class NGFragment; | 17 class NGFragment; |
17 class NGLayoutOpportunityIterator; | 18 class NGLayoutOpportunityIterator; |
19 class LayoutBox; | |
18 | 20 |
19 enum NGExclusionType { | 21 enum NGExclusionType { |
20 NGClearNone = 0, | 22 NGClearNone = 0, |
21 NGClearFloatLeft = 1, | 23 NGClearFloatLeft = 1, |
22 NGClearFloatRight = 2, | 24 NGClearFloatRight = 2, |
23 NGClearFragment = 4 | 25 NGClearFragment = 4 |
24 }; | 26 }; |
25 | 27 |
26 enum NGFragmentationType { | 28 enum NGFragmentationType { |
27 FragmentNone, | 29 FragmentNone, |
(...skipping 15 matching lines...) Expand all Loading... | |
43 NGExclusion(); | 45 NGExclusion(); |
44 ~NGExclusion() { } | 46 ~NGExclusion() { } |
45 }; | 47 }; |
46 | 48 |
47 class CORE_EXPORT NGConstraintSpace { | 49 class CORE_EXPORT NGConstraintSpace { |
48 public: | 50 public: |
49 NGConstraintSpace(LayoutUnit inlineContainerSize, | 51 NGConstraintSpace(LayoutUnit inlineContainerSize, |
50 LayoutUnit blockContainerSize); | 52 LayoutUnit blockContainerSize); |
51 ~NGConstraintSpace() { } | 53 ~NGConstraintSpace() { } |
52 | 54 |
55 // Constructs Layout NG constraint space from legacy layout object. | |
cbiesinger
2016/08/09 19:26:58
Can you clarify in the comment that you have to pa
| |
56 static NGConstraintSpace fromLayoutObject(const LayoutBox&); | |
eae
2016/08/09 19:20:22
Eventually we probably want this (and similar meth
| |
57 | |
53 void addExclusion(const NGExclusion, unsigned options = 0); | 58 void addExclusion(const NGExclusion, unsigned options = 0); |
54 void setOverflowTriggersScrollbar(bool inlineTriggers, | 59 void setOverflowTriggersScrollbar(bool inlineTriggers, |
55 bool blockTriggers); | 60 bool blockTriggers); |
56 void setFixedSize(bool inlineFixed, bool blockFixed); | 61 void setFixedSize(bool inlineFixed, bool blockFixed); |
57 void setFragmentationType(NGFragmentationType); | 62 void setFragmentationType(NGFragmentationType); |
58 | 63 |
59 // Size of the container in each direction. Used for the following | 64 // Size of the container in each direction. Used for the following |
60 // three cases: | 65 // three cases: |
61 // 1) Percentage resolution. | 66 // 1) Percentage resolution. |
62 // 2) Resolving absolute positions of children. | 67 // 2) Resolving absolute positions of children. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 LayoutUnit m_inlineOffset; | 162 LayoutUnit m_inlineOffset; |
158 LayoutUnit m_blockOffset; | 163 LayoutUnit m_blockOffset; |
159 LayoutUnit m_inlineSize; | 164 LayoutUnit m_inlineSize; |
160 LayoutUnit m_blockSize; | 165 LayoutUnit m_blockSize; |
161 NGConstraintSpace* m_original; | 166 NGConstraintSpace* m_original; |
162 }; | 167 }; |
163 | 168 |
164 } // namespace blink | 169 } // namespace blink |
165 | 170 |
166 #endif // NGConstraintSpace_h | 171 #endif // NGConstraintSpace_h |
OLD | NEW |