From 73a15436acde28b59ca72137a4dbb74cda84b04d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 27 Oct 2010 23:19:30 +0200 Subject: [PATCH] mshtml: Added IDispatchEx support to HTMLObjectElement object. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmlobject.c | 14 +++++++++++++- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/dom.c | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 64356f5fde0..0f113a30a64 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -101,6 +101,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLInputElement, &DIID_DispHTMLLocation, &DIID_DispHTMLNavigator, + &DIID_DispHTMLObjectElement, &DIID_DispHTMLOptionElement, &DIID_DispHTMLScreen, &DIID_DispHTMLScriptElement, @@ -145,6 +146,7 @@ static REFIID tid_ids[] = { &IID_IHTMLImgElement, &IID_IHTMLInputElement, &IID_IHTMLLocation, + &IID_IHTMLObjectElement, &IID_IHTMLOptionElement, &IID_IHTMLRect, &IID_IHTMLScreen, diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c index fb5ef58506d..09890cb7758 100644 --- a/dlls/mshtml/htmlobject.c +++ b/dlls/mshtml/htmlobject.c @@ -415,6 +415,18 @@ static const NodeImplVtbl HTMLObjectElementImplVtbl = { HTMLObjectElement_destructor }; +static const tid_t HTMLObjectElement_iface_tids[] = { + HTMLELEMENT_TIDS, + IHTMLObjectElement_tid, + 0 +}; +static dispex_static_data_t HTMLObjectElement_dispex = { + NULL, + DispHTMLObjectElement_tid, + NULL, + HTMLObjectElement_iface_tids +}; + HTMLElement *HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem) { HTMLObjectElement *ret = heap_alloc_zero(sizeof(*ret)); @@ -422,6 +434,6 @@ HTMLElement *HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement * ret->lpIHTMLObjectElementVtbl = &HTMLObjectElementVtbl; ret->element.node.vtbl = &HTMLObjectElementImplVtbl; - HTMLElement_Init(&ret->element, doc, nselem, NULL); + HTMLElement_Init(&ret->element, doc, nselem, &HTMLObjectElement_dispex); return &ret->element; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index cf0404db5df..89777e84c52 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -83,6 +83,7 @@ typedef enum { DispHTMLInputElement_tid, DispHTMLLocation_tid, DispHTMLNavigator_tid, + DispHTMLObjectElement_tid, DispHTMLOptionElement_tid, DispHTMLScreen_tid, DispHTMLScriptElement_tid, @@ -127,6 +128,7 @@ typedef enum { IHTMLImgElement_tid, IHTMLInputElement_tid, IHTMLLocation_tid, + IHTMLObjectElement_tid, IHTMLOptionElement_tid, IHTMLRect_tid, IHTMLScreen_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index ad7e22478b4..94e3fccda25 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -435,7 +435,7 @@ static const elem_type_info_t elem_type_infos[] = { {"IFRAME", iframe_iids, &DIID_DispHTMLIFrame}, {"FORM", form_iids, &DIID_DispHTMLFormElement}, {"FRAME", frame_iids, &DIID_DispHTMLFrameElement}, - {"OBJECT", object_iids, NULL} + {"OBJECT", object_iids, &DIID_DispHTMLObjectElement} }; static const char *dbgstr_guid(REFIID riid)