зеркало из https://github.com/mozilla/gecko-dev.git
Fixing bug 262689. Don't get stuck in view-source mode when a view-source URI is visited. r=caillon@gmail.com, sr=dveditz@cruzio.com
This commit is contained in:
Родитель
1b9fe6c972
Коммит
0c400c441c
|
@ -141,8 +141,8 @@ static PLDHashTableOps gMapOps = {
|
|||
|
||||
|
||||
nsSecureBrowserUIImpl::nsSecureBrowserUIImpl()
|
||||
: mIsViewSource(PR_FALSE),
|
||||
mPreviousSecurityState(lis_no_security)
|
||||
: mPreviousSecurityState(lis_no_security),
|
||||
mIsViewSource(PR_FALSE)
|
||||
{
|
||||
mTransferringRequests.ops = nsnull;
|
||||
mNewToplevelSecurityState = STATE_IS_INSECURE;
|
||||
|
@ -1122,21 +1122,23 @@ nsSecureBrowserUIImpl::OnLocationChange(nsIWebProgress* aWebProgress,
|
|||
nsIRequest* aRequest,
|
||||
nsIURI* aLocation)
|
||||
{
|
||||
mCurrentURI = aLocation;
|
||||
|
||||
if (mCurrentURI)
|
||||
if (aLocation)
|
||||
{
|
||||
PRBool vs;
|
||||
|
||||
if (NS_SUCCEEDED(mCurrentURI->SchemeIs("view-source", &vs)) && vs)
|
||||
{
|
||||
|
||||
nsresult rv = aLocation->SchemeIs("view-source", &vs);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (vs) {
|
||||
PR_LOG(gSecureDocLog, PR_LOG_DEBUG,
|
||||
("SecureUI:%p: OnLocationChange: view-source\n", this));
|
||||
|
||||
mIsViewSource = PR_TRUE;
|
||||
}
|
||||
|
||||
mIsViewSource = vs;
|
||||
}
|
||||
|
||||
mCurrentURI = aLocation;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,13 +105,13 @@ protected:
|
|||
lis_high_security
|
||||
};
|
||||
|
||||
PRBool mIsViewSource;
|
||||
|
||||
lockIconState mPreviousSecurityState;
|
||||
|
||||
void ResetStateTracking();
|
||||
PRUint32 mNewToplevelSecurityState;
|
||||
PRBool mNewToplevelSecurityStateKnown;
|
||||
PRPackedBool mNewToplevelSecurityStateKnown;
|
||||
PRPackedBool mIsViewSource;
|
||||
|
||||
nsXPIDLString mInfoTooltip;
|
||||
PRInt32 mDocumentRequestsInProgress;
|
||||
PRInt32 mSubRequestsInProgress;
|
||||
|
|
Загрузка…
Ссылка в новой задаче