Revert D4875343: Correct fix for flexing grandchildren

Summary: This reverts commit 634e961f9798dff43eae2c6564b28c6629b816e0

Differential Revision: D4875343

fbshipit-source-id: 2949762bf47e151c8c0ff923d501859b3e0a567a
This commit is contained in:
George Xu
2017-04-13 18:01:35 -07:00
committed by Facebook Github Bot
parent eb4af86e3c
commit 3292337754
13 changed files with 480 additions and 416 deletions

View File

@@ -203,6 +203,7 @@ static YGConfig gYGConfigDefaults = {
.experimentalFeatures =
{
[YGExperimentalFeatureRounding] = false,
[YGExperimentalFeatureMinFlexFix] = false,
[YGExperimentalFeatureWebFlexBasis] = false,
},
.useWebDefaults = false,
@@ -2202,9 +2203,9 @@ static void YGNodelayoutImpl(const YGNodeRef node,
availableInnerMainDim = minInnerMainDim;
} else if (!YGFloatIsUndefined(maxInnerMainDim) && sizeConsumedOnCurrentLine > maxInnerMainDim) {
availableInnerMainDim = maxInnerMainDim;
} else if (totalFlexGrowFactors == 0 || YGResolveFlexGrow(node) == 0) {
// 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
} else if (YGConfigIsExperimentalFeatureEnabled(node->config, YGExperimentalFeatureMinFlexFix)) {
// TODO: this needs to be moved out of experimental feature, as this is legitimate fix
// If the measurement isn't exact, we want to use as little space as possible
availableInnerMainDim = sizeConsumedOnCurrentLine;
}
}