Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsDOMSlots Class Reference

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...

#include <nsGenericElement.h>

Collaboration diagram for nsDOMSlots:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsDOMSlots (PtrBits aFlags)
 ~nsDOMSlots ()
PRBool IsEmpty ()

Public Attributes

PtrBits mFlags
nsRefPtr< nsChildContentListmChildNodes
 An object implementing nsIDOMNodeList for this content (childNodes)
nsRefPtr< nsDOMCSSDeclarationmStyle
 The .style attribute (an interface that forwards to the actual style rules)
nsRefPtr< nsDOMAttributeMapmAttributeMap
 An object implementing nsIDOMNamedNodeMap for this content (attributes)
union nsDOMSlots.__unnamed__ 
PRUint32 mContentID

Detailed Description

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.

Rather than burn actual slots in the content objects for each of these instance variables, we put them off in a side structure that's only allocated when the content is accessed through the DOM.

Definition at line 151 of file nsGenericElement.h.


Constructor & Destructor Documentation

Definition at line 777 of file nsGenericElement.cpp.

{
  if (mChildNodes) {
    mChildNodes->DropReference();
  }

  if (mStyle) {
    mStyle->DropReference();
  }

  if (mAttributeMap) {
    mAttributeMap->DropReference();
  }
}

Member Function Documentation

Definition at line 793 of file nsGenericElement.cpp.

{
  return (!mChildNodes && !mStyle && !mAttributeMap && !mBindingParent &&
          mContentID < GENERIC_ELEMENT_CONTENT_ID_MAX_VALUE);
}

Member Data Documentation

union { ... }

An object implementing nsIDOMNamedNodeMap for this content (attributes)

See also:
nsGenericElement::GetAttributes

Definition at line 178 of file nsGenericElement.h.

An object implementing nsIDOMNodeList for this content (childNodes)

See also:
nsIDOMNodeList
nsGenericHTMLElement::GetChildNodes

Definition at line 166 of file nsGenericElement.h.

Definition at line 194 of file nsGenericElement.h.

Definition at line 159 of file nsGenericElement.h.

The .style attribute (an interface that forwards to the actual style rules)

See also:
nsGenericHTMLElement::GetStyle

Definition at line 172 of file nsGenericElement.h.


The documentation for this class was generated from the following files: