Gabriel Ivăncescu : mshtml: Use inner window's outer_window in IHTMLDocument2::readyState.
Module: wine Branch: master Commit: ffb7ace4dfdd7741270a545082d5b35d33760ceb URL: https://gitlab.winehq.org/wine/wine/-/commit/ffb7ace4dfdd7741270a545082d5b35... Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Dec 5 19:42:19 2023 +0200 mshtml: Use inner window's outer_window in IHTMLDocument2::readyState. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/htmldoc.c | 2 +- dlls/mshtml/tests/navigation.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index e37f04fee0b..3f844fddf8d 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -905,7 +905,7 @@ static HRESULT WINAPI HTMLDocument_get_readyState(IHTMLDocument2 *iface, BSTR *p if(!p) return E_POINTER; - return get_readystate_string(This->outer_window ? This->outer_window->readystate : 0, p); + return get_readystate_string(This->window && This->window->base.outer_window ? This->window->base.outer_window->readystate : 0, p); } static HRESULT WINAPI HTMLDocument_get_frames(IHTMLDocument2 *iface, IHTMLFramesCollection2 **p) diff --git a/dlls/mshtml/tests/navigation.js b/dlls/mshtml/tests/navigation.js index 402d933a54a..84a0bbdcb5d 100644 --- a/dlls/mshtml/tests/navigation.js +++ b/dlls/mshtml/tests/navigation.js @@ -119,6 +119,7 @@ function detached_iframe_doc() { expect_exception(function() { origDoc.onclick; }, true); expect_exception(function() { origDoc.toString; }, true); expect_exception(function() { origDoc.toString(); }, true); + expect_exception(function() { origDoc.readyState; }, true); expect_exception(function() { origDoc.URL; }); expect_exception(function() { origDoc.URL = "blank.html"; });
participants (1)
-
Alexandre Julliard