mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 19:47:27 +00:00
mshtml: Return failure in IHTMLDocument2::documentElement for detached documents.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
parent
1f0517689d
commit
cb14ca2a29
|
@ -2364,9 +2364,13 @@ static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, I
|
|||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
if(This->outer_window && This->outer_window->readystate == READYSTATE_UNINITIALIZED) {
|
||||
*p = NULL;
|
||||
return S_OK;
|
||||
if(This->window) {
|
||||
if(!This->window->base.outer_window)
|
||||
return E_FAIL;
|
||||
if(This->window->base.outer_window->readystate == READYSTATE_UNINITIALIZED) {
|
||||
*p = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if(!This->dom_document) {
|
||||
|
|
|
@ -121,6 +121,7 @@ function detached_iframe_doc() {
|
|||
expect_exception(function() { origDoc.toString(); }, true);
|
||||
expect_exception(function() { origDoc.cookie; });
|
||||
expect_exception(function() { origDoc.cookie = "test=val"; });
|
||||
expect_exception(function() { origDoc.documentElement; });
|
||||
expect_exception(function() { origDoc.domain; });
|
||||
expect_exception(function() { origDoc.frames; });
|
||||
expect_exception(function() { origDoc.readyState; }, true);
|
||||
|
|
Loading…
Reference in a new issue