Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
nsIDocument Class Reference

#include <nsIDocument.h>

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

List of all members.

Public Types

typedef PRBool(* nsSubDocEnumFunc )(nsIDocument *aDocument, void *aData)
 Enumerate all subdocuments.

Public Member Functions

NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW nsIDocument ()
virtual nsresult StartDocumentLoad (const char *aCommand, nsIChannel *aChannel, nsILoadGroup *aLoadGroup, nsISupports *aContainer, nsIStreamListener **aDocListener, PRBool aReset, nsIContentSink *aSink=nsnull)=0
virtual void StopDocumentLoad ()=0
const nsAFlatStringGetDocumentTitle () const
 Return the title of the document.
nsIURIGetDocumentURI () const
 Return the URI for the document.
void SetDocumentURI (nsIURI *aURI)
virtual nsIPrincipalGetPrincipal ()=0
 Return the principal responsible for this document.
virtual void SetPrincipal (nsIPrincipal *aPrincipal)=0
 Set the principal responsible for this document.
already_AddRefed< nsILoadGroupGetDocumentLoadGroup () const
 Return the LoadGroup for the document.
nsIURIGetBaseURI () const
 Return the base URI for relative URIs in the document (the document uri unless it's overridden by SetBaseURI, HTML <base> tags, etc.).
virtual nsresult SetBaseURI (nsIURI *aURI)=0
virtual void GetBaseTarget (nsAString &aBaseTarget) const =0
 Get/Set the base target of a link in a document.
virtual void SetBaseTarget (const nsAString &aBaseTarget)=0
const nsAFlatCStringGetDocumentCharacterSet () const
 Return a standard name for the document's character set.
virtual void SetDocumentCharacterSet (const nsACString &aCharSetID)=0
 Set the document's character encoding.
PRInt32 GetDocumentCharacterSetSource () const
void SetDocumentCharacterSetSource (PRInt32 aCharsetSource)
virtual nsresult AddCharSetObserver (nsIObserver *aObserver)=0
 Add an observer that gets notified whenever the charset changes.
virtual void RemoveCharSetObserver (nsIObserver *aObserver)=0
 Remove a charset observer.
NS_IMETHOD GetContentType (nsAString &aContentType)=0
 Get the Content-Type of this document.
virtual void SetContentType (const nsAString &aContentType)=0
 Set the Content-Type of this document.
void GetContentLanguage (nsAString &aContentLanguage) const
 Return the language of this document.
PRBool GetBidiEnabled () const
 Check if the document contains bidi data.
void SetBidiEnabled (PRBool aBidiEnabled)
 Indicate the document contains bidi data.
virtual nsILineBreakerGetLineBreaker ()=0
 Return the Line Breaker for the document.
virtual void SetLineBreaker (nsILineBreaker *aLineBreaker)=0
virtual nsIWordBreakerGetWordBreaker ()=0
virtual void SetWordBreaker (nsIWordBreaker *aWordBreaker)=0
virtual void GetHeaderData (nsIAtom *aHeaderField, nsAString &aData) const =0
 Access HTTP header data (this may also get set from other sources, like HTML META tags).
virtual void SetHeaderData (nsIAtom *aheaderField, const nsAString &aData)=0
virtual nsresult CreateShell (nsPresContext *aContext, nsIViewManager *aViewManager, nsStyleSet *aStyleSet, nsIPresShell **aInstancePtrResult)=0
 Create a new presentation shell that will use aContext for its presentation context (presentation contexts must not be shared among multiple presentation shells).
virtual PRBool DeleteShell (nsIPresShell *aShell)=0
virtual PRUint32 GetNumberOfShells () const =0
virtual nsIPresShellGetShellAt (PRUint32 aIndex) const =0
nsIDocumentGetParentDocument () const
 Return the parent document of this document.
void SetParentDocument (nsIDocument *aParent)
 Set the parent document of this document.
virtual nsresult SetSubDocumentFor (nsIContent *aContent, nsIDocument *aSubDoc)=0
 Set the sub document for aContent to aSubDoc.
virtual nsIDocumentGetSubDocumentFor (nsIContent *aContent) const =0
 Get the sub document for aContent.
virtual nsIContentFindContentForSubDocument (nsIDocument *aDocument) const =0
 Find the content node for which aDocument is a sub document.
nsIContentGetRootContent () const
 Return the root content object for this document.
virtual nsresult SetRootContent (nsIContent *aRoot)=0
 Set aRoot as the root content object for this document.
virtual nsIContentGetChildAt (PRUint32 aIndex) const =0
 Get the direct children of the document - content in the prolog, the root content and content in the epilog.
virtual PRInt32 IndexOf (nsIContent *aPossibleChild) const =0
virtual PRUint32 GetChildCount () const =0
virtual PRInt32 GetNumberOfStyleSheets () const =0
 Accessors to the collection of stylesheets owned by this document.
virtual nsIStyleSheetGetStyleSheetAt (PRInt32 aIndex) const =0
 Get a particular stylesheet.
virtual void InsertStyleSheetAt (nsIStyleSheet *aSheet, PRInt32 aIndex)=0
 Insert a sheet at a particular spot in the stylesheet list (zero-based)
virtual PRInt32 GetIndexOfStyleSheet (nsIStyleSheet *aSheet) const =0
 Get the index of a particular stylesheet.
virtual void UpdateStyleSheets (nsCOMArray< nsIStyleSheet > &aOldSheets, nsCOMArray< nsIStyleSheet > &aNewSheets)=0
 Replace the stylesheets in aOldSheets with the stylesheets in aNewSheets.
virtual void AddStyleSheet (nsIStyleSheet *aSheet)=0
 Add a stylesheet to the document.
virtual void RemoveStyleSheet (nsIStyleSheet *aSheet)=0
 Remove a stylesheet from the document.
virtual void SetStyleSheetApplicableState (nsIStyleSheet *aSheet, PRBool aApplicable)=0
 Notify the document that the applicable state of the sheet changed and that observers should be notified and style sets updated.
virtual PRInt32 GetNumberOfCatalogStyleSheets () const =0
 Just like the style sheet API, but for "catalog" sheets, extra sheets inserted at the UA level.
virtual nsIStyleSheetGetCatalogStyleSheetAt (PRInt32 aIndex) const =0
virtual void AddCatalogStyleSheet (nsIStyleSheet *aSheet)=0
virtual void EnsureCatalogStyleSheet (const char *aStyleSheetURI)=0
nsICSSLoaderCSSLoader () const
 Get this document's CSSLoader.
virtual nsIChannelGetChannel () const =0
 Get the channel that was passed to StartDocumentLoad or Reset for this document.
virtual nsHTMLStyleSheetGetAttributeStyleSheet () const =0
 Get this document's attribute stylesheet.
virtual nsIHTMLCSSStyleSheetGetInlineStyleSheet () const =0
 Get this document's inline style sheet.
virtual nsIScriptGlobalObjectGetScriptGlobalObject () const =0
 Get/set the object from which a document can get a script context and scope.
virtual void SetScriptGlobalObject (nsIScriptGlobalObject *aGlobalObject)=0
virtual nsPIDOMWindowGetWindow ()=0
 Return the window containing the document (the outer window).
virtual nsIScriptLoaderGetScriptLoader ()=0
 Get the script loader for this document.
virtual void AddObserver (nsIDocumentObserver *aObserver)=0
 Add a new observer of document change notifications.
virtual PRBool RemoveObserver (nsIDocumentObserver *aObserver)=0
 Remove an observer of document change notifications.
virtual void BeginUpdate (nsUpdateType aUpdateType)=0
virtual void EndUpdate (nsUpdateType aUpdateType)=0
virtual void BeginLoad ()=0
virtual void EndLoad ()=0
virtual void CharacterDataChanged (nsIContent *aContent, PRBool aAppend)=0
virtual void ContentStatesChanged (nsIContent *aContent1, nsIContent *aContent2, PRInt32 aStateMask)=0
virtual void AttributeWillChange (nsIContent *aChild, PRInt32 aNameSpaceID, nsIAtom *aAttribute)=0
virtual void AttributeChanged (nsIContent *aChild, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType)=0
virtual void ContentAppended (nsIContent *aContainer, PRInt32 aNewIndexInContainer)=0
virtual void ContentInserted (nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer)=0
virtual void ContentRemoved (nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer)=0
virtual void StyleRuleChanged (nsIStyleSheet *aStyleSheet, nsIStyleRule *aOldStyleRule, nsIStyleRule *aNewStyleRule)=0
virtual void StyleRuleAdded (nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)=0
virtual void StyleRuleRemoved (nsIStyleSheet *aStyleSheet, nsIStyleRule *aStyleRule)=0
virtual nsresult HandleDOMEvent (nsPresContext *aPresContext, nsEvent *aEvent, nsIDOMEvent **aDOMEvent, PRUint32 aFlags, nsEventStatus *aEventStatus)=0
virtual void FlushPendingNotifications (mozFlushType aType)=0
 Flush notifications for this document and its parent documents (since those may affect the layout of this one).
PRInt32 GetAndIncrementContentID ()
nsIBindingManagerBindingManager () const
nsNodeInfoManagerNodeInfoManager () const
 Only to be used inside Gecko, you can't really do anything with the pointer outside Gecko anyway.
virtual void Reset (nsIChannel *aChannel, nsILoadGroup *aLoadGroup)=0
 Reset the document using the given channel and loadgroup.
virtual void ResetToURI (nsIURI *aURI, nsILoadGroup *aLoadGroup)=0
 Reset this document to aURI and aLoadGroup.
void SetContainer (nsISupports *aContainer)
 Set the container (docshell) for this document.
already_AddRefed< nsISupports > GetContainer () const
 Get the container (docshell) for this document.
virtual nsIScriptEventManagerGetScriptEventManager ()=0
virtual void SetXMLDeclaration (const PRUnichar *aVersion, const PRUnichar *aEncoding, const PRInt32 aStandalone)=0
 Set and get XML declaration.
virtual void GetXMLDeclaration (nsAString &aVersion, nsAString &aEncoding, nsAString &Standalone)=0
virtual PRBool IsCaseSensitive ()
virtual PRBool IsScriptEnabled ()=0
virtual nsresult AddXMLEventsContent (nsIContent *aXMLEventsElement)=0
virtual PRBool IsLoadedAsData ()
virtual nsresult CreateElem (nsIAtom *aName, nsIAtom *aPrefix, PRInt32 aNamespaceID, PRBool aDocumentDefaultType, nsIContent **aResult)=0
 Create an element with the specified name, prefix and namespace ID.
nsISupports * GetSecurityInfo ()
 Get the security info (i.e.
virtual PRInt32 GetDefaultNamespaceID () const =0
 Returns the default namespace ID used for elements created in this document.
virtual voidGetProperty (nsIAtom *aPropertyName, nsresult *aStatus=nsnull) const =0
virtual nsresult SetProperty (nsIAtom *aPropertyName, void *aValue, NSPropertyDtorFunc aDtor=nsnull)=0
virtual nsresult DeleteProperty (nsIAtom *aPropertyName)=0
virtual voidUnsetProperty (nsIAtom *aPropertyName, nsresult *aStatus=nsnull)=0
nsPropertyTablePropertyTable ()
void SetPartID (PRUint32 aID)
 Sets the ID used to identify this part of the multipart document.
PRUint32 GetPartID () const
 Return the ID used to identify this part of the multipart document.
virtual nsresult Sanitize ()=0
 Sanitize the document by resetting all input elements and forms that have autocomplete=off to their default values.
virtual void EnumerateSubDocuments (nsSubDocEnumFunc aCallback, void *aData)=0
virtual PRBool CanSavePresentation (nsIRequest *aNewRequest)=0
 Check whether it is safe to cache the presentation of this document and all of its subdocuments.
virtual void Destroy ()=0
 Notify the document that its associated ContentViewer is being destroyed.
virtual already_AddRefed
< nsILayoutHistoryState
GetLayoutHistoryState () const =0
 Get the layout history state that should be used to save and restore state for nodes in this document.
virtual void BlockOnload ()=0
 Methods that can be used to prevent onload firing while an event that should block onload is posted.
virtual void UnblockOnload ()=0
virtual void OnPageShow (PRBool aPersisted)=0
 Notification that the page has been shown, for documents which are loaded into a DOM window.
virtual void OnPageHide (PRBool aPersisted)=0
 Notification that the page has been hidden, for documents which are loaded into a DOM window.
virtual void AddStyleRelevantLink (nsIContent *aContent, nsIURI *aURI)=0
 Notification that an element is a link with a given URI that is relevant to style.
virtual void ForgetLink (nsIContent *aContent)=0
 Notification that an element is a link and its URI might have been changed or the element removed.
virtual void NotifyURIVisitednessChanged (nsIURI *aURI)=0
 Notification that the visitedness state of a URI has been changed and style related to elements linking to that URI should be updated.

Protected Member Functions

 ~nsIDocument ()

Protected Attributes

nsString mDocumentTitle
nsCOMPtr< nsIURImDocumentURI
nsCOMPtr< nsIURImDocumentBaseURI
nsWeakPtr mDocumentLoadGroup
nsWeakPtr mDocumentContainer
nsCString mCharacterSet
PRInt32 mCharacterSetSource
nsIDocumentmParentDocument
nsIContentmRootContent
PRInt32 mNextContentID
nsCOMPtr< nsIBindingManagermBindingManager
nsNodeInfoManagermNodeInfoManager
nsICSSLoadermCSSLoader
nsPropertyTable mPropertyTable
PRBool mBidiEnabled
nsXPIDLCString mContentLanguage
nsCString mContentType
nsCOMPtr< nsISupports > mSecurityInfo
PRUint32 mPartID

Detailed Description

Definition at line 112 of file nsIDocument.h.


Member Typedef Documentation

Enumerate all subdocuments.

The enumerator callback should return PR_TRUE to continue enumerating, or PR_FALSE to stop.

Definition at line 699 of file nsIDocument.h.


Constructor & Destructor Documentation

nsIDocument::~nsIDocument ( ) [inline, protected]

Definition at line 790 of file nsIDocument.h.

  {
    // XXX The cleanup of mNodeInfoManager (calling DropDocumentReference and
    //     releasing it) happens in the nsDocument destructor. We'd prefer to
    //     do it here but nsNodeInfoManager is a concrete class that we don't
    //     want to expose to users of the nsIDocument API outside of Gecko.
  }

Member Function Documentation

virtual void nsIDocument::AddCatalogStyleSheet ( nsIStyleSheet aSheet) [pure virtual]

Implemented in nsDocument.

virtual nsresult nsIDocument::AddCharSetObserver ( nsIObserver aObserver) [pure virtual]

Add an observer that gets notified whenever the charset changes.

Implemented in nsDocument.

virtual void nsIDocument::AddObserver ( nsIDocumentObserver aObserver) [pure virtual]

Add a new observer of document change notifications.

Whenever content is changed, appended, inserted or removed the observers are informed.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::AddStyleRelevantLink ( nsIContent aContent,
nsIURI aURI 
) [pure virtual]

Notification that an element is a link with a given URI that is relevant to style.

Here is the caller graph for this function:

virtual void nsIDocument::AddStyleSheet ( nsIStyleSheet aSheet) [pure virtual]

Add a stylesheet to the document.

Implemented in nsDocument.

virtual nsresult nsIDocument::AddXMLEventsContent ( nsIContent aXMLEventsElement) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::AttributeChanged ( nsIContent aChild,
PRInt32  aNameSpaceID,
nsIAtom aAttribute,
PRInt32  aModType 
) [pure virtual]

Implemented in nsDocument, nsHTMLDocument, and nsXULDocument.

Here is the caller graph for this function:

virtual void nsIDocument::AttributeWillChange ( nsIContent aChild,
PRInt32  aNameSpaceID,
nsIAtom aAttribute 
) [pure virtual]

Implemented in nsDocument, and nsHTMLDocument.

Here is the caller graph for this function:

virtual void nsIDocument::BeginLoad ( ) [pure virtual]

Implemented in nsDocument.

virtual void nsIDocument::BeginUpdate ( nsUpdateType  aUpdateType) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

Definition at line 557 of file nsIDocument.h.

  {
    return mBindingManager;
  }

Here is the caller graph for this function:

virtual void nsIDocument::BlockOnload ( ) [pure virtual]

Methods that can be used to prevent onload firing while an event that should block onload is posted.

onload is guaranteed to not fire until either all calls to BlockOnload() have been matched by calls to UnblockOnload() or the load has been stopped altogether (by the user pressing the Stop button, say). onload may fire synchronously from inside the UnblockOnload() call.

Here is the caller graph for this function:

virtual PRBool nsIDocument::CanSavePresentation ( nsIRequest aNewRequest) [pure virtual]

Check whether it is safe to cache the presentation of this document and all of its subdocuments.

This method checks the following conditions recursively:

  • Some document types, such as plugin documents, cannot be safely cached.
  • If there are any pending requests, we don't allow the presentation to be cached. Ideally these requests would be suspended and resumed, but that is difficult in some cases, such as XMLHttpRequest.
  • If there are any beforeunload or unload listeners, we must fire them for correctness, but this likely puts the document into a state where it would not function correctly if restored.

|aNewRequest| should be the request for a new document which will replace this document in the docshell. The new document's request will be ignored when checking for active requests. If there is no request associated with the new document, this parameter may be null.

Implemented in nsPluginDocument.

Here is the caller graph for this function:

virtual void nsIDocument::CharacterDataChanged ( nsIContent aContent,
PRBool  aAppend 
) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::ContentAppended ( nsIContent aContainer,
PRInt32  aNewIndexInContainer 
) [pure virtual]

Implemented in nsDocument, nsHTMLDocument, and nsXULDocument.

Here is the caller graph for this function:

virtual void nsIDocument::ContentInserted ( nsIContent aContainer,
nsIContent aChild,
PRInt32  aIndexInContainer 
) [pure virtual]

Implemented in nsDocument, nsHTMLDocument, and nsXULDocument.

Here is the caller graph for this function:

virtual void nsIDocument::ContentRemoved ( nsIContent aContainer,
nsIContent aChild,
PRInt32  aIndexInContainer 
) [pure virtual]

Implemented in nsDocument, nsHTMLDocument, and nsXULDocument.

Here is the caller graph for this function:

virtual void nsIDocument::ContentStatesChanged ( nsIContent aContent1,
nsIContent aContent2,
PRInt32  aStateMask 
) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual nsresult nsIDocument::CreateElem ( nsIAtom aName,
nsIAtom aPrefix,
PRInt32  aNamespaceID,
PRBool  aDocumentDefaultType,
nsIContent **  aResult 
) [pure virtual]

Create an element with the specified name, prefix and namespace ID.

If aDocumentDefaultType is true we create an element of the default type for that document (currently XHTML in HTML documents and XUL in XUL documents), otherwise we use the type specified by the namespace ID.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual nsresult nsIDocument::CreateShell ( nsPresContext aContext,
nsIViewManager aViewManager,
nsStyleSet aStyleSet,
nsIPresShell **  aInstancePtrResult 
) [pure virtual]

Create a new presentation shell that will use aContext for its presentation context (presentation contexts must not be shared among multiple presentation shells).

Implemented in nsDocument, and nsHTMLDocument.

nsICSSLoader* nsIDocument::CSSLoader ( ) const [inline]

Get this document's CSSLoader.

This is guaranteed to not return null.

Definition at line 442 of file nsIDocument.h.

                                  {
    return mCSSLoader;
  }

Here is the caller graph for this function:

virtual nsresult nsIDocument::DeleteProperty ( nsIAtom aPropertyName) [pure virtual]

Here is the caller graph for this function:

virtual PRBool nsIDocument::DeleteShell ( nsIPresShell aShell) [pure virtual]

Implemented in nsDocument.

virtual void nsIDocument::Destroy ( ) [pure virtual]

Notify the document that its associated ContentViewer is being destroyed.

This releases circular references so that the document can go away. Destroy() is only called on documents that have a content viewer.

Implemented in nsImageDocument.

virtual void nsIDocument::EndLoad ( ) [pure virtual]
virtual void nsIDocument::EndUpdate ( nsUpdateType  aUpdateType) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::EnsureCatalogStyleSheet ( const char *  aStyleSheetURI) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::EnumerateSubDocuments ( nsSubDocEnumFunc  aCallback,
void aData 
) [pure virtual]

Here is the caller graph for this function:

virtual nsIContent* nsIDocument::FindContentForSubDocument ( nsIDocument aDocument) const [pure virtual]

Find the content node for which aDocument is a sub document.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::FlushPendingNotifications ( mozFlushType  aType) [pure virtual]

Flush notifications for this document and its parent documents (since those may affect the layout of this one).

Implemented in nsDocument, and nsHTMLDocument.

Here is the caller graph for this function:

virtual void nsIDocument::ForgetLink ( nsIContent aContent) [pure virtual]

Notification that an element is a link and its URI might have been changed or the element removed.

If the element is still a link relevant to style, then someone must ensure that AddStyleRelevantLink is (eventually) called on it again.

Here is the caller graph for this function:

Definition at line 552 of file nsIDocument.h.

  {
    return mNextContentID++;
  }

Here is the caller graph for this function:

virtual nsHTMLStyleSheet* nsIDocument::GetAttributeStyleSheet ( ) const [pure virtual]

Get this document's attribute stylesheet.

May return null if there isn't one.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::GetBaseTarget ( nsAString &  aBaseTarget) const [pure virtual]

Get/Set the base target of a link in a document.

Implemented in nsDocument.

Here is the caller graph for this function:

nsIURI* nsIDocument::GetBaseURI ( ) const [inline]

Return the base URI for relative URIs in the document (the document uri unless it's overridden by SetBaseURI, HTML <base> tags, etc.).

The returned URI could be null if there is no document URI.

Definition at line 183 of file nsIDocument.h.

Here is the caller graph for this function:

PRBool nsIDocument::GetBidiEnabled ( ) const [inline]

Check if the document contains bidi data.

If so, we have to apply the Unicode Bidi Algorithm.

Definition at line 258 of file nsIDocument.h.

  {
    return mBidiEnabled;
  }

Here is the caller graph for this function:

virtual nsIStyleSheet* nsIDocument::GetCatalogStyleSheetAt ( PRInt32  aIndex) const [pure virtual]

Implemented in nsDocument.

virtual nsIChannel* nsIDocument::GetChannel ( ) const [pure virtual]

Get the channel that was passed to StartDocumentLoad or Reset for this document.

Note that this may be null in some cases (eg if StartDocumentLoad or Reset were never called)

Implemented in nsDocument.

virtual nsIContent* nsIDocument::GetChildAt ( PRUint32  aIndex) const [pure virtual]

Get the direct children of the document - content in the prolog, the root content and content in the epilog.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual PRUint32 nsIDocument::GetChildCount ( ) const [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

already_AddRefed<nsISupports> nsIDocument::GetContainer ( ) const [inline]

Get the container (docshell) for this document.

Definition at line 593 of file nsIDocument.h.

  {
    nsISupports* container = nsnull;
    if (mDocumentContainer)
      CallQueryReferent(mDocumentContainer.get(), &container);

    return container;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIDocument::GetContentLanguage ( nsAString &  aContentLanguage) const [inline]

Return the language of this document.

Definition at line 246 of file nsIDocument.h.

  {
    CopyASCIItoUCS2(mContentLanguage, aContentLanguage);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIDocument::GetContentType ( nsAString &  aContentType) [pure virtual]

Get the Content-Type of this document.

(This will always return NS_OK, but has this signature to be compatible with nsIDOMNSDocument::GetContentType())

Implemented in nsXULDocument.

virtual PRInt32 nsIDocument::GetDefaultNamespaceID ( ) const [pure virtual]

Returns the default namespace ID used for elements created in this document.

Implemented in nsDocument, nsHTMLDocument, and nsXULDocument.

Here is the caller graph for this function:

Return a standard name for the document's character set.

This will trigger a startDocumentLoad if necessary to answer the question.

Definition at line 200 of file nsIDocument.h.

  {
    return mCharacterSet;
  }

Here is the caller graph for this function:

Definition at line 211 of file nsIDocument.h.

  {
    return mCharacterSetSource;
  }

Return the LoadGroup for the document.

May return null.

Definition at line 169 of file nsIDocument.h.

  {
    nsILoadGroup *group = nsnull;
    if (mDocumentLoadGroup)
      CallQueryReferent(mDocumentLoadGroup.get(), &group);

    return group;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Return the title of the document.

May return null.

Definition at line 139 of file nsIDocument.h.

  {
    return mDocumentTitle;
  }

Here is the caller graph for this function:

nsIURI* nsIDocument::GetDocumentURI ( ) const [inline]

Return the URI for the document.

May return null.

Definition at line 147 of file nsIDocument.h.

  {
    return mDocumentURI;
  }

Here is the caller graph for this function:

virtual void nsIDocument::GetHeaderData ( nsIAtom aHeaderField,
nsAString &  aData 
) const [pure virtual]

Access HTTP header data (this may also get set from other sources, like HTML META tags).

Implemented in nsDocument.

Here is the caller graph for this function:

virtual PRInt32 nsIDocument::GetIndexOfStyleSheet ( nsIStyleSheet aSheet) const [pure virtual]

Get the index of a particular stylesheet.

This will always consider the "special" sheets as part of the sheet list.

Parameters:
aSheetthe sheet to get the index of
Returns:
aIndex the index of the sheet in the full list

Implemented in nsDocument.

Here is the caller graph for this function:

virtual nsIHTMLCSSStyleSheet* nsIDocument::GetInlineStyleSheet ( ) const [pure virtual]

Get this document's inline style sheet.

May return null if there isn't one

Implemented in nsDocument.

Get the layout history state that should be used to save and restore state for nodes in this document.

This may return null; if that happens state saving and restoration is not possible.

Here is the caller graph for this function:

virtual nsILineBreaker* nsIDocument::GetLineBreaker ( ) [pure virtual]

Return the Line Breaker for the document.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual PRInt32 nsIDocument::GetNumberOfCatalogStyleSheets ( ) const [pure virtual]

Just like the style sheet API, but for "catalog" sheets, extra sheets inserted at the UA level.

Implemented in nsDocument.

virtual PRUint32 nsIDocument::GetNumberOfShells ( ) const [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual PRInt32 nsIDocument::GetNumberOfStyleSheets ( ) const [pure virtual]

Accessors to the collection of stylesheets owned by this document.

Style sheets are ordered, most significant last. Get the number of stylesheets

Returns:
the number of stylesheets
Exceptions:
noexceptions

Implemented in nsDocument.

Here is the caller graph for this function:

Return the parent document of this document.

Will return null unless this document is within a compound document and has a parent. Note that this parent chain may cross chrome boundaries.

Definition at line 307 of file nsIDocument.h.

  {
    return mParentDocument;
  }

Here is the caller graph for this function:

PRUint32 nsIDocument::GetPartID ( ) const [inline]

Return the ID used to identify this part of the multipart document.

Definition at line 684 of file nsIDocument.h.

                             {
    return mPartID;
  }

Here is the caller graph for this function:

virtual nsIPrincipal* nsIDocument::GetPrincipal ( ) [pure virtual]

Return the principal responsible for this document.

Implemented in nsDocument, and nsXULDocument.

Here is the caller graph for this function:

virtual void* nsIDocument::GetProperty ( nsIAtom aPropertyName,
nsresult aStatus = nsnull 
) const [pure virtual]

Here is the caller graph for this function:

Return the root content object for this document.

Definition at line 339 of file nsIDocument.h.

  {
    return mRootContent;
  }

Here is the caller graph for this function:

Implemented in nsDocument.

virtual nsIScriptGlobalObject* nsIDocument::GetScriptGlobalObject ( ) const [pure virtual]

Get/set the object from which a document can get a script context and scope.

This is the context within which all scripts (during document creation and during event handling) will run. Note that this is the inner window object.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual nsIScriptLoader* nsIDocument::GetScriptLoader ( ) [pure virtual]

Get the script loader for this document.

Implemented in nsDocument.

Here is the caller graph for this function:

nsISupports* nsIDocument::GetSecurityInfo ( ) [inline]

Get the security info (i.e.

SSL state etc) that the document got from the channel/document that created the content of the document.

See also:
nsIChannel

Definition at line 649 of file nsIDocument.h.

  {
    return mSecurityInfo;
  }
virtual nsIPresShell* nsIDocument::GetShellAt ( PRUint32  aIndex) const [pure virtual]

Implemented in nsDocument.

virtual nsIStyleSheet* nsIDocument::GetStyleSheetAt ( PRInt32  aIndex) const [pure virtual]

Get a particular stylesheet.

Parameters:
aIndexthe index the stylesheet lives at. This is zero-based
Returns:
the stylesheet at aIndex. Null if aIndex is out of range.
Exceptions:
noexceptions

Implemented in nsDocument.

Here is the caller graph for this function:

virtual nsIDocument* nsIDocument::GetSubDocumentFor ( nsIContent aContent) const [pure virtual]

Get the sub document for aContent.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual nsPIDOMWindow* nsIDocument::GetWindow ( ) [pure virtual]

Return the window containing the document (the outer window).

Implemented in nsDocument.

Here is the caller graph for this function:

virtual nsIWordBreaker* nsIDocument::GetWordBreaker ( ) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::GetXMLDeclaration ( nsAString &  aVersion,
nsAString &  aEncoding,
nsAString &  Standalone 
) [pure virtual]

Implemented in nsDocument.

virtual nsresult nsIDocument::HandleDOMEvent ( nsPresContext aPresContext,
nsEvent aEvent,
nsIDOMEvent **  aDOMEvent,
PRUint32  aFlags,
nsEventStatus aEventStatus 
) [pure virtual]

Implemented in nsDocument, and nsXULDocument.

Here is the caller graph for this function:

virtual PRInt32 nsIDocument::IndexOf ( nsIContent aPossibleChild) const [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::InsertStyleSheetAt ( nsIStyleSheet aSheet,
PRInt32  aIndex 
) [pure virtual]

Insert a sheet at a particular spot in the stylesheet list (zero-based)

Parameters:
aSheetthe sheet to insert
aIndexthe index to insert at. This index will be adjusted for the "special" sheets.
Exceptions:
noexceptions

Implemented in nsDocument.

Here is the caller graph for this function:

virtual PRBool nsIDocument::IsCaseSensitive ( ) [inline, virtual]

Reimplemented in nsHTMLDocument.

Definition at line 617 of file nsIDocument.h.

  {
    return PR_TRUE;
  }

Here is the caller graph for this function:

virtual PRBool nsIDocument::IsLoadedAsData ( ) [inline, virtual]

Reimplemented in nsXMLDocument.

Definition at line 626 of file nsIDocument.h.

  {
    return PR_FALSE;
  }
virtual PRBool nsIDocument::IsScriptEnabled ( ) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

Only to be used inside Gecko, you can't really do anything with the pointer outside Gecko anyway.

Definition at line 566 of file nsIDocument.h.

  {
    return mNodeInfoManager;
  }

Here is the caller graph for this function:

virtual void nsIDocument::NotifyURIVisitednessChanged ( nsIURI aURI) [pure virtual]

Notification that the visitedness state of a URI has been changed and style related to elements linking to that URI should be updated.

virtual void nsIDocument::OnPageHide ( PRBool  aPersisted) [pure virtual]

Notification that the page has been hidden, for documents which are loaded into a DOM window.

This corresponds to the unloading of the document, or to the document's presentation being saved but removed from an existing DOM window. This notification fires applicable DOM events to the content window. See nsIDOMPageTransitionEvent.idl for a description of the |aPersisted| parameter.

Implemented in nsDocument.

virtual void nsIDocument::OnPageShow ( PRBool  aPersisted) [pure virtual]

Notification that the page has been shown, for documents which are loaded into a DOM window.

This corresponds to the completion of document load, or to the page's presentation being restored into an existing DOM window. This notification fires applicable DOM events to the content window. See nsIDOMPageTransitionEvent.idl for a description of the |aPersisted| parameter.

Implemented in nsDocument.

Definition at line 672 of file nsIDocument.h.

{ return &mPropertyTable; }

Here is the caller graph for this function:

virtual void nsIDocument::RemoveCharSetObserver ( nsIObserver aObserver) [pure virtual]

Remove a charset observer.

Implemented in nsDocument.

virtual PRBool nsIDocument::RemoveObserver ( nsIDocumentObserver aObserver) [pure virtual]

Remove an observer of document change notifications.

This will return false if the observer cannot be found.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::RemoveStyleSheet ( nsIStyleSheet aSheet) [pure virtual]

Remove a stylesheet from the document.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::Reset ( nsIChannel aChannel,
nsILoadGroup aLoadGroup 
) [pure virtual]

Reset the document using the given channel and loadgroup.

This works like ResetToURI, but also sets the document's channel to aChannel.

Implemented in nsDocument, nsXULDocument, nsHTMLDocument, and nsXMLDocument.

Here is the caller graph for this function:

virtual void nsIDocument::ResetToURI ( nsIURI aURI,
nsILoadGroup aLoadGroup 
) [pure virtual]

Reset this document to aURI and aLoadGroup.

aURI must not be null.

Implemented in nsDocument, nsXULDocument, nsHTMLDocument, and nsXMLDocument.

virtual nsresult nsIDocument::Sanitize ( ) [pure virtual]

Sanitize the document by resetting all input elements and forms that have autocomplete=off to their default values.

virtual void nsIDocument::SetBaseTarget ( const nsAString &  aBaseTarget) [pure virtual]

Implemented in nsDocument.

virtual nsresult nsIDocument::SetBaseURI ( nsIURI aURI) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

void nsIDocument::SetBidiEnabled ( PRBool  aBidiEnabled) [inline]

Indicate the document contains bidi data.

Currently, we cannot disable bidi, because once bidi is enabled, it affects a frame model irreversibly, and plays even though the document no longer contains bidi data.

Definition at line 269 of file nsIDocument.h.

  {
    mBidiEnabled = aBidiEnabled;
  }

Here is the caller graph for this function:

void nsIDocument::SetContainer ( nsISupports *  aContainer) [inline]

Set the container (docshell) for this document.

Definition at line 585 of file nsIDocument.h.

Here is the call graph for this function:

virtual void nsIDocument::SetContentType ( const nsAString &  aContentType) [pure virtual]

Set the Content-Type of this document.

Implemented in nsDocument, and nsXULDocument.

virtual void nsIDocument::SetDocumentCharacterSet ( const nsACString &  aCharSetID) [pure virtual]

Set the document's character encoding.

|aCharSetID| should be canonical. That is, callers are responsible for the charset alias resolution.

Implemented in nsDocument.

Here is the caller graph for this function:

Definition at line 216 of file nsIDocument.h.

  {
    mCharacterSetSource = aCharsetSource;
  }

Here is the caller graph for this function:

void nsIDocument::SetDocumentURI ( nsIURI aURI) [inline]

Definition at line 151 of file nsIDocument.h.

virtual void nsIDocument::SetHeaderData ( nsIAtom aheaderField,
const nsAString &  aData 
) [pure virtual]

Implemented in nsDocument.

virtual void nsIDocument::SetLineBreaker ( nsILineBreaker aLineBreaker) [pure virtual]

Implemented in nsDocument.

Set the parent document of this document.

Definition at line 315 of file nsIDocument.h.

  {
    mParentDocument = aParent;
  }

Here is the caller graph for this function:

Sets the ID used to identify this part of the multipart document.

Definition at line 677 of file nsIDocument.h.

                               {
    mPartID = aID;
  }

Here is the caller graph for this function:

virtual void nsIDocument::SetPrincipal ( nsIPrincipal aPrincipal) [pure virtual]

Set the principal responsible for this document.

Implemented in nsDocument, and nsXULDocument.

Here is the caller graph for this function:

virtual nsresult nsIDocument::SetProperty ( nsIAtom aPropertyName,
void aValue,
NSPropertyDtorFunc  aDtor = nsnull 
) [pure virtual]

Here is the caller graph for this function:

virtual nsresult nsIDocument::SetRootContent ( nsIContent aRoot) [pure virtual]

Set aRoot as the root content object for this document.

If aRoot is non-null, this should not be called on documents that currently have a root content without first clearing out the document's children. Passing in null to unbind the existing root content is allowed. This method will bind aRoot to the document; the caller need not call BindToTree on aRoot.

Note that this method never sends out nsIDocumentObserver notifications; doing that is the caller's responsibility.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::SetScriptGlobalObject ( nsIScriptGlobalObject aGlobalObject) [pure virtual]
virtual void nsIDocument::SetStyleSheetApplicableState ( nsIStyleSheet aSheet,
PRBool  aApplicable 
) [pure virtual]

Notify the document that the applicable state of the sheet changed and that observers should be notified and style sets updated.

Implemented in nsDocument.

Here is the caller graph for this function:

virtual nsresult nsIDocument::SetSubDocumentFor ( nsIContent aContent,
nsIDocument aSubDoc 
) [pure virtual]

Set the sub document for aContent to aSubDoc.

Implemented in nsDocument.

virtual void nsIDocument::SetWordBreaker ( nsIWordBreaker aWordBreaker) [pure virtual]

Implemented in nsDocument.

virtual void nsIDocument::SetXMLDeclaration ( const PRUnichar aVersion,
const PRUnichar aEncoding,
const PRInt32  aStandalone 
) [pure virtual]

Set and get XML declaration.

If aVersion is null there is no declaration. aStandalone takes values -1, 0 and 1 indicating respectively that there was no standalone parameter in the declaration, that it was given as no, or that it was given as yes.

Implemented in nsDocument.

virtual nsresult nsIDocument::StartDocumentLoad ( const char *  aCommand,
nsIChannel aChannel,
nsILoadGroup aLoadGroup,
nsISupports *  aContainer,
nsIStreamListener **  aDocListener,
PRBool  aReset,
nsIContentSink aSink = nsnull 
) [pure virtual]
virtual void nsIDocument::StopDocumentLoad ( ) [pure virtual]

Implemented in nsDocument.

virtual void nsIDocument::StyleRuleAdded ( nsIStyleSheet aStyleSheet,
nsIStyleRule aStyleRule 
) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::StyleRuleChanged ( nsIStyleSheet aStyleSheet,
nsIStyleRule aOldStyleRule,
nsIStyleRule aNewStyleRule 
) [pure virtual]

Implemented in nsDocument.

virtual void nsIDocument::StyleRuleRemoved ( nsIStyleSheet aStyleSheet,
nsIStyleRule aStyleRule 
) [pure virtual]

Implemented in nsDocument.

Here is the caller graph for this function:

virtual void nsIDocument::UnblockOnload ( ) [pure virtual]
virtual void* nsIDocument::UnsetProperty ( nsIAtom aPropertyName,
nsresult aStatus = nsnull 
) [pure virtual]
virtual void nsIDocument::UpdateStyleSheets ( nsCOMArray< nsIStyleSheet > &  aOldSheets,
nsCOMArray< nsIStyleSheet > &  aNewSheets 
) [pure virtual]

Replace the stylesheets in aOldSheets with the stylesheets in aNewSheets.

The two lists must have equal length, and the sheet at positon J in the first list will be replaced by the sheet at position J in the second list. Some sheets in the second list may be null; if so the corresponding sheets in the first list will simply be removed.

Implemented in nsDocument.


Member Data Documentation

Definition at line 831 of file nsIDocument.h.

Definition at line 820 of file nsIDocument.h.

Definition at line 806 of file nsIDocument.h.

Definition at line 807 of file nsIDocument.h.

Definition at line 833 of file nsIDocument.h.

Definition at line 834 of file nsIDocument.h.

Definition at line 823 of file nsIDocument.h.

Definition at line 800 of file nsIDocument.h.

Definition at line 804 of file nsIDocument.h.

Definition at line 802 of file nsIDocument.h.

Definition at line 798 of file nsIDocument.h.

Definition at line 799 of file nsIDocument.h.

Definition at line 818 of file nsIDocument.h.

Definition at line 821 of file nsIDocument.h.

Definition at line 810 of file nsIDocument.h.

Definition at line 841 of file nsIDocument.h.

Definition at line 828 of file nsIDocument.h.

Definition at line 814 of file nsIDocument.h.

nsCOMPtr<nsISupports> nsIDocument::mSecurityInfo [protected]

Definition at line 837 of file nsIDocument.h.


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