bug 462849 degenerated colgroups can be empty r/sr=bzbarsky

This commit is contained in:
Bernd 2008-11-03 19:30:38 +01:00
parent 7ecefc0b75
commit aa06438c13

View File

@ -212,10 +212,13 @@ nsTableColGroupFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
return;
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
if (tableFrame->IsBorderCollapse() &&
tableFrame->BCRecalcNeeded(aOldStyleContext, GetStyleContext())) {
nsRect damageArea(GetFirstColumn()->GetColIndex(), 0, GetColCount(),
PRInt32 colCount = GetColCount();
if (!colCount)
return; // this is a degenerated colgroup
nsRect damageArea(GetFirstColumn()->GetColIndex(), 0, colCount,
tableFrame->GetRowCount());
tableFrame->SetBCDamageArea(damageArea);
}