while (nsnull != groupFrame) { const nsStyleDisplay* groupDisplay; groupFrame->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)groupDisplay)); if (IsRowGroup(groupDisplay->mDisplay)) { CollapseRowGroupIfNecessary(aPresContext, groupFrame, yTotalOffset, yGroupOffset, rowIndex); }
nsAutoVoidArray rowGroups; PRUint32 numRowGroups; OrderRowGroups(rowGroups, numRowGroups);   for (PRUint32 childX = 0; childX < numRowGroups; childX++) { nsIFrame* childFrame = (nsIFrame*)rowGroups.ElementAt(childX); nsTableRowGroupFrame* rgFrame = GetRowGroupFrame(childFrame); if (!rgFrame) continue; CollapseRowGroupIfNecessary(aPresContext, rgFrame, yTotalOffset, yGroupOffset, rowIndex);
NS_METHOD nsTableFrame::AdjustForCollapsingRows(nsIPresContext* aPresContext,                                                 nscoord&        aHeight){  nsIFrame* groupFrame = mFrames.FirstChild();   nscoord yGroupOffset = 0; // total offset among rows within a single row group  nscoord yTotalOffset = 0; // total offset among all rows in all row groups  PRInt32 rowIndex = 0;  // collapse the rows and/or row groups as necessary  while (nsnull != groupFrame) {    const nsStyleDisplay* groupDisplay;    groupFrame->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)groupDisplay));    if (IsRowGroup(groupDisplay->mDisplay)) {      CollapseRowGroupIfNecessary(aPresContext, groupFrame, yTotalOffset, yGroupOffset, rowIndex);    }    yTotalOffset += yGroupOffset;    yGroupOffset = 0;    groupFrame->GetNextSibling(&groupFrame);  }   aHeight -= yTotalOffset;   return NS_OK;}