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); | |
153 void prepareChildForPositionedLayout(RenderBox& child, LayoutUnit mainAxisOf
fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); | 152 void prepareChildForPositionedLayout(RenderBox& child, LayoutUnit mainAxisOf
fset, LayoutUnit crossAxisOffset, PositionedLayoutMode); |
154 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; | 153 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; |
155 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt
emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace
, bool relayoutChildren, Vector<LineContext>&, bool hasInfiniteLineLength); | 154 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt
emList&, const Vector<LayoutUnit, 16>& childSizes, LayoutUnit availableFreeSpace
, bool relayoutChildren, Vector<LineContext>&, bool hasInfiniteLineLength); |
156 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff
set, LayoutUnit availableFreeSpace); | 155 void layoutColumnReverse(const OrderedFlexItemList&, LayoutUnit crossAxisOff
set, LayoutUnit availableFreeSpace); |
157 void alignFlexLines(Vector<LineContext>&); | 156 void alignFlexLines(Vector<LineContext>&); |
158 void alignChildren(const Vector<LineContext>&); | 157 void alignChildren(const Vector<LineContext>&); |
159 void applyStretchAlignmentToChild(RenderBox& child, LayoutUnit lineCrossAxis
Extent); | 158 void applyStretchAlignmentToChild(RenderBox& child, LayoutUnit lineCrossAxis
Extent); |
160 void flipForRightToLeftColumn(); | 159 void flipForRightToLeftColumn(); |
161 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar
tEdge); | 160 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar
tEdge); |
162 | 161 |
163 // This is used to cache the preferred size for orthogonal flow children so
we don't have to relayout to get it | 162 // This is used to cache the preferred size for orthogonal flow children so
we don't have to relayout to get it |
164 HashMap<const RenderObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis; | 163 HashMap<const RenderObject*, LayoutUnit> m_intrinsicSizeAlongMainAxis; |
165 | 164 |
166 mutable OrderIterator m_orderIterator; | 165 mutable OrderIterator m_orderIterator; |
167 int m_numberOfInFlowChildrenOnFirstLine; | 166 int m_numberOfInFlowChildrenOnFirstLine; |
168 }; | 167 }; |
169 | 168 |
170 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox()); | 169 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox()); |
171 | 170 |
172 } // namespace blink | 171 } // namespace blink |
173 | 172 |
174 #endif // RenderFlexibleBox_h | 173 #endif // RenderFlexibleBox_h |
OLD | NEW |