b=125807 Fix Lock Icon Set Incorrectly

Checking in for ddrinan
r=kaie sr=mscott a=asa


git-svn-id: svn://10.0.0.236/trunk@116204 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kaie%netscape.com
2002-03-08 22:27:16 +00:00
parent d28e4f5e91
commit 4389d95a7f
2 changed files with 20 additions and 7 deletions

View File

@@ -334,10 +334,17 @@ nsSecureBrowserUIImpl::OnStateChange(nsIWebProgress* aWebProgress,
mMixContentAlertShown = PR_FALSE;
mFirstRequest = PR_TRUE;
mSSLStatus = nsnull;
mRedirecting = PR_FALSE;
}
}
// A Document is starting to load...
// We need to keep track of redirects. This tells us that the current request is going
// to be redirected after it finishes loading.
if ((aProgressStateFlags & STATE_IS_REQUEST) && (aProgressStateFlags & STATE_REDIRECTING)) {
mRedirecting = PR_TRUE;
}
// Request has completed.
if ((aProgressStateFlags & (STATE_STOP)) &&
(aProgressStateFlags & STATE_IS_REQUEST)) {
@@ -350,6 +357,16 @@ nsSecureBrowserUIImpl::OnStateChange(nsIWebProgress* aWebProgress,
return NS_OK;
}
// The document is going to be redirected.
// We must reset our state and start again because the new document may have different security.
if (mRedirecting) {
mMixContentAlertShown = PR_FALSE;
mFirstRequest = PR_TRUE;
mSSLStatus = nsnull;
mRedirecting = PR_FALSE;
return NS_OK;
}
// If this is the first request, then do a protocol check
if (mFirstRequest) {
mFirstRequest = PR_FALSE;
@@ -556,11 +573,6 @@ nsSecureBrowserUIImpl::CheckMixedContext(nsISecurityEventSink *eventSink,
newSecurityState = GetSecurityStateFromChannel(aChannel);
// Deal with http redirect to https //
if (mSecurityState == STATE_IS_INSECURE && newSecurityState != STATE_IS_INSECURE) {
return CheckProtocolContextSwitch(eventSink, aRequest, aChannel);
}
if ((newSecurityState == STATE_IS_INSECURE ||
newSecurityState == STATE_IS_BROKEN) &&
IS_SECURE(mSecurityState)) {

View File

@@ -86,6 +86,7 @@ protected:
PRBool mMixContentAlertShown;
PRInt32 mSecurityState;
PRBool mFirstRequest;
PRBool mRedirecting;
nsCOMPtr<nsISupports> mSSLStatus;