Skip to content

Commit

Permalink
Backed out changeset e726d9e85f7d (bug 1621274) for perma failures on…
Browse files Browse the repository at this point in the history
… 1547420-1.html. CLOSED TREE
  • Loading branch information
Razvan Maries committed Sep 30, 2020
1 parent 5c478dc commit 849310a
Showing 1 changed file with 6 additions and 28 deletions.
34 changes: 6 additions & 28 deletions layout/tables/BasicTableLayoutStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,23 +599,6 @@ void BasicTableLayoutStrategy::DistributePctISizeToColumns(float aSpanPrefPct,
}
}

#ifdef DEBUG
// Bypass some assertions for tables inside XUL which we're realistically not
// going to investigate unless they cause havoc. Thunderbird hits these very
// often.
static bool IsCloseToXULBox(nsTableFrame* aTableFrame) {
// NOTE: GetParent() is guaranteed to be the table wrapper (thus non-null).
nsIFrame* f = aTableFrame->GetParent()->GetParent();
for (size_t i = 0; f && i < 2; ++i) {
if (f->IsXULBoxFrame()) {
return true;
}
f = f->GetParent();
}
return false;
}
#endif

void BasicTableLayoutStrategy::DistributeISizeToColumns(
nscoord aISize, int32_t aFirstCol, int32_t aColCount,
BtlsISizeType aISizeType, bool aSpanHasSpecifiedISize) {
Expand Down Expand Up @@ -772,8 +755,7 @@ void BasicTableLayoutStrategy::DistributeISizeToColumns(
// Return early -- we don't have any extra space to distribute.
return;
}
NS_ASSERTION(!(aISizeType == BTLS_FINAL_ISIZE && aISize < guess_min) ||
IsCloseToXULBox(mTableFrame),
NS_ASSERTION(!(aISizeType == BTLS_FINAL_ISIZE && aISize < guess_min),
"Table inline-size is less than the "
"sum of its columns' min inline-sizes");
if (aISize < guess_min_pct) {
Expand Down Expand Up @@ -998,13 +980,9 @@ void BasicTableLayoutStrategy::DistributeISizeToColumns(
} break;
}
}
#ifdef DEBUG
if (!IsCloseToXULBox(mTableFrame)) {
NS_ASSERTION((space == 0 || space == nscoord_MAX) &&
((l2t == FLEX_PCT_LARGE)
? (-0.001f < basis.f && basis.f < 0.001f)
: (basis.c == 0 || basis.c == nscoord_MAX)),
"didn't subtract all that we added");
}
#endif
NS_ASSERTION(
(space == 0 || space == nscoord_MAX) &&
((l2t == FLEX_PCT_LARGE) ? (-0.001f < basis.f && basis.f < 0.001f)
: (basis.c == 0 || basis.c == nscoord_MAX)),
"didn't subtract all that we added");
}

0 comments on commit 849310a

Please sign in to comment.