Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends

nsBindingManager Class Reference

#include <nsBindingManager.h>

Inheritance diagram for nsBindingManager:
Collaboration diagram for nsBindingManager:

List of all members.

Classes

class  cycleCollection

Public Member Functions

NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED 
nsBindingManager (nsIDocument *aDocument)
 ~nsBindingManager ()
nsXBLBindingGetBinding (nsIContent *aContent)
nsresult SetBinding (nsIContent *aContent, nsXBLBinding *aBinding)
nsIContent * GetInsertionParent (nsIContent *aContent)
nsresult SetInsertionParent (nsIContent *aContent, nsIContent *aResult)
nsresult ChangeDocumentFor (nsIContent *aContent, nsIDocument *aOldDocument, nsIDocument *aNewDocument)
 Notify the binding manager that an element has been moved from one document to another, so that it can update any bindings or nsIAnonymousContentCreator-created anonymous content that may depend on the document.
nsIAtomResolveTag (nsIContent *aContent, PRInt32 *aNameSpaceID)
nsresult GetContentListFor (nsIContent *aContent, nsIDOMNodeList **aResult)
 Return a list of all explicit children, including any children that may have been inserted via XBL insertion points.
nsresult SetContentListFor (nsIContent *aContent, nsInsertionPointList *aList)
 Set the insertion point children for the specified element.
PRBool HasContentListFor (nsIContent *aContent)
 Determine whether or not the explicit child list has been altered by XBL insertion points.
nsresult GetAnonymousNodesFor (nsIContent *aContent, nsIDOMNodeList **aResult)
 Return the nodelist of "anonymous" kids for this node.
nsresult SetAnonymousNodesFor (nsIContent *aContent, nsInsertionPointList *aList)
 Set the anonymous child content for the specified element.
nsresult GetXBLChildNodesFor (nsIContent *aContent, nsIDOMNodeList **aResult)
 Retrieves the anonymous list of children if the element has one; otherwise, retrieves the list of explicit children.
nsINodeList * GetXBLChildNodesFor (nsIContent *aContent)
 Non-COMy version of GetXBLChildNodesFor.
nsIContent * GetInsertionPoint (nsIContent *aParent, nsIContent *aChild, PRUint32 *aIndex)
 Given a parent element and a child content, determine where the child content should be inserted in the parent element's anonymous content tree.
nsIContent * GetSingleInsertionPoint (nsIContent *aParent, PRUint32 *aIndex, PRBool *aMultipleInsertionPoints)
 Return the unfiltered insertion point for the specified parent element.
nsresult AddLayeredBinding (nsIContent *aContent, nsIURI *aURL, nsIPrincipal *aOriginPrincipal)
nsresult RemoveLayeredBinding (nsIContent *aContent, nsIURI *aURL)
nsresult LoadBindingDocument (nsIDocument *aBoundDoc, nsIURI *aURL, nsIPrincipal *aOriginPrincipal)
nsresult AddToAttachedQueue (nsXBLBinding *aBinding)
void ProcessAttachedQueue (PRUint32 aSkipSize=0)
void ExecuteDetachedHandlers ()
nsresult PutXBLDocumentInfo (nsIXBLDocumentInfo *aDocumentInfo)
nsIXBLDocumentInfo * GetXBLDocumentInfo (nsIURI *aURI)
void RemoveXBLDocumentInfo (nsIXBLDocumentInfo *aDocumentInfo)
nsresult PutLoadingDocListener (nsIURI *aURL, nsIStreamListener *aListener)
nsIStreamListenerGetLoadingDocListener (nsIURI *aURL)
void RemoveLoadingDocListener (nsIURI *aURL)
void FlushSkinBindings ()
nsresult GetBindingImplementation (nsIContent *aContent, REFNSIID aIID, void **aResult)
nsresult WalkRules (nsIStyleRuleProcessor::EnumFunc aFunc, RuleProcessorData *aData, PRBool *aCutOffInheritance)
nsresult MediumFeaturesChanged (nsPresContext *aPresContext, PRBool *aRulesChanged)
 Do any processing that needs to happen as a result of a change in the characteristics of the medium, and return whether this rule processor's rules have changed (e.g., because of media queries).
void Traverse (nsIContent *aContent, nsCycleCollectionTraversalCallback &cb)
void BeginOutermostUpdate ()
void EndOutermostUpdate ()
void DropDocumentReference ()

Static Public Attributes

static cycleCollection _cycleCollectorGlobal

Protected Member Functions

nsIXPConnectWrappedJSGetWrappedJS (nsIContent *aContent)
nsresult SetWrappedJS (nsIContent *aContent, nsIXPConnectWrappedJS *aResult)
nsINodeList * GetXBLChildNodesInternal (nsIContent *aContent, PRBool *aIsAnonymousContentList)
nsINodeList * GetAnonymousNodesInternal (nsIContent *aContent, PRBool *aIsAnonymousContentList)
nsIContent * GetNestedInsertionPoint (nsIContent *aParent, nsIContent *aChild)
nsIContent * GetNestedSingleInsertionPoint (nsIContent *aParent, PRBool *aMultipleInsertionPoints)
void HandleChildInsertion (nsIContent *aContainer, nsIContent *aChild, PRUint32 aIndexInContainer, PRBool aAppend)
nsXBLInsertionPoint * FindInsertionPointAndIndex (nsIContent *aContainer, nsIContent *aInsertionParent, PRUint32 aIndexInContainer, PRInt32 aAppend, PRInt32 *aInsertionIndex)
void DoProcessAttachedQueue ()
void PostProcessAttachedQueueEvent ()
void RemoveInsertionParent (nsIContent *aParent)

Protected Attributes

nsRefPtrHashtable
< nsISupportsHashKey,
nsXBLBinding
mBindingTable
PLDHashTable mContentListTable
PLDHashTable mAnonymousNodesTable
PLDHashTable mInsertionParentTable
PLDHashTable mWrapperTable
nsInterfaceHashtable
< nsURIHashKey,
nsIXBLDocumentInfo > 
mDocumentTable
nsInterfaceHashtable
< nsURIHashKey,
nsIStreamListener
mLoadingDocTable
nsBindingList mAttachedStack
PRPackedBool mProcessingAttachedStack
PRPackedBool mDestroyed
PRUint32 mAttachedStackSizeOnOutermost
nsRefPtr< nsRunnableMethod
< nsBindingManager > > 
mProcessAttachedQueueEvent
nsIDocument * mDocument

Friends

class nsRunnableMethod< nsBindingManager >

Constructor & Destructor Documentation

NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_NSIMUTATIONOBSERVER_CONTENTAPPENDED NS_DECL_NSIMUTATIONOBSERVER_CONTENTINSERTED NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED nsBindingManager::nsBindingManager ( nsIDocument *  aDocument  ) 
nsBindingManager::~nsBindingManager (  ) 

Member Function Documentation

nsresult nsBindingManager::AddLayeredBinding ( nsIContent *  aContent,
nsIURI aURL,
nsIPrincipal aOriginPrincipal 
)
nsresult nsBindingManager::AddToAttachedQueue ( nsXBLBinding aBinding  ) 
void nsBindingManager::BeginOutermostUpdate (  ) 
nsresult nsBindingManager::ChangeDocumentFor ( nsIContent *  aContent,
nsIDocument *  aOldDocument,
nsIDocument *  aNewDocument 
)

Notify the binding manager that an element has been moved from one document to another, so that it can update any bindings or nsIAnonymousContentCreator-created anonymous content that may depend on the document.

Parameters:
aContent the element that's being moved
aOldDocument the old document in which the content resided. May be null if the the content was not in any document.
aNewDocument the document in which the content will reside. May be null if the content will not reside in any document, or if the content is being destroyed.
void nsBindingManager::DoProcessAttachedQueue (  )  [protected]
void nsBindingManager::DropDocumentReference (  ) 
void nsBindingManager::EndOutermostUpdate (  ) 
void nsBindingManager::ExecuteDetachedHandlers (  ) 
nsXBLInsertionPoint* nsBindingManager::FindInsertionPointAndIndex ( nsIContent *  aContainer,
nsIContent *  aInsertionParent,
PRUint32  aIndexInContainer,
PRInt32  aAppend,
PRInt32 *  aInsertionIndex 
) [protected]
void nsBindingManager::FlushSkinBindings (  ) 
nsresult nsBindingManager::GetAnonymousNodesFor ( nsIContent *  aContent,
nsIDOMNodeList **  aResult 
)

Return the nodelist of "anonymous" kids for this node.

This might actually include some of the nodes actual DOM kids, if there are <children> tags directly as kids of <content>. This will only end up returning a non-null list for nodes which have a binding attached.

nsINodeList* nsBindingManager::GetAnonymousNodesInternal ( nsIContent *  aContent,
PRBool aIsAnonymousContentList 
) [protected]
nsXBLBinding* nsBindingManager::GetBinding ( nsIContent *  aContent  ) 
nsresult nsBindingManager::GetBindingImplementation ( nsIContent *  aContent,
REFNSIID  aIID,
void **  aResult 
)
nsresult nsBindingManager::GetContentListFor ( nsIContent *  aContent,
nsIDOMNodeList **  aResult 
)

Return a list of all explicit children, including any children that may have been inserted via XBL insertion points.

nsIContent* nsBindingManager::GetInsertionParent ( nsIContent *  aContent  ) 
nsIContent* nsBindingManager::GetInsertionPoint ( nsIContent *  aParent,
nsIContent *  aChild,
PRUint32 *  aIndex 
)

Given a parent element and a child content, determine where the child content should be inserted in the parent element's anonymous content tree.

Specifically, aChild should be inserted beneath aResult at the index specified by aIndex.

nsIStreamListener* nsBindingManager::GetLoadingDocListener ( nsIURI aURL  ) 
nsIContent* nsBindingManager::GetNestedInsertionPoint ( nsIContent *  aParent,
nsIContent *  aChild 
) [protected]
nsIContent* nsBindingManager::GetNestedSingleInsertionPoint ( nsIContent *  aParent,
PRBool aMultipleInsertionPoints 
) [protected]
nsIContent* nsBindingManager::GetSingleInsertionPoint ( nsIContent *  aParent,
PRUint32 *  aIndex,
PRBool aMultipleInsertionPoints 
)

Return the unfiltered insertion point for the specified parent element.

If other filtered insertion points exist, aMultipleInsertionPoints will be set to true.

nsIXPConnectWrappedJS* nsBindingManager::GetWrappedJS ( nsIContent *  aContent  )  [protected]
nsresult nsBindingManager::GetXBLChildNodesFor ( nsIContent *  aContent,
nsIDOMNodeList **  aResult 
)

Retrieves the anonymous list of children if the element has one; otherwise, retrieves the list of explicit children.

N.B. that if the explicit child list has not been altered by XBL insertion points, then aResult will be null.

nsINodeList* nsBindingManager::GetXBLChildNodesFor ( nsIContent *  aContent  ) 

Non-COMy version of GetXBLChildNodesFor.

nsINodeList* nsBindingManager::GetXBLChildNodesInternal ( nsIContent *  aContent,
PRBool aIsAnonymousContentList 
) [protected]
nsIXBLDocumentInfo* nsBindingManager::GetXBLDocumentInfo ( nsIURI aURI  ) 
void nsBindingManager::HandleChildInsertion ( nsIContent *  aContainer,
nsIContent *  aChild,
PRUint32  aIndexInContainer,
PRBool  aAppend 
) [protected]
PRBool nsBindingManager::HasContentListFor ( nsIContent *  aContent  ) 

Determine whether or not the explicit child list has been altered by XBL insertion points.

nsresult nsBindingManager::LoadBindingDocument ( nsIDocument *  aBoundDoc,
nsIURI aURL,
nsIPrincipal aOriginPrincipal 
)
nsresult nsBindingManager::MediumFeaturesChanged ( nsPresContext aPresContext,
PRBool aRulesChanged 
)

Do any processing that needs to happen as a result of a change in the characteristics of the medium, and return whether this rule processor's rules have changed (e.g., because of media queries).

void nsBindingManager::PostProcessAttachedQueueEvent (  )  [protected]
void nsBindingManager::ProcessAttachedQueue ( PRUint32  aSkipSize = 0  ) 
nsresult nsBindingManager::PutLoadingDocListener ( nsIURI aURL,
nsIStreamListener aListener 
)
nsresult nsBindingManager::PutXBLDocumentInfo ( nsIXBLDocumentInfo *  aDocumentInfo  ) 
void nsBindingManager::RemoveInsertionParent ( nsIContent *  aParent  )  [protected]
nsresult nsBindingManager::RemoveLayeredBinding ( nsIContent *  aContent,
nsIURI aURL 
)
void nsBindingManager::RemoveLoadingDocListener ( nsIURI aURL  ) 
void nsBindingManager::RemoveXBLDocumentInfo ( nsIXBLDocumentInfo *  aDocumentInfo  ) 
nsIAtom* nsBindingManager::ResolveTag ( nsIContent *  aContent,
PRInt32 *  aNameSpaceID 
)
nsresult nsBindingManager::SetAnonymousNodesFor ( nsIContent *  aContent,
nsInsertionPointList aList 
)

Set the anonymous child content for the specified element.

The binding manager assumes ownership of aList.

nsresult nsBindingManager::SetBinding ( nsIContent *  aContent,
nsXBLBinding aBinding 
)
nsresult nsBindingManager::SetContentListFor ( nsIContent *  aContent,
nsInsertionPointList aList 
)

Set the insertion point children for the specified element.

The binding manager assumes ownership of aList.

nsresult nsBindingManager::SetInsertionParent ( nsIContent *  aContent,
nsIContent *  aResult 
)
nsresult nsBindingManager::SetWrappedJS ( nsIContent *  aContent,
nsIXPConnectWrappedJS aResult 
) [protected]
void nsBindingManager::Traverse ( nsIContent *  aContent,
nsCycleCollectionTraversalCallback cb 
)
nsresult nsBindingManager::WalkRules ( nsIStyleRuleProcessor::EnumFunc  aFunc,
RuleProcessorData aData,
PRBool aCutOffInheritance 
)

Friends And Related Function Documentation

friend class nsRunnableMethod< nsBindingManager > [friend]

Member Data Documentation

nsIDocument* nsBindingManager::mDocument [protected]
nsInterfaceHashtable<nsURIHashKey,nsIXBLDocumentInfo> nsBindingManager::mDocumentTable [protected]

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