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

mshtml: Don't change nsIWineURI in OnStartBinding if it's already marked as document URI.

parent 679591ff
...@@ -1149,6 +1149,7 @@ static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener ...@@ -1149,6 +1149,7 @@ static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener
nsIWineURI *wine_uri; nsIWineURI *wine_uri;
nsACString spec_str; nsACString spec_str;
const char *spec; const char *spec;
BOOL is_doc_uri;
nsresult nsres; nsresult nsres;
nsACString_Init(&spec_str, NULL); nsACString_Init(&spec_str, NULL);
...@@ -1165,30 +1166,34 @@ static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener ...@@ -1165,30 +1166,34 @@ static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener
return NS_ERROR_NOT_IMPLEMENTED; return NS_ERROR_NOT_IMPLEMENTED;
} }
nsIWineURI_SetNSContainer(wine_uri, This); nsIWineURI_GetIsDocumentURI(wine_uri, &is_doc_uri);
nsIWineURI_SetIsDocumentURI(wine_uri, TRUE);
if(This->bscallback) { if(!is_doc_uri) {
IMoniker *mon = get_channelbsc_mon(This->bscallback); nsIWineURI_SetNSContainer(wine_uri, This);
nsIWineURI_SetIsDocumentURI(wine_uri, TRUE);
if(mon) { if(This->bscallback) {
LPWSTR wine_url; IMoniker *mon = get_channelbsc_mon(This->bscallback);
HRESULT hres;
hres = IMoniker_GetDisplayName(mon, NULL, 0, &wine_url); if(mon) {
if(SUCCEEDED(hres)) { LPWSTR wine_url;
nsIWineURI_SetWineURL(wine_uri, wine_url); HRESULT hres;
CoTaskMemFree(wine_url);
}else { hres = IMoniker_GetDisplayName(mon, NULL, 0, &wine_url);
WARN("GetDisplayName failed: %08x\n", hres); if(SUCCEEDED(hres)) {
nsIWineURI_SetWineURL(wine_uri, wine_url);
CoTaskMemFree(wine_url);
}else {
WARN("GetDisplayName failed: %08x\n", hres);
}
IMoniker_Release(mon);
} }
IMoniker_Release(mon); *_retval = FALSE;
}else if(This->doc) {
*_retval = translate_url(This->doc->basedoc.doc_obj, wine_uri);
} }
*_retval = FALSE;
}else if(This->doc) {
*_retval = translate_url(This->doc->basedoc.doc_obj, wine_uri);
} }
nsIWineURI_Release(wine_uri); nsIWineURI_Release(wine_uri);
......
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