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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 LayoutUnit staticInlinePositionForPositionedChild(const LayoutBox& child); | 74 LayoutUnit staticInlinePositionForPositionedChild(const LayoutBox& child); |
75 LayoutUnit staticBlockPositionForPositionedChild(const LayoutBox& child); | 75 LayoutUnit staticBlockPositionForPositionedChild(const LayoutBox& child); |
76 | 76 |
77 // Returns true if the position changed. In that case, the child will have t
o be | 77 // Returns true if the position changed. In that case, the child will have t
o be |
78 // laid out again. | 78 // laid out again. |
79 bool setStaticPositionForPositionedLayout(LayoutBox& child); | 79 bool setStaticPositionForPositionedLayout(LayoutBox& child); |
80 protected: | 80 protected: |
81 void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit&
maxLogicalWidth) const override; | 81 void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit&
maxLogicalWidth) const override; |
82 | 82 |
83 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override
; | |
84 void removeChild(LayoutObject*) override; | 83 void removeChild(LayoutObject*) override; |
85 | 84 |
86 private: | 85 private: |
87 enum FlexSign { | 86 enum FlexSign { |
88 PositiveFlexibility, | 87 PositiveFlexibility, |
89 NegativeFlexibility, | 88 NegativeFlexibility, |
90 }; | 89 }; |
91 | 90 |
92 enum ChildLayoutType { | 91 enum ChildLayoutType { |
93 LayoutIfNeeded, | 92 LayoutIfNeeded, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 LayoutUnit flowAwareMarginStartForChild(const LayoutBox& child) const; | 134 LayoutUnit flowAwareMarginStartForChild(const LayoutBox& child) const; |
136 LayoutUnit flowAwareMarginEndForChild(const LayoutBox& child) const; | 135 LayoutUnit flowAwareMarginEndForChild(const LayoutBox& child) const; |
137 LayoutUnit flowAwareMarginBeforeForChild(const LayoutBox& child) const; | 136 LayoutUnit flowAwareMarginBeforeForChild(const LayoutBox& child) const; |
138 LayoutUnit crossAxisMarginExtentForChild(const LayoutBox& child) const; | 137 LayoutUnit crossAxisMarginExtentForChild(const LayoutBox& child) const; |
139 LayoutUnit crossAxisScrollbarExtent() const; | 138 LayoutUnit crossAxisScrollbarExtent() const; |
140 LayoutUnit crossAxisScrollbarExtentForChild(const LayoutBox& child) const; | 139 LayoutUnit crossAxisScrollbarExtentForChild(const LayoutBox& child) const; |
141 LayoutPoint flowAwareLocationForChild(const LayoutBox& child) const; | 140 LayoutPoint flowAwareLocationForChild(const LayoutBox& child) const; |
142 bool useChildAspectRatio(const LayoutBox& child) const; | 141 bool useChildAspectRatio(const LayoutBox& child) const; |
143 LayoutUnit computeMainSizeFromAspectRatioUsing(const LayoutBox& child, Lengt
h crossSizeLength) const; | 142 LayoutUnit computeMainSizeFromAspectRatioUsing(const LayoutBox& child, Lengt
h crossSizeLength) const; |
144 void setFlowAwareLocationForChild(LayoutBox& child, const LayoutPoint&); | 143 void setFlowAwareLocationForChild(LayoutBox& child, const LayoutPoint&); |
| 144 ItemPosition alignmentForChild(const LayoutBox& child) const; |
145 void adjustAlignmentForChild(LayoutBox& child, LayoutUnit); | 145 void adjustAlignmentForChild(LayoutBox& child, LayoutUnit); |
146 ItemPosition alignmentForChild(const LayoutBox& child) const; | |
147 LayoutUnit mainAxisBorderAndPaddingExtentForChild(const LayoutBox& child) co
nst; | 146 LayoutUnit mainAxisBorderAndPaddingExtentForChild(const LayoutBox& child) co
nst; |
148 LayoutUnit computeInnerFlexBaseSizeForChild(LayoutBox& child, ChildLayoutTyp
e = LayoutIfNeeded); | 147 LayoutUnit computeInnerFlexBaseSizeForChild(LayoutBox& child, ChildLayoutTyp
e = LayoutIfNeeded); |
149 bool mainAxisLengthIsDefinite(const LayoutBox& child, const Length& flexBasi
s) const; | 148 bool mainAxisLengthIsDefinite(const LayoutBox& child, const Length& flexBasi
s) const; |
150 bool crossAxisLengthIsDefinite(const LayoutBox& child, const Length& flexBas
is) const; | 149 bool crossAxisLengthIsDefinite(const LayoutBox& child, const Length& flexBas
is) const; |
151 bool childFlexBaseSizeRequiresLayout(const LayoutBox& child) const; | 150 bool childFlexBaseSizeRequiresLayout(const LayoutBox& child) const; |
152 bool needToStretchChildLogicalHeight(const LayoutBox& child) const; | 151 bool needToStretchChildLogicalHeight(const LayoutBox& child) const; |
153 bool childHasIntrinsicMainAxisSize(const LayoutBox& child) const; | 152 bool childHasIntrinsicMainAxisSize(const LayoutBox& child) const; |
154 EOverflow mainAxisOverflowForChild(const LayoutBox& child) const; | 153 EOverflow mainAxisOverflowForChild(const LayoutBox& child) const; |
155 EOverflow crossAxisOverflowForChild(const LayoutBox& child) const; | 154 EOverflow crossAxisOverflowForChild(const LayoutBox& child) const; |
156 void cacheChildMainSize(const LayoutBox& child); | 155 void cacheChildMainSize(const LayoutBox& child); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 200 |
202 mutable OrderIterator m_orderIterator; | 201 mutable OrderIterator m_orderIterator; |
203 int m_numberOfInFlowChildrenOnFirstLine; | 202 int m_numberOfInFlowChildrenOnFirstLine; |
204 }; | 203 }; |
205 | 204 |
206 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); | 205 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); |
207 | 206 |
208 } // namespace blink | 207 } // namespace blink |
209 | 208 |
210 #endif // LayoutFlexibleBox_h | 209 #endif // LayoutFlexibleBox_h |
OLD | NEW |