Commit dffb5e05 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Return failure when setting IHTMLDocument2::location for detached documents.

parent cb14ca2a
......@@ -6089,10 +6089,12 @@ static HRESULT HTMLDocumentNode_location_hook(DispatchEx *dispex, WORD flags, DI
{
HTMLDocumentNode *This = impl_from_DispatchEx(dispex);
if(!(flags & DISPATCH_PROPERTYPUT) || !This->outer_window)
if(!(flags & DISPATCH_PROPERTYPUT) || !This->window)
return S_FALSE;
if(!This->window->base.outer_window)
return E_FAIL;
return IDispatchEx_InvokeEx(&This->outer_window->base.IDispatchEx_iface, DISPID_IHTMLWINDOW2_LOCATION,
return IDispatchEx_InvokeEx(&This->window->base.outer_window->base.IDispatchEx_iface, DISPID_IHTMLWINDOW2_LOCATION,
0, flags, dp, res, ei, caller);
}
......
......@@ -124,6 +124,7 @@ function detached_iframe_doc() {
expect_exception(function() { origDoc.documentElement; });
expect_exception(function() { origDoc.domain; });
expect_exception(function() { origDoc.frames; });
expect_exception(function() { origDoc.location = "blank.html"; });
expect_exception(function() { origDoc.readyState; }, true);
expect_exception(function() { origDoc.URL; });
expect_exception(function() { origDoc.URL = "blank.html"; });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment