Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Functions
nsXTFSVGVisualWrapper.cpp File Reference
#include "nsCOMPtr.h"
#include "nsXTFVisualWrapper.h"
#include "nsIXTFSVGVisual.h"
#include "nsXTFWeakTearoff.h"
#include "nsIXTFSVGVisualWrapper.h"

Go to the source code of this file.

Classes

class  nsXTFSVGVisualWrapper

Typedefs

typedef nsXTFVisualWrapper nsXTFSVGVisualWrapperBase

Functions

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

Typedef Documentation

Definition at line 45 of file nsXTFSVGVisualWrapper.cpp.


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: