Set width/height also to Undefined when we change the measure mode to Undefined
Summary: Make sure width/height is always passed as Undefined when measure mode is changed to Undefined. Changelog: [Internal][Yoga] Set width and height as Undefined when we change measure mode to Undefined Reviewed By: alickbass Differential Revision: D20029838 fbshipit-source-id: b9931f6ddb13ffd1565889535ade5bbffbe0c304
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f7bc0ad248
commit
e5743e851b
@@ -1663,8 +1663,8 @@ static void YGNodeAbsoluteLayoutChild(
|
||||
|
||||
static void YGNodeWithMeasureFuncSetMeasuredDimensions(
|
||||
const YGNodeRef node,
|
||||
const float availableWidth,
|
||||
const float availableHeight,
|
||||
float availableWidth,
|
||||
float availableHeight,
|
||||
const YGMeasureMode widthMeasureMode,
|
||||
const YGMeasureMode heightMeasureMode,
|
||||
const float ownerWidth,
|
||||
@@ -1677,6 +1677,13 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(
|
||||
node->hasMeasureFunc(),
|
||||
"Expected node to have custom measure function");
|
||||
|
||||
if (widthMeasureMode == YGMeasureModeUndefined) {
|
||||
availableWidth = YGUndefined;
|
||||
}
|
||||
if (heightMeasureMode == YGMeasureModeUndefined) {
|
||||
availableHeight = YGUndefined;
|
||||
}
|
||||
|
||||
const float paddingAndBorderAxisRow =
|
||||
YGNodePaddingAndBorderForAxis(node, YGFlexDirectionRow, ownerWidth);
|
||||
const float paddingAndBorderAxisColumn =
|
||||
|
Reference in New Issue
Block a user