Fix error from refactor of setMeasuredDimensionsIfEmptyOrFixedSize

Reviewed By: gkassabli

Differential Revision: D4258254

fbshipit-source-id: e22e36e67260114081e483527fc7ce378f7f0df9
This commit is contained in:
Emil Sjolander 2016-12-01 07:24:55 -08:00 committed by Facebook Github Bot
parent 81c8a3f2ea
commit 8117a029cb
2 changed files with 2659 additions and 2 deletions

2657
React/CSSLayout/CSSLayout.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1290,14 +1290,14 @@ static bool setMeasuredDimensionsIfEmptyOrFixedSize(const CSSNodeRef node,
node->layout.measuredDimensions[CSSDimensionWidth] =
boundAxis(node,
CSSFlexDirectionRow,
CSSValueIsUndefined(availableWidth) || availableWidth < 0
CSSValueIsUndefined(availableWidth) || (widthMeasureMode == CSSMeasureModeAtMost && availableWidth < 0)
? 0
: availableWidth - marginAxisRow);
node->layout.measuredDimensions[CSSDimensionHeight] =
boundAxis(node,
CSSFlexDirectionColumn,
CSSValueIsUndefined(availableHeight) || availableHeight < 0
CSSValueIsUndefined(availableHeight) || (heightMeasureMode == CSSMeasureModeAtMost && availableHeight < 0)
? 0
: availableHeight - marginAxisColumn);