Changed interfaces to take nsISupports for the container instead of nsIContentViewerContainer. nsXULDocument was for some reason holding on to this interface (as a weak reference) but was never using it. I have therefore gotten rid of this member variable. r=dp

This commit is contained in:
tbogard%aol.net 1999-11-15 22:14:37 +00:00
Родитель d4375c229d
Коммит 23832caf58
4 изменённых файлов: 16 добавлений и 30 удалений

Просмотреть файл

@ -216,7 +216,6 @@ nsXULDocument::nsXULDocument(void)
mScriptObject(nsnull),
mCharSetID("UTF-8"),
mDisplaySelection(PR_FALSE),
mContentViewerContainer(nsnull),
mIsPopup(PR_FALSE),
mForwardReferencesResolved(PR_FALSE),
mState(eState_Master)
@ -516,7 +515,7 @@ NS_IMETHODIMP
nsXULDocument::StartDocumentLoad(const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
nsIContentViewerContainer* aContainer,
nsISupports* aContainer,
nsIStreamListener **aDocListener)
{
nsresult rv;
@ -1886,12 +1885,11 @@ NS_IMETHODIMP
nsXULDocument::CreateFromPrototype(const char* aCommand,
nsIXULPrototypeDocument* aPrototype,
nsIPrincipal* aPrincipal,
nsIContentViewerContainer* aContainer)
nsISupports* aContainer)
{
nsresult rv;
mCurrentPrototype = aPrototype;
mContentViewerContainer = aContainer;
mDocumentPrincipal = aPrincipal;
rv = mCurrentPrototype->GetURI(getter_AddRefs(mDocumentURL));
@ -1920,7 +1918,7 @@ nsXULDocument::CreateFromPrototype(const char* aCommand,
NS_IMETHODIMP
nsXULDocument::LoadFromStream(nsIInputStream& xulStream,
nsIContentViewerContainer* aContainer,
nsISupports* aContainer,
const char* aCommand)
{
nsresult rv;
@ -3792,7 +3790,7 @@ nsXULDocument::CreateElement(PRInt32 aNameSpaceID,
nsresult
nsXULDocument::PrepareToLoad(nsIContentViewerContainer* aContainer,
nsXULDocument::PrepareToLoad(nsISupports* aContainer,
const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
@ -3819,10 +3817,6 @@ nsXULDocument::PrepareToLoad(nsIContentViewerContainer* aContainer,
if (NS_FAILED(rv)) return rv;
}
// Set the content viewer container. Note that we'll only hold a
// weak reference to it.
mContentViewerContainer = aContainer;
mDocumentTitle.Truncate();
// Get the document's principal

Просмотреть файл

@ -104,7 +104,7 @@ public:
NS_IMETHOD StartDocumentLoad(const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
nsIContentViewerContainer* aContainer,
nsISupports* aContainer,
nsIStreamListener **aDocListener);
virtual const nsString* GetDocumentTitle() const;
@ -281,11 +281,11 @@ public:
NS_IMETHOD CreateFromPrototype(const char* aCommand,
nsIXULPrototypeDocument* aPrototype,
nsIPrincipal* aPrincipal,
nsIContentViewerContainer* aContainer);
nsISupports* aContainer);
// nsIStreamLoadableDocument interface
NS_IMETHOD LoadFromStream(nsIInputStream& xulStream,
nsIContentViewerContainer* aContainer,
nsISupports* aContainer,
const char* aCommand );
// nsIDOMEventCapturer interface
@ -419,7 +419,7 @@ protected:
nsIAtom* aTag,
nsIContent** aResult);
nsresult PrepareToLoad(nsIContentViewerContainer* aContainer,
nsresult PrepareToLoad(nsISupports* aContainer,
const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
@ -512,7 +512,6 @@ protected:
nsCOMPtr<nsIRDFDataSource> mLocalStore;
nsCOMPtr<nsILineBreaker> mLineBreaker; // [OWNER]
nsCOMPtr<nsIWordBreaker> mWordBreaker; // [OWNER]
nsIContentViewerContainer* mContentViewerContainer; // [WEAK] it owns me! (indirectly)
nsString mCommand;
nsVoidArray mSubDocuments; // [OWNER] of subelements
PRBool mIsPopup;

Просмотреть файл

@ -216,7 +216,6 @@ nsXULDocument::nsXULDocument(void)
mScriptObject(nsnull),
mCharSetID("UTF-8"),
mDisplaySelection(PR_FALSE),
mContentViewerContainer(nsnull),
mIsPopup(PR_FALSE),
mForwardReferencesResolved(PR_FALSE),
mState(eState_Master)
@ -516,7 +515,7 @@ NS_IMETHODIMP
nsXULDocument::StartDocumentLoad(const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
nsIContentViewerContainer* aContainer,
nsISupports* aContainer,
nsIStreamListener **aDocListener)
{
nsresult rv;
@ -1886,12 +1885,11 @@ NS_IMETHODIMP
nsXULDocument::CreateFromPrototype(const char* aCommand,
nsIXULPrototypeDocument* aPrototype,
nsIPrincipal* aPrincipal,
nsIContentViewerContainer* aContainer)
nsISupports* aContainer)
{
nsresult rv;
mCurrentPrototype = aPrototype;
mContentViewerContainer = aContainer;
mDocumentPrincipal = aPrincipal;
rv = mCurrentPrototype->GetURI(getter_AddRefs(mDocumentURL));
@ -1920,7 +1918,7 @@ nsXULDocument::CreateFromPrototype(const char* aCommand,
NS_IMETHODIMP
nsXULDocument::LoadFromStream(nsIInputStream& xulStream,
nsIContentViewerContainer* aContainer,
nsISupports* aContainer,
const char* aCommand)
{
nsresult rv;
@ -3792,7 +3790,7 @@ nsXULDocument::CreateElement(PRInt32 aNameSpaceID,
nsresult
nsXULDocument::PrepareToLoad(nsIContentViewerContainer* aContainer,
nsXULDocument::PrepareToLoad(nsISupports* aContainer,
const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
@ -3819,10 +3817,6 @@ nsXULDocument::PrepareToLoad(nsIContentViewerContainer* aContainer,
if (NS_FAILED(rv)) return rv;
}
// Set the content viewer container. Note that we'll only hold a
// weak reference to it.
mContentViewerContainer = aContainer;
mDocumentTitle.Truncate();
// Get the document's principal

Просмотреть файл

@ -104,7 +104,7 @@ public:
NS_IMETHOD StartDocumentLoad(const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
nsIContentViewerContainer* aContainer,
nsISupports* aContainer,
nsIStreamListener **aDocListener);
virtual const nsString* GetDocumentTitle() const;
@ -281,11 +281,11 @@ public:
NS_IMETHOD CreateFromPrototype(const char* aCommand,
nsIXULPrototypeDocument* aPrototype,
nsIPrincipal* aPrincipal,
nsIContentViewerContainer* aContainer);
nsISupports* aContainer);
// nsIStreamLoadableDocument interface
NS_IMETHOD LoadFromStream(nsIInputStream& xulStream,
nsIContentViewerContainer* aContainer,
nsISupports* aContainer,
const char* aCommand );
// nsIDOMEventCapturer interface
@ -419,7 +419,7 @@ protected:
nsIAtom* aTag,
nsIContent** aResult);
nsresult PrepareToLoad(nsIContentViewerContainer* aContainer,
nsresult PrepareToLoad(nsISupports* aContainer,
const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
@ -512,7 +512,6 @@ protected:
nsCOMPtr<nsIRDFDataSource> mLocalStore;
nsCOMPtr<nsILineBreaker> mLineBreaker; // [OWNER]
nsCOMPtr<nsIWordBreaker> mWordBreaker; // [OWNER]
nsIContentViewerContainer* mContentViewerContainer; // [WEAK] it owns me! (indirectly)
nsString mCommand;
nsVoidArray mSubDocuments; // [OWNER] of subelements
PRBool mIsPopup;