aFrame->GetStyleContext(&styleContext); styleContext->GetPseudoType(pseudoType);
nsCOMPtr<nsIAtom> pseudoType = styleContext->GetPseudoType();
IsGeneratedContentFor(nsIContent* aContent, nsIFrame* aFrame, nsIAtom* aPseudoElement){  NS_PRECONDITION(aFrame, "null frame pointer");  nsFrameState  state;  PRBool        result = PR_FALSE;  // First check the frame state bit  aFrame->GetFrameState(&state);  if (state & NS_FRAME_GENERATED_CONTENT) {    nsIContent* content;    // Check that it has the same content pointer    aFrame->GetContent(&content);    if (content == aContent) {      nsIStyleContext* styleContext;      nsIAtom*         pseudoType;      // See if the pseudo element type matches      aFrame->GetStyleContext(&styleContext);      styleContext->GetPseudoType(pseudoType);      result = (pseudoType == aPseudoElement);      NS_RELEASE(styleContext);      NS_IF_RELEASE(pseudoType);    }    NS_IF_RELEASE(content);