Bug 1564649 - Reflow all columns when a multicol with non-auto block-size balances its columns at a different block-size. r=TYLin

Depends on D37516

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
L. David Baron 2019-07-12 20:24:46 +00:00
Родитель 3ca65b5216
Коммит 97a432f01b
2 изменённых файлов: 15 добавлений и 7 удалений

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

@ -598,6 +598,11 @@ nsColumnSetFrame::ColumnBalanceData nsColumnSetFrame::ReflowChildren(
// will be adjusted later, after our correct contentSize is known.
nsSize containerSize = aReflowInput.ComputedSizeAsContainerIfConstrained();
LogicalSize computedSize =
StaticPrefs::layout_css_column_span_enabled()
? aReflowInput.mCBReflowInput->ComputedSize(wm)
: aReflowInput.ComputedSize(wm);
// For RTL, since the columns might not fill the frame exactly, we
// need to account for the slop. Otherwise we'll waste time moving the
// columns by some tiny amount
@ -641,8 +646,16 @@ nsColumnSetFrame::ColumnBalanceData nsColumnSetFrame::ReflowChildren(
!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.
//
// The same is true if we have a non-'auto' computed block-size.
//
// FIXME: It's not clear to me why it's *ever* valid to have
// skipIncremental be true when changingBSize is true, since it
// seems like a child broken over multiple columns might need to
// change the size of the fragment in each column.
if (skipIncremental && changingBSize &&
StyleColumn()->mColumnFill == StyleColumnFill::Auto) {
(StyleColumn()->mColumnFill == StyleColumnFill::Auto ||
computedSize.BSize(wm) != NS_UNCONSTRAINEDSIZE)) {
skipIncremental = false;
}
// If we need to pull up content from the prev-in-flow then this is not just
@ -706,11 +719,6 @@ nsColumnSetFrame::ColumnBalanceData nsColumnSetFrame::ReflowChildren(
availSize.BSize(wm) = GetAvailableContentBSize(aReflowInput);
}
LogicalSize computedSize =
StaticPrefs::layout_css_column_span_enabled()
? aReflowInput.mCBReflowInput->ComputedSize(wm)
: aReflowInput.ComputedSize(wm);
if (reflowNext) {
child->MarkSubtreeDirty();
}

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

@ -42,7 +42,7 @@ fuzzy-if(browserIsRemote&&winWidget,0-142,0-276) == fieldset-columns-001.html fi
== break-avoid-line-position-1.html break-avoid-line-position-1-ref.html
pref(layout.css.column-span.enabled,true) == column-span-bidi-1.html column-span-bidi-1-ref.html
pref(layout.css.column-span.enabled,true) == first-line-first-letter.html first-line-first-letter-ref.html
fails == zero-height-nondirty-reflow.html zero-height-nondirty-reflow-ref.html
== zero-height-nondirty-reflow.html zero-height-nondirty-reflow-ref.html
# The following lines are duplicates of other lines from further up in this
# manifest. They're listed again here so we can re-run these tests with