Changed how cell layout data is accessed

This commit is contained in:
troy
1998-06-11 22:51:54 +00:00
parent e830c3f3e9
commit 8481a5563a
6 changed files with 96 additions and 98 deletions
@@ -287,7 +287,10 @@ PRBool BasicTableLayoutStrategy::AssignFixedColumnWidths(nsIPresContext* aPresCo
for (PRInt32 cellIndex = 0; cellIndex<numCells; cellIndex++)
{
nsCellLayoutData * data = (nsCellLayoutData *)(cells->ElementAt(cellIndex));
NS_ASSERTION(nsnull != data, "bad data");
if (nsnull == data) {
// For cells that span rows there's only cell layout data for the first row
continue;
}
nsMargin margin;
nsresult result = data->GetMargin(margin);
@@ -558,8 +561,10 @@ PRBool BasicTableLayoutStrategy::BalanceColumnsTableFits(nsIPresContext* aPresCo
for (PRInt32 cellIndex = 0; cellIndex<numCells; cellIndex++)
{ // this col has proportional width, so determine its width requirements
nsCellLayoutData * data = (nsCellLayoutData *)(cells->ElementAt(cellIndex));
NS_ASSERTION(nsnull != data, "bad data");
if (nsnull == data) {
// For cells that span rows there's only cell layout data for the first row
continue;
}
PRInt32 colSpan = data->GetCellFrame()->GetColSpan();
// distribute a portion of the spanning cell's min and max width to this column
@@ -897,7 +902,10 @@ PRBool BasicTableLayoutStrategy::BalanceColumnsConstrained( nsIPresContext* aPre
for (PRInt32 cellIndex = 0; cellIndex<numCells; cellIndex++)
{ // this col has proportional width, so determine its width requirements
nsCellLayoutData * data = (nsCellLayoutData *)(cells->ElementAt(cellIndex));
NS_ASSERTION(nsnull != data, "bad data");
if (nsnull == data) {
// For cells that span rows there's only cell layout data for the first row
continue;
}
PRInt32 colSpan = data->GetCellFrame()->GetColSpan();
nsSize * cellMinSize = data->GetMaxElementSize();