mshtml: Added HTMLAnchorElement dispex data.

This commit is contained in:
Jacek Caban 2009-10-02 13:51:19 +02:00 committed by Alexandre Julliard
parent a70bbf8285
commit df90f665bb
4 changed files with 32 additions and 6 deletions

View File

@ -79,6 +79,7 @@ static REFIID tid_ids[] = {
&IID_NULL,
&DIID_DispCEventObj,
&DIID_DispDOMChildrenCollection,
&DIID_DispHTMLAnchorElement,
&DIID_DispHTMLBody,
&DIID_DispHTMLCommentElement,
&DIID_DispHTMLCurrentStyle,
@ -98,6 +99,7 @@ static REFIID tid_ids[] = {
&DIID_DispHTMLTableRow,
&DIID_DispHTMLUnknownElement,
&DIID_DispHTMLWindow2,
&IID_IHTMLAnchorElement,
&IID_IHTMLBodyElement,
&IID_IHTMLBodyElement2,
&IID_IHTMLCommentElement,

View File

@ -474,14 +474,34 @@ static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
HTMLAnchorElement_destructor
};
static const tid_t HTMLAnchorElement_iface_tids[] = {
IHTMLAnchorElement_tid,
IHTMLDOMNode_tid,
IHTMLDOMNode2_tid,
IHTMLElement_tid,
IHTMLElement2_tid,
IHTMLElement3_tid,
IHTMLElement4_tid,
IHTMLTextContainer_tid,
IHTMLUniqueName_tid,
0
};
static dispex_static_data_t HTMLAnchorElement_dispex = {
NULL,
DispHTMLAnchorElement_tid,
NULL,
HTMLAnchorElement_iface_tids
};
HTMLElement *HTMLAnchorElement_Create(nsIDOMHTMLElement *nselem)
{
HTMLAnchorElement *ret = heap_alloc_zero(sizeof(HTMLAnchorElement));
HTMLElement_Init(&ret->element, NULL);
ret->lpHTMLAnchorElementVtbl = &HTMLAnchorElementVtbl;
ret->element.node.vtbl = &HTMLAnchorElementImplVtbl;
HTMLElement_Init(&ret->element, &HTMLAnchorElement_dispex);
return &ret->element;
}

View File

@ -59,6 +59,7 @@ typedef enum {
NULL_tid,
DispCEventObj_tid,
DispDOMChildrenCollection_tid,
DispHTMLAnchorElement_tid,
DispHTMLBody_tid,
DispHTMLCommentElement_tid,
DispHTMLCurrentStyle_tid,
@ -78,6 +79,7 @@ typedef enum {
DispHTMLTableRow_tid,
DispHTMLUnknownElement_tid,
DispHTMLWindow2_tid,
IHTMLAnchorElement_tid,
IHTMLBodyElement_tid,
IHTMLBodyElement2_tid,
IHTMLCommentElement_tid,

View File

@ -353,7 +353,7 @@ static const elem_type_info_t elem_type_infos[] = {
{"HEAD", elem_iids, NULL},
{"TITLE", elem_iids, NULL},
{"BODY", body_iids, &DIID_DispHTMLBody},
{"A", anchor_iids, NULL},
{"A", anchor_iids, &DIID_DispHTMLAnchorElement},
{"INPUT", input_iids, &DIID_DispHTMLInputElement},
{"SELECT", select_iids, &DIID_DispHTMLSelectElement},
{"TEXTAREA", textarea_iids, NULL},
@ -527,7 +527,8 @@ static void _test_disp(unsigned line, IUnknown *unk, const IID *diid, const char
if(_test_get_dispid(line, unk, &iid))
ok_(__FILE__,line) (IsEqualGUID(&iid, diid), "unexpected guid %s\n", dbgstr_guid(&iid));
_test_disp_value(line, unk, val);
if(val)
_test_disp_value(line, unk, val);
}
#define test_disp2(u,id,id2,v) _test_disp2(__LINE__,u,id,id2,v)
@ -539,7 +540,8 @@ static void _test_disp2(unsigned line, IUnknown *unk, const IID *diid, const IID
ok_(__FILE__,line) (IsEqualGUID(&iid, diid) || broken(IsEqualGUID(&iid, diid2)),
"unexpected guid %s\n", dbgstr_guid(&iid));
_test_disp_value(line, unk, val);
if(val)
_test_disp_value(line, unk, val);
}
#define get_elem_iface(u) _get_elem_iface(__LINE__,u)
@ -664,7 +666,7 @@ static void _test_elem_type(unsigned line, IUnknown *unk, elem_type_t type)
_test_elem_tag(line, unk, elem_type_infos[type].tag);
_test_ifaces(line, unk, elem_type_infos[type].iids);
if(elem_type_infos[type].dispiid)
if(elem_type_infos[type].dispiid && type != ET_A)
_test_disp(line, unk, elem_type_infos[type].dispiid, "[object]");
}