adding nsIDocument::ResetToURI. bug 88229 r=jst,rpotts

This commit is contained in:
danm%netscape.com 2001-11-16 02:03:19 +00:00
Родитель 4ad76f6d7f
Коммит da49b2c24a
6 изменённых файлов: 37 добавлений и 2 удалений

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

@ -366,6 +366,7 @@ public:
NS_IMETHOD GetNodeInfoManager(nsINodeInfoManager*& aNodeInfoManager) = 0;
NS_IMETHOD Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup) = 0;
NS_IMETHOD ResetToURI(nsIURI *aURI, nsILoadGroup* aLoadGroup) = 0;
NS_IMETHOD AddReference(void *aKey, nsISupports *aReference) = 0;
NS_IMETHOD RemoveReference(void *aKey, nsISupports **aOldReference) = 0;

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

@ -242,6 +242,7 @@ public:
NS_IMETHOD GetArena(nsIArena** aArena);
NS_IMETHOD Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
NS_IMETHOD ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup);
NS_IMETHOD StartDocumentLoad(const char* aCommand,
nsIChannel* aChannel,

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

@ -324,6 +324,25 @@ nsHTMLDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
return result;
}
return BaseResetToURI(aURL);
}
NS_IMETHODIMP
nsHTMLDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup)
{
nsresult result = nsDocument::ResetToURI(aURI, aLoadGroup);
if (NS_SUCCEEDED(result))
result = BaseResetToURI(aURI);
return result;
}
nsresult
nsHTMLDocument::BaseResetToURI(nsIURI *aURL)
{
nsresult result = NS_OK;
InvalidateHashTables();
PrePopulateHashTables();
@ -376,6 +395,7 @@ nsHTMLDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
return result;
}
NS_IMETHODIMP
nsHTMLDocument::CreateShell(nsIPresContext* aContext,
nsIViewManager* aViewManager,
@ -3728,12 +3748,13 @@ nsHTMLDocument::RemoveDocWriteDummyRequest(void)
rv = GetDocumentLoadGroup(getter_AddRefs(loadGroup));
if (NS_FAILED(rv)) return rv;
// note there can be a write request without a load group if
// this is a synchronously constructed about:blank document
if (loadGroup && mDocWriteDummyRequest) {
rv = loadGroup->RemoveRequest(mDocWriteDummyRequest, nsnull, NS_OK);
if (NS_FAILED(rv)) return rv;
mDocWriteDummyRequest = nsnull;
}
mDocWriteDummyRequest = nsnull;
return rv;
}

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

@ -63,6 +63,7 @@ class nsIHTMLStyleSheet;
class nsIHTMLCSSStyleSheet;
class nsIParser;
class nsICSSLoader;
class nsIURI;
class nsHTMLDocument : public nsMarkupDocument,
public nsIHTMLDocument,
@ -80,6 +81,7 @@ public:
NS_IMETHOD_(nsrefcnt) Release(void);
NS_IMETHOD Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
NS_IMETHOD ResetToURI(nsIURI* aURI, nsILoadGroup* aLoadGroup);
NS_IMETHOD CreateShell(nsIPresContext* aContext,
nsIViewManager* aViewManager,
@ -215,6 +217,8 @@ protected:
nsresult AddDocWriteDummyRequest(void);
nsresult RemoveDocWriteDummyRequest(void);
nsresult BaseResetToURI(nsIURI* aURI);
nsIHTMLStyleSheet* mAttrStyleSheet;
nsIHTMLCSSStyleSheet* mStyleAttrStyleSheet;
nsIURI* mBaseURL;

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

@ -637,6 +637,13 @@ nsXULDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::ResetToURI(nsIURI* aURI, nsILoadGroup* aLoadGroup)
{
NS_NOTREACHED("ResetToURI");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXULDocument::GetArena(nsIArena** aArena)
{

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

@ -143,6 +143,7 @@ public:
NS_IMETHOD GetArena(nsIArena** aArena);
NS_IMETHOD Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup);
NS_IMETHOD ResetToURI(nsIURI *aURI, nsILoadGroup* aLoadGroup);
NS_IMETHOD StartDocumentLoad(const char* aCommand,
nsIChannel *channel,