Bug 1575106 Part 1 - Use a variable to indicate ColumnSet is measuring the feasible block-size. r=dbaron

That is when ColumnSet gives its last ::moz-column-content unbounded
available block-size in the very first balancing iteration.

Note that the last column's available block-size isn't
really *unbounded* yet, but we'll make it happen in the next part.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ting-Yu Lin 2019-08-26 06:10:11 +00:00
Родитель 9c93275254
Коммит def57daecd
1 изменённых файлов: 9 добавлений и 7 удалений

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

@ -634,6 +634,9 @@ nsColumnSetFrame::ColumnBalanceData nsColumnSetFrame::ReflowChildren(
bool reflowNext = false;
while (child) {
const bool isMeasuringFeasibleContentBSize =
aUnboundedLastColumn && columnCount == aConfig.mBalanceColCount - 1;
// Try to skip reflowing the child. We can't skip if the child is dirty. We
// also can't skip if the next column is dirty, because the next column's
// first line(s) might be pullable back to this column. We can't skip if
@ -644,12 +647,11 @@ nsColumnSetFrame::ColumnBalanceData nsColumnSetFrame::ReflowChildren(
// content from its next sibling. (Note that it might be the last
// column, but not be the last child because the desired number of columns
// has changed.)
bool skipIncremental = !aReflowInput.ShouldReflowAllKids() &&
!NS_SUBTREE_DIRTY(child) &&
child->GetNextSibling() &&
!(aUnboundedLastColumn &&
columnCount == aConfig.mBalanceColCount - 1) &&
!NS_SUBTREE_DIRTY(child->GetNextSibling());
bool skipIncremental =
!aReflowInput.ShouldReflowAllKids() && !NS_SUBTREE_DIRTY(child) &&
child->GetNextSibling() && !isMeasuringFeasibleContentBSize &&
!NS_SUBTREE_DIRTY(child->GetNextSibling());
// If column-fill is auto (not the default), then we might need to
// move content between columns for any change in column block-size.
//
@ -721,7 +723,7 @@ nsColumnSetFrame::ColumnBalanceData nsColumnSetFrame::ReflowChildren(
ToString(aStatus).c_str());
} else {
LogicalSize availSize(wm, aConfig.mColISize, aConfig.mColMaxBSize);
if (aUnboundedLastColumn && columnCount == aConfig.mBalanceColCount - 1) {
if (isMeasuringFeasibleContentBSize) {
availSize.BSize(wm) = GetAvailableContentBSize(aReflowInput);
COLUMN_SET_LOG(