rv = frame->GetNextInFlow(&frame);
frame = frame->GetNextInFlow();
ContentContainsPoint(nsPresContext *aPresContext,                     nsIContent *aContent,                     nsPoint *aPoint,                     nsIView *aRelativeView){  nsIPresShell *presShell = aPresContext->GetPresShell();  if (!presShell) return PR_FALSE;  nsIFrame *frame = nsnull;  nsresult rv = presShell->GetPrimaryFrameFor(aContent, &frame);  if (NS_FAILED(rv) || !frame) return PR_FALSE;  nsIView *frameView = nsnull;  nsPoint offsetPoint;  // Get the view that contains the content's frame.  rv = frame->GetOffsetFromView(aPresContext, offsetPoint, &frameView);  if (NS_FAILED(rv) || !frameView) return PR_FALSE;  // aPoint is relative to aRelativeView's upper left corner! Make sure  // that our point is in the same view space our content frame's  // rects are in.  nsPoint point(*aPoint);  if (frameView != aRelativeView) {    // Views are different, just assume frameView is an ancestor    // of aRelativeView and walk up the view hierarchy calculating what    // the actual point is, relative to frameView.    while (aRelativeView && aRelativeView != frameView) {      point += aRelativeView->GetPosition();      aRelativeView = aRelativeView->GetParent();    }    // At this point the point should be in the correct    // view coordinate space. If not, just bail!    if (aRelativeView != frameView) return PR_FALSE;  }  // Now check to see if the point is within the bounds of the  // content's primary frame, or any of it's continuation frames.  while (frame) {    // Get the frame's rect and make it relative to the    // upper left corner of it's parent view.    nsRect frameRect = frame->GetRect();    frameRect.x = offsetPoint.x;    frameRect.y = offsetPoint.y;    if (frameRect.x <= point.x &&        frameRect.XMost() >= point.x &&        frameRect.y <= point.y &&        frameRect.YMost() >= point.y) {      // point is within this frame's rect!      return PR_TRUE;    }    rv = frame->GetNextInFlow(&frame);    if (NS_FAILED(rv)) return PR_FALSE;  }  return PR_FALSE;}