Commit c5257dc1 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Moved creating URIs relative to window to a new function.

parent 0b556458
......@@ -114,3 +114,4 @@ HRESULT create_channelbsc(IMoniker*,const WCHAR*,BYTE*,DWORD,nsChannelBSC**) DEC
HRESULT channelbsc_load_stream(nsChannelBSC*,IStream*) DECLSPEC_HIDDEN;
void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*) DECLSPEC_HIDDEN;
IUri *nsuri_get_uri(nsWineURI*) DECLSPEC_HIDDEN;
HRESULT create_relative_uri(HTMLWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN;
......@@ -814,10 +814,7 @@ static HRESULT WINAPI HTMLWindow2_open(IHTMLWindow2 *iface, BSTR url, BSTR name,
return S_OK;
}
if(This->uri)
hres = CoInternetCombineUrlEx(This->uri, url, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, &uri, 0);
else
hres = CreateUri(url, 0, 0, &uri);
hres = create_relative_uri(This, url, &uri);
if(FAILED(hres))
return hres;
......
......@@ -175,6 +175,13 @@ void set_current_mon(HTMLWindow *This, IMoniker *mon)
set_script_mode(This, use_gecko_script(This) ? SCRIPTMODE_GECKO : SCRIPTMODE_ACTIVESCRIPT);
}
HRESULT create_relative_uri(HTMLWindow *window, const WCHAR *rel_uri, IUri **uri)
{
return window->uri
? CoInternetCombineUrlEx(window->uri, rel_uri, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, uri, 0)
: CreateUri(rel_uri, 0, 0, uri);
}
void set_download_state(HTMLDocumentObj *doc, int state)
{
if(doc->client) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment