mshtml: Make IHTMLElement::get_document vtbl offset independent.

This commit is contained in:
Jacek Caban 2008-12-09 15:26:12 +01:00 committed by Alexandre Julliard
parent 2e7fc3e5c6
commit 905fcb87cf
2 changed files with 6 additions and 1 deletions

View File

@ -585,7 +585,7 @@ static HRESULT WINAPI HTMLElement_get_document(IHTMLElement *iface, IDispatch **
if(!p)
return E_POINTER;
*p = (IDispatch*)This->node.doc;
*p = (IDispatch*)HTMLDOC(This->node.doc);
IDispatch_AddRef(*p);
return S_OK;

View File

@ -3343,6 +3343,11 @@ static void test_elems(IHTMLDocument2 *doc)
ok(type == 1, "type=%ld\n", type);
IHTMLSelectElement_Release(select);
hres = IHTMLElement_get_document(elem, &disp);
ok(hres == S_OK, "get_document failed: %08x\n", hres);
ok(iface_cmp((IUnknown*)disp, (IUnknown*)doc), "disp != doc\n");
IHTMLElement_Release(elem);
}