Module: wine Branch: master Commit: 73cca44bf4fdbe2ed00303b414462052c117118a URL: https://source.winehq.org/git/wine.git/?a=commit;h=73cca44bf4fdbe2ed00303b41...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Mar 8 13:48:25 2019 +0100
mshtml: Use channel_bsc from URI for child documents as well.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/nsio.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 22e9086..0384717 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1045,22 +1045,24 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen
is_document_channel = !!(This->load_flags & LOAD_DOCUMENT_URI);
- if(is_document_channel && window == window->doc_obj->basedoc.window) { + if(is_document_channel) { if(This->uri->channel_bsc) { channelbsc_set_channel(This->uri->channel_bsc, This, aListener, aContext); + cancel = TRUE; + }
- if(window->doc_obj->mime) { + if(window == window->doc_obj->basedoc.window) { + if(!This->uri->channel_bsc) { + /* top window navigation initiated by Gecko */ + nsres = before_async_open(This, window->doc_obj->nscontainer, &cancel); + if(NS_SUCCEEDED(nsres) && cancel) { + TRACE("canceled\n"); + nsres = NS_BINDING_ABORTED; + } + }else if(window->doc_obj->mime) { heap_free(This->content_type); This->content_type = heap_strdupWtoA(window->doc_obj->mime); } - - cancel = TRUE; - }else { - nsres = before_async_open(This, window->doc_obj->nscontainer, &cancel); - if(NS_SUCCEEDED(nsres) && cancel) { - TRACE("canceled\n"); - nsres = NS_BINDING_ABORTED; - } } }