Revert D4878875: [yoga][PR] Fix sizing of non strech items

Differential Revision: D4878875

fbshipit-source-id: 8927438e7a1969deb617434369af53f71f625638
This commit is contained in:
Emil Sjolander 2017-04-13 09:51:45 -07:00 committed by Facebook Github Bot
parent 6a1e0516e9
commit c3dc6a0f0e
1 changed files with 1 additions and 5 deletions

View File

@ -2189,7 +2189,6 @@ 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.
bool sizeBasedOnContent = false;
// If we don't measure with exact main dimension we want to ensure we don't violate min and max
if (measureModeMainDim != YGMeasureModeExactly) {
if (!YGFloatIsUndefined(minInnerMainDim) && sizeConsumedOnCurrentLine < minInnerMainDim) {
@ -2200,14 +2199,11 @@ static void YGNodelayoutImpl(const YGNodeRef node,
// 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 {
sizeBasedOnContent = true;
}
}
float remainingFreeSpace = 0;
if (!sizeBasedOnContent && !YGFloatIsUndefined(availableInnerMainDim)) {
if (!YGFloatIsUndefined(availableInnerMainDim)) {
remainingFreeSpace = availableInnerMainDim - sizeConsumedOnCurrentLine;
} else if (sizeConsumedOnCurrentLine < 0) {
// availableInnerMainDim is indefinite which means the node is being sized