Back to index

lightning-sunbird  0.9+nobinonly
Functions
nsXTFSVGVisualWrapper.h File Reference

Go to the source code of this file.

Functions

nsresult NS_NewXTFSVGVisualWrapper (nsIXTFSVGVisual *xtfElement, nsINodeInfo *ni, nsIContent **aResult)

Function Documentation

nsresult NS_NewXTFSVGVisualWrapper ( nsIXTFSVGVisual xtfElement,
nsINodeInfo ni,
nsIContent **  aResult 
)

Definition at line 131 of file nsXTFSVGVisualWrapper.cpp.

{
  *aResult = nsnull;

  if (!xtfElement) {
    NS_ERROR("can't construct an xtf wrapper without an xtf element");
    return NS_ERROR_FAILURE;
  }
  
  nsXTFSVGVisualWrapper* result = new nsXTFSVGVisualWrapper(ni, xtfElement);
  if (!result)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(result);

  nsresult rv = result->Init();

  if (NS_FAILED(rv)) {
    NS_RELEASE(result);
    return rv;
  }

  *aResult = result;
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: