Revert of [Fix dimension check for STRETCH children]

Summary: We had a layout issue in Ads Manager after updating to the latest version of css-layout on react-native. I bisected the change to 909c14117f. It changes the condition and breaks the behavior that we had. This change was not covered by a unit test so I added one.

Closes https://github.com/facebook/css-layout/pull/131

Reviewed By: @​svcscm

Differential Revision: D2476924

Pulled By: @vjeux
This commit is contained in:
Christopher Chedeau 2015-09-24 13:58:10 -07:00 committed by facebook-github-bot-7
parent 428f76d8a2
commit 03222d66bb
1 changed files with 1 additions and 1 deletions

View File

@ -1004,7 +1004,7 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth, css_direction
if (alignItem == CSS_ALIGN_STRETCH) { if (alignItem == CSS_ALIGN_STRETCH) {
// You can only stretch if the dimension has not already been set // You can only stretch if the dimension has not already been set
// previously. // previously.
if (isUndefined(child->layout.dimensions[dim[crossAxis]])) { if (!isDimDefined(child, crossAxis)) {
child->layout.dimensions[dim[crossAxis]] = fmaxf( child->layout.dimensions[dim[crossAxis]] = fmaxf(
boundAxis(child, crossAxis, containerCrossAxis - boundAxis(child, crossAxis, containerCrossAxis -
paddingAndBorderAxisCross - getMarginAxis(child, crossAxis)), paddingAndBorderAxisCross - getMarginAxis(child, crossAxis)),