From 195c166efed00cdfab42a564d52b9ec4bc7125a3 Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Fri, 31 May 2019 15:52:40 -0700 Subject: [PATCH] Back out "[Yoga] Remove comparison to `YGUndefined` *and* `0.0f`" Summary: Original commit changeset: 13c8f24e1bc8 Reviewed By: fabiomassimo Differential Revision: D15583502 fbshipit-source-id: efc6175f6c4925a383fea723195c073f49e2eff1 --- yoga/Yoga.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index da24a549..d41a1201 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -2861,8 +2861,11 @@ static void YGNodelayoutImpl( availableInnerMainDim = maxInnerMainDim; } else { if (!node->getConfig()->useLegacyStretchBehaviour && - (collectedFlexItemsValues.totalFlexGrowFactors == 0 || - node->resolveFlexGrow() == 0)) { + ((YGFloatIsUndefined( + collectedFlexItemsValues.totalFlexGrowFactors) && + collectedFlexItemsValues.totalFlexGrowFactors == 0) || + (YGFloatIsUndefined(node->resolveFlexGrow()) && + node->resolveFlexGrow() == 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. Root node also // should be shrunk to minimum