Skip to content

Commit

Permalink
Call cleanupContentsNodesRecursively earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Oct 24, 2024
1 parent 68bb234 commit b0b842d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions yoga/algorithm/CalculateLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,10 @@ static void calculateLayoutImpl(
flexColumnDirection, direction, ownerWidth),
PhysicalEdge::Bottom);

// Clean and update all display: contents nodes with a direct path to the
// current node as they will not be traversed
cleanupContentsNodesRecursively(node);

if (node->hasMeasureFunc()) {
measureNodeWithMeasureFunc(
node,
Expand Down Expand Up @@ -1366,9 +1370,6 @@ static void calculateLayoutImpl(
// Reset layout flags, as they could have changed.
node->setLayoutHadOverflow(false);

// Clean and update all display: contents nodes with a direct path to the
// current node as they will not be traversed
cleanupContentsNodesRecursively(node);
// STEP 1: CALCULATE VALUES FOR REMAINDER OF ALGORITHM
const FlexDirection mainAxis =
resolveDirection(node->style().flexDirection(), direction);
Expand Down

0 comments on commit b0b842d

Please sign in to comment.