mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
bug #94205. Adding flags to nsIWebNavigation::Stop().
This commit is contained in:
parent
211a948f9f
commit
33bbd6972c
@ -2070,7 +2070,8 @@ nsHTMLDocument::OpenCommon(nsIURI* aSourceURL)
|
||||
mScriptGlobalObject->GetDocShell(getter_AddRefs(docshell));
|
||||
|
||||
if (docshell) {
|
||||
docshell->StopLoad();
|
||||
nsCOMPtr<nsIWebNavigation> webnav(do_QueryInterface(docshell));
|
||||
webnav->Stop(nsIWebNavigation::STOP_NETWORK);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,8 @@ nsDSURIContentListener::DoContent(const char* aContentType,
|
||||
|
||||
if(loadFlags & nsIChannel::LOAD_RETARGETED_DOCUMENT_URI)
|
||||
{
|
||||
mDocShell->StopLoad();
|
||||
// XXX: Why does this not stop the content too?
|
||||
mDocShell->Stop(nsIWebNavigation::STOP_NETWORK);
|
||||
}
|
||||
|
||||
rv = mDocShell->CreateContentViewer(aContentType, request, aContentHandler);
|
||||
|
@ -454,7 +454,6 @@ nsDocShell::LoadURI(nsIURI * aURI,
|
||||
nsCOMPtr<nsIInputStream> postStream;
|
||||
nsCOMPtr<nsISupports> owner;
|
||||
PRBool inheritOwner = PR_FALSE;
|
||||
PRBool stopActiveDoc = PR_FALSE;
|
||||
nsCOMPtr<nsISHEntry> shEntry;
|
||||
nsXPIDLCString target;
|
||||
PRUint32 loadType = MAKE_LOAD_TYPE(LOAD_NORMAL, aLoadFlags);
|
||||
@ -502,7 +501,6 @@ nsDocShell::LoadURI(nsIURI * aURI,
|
||||
|
||||
aLoadInfo->GetOwner(getter_AddRefs(owner));
|
||||
aLoadInfo->GetInheritOwner(&inheritOwner);
|
||||
aLoadInfo->GetStopActiveDocument(&stopActiveDoc);
|
||||
aLoadInfo->GetSHEntry(getter_AddRefs(shEntry));
|
||||
aLoadInfo->GetTarget(getter_Copies(target));
|
||||
aLoadInfo->GetPostDataStream(getter_AddRefs(postStream));
|
||||
@ -594,7 +592,6 @@ nsDocShell::LoadURI(nsIURI * aURI,
|
||||
referrer,
|
||||
owner,
|
||||
inheritOwner,
|
||||
stopActiveDoc,
|
||||
windowTarget.get(),
|
||||
postStream,
|
||||
nsnull, // No headers stream
|
||||
@ -669,9 +666,7 @@ nsDocShell::LoadStream(nsIInputStream * aStream, nsIURI * aURI,
|
||||
}
|
||||
}
|
||||
|
||||
NS_ENSURE_SUCCESS(StopLoad(), NS_ERROR_FAILURE);
|
||||
// Cancel any timers that were set for this loader.
|
||||
(void) CancelRefreshURITimers();
|
||||
NS_ENSURE_SUCCESS(Stop(nsIWebNavigation::STOP_NETWORK), NS_ERROR_FAILURE);
|
||||
|
||||
mLoadType = loadType;
|
||||
|
||||
@ -703,32 +698,6 @@ nsDocShell::CreateLoadInfo(nsIDocShellLoadInfo ** aLoadInfo)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::StopLoad()
|
||||
{
|
||||
// Cancel any timers that were set for this loader.
|
||||
CancelRefreshURITimers();
|
||||
|
||||
if (mLoadCookie) {
|
||||
nsCOMPtr<nsIURILoader> uriLoader =
|
||||
do_GetService(NS_URI_LOADER_CONTRACTID);
|
||||
if (uriLoader)
|
||||
uriLoader->Stop(mLoadCookie);
|
||||
}
|
||||
|
||||
PRInt32 n;
|
||||
PRInt32 count = mChildren.Count();
|
||||
for (n = 0; n < count; n++) {
|
||||
nsIDocShellTreeItem *shellItem =
|
||||
(nsIDocShellTreeItem *) mChildren.ElementAt(n);
|
||||
nsCOMPtr<nsIDocShell> shell(do_QueryInterface(shellItem));
|
||||
if (shell)
|
||||
shell->StopLoad();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Reset state to a new content model within the current document and the document
|
||||
@ -2286,7 +2255,6 @@ nsDocShell::Reload(PRUint32 aReloadFlags)
|
||||
mReferrerURI,
|
||||
nsnull, // No owner
|
||||
PR_TRUE, // Inherit owner from document
|
||||
PR_FALSE, // Do not stop active document
|
||||
nsnull, // No window target
|
||||
nsnull, // No post data
|
||||
nsnull, // No headers data
|
||||
@ -2296,19 +2264,25 @@ nsDocShell::Reload(PRUint32 aReloadFlags)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::Stop()
|
||||
nsDocShell::Stop(PRUint32 aStopFlags)
|
||||
{
|
||||
// Cancel any timers that were set for this loader.
|
||||
CancelRefreshURITimers();
|
||||
if (nsIWebNavigation::STOP_CONTENT & aStopFlags) {
|
||||
if (mContentViewer)
|
||||
mContentViewer->Stop();
|
||||
|
||||
if (mContentViewer)
|
||||
mContentViewer->Stop();
|
||||
}
|
||||
|
||||
if (mLoadCookie) {
|
||||
nsCOMPtr<nsIURILoader> uriLoader =
|
||||
do_GetService(NS_URI_LOADER_CONTRACTID);
|
||||
if (uriLoader)
|
||||
uriLoader->Stop(mLoadCookie);
|
||||
if (nsIWebNavigation::STOP_NETWORK & aStopFlags) {
|
||||
// Cancel any timers that were set for this loader.
|
||||
CancelRefreshURITimers();
|
||||
|
||||
if (mLoadCookie) {
|
||||
nsCOMPtr<nsIURILoader> uriLoader;
|
||||
|
||||
uriLoader = do_GetService(NS_URI_LOADER_CONTRACTID);
|
||||
if (uriLoader)
|
||||
uriLoader->Stop(mLoadCookie);
|
||||
}
|
||||
}
|
||||
|
||||
PRInt32 n;
|
||||
@ -2318,7 +2292,7 @@ nsDocShell::Stop()
|
||||
(nsIDocShellTreeItem *) mChildren.ElementAt(n);
|
||||
nsCOMPtr<nsIWebNavigation> shellAsNav(do_QueryInterface(shell));
|
||||
if (shellAsNav)
|
||||
shellAsNav->Stop();
|
||||
shellAsNav->Stop(aStopFlags);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -2442,7 +2416,7 @@ nsDocShell::Destroy()
|
||||
mIsBeingDestroyed = PR_TRUE;
|
||||
|
||||
// Stop any URLs that are currently being loaded...
|
||||
Stop();
|
||||
Stop(nsIWebNavigation::STOP_ALL);
|
||||
if (mDocLoader) {
|
||||
mDocLoader->Destroy();
|
||||
mDocLoader->SetContainer(nsnull);
|
||||
@ -4196,7 +4170,6 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
||||
nsIURI * aReferrer,
|
||||
nsISupports * aOwner,
|
||||
PRBool aInheritOwner,
|
||||
PRBool aStopActiveDoc,
|
||||
const PRUnichar *aWindowTarget,
|
||||
nsIInputStream * aPostData,
|
||||
nsIInputStream * aHeadersData,
|
||||
@ -4307,7 +4280,6 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
||||
aReferrer,
|
||||
owner,
|
||||
aInheritOwner,
|
||||
aStopActiveDoc,
|
||||
nsnull, // No window target
|
||||
aPostData,
|
||||
aHeadersData,
|
||||
@ -4400,14 +4372,12 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
NS_ENSURE_SUCCESS(StopLoad(), NS_ERROR_FAILURE);
|
||||
// Cancel any timers that were set for this loader.
|
||||
CancelRefreshURITimers();
|
||||
|
||||
if (aStopActiveDoc && mContentViewer) {
|
||||
mContentViewer->Stop();
|
||||
}
|
||||
//
|
||||
// Stop any current network activity. Do not stop the content until
|
||||
// data starts arriving from the new URI...
|
||||
//
|
||||
rv = Stop(nsIWebNavigation::STOP_NETWORK);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
mLoadType = aLoadType;
|
||||
|
||||
@ -5540,7 +5510,6 @@ nsDocShell::LoadHistoryEntry(nsISHEntry * aEntry, PRUint32 aLoadType)
|
||||
referrerURI,
|
||||
nsnull, // No owner
|
||||
PR_FALSE, // Do not inherit owner from document (security-critical!)
|
||||
PR_FALSE, // Do not stop active document
|
||||
nsnull, // No window target
|
||||
postData, // Post data stream
|
||||
nsnull, // No headers stream
|
||||
|
@ -34,7 +34,6 @@ nsDocShellLoadInfo::nsDocShellLoadInfo()
|
||||
mLoadType = nsIDocShellLoadInfo::loadNormal;
|
||||
mInheritOwner = PR_FALSE;
|
||||
mTarget.Assign("");
|
||||
mStopActiveDocument = PR_FALSE;
|
||||
}
|
||||
|
||||
nsDocShellLoadInfo::~nsDocShellLoadInfo()
|
||||
@ -101,20 +100,6 @@ NS_IMETHODIMP nsDocShellLoadInfo::SetInheritOwner(PRBool aInheritOwner)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::GetStopActiveDocument(PRBool* aStopDocument)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aStopDocument);
|
||||
|
||||
*aStopDocument = mStopActiveDocument;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::SetStopActiveDocument(PRBool aStopDocument)
|
||||
{
|
||||
mStopActiveDocument = aStopDocument;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsDocShellLoadInfo::GetLoadType(nsDocShellInfoLoadType * aLoadType)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aLoadType);
|
||||
|
@ -49,7 +49,6 @@ protected:
|
||||
nsCOMPtr<nsIURI> mReferrer;
|
||||
nsCOMPtr<nsISupports> mOwner;
|
||||
PRBool mInheritOwner;
|
||||
PRBool mStopActiveDocument;
|
||||
nsDocShellInfoLoadType mLoadType;
|
||||
nsCOMPtr<nsISHEntry> mSHEntry;
|
||||
nsCString mTarget;
|
||||
|
@ -118,7 +118,6 @@ interface nsIDocShell : nsISupports
|
||||
in nsIURI aReferrer,
|
||||
in nsISupports aOwner,
|
||||
in boolean aInheritOwner,
|
||||
in boolean aStopActiveDoc,
|
||||
in wstring aWindowTarget,
|
||||
in nsIInputStream aPostDataStream,
|
||||
in nsIInputStream aHeadersStream,
|
||||
@ -131,13 +130,6 @@ interface nsIDocShell : nsISupports
|
||||
*/
|
||||
void createLoadInfo(out nsIDocShellLoadInfo loadInfo);
|
||||
|
||||
/**
|
||||
* Stops a current load. This simply stops the network portion of the load.
|
||||
* If you wish to do a complete stop, then you should us the
|
||||
* nsIWebNavigation::Stop() method.
|
||||
*/
|
||||
void stopLoad();
|
||||
|
||||
/**
|
||||
* Reset state to a new content model within the current document and the document
|
||||
* viewer. Called by the document before initiating an out of band document.write().
|
||||
|
@ -54,8 +54,6 @@ interface nsIDocShellLoadInfo : nsISupports
|
||||
*/
|
||||
attribute boolean inheritOwner;
|
||||
|
||||
attribute boolean stopActiveDocument;
|
||||
|
||||
/* these are load type enums... */
|
||||
const long loadNormal = 0; // Normal Load
|
||||
const long loadNormalReplace = 1; // Normal Load but replaces current history slot
|
||||
|
@ -19,11 +19,8 @@
|
||||
* Contributor(s):
|
||||
* Travis Bogard <travis@netscape.com>
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIDOMDocument;
|
||||
|
||||
|
||||
/**
|
||||
* The nsIWebNavigation interface defines an interface for navigating the web.
|
||||
@ -33,103 +30,164 @@ interface nsIDOMDocument;
|
||||
*
|
||||
* @status UNDER_REVIEW
|
||||
*/
|
||||
|
||||
interface nsISHistory;
|
||||
|
||||
interface nsIDOMDocument;
|
||||
interface nsIInputStream;
|
||||
interface nsISHistory;
|
||||
interface nsISHEntry;
|
||||
interface nsIURI;
|
||||
|
||||
[scriptable, uuid(F5D9E7B0-D930-11d3-B057-00A024FFC08C)]
|
||||
interface nsIWebNavigation : nsISupports
|
||||
{
|
||||
/*
|
||||
Indicates if the object can go back. If true this indicates that
|
||||
there is back session history available to navigate to.
|
||||
*/
|
||||
readonly attribute boolean canGoBack;
|
||||
/**
|
||||
* Indicates if the object can go back. If true this indicates that
|
||||
* there is back session history available for navigation.
|
||||
*/
|
||||
readonly attribute boolean canGoBack;
|
||||
|
||||
/*
|
||||
Indicates if the object can go forward. If true this indicates that
|
||||
there is forward session history available to navigate to.
|
||||
*/
|
||||
readonly attribute boolean canGoForward;
|
||||
/**
|
||||
* Indicates if the object can go forward. If true this indicates that
|
||||
* there is forward session history available for navigation
|
||||
*/
|
||||
readonly attribute boolean canGoForward;
|
||||
|
||||
/*
|
||||
Tells the object to navigate to the next Back session history item.
|
||||
@return NS_OK - Back was successfull
|
||||
NS_ERROR_UNEXPECTED - This call was unexpected at this time. Most
|
||||
likely you can't go back right now.
|
||||
*/
|
||||
void goBack();
|
||||
/**
|
||||
* Tells the object to navigate to the previous session history item. When
|
||||
* a page is loaded from session history, all content is loaded from the
|
||||
* cache (if available) and page state (such as form values, scroll position)
|
||||
* is restored.
|
||||
*
|
||||
* @return NS_OK - Backward navigation was successful.
|
||||
* NS_ERROR_UNEXPECTED - This call was unexpected at this time. Most
|
||||
* likely you can't go back right now.
|
||||
*/
|
||||
void goBack();
|
||||
|
||||
/*
|
||||
Tells the object to navigate to the next Forward session history item.
|
||||
@return NS_OK - Forward was successfull
|
||||
NS_ERROR_UNEXPECTED - This call was unexpected at this time. Most
|
||||
likely you can't go forward right now.
|
||||
*/
|
||||
void goForward();
|
||||
/**
|
||||
* Tells the object to navigate to the next Forward session history item.
|
||||
* When a page is loaded from session history, all content is loaded from
|
||||
* the cache (if available) and page state (such as form values, scroll
|
||||
* position) is restored.
|
||||
*
|
||||
* @return NS_OK - Forward was successful.
|
||||
* NS_ERROR_UNEXPECTED - This call was unexpected at this time. Most
|
||||
* likely you can't go forward right now.
|
||||
*/
|
||||
void goForward();
|
||||
|
||||
/*
|
||||
Tells the object to navigate to the session history item at index.
|
||||
@return NS_OK - Gotoindex was successfull
|
||||
NS_ERROR_UNEXPECTED - This call was unexpected at this time. Most
|
||||
likely you can't goto that index
|
||||
*/
|
||||
void gotoIndex(in long index);
|
||||
/**
|
||||
* Tells the object to navigate to the session history item at index.
|
||||
*
|
||||
* @return NS_OK - GotoIndex was successful.
|
||||
* NS_ERROR_UNEXPECTED - This call was unexpected at this time. Most
|
||||
* likely you can't goto that index
|
||||
*/
|
||||
void gotoIndex(in long index);
|
||||
|
||||
/*
|
||||
Load flags for use with loadURI() and reload()
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_NONE = 0x0000;
|
||||
const unsigned long LOAD_FLAGS_MASK = 0xffff;
|
||||
/**
|
||||
* Load flags for use with loadURI() and reload()
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_MASK = 0xffff;
|
||||
|
||||
/* loadURI() specific flags */
|
||||
const unsigned long LOAD_FLAGS_IS_REFRESH = 0x0010; // Refresh timer
|
||||
const unsigned long LOAD_FLAGS_IS_LINK = 0x0020; // Link click
|
||||
const unsigned long LOAD_FLAGS_BYPASS_HISTORY = 0x0040; // Bypass the history
|
||||
const unsigned long LOAD_FLAGS_REPLACE_HISTORY = 0x0080; // Replace the history entry
|
||||
/**
|
||||
* loadURI() specific flags
|
||||
*/
|
||||
|
||||
/* loadURI() & reload() specific flags */
|
||||
const unsigned long LOAD_FLAGS_BYPASS_CACHE = 0x0100; // Bypass the cache
|
||||
const unsigned long LOAD_FLAGS_BYPASS_PROXY = 0x0200; // Bypass the proxy
|
||||
const unsigned long LOAD_FLAGS_CHARSET_CHANGE = 0x0400; // Reload because of charset change,
|
||||
/*
|
||||
Loads a given URI. This will give priority to loading the requested URI
|
||||
in the object implementing this interface. If it can't be loaded here
|
||||
however, the URL dispatcher will go through its normal process of content
|
||||
loading.
|
||||
/**
|
||||
* Normal load flag.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_NONE = 0x0000;
|
||||
|
||||
@param uri - The URI to load.
|
||||
@param loadFlags - Flags modifying load behaviour. Generally you will pass
|
||||
LOAD_FLAGS_NONE for this parameter.
|
||||
*/
|
||||
void loadURI(in wstring uri, in unsigned long loadFlags);
|
||||
/**
|
||||
* Meta-refresh flag. The cache is bypassed. This type of load is
|
||||
* usually the result of a meta-refresh tag, or a HTTP
|
||||
* 'refresh' header.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_IS_REFRESH = 0x0010;
|
||||
|
||||
/*
|
||||
Tells the Object to reload the current location.
|
||||
@param reloadFlags - Flags modifying reload behaviour. Generally you will
|
||||
pass LOAD_FLAGS_NONE for this parameter.
|
||||
*/
|
||||
void reload(in unsigned long reloadFlags);
|
||||
/**
|
||||
* Link-click flag.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_IS_LINK = 0x0020;
|
||||
|
||||
/*
|
||||
Stops a load of a URI.
|
||||
*/
|
||||
void stop();
|
||||
/**
|
||||
* Bypass history flag.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_BYPASS_HISTORY = 0x0040;
|
||||
|
||||
/*
|
||||
Retrieves the current Document for the WebBrowser. When setting
|
||||
this will simulate the normal load process.
|
||||
*/
|
||||
readonly attribute nsIDOMDocument document;
|
||||
|
||||
/*
|
||||
The current URI that is loaded.
|
||||
*/
|
||||
readonly attribute nsIURI currentURI;
|
||||
|
||||
/*
|
||||
The session history object used to store the session history for the session.
|
||||
*/
|
||||
attribute nsISHistory sessionHistory;
|
||||
/**
|
||||
* Replace history entry flag.
|
||||
*/
|
||||
const unsigned long LOAD_FLAGS_REPLACE_HISTORY = 0x0080;
|
||||
|
||||
/* loadURI() & reload() specific flags */
|
||||
const unsigned long LOAD_FLAGS_BYPASS_CACHE = 0x0100; // Bypass the cache
|
||||
const unsigned long LOAD_FLAGS_BYPASS_PROXY = 0x0200; // Bypass the proxy
|
||||
const unsigned long LOAD_FLAGS_CHARSET_CHANGE = 0x0400; // Reload because of charset change,
|
||||
|
||||
/**
|
||||
* Loads a given URI. This will give priority to loading the requested URI
|
||||
* in the object implementing this interface. If it can't be loaded here
|
||||
* however, the URL dispatcher will go through its normal process of content
|
||||
* loading.
|
||||
*
|
||||
* @param uri - The URI string to load.
|
||||
* @param loadFlags - Flags modifying load behaviour. Generally you will pass
|
||||
* LOAD_FLAGS_NONE for this parameter.
|
||||
* @param postData - nsIInputStream containing POST data for the request.
|
||||
*/
|
||||
void loadURI(in wstring uri, in unsigned long loadFlags);
|
||||
|
||||
/**
|
||||
* Tells the Object to reload the current page.
|
||||
*
|
||||
* @param reloadFlags - Flags modifying reload behaviour. Generally you will
|
||||
* pass LOAD_FLAGS_NONE for this parameter.
|
||||
*/
|
||||
void reload(in unsigned long reloadFlags);
|
||||
|
||||
/**
|
||||
* Stop() flags:
|
||||
*/
|
||||
|
||||
/**
|
||||
* Stop all network activity. This includes both active network loads and
|
||||
* pending meta-refreshes.
|
||||
*/
|
||||
const unsigned long STOP_NETWORK = 0x01;
|
||||
|
||||
/**
|
||||
* Stop all content activity. This includes animated images, plugins and
|
||||
* pending Javascript timeouts.
|
||||
*/
|
||||
const unsigned long STOP_CONTENT = 0x02;
|
||||
|
||||
/**
|
||||
* Stop all activity.
|
||||
*/
|
||||
const unsigned long STOP_ALL = 0x03;
|
||||
|
||||
/**
|
||||
* Stops a load of a URI.
|
||||
*
|
||||
* @param stopFlags - Flags indicating the stop behavior.
|
||||
*/
|
||||
void stop(in unsigned long stopFlags);
|
||||
|
||||
/**
|
||||
* Retrieves the current DOM document for the WebBrowser.
|
||||
*/
|
||||
readonly attribute nsIDOMDocument document;
|
||||
|
||||
/**
|
||||
* The current URI that is loaded.
|
||||
*/
|
||||
readonly attribute nsIURI currentURI;
|
||||
|
||||
/**
|
||||
* The session history object used to store the session history for the
|
||||
* session.
|
||||
*/
|
||||
attribute nsISHistory sessionHistory;
|
||||
};
|
||||
|
@ -597,7 +597,7 @@ nsWebShell::StopDocumentLoad(void)
|
||||
{
|
||||
if(eCharsetReloadRequested != mCharsetReloadState)
|
||||
{
|
||||
Stop();
|
||||
Stop(nsIWebNavigation::STOP_ALL);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
@ -777,7 +777,6 @@ nsWebShell::HandleLinkClickEvent(nsIContent *aContent,
|
||||
mCurrentURI, // Referer URI
|
||||
nsnull, // No onwer
|
||||
PR_TRUE, // Inherit owner from document
|
||||
PR_FALSE, // Do not stop active document
|
||||
target.get(), // Window target
|
||||
aPostDataStream, // Post data stream
|
||||
aHeadersDataStream, // Headers stream
|
||||
@ -1123,7 +1122,6 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress,
|
||||
referrer, // Refering URI
|
||||
nsnull, // Owner
|
||||
PR_TRUE, // Inherit owner
|
||||
PR_FALSE, // Do not stop active Doc
|
||||
nsnull, // No window target
|
||||
inputStream, // Post data stream
|
||||
nsnull, // No headers stream
|
||||
|
@ -1848,7 +1848,7 @@ NS_IMETHODIMP GlobalWindowImpl::Home()
|
||||
NS_IMETHODIMP GlobalWindowImpl::Stop()
|
||||
{
|
||||
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell));
|
||||
return webNav->Stop();
|
||||
return webNav->Stop(nsIWebNavigation::STOP_ALL);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP GlobalWindowImpl::Print()
|
||||
|
@ -128,12 +128,12 @@ LocationImpl::SetURL(nsIURI* aURI)
|
||||
{
|
||||
if (mDocShell) {
|
||||
nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
|
||||
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell));
|
||||
|
||||
if(NS_FAILED(CheckURL(aURI, getter_AddRefs(loadInfo))))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
loadInfo->SetStopActiveDocument(PR_TRUE);
|
||||
|
||||
webNav->Stop(nsIWebNavigation::STOP_CONTENT);
|
||||
return mDocShell->LoadURI(aURI, loadInfo,
|
||||
nsIWebNavigation::LOAD_FLAGS_NONE);
|
||||
}
|
||||
@ -404,6 +404,7 @@ LocationImpl::SetHrefWithBase(const nsAReadableString& aHref,
|
||||
|
||||
if (newUri && mDocShell) {
|
||||
nsCOMPtr<nsIDocShellLoadInfo> loadInfo;
|
||||
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell));
|
||||
|
||||
nsresult rv = CheckURL(newUri, getter_AddRefs(loadInfo));
|
||||
|
||||
@ -441,8 +442,7 @@ LocationImpl::SetHrefWithBase(const nsAReadableString& aHref,
|
||||
loadInfo->SetLoadType(nsIDocShellLoadInfo::loadNormalReplace);
|
||||
}
|
||||
|
||||
loadInfo->SetStopActiveDocument(PR_TRUE);
|
||||
|
||||
webNav->Stop(nsIWebNavigation::STOP_CONTENT);
|
||||
return mDocShell->LoadURI(newUri, loadInfo,
|
||||
nsIWebNavigation::LOAD_FLAGS_NONE);
|
||||
}
|
||||
|
@ -1853,7 +1853,7 @@ HRESULT STDMETHODCALLTYPE CMozillaBrowser::Stop()
|
||||
nsCOMPtr<nsIWebNavigation> spIWebNavigation = do_QueryInterface(mWebBrowser);
|
||||
if (spIWebNavigation)
|
||||
{
|
||||
spIWebNavigation->Stop();
|
||||
spIWebNavigation->Stop(nsIWebNavigation::STOP_ALL);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
@ -230,7 +230,7 @@ function BrowserForward()
|
||||
|
||||
function BrowserStop()
|
||||
{
|
||||
getWebNavigation().stop();
|
||||
getWebNavigation().stop(nsIWebNavigation.STOP_ALL);
|
||||
}
|
||||
|
||||
function BrowserReload()
|
||||
|
@ -734,7 +734,7 @@ gtk_moz_embed_stop_load(GtkMozEmbed *embed)
|
||||
embedPrivate = (EmbedPrivate *)embed->data;
|
||||
|
||||
if (embedPrivate->mNavigation)
|
||||
embedPrivate->mNavigation->Stop();
|
||||
embedPrivate->mNavigation->Stop(nsIWebNavigation::STOP_ALL);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -511,7 +511,7 @@ static void mozilla_modify( PtWidget_t *widget, PtArg_t const *argt ) {
|
||||
|
||||
case Pt_ARG_MOZ_STOP:
|
||||
if (moz->MyBrowser->WebNavigation)
|
||||
moz->MyBrowser->WebNavigation->Stop();
|
||||
moz->MyBrowser->WebNavigation->Stop(nsIWebNavigation::STOP_ALL);
|
||||
break;
|
||||
|
||||
case Pt_ARG_MOZ_RELOAD:
|
||||
|
@ -564,7 +564,7 @@ NS_METHOD CBrowserShell::Forward()
|
||||
|
||||
NS_METHOD CBrowserShell::Stop()
|
||||
{
|
||||
return mWebBrowserAsWebNav->Stop();
|
||||
return mWebBrowserAsWebNav->Stop(nsIWebNavigation::STOP_ALL);
|
||||
}
|
||||
|
||||
//*****************************************************************************
|
||||
|
@ -577,11 +577,11 @@ NS_IMETHODIMP nsWebBrowser::GotoIndex(PRInt32 aIndex)
|
||||
return mDocShellAsNav->GotoIndex(aIndex);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowser::Stop()
|
||||
NS_IMETHODIMP nsWebBrowser::Stop(PRUint32 aStopFlags)
|
||||
{
|
||||
NS_ENSURE_STATE(mDocShell);
|
||||
|
||||
return mDocShellAsNav->Stop();
|
||||
return mDocShellAsNav->Stop(aStopFlags);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWebBrowser::GetCurrentURI(nsIURI** aURI)
|
||||
|
@ -466,9 +466,9 @@ void CBrowserView::OnNavReload()
|
||||
}
|
||||
|
||||
void CBrowserView::OnNavStop()
|
||||
{
|
||||
if(mWebNav)
|
||||
mWebNav->Stop();
|
||||
{
|
||||
if(mWebNav)
|
||||
mWebNav->Stop(nsIWebNavigation::STOP_ALL);
|
||||
}
|
||||
|
||||
void CBrowserView::OnUpdateNavStop(CCmdUI* pCmdUI)
|
||||
|
@ -957,7 +957,7 @@ void CTests::StopUriTest(char *theUrl)
|
||||
|
||||
qaWebNav->LoadURI(NS_ConvertASCIItoUCS2(theUrl).get(),
|
||||
nsIWebNavigation::LOAD_FLAGS_NONE);
|
||||
rv = qaWebNav->Stop();
|
||||
rv = qaWebNav->Stop(nsIWebNavigation::STOP_ALL);
|
||||
sprintf(theTotalString, "%s%s%s", "Stop(): ", theUrl, " test");
|
||||
CQaUtils::RvTestResult(rv, theTotalString, 2);
|
||||
}
|
||||
|
@ -436,9 +436,9 @@ void CBrowserView::OnNavReload()
|
||||
}
|
||||
|
||||
void CBrowserView::OnNavStop()
|
||||
{
|
||||
if(mWebNav)
|
||||
mWebNav->Stop();
|
||||
{
|
||||
if(mWebNav)
|
||||
mWebNav->Stop(nsIWebNavigation::STOP_ALL);
|
||||
}
|
||||
|
||||
void CBrowserView::OnUpdateNavStop(CCmdUI* pCmdUI)
|
||||
|
@ -623,7 +623,7 @@ BOOL CALLBACK BrowserDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
||||
break;
|
||||
|
||||
case IDC_STOP:
|
||||
webNavigation->Stop();
|
||||
webNavigation->Stop(nsIWebNavigation::STOP_ALL);
|
||||
UpdateUI(chrome);
|
||||
break;
|
||||
|
||||
@ -1064,7 +1064,7 @@ void WebBrowserChromeUI::Destroy(nsIWebBrowserChrome* chrome)
|
||||
chrome->GetWebBrowser(getter_AddRefs(webBrowser));
|
||||
webNavigation = do_QueryInterface(webBrowser);
|
||||
if (webNavigation)
|
||||
webNavigation->Stop();
|
||||
webNavigation->Stop(nsIWebNavigation::STOP_ALL);
|
||||
|
||||
chrome->ExitModalEventLoop(NS_OK);
|
||||
|
||||
|
@ -367,7 +367,8 @@ NS_IMETHODIMP nsMsgWindow::StopUrls()
|
||||
GetRootDocShell(getter_AddRefs(docShell));
|
||||
if (docShell)
|
||||
{
|
||||
return docShell->StopLoad();
|
||||
nsCOMPtr<nsIWebNavigation> webnav(do_QueryInterface(docShell));
|
||||
return webnav->Stop(nsIWebNavigation::STOP_NETWORK);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShell> rootShell(do_QueryReferent(mRootDocShellWeak));
|
||||
|
@ -2266,7 +2266,7 @@ PRInt32 nsNNTPProtocol::SendFirstNNTPCommandResponse()
|
||||
|
||||
// note, this will cause us to close the connection.
|
||||
// this will call nsDocShell::LoadURI(), which will
|
||||
// call nsDocShell::StopLoad(), which will eventually
|
||||
// call nsDocShell::Stop(STOP_NETWORK), which will eventually
|
||||
// call nsNNTPProtocol::Cancel(), which will close the socket.
|
||||
// we need to fix this, since the connection is still valid.
|
||||
rv = m_msgWindow->DisplayHTMLInMessagePane((const PRUnichar *)titleStr, errorHtml.get());
|
||||
|
@ -455,7 +455,8 @@ function BrowserForwardMenu(event)
|
||||
function BrowserStop()
|
||||
{
|
||||
try {
|
||||
getWebNavigation().stop();
|
||||
const stopFlags = nsIWebNavigation.STOP_ALL;
|
||||
getWebNavigation().stop(stopFlags);
|
||||
}
|
||||
catch(ex) {
|
||||
}
|
||||
|
@ -455,7 +455,8 @@ function BrowserForwardMenu(event)
|
||||
function BrowserStop()
|
||||
{
|
||||
try {
|
||||
getWebNavigation().stop();
|
||||
const stopFlags = nsIWebNavigation.STOP_ALL;
|
||||
getWebNavigation().stop(stopFlags);
|
||||
}
|
||||
catch(ex) {
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ public:
|
||||
|
||||
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(docShell));
|
||||
if(webNav)
|
||||
webNav->Stop();
|
||||
webNav->Stop(nsIWebNavigation::STOP_ALL);
|
||||
}
|
||||
|
||||
// We need to enqueue an event to load the next page,
|
||||
|
@ -509,7 +509,7 @@ nsSHistory::Reload(PRUint32 aReloadFlags)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSHistory::Stop()
|
||||
nsSHistory::Stop(PRUint32 aStopFlags)
|
||||
{
|
||||
//Not implemented
|
||||
return NS_OK;
|
||||
|
@ -92,7 +92,9 @@
|
||||
<method name="stop">
|
||||
<body>
|
||||
<![CDATA[
|
||||
this.webNavigation.stop();
|
||||
const nsIWebNavigation = Components.interfaces.nsIWebNavigation;
|
||||
const flags = nsIWebNavigation.STOP_ALL;
|
||||
this.webNavigation.stop(flags);
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
Loading…
Reference in New Issue
Block a user