mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-16 18:50:07 +08:00
Revert changes causing layout failures
Differential Revision: D3776987 fbshipit-source-id: 06bd154a36f895782f45511cd8cf49cc6d7cbe7d
This commit is contained in:
committed by
Facebook Github Bot 4
parent
2cfe774a56
commit
2a859eb7e3
@@ -1040,7 +1040,8 @@ static void layoutNodeImpl(const CSSNodeRef node,
|
||||
child->layout.computedFlexBasis =
|
||||
fmaxf(child->style.dimensions[CSSDimensionHeight],
|
||||
getPaddingAndBorderAxis(child, CSSFlexDirectionColumn));
|
||||
} else if (!CSSValueIsUndefined(child->style.flexBasis)) {
|
||||
} else if (!CSSValueIsUndefined(child->style.flexBasis) &&
|
||||
!CSSValueIsUndefined(availableInnerMainDim)) {
|
||||
child->layout.computedFlexBasis =
|
||||
fmaxf(child->style.flexBasis, getPaddingAndBorderAxis(child, mainAxis));
|
||||
} else {
|
||||
|
||||
@@ -694,7 +694,7 @@ public class LayoutEngine {
|
||||
|
||||
// The height is definite, so use that as the flex basis.
|
||||
child.layout.computedFlexBasis = Math.max(child.style.dimensions[DIMENSION_HEIGHT], ((child.style.padding.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN]) + child.style.border.getWithFallback(leadingSpacing[CSS_FLEX_DIRECTION_COLUMN], leading[CSS_FLEX_DIRECTION_COLUMN])) + (child.style.padding.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN]) + child.style.border.getWithFallback(trailingSpacing[CSS_FLEX_DIRECTION_COLUMN], trailing[CSS_FLEX_DIRECTION_COLUMN]))));
|
||||
} else if (!isFlexBasisAuto(child)) {
|
||||
} else if (!isFlexBasisAuto(child) && !Float.isNaN(availableInnerMainDim)) {
|
||||
|
||||
// If the basis isn't 'auto', it is assumed to be zero.
|
||||
child.layout.computedFlexBasis = Math.max(child.style.flexBasis, ((child.style.padding.getWithFallback(leadingSpacing[mainAxis], leading[mainAxis]) + child.style.border.getWithFallback(leadingSpacing[mainAxis], leading[mainAxis])) + (child.style.padding.getWithFallback(trailingSpacing[mainAxis], trailing[mainAxis]) + child.style.border.getWithFallback(trailingSpacing[mainAxis], trailing[mainAxis]))));
|
||||
|
||||
Reference in New Issue
Block a user