if (kidContent == aContent) {
if (kidContent.get() == aContent) {
FindFrameWithTextContent(nsIFrame* aFrame, nsIContent* aContent){  NS_ASSERTION(aFrame, "No frame to search!");  if (!aFrame) {    return nsnull;     }  // Get aFrame's content object  nsCOMPtr<nsIContent>  frameContent;  aFrame->GetContent(getter_AddRefs(frameContent));  // Because text is anonymous and can't be moved out of the flow,  // we only need to search the principal child list  nsIFrame* kidFrame;  aFrame->FirstChild(nsnull, &kidFrame);  while (kidFrame) {    nsCOMPtr<nsIContent>  kidContent;    // See if the frame points to the same content object    kidFrame->GetContent(getter_AddRefs(kidContent));    if (kidContent == aContent) {      return kidFrame;    }    // Search the immediate children only, but if the child frame maps    // the same content as its parent then we need to search its child    // frames, too    if (kidContent == frameContent) {      nsIFrame* matchingFrame = FindFrameWithTextContent(kidFrame, aContent);      if (matchingFrame) {        return matchingFrame;      }    }    // Get the next sibling frame    kidFrame->GetNextSibling(&kidFrame);  }  return nsnull;}