if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) { if ((nsnull != mBullet) && HaveOutsideBullet()) {
PRBool renderEverything = PR_TRUE; if (NS_STYLE_OVERFLOW_VISIBLE != disp->mOverflow) { renderEverything = PR_FALSE; }  if ((nsnull == mPrevInFlow) && (nsnull != mBullet)) { const nsStyleList* list; GetStyleData(eStyleStruct_List, (const nsStyleStruct*&)list); if (NS_STYLE_LIST_STYLE_POSITION_OUTSIDE == list->mListStylePosition) {
nsBlockFrame::PaintChildren(nsIPresContext* aPresContext,                            nsIRenderingContext& aRenderingContext,                            const nsRect& aDirtyRect,                            nsFramePaintLayer aWhichLayer){#ifdef DEBUG  PRInt32 depth = 0;  if (gNoisyDamageRepair) {    if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {      depth = GetDepth();    }  }  PRTime start = LL_ZERO; // Initialize these variables to silence the compiler.  PRInt32 drawnLines = 0; // They will only be used if set (gLamePaintMetrics).  if (gLamePaintMetrics) {    start = PR_Now();    drawnLines = 0;  }#endif  for (nsLineBox* line = mLines; nsnull != line; line = line->mNext) {    // If the line's combined area (which includes child frames that    // stick outside of the line's bounding box or our bounding box)    // intersects the dirty rect then paint the line.    if (line->CombinedAreaIntersects(aDirtyRect)) {#ifdef DEBUG      if (gNoisyDamageRepair &&          (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer)) {        nsRect lineCombinedArea;        line->GetCombinedArea(&lineCombinedArea);        nsFrame::IndentBy(stdout, depth+1);        printf("draw line=%p bounds=%d,%d,%d,%d ca=%d,%d,%d,%d\n",               line, line->mBounds.x, line->mBounds.y,               line->mBounds.width, line->mBounds.height,               lineCombinedArea.x, lineCombinedArea.y,               lineCombinedArea.width, lineCombinedArea.height);      }      if (gLamePaintMetrics) {        drawnLines++;      }#endif      nsIFrame* kid = line->mFirstChild;      PRInt32 n = line->GetChildCount();      while (--n >= 0) {        PaintChild(aPresContext, aRenderingContext, aDirtyRect, kid,                   aWhichLayer);        kid->GetNextSibling(&kid);      }    }#ifdef DEBUG    else {      if (gNoisyDamageRepair &&          (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer)) {        nsRect lineCombinedArea;        line->GetCombinedArea(&lineCombinedArea);        nsFrame::IndentBy(stdout, depth+1);        printf("skip line=%p bounds=%d,%d,%d,%d ca=%d,%d,%d,%d\n",               line, line->mBounds.x, line->mBounds.y,               line->mBounds.width, line->mBounds.height,               lineCombinedArea.x, lineCombinedArea.y,               lineCombinedArea.width, lineCombinedArea.height);      }    }#endif    }  if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) {    if ((nsnull != mBullet) && HaveOutsideBullet()) {      // Paint outside bullets manually      PaintChild(aPresContext, aRenderingContext, aDirtyRect, mBullet,                 aWhichLayer);    }  }#ifdef DEBUG  if (gLamePaintMetrics) {    PRTime end = PR_Now();    PRInt32 numLines = nsLineBox::ListLength(mLines);    if (!numLines) numLines = 1;    PRTime lines, deltaPerLine, delta;    LL_I2L(lines, numLines);    LL_SUB(delta, end, start);    LL_DIV(deltaPerLine, delta, lines);    ListTag(stdout);    char buf[400];    PR_snprintf(buf, sizeof(buf),                ": %lld elapsed (%lld per line) lines=%d drawn=%d skip=%d",                delta, deltaPerLine,                numLines, drawnLines, numLines - drawnLines);    printf("%s\n", buf);  }#endif}