mshtml: Added IHTMLIFrameElement3::get_contentDocument implementation.
This commit is contained in:
parent
c9e5181ff3
commit
8d1dc99ea1
|
@ -318,8 +318,19 @@ static HRESULT WINAPI HTMLIFrameElement3_Invoke(IHTMLIFrameElement3 *iface, DISP
|
||||||
static HRESULT WINAPI HTMLIFrameElement3_get_contentDocument(IHTMLIFrameElement3 *iface, IDispatch **p)
|
static HRESULT WINAPI HTMLIFrameElement3_get_contentDocument(IHTMLIFrameElement3 *iface, IDispatch **p)
|
||||||
{
|
{
|
||||||
HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
|
HTMLIFrame *This = impl_from_IHTMLIFrameElement3(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
IHTMLDocument2 *doc;
|
||||||
return E_NOTIMPL;
|
HRESULT hres;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
if(!This->framebase.content_window) {
|
||||||
|
*p = NULL;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
hres = IHTMLWindow2_get_document(&This->framebase.content_window->base.IHTMLWindow2_iface, &doc);
|
||||||
|
*p = (IDispatch*)doc;
|
||||||
|
return hres;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLIFrameElement3_put_src(IHTMLIFrameElement3 *iface, BSTR v)
|
static HRESULT WINAPI HTMLIFrameElement3_put_src(IHTMLIFrameElement3 *iface, BSTR v)
|
||||||
|
|
|
@ -5082,6 +5082,7 @@ static void test_frame_doc(IUnknown *frame_elem, BOOL iframe)
|
||||||
static void test_iframe_elem(IHTMLElement *elem)
|
static void test_iframe_elem(IHTMLElement *elem)
|
||||||
{
|
{
|
||||||
IHTMLDocument2 *content_doc, *owner_doc;
|
IHTMLDocument2 *content_doc, *owner_doc;
|
||||||
|
IHTMLIFrameElement3 *iframe3;
|
||||||
IHTMLElementCollection *col;
|
IHTMLElementCollection *col;
|
||||||
IHTMLWindow2 *content_window;
|
IHTMLWindow2 *content_window;
|
||||||
IHTMLElement *body;
|
IHTMLElement *body;
|
||||||
|
@ -5108,6 +5109,18 @@ static void test_iframe_elem(IHTMLElement *elem)
|
||||||
content_doc = get_window_doc(content_window);
|
content_doc = get_window_doc(content_window);
|
||||||
IHTMLWindow2_Release(content_window);
|
IHTMLWindow2_Release(content_window);
|
||||||
|
|
||||||
|
hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLIFrameElement3, (void**)&iframe3);
|
||||||
|
if(SUCCEEDED(hres)) {
|
||||||
|
hres = IHTMLIFrameElement3_get_contentDocument(iframe3, &disp);
|
||||||
|
ok(hres == S_OK, "get_contentDocument failed: %08x\n", hres);
|
||||||
|
ok(iface_cmp((IUnknown*)content_doc, (IUnknown*)disp), "content_doc != disp\n");
|
||||||
|
IDispatch_Release(disp);
|
||||||
|
|
||||||
|
IHTMLIFrameElement3_Release(iframe3);
|
||||||
|
}else {
|
||||||
|
win_skip("IHTMLIFrameElement3 not supported\n");
|
||||||
|
}
|
||||||
|
|
||||||
str = a2bstr("text/html");
|
str = a2bstr("text/html");
|
||||||
V_VT(&errv) = VT_ERROR;
|
V_VT(&errv) = VT_ERROR;
|
||||||
disp = NULL;
|
disp = NULL;
|
||||||
|
|
Loading…
Reference in New Issue