Skip to content

Commit

Permalink
Simplify getting padding + border for cross axis in algorithm
Browse files Browse the repository at this point in the history
Differential Revision: D50704177

fbshipit-source-id: a4b37c46d69907d9614649a540b7ad8e60349fd4
  • Loading branch information
Joe Vilches authored and facebook-github-bot committed Oct 26, 2023
1 parent 6b3289b commit 6573db9
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1612,12 +1612,10 @@ static void calculateLayoutImpl(

const float paddingAndBorderAxisMain =
paddingAndBorderForAxis(node, mainAxis, ownerWidth);
const float paddingAndBorderAxisCross =
paddingAndBorderForAxis(node, crossAxis, ownerWidth);
const float leadingPaddingAndBorderCross =
node->getInlineStartPaddingAndBorder(crossAxis, direction, ownerWidth);
const float trailingPaddingAndBorderCross =
node->getInlineEndPaddingAndBorder(crossAxis, direction, ownerWidth);
const float paddingAndBorderAxisCross =
leadingPaddingAndBorderCross + trailingPaddingAndBorderCross;

MeasureMode measureModeMainDim =
isMainAxisRow ? widthMeasureMode : heightMeasureMode;
Expand Down

0 comments on commit 6573db9

Please sign in to comment.