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:
parent
428f76d8a2
commit
03222d66bb
|
@ -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)),
|
||||
|
|
Loading…
Reference in New Issue