From 288adc49c924dc59844090da974bf34a9aafb84e Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Tue, 16 Jan 2018 08:57:11 -0800 Subject: [PATCH] Fix for failing screenshot tests Summary: Fixes failing screenshot tests Reviewed By: emilsjolander Differential Revision: D6726745 fbshipit-source-id: 99f91aabe2337b23953724545f97695238f2124e --- yoga/Yoga.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index f357eeaf..c5413af2 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -1553,9 +1553,6 @@ static void YGNodeComputeFlexBasisForChildren( child->setDirty(false); continue; } - if (child->getStyle().positionType == YGPositionTypeAbsolute) { - continue; - } if (performLayout) { // Set the initial position (relative to the parent). const YGDirection childDirection = child->resolveDirection(direction); @@ -1568,6 +1565,10 @@ static void YGNodeComputeFlexBasisForChildren( child->setPosition( childDirection, mainDim, crossDim, availableInnerWidth); } + + if (child->getStyle().positionType == YGPositionTypeAbsolute) { + continue; + } if (child == singleFlexChild) { child->setLayoutComputedFlexBasisGeneration(gCurrentGenerationCount); child->setLayoutComputedFlexBasis(0);