mshtml: Use Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME in CreateUri calls.

This commit is contained in:
Jacek Caban 2013-03-26 11:37:47 +01:00 committed by Alexandre Julliard
parent 79b7c1108e
commit 7b9fc3bb7d
5 changed files with 19 additions and 13 deletions

View File

@ -121,8 +121,9 @@ HRESULT create_channelbsc(IMoniker*,const WCHAR*,BYTE*,DWORD,BOOL,nsChannelBSC**
HRESULT channelbsc_load_stream(HTMLInnerWindow*,IStream*) DECLSPEC_HIDDEN;
void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*) DECLSPEC_HIDDEN;
IUri *nsuri_get_uri(nsWineURI*) DECLSPEC_HIDDEN;
HRESULT create_relative_uri(HTMLOuterWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN;
HRESULT create_relative_uri(HTMLOuterWindow*,const WCHAR*,IUri**) DECLSPEC_HIDDEN;
HRESULT create_uri(const WCHAR*,DWORD,IUri**) DECLSPEC_HIDDEN;
IUri *get_uri_nofrag(IUri*) DECLSPEC_HIDDEN;
void set_current_mon(HTMLOuterWindow*,IMoniker*,DWORD) DECLSPEC_HIDDEN;

View File

@ -2083,7 +2083,7 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface,
translated_url = NULL;
}
hres = CreateUri(translated_url ? translated_url : url, 0, 0, &uri);
hres = create_uri(translated_url ? translated_url : url, 0, &uri);
CoTaskMemFree(translated_url);
if(FAILED(hres))
return hres;

View File

@ -2327,7 +2327,7 @@ HRESULT navigate_url(HTMLOuterWindow *window, const WCHAR *new_url, IUri *base_u
hres = CoInternetCombineUrlEx(base_uri, new_url, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO,
&uri, 0);
else
hres = CreateUri(new_url, 0, 0, &uri);
hres = create_uri(new_url, 0, &uri);
if(FAILED(hres))
return hres;
@ -2346,7 +2346,7 @@ HRESULT navigate_url(HTMLOuterWindow *window, const WCHAR *new_url, IUri *base_u
TRACE("%08x %s -> %s\n", hres, debugstr_w(display_uri), debugstr_w(translated_url));
SysFreeString(display_uri);
IUri_Release(uri);
hres = CreateUri(translated_url, 0, 0, &uri);
hres = create_uri(translated_url, 0, &uri);
CoTaskMemFree(translated_url);
if(FAILED(hres))
return hres;

View File

@ -1904,10 +1904,10 @@ static nsresult NSAPI nsURI_SetSpec(nsIFileURL *iface, const nsACString *aSpec)
if(!spec)
return NS_ERROR_OUT_OF_MEMORY;
hres = CreateUri(spec, 0, 0, &uri);
hres = create_uri(spec, 0, &uri);
heap_free(spec);
if(FAILED(hres)) {
WARN("CreateUri failed: %08x\n", hres);
WARN("create_uri failed: %08x\n", hres);
return NS_ERROR_FAILURE;
}
@ -2924,7 +2924,7 @@ HRESULT create_doc_uri(HTMLOuterWindow *window, const WCHAR *url, nsWineURI **re
nsresult nsres;
HRESULT hres;
hres = CreateUri(url, 0, 0, &iuri);
hres = create_uri(url, 0, &iuri);
if(FAILED(hres))
return hres;
@ -2974,7 +2974,7 @@ HRESULT create_redirect_nschannel(const WCHAR *url, nsChannel *orig_channel, nsC
nsresult nsres;
HRESULT hres;
hres = CreateUri(url, 0, 0, &iuri);
hres = create_uri(url, 0, &iuri);
if(FAILED(hres))
return hres;
@ -3287,9 +3287,9 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString *
if(FAILED(hres))
WARN("CoInternetCombineUrlEx failed: %08x\n", hres);
}else {
hres = CreateUri(new_spec, 0, 0, &urlmon_uri);
hres = create_uri(new_spec, 0, &urlmon_uri);
if(FAILED(hres))
WARN("CreateUri failed: %08x\n", hres);
WARN("create_uri failed: %08x\n", hres);
}
if(FAILED(hres))

View File

@ -158,7 +158,7 @@ void set_current_mon(HTMLOuterWindow *This, IMoniker *mon, DWORD flags)
hres = IMoniker_GetDisplayName(mon, NULL, NULL, &url);
if(SUCCEEDED(hres)) {
hres = CreateUri(url, 0, 0, &uri);
hres = create_uri(url, 0, &uri);
if(FAILED(hres)) {
WARN("CrateUri failed: %08x\n", hres);
set_current_uri(This, NULL);
@ -178,11 +178,16 @@ void set_current_mon(HTMLOuterWindow *This, IMoniker *mon, DWORD flags)
set_script_mode(This, use_gecko_script(This) ? SCRIPTMODE_GECKO : SCRIPTMODE_ACTIVESCRIPT);
}
HRESULT create_uri(const WCHAR *uri_str, DWORD flags, IUri **uri)
{
return CreateUri(uri_str, flags | Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME, 0, uri);
}
HRESULT create_relative_uri(HTMLOuterWindow *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);
: create_uri(rel_uri, 0, uri);
}
void set_download_state(HTMLDocumentObj *doc, int state)
@ -967,7 +972,7 @@ static HRESULT WINAPI PersistHistory_LoadHistory(IPersistHistory *iface, IStream
hres = E_FAIL;
if(SUCCEEDED(hres)) {
uri_str[str_len] = 0;
hres = CreateUri(uri_str, 0, 0, &uri);
hres = create_uri(uri_str, 0, &uri);
}
heap_free(uri_str);
if(FAILED(hres))