Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,18 @@ static float distributeFreeSpaceSecondPass(
const SizingMode childHeightSizingMode =
!isMainAxisRow ? childMainSizingMode : childCrossSizingMode;

const bool isLayoutPass = performLayout && !requiresStretchLayout;
// A baseline-aligned item's baseline comes from the positions of its
// descendants, which only a layout pass sets, and the line's cross size
// comes from that baseline. Lay the item out even when the node is only
// measured, if the node is dirty: its own layout pass then follows in this
// layout and visits the item again. A clean node may never get one, so its
// items keep the layout, and the baselines, they have.
const bool needsLayoutForBaseline = node->isDirty() &&
resolveChildAlignment(node, currentLineChild) == Align::Baseline &&
!currentLineChild->hasBaselineFunc() &&
currentLineChild->getLayoutChildCount() != 0;
const bool isLayoutPass =
(performLayout && !requiresStretchLayout) || needsLayoutForBaseline;
// Recursively call the layout algorithm for this child with the updated
// main size.
calculateLayoutInternal(
Expand Down
Loading