Jacek Caban : mshtml: Added IDispatchEx support to HTMLTableRow.

Alexandre Julliard julliard at winehq.org
Wed Oct 1 14:09:24 CDT 2008


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Sep 30 17:42:34 2008 +0200

mshtml: Added IDispatchEx support to HTMLTableRow.

---

 dlls/mshtml/dispex.c         |    2 ++
 dlls/mshtml/htmltablerow.c   |   21 +++++++++++++++++++--
 dlls/mshtml/mshtml_private.h |    2 ++
 dlls/mshtml/tests/dom.c      |    2 +-
 4 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index e176711..c329d30 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -77,6 +77,7 @@ static REFIID tid_ids[] = {
     &DIID_DispHTMLOptionElement,
     &DIID_DispHTMLSelectElement,
     &DIID_DispHTMLStyle,
+    &DIID_DispHTMLTableRow,
     &DIID_DispHTMLUnknownElement,
     &DIID_DispHTMLWindow2,
     &IID_IHTMLBodyElement,
@@ -102,6 +103,7 @@ static REFIID tid_ids[] = {
     &IID_IHTMLOptionElement,
     &IID_IHTMLSelectElement,
     &IID_IHTMLStyle,
+    &IID_IHTMLTableRow,
     &IID_IHTMLTextContainer,
     &IID_IHTMLUniqueName,
     &IID_IHTMLWindow2,
diff --git a/dlls/mshtml/htmltablerow.c b/dlls/mshtml/htmltablerow.c
index 007d6bd..aaf0567 100644
--- a/dlls/mshtml/htmltablerow.c
+++ b/dlls/mshtml/htmltablerow.c
@@ -281,14 +281,31 @@ static const NodeImplVtbl HTMLTableRowImplVtbl = {
     HTMLTableRow_destructor
 };
 
+static const tid_t HTMLTableRow_iface_tids[] = {
+    IHTMLDOMNode_tid,
+    IHTMLDOMNode2_tid,
+    IHTMLElement_tid,
+    IHTMLElement2_tid,
+    IHTMLTableRow_tid,
+    0
+};
+
+static dispex_static_data_t HTMLTableRow_dispex = {
+    NULL,
+    DispHTMLTableRow_tid,
+    NULL,
+    HTMLTableRow_iface_tids
+};
+
 HTMLElement *HTMLTableRow_Create(nsIDOMHTMLElement *nselem)
 {
     HTMLTableRow *ret = heap_alloc_zero(sizeof(HTMLTableRow));
 
-    HTMLElement_Init(&ret->element);
-
     ret->lpHTMLTableRowVtbl = &HTMLTableRowVtbl;
     ret->element.node.vtbl = &HTMLTableRowImplVtbl;
 
+    init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLTABLEROW(ret), &HTMLTableRow_dispex);
+    HTMLElement_Init(&ret->element);
+
     return &ret->element;
 }
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 646adfd..3332590 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -73,6 +73,7 @@ typedef enum {
     DispHTMLOptionElement_tid,
     DispHTMLSelectElement_tid,
     DispHTMLStyle_tid,
+    DispHTMLTableRow_tid,
     DispHTMLUnknownElement_tid,
     DispHTMLWindow2_tid,
     IHTMLBodyElement_tid,
@@ -98,6 +99,7 @@ typedef enum {
     IHTMLOptionElement_tid,
     IHTMLSelectElement_tid,
     IHTMLStyle_tid,
+    IHTMLTableRow_tid,
     IHTMLTextContainer_tid,
     IHTMLUniqueName_tid,
     IHTMLWindow2_tid,
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index a03d11c..ebb4f17 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -286,7 +286,7 @@ static const elem_type_info_t elem_type_infos[] = {
     {"TEST",      generic_iids,     &DIID_DispHTMLGenericElement},
     {"!",         comment_iids,     &DIID_DispHTMLCommentElement},
     {"IMG",       img_iids,         &DIID_DispHTMLImg},
-    {"TR",        tr_iids,          NULL}
+    {"TR",        tr_iids,          &DIID_DispHTMLTableRow}
 };
 
 static const char *dbgstr_w(LPCWSTR str)




More information about the wine-cvs mailing list