styleContext, aAbsoluteItems, aFrameItems, haltProcessing);
styleContext, aAbsoluteItems, aFrameItems, aFixedItems, haltProcessing);
HTMLStyleSheetImpl::ConstructFrame(nsIPresContext*  aPresContext,                                   nsIContent*      aContent,                                   nsIFrame*        aParentFrame,                                   nsAbsoluteItems& aAbsoluteItems,                                   nsFrameItems&    aFrameItems){  NS_PRECONDITION(nsnull != aParentFrame, "no parent frame");  nsresult  rv;  // Get the element's tag  nsIAtom*  tag;  aContent->GetTag(tag);  // Resolve the style context based on the content object and the parent  // style context  nsIStyleContext* styleContext;  nsIStyleContext* parentStyleContext;  aParentFrame->GetStyleContext(parentStyleContext);  if (nsLayoutAtoms::textTagName == tag) {    // Use a special pseudo element style context for text    nsIContent* parentContent = nsnull;    if (nsnull != aParentFrame) {      aParentFrame->GetContent(parentContent);    }    styleContext = aPresContext->ResolvePseudoStyleContextFor(parentContent,                                                               nsHTMLAtoms::textPseudo,                                                               parentStyleContext);    rv = (nsnull == styleContext) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;    NS_IF_RELEASE(parentContent);  } else if (nsLayoutAtoms::commentTagName == tag) {    // Use a special pseudo element style context for comments    nsIContent* parentContent = nsnull;    if (nsnull != aParentFrame) {      aParentFrame->GetContent(parentContent);    }    styleContext = aPresContext->ResolvePseudoStyleContextFor(parentContent,                                                               nsHTMLAtoms::commentPseudo,                                                               parentStyleContext);    rv = (nsnull == styleContext) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;    NS_IF_RELEASE(parentContent);      } else {    styleContext = aPresContext->ResolveStyleContextFor(aContent, parentStyleContext);    rv = (nsnull == styleContext) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;  }  NS_IF_RELEASE(parentStyleContext);  if (NS_SUCCEEDED(rv)) {    // Pre-check for display "none" - if we find that, don't create    // any frame at all    const nsStyleDisplay* display = (const nsStyleDisplay*)      styleContext->GetStyleData(eStyleStruct_Display);    if (NS_STYLE_DISPLAY_NONE != display->mDisplay) {      nsIFrame* lastChild = aFrameItems.lastChild;      // Handle specific frame types      rv = ConstructFrameByTag(aPresContext, aContent, aParentFrame, tag,                               styleContext, aAbsoluteItems, aFrameItems);#ifdef INCLUDE_XUL      // Failing to find a matching HTML frame, try creating a specialized      // XUL frame. This is temporary, pending planned factoring of this      // whole process into separate, pluggable steps.      if (NS_SUCCEEDED(rv) && ((nsnull == aFrameItems.childList) ||                             (lastChild == aFrameItems.lastChild))) {        PRBool haltProcessing = PR_FALSE;        rv = ConstructXULFrame(aPresContext, aContent, aParentFrame, tag,                               styleContext, aAbsoluteItems, aFrameItems, haltProcessing);        if (haltProcessing) {          NS_RELEASE(styleContext);          NS_IF_RELEASE(tag);          return rv;        }      } #endif      if (NS_SUCCEEDED(rv) && ((nsnull == aFrameItems.childList) ||                               (lastChild == aFrameItems.lastChild))) {        // When there is no explicit frame to create, assume it's a        // container and let display style dictate the rest        rv = ConstructFrameByDisplayType(aPresContext, display, aContent, aParentFrame,                                         styleContext, aAbsoluteItems, aFrameItems);      }    }    NS_RELEASE(styleContext);  }    NS_IF_RELEASE(tag);  return rv;}