Added GetDocumentURLGroup() methodnsIDocument.h

This commit is contained in:
rpotts%netscape.com 1998-10-01 21:43:02 +00:00
parent b5ece1dfa3
commit 91c6367986
4 changed files with 30 additions and 0 deletions

View File

@ -36,6 +36,7 @@ class nsIStreamObserver;
class nsIStyleSet;
class nsIStyleSheet;
class nsIURL;
class nsIURLGroup;
class nsIViewManager;
class nsString;
class nsIScriptContextOwner;
@ -88,6 +89,11 @@ public:
*/
virtual nsIURL* GetDocumentURL() const = 0;
/**
* Return the URLGroup for the document. May return null.
*/
virtual nsIURLGroup* GetDocumentURLGroup() const = 0;
/**
* Return a standard name for the document's character set. This will
* trigger a startDocumentLoad if necessary to answer the question.

View File

@ -20,6 +20,7 @@
#include "nsDocument.h"
#include "nsIArena.h"
#include "nsIURL.h"
#include "nsIURLGroup.h"
#include "nsString.h"
#include "nsIContent.h"
#include "nsIStyleSet.h"
@ -146,6 +147,7 @@ nsDocument::nsDocument()
mArena = nsnull;
mDocumentTitle = nsnull;
mDocumentURL = nsnull;
mDocumentURLGroup = nsnull;
mCharacterSet = eCharSetID_IsoLatin1;
mParentDocument = nsnull;
mRootContent = nsnull;
@ -180,6 +182,7 @@ nsDocument::~nsDocument()
mDocumentTitle = nsnull;
}
NS_IF_RELEASE(mDocumentURL);
NS_IF_RELEASE(mDocumentURLGroup);
mParentDocument = nsnull;
@ -288,6 +291,12 @@ nsIURL* nsDocument::GetDocumentURL() const
return mDocumentURL;
}
nsIURLGroup* nsDocument::GetDocumentURLGroup() const
{
NS_IF_ADDREF(mDocumentURLGroup);
return mDocumentURLGroup;
}
nsCharSetID nsDocument::GetDocumentCharacterSet() const
{
return mCharacterSet;

View File

@ -36,6 +36,7 @@ class nsIStreamObserver;
class nsIStyleSet;
class nsIStyleSheet;
class nsIURL;
class nsIURLGroup;
class nsIViewManager;
class nsString;
class nsIScriptContextOwner;
@ -88,6 +89,11 @@ public:
*/
virtual nsIURL* GetDocumentURL() const = 0;
/**
* Return the URLGroup for the document. May return null.
*/
virtual nsIURLGroup* GetDocumentURLGroup() const = 0;
/**
* Return a standard name for the document's character set. This will
* trigger a startDocumentLoad if necessary to answer the question.

View File

@ -20,6 +20,7 @@
#include "nsDocument.h"
#include "nsIArena.h"
#include "nsIURL.h"
#include "nsIURLGroup.h"
#include "nsString.h"
#include "nsIContent.h"
#include "nsIStyleSet.h"
@ -146,6 +147,7 @@ nsDocument::nsDocument()
mArena = nsnull;
mDocumentTitle = nsnull;
mDocumentURL = nsnull;
mDocumentURLGroup = nsnull;
mCharacterSet = eCharSetID_IsoLatin1;
mParentDocument = nsnull;
mRootContent = nsnull;
@ -180,6 +182,7 @@ nsDocument::~nsDocument()
mDocumentTitle = nsnull;
}
NS_IF_RELEASE(mDocumentURL);
NS_IF_RELEASE(mDocumentURLGroup);
mParentDocument = nsnull;
@ -288,6 +291,12 @@ nsIURL* nsDocument::GetDocumentURL() const
return mDocumentURL;
}
nsIURLGroup* nsDocument::GetDocumentURLGroup() const
{
NS_IF_ADDREF(mDocumentURLGroup);
return mDocumentURLGroup;
}
nsCharSetID nsDocument::GetDocumentCharacterSet() const
{
return mCharacterSet;