Jacek Caban : mshtml: Added textarea element IDispatchEx support.

Alexandre Julliard julliard at winehq.org
Fri Jan 29 10:56:32 CST 2010


Module: wine
Branch: master
Commit: 398161dceec4541eb7a3bfe8250ba59bc909b646
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=398161dceec4541eb7a3bfe8250ba59bc909b646

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Jan 28 23:53:55 2010 +0100

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 d7220d7..52d8d41 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 0a07379..9ded8ac 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 8a1ff01..054aeab 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 581d9d4..f6e4cf9 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},




More information about the wine-cvs mailing list