printf("  next textRun=");
PRINTF("  next textRun=");
nsTextFrame::ComputeTotalWordWidth(nsIPresContext* aPresContext,                                   nsILineBreaker* aLineBreaker,                                   nsLineLayout& aLineLayout,                                   const nsHTMLReflowState& aReflowState,                                   nsIFrame* aNextFrame,                                   nscoord aBaseWidth,                                   PRUnichar* aWordBuf,                                   PRUint32 aWordLen,                                   PRUint32 aWordBufSize){  // Before we get going, convert any spaces in the current word back  // to nbsp's. This keeps the breaking logic happy.  RevertSpacesToNBSP(aWordBuf, (PRInt32) aWordLen);  nscoord addedWidth = 0;  while (nsnull != aNextFrame) {    nsIContent* content = nsnull;    if ((NS_OK == aNextFrame->GetContent(&content)) && (nsnull != content)) {#ifdef DEBUG_WORD_WRAPPING      printf("  next textRun=");      nsFrame::ListTag(stdout, aNextFrame);      printf("\n");#endif      nsITextContent* tc;      if (NS_OK == content->QueryInterface(kITextContentIID, (void**)&tc)) {        PRBool stop = PR_FALSE;        nscoord moreWidth = ComputeWordFragmentWidth(aPresContext,                                                     aLineBreaker,                                                     aLineLayout,                                                     aReflowState,                                                     aNextFrame, content, tc,                                                     &stop,                                                     aWordBuf,                                                     aWordLen,                                                     aWordBufSize);        NS_RELEASE(tc);        NS_RELEASE(content);        addedWidth += moreWidth;#ifdef DEBUG_WORD_WRAPPING        printf("  moreWidth=%d (addedWidth=%d) stop=%c\n", moreWidth,               addedWidth, stop?'T':'F');#endif        if (stop) {          goto done;        }      }      else {        // It claimed it was text but it doesn't implement the        // nsITextContent API. Therefore I don't know what to do with it        // and can't look inside it. Oh well.        NS_RELEASE(content);        goto done;      }    }    // Move on to the next frame in the text-run    aNextFrame = aLineLayout.FindNextText(aPresContext, aNextFrame);  } done:;#ifdef DEBUG_WORD_WRAPPING  printf("  total word width=%d\n", aBaseWidth + addedWidth);#endif  return aBaseWidth + addedWidth;}