| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // Use an inline capacity of 8, since flexbox containers usually have less t
han 8 children. | 84 // Use an inline capacity of 8, since flexbox containers usually have less t
han 8 children. |
| 85 typedef Vector<LayoutRect, 8> ChildFrameRects; | 85 typedef Vector<LayoutRect, 8> ChildFrameRects; |
| 86 | 86 |
| 87 bool hasOrthogonalFlow(RenderBox* child) const; | 87 bool hasOrthogonalFlow(RenderBox* child) const; |
| 88 bool isColumnFlow() const; | 88 bool isColumnFlow() const; |
| 89 bool isLeftToRightFlow() const; | 89 bool isLeftToRightFlow() const; |
| 90 bool isMultiline() const; | 90 bool isMultiline() const; |
| 91 Length flexBasisForChild(RenderBox* child) const; | 91 Length flexBasisForChild(RenderBox* child) const; |
| 92 void setCrossAxisExtent(LayoutUnit); | 92 void setCrossAxisExtent(LayoutUnit); |
| 93 LayoutUnit crossAxisExtentForChild(RenderBox* child) const; | 93 LayoutUnit crossAxisExtentForChild(RenderBox* child) const; |
| 94 LayoutUnit crossAxisIntrinsicExtentForChild(RenderBox* child) const; |
| 95 LayoutUnit childIntrinsicHeight(RenderBox* child) const; |
| 96 LayoutUnit childIntrinsicWidth(RenderBox* child) const; |
| 94 LayoutUnit mainAxisExtentForChild(RenderBox* child) const; | 97 LayoutUnit mainAxisExtentForChild(RenderBox* child) const; |
| 95 LayoutUnit crossAxisExtent() const; | 98 LayoutUnit crossAxisExtent() const; |
| 96 LayoutUnit mainAxisExtent() const; | 99 LayoutUnit mainAxisExtent() const; |
| 97 LayoutUnit crossAxisContentExtent() const; | 100 LayoutUnit crossAxisContentExtent() const; |
| 98 LayoutUnit mainAxisContentExtent(LayoutUnit contentLogicalHeight); | 101 LayoutUnit mainAxisContentExtent(LayoutUnit contentLogicalHeight); |
| 99 LayoutUnit computeMainAxisExtentForChild(RenderBox* child, SizeType, const L
ength& size); | 102 LayoutUnit computeMainAxisExtentForChild(RenderBox* child, SizeType, const L
ength& size); |
| 100 WritingMode transformedWritingMode() const; | 103 WritingMode transformedWritingMode() const; |
| 101 LayoutUnit flowAwareBorderStart() const; | 104 LayoutUnit flowAwareBorderStart() const; |
| 102 LayoutUnit flowAwareBorderEnd() const; | 105 LayoutUnit flowAwareBorderEnd() const; |
| 103 LayoutUnit flowAwareBorderBefore() const; | 106 LayoutUnit flowAwareBorderBefore() const; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 114 LayoutUnit crossAxisScrollbarExtent() const; | 117 LayoutUnit crossAxisScrollbarExtent() const; |
| 115 LayoutPoint flowAwareLocationForChild(RenderBox* child) const; | 118 LayoutPoint flowAwareLocationForChild(RenderBox* child) const; |
| 116 // FIXME: Supporting layout deltas. | 119 // FIXME: Supporting layout deltas. |
| 117 void setFlowAwareLocationForChild(RenderBox* child, const LayoutPoint&); | 120 void setFlowAwareLocationForChild(RenderBox* child, const LayoutPoint&); |
| 118 void adjustAlignmentForChild(RenderBox* child, LayoutUnit); | 121 void adjustAlignmentForChild(RenderBox* child, LayoutUnit); |
| 119 ItemPosition alignmentForChild(RenderBox* child) const; | 122 ItemPosition alignmentForChild(RenderBox* child) const; |
| 120 LayoutUnit mainAxisBorderAndPaddingExtentForChild(RenderBox* child) const; | 123 LayoutUnit mainAxisBorderAndPaddingExtentForChild(RenderBox* child) const; |
| 121 LayoutUnit mainAxisScrollbarExtentForChild(RenderBox* child) const; | 124 LayoutUnit mainAxisScrollbarExtentForChild(RenderBox* child) const; |
| 122 LayoutUnit preferredMainAxisContentExtentForChild(RenderBox* child, bool has
InfiniteLineLength, bool relayoutChildren = false); | 125 LayoutUnit preferredMainAxisContentExtentForChild(RenderBox* child, bool has
InfiniteLineLength, bool relayoutChildren = false); |
| 123 bool childPreferredMainAxisContentExtentRequiresLayout(RenderBox* child, boo
l hasInfiniteLineLength) const; | 126 bool childPreferredMainAxisContentExtentRequiresLayout(RenderBox* child, boo
l hasInfiniteLineLength) const; |
| 127 bool needToStretchChildLogicalHeight(RenderBox* child) const; |
| 124 | 128 |
| 125 void layoutFlexItems(bool relayoutChildren); | 129 void layoutFlexItems(bool relayoutChildren); |
| 126 LayoutUnit autoMarginOffsetInMainAxis(const OrderedFlexItemList&, LayoutUnit
& availableFreeSpace); | 130 LayoutUnit autoMarginOffsetInMainAxis(const OrderedFlexItemList&, LayoutUnit
& availableFreeSpace); |
| 127 void updateAutoMarginsInMainAxis(RenderBox* child, LayoutUnit autoMarginOffs
et); | 131 void updateAutoMarginsInMainAxis(RenderBox* child, LayoutUnit autoMarginOffs
et); |
| 128 bool hasAutoMarginsInCrossAxis(RenderBox* child) const; | 132 bool hasAutoMarginsInCrossAxis(RenderBox* child) const; |
| 129 bool updateAutoMarginsInCrossAxis(RenderBox* child, LayoutUnit availableAlig
nmentSpace); | 133 bool updateAutoMarginsInCrossAxis(RenderBox* child, LayoutUnit availableAlig
nmentSpace); |
| 130 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&); | 134 void repositionLogicalHeightDependentFlexItems(Vector<LineContext>&); |
| 131 LayoutUnit clientLogicalBottomAfterRepositioning(); | 135 LayoutUnit clientLogicalBottomAfterRepositioning(); |
| 132 void appendChildFrameRects(ChildFrameRects&); | 136 void appendChildFrameRects(ChildFrameRects&); |
| 133 void repaintChildrenDuringLayoutIfMoved(const ChildFrameRects&); | 137 void repaintChildrenDuringLayoutIfMoved(const ChildFrameRects&); |
| 134 | 138 |
| 135 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, R
enderBox*); | 139 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, R
enderBox*); |
| 140 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr
ossAxisExtent, RenderBox*); |
| 136 LayoutUnit marginBoxAscentForChild(RenderBox*); | 141 LayoutUnit marginBoxAscentForChild(RenderBox*); |
| 137 | 142 |
| 138 LayoutUnit computeChildMarginValue(Length margin); | 143 LayoutUnit computeChildMarginValue(Length margin); |
| 139 void prepareOrderIteratorAndMargins(); | 144 void prepareOrderIteratorAndMargins(); |
| 140 LayoutUnit adjustChildSizeForMinAndMax(RenderBox*, LayoutUnit childSize); | 145 LayoutUnit adjustChildSizeForMinAndMax(RenderBox*, LayoutUnit childSize); |
| 141 // The hypothetical main size of an item is the flex base size clamped accor
ding to its min and max main size properties | 146 // The hypothetical main size of an item is the flex base size clamped accor
ding to its min and max main size properties |
| 142 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s
umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn
it& sumHypotheticalMainSize, bool& hasInfiniteLineLength, bool relayoutChildren)
; | 147 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s
umFlexBaseSize, double& totalFlexGrow, double& totalWeightedFlexShrink, LayoutUn
it& sumHypotheticalMainSize, bool& hasInfiniteLineLength, bool relayoutChildren)
; |
| 143 | 148 |
| 144 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit
& availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In
flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes, bool hasInfiniteLineL
ength); | 149 bool resolveFlexibleLengths(FlexSign, const OrderedFlexItemList&, LayoutUnit
& availableFreeSpace, double& totalFlexGrow, double& totalWeightedFlexShrink, In
flexibleFlexItemSize&, Vector<LayoutUnit, 16>& childSizes, bool hasInfiniteLineL
ength); |
| 145 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa
ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi
ze&, bool hasInfiniteLineLength); | 150 void freezeViolations(const Vector<Violation>&, LayoutUnit& availableFreeSpa
ce, double& totalFlexGrow, double& totalWeightedFlexShrink, InflexibleFlexItemSi
ze&, bool hasInfiniteLineLength); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 161 | 166 |
| 162 mutable OrderIterator m_orderIterator; | 167 mutable OrderIterator m_orderIterator; |
| 163 int m_numberOfInFlowChildrenOnFirstLine; | 168 int m_numberOfInFlowChildrenOnFirstLine; |
| 164 }; | 169 }; |
| 165 | 170 |
| 166 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox()); | 171 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox()); |
| 167 | 172 |
| 168 } // namespace WebCore | 173 } // namespace WebCore |
| 169 | 174 |
| 170 #endif // RenderFlexibleBox_h | 175 #endif // RenderFlexibleBox_h |
| OLD | NEW |