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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void prepareOrderIteratorAndMargins(); | 140 void prepareOrderIteratorAndMargins(); |
141 LayoutUnit adjustChildSizeForMinAndMax(RenderBox*, LayoutUnit childSize); | 141 LayoutUnit adjustChildSizeForMinAndMax(RenderBox*, LayoutUnit childSize); |
142 // The hypothetical main size of an item is the flex base size clamped accor
ding to its min and max main size properties | 142 // The hypothetical main size of an item is the flex base size clamped accor
ding to its min and max main size properties |
143 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s
umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn
it& sumHypotheticalMainSize, bool& hasInfiniteLineLength, bool relayoutChildren)
; | 143 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s
umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn
it& sumHypotheticalMainSize, bool& hasInfiniteLineLength, bool relayoutChildren)
; |
144 | 144 |
145 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit
& availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In
flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes, bool hasInfiniteLineL
ength); | 145 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit
& availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In
flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes, bool hasInfiniteLineL
ength); |
146 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa
ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi
ze&, bool hasInfiniteLineLength); | 146 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa
ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi
ze&, bool hasInfiniteLineLength); |
147 | 147 |
148 void resetAutoMarginsAndLogicalTopInCrossAxis(RenderBox*); | 148 void resetAutoMarginsAndLogicalTopInCrossAxis(RenderBox*); |
149 void setLogicalOverrideSize(RenderBox* child, LayoutUnit childPreferredSize)
; | 149 void setLogicalOverrideSize(RenderBox* child, LayoutUnit childPreferredSize)
; |
| 150 void clearLogicalOverrideSize(RenderBox* child); |
150 void prepareChildForPositionedLayout(RenderBox* child, LayoutUnit mainAxisOf
fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); | 151 void prepareChildForPositionedLayout(RenderBox* child, LayoutUnit mainAxisOf
fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); |
151 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; | 152 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; |
152 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt
emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace
, bool relayoutChildren, Vector<LineContext>&, bool hasInfiniteLineLength); | 153 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt
emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace
, bool relayoutChildren, Vector<LineContext>&, bool hasInfiniteLineLength); |
153 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff
set, LayoutUnit availableFreeSpace); | 154 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff
set, LayoutUnit availableFreeSpace); |
154 void alignFlexLines(Vector<LineContext>&); | 155 void alignFlexLines(Vector<LineContext>&); |
155 void alignChildren(const Vector<LineContext>&); | 156 void alignChildren(const Vector<LineContext>&); |
156 void applyStretchAlignmentToChild(RenderBox*, LayoutUnit lineCrossAxisExtent
); | 157 void applyStretchAlignmentToChild(RenderBox*, LayoutUnit lineCrossAxisExtent
); |
157 void flipForRightToLeftColumn(); | 158 void flipForRightToLeftColumn(); |
158 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar
tEdge); | 159 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar
tEdge); |
159 | 160 |
160 // This is used to cache the preferred size for orthogonal flow children so
we don't have to relayout to get it | 161 // This is used to cache the preferred size for orthogonal flow children so
we don't have to relayout to get it |
161 HashMap<const RenderObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis; | 162 HashMap<const RenderObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis; |
162 | 163 |
163 mutable OrderIterator m_orderIterator; | 164 mutable OrderIterator m_orderIterator; |
164 int m_numberOfInFlowChildrenOnFirstLine; | 165 int m_numberOfInFlowChildrenOnFirstLine; |
165 }; | 166 }; |
166 | 167 |
167 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox()); | 168 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox()); |
168 | 169 |
169 } // namespace blink | 170 } // namespace blink |
170 | 171 |
171 #endif // RenderFlexibleBox_h | 172 #endif // RenderFlexibleBox_h |
OLD | NEW |