Fix bug introduced by D3886866

Summary: I accidentally turned the logic around when cleaning up some code. This was subtle and only caught a week later by a RN product engineer. This fixes the bug without reverting the rest of the code cleanup.

Reviewed By: lucasr

Differential Revision: D3923635

fbshipit-source-id: bfeb175bb40393be63cafb6a995b22701b87ffec
This commit is contained in:
Emil Sjolander
2016-09-27 10:07:59 -07:00
committed by Facebook Github Bot 6
parent 6b16dc4060
commit 3b1515f2b7
2 changed files with 178 additions and 2 deletions

View File

@@ -1705,7 +1705,7 @@ static void layoutNodeImpl(const CSSNodeRef node,
for (ii = startIndex; ii < childCount; ii++) {
const CSSNodeRef child = CSSNodeListGet(node->children, ii);
if (child->style.positionType == CSSPositionTypeAbsolute) {
if (child->style.positionType == CSSPositionTypeRelative) {
if (child->lineIndex != i) {
break;
}
@@ -1724,7 +1724,7 @@ static void layoutNodeImpl(const CSSNodeRef node,
for (ii = startIndex; ii < endIndex; ii++) {
const CSSNodeRef child = CSSNodeListGet(node->children, ii);
if (child->style.positionType == CSSPositionTypeAbsolute) {
if (child->style.positionType == CSSPositionTypeRelative) {
switch (getAlignItem(node, child)) {
case CSSAlignFlexStart:
child->layout.position[pos[crossAxis]] =