Skip to content

Commit

Permalink
Revert of [Fix dimension check for STRETCH children]
Browse files Browse the repository at this point in the history
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 facebook/yoga@909c141. 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 facebook/yoga#131

Reviewed By: @​svcscm

Differential Revision: D2476924

Pulled By: @vjeux
  • Loading branch information
vjeux authored and facebook-github-bot-7 committed Sep 24, 2015
1 parent 428f76d commit 03222d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Layout/Layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

1 comment on commit 03222d6

@mkonicek
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vjeux I just cut 0.12-stable branch and this commit just missed it. Looks like it should be cherry-picked to the release branch?

Please sign in to comment.