const nsStyleDisplay *childDisplay; childFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct *&)childDisplay);
const nsStyleDisplay* childDisplay = childFrame->GetStyleDisplay();
nsTableFrame::SetInitialChildList(nsIPresContext* aPresContext,                                  nsIAtom*        aListName,                                  nsIFrame*       aChildList){  nsresult rv=NS_OK;  // I know now that I have all my children, so build the cell map  nsIFrame *childFrame = aChildList;  nsIFrame *prevMainChild = nsnull;  nsIFrame *prevColGroupChild = nsnull;  for ( ; nsnull!=childFrame; )  {    const nsStyleDisplay *childDisplay;    childFrame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct *&)childDisplay);    // XXX this if should go away    if (PR_TRUE==IsRowGroup(childDisplay->mDisplay))    {      if (mFrames.IsEmpty())         mFrames.SetFrames(childFrame);      else        prevMainChild->SetNextSibling(childFrame);      prevMainChild = childFrame;    }    else if (NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP == childDisplay->mDisplay)    {      if (mColGroups.IsEmpty())        mColGroups.SetFrames(childFrame);      else        prevColGroupChild->SetNextSibling(childFrame);      prevColGroupChild = childFrame;    }    else    { // unknown frames go on the main list for now      if (mFrames.IsEmpty())        mFrames.SetFrames(childFrame);      else        prevMainChild->SetNextSibling(childFrame);      prevMainChild = childFrame;    }    nsIFrame *prevChild = childFrame;    childFrame->GetNextSibling(&childFrame);    prevChild->SetNextSibling(nsnull);  }  if (nsnull!=prevMainChild)    prevMainChild->SetNextSibling(nsnull);  if (nsnull!=prevColGroupChild)    prevColGroupChild->SetNextSibling(nsnull);  // If we have a prev-in-flow, then we're a table that has been split and  // so don't treat this like an append  if (!mPrevInFlow) {    // process col groups first so that real cols get constructed before    // anonymous ones due to cells in rows.    InsertColGroups(*aPresContext, 0, mColGroups.FirstChild());    AppendRowGroups(*aPresContext, mFrames.FirstChild());  }  if (HasGroupRules()) {    ProcessGroupRules(aPresContext);  }  return rv;}