Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions | Variables
nsXULDocument.cpp File Reference
#include "nsXULDocument.h"
#include "nsDOMError.h"
#include "nsIBoxObject.h"
#include "nsIChromeRegistry.h"
#include "nsIContentSink.h"
#include "nsIScrollableView.h"
#include "nsIContentViewer.h"
#include "nsGUIEvent.h"
#include "nsIDOMNSUIEvent.h"
#include "nsIDOMXULElement.h"
#include "nsIPrivateDOMEvent.h"
#include "nsIRDFNode.h"
#include "nsIRDFRemoteDataSource.h"
#include "nsIRDFService.h"
#include "nsIStreamListener.h"
#include "nsITextContent.h"
#include "nsITimer.h"
#include "nsIDocShell.h"
#include "nsXULAtoms.h"
#include "nsHTMLAtoms.h"
#include "nsIXULContentSink.h"
#include "nsXULContentUtils.h"
#include "nsIXULOverlayProvider.h"
#include "nsIXULPrototypeCache.h"
#include "nsNetUtil.h"
#include "nsParserCIID.h"
#include "nsPIBoxObject.h"
#include "nsRDFCID.h"
#include "nsILocalStore.h"
#include "nsXPIDLString.h"
#include "nsPIDOMWindow.h"
#include "nsXULCommandDispatcher.h"
#include "nsXULElement.h"
#include "prlog.h"
#include "rdf.h"
#include "nsIFrame.h"
#include "nsIXBLService.h"
#include "nsCExternalHandlerService.h"
#include "nsMimeTypes.h"
#include "nsIFastLoadService.h"
#include "nsIObjectInputStream.h"
#include "nsIObjectOutputStream.h"
#include "nsIFocusController.h"
#include "nsContentList.h"
#include "nsIScriptGlobalObject.h"
#include "nsIScriptGlobalObjectOwner.h"
#include "nsIScriptSecurityManager.h"
#include "nsNodeInfoManager.h"
#include "nsContentCreatorFunctions.h"
#include "nsContentUtils.h"
#include "nsIParser.h"
#include "nsIParserService.h"
#include "nsICSSStyleSheet.h"
#include "nsIScriptError.h"

Go to the source code of this file.

Classes

class  nsProxyLoadStream
class  PlaceHolderRequest
struct  BroadcasterMapEntry
struct  BroadcastListener

Functions

static NS_DEFINE_CID (kLocalStoreCID, NS_LOCALSTORE_CID)
static NS_DEFINE_CID (kParserCID, NS_PARSER_CID)
static NS_DEFINE_CID (kRDFServiceCID, NS_RDFSERVICE_CID)
static NS_DEFINE_CID (kXULPrototypeCacheCID, NS_XULPROTOTYPECACHE_CID)
static PRBool IsChromeURI (nsIURI *aURI)
nsresult NS_NewXULDocument (nsIXULDocument **result)
 ClearPresentationStuff (nsHashKey *aKey, void *aData, void *aClosure)
 ClearBroadcasterMapEntry (PLDHashTable *aTable, PLDHashEntryHdr *aEntry)
static PRBool CanBroadcast (PRInt32 aNameSpaceID, nsIAtom *aAttribute)
 FirePendingMergeNotification (nsIURI *aKey, nsCOMPtr< nsIObserver > &aObserver, void *aClosure)
 NS_IMPL_ISUPPORTS2 (nsXULDocument::CachedChromeStreamListener, nsIRequestObserver, nsIStreamListener) NS_IMETHODIMP nsXULDocument

Variables

const PRUint32 kMaxAttrNameLength = 512
const PRUint32 kMaxAttributeLength = 4096

Class Documentation

struct BroadcastListener

Definition at line 348 of file nsXULDocument.cpp.

Collaboration diagram for BroadcastListener:
Class Members
nsCOMPtr< nsIAtom > mAttribute
nsIDOMElement * mListener

Function Documentation

static PRBool CanBroadcast ( PRInt32  aNameSpaceID,
nsIAtom aAttribute 
) [static]

Definition at line 808 of file nsXULDocument.cpp.

{
    // Don't push changes to the |id|, |ref|, or |persist| attribute.
    if (aNameSpaceID == kNameSpaceID_None) {
        if ((aAttribute == nsXULAtoms::id) ||
            (aAttribute == nsXULAtoms::ref) ||
            (aAttribute == nsXULAtoms::persist)) {
            return PR_FALSE;
        }
    }
    return PR_TRUE;
}

Here is the caller graph for this function:

Definition at line 794 of file nsXULDocument.cpp.

{
    BroadcasterMapEntry* entry =
        NS_STATIC_CAST(BroadcasterMapEntry*, aEntry);
    for (PRInt32 i = entry->mListeners.Count() - 1; i >= 0; --i) {
        delete (BroadcastListener*)entry->mListeners[i];
    }

    // N.B. that we need to manually run the dtor because we
    // constructed the nsSmallVoidArray object in-place.
    entry->mListeners.~nsSmallVoidArray();
}
ClearPresentationStuff ( nsHashKey *  aKey,
void aData,
void aClosure 
)

Definition at line 771 of file nsXULDocument.cpp.

{
    nsISupports *supp = NS_STATIC_CAST(nsISupports *, aData);
    nsCOMPtr<nsPIBoxObject> boxObject(do_QueryInterface(supp));

    if (boxObject) {
        boxObject->InvalidatePresentationStuff();
    }

    return PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

FirePendingMergeNotification ( nsIURI aKey,
nsCOMPtr< nsIObserver > &  aObserver,
void aClosure 
)

Definition at line 3011 of file nsXULDocument.cpp.

{
    aObserver->Observe(aKey, "xul-overlay-merged", EmptyString().get());

    typedef nsInterfaceHashtable<nsURIHashKey,nsIObserver> table;
    table* observers = NS_STATIC_CAST(table*, aClosure);
    observers->Remove(aKey);

    return PL_DHASH_REMOVE;
}

Here is the caller graph for this function:

static PRBool IsChromeURI ( nsIURI aURI) [static]

Definition at line 133 of file nsXULDocument.cpp.

{
    // why is this check a member function of nsXULDocument? -gagan
    PRBool isChrome = PR_FALSE;
    if (NS_SUCCEEDED(aURI->SchemeIs("chrome", &isChrome)) && isChrome)
        return PR_TRUE;
    return PR_FALSE;
}

Here is the caller graph for this function:

static NS_DEFINE_CID ( kLocalStoreCID  ,
NS_LOCALSTORE_CID   
) [static]
static NS_DEFINE_CID ( kParserCID  ,
NS_PARSER_CID   
) [static]
static NS_DEFINE_CID ( kRDFServiceCID  ,
NS_RDFSERVICE_CID   
) [static]
static NS_DEFINE_CID ( kXULPrototypeCacheCID  ,
NS_XULPROTOTYPECACHE_CID   
) [static]

Definition at line 4590 of file nsXULDocument.cpp.

{
    return NS_OK;
}

Definition at line 445 of file nsXULDocument.cpp.

{
    NS_PRECONDITION(result != nsnull, "null ptr");
    if (! result)
        return NS_ERROR_NULL_POINTER;

    nsXULDocument* doc = new nsXULDocument();
    if (! doc)
        return NS_ERROR_OUT_OF_MEMORY;

    NS_ADDREF(doc);

    nsresult rv;
    if (NS_FAILED(rv = doc->Init())) {
        NS_RELEASE(doc);
        return rv;
    }

    *result = doc;
    return NS_OK;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 154 of file nsXULDocument.cpp.

Definition at line 153 of file nsXULDocument.cpp.