From b87de4d4642df19495c38058a158154a9b985540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20W=C3=B6hrl?= Date: Thu, 13 Apr 2017 08:39:40 -0700 Subject: [PATCH] Let measure behave more like on the web Summary: Nodes with a measure function needs to be measured even so it seems there is no available space. So it behaves more like on the web. Fix facebook/yoga#488 Closes https://github.com/facebook/yoga/pull/499 Differential Revision: D4850458 Pulled By: emilsjolander fbshipit-source-id: be5e35a670ddcbf3cd426fc3c2a0c9b60a874cdc --- ReactCommon/yoga/yoga/Yoga.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ReactCommon/yoga/yoga/Yoga.c b/ReactCommon/yoga/yoga/Yoga.c index f0f406e34fb4f0..e8155ebe82f9cb 100644 --- a/ReactCommon/yoga/yoga/Yoga.c +++ b/ReactCommon/yoga/yoga/Yoga.c @@ -1654,13 +1654,6 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(const YGNodeRef node, node, YGFlexDirectionRow, availableWidth - marginAxisRow, parentWidth, parentWidth); node->layout.measuredDimensions[YGDimensionHeight] = YGNodeBoundAxis( node, YGFlexDirectionColumn, availableHeight - marginAxisColumn, parentHeight, parentWidth); - } else if (innerWidth <= 0.0f || innerHeight <= 0.0f) { - // Don't bother sizing the text if there's no horizontal or vertical - // space. - node->layout.measuredDimensions[YGDimensionWidth] = - YGNodeBoundAxis(node, YGFlexDirectionRow, 0.0f, availableWidth, availableWidth); - node->layout.measuredDimensions[YGDimensionHeight] = - YGNodeBoundAxis(node, YGFlexDirectionColumn, 0.0f, availableHeight, availableWidth); } else { // Measure the text under the current constraints. const YGSize measuredSize =