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