primaryFrame->GetStyleContext(getter_AddRefs(styleContext)); mPresContext->ProbePseudoStyleContextFor(aContent, nsCSSPseudoElements::after, styleContext, getter_AddRefs(pseudoStyleContext));
styleContext = primaryFrame->GetStyleContext(); pseudoStyleContext = mPresContext->ProbePseudoStyleContextFor(aContent, nsCSSPseudoElements::after, styleContext);
PresShell::GetGeneratedContentIterator(nsIContent*          aContent,                                       GeneratedContentType aType,                                       nsIContentIterator** aIterator) const{  nsIFrame* primaryFrame;  nsresult  rv = NS_OK;  // Initialize OUT parameter  *aIterator = nsnull;  // Get the primary frame associated with the content object  GetPrimaryFrameFor(aContent, &primaryFrame);  if (primaryFrame) {    // See whether it's a request for the before or after generated content    if (Before == aType) {      nsIFrame* beforeFrame = nsLayoutUtils::GetBeforeFrame(primaryFrame,                                                            mPresContext);      if (beforeFrame) {        // Create an iterator        rv = NS_NewFrameContentIterator(mPresContext, beforeFrame, aIterator);      }          } else {      // Avoid finding the :after frame unless we need to (it's      // expensive). Instead probe for the existence of the pseudo-element      nsCOMPtr<nsIStyleContext> styleContext;      nsCOMPtr<nsIStyleContext> pseudoStyleContext;            primaryFrame->GetStyleContext(getter_AddRefs(styleContext));      mPresContext->ProbePseudoStyleContextFor(aContent,                                               nsCSSPseudoElements::after,                                               styleContext,                                               getter_AddRefs(pseudoStyleContext));      if (pseudoStyleContext) {        nsIFrame* afterFrame = nsLayoutUtils::GetAfterFrame(primaryFrame,                                                            mPresContext);        if (afterFrame)        {          NS_ASSERTION(afterFrame->IsGeneratedContentFrame(),                       "can't find generated content frame");          // Create an iterator          rv = NS_NewFrameContentIterator(mPresContext, afterFrame, aIterator);        }      }    }  }  return rv;}