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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; | 52 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo
sitionMode = PositionOnContainingLine) const override; |
53 int firstLineBoxBaseline() const override; | 53 int firstLineBoxBaseline() const override; |
54 int inlineBlockBaseline(LineDirectionMode) const override; | 54 int inlineBlockBaseline(LineDirectionMode) const override; |
55 IntSize originAdjustmentForScrollbars() const override; | 55 IntSize originAdjustmentForScrollbars() const override; |
56 bool hasTopOverflow() const override; | 56 bool hasTopOverflow() const override; |
57 bool hasLeftOverflow() const override; | 57 bool hasLeftOverflow() const override; |
58 | 58 |
59 void paintChildren(const PaintInfo&, const LayoutPoint&) const final; | 59 void paintChildren(const PaintInfo&, const LayoutPoint&) const final; |
60 | 60 |
61 bool isHorizontalFlow() const; | 61 bool isHorizontalFlow() const; |
| 62 virtual LayoutObject* layoutSpecialExcludedChild(bool relayoutChildren, Subt
reeLayoutScope&) {return nullptr;}; |
62 | 63 |
63 const OrderIterator& orderIterator() const { return m_orderIterator; } | 64 const OrderIterator& orderIterator() const { return m_orderIterator; } |
64 | 65 |
65 LayoutUnit crossSizeForPercentageResolution(const LayoutBox& child); | 66 LayoutUnit crossSizeForPercentageResolution(const LayoutBox& child); |
66 LayoutUnit mainSizeForPercentageResolution(const LayoutBox& child); | 67 LayoutUnit mainSizeForPercentageResolution(const LayoutBox& child); |
67 LayoutUnit childLogicalHeightForPercentageResolution(const LayoutBox& child)
; | 68 LayoutUnit childLogicalHeightForPercentageResolution(const LayoutBox& child)
; |
68 | 69 |
69 void clearCachedMainSizeForChild(const LayoutBox& child); | 70 void clearCachedMainSizeForChild(const LayoutBox& child); |
70 | 71 |
71 LayoutUnit staticMainAxisPositionForPositionedChild(const LayoutBox& child); | 72 LayoutUnit staticMainAxisPositionForPositionedChild(const LayoutBox& child); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, c
onst LayoutBox& child); | 169 LayoutUnit availableAlignmentSpaceForChild(LayoutUnit lineCrossAxisExtent, c
onst LayoutBox& child); |
169 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr
ossAxisExtent, const LayoutBox& child); | 170 LayoutUnit availableAlignmentSpaceForChildBeforeStretching(LayoutUnit lineCr
ossAxisExtent, const LayoutBox& child); |
170 LayoutUnit marginBoxAscentForChild(const LayoutBox& child); | 171 LayoutUnit marginBoxAscentForChild(const LayoutBox& child); |
171 | 172 |
172 LayoutUnit computeChildMarginValue(Length margin); | 173 LayoutUnit computeChildMarginValue(Length margin); |
173 void prepareOrderIteratorAndMargins(); | 174 void prepareOrderIteratorAndMargins(); |
174 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch
ildSize); | 175 LayoutUnit adjustChildSizeForMinAndMax(const LayoutBox& child, LayoutUnit ch
ildSize); |
175 LayoutUnit adjustChildSizeForAspectRatioCrossAxisMinAndMax(const LayoutBox&
child, LayoutUnit childSize); | 176 LayoutUnit adjustChildSizeForAspectRatioCrossAxisMinAndMax(const LayoutBox&
child, LayoutUnit childSize); |
176 FlexItem constructFlexItem(LayoutBox& child, ChildLayoutType); | 177 FlexItem constructFlexItem(LayoutBox& child, ChildLayoutType); |
177 // The hypothetical main size of an item is the flex base size clamped accor
ding to its min and max main size properties | 178 // The hypothetical main size of an item is the flex base size clamped accor
ding to its min and max main size properties |
178 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s
umFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWei
ghtedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren); | 179 bool computeNextFlexLine(OrderedFlexItemList& orderedChildren, LayoutUnit& s
umFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWei
ghtedFlexShrink, LayoutUnit& sumHypotheticalMainSize, bool relayoutChildren, Lay
outObject* childToExclude); |
179 | 180 |
180 void freezeInflexibleItems(FlexSign, OrderedFlexItemList& children, LayoutUn
it& remainingFreeSpace, double& totalFlexGrow, double& totalFlexShrink, double&
totalWeightedFlexShrink); | 181 void freezeInflexibleItems(FlexSign, OrderedFlexItemList& children, LayoutUn
it& remainingFreeSpace, double& totalFlexGrow, double& totalFlexShrink, double&
totalWeightedFlexShrink); |
181 bool resolveFlexibleLengths(FlexSign, OrderedFlexItemList&, LayoutUnit initi
alFreeSpace, LayoutUnit& remainingFreeSpace, double& totalFlexGrow, double& tota
lFlexShrink, double& totalWeightedFlexShrink); | 182 bool resolveFlexibleLengths(FlexSign, OrderedFlexItemList&, LayoutUnit initi
alFreeSpace, LayoutUnit& remainingFreeSpace, double& totalFlexGrow, double& tota
lFlexShrink, double& totalWeightedFlexShrink); |
182 void freezeViolations(Vector<FlexItem*>&, LayoutUnit& availableFreeSpace, do
uble& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShrink); | 183 void freezeViolations(Vector<FlexItem*>&, LayoutUnit& availableFreeSpace, do
uble& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShrink); |
183 | 184 |
184 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child); | 185 void resetAutoMarginsAndLogicalTopInCrossAxis(LayoutBox& child); |
185 void setOverrideMainAxisContentSizeForChild(LayoutBox& child, LayoutUnit chi
ldPreferredSize); | 186 void setOverrideMainAxisContentSizeForChild(LayoutBox& child, LayoutUnit chi
ldPreferredSize); |
186 void prepareChildForPositionedLayout(LayoutBox& child); | 187 void prepareChildForPositionedLayout(LayoutBox& child); |
187 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; | 188 size_t numberOfInFlowPositionedChildren(const OrderedFlexItemList&) const; |
188 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt
emList&, LayoutUnit availableFreeSpace, bool relayoutChildren, SubtreeLayoutScop
e&, Vector<LineContext>&); | 189 void layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, const OrderedFlexIt
emList&, LayoutUnit availableFreeSpace, bool relayoutChildren, SubtreeLayoutScop
e&, Vector<LineContext>&); |
(...skipping 19 matching lines...) Expand all Loading... |
208 | 209 |
209 // This is SizeIsUnknown outside of layoutBlock() | 210 // This is SizeIsUnknown outside of layoutBlock() |
210 mutable SizeDefiniteness m_hasDefiniteHeight; | 211 mutable SizeDefiniteness m_hasDefiniteHeight; |
211 }; | 212 }; |
212 | 213 |
213 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); | 214 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutFlexibleBox, isFlexibleBox()); |
214 | 215 |
215 } // namespace blink | 216 } // namespace blink |
216 | 217 |
217 #endif // LayoutFlexibleBox_h | 218 #endif // LayoutFlexibleBox_h |
OLD | NEW |