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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
120 LayoutUnit flowAwarePaddingEnd() const; | 120 LayoutUnit flowAwarePaddingEnd() const; |
121 LayoutUnit flowAwarePaddingBefore() const; | 121 LayoutUnit flowAwarePaddingBefore() const; |
122 LayoutUnit flowAwarePaddingAfter() const; | 122 LayoutUnit flowAwarePaddingAfter() const; |
123 LayoutUnit flowAwareMarginStartForChild(const LayoutBox& child) const; | 123 LayoutUnit flowAwareMarginStartForChild(const LayoutBox& child) const; |
124 LayoutUnit flowAwareMarginEndForChild(const LayoutBox& child) const; | 124 LayoutUnit flowAwareMarginEndForChild(const LayoutBox& child) const; |
125 LayoutUnit flowAwareMarginBeforeForChild(const LayoutBox& child) const; | 125 LayoutUnit flowAwareMarginBeforeForChild(const LayoutBox& child) const; |
126 LayoutUnit crossAxisMarginExtentForChild(const LayoutBox& child) const; | 126 LayoutUnit crossAxisMarginExtentForChild(const LayoutBox& child) const; |
127 LayoutUnit crossAxisScrollbarExtent() const; | 127 LayoutUnit crossAxisScrollbarExtent() const; |
128 LayoutUnit crossAxisScrollbarExtentForChild(const LayoutBox& child) const; | 128 LayoutUnit crossAxisScrollbarExtentForChild(const LayoutBox& child) const; |
129 LayoutPoint flowAwareLocationForChild(const LayoutBox& child) const; | 129 LayoutPoint flowAwareLocationForChild(const LayoutBox& child) const; |
130 bool useChildAspectRatio(const LayoutBox& child) const; | |
131 LayoutUnit computeMainSizeFromAspectRatioUsing(const LayoutBox& child, Lengt h crossSizeLength) const; | |
130 void setFlowAwareLocationForChild(LayoutBox& child, const LayoutPoint&); | 132 void setFlowAwareLocationForChild(LayoutBox& child, const LayoutPoint&); |
131 void adjustAlignmentForChild(LayoutBox& child, LayoutUnit); | 133 void adjustAlignmentForChild(LayoutBox& child, LayoutUnit); |
132 ItemPosition alignmentForChild(const LayoutBox& child) const; | 134 ItemPosition alignmentForChild(const LayoutBox& child) const; |
133 LayoutUnit mainAxisBorderAndPaddingExtentForChild(const LayoutBox& child) co nst; | 135 LayoutUnit mainAxisBorderAndPaddingExtentForChild(const LayoutBox& child) co nst; |
134 LayoutUnit computeInnerFlexBaseSizeForChild(LayoutBox& child, ChildLayoutTyp e = LayoutIfNeeded); | 136 LayoutUnit computeInnerFlexBaseSizeForChild(LayoutBox& child, ChildLayoutTyp e = LayoutIfNeeded); |
135 bool mainAxisLengthIsDefinite(const LayoutBox& child, const Length& flexBasi s) const; | 137 bool mainAxisLengthIsDefinite(const LayoutBox& child, const Length& flexBasi s) const; |
138 bool crossAxisLengthIsDefinite(const LayoutBox& child, const Length& flexBas is) const; | |
136 bool childFlexBaseSizeRequiresLayout(const LayoutBox& child) const; | 139 bool childFlexBaseSizeRequiresLayout(const LayoutBox& child) const; |
137 bool needToStretchChildLogicalHeight(const LayoutBox& child) const; | 140 bool needToStretchChildLogicalHeight(const LayoutBox& child) const; |
138 bool childHasIntrinsicMainAxisSize(const LayoutBox& child) const; | 141 bool childHasIntrinsicMainAxisSize(const LayoutBox& child) const; |
139 EOverflow mainAxisOverflowForChild(const LayoutBox& child) const; | 142 EOverflow mainAxisOverflowForChild(const LayoutBox& child) const; |
140 EOverflow crossAxisOverflowForChild(const LayoutBox& child) const; | 143 EOverflow crossAxisOverflowForChild(const LayoutBox& child) const; |
141 | 144 |
142 void layoutFlexItems(bool relayoutChildren, SubtreeLayoutScope&); | 145 void layoutFlexItems(bool relayoutChildren, SubtreeLayoutScope&); |
143 LayoutUnit autoMarginOffsetInMainAxis(const OrderedFlexItemList&, LayoutUnit & availableFreeSpace); | 146 LayoutUnit autoMarginOffsetInMainAxis(const OrderedFlexItemList&, LayoutUnit & availableFreeSpace); |
144 void updateAutoMarginsInMainAxis(LayoutBox& child, LayoutUnit autoMarginOffs et); | 147 void updateAutoMarginsInMainAxis(LayoutBox& child, LayoutUnit autoMarginOffs et); |
145 bool hasAutoMarginsInCrossAxis(const LayoutBox& child) const; | 148 bool hasAutoMarginsInCrossAxis(const LayoutBox& child) const; |
146 bool updateAutoMarginsInCrossAxis(LayoutBox& child, LayoutUnit availableAlig nmentSpace); | 149 bool updateAutoMarginsInCrossAxis(LayoutBox& child, LayoutUnit availableAlig nmentSpace); |
147 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&); | 150 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&); |
148 LayoutUnit clientLogicalBottomAfterRepositioning(); | 151 LayoutUnit clientLogicalBottomAfterRepositioning(); |
149 | 152 |
150 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, c onst LayoutBox& child); | 153 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, c onst LayoutBox& child); |
151 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr ossAxisExtent, const LayoutBox& child); | 154 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr ossAxisExtent, const LayoutBox& child); |
152 LayoutUnit marginBoxAscentForChild(const LayoutBox& child); | 155 LayoutUnit marginBoxAscentForChild(const LayoutBox& child); |
153 | 156 |
154 LayoutUnit computeChildMarginValue(Length margin); | 157 LayoutUnit computeChildMarginValue(Length margin); |
155 void prepareOrderIteratorAndMargins(); | 158 void prepareOrderIteratorAndMargins(); |
156 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch ildSize); | 159 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch ildSize); |
160 LayoutUnit adjustChildSizeForAspectRatioCrossAxisMinAndMax(const LayoutBox& child, LayoutUnit childSize); | |
leviw_travelin_and_unemployed
2016/01/28 00:37:59
Whoa... That's a mouthful.
cbiesinger
2016/01/28 00:42:48
Couldn't come up with a better name :/
| |
157 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties | 161 // The hypothetical main size of an item is the flex base size clamped accor ding to its min and max main size properties |
158 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWei ghtedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren); | 162 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s umFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWei ghtedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren); |
159 | 163 |
160 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit availableFreeSpace, LayoutUnit& remainingFreeSpace, double& totalFlexGrow, doub le& totalFlexShrink, double& totalWeightedFlexShrink, InflexibleFlexItemSize&, V ector<LayoutUnit, 16>& childSizes); | 164 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit availableFreeSpace, LayoutUnit& remainingFreeSpace, double& totalFlexGrow, doub le& totalFlexShrink, double& totalWeightedFlexShrink, InflexibleFlexItemSize&, V ector<LayoutUnit, 16>& childSizes); |
161 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShr ink, InflexibleFlexItemSize&); | 165 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa ce, double& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShr ink, InflexibleFlexItemSize&); |
162 | 166 |
163 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child); | 167 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child); |
164 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe rredSize); | 168 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe rredSize); |
165 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); | 169 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); |
166 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; | 170 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; |
(...skipping 12 matching lines...) Expand all Loading... | |
179 | 183 |
180 mutable OrderIterator m_orderIterator; | 184 mutable OrderIterator m_orderIterator; |
181 int m_numberOfInFlowChildrenOnFirstLine; | 185 int m_numberOfInFlowChildrenOnFirstLine; |
182 }; | 186 }; |
183 | 187 |
184 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); | 188 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); |
185 | 189 |
186 } // namespace blink | 190 } // namespace blink |
187 | 191 |
188 #endif // LayoutFlexibleBox_h | 192 #endif // LayoutFlexibleBox_h |
OLD | NEW |