From 03222d66bb1ce90d0150557290a1c93cea1d3171 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Thu, 24 Sep 2015 13:58:10 -0700 Subject: [PATCH] Revert of [Fix dimension check for STRETCH children] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 https://github.com/facebook/css-layout/commit/909c14117f118c9b36e6623590e62bff2f996c1b. 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 --- React/Layout/Layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Layout/Layout.c b/React/Layout/Layout.c index 2763b8daa..c3c73d628 100644 --- a/React/Layout/Layout.c +++ b/React/Layout/Layout.c @@ -1004,7 +1004,7 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth, css_direction if (alignItem == CSS_ALIGN_STRETCH) { // You can only stretch if the dimension has not already been set // previously. - if (isUndefined(child->layout.dimensions[dim[crossAxis]])) { + if (!isDimDefined(child, crossAxis)) { child->layout.dimensions[dim[crossAxis]] = fmaxf( boundAxis(child, crossAxis, containerCrossAxis - paddingAndBorderAxisCross - getMarginAxis(child, crossAxis)),