mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 01:57:00 +00:00
Bug 478927 - Add a new flag LOCATION_CHANGE_ERROR_PAGE for onLocationChangeBug. r=smaug, sr=bzbarsky
This commit is contained in:
parent
86b1d55b6f
commit
6df033d768
@ -7535,14 +7535,14 @@ nsDocShell::CreateContentViewer(const char *aContentType,
|
|||||||
|
|
||||||
// Create an shistory entry for the old load.
|
// Create an shistory entry for the old load.
|
||||||
if (failedURI) {
|
if (failedURI) {
|
||||||
#ifdef DEBUG
|
|
||||||
bool errorOnLocationChangeNeeded =
|
bool errorOnLocationChangeNeeded =
|
||||||
#endif
|
OnNewURI(failedURI, failedChannel, nsnull, mLoadType, false,
|
||||||
OnNewURI(failedURI, failedChannel, nsnull, mLoadType, true, false,
|
false, false);
|
||||||
false);
|
|
||||||
|
|
||||||
MOZ_ASSERT(!errorOnLocationChangeNeeded,
|
if (errorOnLocationChangeNeeded) {
|
||||||
"We have to fire onLocationChange again.");
|
FireOnLocationChange(this, failedChannel, failedURI,
|
||||||
|
LOCATION_CHANGE_ERROR_PAGE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Be sure to have a correct mLSHE, it may have been cleared by
|
// Be sure to have a correct mLSHE, it may have been cleared by
|
||||||
|
@ -309,8 +309,23 @@ interface nsIWebProgressListener : nsISupports
|
|||||||
* This flag is on when |aWebProgress| did not load a new document.
|
* This flag is on when |aWebProgress| did not load a new document.
|
||||||
* For example, the location change is due to an anchor scroll or a
|
* For example, the location change is due to an anchor scroll or a
|
||||||
* pushState/popState/replaceState.
|
* pushState/popState/replaceState.
|
||||||
|
*
|
||||||
|
* LOCATION_CHANGE_ERROR_PAGE
|
||||||
|
* This flag is on when |aWebProgress| redirected from the requested
|
||||||
|
* contents to an internal page to show error status, such as
|
||||||
|
* <about:neterror>, <about:certerror> and so on.
|
||||||
|
*
|
||||||
|
* Generally speaking, |aURI| and |aRequest| are the original data. DOM
|
||||||
|
* |window.location.href| is also the original location, while
|
||||||
|
* |document.documentURI| is the redirected location. Sometimes |aURI| is
|
||||||
|
* <about:blank> and |aRequest| is null when the original data does not
|
||||||
|
+ remain.
|
||||||
|
*
|
||||||
|
* |aWebProgress| does NOT set this flag when it did not try to load a new
|
||||||
|
* document. In this case, it should set LOCATION_CHANGE_SAME_DOCUMENT.
|
||||||
*/
|
*/
|
||||||
const unsigned long LOCATION_CHANGE_SAME_DOCUMENT = 0x00000001;
|
const unsigned long LOCATION_CHANGE_SAME_DOCUMENT = 0x00000001;
|
||||||
|
const unsigned long LOCATION_CHANGE_ERROR_PAGE = 0x00000002;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the location of the window being watched changes. This is not
|
* Called when the location of the window being watched changes. This is not
|
||||||
|
Loading…
x
Reference in New Issue
Block a user