if (nsIFrame::GetShowFrameBorders()) {
if (nsIFrameDebug::GetShowFrameBorders()) {
PresShell::Paint(nsIView              *aView,                 nsIRenderingContext& aRenderingContext,                 const nsRect&        aDirtyRect){  void*     clientData;  nsIFrame* frame;  nsresult  rv = NS_OK;  NS_ASSERTION(!(nsnull == aView), "null view");  aView->GetClientData(clientData);  frame = (nsIFrame *)clientData;        if (nsnull != frame)  {    StCaretHider  caretHider(this);			// stack-based class hides caret until dtor.    rv = frame->Paint(*mPresContext, aRenderingContext, aDirtyRect,                      NS_FRAME_PAINT_LAYER_BACKGROUND);    rv = frame->Paint(*mPresContext, aRenderingContext, aDirtyRect,                      NS_FRAME_PAINT_LAYER_FLOATERS);    rv = frame->Paint(*mPresContext, aRenderingContext, aDirtyRect,                      NS_FRAME_PAINT_LAYER_FOREGROUND);                                     #ifdef NS_DEBUG    // Draw a border around the frame    if (nsIFrame::GetShowFrameBorders()) {      nsRect r;      frame->GetRect(r);      aRenderingContext.SetColor(NS_RGB(0,0,255));      aRenderingContext.DrawRect(0, 0, r.width, r.height);    }#endif  }  return rv;}