fixes bug 277564 "update lock icon state in OnLocationChange for wyciwyg URLs" patch by jst, r=dveditz, sr=brendan, a=dveditz

git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_1_20050124_BRANCH@169146 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%meer.net
2005-02-12 01:01:02 +00:00
parent 30eaf7480b
commit 3223deda98
4 changed files with 133 additions and 84 deletions

View File

@@ -1362,13 +1362,21 @@ nsDocShell::SetParentURIContentListener(nsIURIContentListener * aParent)
/* [noscript] void setCurrentURI (in nsIURI uri); */
NS_IMETHODIMP
nsDocShell::SetCurrentURI(nsIURI *aURI)
{
SetCurrentURI(aURI, nsnull);
return NS_OK;
}
void
nsDocShell::SetCurrentURI(nsIURI *aURI, nsIRequest *aRequest)
{
mCurrentURI = aURI; //This assignment addrefs
PRBool isRoot = PR_FALSE; // Is this the root docshell
PRBool isSubFrame = PR_FALSE; // Is this a subframe navigation?
if (!mLoadCookie)
return NS_OK;
return;
nsCOMPtr<nsIDocumentLoader> loader(do_GetInterface(mLoadCookie));
nsCOMPtr<nsIWebProgress> webProgress(do_QueryInterface(mLoadCookie));
@@ -1395,15 +1403,13 @@ nsDocShell::SetCurrentURI(nsIURI *aURI)
* a subframe is being loaded for the first time, while
* visiting a frameset page
*/
return NS_OK;
return;
}
NS_ASSERTION(loader, "No document loader");
if (loader) {
loader->FireOnLocationChange(webProgress, nsnull, aURI);
}
return NS_OK;
}
NS_IMETHODIMP
@@ -4330,7 +4336,7 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
// This is a document.write(). Get the made-up url
// from the channel and store it in session history.
rv = AddToSessionHistory(uri, wcwgChannel, getter_AddRefs(mLSHE));
SetCurrentURI(uri);
SetCurrentURI(uri, aRequest);
// Save history state of the previous page
rv = PersistLayoutHistoryState();
if (mOSHE)
@@ -4565,7 +4571,7 @@ nsDocShell::CreateAboutBlankContentViewer()
Embed(viewer, "", 0);
viewer->SetDOMDocument(domdoc);
SetCurrentURI(blankDoc->GetDocumentURI());
SetCurrentURI(blankDoc->GetDocumentURI(), nsnull);
rv = NS_OK;
}
}
@@ -6238,7 +6244,7 @@ nsDocShell::OnNewURI(nsIURI * aURI, nsIChannel * aChannel,
if (shInternal)
shInternal->UpdateIndex();
}
SetCurrentURI(aURI);
SetCurrentURI(aURI, aChannel);
// if there's a refresh header in the channel, this method
// will set it up for us.
SetupRefreshURI(aChannel);