Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsXFormsCopyElement.cpp File Reference
#include "nsIXFormsCopyElement.h"
#include "nsXFormsStubElement.h"
#include "nsIXTFGenericElementWrapper.h"
#include "nsXFormsUtils.h"
#include "nsIDOMElement.h"
#include "nsString.h"
#include "nsIXFormsItemElement.h"

Go to the source code of this file.

Classes

class  nsXFormsCopyElement
 Implementation of the XForms <copy> element. More...

Functions

 NS_IMPL_ISUPPORTS_INHERITED1 (nsXFormsCopyElement, nsXFormsStubElement, nsIXFormsCopyElement) NS_IMETHODIMP nsXFormsCopyElement
 NS_NewXFormsCopyElement (nsIXTFElement **aResult)

Function Documentation

Definition at line 77 of file nsXFormsCopyElement.cpp.

{
  aWrapper->SetNotificationMask(nsIXTFElement::NOTIFY_PARENT_CHANGED |
                                nsIXTFElement::NOTIFY_DOCUMENT_CHANGED);

  nsCOMPtr<nsIDOMElement> node;
  aWrapper->GetElementNode(getter_AddRefs(node));

  // It's ok to keep pointer to mElement.  mElement will have an
  // owning reference to this object, so as long as we null out mElement in
  // OnDestroyed, it will always be valid.

  mElement = node;
  NS_ASSERTION(mElement, "Wrapper is not an nsIDOMElement, we'll crash soon");

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 169 of file nsXFormsCopyElement.cpp.

{
  *aResult = new nsXFormsCopyElement();
  if (!*aResult)
    return NS_ERROR_OUT_OF_MEMORY;

  NS_ADDREF(*aResult);
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function: