mshtml: Added textarea element IDispatchEx support.
authorJacek Caban <jacek@codeweavers.com>
Thu, 28 Jan 2010 22:53:55 +0000 (23:53 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 29 Jan 2010 12:30:06 +0000 (13:30 +0100)
dlls/mshtml/dispex.c
dlls/mshtml/htmltextarea.c
dlls/mshtml/mshtml_private.h
dlls/mshtml/tests/dom.c

index d7220d756084cd2a0167dd6f2300d0fba9175d47..52d8d41c3519495aef412135c165132927220652 100644 (file)
@@ -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,
index 0a07379871b7ad128d659f22f7f04ede6fde1890..9ded8ac6e1224fce317588e71a34e6ae86d891b1 100644 (file)
@@ -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);
index 8a1ff01d4dbe6eb3240dc688623ab8aa4fd8c05e..054aeabccd1078f60a1b00a19a2b1085b7ccd3d3 100644 (file)
@@ -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,
index 581d9d4228a94fd894bd872901bc27401143cf19..f6e4cf9804fee6705fdc0ba0d3c0c63490bc7335 100644 (file)
@@ -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},