parent->GetFirstInFlow()->FirstChild(aPresContext, nsnull, &parent);
parent = parent->GetFirstInFlow()->GetFirstChild(nsnull);
GetCorrectedParent(nsIPresContext* aPresContext, nsIFrame* aFrame,                   nsIFrame** aSpecialParent){  nsIFrame *parent = aFrame->GetParent();  *aSpecialParent = parent;  if (parent) {    nsIAtom* parentPseudo = parent->GetStyleContext()->GetPseudoType();    if (parentPseudo == nsCSSAnonBoxes::mozGCWrapperBlock ||        parentPseudo == nsCSSAnonBoxes::mozGCWrapperInline) {      nsIAtom* pseudo = aFrame->GetStyleContext()->GetPseudoType();      if (pseudo == nsCSSPseudoElements::before) {        // Use the wrapped frame, which is after the |:before|.        parent = GetNextSiblingAcrossLines(aPresContext, aFrame);      } else if (pseudo == nsCSSPseudoElements::after) {        parent->GetFirstInFlow()->FirstChild(aPresContext, nsnull, &parent);        // Now we have either the wrapped frame or the :before, but we        // want the wrapped frame.        if (parent->GetStyleContext()->GetPseudoType() ==            nsCSSPseudoElements::before)          parent = GetNextSiblingAcrossLines(aPresContext, parent);      } else {        parent = parent->GetParent();      }      parentPseudo = parent->GetStyleContext()->GetPseudoType();    }    // if this frame itself is not scrolled-content, then skip any scrolled-content    // parents since they're basically anonymous as far as the style system goes    if (parentPseudo == nsCSSAnonBoxes::scrolledContent) {      nsIAtom* pseudo = aFrame->GetStyleContext()->GetPseudoType();      if (pseudo != nsCSSAnonBoxes::scrolledContent) {        do {          parent = parent->GetParent();          parentPseudo = parent->GetStyleContext()->GetPseudoType();        } while (parentPseudo == nsCSSAnonBoxes::scrolledContent);      }    }    if (parent->GetStateBits() & NS_FRAME_IS_SPECIAL) {      GetIBSpecialSibling(aPresContext, parent, aSpecialParent);    } else {      *aSpecialParent = parent;    }  }  return NS_OK;}