else if (contentOffset != mContentLength) return NS_ERROR_FAILURE;
else { #ifdef IBMBIDI nsIFrame *nextBidi; GetNextSibling(&nextBidi); if (nextBidi) return nextBidi->GetChildFrameContainingOffset(inContentOffset, inHint, outFrameContentOffset, outChildFrame); else #endif { if (contentOffset != mContentLength) return NS_ERROR_FAILURE; } }
nsTextFrame::GetChildFrameContainingOffset(PRInt32 inContentOffset,                                           PRBool  inHint,                                           PRInt32* outFrameContentOffset,                                           nsIFrame **outChildFrame){  if (nsnull == outChildFrame)    return NS_ERROR_NULL_POINTER;  nsresult result;  PRInt32 contentOffset = inContentOffset;    if (contentOffset != -1) //-1 signified the end of the current content    contentOffset = inContentOffset - mContentOffset;  if ((contentOffset > mContentLength) || ((contentOffset == mContentLength) && inHint) )  {    //this is not the frame we are looking for.    nsIFrame *nextInFlow;    GetNextInFlow(&nextInFlow);    if (nextInFlow)    {      return nextInFlow->GetChildFrameContainingOffset(inContentOffset, inHint, outFrameContentOffset, outChildFrame);    }    else if (contentOffset != mContentLength) //that condition was only for when there is a choice      return NS_ERROR_FAILURE;  }  if (inContentOffset < mContentOffset) //could happen with floaters!  {    result = GetPrevInFlow(outChildFrame);    if (NS_SUCCEEDED(result) && outChildFrame)      return (*outChildFrame)->GetChildFrameContainingOffset(inContentOffset, inHint,        outFrameContentOffset,outChildFrame);    else      return result;  }    *outFrameContentOffset = contentOffset;  *outChildFrame = this;  return NS_OK;}