OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 FlipForRowReverse, | 76 FlipForRowReverse, |
77 NoFlipForRowReverse, | 77 NoFlipForRowReverse, |
78 }; | 78 }; |
79 | 79 |
80 enum ChildLayoutType { | 80 enum ChildLayoutType { |
81 LayoutIfNeeded, | 81 LayoutIfNeeded, |
82 ForceLayout, | 82 ForceLayout, |
83 NeverLayout | 83 NeverLayout |
84 }; | 84 }; |
85 | 85 |
| 86 enum class TransformedWritingMode { |
| 87 TopToBottomWritingMode, RightToLeftWritingMode, LeftToRightWritingMode,
BottomToTopWritingMode |
| 88 }; |
| 89 |
86 typedef HashMap<const LayoutBox*, LayoutUnit> InflexibleFlexItemSize; | 90 typedef HashMap<const LayoutBox*, LayoutUnit> InflexibleFlexItemSize; |
87 typedef Vector<LayoutBox*> OrderedFlexItemList; | 91 typedef Vector<LayoutBox*> OrderedFlexItemList; |
88 | 92 |
89 struct LineContext; | 93 struct LineContext; |
90 struct Violation; | 94 struct Violation; |
91 | 95 |
92 // Use an inline capacity of 8, since flexbox containers usually have less t
han 8 children. | 96 // Use an inline capacity of 8, since flexbox containers usually have less t
han 8 children. |
93 typedef Vector<LayoutRect, 8> ChildFrameRects; | 97 typedef Vector<LayoutRect, 8> ChildFrameRects; |
94 | 98 |
95 bool hasOrthogonalFlow(const LayoutBox& child) const; | 99 bool hasOrthogonalFlow(const LayoutBox& child) const; |
96 bool isColumnFlow() const; | 100 bool isColumnFlow() const; |
97 bool isLeftToRightFlow() const; | 101 bool isLeftToRightFlow() const; |
98 bool isMultiline() const; | 102 bool isMultiline() const; |
99 Length flexBasisForChild(const LayoutBox& child) const; | 103 Length flexBasisForChild(const LayoutBox& child) const; |
100 LayoutUnit crossAxisExtentForChild(const LayoutBox& child) const; | 104 LayoutUnit crossAxisExtentForChild(const LayoutBox& child) const; |
101 LayoutUnit crossAxisIntrinsicExtentForChild(const LayoutBox& child) const; | 105 LayoutUnit crossAxisIntrinsicExtentForChild(const LayoutBox& child) const; |
102 LayoutUnit childIntrinsicHeight(const LayoutBox& child) const; | 106 LayoutUnit childIntrinsicHeight(const LayoutBox& child) const; |
103 LayoutUnit childIntrinsicWidth(const LayoutBox& child) const; | 107 LayoutUnit childIntrinsicWidth(const LayoutBox& child) const; |
104 LayoutUnit mainAxisExtentForChild(const LayoutBox& child) const; | 108 LayoutUnit mainAxisExtentForChild(const LayoutBox& child) const; |
105 LayoutUnit crossAxisExtent() const; | 109 LayoutUnit crossAxisExtent() const; |
106 LayoutUnit mainAxisExtent() const; | 110 LayoutUnit mainAxisExtent() const; |
107 LayoutUnit crossAxisContentExtent() const; | 111 LayoutUnit crossAxisContentExtent() const; |
108 LayoutUnit mainAxisContentExtent(LayoutUnit contentLogicalHeight); | 112 LayoutUnit mainAxisContentExtent(LayoutUnit contentLogicalHeight); |
109 LayoutUnit computeMainAxisExtentForChild(const LayoutBox& child, SizeType, c
onst Length& size); | 113 LayoutUnit computeMainAxisExtentForChild(const LayoutBox& child, SizeType, c
onst Length& size); |
110 WritingMode transformedWritingMode() const; | 114 TransformedWritingMode transformedWritingMode() const; |
111 LayoutUnit flowAwareBorderStart() const; | 115 LayoutUnit flowAwareBorderStart() const; |
112 LayoutUnit flowAwareBorderEnd() const; | 116 LayoutUnit flowAwareBorderEnd() const; |
113 LayoutUnit flowAwareBorderBefore() const; | 117 LayoutUnit flowAwareBorderBefore() const; |
114 LayoutUnit flowAwareBorderAfter() const; | 118 LayoutUnit flowAwareBorderAfter() const; |
115 LayoutUnit flowAwarePaddingStart() const; | 119 LayoutUnit flowAwarePaddingStart() const; |
116 LayoutUnit flowAwarePaddingEnd() const; | 120 LayoutUnit flowAwarePaddingEnd() const; |
117 LayoutUnit flowAwarePaddingBefore() const; | 121 LayoutUnit flowAwarePaddingBefore() const; |
118 LayoutUnit flowAwarePaddingAfter() const; | 122 LayoutUnit flowAwarePaddingAfter() const; |
119 LayoutUnit flowAwareMarginStartForChild(const LayoutBox& child) const; | 123 LayoutUnit flowAwareMarginStartForChild(const LayoutBox& child) const; |
120 LayoutUnit flowAwareMarginEndForChild(const LayoutBox& child) const; | 124 LayoutUnit flowAwareMarginEndForChild(const LayoutBox& child) const; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 180 |
177 mutable OrderIterator m_orderIterator; | 181 mutable OrderIterator m_orderIterator; |
178 int m_numberOfInFlowChildrenOnFirstLine; | 182 int m_numberOfInFlowChildrenOnFirstLine; |
179 }; | 183 }; |
180 | 184 |
181 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); | 185 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); |
182 | 186 |
183 } // namespace blink | 187 } // namespace blink |
184 | 188 |
185 #endif // LayoutFlexibleBox_h | 189 #endif // LayoutFlexibleBox_h |
OLD | NEW |