@@ -837,15 +837,6 @@ static inline YGAlign YGNodeAlignItem(const YGNodeRef node, const YGNodeRef chil
837
837
return align;
838
838
}
839
839
840
- static inline YGDirection YGNodeResolveDirection (const YGNodeRef node,
841
- const YGDirection parentDirection) {
842
- if (node->getStyle ().direction == YGDirectionInherit) {
843
- return parentDirection > YGDirectionInherit ? parentDirection : YGDirectionLTR;
844
- } else {
845
- return node->getStyle ().direction ;
846
- }
847
- }
848
-
849
840
static float YGBaseline (const YGNodeRef node) {
850
841
if (node->getBaseline () != nullptr ) {
851
842
const float baseline = node->getBaseline ()(
@@ -1602,8 +1593,7 @@ static void YGNodeComputeFlexBasisForChildren(
1602
1593
}
1603
1594
if (performLayout) {
1604
1595
// Set the initial position (relative to the parent).
1605
- const YGDirection childDirection =
1606
- YGNodeResolveDirection (child, direction);
1596
+ const YGDirection childDirection = child->resolveDirection (direction);
1607
1597
const float mainDim = YGFlexDirectionIsRow (mainAxis)
1608
1598
? availableInnerWidth
1609
1599
: availableInnerHeight;
@@ -1744,7 +1734,7 @@ static void YGNodelayoutImpl(const YGNodeRef node,
1744
1734
" YGMeasureModeUndefined" );
1745
1735
1746
1736
// Set the resolved resolution in the node's layout.
1747
- const YGDirection direction = YGNodeResolveDirection ( node, parentDirection);
1737
+ const YGDirection direction = node-> resolveDirection ( parentDirection);
1748
1738
node->setLayoutDirection (direction);
1749
1739
1750
1740
const YGFlexDirection flexRowDirection = YGResolveFlexDirection (YGFlexDirectionRow, direction);
0 commit comments