Logo Search packages:      
Sourcecode: xulrunner version File versions  Download package

nsGenericElement Class Reference

#include <nsGenericElement.h>

Inheritance diagram for nsGenericElement:

nsIXMLContent nsIContent nsIDOMGCParticipant nsISupports nsGenericHTMLElement nsGenericHTMLFormElement nsGenericHTMLFrameElement nsHTMLOptGroupElement nsHTMLOptionElement nsGenConImageContent nsHTMLSelectElement

List of all members.


Detailed Description

A generic base class for DOM elements, implementing many nsIContent, nsIDOMNode and nsIDOMElement methods.

Definition at line 426 of file nsGenericElement.h.


Public Types

enum  {
  eTEXT = 0x00000001, eELEMENT = 0x00000002, eHTML = 0x00000004, eHTML_FORM_CONTROL = 0x00000008,
  eXUL = 0x00000010, ePROCESSING_INSTRUCTION = 0x00000020, eSVG = 0x00000040, eCOMMENT = 0x00000080
}
enum  ETabFocusType { eTabFocus_formElementsMask = (1<<1), eTabFocus_linksMask = (1<<2), eTabFocus_any = 1 + (1<<1) + (1<<2) }

Public Member Functions

nsresult AddScriptEventListener (nsIAtom *aAttribute, const nsAString &aValue)
NS_IMETHOD AppendChild (nsIDOMNode *aNewChild, nsIDOMNode **aReturn)
virtual nsresult AppendChildTo (nsIContent *aKid, PRBool aNotify)
virtual void AppendReachableList (nsCOMArray< nsIDOMGCParticipant > &aArray)
virtual void BeginAddingChildren ()
virtual nsresult BindToTree (nsIDocument *aDocument, nsIContent *aParent, nsIContent *aBindingParent, PRBool aCompileEventHandlers)
virtual PRUint32 ContentID () const
virtual nsresult DeleteProperty (nsIAtom *aPropertyName)
virtual void DoneAddingChildren ()
virtual void DoneCreatingElement ()
virtual nsresult GetAttr (PRInt32 aNameSpaceID, nsIAtom *aName, nsAString &aResult) const
virtual PRUint32 GetAttrCount () const
NS_IMETHOD GetAttribute (const nsAString &aName, nsAString &aReturn)
virtual nsChangeHint GetAttributeChangeHint (const nsIAtom *aAttribute, PRInt32 aModType) const
NS_IMETHOD GetAttributeNode (const nsAString &aName, nsIDOMAttr **aReturn)
NS_IMETHOD GetAttributeNodeNS (const nsAString &aNamespaceURI, const nsAString &aLocalName, nsIDOMAttr **aReturn)
NS_IMETHOD GetAttributeNS (const nsAString &aNamespaceURI, const nsAString &aLocalName, nsAString &aReturn)
NS_IMETHOD GetAttributes (nsIDOMNamedNodeMap **aAttributes)
virtual nsresult GetAttrNameAt (PRUint32 aIndex, PRInt32 *aNameSpaceID, nsIAtom **aName, nsIAtom **aPrefix) const
virtual already_AddRefed< nsIURI > GetBaseURI () const
virtual nsIContentGetBindingParent () const
virtual nsIContentGetChildAt (PRUint32 aIndex) const
virtual PRUint32 GetChildCount () const
NS_IMETHOD GetChildNodes (nsIDOMNodeList **aChildNodes)
virtual nsIAtom * GetClassAttributeName () const
virtual const nsAttrValue * GetClasses () const
nsIDocument * GetCurrentDoc () const
nsIDocument * GetDocument () const
NS_IMETHOD GetElementsByTagName (const nsAString &aTagname, nsIDOMNodeList **aReturn)
NS_IMETHOD GetElementsByTagNameNS (const nsAString &aNamespaceURI, const nsAString &aLocalName, nsIDOMNodeList **aReturn)
virtual already_AddRefed
< nsINodeInfo > 
GetExistingAttrNameFromQName (const nsAString &aStr) const
NS_IMETHOD GetFirstChild (nsIDOMNode **aFirstChild)
virtual nsIAtom * GetID () const
virtual nsIAtom * GetIDAttributeName () const
virtual nsICSSStyleRule * GetInlineStyleRule ()
NS_IMETHOD GetLastChild (nsIDOMNode **aLastChild)
virtual nsresult GetListenerManager (nsIEventListenerManager **aResult)
NS_IMETHOD GetLocalName (nsAString &aLocalName)
virtual PRInt32 GetNameSpaceID () const
NS_IMETHOD GetNamespaceURI (nsAString &aNamespaceURI)
NS_IMETHOD GetNextSibling (nsIDOMNode **aNextSibling)
virtual nsINodeInfo * GetNodeInfo () const
NS_IMETHOD GetNodeName (nsAString &aNodeName)
NS_IMETHOD GetNodeType (PRUint16 *aNodeType)
NS_IMETHOD GetNodeValue (nsAString &aNodeValue)
nsIDocument * GetOwnerDoc () const
NS_IMETHOD GetOwnerDocument (nsIDOMDocument **aOwnerDocument)
nsIContentGetParent () const
NS_IMETHOD GetParentNode (nsIDOMNode **aParentNode)
NS_IMETHOD GetPrefix (nsAString &aPrefix)
NS_IMETHOD GetPreviousSibling (nsIDOMNode **aPreviousSibling)
virtual void * GetProperty (nsIAtom *aPropertyName, nsresult *aStatus=nsnull) const
virtual const nsVoidArrayGetRangeList () const
virtual nsIDOMGCParticipantGetSCCIndex ()
NS_IMETHOD GetTagName (nsAString &aTagName)
virtual nsresult HandleDOMEvent (nsPresContext *aPresContext, nsEvent *aEvent, nsIDOMEvent **aDOMEvent, PRUint32 aFlags, nsEventStatus *aEventStatus)
virtual PRBool HasAttr (PRInt32 aNameSpaceID, nsIAtom *aName) const
NS_IMETHOD HasAttribute (const nsAString &aName, PRBool *aReturn)
NS_IMETHOD HasAttributeNS (const nsAString &aNamespaceURI, const nsAString &aLocalName, PRBool *aReturn)
NS_IMETHOD HasAttributes (PRBool *aHasAttributes)
NS_IMETHOD HasChildNodes (PRBool *aHasChildNodes)
virtual PRInt32 IndexOf (nsIContent *aPossibleChild) const
NS_IMETHOD InsertBefore (nsIDOMNode *aNewChild, nsIDOMNode *aRefChild, nsIDOMNode **aReturn)
virtual nsresult InsertChildAt (nsIContent *aKid, PRUint32 aIndex, PRBool aNotify)
virtual PRInt32 IntrinsicState () const
 IsAttributeMapped (const nsIAtom *aAttribute) const
virtual PRBool IsContentOfType (PRUint32 aFlags) const
virtual PRBool IsDoneAddingChildren ()
virtual PRBool IsFocusable (PRInt32 *aTabIndex=nsnull)
PRBool IsInDoc () const
virtual PRBool IsNativeAnonymous () const
NS_IMETHOD IsSupported (const nsAString &aFeature, const nsAString &aVersion, PRBool *aReturn)
nsresult JoinTextNodes (nsIContent *aFirst, nsIContent *aSecond)
nsresult LeaveLink (nsPresContext *aPresContext)
NS_IMETHOD MaybeTriggerAutoLink (nsIDocShell *aShell)
virtual PRBool MayHaveFrame () const
NS_IMETHOD Normalize ()
 NS_IMETHOD_ (PRBool) IsAttributeMapped(const nsIAtom *aAttribute) const =0
 NS_IMETHOD_ (PRBool) HasClass(nsIAtom *aClass
 nsGenericElement (nsINodeInfo *aNodeInfo)
NS_DECL_ISUPPORTS nsresult PostQueryInterface (REFNSIID aIID, void **aInstancePtr)
virtual nsresult RangeAdd (nsIDOMRange *aRange)
virtual void RangeRemove (nsIDOMRange *aRange)
NS_IMETHOD RemoveAttribute (const nsAString &aName)
NS_IMETHOD RemoveAttributeNode (nsIDOMAttr *aOldAttr, nsIDOMAttr **aReturn)
NS_IMETHOD RemoveAttributeNS (const nsAString &aNamespaceURI, const nsAString &aLocalName)
NS_IMETHOD RemoveChild (nsIDOMNode *aOldChild, nsIDOMNode **aReturn)
virtual nsresult RemoveChildAt (PRUint32 aIndex, PRBool aNotify)
virtual void RemoveFocus (nsPresContext *aPresContext)
NS_IMETHOD ReplaceChild (nsIDOMNode *aNewChild, nsIDOMNode *aOldChild, nsIDOMNode **aReturn)
virtual nsresult SetAttr (PRInt32 aNameSpaceID, nsIAtom *aName, nsIAtom *aPrefix, const nsAString &aValue, PRBool aNotify)
nsresult SetAttr (PRInt32 aNameSpaceID, nsIAtom *aName, const nsAString &aValue, PRBool aNotify)
NS_IMETHOD SetAttribute (const nsAString &aName, const nsAString &aValue)
NS_IMETHOD SetAttributeNode (nsIDOMAttr *aNewAttr, nsIDOMAttr **aReturn)
NS_IMETHOD SetAttributeNodeNS (nsIDOMAttr *aNewAttr, nsIDOMAttr **aReturn)
NS_IMETHOD SetAttributeNS (const nsAString &aNamespaceURI, const nsAString &aQualifiedName, const nsAString &aValue)
virtual void SetContentID (PRUint32 aID)
virtual void SetFocus (nsPresContext *aContext)
NS_IMETHOD SetInlineStyleRule (nsICSSStyleRule *aStyleRule, PRBool aNotify)
virtual void SetMayHaveFrame (PRBool aMayHaveFrame)
virtual void SetNativeAnonymous (PRBool aAnonymous)
NS_IMETHOD SetNodeValue (const nsAString &aNodeValue)
NS_IMETHOD SetPrefix (const nsAString &aPrefix)
virtual nsresult SetProperty (nsIAtom *aPropertyName, void *aValue, NSPropertyDtorFunc aDtor)
virtual nsIAtom * Tag () const
nsresult TriggerLink (nsPresContext *aPresContext, nsLinkVerb aVerb, nsIURI *aLinkURI, const nsAFlatString &aTargetSpec, PRBool aClick, PRBool aIsUserTriggered)
virtual void UnbindFromTree (PRBool aDeep=PR_TRUE, PRBool aNullParent=PR_TRUE)
virtual nsresult UnsetAttr (PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRBool aNotify)
virtual void * UnsetProperty (nsIAtom *aPropertyName, nsresult *aStatus=nsnull)
NS_IMETHOD WalkContentStyleRules (nsRuleWalker *aRuleWalker)
Methods
 NS_IMETHOD_ (nsrefcnt) AddRef(void)=0
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)=0

Static Public Member Functions

static nsresult doReplaceOrInsertBefore (PRBool aReplace, nsIDOMNode *aNewChild, nsIDOMNode *aRefChild, nsIContent *aParent, nsIDocument *aDocument, nsAttrAndChildArray &aChildArray, nsIDOMNode **aReturn)
static PRBool FindAttributeDependence (const nsIAtom *aAttribute, const MappedAttributeEntry *const aMaps[], PRUint32 aMapCount)
static already_AddRefed
< nsIDOMNSFeatureFactory > 
GetDOMFeatureFactory (const nsAString &aFeature, const nsAString &aVersion)
static PRBool HasMutationListeners (nsIContent *aContent, PRUint32 aType)
static nsresult InitHashes ()
static nsresult InternalGetFeature (nsISupports *aObject, const nsAString &aFeature, const nsAString &aVersion, nsISupports **aReturn)
static nsresult InternalIsSupported (nsISupports *aObject, const nsAString &aFeature, const nsAString &aVersion, PRBool *aReturn)
static void SetDocumentInChildrenOf (nsIContent *aContent, nsIDocument *aDocument, PRBool aCompileEventHandlers)
static PRBool ShouldFocus (nsIContent *aContent)
static void Shutdown ()

Public Attributes

PRBool aCaseSensitive const

Static Public Attributes

static PLDHashTable sEventListenerManagersHash
static PLDHashTable sRangeListsHash
static PRInt32 sTabFocusModel = eTabFocus_any
static PRBool sTabFocusModelAppliesToXUL = PR_FALSE

Protected Types

enum  { kParentBitMask = 0x3 }
typedef PRWord PtrBits

Protected Member Functions

nsresult CopyInnerTo (nsGenericElement *aDest, PRBool aDeep)
void GetContentsAsText (nsAString &aText)
nsDOMSlotsGetDOMSlots ()
nsDOMSlotsGetExistingDOMSlots () const
PtrBits GetFlags () const
PRBool HasDOMSlots () const
PRBool HasEventListenerManager () const
PRBool HasProperties () const
PRBool HasRangeList () const
virtual const nsAttrName * InternalGetExistingAttrNameFromQName (const nsAString &aStr) const
PRBool IsAnonymousForEvents () const
void SetFlags (PtrBits aFlagsToSet)
void UnsetFlags (PtrBits aFlagsToUnset)

Protected Attributes

nsAttrAndChildArray mAttrsAndChildren
PtrBits mFlagsOrSlots
nsCOMPtr< nsINodeInfo > mNodeInfo
PtrBits mParentPtrBits

Classes

struct  MappedAttributeEntry

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

Generated by  Doxygen 1.6.0   Back to index