Bug 1564308 - Always reflow all row groups and rows if we're doing visibility:collapse adjustments. r=dholbert

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
L. David Baron 2019-07-10 06:49:17 +00:00
parent 55e633a669
commit 2168126e68
3 changed files with 14 additions and 6 deletions

View File

@ -1769,7 +1769,8 @@ void nsTableFrame::Reflow(nsPresContext* aPresContext,
// unconstrained reflow, because it will occur later when the parent reflows
// with a constrained isize.
if (NS_SUBTREE_DIRTY(this) || aReflowInput.ShouldReflowAllKids() ||
IsGeometryDirty() || isPaginated || aReflowInput.IsBResize()) {
IsGeometryDirty() || isPaginated || aReflowInput.IsBResize() ||
NeedToCollapse()) {
if (aReflowInput.ComputedBSize() != NS_UNCONSTRAINEDSIZE ||
// Also check IsBResize(), to handle the first Reflow preceding a
// special bsize Reflow, when we've already had a special bsize
@ -1908,8 +1909,13 @@ void nsTableFrame::Reflow(nsPresContext* aPresContext,
LogicalMargin borderPadding = GetChildAreaOffset(wm, &aReflowInput);
SetColumnDimensions(aDesiredSize.BSize(wm), wm, borderPadding,
aDesiredSize.PhysicalSize());
if (NeedToCollapse() &&
(NS_UNCONSTRAINEDSIZE != aReflowInput.AvailableISize())) {
NS_WARNING_ASSERTION(NS_UNCONSTRAINEDSIZE != aReflowInput.AvailableISize(),
"reflow branch removed unconstrained available isizes");
if (NeedToCollapse()) {
// This code and the code it depends on assumes that all row groups
// and rows have just been reflowed (i.e., it makes adjustments to
// their rects that are not idempotent). Thus the reflow code
// checks NeedToCollapse() to ensure this is true.
AdjustForCollapsingRowsCols(aDesiredSize, wm, borderPadding);
}
@ -2904,7 +2910,8 @@ void nsTableFrame::ReflowChildren(TableReflowInput& aReflowInput,
aOverflowAreas.Clear();
bool reflowAllKids = aReflowInput.reflowInput.ShouldReflowAllKids() ||
mBits.mResizedColumns || IsGeometryDirty();
mBits.mResizedColumns || IsGeometryDirty() ||
NeedToCollapse();
RowGroupArray rowGroups;
nsTableRowGroupFrame *thead, *tfoot;

View File

@ -348,7 +348,8 @@ void nsTableRowGroupFrame::ReflowChildren(
bool haveRow = false;
bool reflowAllKids = aReflowInput.reflowInput.ShouldReflowAllKids() ||
tableFrame->IsGeometryDirty();
tableFrame->IsGeometryDirty() ||
tableFrame->NeedToCollapse();
// in vertical-rl mode, we always need the row bsizes in order to
// get the necessary containerSize for placing our kids

View File

@ -7,7 +7,7 @@
== 1220621-1f.html 1220621-1-ref.html
== 1220621-2a.html 1220621-2-ref.html
== 1220621-2b.html 1220621-2-ref.html
fails == 1564308.html 1564308-ref.html
== 1564308.html 1564308-ref.html
== dynamic-text-overflow-table-cell.html dynamic-text-overflow-table-cell-ref.html
!= dynamic-text-overflow-table-cell.html dynamic-text-overflow-table-cell-notref.html
== dynamic-text-indent-table-cell.html dynamic-text-indent-table-cell-ref.html