Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsDocumentFragment.cpp File Reference
#include "nsISupports.h"
#include "nsIContent.h"
#include "nsIDOMDocumentFragment.h"
#include "nsGenericElement.h"
#include "nsINameSpaceManager.h"
#include "nsINodeInfo.h"
#include "nsNodeInfoManager.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMAttr.h"
#include "nsDOMError.h"
#include "nsIDOM3Node.h"
#include "nsLayoutAtoms.h"
#include "nsDOMString.h"

Go to the source code of this file.

Classes

class  nsDocumentFragment

Functions

nsresult NS_NewDocumentFragment (nsIDOMDocumentFragment **aInstancePtrResult, nsNodeInfoManager *aNodeInfoManager)

Function Documentation

nsresult NS_NewDocumentFragment ( nsIDOMDocumentFragment **  aInstancePtrResult,
nsNodeInfoManager aNodeInfoManager 
)

Definition at line 165 of file nsDocumentFragment.cpp.

{
  NS_ENSURE_ARG(aNodeInfoManager);

  nsCOMPtr<nsINodeInfo> nodeInfo;
  nsresult rv =
    aNodeInfoManager->GetNodeInfo(nsLayoutAtoms::documentFragmentNodeName,
                                  nsnull, kNameSpaceID_None,
                                  getter_AddRefs(nodeInfo));
  NS_ENSURE_SUCCESS(rv, rv);

  nsDocumentFragment *it = new nsDocumentFragment(nodeInfo);
  if (!it) {
    return NS_ERROR_OUT_OF_MEMORY;
  }

  *aInstancePtrResult = NS_STATIC_CAST(nsIDOMDocumentFragment *, it);

  NS_ADDREF(*aInstancePtrResult);

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: