mInline = (NS_STYLE_DISPLAY_BLOCK != styleDisplay->mDisplay);  PRUint8 flags = (mInline) ? NS_BLOCK_SHRINK_WRAP : 0;
PRUint8 flags = (NS_STYLE_DISPLAY_BLOCK != styleDisplay->mDisplay) ? NS_BLOCK_SHRINK_WRAP : 0;
nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,                                     nsIAtom*        aListName,                                     nsIFrame*       aChildList){  // cache our display type  const nsStyleDisplay* styleDisplay;  GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) styleDisplay);  mInline = (NS_STYLE_DISPLAY_BLOCK != styleDisplay->mDisplay);  PRUint8 flags = (mInline) ? NS_BLOCK_SHRINK_WRAP : 0;  NS_NewAreaFrame(&mContentFrame, flags);  mFrames.SetFrames(mContentFrame);  // Resolve style and initialize the frame  nsIStyleContext* styleContext;  aPresContext.ResolvePseudoStyleContextFor(mContent, nsHTMLAtoms::fieldsetContentPseudo,                                            mStyleContext, PR_FALSE, &styleContext);  mFrames.FirstChild()->Init(aPresContext, mContent, this, styleContext, nsnull);  mFrames.FirstChild()->SetNextSibling(nsnull);  NS_RELEASE(styleContext);                                             nsIFrame* newChildList = aChildList;  // Set the geometric and content parent for each of the child frames   // that will go into the area frame's child list.  // The legend frame does not go into the list  nsIFrame* lastNewFrame = nsnull;  for (nsIFrame* frame = aChildList; nsnull != frame;) {    nsIFrame* legendFrame = nsnull;    nsresult result = frame->QueryInterface(kLegendFrameCID, (void**)&legendFrame);    if (NS_SUCCEEDED(result) && legendFrame) {      if (mLegendFrame) { // we already have a legend, destroy it        frame->GetNextSibling(&frame);        if (lastNewFrame) {          lastNewFrame->SetNextSibling(frame);        }         else {          aChildList = frame;        }        legendFrame->DeleteFrame(aPresContext);      }       else {        nsIFrame* nextFrame;        frame->GetNextSibling(&nextFrame);        if (lastNewFrame) {          lastNewFrame->SetNextSibling(nextFrame);        } else {          newChildList = nextFrame;        }        frame->SetParent(this);        mFrames.FirstChild()->SetNextSibling(frame);        mLegendFrame = frame;        mLegendFrame->SetNextSibling(nsnull);        frame = nextFrame;      }    } else {      frame->SetParent(mFrames.FirstChild());      lastNewFrame = frame;      frame->GetNextSibling(&frame);    }  }  // Queue up the frames for the content frame  return mFrames.FirstChild()->SetInitialChildList(aPresContext, nsnull, newChildList);}