Skip to content

Commit

Permalink
Fix for failing screenshot tests
Browse files Browse the repository at this point in the history
Reviewed By: emilsjolander

Differential Revision: D6726745

fbshipit-source-id: 99f91aabe2337b23953724545f97695238f2124e
  • Loading branch information
priteshrnandgaonkar authored and facebook-github-bot committed Jan 16, 2018
1 parent fc6dd78 commit ee5c91c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ReactCommon/yoga/yoga/Yoga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit ee5c91c

Please sign in to comment.