@@ -797,21 +797,6 @@ static float YGNodeTrailingPadding(const YGNodeRef node,
797797 0 .0f );
798798}
799799
800- static float YGNodeTrailingBorder (
801- const YGNodeRef node,
802- const YGFlexDirection axis) {
803- if (YGFlexDirectionIsRow (axis) &&
804- node->getStyle ().border [YGEdgeEnd].unit != YGUnitUndefined &&
805- node->getStyle ().border [YGEdgeEnd].value >= 0 .0f ) {
806- return node->getStyle ().border [YGEdgeEnd].value ;
807- }
808-
809- return fmaxf (
810- YGComputedEdgeValue (node->getStyle ().border , trailing[axis], &YGValueZero)
811- ->value ,
812- 0 .0f );
813- }
814-
815800static inline float YGNodeLeadingPaddingAndBorder (
816801 const YGNodeRef node,
817802 const YGFlexDirection axis,
@@ -823,7 +808,8 @@ static inline float YGNodeLeadingPaddingAndBorder(
823808static inline float YGNodeTrailingPaddingAndBorder (const YGNodeRef node,
824809 const YGFlexDirection axis,
825810 const float widthSize) {
826- return YGNodeTrailingPadding (node, axis, widthSize) + YGNodeTrailingBorder (node, axis);
811+ return YGNodeTrailingPadding (node, axis, widthSize) +
812+ node->getTrailingBorder (axis);
827813}
828814
829815static inline float YGNodeMarginForAxis (const YGNodeRef node,
@@ -1221,7 +1207,7 @@ static void YGNodeAbsoluteLayoutChild(const YGNodeRef node,
12211207 child->isTrailingPosDefined (YGFlexDirectionRow)) {
12221208 childWidth = node->getLayout ().measuredDimensions [YGDimensionWidth] -
12231209 (node->getLeadingBorder (YGFlexDirectionRow) +
1224- YGNodeTrailingBorder ( node, YGFlexDirectionRow)) -
1210+ node-> getTrailingBorder ( YGFlexDirectionRow)) -
12251211 (child->getLeadingPosition (YGFlexDirectionRow, width) +
12261212 child->getTrailingPosition (YGFlexDirectionRow, width));
12271213 childWidth = YGNodeBoundAxis (child, YGFlexDirectionRow, childWidth, width, width);
@@ -1240,7 +1226,7 @@ static void YGNodeAbsoluteLayoutChild(const YGNodeRef node,
12401226 child->isTrailingPosDefined (YGFlexDirectionColumn)) {
12411227 childHeight = node->getLayout ().measuredDimensions [YGDimensionHeight] -
12421228 (node->getLeadingBorder (YGFlexDirectionColumn) +
1243- YGNodeTrailingBorder ( node, YGFlexDirectionColumn)) -
1229+ node-> getTrailingBorder ( YGFlexDirectionColumn)) -
12441230 (child->getLeadingPosition (YGFlexDirectionColumn, height) +
12451231 child->getTrailingPosition (YGFlexDirectionColumn, height));
12461232 childHeight = YGNodeBoundAxis (child, YGFlexDirectionColumn, childHeight, height, width);
@@ -1311,7 +1297,7 @@ static void YGNodeAbsoluteLayoutChild(const YGNodeRef node,
13111297 child->setLayoutPosition (
13121298 node->getLayout ().measuredDimensions [dim[mainAxis]] -
13131299 child->getLayout ().measuredDimensions [dim[mainAxis]] -
1314- YGNodeTrailingBorder ( node, mainAxis) -
1300+ node-> getTrailingBorder ( mainAxis) -
13151301 child->getTrailingMargin (mainAxis, width) -
13161302 child->getTrailingPosition (
13171303 mainAxis, isMainAxisRow ? width : height),
@@ -1338,7 +1324,7 @@ static void YGNodeAbsoluteLayoutChild(const YGNodeRef node,
13381324 child->setLayoutPosition (
13391325 node->getLayout ().measuredDimensions [dim[crossAxis]] -
13401326 child->getLayout ().measuredDimensions [dim[crossAxis]] -
1341- YGNodeTrailingBorder ( node, crossAxis) -
1327+ node-> getTrailingBorder ( crossAxis) -
13421328 child->getTrailingMargin (crossAxis, width) -
13431329 child->getTrailingPosition (
13441330 crossAxis, isMainAxisRow ? height : width),
@@ -1775,11 +1761,10 @@ static void YGNodelayoutImpl(const YGNodeRef node,
17751761 node->getTrailingMargin (flexColumnDirection, parentWidth), YGEdgeBottom);
17761762
17771763 node->setLayoutBorder (node->getLeadingBorder (flexRowDirection), YGEdgeStart);
1778- node->setLayoutBorder (
1779- YGNodeTrailingBorder (node, flexRowDirection), YGEdgeEnd);
1764+ node->setLayoutBorder (node->getTrailingBorder (flexRowDirection), YGEdgeEnd);
17801765 node->setLayoutBorder (node->getLeadingBorder (flexColumnDirection), YGEdgeTop);
17811766 node->setLayoutBorder (
1782- YGNodeTrailingBorder ( node, flexColumnDirection), YGEdgeBottom);
1767+ node-> getTrailingBorder ( flexColumnDirection), YGEdgeBottom);
17831768
17841769 node->setLayoutPadding (
17851770 YGNodeLeadingPadding (node, flexRowDirection, parentWidth), YGEdgeStart);
0 commit comments