else if (display->IsFloating() || display->IsPositioned()) {
else if (display->IsFloating() || display->IsAbsolutelyPositioned()) {
FindPreviousSibling(nsIPresShell* aPresShell,                    nsIContent*   aContainer,                    PRInt32       aIndexInContainer){  NS_ASSERTION(aPresShell && aContainer, "null arguments");  ChildIterator first, iter;  ChildIterator::Init(aContainer, &first, &iter);  iter.seek(aIndexInContainer);  // Note: not all content objects are associated with a frame (e.g., if it's  // `display: hidden') so keep looking until we find a previous frame  while (iter-- != first) {    nsIFrame* prevSibling = nsnull;    aPresShell->GetPrimaryFrameFor(nsCOMPtr<nsIContent>(*iter), &prevSibling);    if (prevSibling) {      // The frame may have a continuation. Get the last-in-flow      nsIFrame* nextInFlow;      while (1) {        prevSibling->GetNextInFlow(&nextInFlow);        if (! nextInFlow)          break;        prevSibling = nextInFlow;      }      // If the frame is out-of-flow, GPFF() will have returned the      // out-of-flow frame; we want the placeholder.      const nsStyleDisplay* display;      prevSibling->GetStyleData(eStyleStruct_Display,                                (const nsStyleStruct*&)display);      if (display->mDisplay == NS_STYLE_DISPLAY_POPUP) {        nsIFrame* placeholderFrame;        aPresShell->GetPlaceholderFrameFor(prevSibling, &placeholderFrame);        if (prevSibling)          prevSibling = placeholderFrame;      }      else if (display->IsFloating() || display->IsPositioned()) {        nsIFrame* placeholderFrame;        aPresShell->GetPlaceholderFrameFor(prevSibling, &placeholderFrame);        NS_ASSERTION(placeholderFrame, "no placeholder for out-of-flow frame");        prevSibling = placeholderFrame;      }#ifdef DEBUG      nsIFrame* containerFrame = nsnull;      aPresShell->GetPrimaryFrameFor(aContainer, &containerFrame);      NS_ASSERTION(prevSibling != containerFrame, "Previous Sibling is the Container's frame");#endif      // Found a previous sibling, we're done!      return prevSibling;    }  }  return nsnull;}