if (nsnull != nextSibling) {
if (nextSibling) { #ifdef DEBUG
FindNextSibling(nsIPresShell* aPresShell,                nsIContent*   aContainer,                PRInt32       aIndexInContainer){  nsIFrame* nextSibling = nsnull;  // Note: not all content objects are associated with a frame (e.g., if their  // 'display' type is 'hidden') so keep looking until we find a previous frame  PRInt32 count;  aContainer->ChildCount(count);  for (PRInt32 i = aIndexInContainer + 1; i < count; i++) {    nsCOMPtr<nsIContent> nextContent;    aContainer->ChildAt(i, *getter_AddRefs(nextContent));    aPresShell->GetPrimaryFrameFor(nextContent, &nextSibling);    if (nsnull != nextSibling) {      // The frame may have a next-in-flow. Get the first-in-flow      nsIFrame* prevInFlow;      do {        nextSibling->GetPrevInFlow(&prevInFlow);        if (nsnull != prevInFlow) {          nextSibling = prevInFlow;        }      } while (nsnull != prevInFlow);      // Did we really get the *right* frame?      const nsStyleDisplay* display;      nextSibling->GetStyleData(eStyleStruct_Display,                                (const nsStyleStruct*&)display);      if (display->IsFloating() || display->IsPositioned()) {        // Nope. Get the place-holder instead        nsIFrame* placeholderFrame;        aPresShell->GetPlaceholderFrameFor(nextSibling, &placeholderFrame);        NS_ASSERTION(nsnull != placeholderFrame, "yikes");        nextSibling = placeholderFrame;      }      break;    }  }  return nextSibling;}