| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 LayoutUnit clientLogicalBottomAfterRepositioning(); | 148 LayoutUnit clientLogicalBottomAfterRepositioning(); |
| 149 | 149 |
| 150 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, c
onst LayoutBox& child); | 150 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, c
onst LayoutBox& child); |
| 151 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr
ossAxisExtent, const LayoutBox& child); | 151 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr
ossAxisExtent, const LayoutBox& child); |
| 152 LayoutUnit marginBoxAscentForChild(const LayoutBox& child); | 152 LayoutUnit marginBoxAscentForChild(const LayoutBox& child); |
| 153 | 153 |
| 154 LayoutUnit computeChildMarginValue(Length margin); | 154 LayoutUnit computeChildMarginValue(Length margin); |
| 155 void prepareOrderIteratorAndMargins(); | 155 void prepareOrderIteratorAndMargins(); |
| 156 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch
ildSize); | 156 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch
ildSize); |
| 157 // The hypothetical main size of an item is the flex base size clamped accor
ding to its min and max main size properties | 157 // 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& totalWeightedFlexShrink, LayoutUn
it& sumHypotheticalMainSize, bool relayoutChildren); | 158 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s
umFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWei
ghtedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren); |
| 159 | 159 |
| 160 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit
& availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In
flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes); | 160 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& totalWeightedFlexShrink, InflexibleFlexItemSi
ze&); | 161 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa
ce, double& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShr
ink, InflexibleFlexItemSize&); |
| 162 | 162 |
| 163 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child); | 163 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child); |
| 164 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe
rredSize); | 164 void setOverrideMainAxisSizeForChild(LayoutBox& child, LayoutUnit childPrefe
rredSize); |
| 165 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf
fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); | 165 void prepareChildForPositionedLayout(LayoutBox& child, LayoutUnit mainAxisOf
fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); |
| 166 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; | 166 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; |
| 167 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt
emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace
, bool relayoutChildren, SubtreeLayoutScope&, Vector<LineContext>&); | 167 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt
emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace
, bool relayoutChildren, SubtreeLayoutScope&, Vector<LineContext>&); |
| 168 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff
set, LayoutUnit availableFreeSpace); | 168 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff
set, LayoutUnit availableFreeSpace); |
| 169 void alignFlexLines(Vector<LineContext>&); | 169 void alignFlexLines(Vector<LineContext>&); |
| 170 void alignChildren(const Vector<LineContext>&); | 170 void alignChildren(const Vector<LineContext>&); |
| 171 void applyStretchAlignmentToChild(LayoutBox& child, LayoutUnit lineCrossAxis
Extent); | 171 void applyStretchAlignmentToChild(LayoutBox& child, LayoutUnit lineCrossAxis
Extent); |
| 172 void flipForRightToLeftColumn(); | 172 void flipForRightToLeftColumn(); |
| 173 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar
tEdge); | 173 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar
tEdge); |
| 174 | 174 |
| 175 float countIntrinsicSizeForAlgorithmChange(LayoutUnit maxPreferredWidth, Lay
outBox* child, float previousMaxContentFlexFraction) const; | 175 float countIntrinsicSizeForAlgorithmChange(LayoutUnit maxPreferredWidth, Lay
outBox* child, float previousMaxContentFlexFraction) const; |
| 176 | 176 |
| 177 // This is used to cache the preferred size for orthogonal flow children so
we don't have to relayout to get it | 177 // This is used to cache the preferred size for orthogonal flow children so
we don't have to relayout to get it |
| 178 HashMap<const LayoutObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis; | 178 HashMap<const LayoutObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis; |
| 179 | 179 |
| 180 mutable OrderIterator m_orderIterator; | 180 mutable OrderIterator m_orderIterator; |
| 181 int m_numberOfInFlowChildrenOnFirstLine; | 181 int m_numberOfInFlowChildrenOnFirstLine; |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); | 184 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); |
| 185 | 185 |
| 186 } // namespace blink | 186 } // namespace blink |
| 187 | 187 |
| 188 #endif // LayoutFlexibleBox_h | 188 #endif // LayoutFlexibleBox_h |
| OLD | NEW |