From 65d9ab16507a53eb6577be4f278a1adb67353c87 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 21 Jan 2010 14:48:43 +0100 Subject: [PATCH] mshtml: Added IDispatchEx support for frame element. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmlframe.c | 21 ++++++++++++++++++++- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/dom.c | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index be44748071e..4019a3c54a0 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -92,6 +92,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLElementCollection, &DIID_DispHTMLFormElement, &DIID_DispHTMLGenericElement, + &DIID_DispHTMLFrameElement, &DIID_DispHTMLIFrame, &DIID_DispHTMLImg, &DIID_DispHTMLInputElement, @@ -133,6 +134,7 @@ static REFIID tid_ids[] = { &IID_IHTMLFrameBase, &IID_IHTMLFrameBase2, &IID_IHTMLGenericElement, + &IID_IHTMLFrameElement3, &IID_IHTMLIFrameElement, &IID_IHTMLImageElementFactory, &IID_IHTMLImgElement, diff --git a/dlls/mshtml/htmlframe.c b/dlls/mshtml/htmlframe.c index 0bf5c4dc488..99b3f0b917b 100644 --- a/dlls/mshtml/htmlframe.c +++ b/dlls/mshtml/htmlframe.c @@ -269,6 +269,25 @@ static const NodeImplVtbl HTMLFrameElementImplVtbl = { HTMLFrameElement_bind_to_tree }; +static const tid_t HTMLFrameElement_iface_tids[] = { + IHTMLDOMNode_tid, + IHTMLDOMNode2_tid, + IHTMLElement_tid, + IHTMLElement2_tid, + IHTMLElement3_tid, + IHTMLFrameBase_tid, + IHTMLFrameBase2_tid, + IHTMLFrameElement3_tid, + 0 +}; + +static dispex_static_data_t HTMLFrameElement_dispex = { + NULL, + DispHTMLFrameElement_tid, + NULL, + HTMLFrameElement_iface_tids +}; + HTMLElement *HTMLFrameElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem) { HTMLFrameElement *ret; @@ -278,7 +297,7 @@ HTMLElement *HTMLFrameElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *n ret->framebase.element.node.vtbl = &HTMLFrameElementImplVtbl; ret->lpIHTMLFrameElement3Vtbl = &HTMLFrameElement3Vtbl; - HTMLFrameBase_Init(&ret->framebase, doc, nselem, NULL); + HTMLFrameBase_Init(&ret->framebase, doc, nselem, &HTMLFrameElement_dispex); return &ret->framebase.element; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 45292317b30..0f7930e1a4b 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -68,6 +68,7 @@ typedef enum { DispHTMLElementCollection_tid, DispHTMLFormElement_tid, DispHTMLGenericElement_tid, + DispHTMLFrameElement_tid, DispHTMLIFrame_tid, DispHTMLImg_tid, DispHTMLInputElement_tid, @@ -108,6 +109,7 @@ typedef enum { IHTMLFormElement_tid, IHTMLFrameBase_tid, IHTMLFrameBase2_tid, + IHTMLFrameElement3_tid, IHTMLGenericElement_tid, IHTMLIFrameElement_tid, IHTMLImageElementFactory_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 6fa0e2943e9..c818a1d8db7 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -421,7 +421,7 @@ static const elem_type_info_t elem_type_infos[] = { {"TD", td_iids, NULL}, {"IFRAME", iframe_iids, &DIID_DispHTMLIFrame}, {"FORM", form_iids, &DIID_DispHTMLFormElement}, - {"FRAME", frame_iids, NULL} + {"FRAME", frame_iids, &DIID_DispHTMLFrameElement} }; static const char *dbgstr_guid(REFIID riid)