mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 08:30:34 +00:00
Generate tests for flex properties
Differential Revision: D3771513 fbshipit-source-id: 1b5edc7a28bb26217e8a6d10d1829d9031c3ae2e
This commit is contained in:
parent
a282be9a18
commit
06ee832928
@ -1040,8 +1040,7 @@ static void layoutNodeImpl(const CSSNodeRef node,
|
|||||||
child->layout.computedFlexBasis =
|
child->layout.computedFlexBasis =
|
||||||
fmaxf(child->style.dimensions[CSSDimensionHeight],
|
fmaxf(child->style.dimensions[CSSDimensionHeight],
|
||||||
getPaddingAndBorderAxis(child, CSSFlexDirectionColumn));
|
getPaddingAndBorderAxis(child, CSSFlexDirectionColumn));
|
||||||
} else if (!CSSValueIsUndefined(child->style.flexBasis) &&
|
} else if (!CSSValueIsUndefined(child->style.flexBasis)) {
|
||||||
!CSSValueIsUndefined(availableInnerMainDim)) {
|
|
||||||
child->layout.computedFlexBasis =
|
child->layout.computedFlexBasis =
|
||||||
fmaxf(child->style.flexBasis, getPaddingAndBorderAxis(child, mainAxis));
|
fmaxf(child->style.flexBasis, getPaddingAndBorderAxis(child, mainAxis));
|
||||||
} else {
|
} else {
|
||||||
|
@ -694,7 +694,7 @@ public class LayoutEngine {
|
|||||||
|
|
||||||
// The height is definite, so use that as the flex basis.
|
// 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]))));
|
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) && !Float.isNaN(availableInnerMainDim)) {
|
} else if (!isFlexBasisAuto(child)) {
|
||||||
|
|
||||||
// If the basis isn't 'auto', it is assumed to be zero.
|
// 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]))));
|
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]))));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user