Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions yoga/algorithm/CalculateLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,8 @@ static float distributeFreeSpaceSecondPass(
float childSize = YGUndefined;

if (yoga::isDefined(flexLine.layout.totalFlexShrinkScaledFactors) &&
flexLine.layout.totalFlexShrinkScaledFactors == 0) {
yoga::inexactEquals(
flexLine.layout.totalFlexShrinkScaledFactors, 0.0f)) {
childSize = childFlexBasis + flexShrinkScaledFactor;
} else {
childSize = childFlexBasis +
Expand Down Expand Up @@ -1533,9 +1534,10 @@ static void calculateLayoutImpl(

if (!useLegacyStretchBehaviour &&
((yoga::isDefined(flexLine.layout.totalFlexGrowFactors) &&
flexLine.layout.totalFlexGrowFactors == 0) ||
yoga::inexactEquals(
flexLine.layout.totalFlexGrowFactors, 0.0f)) ||
(yoga::isDefined(node->resolveFlexGrow()) &&
node->resolveFlexGrow() == 0))) {
yoga::inexactEquals(node->resolveFlexGrow(), 0.0f)))) {
// If we don't have any children to flex or we can't flex the node
// itself, space we've used is all space we need. Root node also
// should be shrunk to minimum
Expand Down
Loading