From d5c3753d4f0561d2f8d6f5b7207b05924041ac89 Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Mon, 4 Dec 2023 11:43:01 -0800 Subject: [PATCH] Fix bug where we used border box for size of containing block in a certain case (#41688) Summary: X-link: https://github.com/facebook/yoga/pull/1486 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 --- .../ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/react-native/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp b/packages/react-native/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp index f4082cb55e6231..40df06d41765ea 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp @@ -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 =