diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 06fdf1900aa..4de3d86a055 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -59,6 +59,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLImg, &DIID_DispHTMLInputElement, &DIID_DispHTMLOptionElement, + &DIID_DispHTMLSelectElement, &DIID_DispHTMLStyle, &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, @@ -77,6 +78,7 @@ static REFIID tid_ids[] = { &IID_IHTMLImgElement, &IID_IHTMLInputElement, &IID_IHTMLOptionElement, + &IID_IHTMLSelectElement, &IID_IHTMLStyle, &IID_IHTMLWindow2, &IID_IHTMLWindow3, diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index 03fcb8fecb4..1783bab6c73 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -420,16 +420,33 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = { HTMLSelectElement_destructor }; +static const tid_t HTMLSelectElement_tids[] = { + IHTMLDOMNode_tid, + IHTMLDOMNode2_tid, + IHTMLElement_tid, + IHTMLElement2_tid, + IHTMLSelectElement_tid, + 0 +}; + +static dispex_static_data_t HTMLSelectElement_dispex = { + NULL, + DispHTMLSelectElement_tid, + NULL, + HTMLSelectElement_tids +}; + HTMLElement *HTMLSelectElement_Create(nsIDOMHTMLElement *nselem) { HTMLSelectElement *ret = heap_alloc_zero(sizeof(HTMLSelectElement)); nsresult nsres; - HTMLElement_Init(&ret->element); - ret->lpHTMLSelectElementVtbl = &HTMLSelectElementVtbl; ret->element.node.vtbl = &HTMLSelectElementImplVtbl; - + + init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLSELECT(ret), &HTMLSelectElement_dispex); + HTMLElement_Init(&ret->element); + nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLSelectElement, (void**)&ret->nsselect); if(NS_FAILED(nsres)) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 7ad23251aa0..87d29ac2e62 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -69,6 +69,7 @@ typedef enum { DispHTMLImg_tid, DispHTMLInputElement_tid, DispHTMLOptionElement_tid, + DispHTMLSelectElement_tid, DispHTMLStyle_tid, DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, @@ -87,6 +88,7 @@ typedef enum { IHTMLImgElement_tid, IHTMLInputElement_tid, IHTMLOptionElement_tid, + IHTMLSelectElement_tid, IHTMLStyle_tid, IHTMLWindow2_tid, IHTMLWindow3_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 27cb3aa5f6d..45a5383f098 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -248,7 +248,7 @@ static const elem_type_info_t elem_type_infos[] = { {"BODY", body_iids, NULL}, {"A", anchor_iids, NULL}, {"INPUT", input_iids, &DIID_DispHTMLInputElement}, - {"SELECT", select_iids, NULL}, + {"SELECT", select_iids, &DIID_DispHTMLSelectElement}, {"TEXTAREA", textarea_iids, NULL}, {"OPTION", option_iids, &DIID_DispHTMLOptionElement}, {"STYLE", elem_iids, NULL},