Bug 531461. Avoid creating an nsDisplayTableBorderBackground if every part of the table is hidden. r=dbaron

This commit is contained in:
Robert O'Callahan
2009-12-12 10:50:25 -08:00
parent f7a35de15b
commit f87971b45d
3 changed files with 87 additions and 39 deletions

View File

@@ -502,6 +502,11 @@ nsTableCellFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsresult rv = DisplayOutline(aBuilder, aLists);
NS_ENSURE_SUCCESS(rv, rv);
// Push a null 'current table item' so that descendant tables can't
// accidentally mess with our table
nsAutoPushCurrentTableItem pushTableItem;
pushTableItem.Push(aBuilder, nsnull);
nsIFrame* kid = mFrames.FirstChild();
NS_ASSERTION(kid && !kid->GetNextSibling(), "Table cells should have just one child");
// The child's background will go in our BorderBackground() list.