mshtml: Added IDispatchEx support to text node.

This commit is contained in:
Jacek Caban 2008-04-24 18:25:51 +02:00 committed by Alexandre Julliard
parent 754adce781
commit af271b3b45
4 changed files with 18 additions and 0 deletions

View File

@ -52,6 +52,7 @@ static struct list dispex_data_list = LIST_INIT(dispex_data_list);
static REFIID tid_ids[] = { static REFIID tid_ids[] = {
&IID_NULL, &IID_NULL,
&DIID_DispHTMLDocument, &DIID_DispHTMLDocument,
&DIID_DispHTMLDOMTextNode,
&DIID_DispHTMLUnknownElement, &DIID_DispHTMLUnknownElement,
&DIID_DispHTMLWindow2, &DIID_DispHTMLWindow2,
&IID_IHTMLDocument2, &IID_IHTMLDocument2,
@ -60,6 +61,7 @@ static REFIID tid_ids[] = {
&IID_IHTMLDocument5, &IID_IHTMLDocument5,
&IID_IHTMLDOMNode, &IID_IHTMLDOMNode,
&IID_IHTMLDOMNode2, &IID_IHTMLDOMNode2,
&IID_IHTMLDOMTextNode,
&IID_IHTMLElement, &IID_IHTMLElement,
&IID_IHTMLElement2, &IID_IHTMLElement2,
&IID_IHTMLWindow2, &IID_IHTMLWindow2,

View File

@ -185,6 +185,17 @@ static const NodeImplVtbl HTMLDOMTextNodeImplVtbl = {
HTMLDOMTextNode_destructor HTMLDOMTextNode_destructor
}; };
static dispex_static_data_t HTMLDOMTextNode_dispex = {
DispHTMLDOMTextNode_tid,
0,
{
IHTMLDOMNode_tid,
IHTMLDOMNode2_tid,
IHTMLDOMTextNode_tid,
0
}
};
HTMLDOMNode *HTMLDOMTextNode_Create(nsIDOMNode *nsnode) HTMLDOMNode *HTMLDOMTextNode_Create(nsIDOMNode *nsnode)
{ {
HTMLDOMTextNode *ret ; HTMLDOMTextNode *ret ;
@ -193,5 +204,7 @@ HTMLDOMNode *HTMLDOMTextNode_Create(nsIDOMNode *nsnode)
ret->node.vtbl = &HTMLDOMTextNodeImplVtbl; ret->node.vtbl = &HTMLDOMTextNodeImplVtbl;
ret->lpIHTMLDOMTextNodeVtbl = &HTMLDOMTextNodeVtbl; ret->lpIHTMLDOMTextNodeVtbl = &HTMLDOMTextNodeVtbl;
init_dispex(&ret->node.dispex, (IUnknown*)HTMLTEXT(ret), &HTMLDOMTextNode_dispex);
return &ret->node; return &ret->node;
} }

View File

@ -62,6 +62,7 @@ typedef struct event_target_t event_target_t;
typedef enum { typedef enum {
NULL_tid, NULL_tid,
DispHTMLDocument_tid, DispHTMLDocument_tid,
DispHTMLDOMTextNode_tid,
DispHTMLUnknownElement_tid, DispHTMLUnknownElement_tid,
DispHTMLWindow2_tid, DispHTMLWindow2_tid,
IHTMLDocument2_tid, IHTMLDocument2_tid,
@ -70,6 +71,7 @@ typedef enum {
IHTMLDocument5_tid, IHTMLDocument5_tid,
IHTMLDOMNode_tid, IHTMLDOMNode_tid,
IHTMLDOMNode2_tid, IHTMLDOMNode2_tid,
IHTMLDOMTextNode_tid,
IHTMLElement_tid, IHTMLElement_tid,
IHTMLElement2_tid, IHTMLElement2_tid,
IHTMLWindow2_tid, IHTMLWindow2_tid,

View File

@ -1511,6 +1511,7 @@ static void test_elems(IHTMLDocument2 *doc)
ok(node != NULL, "node == NULL\n"); ok(node != NULL, "node == NULL\n");
if(node) { if(node) {
test_ifaces((IUnknown*)node, text_iids); test_ifaces((IUnknown*)node, text_iids);
test_disp((IUnknown*)node, &DIID_DispHTMLDOMTextNode);
node2 = get_first_child((IUnknown*)node); node2 = get_first_child((IUnknown*)node);
ok(!node2, "node2 != NULL\n"); ok(!node2, "node2 != NULL\n");