зеркало из https://github.com/mozilla/pjs.git
adding nsIDocument::ResetToURI. bug 88229 r=jst,rpotts
This commit is contained in:
Родитель
4ad76f6d7f
Коммит
da49b2c24a
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче