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