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

nsGenericHTMLElement Class Reference

#include <nsGenericHTMLElement.h>

Inheritance diagram for nsGenericHTMLElement:

nsGenericElement nsIXMLContent nsIContent nsIDOMGCParticipant nsISupports nsGenericHTMLFormElement nsGenericHTMLFrameElement nsHTMLOptGroupElement nsHTMLOptionElement nsHTMLSelectElement

List of all members.


Detailed Description

A common superclass for HTML elements

Definition at line 77 of file nsGenericHTMLElement.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)
NS_IMETHOD Blur ()
void Compact ()
virtual PRUint32 ContentID () const
nsresult CopyInnerTo (nsGenericElement *aDest, PRBool aDeep)
virtual nsresult DeleteProperty (nsIAtom *aPropertyName)
nsresult DOMQueryInterface (nsIDOMHTMLElement *aElement, REFNSIID aIID, void **aInstancePtr)
virtual void DoneAddingChildren ()
virtual void DoneCreatingElement ()
already_AddRefed
< nsIDOMHTMLFormElement
FindForm (nsIForm *aCurrentForm=nsnull)
NS_IMETHOD Focus ()
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
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction () 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
void GetBaseTarget (nsAString &aBaseTarget) const
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
nsresult GetClassName (nsAString &aClassName)
nsresult GetClientHeight (PRInt32 *aClientHeight)
nsresult GetClientWidth (PRInt32 *aClientWidth)
nsIDocument * GetCurrentDoc () const
nsresult GetDir (nsAString &aDir)
nsIDocument * GetDocument () const
NS_METHOD GetElementsByTagName (const nsAString &aTagname, nsIDOMNodeList **aReturn)
NS_METHOD GetElementsByTagNameNS (const nsAString &aNamespaceURI, const nsAString &aLocalName, nsIDOMNodeList **aReturn)
virtual already_AddRefed
< nsINodeInfo > 
GetExistingAttrNameFromQName (const nsAString &aStr) const
NS_IMETHOD GetFirstChild (nsIDOMNode **aFirstChild)
nsIFormControlFrameGetFormControlFrame (PRBool aFlushContent)
nsresult GetHrefURIForAnchors (nsIURI **aURI)
virtual nsIAtom * GetID () const
nsresult GetId (nsAString &aId)
virtual nsIAtom * GetIDAttributeName () const
virtual nsICSSStyleRule * GetInlineStyleRule ()
virtual nsresult GetInnerHTML (nsAString &aInnerHTML)
nsresult GetLang (nsAString &aLang)
NS_IMETHOD GetLastChild (nsIDOMNode **aLastChild)
virtual nsresult GetListenerManager (nsIEventListenerManager **aResult)
NS_METHOD GetLocalName (nsAString &aLocalName)
virtual PRInt32 GetNameSpaceID () const
NS_IMETHOD GetNamespaceURI (nsAString &aNamespaceURI)
NS_IMETHOD GetNextSibling (nsIDOMNode **aNextSibling)
virtual nsINodeInfo * GetNodeInfo () const
NS_METHOD GetNodeName (nsAString &aNodeName)
NS_IMETHOD GetNodeType (PRUint16 *aNodeType)
NS_IMETHOD GetNodeValue (nsAString &aNodeValue)
nsresult GetOffsetHeight (PRInt32 *aOffsetHeight)
nsresult GetOffsetLeft (PRInt32 *aOffsetLeft)
nsresult GetOffsetParent (nsIDOMElement **aOffsetParent)
void GetOffsetRect (nsRect &aRect, nsIContent **aOffsetParent)
nsresult GetOffsetTop (PRInt32 *aOffsetTop)
nsresult GetOffsetWidth (PRInt32 *aOffsetWidth)
nsIDocument * GetOwnerDoc () const
NS_IMETHOD GetOwnerDocument (nsIDOMDocument **aOwnerDocument)
nsIContentGetParent () const
NS_IMETHOD GetParentNode (nsIDOMNode **aParentNode)
const nsAttrValue * GetParsedAttr (nsIAtom *aAttr) const
NS_IMETHOD GetPrefix (nsAString &aPrefix)
NS_IMETHOD GetPreviousSibling (nsIDOMNode **aPreviousSibling)
nsIFrameGetPrimaryFrame (PRBool aFlushContent)
virtual void * GetProperty (nsIAtom *aPropertyName, nsresult *aStatus=nsnull) const
virtual const nsVoidArrayGetRangeList () const
virtual nsIDOMGCParticipantGetSCCIndex ()
nsresult GetScrollHeight (PRInt32 *aScrollHeight)
void GetScrollInfo (nsIScrollableView **aScrollableView, float *aP2T, float *aT2P, nsIFrame **aFrame=nsnull)
nsresult GetScrollLeft (PRInt32 *aScrollLeft)
nsresult GetScrollTop (PRInt32 *aScrollTop)
nsresult GetScrollWidth (PRInt32 *aScrollWidth)
NS_IMETHOD GetSpellcheck (PRBool *aSpellcheck)
nsresult GetStyle (nsIDOMCSSStyleDeclaration **aStyle)
NS_IMETHOD GetTabIndex (PRInt32 *aTabIndex)
NS_METHOD GetTagName (nsAString &aTagName)
nsresult GetTitle (nsAString &aTitle)
virtual nsresult HandleDOMEvent (nsPresContext *aPresContext, nsEvent *aEvent, nsIDOMEvent **aDOMEvent, PRUint32 aFlags, nsEventStatus *aEventStatus)
nsresult HandleDOMEventForAnchors (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_HIDDEN_ (nsPresContext *) GetPresContext()
 NS_IMETHOD_ (PRBool) IsAttributeMapped(const nsIAtom *aAttribute) const
 NS_IMETHOD_ (PRBool) HasClass(nsIAtom *aClass
 nsGenericHTMLElement (nsINodeInfo *aNodeInfo)
virtual PRBool ParseAttribute (nsIAtom *aAttribute, const nsAString &aValue, nsAttrValue &aResult)
PRBool ParseDivAlignValue (const nsAString &aString, nsAttrValue &aResult) const
PRBool ParseTableCellHAlignValue (const nsAString &aString, nsAttrValue &aResult) const
PRBool ParseTableHAlignValue (const nsAString &aString, nsAttrValue &aResult) const
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)
nsresult ReparseStyleAttribute (void)
NS_IMETHOD ReplaceChild (nsIDOMNode *aNewChild, nsIDOMNode *aOldChild, nsIDOMNode **aReturn)
nsresult ScrollIntoView (PRBool aTop)
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)
nsresult SetAttrAndNotify (PRInt32 aNamespaceID, nsIAtom *aAttribute, nsIAtom *aPrefix, const nsAString &aOldValue, nsAttrValue &aParsedValue, PRBool aModification, PRBool aFireMutation, PRBool aNotify)
NS_METHOD 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)
nsresult SetClassName (const nsAString &aClassName)
virtual void SetContentID (PRUint32 aID)
nsresult SetDir (const nsAString &aDir)
virtual void SetFocus (nsPresContext *aContext)
nsresult SetId (const nsAString &aId)
NS_IMETHOD SetInlineStyleRule (nsICSSStyleRule *aStyleRule, PRBool aNotify)
virtual nsresult SetInnerHTML (const nsAString &aInnerHTML)
nsresult SetLang (const nsAString &aLang)
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)
nsresult SetScrollLeft (PRInt32 aScrollLeft)
nsresult SetScrollTop (PRInt32 aScrollTop)
NS_IMETHOD SetSpellcheck (PRBool aSpellcheck)
NS_IMETHOD SetTabIndex (PRInt32 aTabIndex)
nsresult SetTitle (const nsAString &aTitle)
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 *aName, 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 DispatchClickEvent (nsPresContext *aPresContext, nsInputEvent *aSourceEvent, nsIContent *aTarget, PRBool aFullDispatch, nsEventStatus *aStatus)
static nsresult DispatchEvent (nsPresContext *aPresContext, nsEvent *aEvent, nsIContent *aTarget, PRBool aFullDispatch, nsEventStatus *aStatus)
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 nsGenericHTMLElementFromContent (nsIContent *aContent)
static const nsSize GetClientAreaSize (nsIFrame *aFrame)
static already_AddRefed
< nsIDOMNSFeatureFactory > 
GetDOMFeatureFactory (const nsAString &aFeature, const nsAString &aVersion)
static nsIFormControlFrameGetFormControlFrameFor (nsIContent *aContent, nsIDocument *aDocument, PRBool aFlushContent)
static nsresult GetHashFromHrefString (const nsAString &aHref, nsAString &aHash)
static nsresult GetHostFromHrefString (const nsAString &aHref, nsAString &aHost)
static nsresult GetHostnameFromHrefString (const nsAString &aHref, nsAString &aHostname)
static nsresult GetLayoutHistoryAndKey (nsGenericHTMLElement *aContent, nsILayoutHistoryState **aState, nsACString &aKey)
static nsresult GetPathnameFromHrefString (const nsAString &aHref, nsAString &aPathname)
static nsresult GetPortFromHrefString (const nsAString &aHref, nsAString &aPort)
static nsIFrameGetPrimaryFrameFor (nsIContent *aContent, nsIDocument *aDocument, PRBool aFlushContent)
static nsresult GetPrimaryPresState (nsGenericHTMLElement *aContent, nsPresState **aPresState)
static nsresult GetProtocolFromHrefString (const nsAString &aHref, nsAString &aProtocol, nsIDocument *aDocument)
static nsresult GetSearchFromHrefString (const nsAString &aHref, nsAString &aSearch)
static PRBool HasMutationListeners (nsIContent *aContent, PRUint32 aType)
static nsresult InitHashes ()
static PRBool InNavQuirksMode (nsIDocument *aDoc)
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 MapBackgroundAttributesInto (const nsMappedAttributes *aAttributes, nsRuleData *aData)
static void MapCommonAttributesInto (const nsMappedAttributes *aAttributes, nsRuleData *aRuleData)
static void MapDivAlignAttributeInto (const nsMappedAttributes *aAttributes, nsRuleData *aData)
static void MapImageAlignAttributeInto (const nsMappedAttributes *aAttributes, nsRuleData *aData)
static void MapImageBorderAttributeInto (const nsMappedAttributes *aAttributes, nsRuleData *aData)
static void MapImageMarginAttributeInto (const nsMappedAttributes *aAttributes, nsRuleData *aData)
static void MapImageSizeAttributesInto (const nsMappedAttributes *aAttributes, nsRuleData *aData)
static void MapScrollingAttributeInto (const nsMappedAttributes *aAttributes, nsRuleData *aData)
static PRBool ParseAlignValue (const nsAString &aString, nsAttrValue &aResult)
static PRBool ParseFrameborderValue (const nsAString &aString, nsAttrValue &aResult)
static PRBool ParseImageAttribute (nsIAtom *aAttribute, const nsAString &aString, nsAttrValue &aResult)
static PRBool ParseScrollingValue (const nsAString &aString, nsAttrValue &aResult)
static void ParseStyleAttribute (nsIContent *aContent, PRBool aCaseSensitive, const nsAString &aValue, nsAttrValue &aResult)
static PRBool ParseTableVAlignValue (const nsAString &aString, nsAttrValue &aResult)
static PRBool RestoreFormControlState (nsGenericHTMLElement *aContent, nsIFormControl *aControl)
static void SetDocumentInChildrenOf (nsIContent *aContent, nsIDocument *aDocument, PRBool aCompileEventHandlers)
static nsresult SetHashInHrefString (const nsAString &aHref, const nsAString &aHash, nsAString &aResult)
static nsresult SetHostInHrefString (const nsAString &aHref, const nsAString &aHost, nsAString &aResult)
static nsresult SetHostnameInHrefString (const nsAString &aHref, const nsAString &aHostname, nsAString &aResult)
static nsresult SetPathnameInHrefString (const nsAString &aHref, const nsAString &aHostname, nsAString &aResult)
static nsresult SetPortInHrefString (const nsAString &aHref, const nsAString &aPort, nsAString &aResult)
static nsresult SetProtocolInHrefString (const nsAString &aHref, const nsAString &aProtocol, nsAString &aResult)
static nsresult SetSearchInHrefString (const nsAString &aHref, const nsAString &aSearch, nsAString &aResult)
static PRBool ShouldFocus (nsIContent *aContent)
static void Shutdown ()

Public Attributes

PRBool aCaseSensitive const

Static Public Attributes

static const MappedAttributeEntry sBackgroundAttributeMap []
static const MappedAttributeEntry sCommonAttributeMap []
static const MappedAttributeEntry sDivAlignAttributeMap []
static PLDHashTable sEventListenerManagersHash
static const MappedAttributeEntry sImageAlignAttributeMap []
static const MappedAttributeEntry sImageBorderAttributeMap []
static const MappedAttributeEntry sImageMarginSizeAttributeMap []
static PLDHashTable sRangeListsHash
static const MappedAttributeEntry sScrollingAttributeMap []
static PRInt32 sTabFocusModel = eTabFocus_any
static PRBool sTabFocusModelAppliesToXUL = PR_FALSE

Protected Types

enum  { kParentBitMask = 0x3 }
typedef PRWord PtrBits

Protected Member Functions

virtual already_AddRefed
< nsIEditor > 
GetAssociatedEditor ()
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
PRBool IsCurrentBodyElement ()
PRBool IsEventName (nsIAtom *aName)
 NS_HIDDEN_ (nsresult) GetEditorInternal(nsIEditor **aEditor)
 NS_HIDDEN_ (nsresult) GetEditor(nsIEditor **aEditor)
 NS_HIDDEN_ (nsresult) GetURIAttr(nsIAtom *aAttr
 NS_HIDDEN_ (nsresult) SetIntAttr(nsIAtom *aAttr
 NS_HIDDEN_ (nsresult) GetIntAttr(nsIAtom *aAttr
 NS_HIDDEN_ (nsresult) SetBoolAttr(nsIAtom *aAttr
 NS_HIDDEN_ (nsresult) GetBoolAttr(nsIAtom *aAttr
 NS_HIDDEN_ (nsresult) GetStringAttrWithDefault(nsIAtom *aAttr
 NS_HIDDEN_ (nsresult) SetAttrHelper(nsIAtom *aAttr
 NS_HIDDEN_ (nsresult) GetAttrHelper(nsIAtom *aAttr
void RecreateFrames ()
void RegUnRegAccessKey (PRBool aDoReg)
nsresult ReplaceContentsWithText (const nsAString &aText, PRBool aNotify)
void SetElementFocus (PRBool aDoFocus)
void SetFlags (PtrBits aFlagsToSet)
void UnsetFlags (PtrBits aFlagsToUnset)

Static Protected Member Functions

static void SyncEditorsOnSubtree (nsIContent *content)

Protected Attributes

PRInt32 aDefault
const char * aDefault
nsAString & aResult
const char nsAString & aResult
PRInt32 aValue
PRInt32 PRInt32 * aValue
PRBool aValue
const nsAString & aValue
nsAString & aValue
PRBool *aValue const
nsAttrAndChildArray mAttrsAndChildren
PtrBits mFlagsOrSlots
nsCOMPtr< nsINodeInfo > mNodeInfo
PtrBits mParentPtrBits

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

Generated by  Doxygen 1.6.0   Back to index