Skip to content

Commit

Permalink
Fix contents cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed Nov 14, 2024
1 parent 5b962c0 commit 38f9c0a
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions yoga/algorithm/CalculateLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,10 +1294,6 @@ 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 All @@ -1310,6 +1306,10 @@ static void calculateLayoutImpl(
ownerHeight,
layoutMarkerData,
reason);

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

Expand All @@ -1324,6 +1324,10 @@ static void calculateLayoutImpl(
heightSizingMode,
ownerWidth,
ownerHeight);

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

Expand All @@ -1339,6 +1343,9 @@ static void calculateLayoutImpl(
heightSizingMode,
ownerWidth,
ownerHeight)) {
// Clean and update all display: contents nodes with a direct path to the
// current node as they will not be traversed
cleanupContentsNodesRecursively(node);
return;
}

Expand All @@ -1348,6 +1355,10 @@ 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 38f9c0a

Please sign in to comment.