nsObjectFrame::Paint(nsIPresContext* aPresContext, nsIRenderingContext& aRenderingContext, const nsRect& aDirtyRect, nsFramePaintLayer aWhichLayer)
void nsPluginInstanceOwner::Paint(const nsRect& aDirtyRect, PRUint32 ndc)
nsObjectFrame::Paint(nsIPresContext* aPresContext,                     nsIRenderingContext& aRenderingContext,                     const nsRect& aDirtyRect,                     nsFramePaintLayer aWhichLayer){  // determine if we are a printcontext  nsCOMPtr<nsIPrintContext> thePrinterContext = do_QueryInterface(aPresContext);  if  (thePrinterContext) {    // we are printing bail for now    return NS_OK;  }  const nsStyleVisibility* vis = (const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);  if ((vis != nsnull) && !vis->IsVisibleOrCollapsed()) {    return NS_OK;  }    nsIFrame * child = mFrames.FirstChild();  if (child != NULL) {    // This is an image    nsObjectFrameSuper::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);    return NS_OK;  }#if defined (XP_MAC)    // delegate all painting to the plugin instance.    if ((NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer) && (nsnull != mInstanceOwner)) {        mInstanceOwner->Paint(aDirtyRect);    }#elif defined (XP_PC)    if (NS_FRAME_PAINT_LAYER_FOREGROUND == aWhichLayer)     {        nsIPluginInstance * inst;        if (NS_OK == GetPluginInstance(inst))        {            NS_RELEASE(inst);            // Look if it's windowless            nsPluginWindow * window;            mInstanceOwner->GetWindow(window);            if (window->type == nsPluginWindowType_Drawable)            {                PRUint32 hdc;                aRenderingContext.RetrieveCurrentNativeGraphicData(&hdc);                mInstanceOwner->Paint(aDirtyRect, hdc);            }        }    }#endif /* !XP_MAC */    DO_GLOBAL_REFLOW_COUNT_DSP("nsObjectFrame", &aRenderingContext);    return NS_OK;}