Module: wine Branch: refs/heads/master Commit: 0c11b48240414936c1a5442e3ba6dc3c3aaabbed URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0c11b48240414936c1a5442e...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Aug 9 16:42:24 2006 +0200
mshtml: Set nsURI's moniker in OnStartURILoad.
---
dlls/mshtml/nsembed.c | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 77c08b0..39f454d 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -771,13 +771,35 @@ static nsresult NSAPI nsURIContentListen 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; }