mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Resolve conflicts
This commit is contained in:
committed by
Mike Grabowski
parent
2b087c2c94
commit
d32cf68ff8
@@ -2520,19 +2520,22 @@ static void YGNodelayoutImpl(const YGNodeRef node,
|
||||
|
||||
// If the user didn't specify a width or height for the node, set the
|
||||
// dimensions based on the children.
|
||||
if (measureModeMainDim == YGMeasureModeUndefined) {
|
||||
if (measureModeMainDim == YGMeasureModeUndefined ||
|
||||
(node->style.overflow != YGOverflowScroll && measureModeMainDim == YGMeasureModeAtMost)) {
|
||||
// Clamp the size to the min/max size, if specified, and make sure it
|
||||
// doesn't go below the padding and border amount.
|
||||
node->layout.measuredDimensions[dim[mainAxis]] =
|
||||
YGNodeBoundAxis(node, mainAxis, maxLineMainDim, mainAxisParentSize, parentWidth);
|
||||
} else if (measureModeMainDim == YGMeasureModeAtMost) {
|
||||
} else if (measureModeMainDim == YGMeasureModeAtMost &&
|
||||
node->style.overflow == YGOverflowScroll) {
|
||||
node->layout.measuredDimensions[dim[mainAxis]] = fmaxf(
|
||||
fminf(availableInnerMainDim + paddingAndBorderAxisMain,
|
||||
YGNodeBoundAxisWithinMinAndMax(node, mainAxis, maxLineMainDim, mainAxisParentSize)),
|
||||
paddingAndBorderAxisMain);
|
||||
}
|
||||
|
||||
if (measureModeCrossDim == YGMeasureModeUndefined) {
|
||||
if (measureModeCrossDim == YGMeasureModeUndefined ||
|
||||
(node->style.overflow != YGOverflowScroll && measureModeCrossDim == YGMeasureModeAtMost)) {
|
||||
// Clamp the size to the min/max size, if specified, and make sure it
|
||||
// doesn't go below the padding and border amount.
|
||||
node->layout.measuredDimensions[dim[crossAxis]] =
|
||||
@@ -2541,7 +2544,8 @@ static void YGNodelayoutImpl(const YGNodeRef node,
|
||||
totalLineCrossDim + paddingAndBorderAxisCross,
|
||||
crossAxisParentSize,
|
||||
parentWidth);
|
||||
} else if (measureModeCrossDim == YGMeasureModeAtMost) {
|
||||
} else if (measureModeCrossDim == YGMeasureModeAtMost &&
|
||||
node->style.overflow == YGOverflowScroll) {
|
||||
node->layout.measuredDimensions[dim[crossAxis]] =
|
||||
fmaxf(fminf(availableInnerCrossDim + paddingAndBorderAxisCross,
|
||||
YGNodeBoundAxisWithinMinAndMax(node,
|
||||
|
||||
Reference in New Issue
Block a user