From e7c7678c991a15d798bf3ecfa4080a1202dd8b42 Mon Sep 17 00:00:00 2001 From: kinarobin Date: Fri, 17 Dec 2021 17:38:50 +0800 Subject: [PATCH 1/2] fix measure inner dimensions --- yoga/Yoga.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index 2c68674a..a6776014 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -2953,9 +2953,9 @@ static void YGNodelayoutImpl( } else { if (!node->getConfig()->useLegacyStretchBehaviour && ((YGFloatIsUndefined( - collectedFlexItemsValues.totalFlexGrowFactors) && + collectedFlexItemsValues.totalFlexGrowFactors) || collectedFlexItemsValues.totalFlexGrowFactors == 0) || - (YGFloatIsUndefined(node->resolveFlexGrow()) && + (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 -- 2.50.1.windows.1 From 9f859241f6669c234ba4f69f9711c121a9c6658c Mon Sep 17 00:00:00 2001 From: erjiaba Date: Sat, 8 Oct 2022 11:27:44 +0800 Subject: [PATCH 2/2] update measure --- yoga/Yoga.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index a6776014..9de067b2 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -2952,10 +2952,10 @@ static void YGNodelayoutImpl( availableInnerMainDim = maxInnerMainDim; } else { if (!node->getConfig()->useLegacyStretchBehaviour && - ((YGFloatIsUndefined( - collectedFlexItemsValues.totalFlexGrowFactors) || + ((!YGFloatIsUndefined( + collectedFlexItemsValues.totalFlexGrowFactors) && collectedFlexItemsValues.totalFlexGrowFactors == 0) || - (YGFloatIsUndefined(node->resolveFlexGrow()) || + (!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 -- 2.50.1.windows.1