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 @@ -1725,7 +1725,8 @@ static void justifyMainAxis(
const float availableInnerMainDim,
const float availableInnerCrossDim,
const float availableInnerWidth,
const bool performLayout) {
const bool performLayout,
const bool isNodeBaselineLayout) {
const auto& style = node->style();

const float leadingPaddingAndBorderMain =
Expand Down Expand Up @@ -1821,7 +1822,6 @@ static void justifyMainAxis(

float maxAscentForCurrentLine = 0;
float maxDescentForCurrentLine = 0;
bool isNodeBaselineLayout = isBaselineLayout(node);
for (auto child : flexLine.itemsInFlow) {
const LayoutResults& childLayout = child->getLayout();
if (child->style().flexStartMarginIsAuto(mainAxis, direction) &&
Expand Down Expand Up @@ -2223,6 +2223,7 @@ static void calculateLayoutImpl(

// Max main dimension of all the lines.
float maxLineMainDim = 0;
const bool isNodeBaselineLayout = isBaselineLayout(node);
for (; startOfLineIterator != node->getLayoutChildren().end(); lineCount++) {
auto flexLine = calculateFlexLine(
node,
Expand Down Expand Up @@ -2361,7 +2362,8 @@ static void calculateLayoutImpl(
availableInnerMainDim,
availableInnerCrossDim,
availableInnerWidth,
performLayout);
performLayout,
isNodeBaselineLayout);

float containerCrossAxis = availableInnerCrossDim;
if (sizingModeCrossDim == SizingMode::MaxContent ||
Expand Down Expand Up @@ -2523,7 +2525,7 @@ static void calculateLayoutImpl(

// STEP 8: MULTI-LINE CONTENT ALIGNMENT
// currentLead stores the size of the cross dim
if (performLayout && (isNodeFlexWrap || isBaselineLayout(node))) {
if (performLayout && (isNodeFlexWrap || isNodeBaselineLayout)) {
float leadPerLine = 0;
float currentLead = leadingPaddingAndBorderCross;
float extraSpacePerLine = 0;
Expand Down
Loading