Module: wine Branch: master Commit: cecb2652486ee7e2b1110f387e1ee59f06a2f61d URL: http://source.winehq.org/git/wine.git/?a=commit;h=cecb2652486ee7e2b1110f387e...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Apr 30 18:20:48 2008 +0200
mshtml: Added IDispatchEx support to HTMLCommentElement.
---
dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmlcomment.c | 11 +++++++++++ dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/dom.c | 2 +- 4 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index f0cfc59..13319cc 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -52,6 +52,7 @@ static struct list dispex_data_list = LIST_INIT(dispex_data_list); static REFIID tid_ids[] = { &IID_NULL, &DIID_DispDOMChildrenCollection, + &DIID_DispHTMLCommentElement, &DIID_DispHTMLDocument, &DIID_DispHTMLDOMTextNode, &DIID_DispHTMLElementCollection, @@ -59,6 +60,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLOptionElement, &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, + &IID_IHTMLCommentElement, &IID_IHTMLDocument2, &IID_IHTMLDocument3, &IID_IHTMLDocument4, diff --git a/dlls/mshtml/htmlcomment.c b/dlls/mshtml/htmlcomment.c index 8dffa2d..2155a16 100644 --- a/dlls/mshtml/htmlcomment.c +++ b/dlls/mshtml/htmlcomment.c @@ -175,6 +175,16 @@ static const NodeImplVtbl HTMLCommentElementImplVtbl = { HTMLCommentElement_destructor };
+static dispex_static_data_t HTMLCommentElement_dispex = { + NULL, + DispHTMLCommentElement_tid, + NULL, + { + IHTMLCommentElement_tid, + 0 + } +}; + HTMLElement *HTMLCommentElement_Create(nsIDOMNode *nsnode) { HTMLCommentElement *ret = heap_alloc_zero(sizeof(*ret)); @@ -182,6 +192,7 @@ HTMLElement *HTMLCommentElement_Create(nsIDOMNode *nsnode) ret->element.node.vtbl = &HTMLCommentElementImplVtbl; ret->lpIHTMLCommentElementVtbl = &HTMLCommentElementVtbl;
+ init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLCOMMENT(ret), &HTMLCommentElement_dispex); HTMLElement_Init(&ret->element);
return &ret->element; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 3b5ac51..78f7e05 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -62,6 +62,7 @@ typedef struct event_target_t event_target_t; typedef enum { NULL_tid, DispDOMChildrenCollection_tid, + DispHTMLCommentElement_tid, DispHTMLDocument_tid, DispHTMLDOMTextNode_tid, DispHTMLElementCollection_tid, @@ -69,6 +70,7 @@ typedef enum { DispHTMLOptionElement_tid, DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, + IHTMLCommentElement_tid, IHTMLDocument2_tid, IHTMLDocument3_tid, IHTMLDocument4_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index e21a71f..f1c2548 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -246,7 +246,7 @@ static const elem_type_info_t elem_type_infos[] = { {"TBODY", elem_iids, NULL}, {"SCRIPT", script_iids, NULL}, {"TEST", elem_iids, &DIID_DispHTMLUnknownElement}, - {"!", comment_iids, NULL} + {"!", comment_iids, &DIID_DispHTMLCommentElement} };
static const char *dbgstr_w(LPCWSTR str)