NS_IMETHODIMP nsDeviceContextXp :: CreateRenderingContext(nsIRenderingContext *&aContext) { nsresult  rv = NS_ERROR_OUT_OF_MEMORY;  nsCOMPtr<nsRenderingContextXp> xpContext;  xpContext = new nsRenderingContextXp(); if (xpContext) { rv = xpContext->Init(this); }  if (NS_SUCCEEDED(rv)) { aContext = xpContext; NS_ADDREF(aContext); } return rv; }
NS_IMETHOD  CreateRenderingContext(nsIWidget *aWidget, nsIRenderingContext *&aContext) {return (DeviceContextImpl::CreateRenderingContext(aWidget,aContext));}
NS_IMETHODIMP nsDeviceContextXp :: CreateRenderingContext(nsIRenderingContext *&aContext){   nsresult  rv = NS_ERROR_OUT_OF_MEMORY;   nsCOMPtr<nsRenderingContextXp> xpContext;   xpContext = new nsRenderingContextXp();   if (xpContext) {     rv = xpContext->Init(this);   }   if (NS_SUCCEEDED(rv)) {     aContext = xpContext;     NS_ADDREF(aContext);   }   return rv;}