|
Lines 780-786
void RenderFlexibleBox::computeMainAxisPreferredSizes(bool relayoutChildren, Ord
a/Source/WebCore/rendering/RenderFlexibleBox.cpp_sec1
|
| 780 |
Length childMainAxisMin = isHorizontalFlow() ? child->style()->minWidth() : child->style()->minHeight(); |
780 |
Length childMainAxisMin = isHorizontalFlow() ? child->style()->minWidth() : child->style()->minHeight(); |
| 781 |
if (hasOrthogonalFlow(child) && (flexBasisForChild(child).isAuto() || childMainAxisMin.isAuto())) { |
781 |
if (hasOrthogonalFlow(child) && (flexBasisForChild(child).isAuto() || childMainAxisMin.isAuto())) { |
| 782 |
if (!relayoutChildren) |
782 |
if (!relayoutChildren) |
| 783 |
child->setChildNeedsLayout(true); |
783 |
child->setChildNeedsLayout(true, MarkOnlyThis); |
| 784 |
child->layoutIfNeeded(); |
784 |
child->layoutIfNeeded(); |
| 785 |
} |
785 |
} |
| 786 |
|
786 |
|
|
Lines 1019-1025
void RenderFlexibleBox::layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, cons
a/Source/WebCore/rendering/RenderFlexibleBox.cpp_sec2
|
| 1019 |
LayoutUnit childPreferredSize = childSizes[i] + mainAxisBorderAndPaddingExtentForChild(child); |
1019 |
LayoutUnit childPreferredSize = childSizes[i] + mainAxisBorderAndPaddingExtentForChild(child); |
| 1020 |
setLogicalOverrideSize(child, childPreferredSize); |
1020 |
setLogicalOverrideSize(child, childPreferredSize); |
| 1021 |
// FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905. |
1021 |
// FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905. |
| 1022 |
child->setChildNeedsLayout(true); |
1022 |
child->setChildNeedsLayout(true, MarkOnlyThis); |
| 1023 |
child->layoutIfNeeded(); |
1023 |
child->layoutIfNeeded(); |
| 1024 |
|
1024 |
|
| 1025 |
updateAutoMarginsInMainAxis(child, autoMarginOffset); |
1025 |
updateAutoMarginsInMainAxis(child, autoMarginOffset); |
|
Lines 1243-1256
void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox* child, LayoutUni
a/Source/WebCore/rendering/RenderFlexibleBox.cpp_sec3
|
| 1243 |
if (child->logicalHeight() != logicalHeightBefore) { |
1243 |
if (child->logicalHeight() != logicalHeightBefore) { |
| 1244 |
child->setOverrideLogicalContentHeight(child->logicalHeight() - child->borderAndPaddingLogicalHeight()); |
1244 |
child->setOverrideLogicalContentHeight(child->logicalHeight() - child->borderAndPaddingLogicalHeight()); |
| 1245 |
child->setLogicalHeight(0); |
1245 |
child->setLogicalHeight(0); |
| 1246 |
child->setChildNeedsLayout(true); |
1246 |
child->setChildNeedsLayout(true, MarkOnlyThis); |
| 1247 |
child->layoutIfNeeded(); |
1247 |
child->layoutIfNeeded(); |
| 1248 |
} |
1248 |
} |
| 1249 |
} else if (isColumnFlow() && child->style()->logicalWidth().isAuto() && isMultiline()) { |
1249 |
} else if (isColumnFlow() && child->style()->logicalWidth().isAuto() && isMultiline()) { |
| 1250 |
// FIXME: Handle min-width and max-width. |
1250 |
// FIXME: Handle min-width and max-width. |
| 1251 |
LayoutUnit childWidth = lineCrossAxisExtent - crossAxisMarginExtentForChild(child); |
1251 |
LayoutUnit childWidth = lineCrossAxisExtent - crossAxisMarginExtentForChild(child); |
| 1252 |
child->setOverrideLogicalContentWidth(std::max(ZERO_LAYOUT_UNIT, childWidth)); |
1252 |
child->setOverrideLogicalContentWidth(std::max(ZERO_LAYOUT_UNIT, childWidth)); |
| 1253 |
child->setChildNeedsLayout(true); |
1253 |
child->setChildNeedsLayout(true, MarkOnlyThis); |
| 1254 |
child->layoutIfNeeded(); |
1254 |
child->layoutIfNeeded(); |
| 1255 |
} |
1255 |
} |
| 1256 |
} |
1256 |
} |