mshtml: Don't change nsIWineURI in OnStartBinding if it's already marked as document URI.
This commit is contained in:
parent
679591ff87
commit
ec13e51087
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue