|
Lines 1419-1425
bool RenderFlexibleBox::hasDefiniteCrossSizeForFlexItem(const RenderBox& flexIte
a/Source/WebCore/rendering/RenderFlexibleBox.cpp_sec1
|
| 1419 |
return true; |
1419 |
return true; |
| 1420 |
// This must be kept in sync with computeMainSizeFromAspectRatioUsing(). |
1420 |
// This must be kept in sync with computeMainSizeFromAspectRatioUsing(). |
| 1421 |
auto& crossSize = isHorizontalFlow() ? style().height() : style().width(); |
1421 |
auto& crossSize = isHorizontalFlow() ? style().height() : style().width(); |
| 1422 |
return crossSize.isFixed() || (crossSize.isPercent() && availableLogicalHeightForPercentageComputation()); |
1422 |
if (crossSize.isFixed()) |
|
|
1423 |
return true; |
| 1424 |
if (crossSize.isPercent() && availableLogicalHeightForPercentageComputation()) |
| 1425 |
return true; |
| 1426 |
if (hasFullyConstrainedLogicalHeight()) |
| 1427 |
return true; |
| 1423 |
} |
1428 |
} |
| 1424 |
return false; |
1429 |
return false; |
| 1425 |
} |
1430 |
} |
|
Lines 2331-2342
LayoutUnit RenderFlexibleBox::innerCrossSizeForFlexItem(const RenderBox& flexIte
a/Source/WebCore/rendering/RenderFlexibleBox.cpp_sec2
|
| 2331 |
auto flexContainerInnerCrossSize = [&] { |
2336 |
auto flexContainerInnerCrossSize = [&] { |
| 2332 |
auto isHorizontal = isHorizontalFlow(); |
2337 |
auto isHorizontal = isHorizontalFlow(); |
| 2333 |
auto size = isHorizontal ? style().height() : style().width(); |
2338 |
auto size = isHorizontal ? style().height() : style().width(); |
| 2334 |
ASSERT(size.isFixed() || (size.isPercent() && availableLogicalHeightForPercentageComputation())); |
|
|
| 2335 |
auto innerCrossSize = LayoutUnit { }; |
2339 |
auto innerCrossSize = LayoutUnit { }; |
| 2336 |
if (auto fixedSize = size.tryFixed()) |
2340 |
if (auto fixedSize = size.tryFixed()) |
| 2337 |
innerCrossSize = adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit { fixedSize->resolveZoom(style().usedZoomForLength()) }); |
2341 |
innerCrossSize = adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit { fixedSize->resolveZoom(style().usedZoomForLength()) }); |
| 2338 |
else if (size.isPercent()) |
2342 |
else if (size.isPercent()) |
| 2339 |
innerCrossSize = availableLogicalHeightForPercentageComputation().value_or(0_lu); |
2343 |
innerCrossSize = availableLogicalHeightForPercentageComputation().value_or(0_lu); |
|
|
2344 |
else if (hasFullyConstrainedLogicalHeight()) |
| 2345 |
innerCrossSize = std::max(0_lu, computeLogicalHeight(logicalHeight(), 0_lu).extent - borderAndPaddingLogicalHeight() - scrollbarLogicalHeight()); |
| 2346 |
else |
| 2347 |
ASSERT_NOT_REACHED(); |
| 2340 |
|
2348 |
|
| 2341 |
auto maximumSize = isHorizontal ? style().maxHeight() : style().maxWidth(); |
2349 |
auto maximumSize = isHorizontal ? style().maxHeight() : style().maxWidth(); |
| 2342 |
if (auto fixedMaximumSize = maximumSize.tryFixed()) |
2350 |
if (auto fixedMaximumSize = maximumSize.tryFixed()) |