for (PRInt32 index = aIndexInContainer - 1; index > 0; index--) {
for (PRInt32 index = aIndexInContainer - 1; index >= 0; index--) {
FindPreviousSibling(nsIPresShell* aPresShell,                    nsIContent*   aContainer,                    PRInt32       aIndexInContainer){  nsIFrame* prevSibling = nsnull;  // Note: not all content objects are associated with a frame so  // keep looking until we find a previous frame  for (PRInt32 index = aIndexInContainer - 1; index > 0; index--) {    nsIContent* precedingContent;    aContainer->ChildAt(index, precedingContent);    prevSibling = aPresShell->FindFrameWithContent(precedingContent);    NS_RELEASE(precedingContent);    if (nsnull != prevSibling) {      // The frame may have a next-in-flow. Get the last-in-flow      nsIFrame* nextInFlow;      do {        prevSibling->GetNextInFlow(nextInFlow);        if (nsnull != nextInFlow) {          prevSibling = nextInFlow;        }      } while (nsnull != nextInFlow);      break;    }  }  return prevSibling;}