Back to index

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

OVERALL ARCHITECTURE. More...

#include <nsCSSLoader.h>

Inheritance diagram for SheetLoadData:
Inheritance graph
[legend]
Collaboration diagram for SheetLoadData:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~SheetLoadData (void)
 SheetLoadData (CSSLoaderImpl *aLoader, const nsSubstring &aTitle, nsIParser *aParserToUnblock, nsIURI *aURI, nsICSSStyleSheet *aSheet, nsIStyleSheetLinkingElement *aOwningElement, nsICSSLoaderObserver *aObserver)
 SheetLoadData (CSSLoaderImpl *aLoader, nsIURI *aURI, nsICSSStyleSheet *aSheet, SheetLoadData *aParentData, nsICSSLoaderObserver *aObserver)
 SheetLoadData (CSSLoaderImpl *aLoader, nsIURI *aURI, nsICSSStyleSheet *aSheet, PRBool aSyncLoad, PRBool aAllowUnsafeRules, nsICSSLoaderObserver *aObserver)
already_AddRefed< nsIURIGetReferrerURI ()
ACString onDetermineCharset (in nsIUnicharStreamLoader aLoader, in nsISupports aContext,[size_is(aLength)] in string aFirstSegment, in unsigned long aLength)
 Called when the first full segment of data if available.
void onStreamComplete (in nsIUnicharStreamLoader aLoader, in nsISupports aContext, in nsresult aStatus, in nsIUnicharInputStream aUnicharData)
 Called when the entire stream has been loaded.

Public Attributes

NS_DECL_ISUPPORTS
NS_DECL_NSIUNICHARSTREAMLOADEROBSERVER
CSSLoaderImpl
mLoader
nsString mTitle
nsCString mCharset
nsCOMPtr< nsIParsermParserToUnblock
nsCOMPtr< nsIURImURI
PRUint32 mLineNumber
nsCOMPtr< nsICSSStyleSheetmSheet
SheetLoadDatamNext
SheetLoadDatamParentData
PRUint32 mPendingChildren
PRPackedBool mSyncLoad
PRPackedBool mIsAgent
PRPackedBool mIsLoading
PRPackedBool mIsCancelled
PRPackedBool mAllowUnsafeRules
nsCOMPtr
< nsIStyleSheetLinkingElement
mOwningElement
nsCOMPtr< nsICSSLoaderObservermObserver

Detailed Description

OVERALL ARCHITECTURE.

The CSS Loader gets requests to load various sorts of style sheets: inline style from <style> elements, linked style, -ed child sheets, agent sheets. The loader handles the following tasks:

1) Checking whether the load is allowed: CheckLoadAllowed() 2) Creation of the actual style sheet objects: CreateSheet() 3) setting of the right media, title, enabled state, etc on the sheet: PrepareSheet() 4) Insertion of the sheet in the proper cascade order: InsertSheetInDoc() and InsertChildSheet() 5) Load of the sheet: LoadSheet() 6) Parsing of the sheet: ParseSheet() 7) Cleanup: SheetComplete()

The detailed documentation for these functions is found with the function implementations.

The following helper object is used: SheetLoadData -- a small class that is used to store all the information needed for the loading of a sheet; this class handles listening for the stream loader completion and also handles charset determination.

Definition at line 103 of file nsCSSLoader.h.


Constructor & Destructor Documentation

SheetLoadData::SheetLoadData ( CSSLoaderImpl aLoader,
const nsSubstring aTitle,
nsIParser aParserToUnblock,
nsIURI aURI,
nsICSSStyleSheet aSheet,
nsIStyleSheetLinkingElement aOwningElement,
nsICSSLoaderObserver aObserver 
)

Definition at line 140 of file nsCSSLoader.cpp.

Here is the call graph for this function:

SheetLoadData::SheetLoadData ( CSSLoaderImpl aLoader,
nsIURI aURI,
nsICSSStyleSheet aSheet,
SheetLoadData aParentData,
nsICSSLoaderObserver aObserver 
)
SheetLoadData::SheetLoadData ( CSSLoaderImpl aLoader,
nsIURI aURI,
nsICSSStyleSheet aSheet,
PRBool  aSyncLoad,
PRBool  aAllowUnsafeRules,
nsICSSLoaderObserver aObserver 
)

Definition at line 202 of file nsCSSLoader.cpp.

Here is the call graph for this function:


Member Function Documentation

Definition at line 681 of file nsCSSLoader.cpp.

{
  nsIURI* uri = nsnull;
  if (mParentData)
    mParentData->mSheet->GetSheetURI(&uri);
  if (!uri && mLoader->mDocument)
    NS_IF_ADDREF(uri = mLoader->mDocument->GetDocumentURI());
  return uri;
}

Here is the call graph for this function:

Here is the caller graph for this function:

ACString nsIUnicharStreamLoaderObserver::onDetermineCharset ( in nsIUnicharStreamLoader  aLoader,
in nsISupports  aContext,
[size_is(aLength)] in string  aFirstSegment,
in unsigned long  aLength 
) [inherited]

Called when the first full segment of data if available.

Parameters:
aLoaderthe unichar stream loader
aContextthe aContext parameter passed to the loader's init method
aFirstSegmentthe raw bytes of the first full data segment
aLengththe length of aFirstSegment
Returns:
charset corresponding to this stream
void nsIUnicharStreamLoaderObserver::onStreamComplete ( in nsIUnicharStreamLoader  aLoader,
in nsISupports  aContext,
in nsresult  aStatus,
in nsIUnicharInputStream  aUnicharData 
) [inherited]

Called when the entire stream has been loaded.

Parameters:
aLoaderthe unichar stream loader
aContextthe aContext parameter passed to the loader's init method
aStatusthe status of the underlying channel
aUnicharDatathe unichar input stream containing the data. This can be null in some failure conditions.

Member Data Documentation

Definition at line 192 of file nsCSSLoader.h.

Definition at line 145 of file nsCSSLoader.h.

Definition at line 176 of file nsCSSLoader.h.

Definition at line 188 of file nsCSSLoader.h.

Definition at line 182 of file nsCSSLoader.h.

Definition at line 154 of file nsCSSLoader.h.

NS_DECL_ISUPPORTS NS_DECL_NSIUNICHARSTREAMLOADEROBSERVER CSSLoaderImpl* SheetLoadData::mLoader

Definition at line 138 of file nsCSSLoader.h.

Definition at line 160 of file nsCSSLoader.h.

Definition at line 199 of file nsCSSLoader.h.

Definition at line 196 of file nsCSSLoader.h.

Definition at line 164 of file nsCSSLoader.h.

Definition at line 148 of file nsCSSLoader.h.

Definition at line 167 of file nsCSSLoader.h.

Definition at line 157 of file nsCSSLoader.h.

Definition at line 171 of file nsCSSLoader.h.

Definition at line 142 of file nsCSSLoader.h.

Definition at line 151 of file nsCSSLoader.h.


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