Fix bug where we used border box for size of containing block in a certain case (#1486)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1486

X-link: https://github.com/facebook/react-native/pull/41688

Somehow missed this case. We never want to measure the CB as that gets border box but we want padding box

Reviewed By: NickGerleman

Differential Revision: D51376309

fbshipit-source-id: 2b5119c421ef92fadb28a70254cb7fe02aeb8c28
This commit is contained in:
Joe Vilches
2023-12-07 21:25:45 -08:00
committed by Facebook GitHub Bot
parent d1dda2185e
commit f8d048bb1a
5 changed files with 820 additions and 4 deletions

View File

@@ -199,10 +199,7 @@ static void positionAbsoluteChildImpl(
// necessary.
if (child->isInlineStartPositionDefined(axis, direction)) {
const float positionRelativeToInlineStart =
child->getInlineStartPosition(
axis,
direction,
containingNode->getLayout().measuredDimension(dimension(axis))) +
child->getInlineStartPosition(axis, direction, containingBlockSize) +
containingNode->getInlineStartBorder(axis, direction) +
child->getInlineStartMargin(axis, direction, containingBlockSize);
const float positionRelativeToFlexStart =