mshtml: Use get_parentWindow for IHTMLDocument2::get_Script implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
51e6cbdbd8
commit
9240ed581f
|
@ -213,12 +213,12 @@ static HRESULT WINAPI HTMLDocument_Invoke(IHTMLDocument2 *iface, DISPID dispIdMe
|
|||
static HRESULT WINAPI HTMLDocument_get_Script(IHTMLDocument2 *iface, IDispatch **p)
|
||||
{
|
||||
HTMLDocument *This = impl_from_IHTMLDocument2(iface);
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
*p = (IDispatch*)&This->window->base.IHTMLWindow2_iface;
|
||||
IDispatch_AddRef(*p);
|
||||
return S_OK;
|
||||
hres = IHTMLDocument7_get_parentWindow(&This->IHTMLDocument7_iface, (IHTMLWindow2**)p);
|
||||
return hres == S_OK && !*p ? E_PENDING : hres;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCollection **p)
|
||||
|
|
|
@ -6925,6 +6925,7 @@ static void test_dom_implementation(IHTMLDocument2 *doc)
|
|||
IHTMLDocument7 *new_document;
|
||||
IHTMLLocation *location;
|
||||
IHTMLWindow2 *window;
|
||||
IDispatch *disp;
|
||||
|
||||
str = a2bstr("test");
|
||||
hres = IHTMLDOMImplementation2_createHTMLDocument(dom_implementation2, str, &new_document);
|
||||
|
@ -6947,6 +6948,9 @@ static void test_dom_implementation(IHTMLDocument2 *doc)
|
|||
hres = IHTMLDocument2_get_parentWindow(new_document2, &window);
|
||||
ok(hres == E_FAIL, "get_parentWindow returned: %08x\n", hres);
|
||||
|
||||
hres = IHTMLDocument2_get_Script(new_document2, &disp);
|
||||
ok(hres == E_PENDING, "get_Script returned: %08x\n", hres);
|
||||
|
||||
hres = IHTMLDocument2_get_location(new_document2, &location);
|
||||
ok(hres == E_UNEXPECTED, "get_location returned: %08x\n", hres);
|
||||
|
||||
|
|
Loading…
Reference in New Issue