Bug 1614101 - Make sure ColumnSet does not split in the last reflow if ColumnSetWrapper's available block-size is unconstrained. r=dbaron

Checking ColumnSet's available block-size [1] makes no sense nowadays
because ColumnSet is an inner frame under ColumnSetWrapper. We should
check ColumnSetWrapper's available block-size instead.

[1] The comment was also misleading, which said it was checking
ColumnSet's "block-size", but it actually was checking available
block-size.

Differential Revision: https://phabricator.services.mozilla.com/D63385

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ting-Yu Lin 2020-03-03 13:07:40 +00:00
Родитель 8b49948d8c
Коммит bf48011278
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -1141,13 +1141,17 @@ void nsColumnSetFrame::FindBestBalanceBSize(const ReflowInput& aReflowInput,
aConfig.mColMaxBSize = aConfig.mKnownFeasibleBSize;
}
// If our block-size is unconstrained, make sure that the last column is
// This is our last attempt to reflow. If our column container's available
// block-size is unconstrained, make sure that the last column is
// allowed to have arbitrary block-size here, even though we were
// balancing. Otherwise we'd have to split, and it's not clear what we'd
// do with that.
const bool forceUnboundedLastColumn =
aReflowInput.mParentReflowInput->AvailableBSize() ==
NS_UNCONSTRAINEDSIZE;
MarkPrincipalChildrenDirty(this);
ReflowColumns(aDesiredSize, aReflowInput, aStatus, aConfig,
availableContentBSize == NS_UNCONSTRAINEDSIZE);
forceUnboundedLastColumn);
}
}