Revert D4456312: Fix for Yoga test failure for flexing with min stack dimension

Summary: This reverts commit 82a39bc93cf3bf2374b968e9f7403397e752908e

Differential Revision: D4456312

fbshipit-source-id: 6b396f0a8b67619308456599377238b75d0c1ab3
This commit is contained in:
Georgiy Kassabli
2017-02-07 05:04:41 -08:00
committed by Facebook Github Bot
parent 46817a38c3
commit b5c2b09780
6 changed files with 4 additions and 443 deletions

View File

@@ -1924,13 +1924,11 @@ static void YGNodelayoutImpl(const YGNodeRef node,
// above
float availableInnerWidth = availableWidth - marginAxisRow - paddingAndBorderAxisRow;
if (!YGFloatIsUndefined(availableInnerWidth)) {
// We want to make sure our available width does not violate min and max constraints
availableInnerWidth = fmaxf(fminf(availableInnerWidth, maxInnerWidth), minInnerWidth);
}
float availableInnerHeight = availableHeight - marginAxisColumn - paddingAndBorderAxisColumn;
if (!YGFloatIsUndefined(availableInnerHeight)) {
// We want to make sure our available height does not violate min and max constraints
availableInnerHeight = fmaxf(fminf(availableInnerHeight, maxInnerHeight), minInnerHeight);
}
@@ -2106,15 +2104,13 @@ static void YGNodelayoutImpl(const YGNodeRef node,
// If the main dimension size isn't known, it is computed based on
// the line length, so there's no more space left to distribute.
// If we don't measure with exact main dimension we want to ensure we don't violate min and max
if (measureModeMainDim != YGMeasureModeExactly) {
// We resolve main dimension to fit minimum and maximum values
if (YGFloatIsUndefined(availableInnerMainDim)) {
if (!YGFloatIsUndefined(minInnerMainDim) && sizeConsumedOnCurrentLine < minInnerMainDim) {
availableInnerMainDim = minInnerMainDim;
} else if (!YGFloatIsUndefined(maxInnerMainDim) && sizeConsumedOnCurrentLine > maxInnerMainDim) {
} else if (!YGFloatIsUndefined(maxInnerMainDim) &&
sizeConsumedOnCurrentLine > maxInnerMainDim) {
availableInnerMainDim = maxInnerMainDim;
} else {
// If the measurement isn't exact, we want to use as little space as possible
availableInnerMainDim = sizeConsumedOnCurrentLine;
}
}