From 712c4d9af2728e95427bba541aaed31e8b060b2b Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 7 Oct 2008 14:44:50 -0500 Subject: [PATCH] mshtml: Added IDispatchEx support for HTMLIFrame. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmliframe.c | 18 ++++++++++++++++++ dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/dom.c | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index a55ef743340..9d77f97e1c9 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -73,6 +73,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLDOMTextNode, &DIID_DispHTMLElementCollection, &DIID_DispHTMLGenericElement, + &DIID_DispHTMLIFrame, &DIID_DispHTMLImg, &DIID_DispHTMLInputElement, &DIID_DispHTMLOptionElement, @@ -99,6 +100,7 @@ static REFIID tid_ids[] = { &IID_IHTMLElement3, &IID_IHTMLElement4, &IID_IHTMLElementCollection, + &IID_IHTMLFrameBase2, &IID_IHTMLGenericElement, &IID_IHTMLImgElement, &IID_IHTMLInputElement, diff --git a/dlls/mshtml/htmliframe.c b/dlls/mshtml/htmliframe.c index 5d1fff72e84..232cbfb6620 100644 --- a/dlls/mshtml/htmliframe.c +++ b/dlls/mshtml/htmliframe.c @@ -209,6 +209,23 @@ static const NodeImplVtbl HTMLIFrameImplVtbl = { HTMLIFrame_destructor }; +static const tid_t HTMLIFrame_iface_tids[] = { + IHTMLDOMNode_tid, + IHTMLDOMNode2_tid, + IHTMLElement_tid, + IHTMLElement2_tid, + IHTMLElement3_tid, + IHTMLFrameBase2_tid, + 0 +}; + +static dispex_static_data_t HTMLIFrame_dispex = { + NULL, + DispHTMLIFrame_tid, + NULL, + HTMLIFrame_iface_tids +}; + HTMLElement *HTMLIFrame_Create(nsIDOMHTMLElement *nselem) { HTMLIFrame *ret; @@ -219,6 +236,7 @@ HTMLElement *HTMLIFrame_Create(nsIDOMHTMLElement *nselem) ret->lpIHTMLFrameBase2Vtbl = &HTMLIFrameBase2Vtbl; ret->element.node.vtbl = &HTMLIFrameImplVtbl; + init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLFRAMEBASE2(ret), &HTMLIFrame_dispex); HTMLElement_Init(&ret->element); nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLIFrameElement, (void**)&ret->nsiframe); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 55ea9c5aa0c..b90d07af1bb 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -69,6 +69,7 @@ typedef enum { DispHTMLDOMTextNode_tid, DispHTMLElementCollection_tid, DispHTMLGenericElement_tid, + DispHTMLIFrame_tid, DispHTMLImg_tid, DispHTMLInputElement_tid, DispHTMLOptionElement_tid, @@ -95,6 +96,7 @@ typedef enum { IHTMLElement3_tid, IHTMLElement4_tid, IHTMLElementCollection_tid, + IHTMLFrameBase2_tid, IHTMLGenericElement_tid, IHTMLImgElement_tid, IHTMLInputElement_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 0415d0800a0..925d98f5611 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -344,7 +344,7 @@ static const elem_type_info_t elem_type_infos[] = { {"IMG", img_iids, &DIID_DispHTMLImg}, {"TR", tr_iids, &DIID_DispHTMLTableRow}, {"TD", td_iids, NULL}, - {"IFRAME", iframe_iids, NULL} + {"IFRAME", iframe_iids, &DIID_DispHTMLIFrame} }; static const char *dbgstr_w(LPCWSTR str)