const nsStyleDisplay *display; rgFrame->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display));
const nsStyleDisplay* display = rgFrame->GetStyleDisplay();
nsTableFrame::RecoverState(InnerTableReflowState& aReflowState,                           nsIFrame*              aKidFrame,                           nsSize*                aMaxElementSize){  nscoord cellSpacingY = GetCellSpacingY();  // Get the ordered children and find aKidFrame in the list  nsVoidArray rowGroups;  PRUint32 numRowGroups;  OrderRowGroups(rowGroups, numRowGroups, &aReflowState.firstBodySection);    // Walk the list of children looking for aKidFrame  for (PRUint32 childX = 0; childX < numRowGroups; childX++) {    nsIFrame* childFrame = (nsIFrame*)rowGroups.ElementAt(childX);    nsTableRowGroupFrame* rgFrame = GetRowGroupFrame(childFrame);    if (!rgFrame) continue; // skip foreign frame types       // If this is a footer row group, remember it    const nsStyleDisplay *display;    rgFrame->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display));    // We only allow a single footer frame    if ((NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP == display->mDisplay) &&        !aReflowState.footerFrame) {      aReflowState.footerFrame = childFrame;        }     else {      if ((NS_STYLE_DISPLAY_TABLE_ROW_GROUP == display->mDisplay) &&          !aReflowState.firstBodySection) {        aReflowState.firstBodySection = childFrame;      }    }    aReflowState.y += cellSpacingY;        // See if this is the frame we're looking for    if (childFrame == aKidFrame) {      break;    }    // Get the frame's height    nsSize  kidSize;    childFrame->GetSize(kidSize);        // If our height is constrained then update the available height. Do    // this for all frames including the footer frame    if (PR_FALSE == aReflowState.unconstrainedHeight) {      aReflowState.availSize.height -= kidSize.height;    }    // Update the running y-offset. Don't do this for the footer frame    if (childFrame != aReflowState.footerFrame) {      aReflowState.y += kidSize.height;    }    // Update the max element size    //XXX: this should call into layout strategy to get the width field    if (nsnull != aMaxElementSize)     {      const nsStyleSpacing* tableSpacing;      GetStyleData(eStyleStruct_Spacing , ((const nsStyleStruct *&)tableSpacing));      nsMargin borderPadding;      GetTableBorder (borderPadding); // gets the max border thickness for each edge      borderPadding += aReflowState.reflowState.mComputedPadding;      nscoord cellSpacing = GetCellSpacingX();      nsSize  kidMaxElementSize;      rgFrame->GetMaxElementSize(kidMaxElementSize);      nscoord kidWidth = kidMaxElementSize.width + borderPadding.left + borderPadding.right + cellSpacing*2;      aMaxElementSize->width = PR_MAX(aMaxElementSize->width, kidWidth);       aMaxElementSize->height += kidMaxElementSize.height;    }  }  return NS_OK;}