Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs
nsGenericElement.h File Reference
#include "nsCOMPtr.h"
#include "nsAutoPtr.h"
#include "nsIXMLContent.h"
#include "nsIDOMElement.h"
#include "nsIDOMDocumentFragment.h"
#include "nsIDOMEventReceiver.h"
#include "nsIDOM3EventTarget.h"
#include "nsIDOM3Node.h"
#include "nsIDOMNSEventTarget.h"
#include "nsILinkHandler.h"
#include "nsGenericDOMNodeList.h"
#include "nsIEventListenerManager.h"
#include "nsContentUtils.h"
#include "pldhash.h"
#include "nsAttrAndChildArray.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nsChildContentList
 Class that implements the nsIDOMNodeList interface (a list of children of the content), by holding a reference to the content and delegating GetLength and Item to its existing child list. More...
class  nsDOMSlots
 There are a set of DOM- and scripting-specific instance variables that may only be instantiated when a content object is accessed through the DOM. More...
class  RangeListMapEntry
class  EventListenerManagerMapEntry
class  nsNode3Tearoff
 A tearoff class for nsGenericElement to implement the nsIDOM3Node functions. More...
class  nsDOMEventRTTearoff
 nsDOMEventRTTearoff is a tearoff class used by nsGenericElement and nsGenericDOMDataNode classes for implementing the interfaces nsIDOMEventReceiver and nsIDOMEventTarget More...
class  nsMutationGuard
 Class used to detect unexpected mutations. More...
class  nsGenericElement
 A generic base class for DOM elements, implementing many nsIContent, nsIDOMNode and nsIDOMElement methods. More...
struct  nsGenericElement::MappedAttributeEntry
union  nsDOMSlots.__unnamed__

Defines

#define GENERIC_ELEMENT_DOESNT_HAVE_DOMSLOTS   0x00000001U
 This bit will be set if the nsGenericElement doesn't have nsDOMSlots.
#define GENERIC_ELEMENT_HAS_RANGELIST   0x00000002U
 This bit will be set if the element has a range list in the range list hash.
#define GENERIC_ELEMENT_HAS_LISTENERMANAGER   0x00000004U
 This bit will be set if the element has a listener manager in the listener manager hash.
#define GENERIC_ELEMENT_IS_ANONYMOUS   0x00000008U
 Whether this content is anonymous.
#define GENERIC_ELEMENT_HAS_PROPERTIES   0x00000010U
 Whether this content has had any properties set on it.
#define GENERIC_ELEMENT_MAY_HAVE_FRAME   0x00000020U
 Whether this content may have a frame.
#define ELEMENT_TYPE_SPECIFIC_BITS_OFFSET   6
 Three bits are element type specific.
#define GENERIC_ELEMENT_CONTENT_ID_BITS_OFFSET   9
 The number of bits to shift the bit field to get at the content ID.
#define GENERIC_ELEMENT_CONTENT_ID_MASK   ((~PtrBits(0)) << GENERIC_ELEMENT_CONTENT_ID_BITS_OFFSET)
 This mask masks out the bits that are used for the content ID.
#define GENERIC_ELEMENT_CONTENT_ID_MAX_VALUE   ((PRUint32)((~PtrBits(0)) >> GENERIC_ELEMENT_CONTENT_ID_BITS_OFFSET))
 The largest value for content ID that fits in GENERIC_ELEMENT_CONTENT_ID_MASK.
#define PARENT_BIT_INDOCUMENT   ((PtrBits)0x1 << 0)
#define NS_EVENT_TEAROFF_CACHE_SIZE   4
#define NS_FORWARD_NSIDOMNODE_NO_CLONENODE(_to)
#define NS_IMPL_DOM_CLONENODE(_elementName)   NS_IMPL_DOM_CLONENODE_AMBIGUOUS(_elementName, nsIDOMNode)
 Macros to implement CloneNode().
#define NS_IMPL_DOM_CLONENODE_AMBIGUOUS(_elementName, _implClass)
#define NS_IMPL_DOM_CLONENODE_WITH_INIT(_elementName)

Typedefs

typedef unsigned long PtrBits

Class Documentation

struct nsGenericElement::MappedAttributeEntry

Definition at line 540 of file nsGenericElement.h.

Collaboration diagram for nsGenericElement::MappedAttributeEntry:
Class Members
nsIAtom ** attribute
union nsDOMSlots.__unnamed__

Definition at line 180 of file nsGenericElement.h.

Class Members
nsIContent * mBindingParent The nearest enclosing content node with a binding that created us.
See also:
nsGenericElement::GetBindingParent
nsIControllers * mControllers The controllers of the XUL Element.

Define Documentation

Three bits are element type specific.

Definition at line 98 of file nsGenericElement.h.

The number of bits to shift the bit field to get at the content ID.

Definition at line 101 of file nsGenericElement.h.

This mask masks out the bits that are used for the content ID.

Definition at line 104 of file nsGenericElement.h.

The largest value for content ID that fits in GENERIC_ELEMENT_CONTENT_ID_MASK.

Definition at line 111 of file nsGenericElement.h.

This bit will be set if the nsGenericElement doesn't have nsDOMSlots.

Definition at line 75 of file nsGenericElement.h.

This bit will be set if the element has a listener manager in the listener manager hash.

Definition at line 86 of file nsGenericElement.h.

Whether this content has had any properties set on it.

Definition at line 92 of file nsGenericElement.h.

This bit will be set if the element has a range list in the range list hash.

Definition at line 80 of file nsGenericElement.h.

Whether this content is anonymous.

Definition at line 89 of file nsGenericElement.h.

Whether this content may have a frame.

Definition at line 95 of file nsGenericElement.h.

Definition at line 270 of file nsGenericElement.h.

Definition at line 887 of file nsGenericElement.h.

#define NS_IMPL_DOM_CLONENODE (   _elementName)    NS_IMPL_DOM_CLONENODE_AMBIGUOUS(_elementName, nsIDOMNode)

Macros to implement CloneNode().

Definition at line 968 of file nsGenericElement.h.

#define NS_IMPL_DOM_CLONENODE_AMBIGUOUS (   _elementName,
  _implClass 
)
Value:
NS_IMETHODIMP                                                               \
_elementName::CloneNode(PRBool aDeep, nsIDOMNode **aResult)                 \
{                                                                           \
  *aResult = nsnull;                                                        \
                                                                            \
  _elementName *it = new _elementName(mNodeInfo);                           \
  if (!it) {                                                                \
    return NS_ERROR_OUT_OF_MEMORY;                                          \
  }                                                                         \
                                                                            \
  nsCOMPtr<nsIDOMNode> kungFuDeathGrip = NS_STATIC_CAST(_implClass*, it);   \
                                                                            \
  nsresult rv = CopyInnerTo(it, aDeep);                                     \
  if (NS_SUCCEEDED(rv)) {                                                   \
    kungFuDeathGrip.swap(*aResult);                                         \
  }                                                                         \
                                                                            \
  return rv;                                                                \
}

Definition at line 971 of file nsGenericElement.h.

Value:
NS_IMETHODIMP                                                               \
_elementName::CloneNode(PRBool aDeep, nsIDOMNode **aResult)                 \
{                                                                           \
  *aResult = nsnull;                                                        \
                                                                            \
  _elementName *it = new _elementName(mNodeInfo);                           \
  if (!it) {                                                                \
    return NS_ERROR_OUT_OF_MEMORY;                                          \
  }                                                                         \
                                                                            \
  nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);                                 \
                                                                            \
  nsresult rv = it->Init();                                                 \
                                                                            \
  rv |= CopyInnerTo(it, aDeep);                                             \
  if (NS_SUCCEEDED(rv)) {                                                   \
    kungFuDeathGrip.swap(*aResult);                                         \
  }                                                                         \
                                                                            \
  return rv;                                                                \
}

Definition at line 992 of file nsGenericElement.h.

Definition at line 115 of file nsGenericElement.h.


Typedef Documentation

typedef unsigned long PtrBits

Definition at line 68 of file nsGenericElement.h.