if (disp->mVisible) {
if (disp->IsVisible()) {
nsTextFrame::Paint(nsIPresContext* aPresContext,                   nsIRenderingContext& aRenderingContext,                   const nsRect& aDirtyRect,                   nsFramePaintLayer aWhichLayer){  if (NS_FRAME_PAINT_LAYER_FOREGROUND != aWhichLayer) {    return NS_OK;  }  if ((0 != (mState & TEXT_BLINK_ON)) && gBlinkTextOff) {    return NS_OK;  }  nsIStyleContext* sc = mStyleContext;  const nsStyleDisplay* disp = (const nsStyleDisplay*)    sc->GetStyleData(eStyleStruct_Display);  if (disp->mVisible) {    TextStyle ts(aPresContext, aRenderingContext, mStyleContext);    if (ts.mSmallCaps || (0 != ts.mWordSpacing) || (0 != ts.mLetterSpacing)) {      PaintTextSlowly(aPresContext, aRenderingContext, sc, ts, 0, 0);    }    else {      // Choose rendering pathway based on rendering context      // performance hint.      PRUint32 hints = 0;      aRenderingContext.GetHints(hints);      if ((TEXT_HAS_MULTIBYTE & mState) ||          (0 == (hints & NS_RENDERING_HINT_FAST_8BIT_TEXT))) {        // Use PRUnichar rendering routine        PaintUnicodeText(aPresContext, aRenderingContext, sc, ts, 0, 0);      }      else {        // Use char rendering routine        PaintAsciiText(aPresContext, aRenderingContext, sc, ts, 0, 0);      }    }  }  return NS_OK;}