nsRect rect(0, 0, mRect.width, mRect.height); nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this, aDirtyRect, rect, *color, 0, 0); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, aDirtyRect, rect, *spacing, skipSides);    if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) { PRBool clipState; aRenderingContext.PushState(); aRenderingContext.SetClipRect(nsRect(0, 0, mRect.width, mRect.height), nsClipCombine_kIntersect, clipState);
if (myList->mListStyleImage.Length() > 0) { nsIImage* image = mImageLoader.GetImage(); if (nsnull == image) { if (!mImageLoader.GetLoadImageFailed()) {  return NS_OK; } } else { nsRect innerArea(mPadding.left, mPadding.top, mRect.width - (mPadding.left + mPadding.right), mRect.height - (mPadding.top + mPadding.bottom)); aRenderingContext.DrawImage(image, innerArea); return NS_OK; }
nsBlockFrame::Paint(nsIPresContext&      aPresContext,                    nsIRenderingContext& aRenderingContext,                    const nsRect&        aDirtyRect){  const nsStyleDisplay* disp = (const nsStyleDisplay*)    mStyleContext->GetStyleData(eStyleStruct_Display);  if (disp->mVisible) {    PRIntn skipSides = GetSkipSides();    const nsStyleColor* color = (const nsStyleColor*)      mStyleContext->GetStyleData(eStyleStruct_Color);    const nsStyleSpacing* spacing = (const nsStyleSpacing*)      mStyleContext->GetStyleData(eStyleStruct_Spacing);    // Paint background and border    nsRect rect(0, 0, mRect.width, mRect.height);    nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,                                    aDirtyRect, rect, *color, 0, 0);    nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,                                aDirtyRect, rect, *spacing, skipSides);    // If overflow is hidden then set the clip rect so that children    // don't leak out of us    if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {      PRBool clipState;      aRenderingContext.PushState();      aRenderingContext.SetClipRect(nsRect(0, 0, mRect.width, mRect.height),                                    nsClipCombine_kIntersect, clipState);    }    PaintFloaters(aPresContext, aRenderingContext, aDirtyRect);    PaintChildren(aPresContext, aRenderingContext, aDirtyRect);    if (NS_STYLE_OVERFLOW_HIDDEN == disp->mOverflow) {      PRBool clipState;      aRenderingContext.PopState(clipState);    }  }  return NS_OK;}