Module: wine Branch: master Commit: ec13e51087b66a29683ff3ae387046458dd57538 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ec13e51087b66a29683ff3ae38...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Nov 30 18:01:09 2009 +0100
mshtml: Don't change nsIWineURI in OnStartBinding if it's already marked as document URI.
---
dlls/mshtml/nsembed.c | 41 +++++++++++++++++++++++------------------ 1 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 2150a0f..a33f88d 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -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);