Correct fix for flexing grandchildren
Reviewed By: emilsjolander Differential Revision: D4875343 fbshipit-source-id: 634e961f9798dff43eae2c6564b28c6629b816e0
This commit is contained in:
parent
a82de9509f
commit
831ad4adc6
|
@ -93,8 +93,6 @@ const char *YGExperimentalFeatureToString(const YGExperimentalFeature value){
|
|||
return "rounding";
|
||||
case YGExperimentalFeatureWebFlexBasis:
|
||||
return "web-flex-basis";
|
||||
case YGExperimentalFeatureMinFlexFix:
|
||||
return "min-flex-fix";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
|
|
@ -66,7 +66,6 @@ WIN_EXPORT const char *YGEdgeToString(const YGEdge value);
|
|||
typedef YG_ENUM_BEGIN(YGExperimentalFeature) {
|
||||
YGExperimentalFeatureRounding,
|
||||
YGExperimentalFeatureWebFlexBasis,
|
||||
YGExperimentalFeatureMinFlexFix,
|
||||
} YG_ENUM_END(YGExperimentalFeature);
|
||||
WIN_EXPORT const char *YGExperimentalFeatureToString(const YGExperimentalFeature value);
|
||||
|
||||
|
|
|
@ -203,7 +203,6 @@ static YGConfig gYGConfigDefaults = {
|
|||
.experimentalFeatures =
|
||||
{
|
||||
[YGExperimentalFeatureRounding] = false,
|
||||
[YGExperimentalFeatureMinFlexFix] = false,
|
||||
[YGExperimentalFeatureWebFlexBasis] = false,
|
||||
},
|
||||
.useWebDefaults = false,
|
||||
|
@ -2204,9 +2203,9 @@ static void YGNodelayoutImpl(const YGNodeRef node,
|
|||
availableInnerMainDim = minInnerMainDim;
|
||||
} else if (!YGFloatIsUndefined(maxInnerMainDim) && sizeConsumedOnCurrentLine > maxInnerMainDim) {
|
||||
availableInnerMainDim = maxInnerMainDim;
|
||||
} 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
|
||||
} 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
|
||||
availableInnerMainDim = sizeConsumedOnCurrentLine;
|
||||
sizeBasedOnContent = true;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue