Commit 0c11b482 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Set nsURI's moniker in OnStartURILoad.

parent ca595cd7
......@@ -771,13 +771,35 @@ static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener
nsACString_Finish(&spec_str);
nsres = nsIURI_QueryInterface(aURI, &IID_nsIWineURI, (void**)&wine_uri);
if(NS_SUCCEEDED(nsres)) {
nsIWineURI_SetNSContainer(wine_uri, This);
nsIWineURI_Release(wine_uri);
}else {
if(NS_FAILED(nsres)) {
WARN("Could not get nsIWineURI interface: %08lx\n", nsres);
return NS_ERROR_NOT_IMPLEMENTED;
}
nsIWineURI_SetNSContainer(wine_uri, This);
if(This->bscallback && This->bscallback->mon) {
LPWSTR url;
HRESULT hres;
hres = IMoniker_GetDisplayName(This->bscallback->mon, NULL, 0, &url);
if(SUCCEEDED(hres)) {
IMoniker *mon = NULL;
hres = CreateURLMoniker(NULL, url, &mon);
if(SUCCEEDED(hres)) {
nsIWineURI_SetMoniker(wine_uri, mon);
IMoniker_Release(mon);
}else {
WARN("CreateURLMoniker failed: %08lx\n", hres);
}
}else {
WARN("GetDisplayName failed: %08lx\n", hres);
}
}
nsIWineURI_Release(wine_uri);
return NS_ERROR_NOT_IMPLEMENTED;
}
......
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