mshtml: Update window URI when its binding is redirected.

This commit is contained in:
Jacek Caban 2011-11-16 12:52:43 +01:00 committed by Alexandre Julliard
parent 1fb705de62
commit 2bffcedc82
3 changed files with 21 additions and 0 deletions

View File

@ -112,3 +112,4 @@ HRESULT super_navigate(HTMLWindow*,IUri*,const WCHAR*,BYTE*,DWORD) DECLSPEC_HIDD
HRESULT create_channelbsc(IMoniker*,const WCHAR*,BYTE*,DWORD,nsChannelBSC**) DECLSPEC_HIDDEN;
HRESULT channelbsc_load_stream(nsChannelBSC*,IStream*) DECLSPEC_HIDDEN;
void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*) DECLSPEC_HIDDEN;
IUri *nsuri_get_uri(nsWineURI*);

View File

@ -1134,6 +1134,17 @@ static nsresult NSAPI nsAsyncVerifyRedirectCallback_AsyncOnChannelRedirect(nsIAs
ERR("AddRequest failed: %08x\n", nsres);
}
if(This->bsc->window) {
IUri *uri = nsuri_get_uri(This->nschannel->uri);
if(uri) {
set_current_uri(This->bsc->window, uri);
IUri_Release(uri);
}else {
WARN("Could not get IUri from nsWineURI\n");
}
}
return NS_OK;
}

View File

@ -84,6 +84,15 @@ static BOOL ensure_uri(nsWineURI *This)
return TRUE;
}
IUri *nsuri_get_uri(nsWineURI *nsuri)
{
if(!ensure_uri(nsuri))
return NULL;
IUri_AddRef(nsuri->uri);
return nsuri->uri;
}
static IUri *get_uri_nofrag(IUri *uri)
{
IUriBuilder *uri_builder;