diff --git a/lib/yoga/src/main/cpp/yoga/Yoga.c b/lib/yoga/src/main/cpp/yoga/Yoga.c index fb21966c195..12ec5c5cd00 100644 --- a/lib/yoga/src/main/cpp/yoga/Yoga.c +++ b/lib/yoga/src/main/cpp/yoga/Yoga.c @@ -1659,13 +1659,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 = diff --git a/litho-testing/src/main/java/com/facebook/litho/testing/TestSizeDependentComponent.java b/litho-testing/src/main/java/com/facebook/litho/testing/TestSizeDependentComponent.java index 3c843ee37bd..fd0a3be676d 100644 --- a/litho-testing/src/main/java/com/facebook/litho/testing/TestSizeDependentComponent.java +++ b/litho-testing/src/main/java/com/facebook/litho/testing/TestSizeDependentComponent.java @@ -40,10 +40,10 @@ protected ComponentLayout onCreateLayoutWithSizeSpec( final ComponentLayout.Builder builder1 = TestDrawableComponent.create(c, false, true, true, false, false) - .withLayout().flexShrink(0) + .withLayout() .backgroundColor(0xFFFF0000); final ComponentLayout.Builder builder2 = TestViewComponent.create(c, false, true, true, false) - .withLayout().flexShrink(0) + .withLayout() .marginPx(YogaEdge.ALL, 3); if (state.hasFixedSizes) { @@ -58,12 +58,10 @@ protected ComponentLayout onCreateLayoutWithSizeSpec( return builder1.build(); } - return Column.create(c).flexShrink(0).alignContent(YogaAlign.FLEX_START) + return Column.create(c) .paddingPx(YogaEdge.ALL, 5) - .child( - builder1) - .child( - builder2) + .child(builder1) + .child(builder2) .build(); }