Fix row height

Reviewed By: @frantic

Differential Revision: D2480265
This commit is contained in:
Christopher Chedeau 2015-09-25 11:13:42 -07:00 committed by facebook-github-bot-7
parent 1487ebfe01
commit ec8b5425e5
2 changed files with 96 additions and 96 deletions

View File

@ -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)),

View File

@ -7,7 +7,7 @@
*/
// NOTE: this file is auto-copied from https://github.com/facebook/css-layout
// @generated SignedSource<<e7c34406ea5072e4584a2b054ab56d9f>>
// @generated SignedSource<<4cabe0d63a4ed878edf6b5be8762746a>>
package com.facebook.csslayout;
@ -699,7 +699,7 @@ public class LayoutEngine {
if (alignItem == CSSAlign.STRETCH) {
// You can only stretch if the dimension has not already been set
// previously.
if (Float.isNaN(child.layout.dimensions[dim[crossAxis]])) {
if (!(!Float.isNaN(child.style.dimensions[dim[crossAxis]]) && child.style.dimensions[dim[crossAxis]] > 0.0)) {
child.layout.dimensions[dim[crossAxis]] = Math.max(
boundAxis(child, crossAxis, containerCrossAxis -
paddingAndBorderAxisCross - (child.style.margin.getWithFallback(leadingSpacing[crossAxis], leading[crossAxis]) + child.style.margin.getWithFallback(trailingSpacing[crossAxis], trailing[crossAxis]))),