From 398161dceec4541eb7a3bfe8250ba59bc909b646 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 28 Jan 2010 23:53:55 +0100 Subject: [PATCH] mshtml: Added textarea element IDispatchEx support. --- dlls/mshtml/dispex.c | 2 ++ dlls/mshtml/htmltextarea.c | 15 ++++++++++++++- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/dom.c | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index d7220d7560..52d8d41c35 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -105,6 +105,7 @@ static REFIID tid_ids[] = { &DIID_DispHTMLStyle, &DIID_DispHTMLTable, &DIID_DispHTMLTableRow, + &DIID_DispHTMLTextAreaElement, &DIID_DispHTMLUnknownElement, &DIID_DispHTMLWindow2, &DIID_HTMLDocumentEvents, @@ -151,6 +152,7 @@ static REFIID tid_ids[] = { &IID_IHTMLStyle4, &IID_IHTMLTable, &IID_IHTMLTableRow, + &IID_IHTMLTextAreaElement, &IID_IHTMLTextContainer, &IID_IHTMLUniqueName, &IID_IHTMLWindow2, diff --git a/dlls/mshtml/htmltextarea.c b/dlls/mshtml/htmltextarea.c index 0a07379871..9ded8ac6e1 100644 --- a/dlls/mshtml/htmltextarea.c +++ b/dlls/mshtml/htmltextarea.c @@ -411,6 +411,19 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = { HTMLTextAreaElementImpl_get_disabled }; +static const tid_t HTMLTextAreaElement_iface_tids[] = { + HTMLELEMENT_TIDS, + IHTMLTextAreaElement_tid, + 0 +}; + +static dispex_static_data_t HTMLTextAreaElement_dispex = { + NULL, + DispHTMLTextAreaElement_tid, + NULL, + HTMLTextAreaElement_iface_tids +}; + HTMLElement *HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem) { HTMLTextAreaElement *ret = heap_alloc_zero(sizeof(HTMLTextAreaElement)); @@ -419,7 +432,7 @@ HTMLElement *HTMLTextAreaElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement ret->lpHTMLTextAreaElementVtbl = &HTMLTextAreaElementVtbl; ret->element.node.vtbl = &HTMLTextAreaElementImplVtbl; - HTMLElement_Init(&ret->element, doc, nselem, NULL); + HTMLElement_Init(&ret->element, doc, nselem, &HTMLTextAreaElement_dispex); nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLTextAreaElement, (void**)&ret->nstextarea); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 8a1ff01d4d..054aeabccd 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -81,6 +81,7 @@ typedef enum { DispHTMLStyle_tid, DispHTMLTable_tid, DispHTMLTableRow_tid, + DispHTMLTextAreaElement_tid, DispHTMLUnknownElement_tid, DispHTMLWindow2_tid, HTMLDocumentEvents_tid, @@ -127,6 +128,7 @@ typedef enum { IHTMLStyle4_tid, IHTMLTable_tid, IHTMLTableRow_tid, + IHTMLTextAreaElement_tid, IHTMLTextContainer_tid, IHTMLUniqueName_tid, IHTMLWindow2_tid, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 581d9d4228..f6e4cf9804 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -404,7 +404,7 @@ static const elem_type_info_t elem_type_infos[] = { {"A", anchor_iids, &DIID_DispHTMLAnchorElement}, {"INPUT", input_iids, &DIID_DispHTMLInputElement}, {"SELECT", select_iids, &DIID_DispHTMLSelectElement}, - {"TEXTAREA", textarea_iids, NULL}, + {"TEXTAREA", textarea_iids, &DIID_DispHTMLTextAreaElement}, {"OPTION", option_iids, &DIID_DispHTMLOptionElement}, {"STYLE", elem_iids, NULL}, {"BLOCKQUOTE",elem_iids, NULL}, -- 2.32.0.93.g670b81a890