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