mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 19:47:27 +00:00
mshtml: Return failure in IHTMLDocument2::open() for detached documents.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
5e873c48be
commit
1f0517689d
|
@ -1463,7 +1463,7 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT
|
|||
|
||||
*pomWindowResult = NULL;
|
||||
|
||||
if(!This->outer_window)
|
||||
if(!This->window || !This->window->base.outer_window)
|
||||
return E_FAIL;
|
||||
|
||||
if(!This->dom_document) {
|
||||
|
@ -1490,8 +1490,8 @@ static HRESULT WINAPI HTMLDocument_open(IHTMLDocument2 *iface, BSTR url, VARIANT
|
|||
if(tmp)
|
||||
nsISupports_Release(tmp);
|
||||
|
||||
*pomWindowResult = (IDispatch*)&This->outer_window->base.IHTMLWindow2_iface;
|
||||
IHTMLWindow2_AddRef(&This->outer_window->base.IHTMLWindow2_iface);
|
||||
*pomWindowResult = (IDispatch*)&This->window->base.outer_window->base.IHTMLWindow2_iface;
|
||||
IHTMLWindow2_AddRef(&This->window->base.outer_window->base.IHTMLWindow2_iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,6 +126,7 @@ function detached_iframe_doc() {
|
|||
expect_exception(function() { origDoc.readyState; }, true);
|
||||
expect_exception(function() { origDoc.URL; });
|
||||
expect_exception(function() { origDoc.URL = "blank.html"; });
|
||||
expect_exception(function() { origDoc.open("blank.html", "_self"); });
|
||||
|
||||
next_test();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue