Jacek Caban : mshtml: Added IDispatchEx support to HTMLObjectElement object .

Alexandre Julliard julliard at winehq.org
Thu Oct 28 12:19:50 CDT 2010


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Oct 27 23:19:30 2010 +0200

mshtml: Added IDispatchEx support to HTMLObjectElement object.

---

 dlls/mshtml/dispex.c         |    2 ++
 dlls/mshtml/htmlobject.c     |   14 +++++++++++++-
 dlls/mshtml/mshtml_private.h |    2 ++
 dlls/mshtml/tests/dom.c      |    2 +-
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index 64356f5..0f113a3 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -101,6 +101,7 @@ static REFIID tid_ids[] = {
     &DIID_DispHTMLInputElement,
     &DIID_DispHTMLLocation,
     &DIID_DispHTMLNavigator,
+    &DIID_DispHTMLObjectElement,
     &DIID_DispHTMLOptionElement,
     &DIID_DispHTMLScreen,
     &DIID_DispHTMLScriptElement,
@@ -145,6 +146,7 @@ static REFIID tid_ids[] = {
     &IID_IHTMLImgElement,
     &IID_IHTMLInputElement,
     &IID_IHTMLLocation,
+    &IID_IHTMLObjectElement,
     &IID_IHTMLOptionElement,
     &IID_IHTMLRect,
     &IID_IHTMLScreen,
diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c
index fb5ef58..09890cb 100644
--- a/dlls/mshtml/htmlobject.c
+++ b/dlls/mshtml/htmlobject.c
@@ -415,6 +415,18 @@ static const NodeImplVtbl HTMLObjectElementImplVtbl = {
     HTMLObjectElement_destructor
 };
 
+static const tid_t HTMLObjectElement_iface_tids[] = {
+    HTMLELEMENT_TIDS,
+    IHTMLObjectElement_tid,
+    0
+};
+static dispex_static_data_t HTMLObjectElement_dispex = {
+    NULL,
+    DispHTMLObjectElement_tid,
+    NULL,
+    HTMLObjectElement_iface_tids
+};
+
 HTMLElement *HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem)
 {
     HTMLObjectElement *ret = heap_alloc_zero(sizeof(*ret));
@@ -422,6 +434,6 @@ HTMLElement *HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *
     ret->lpIHTMLObjectElementVtbl = &HTMLObjectElementVtbl;
     ret->element.node.vtbl = &HTMLObjectElementImplVtbl;
 
-    HTMLElement_Init(&ret->element, doc, nselem, NULL);
+    HTMLElement_Init(&ret->element, doc, nselem, &HTMLObjectElement_dispex);
     return &ret->element;
 }
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index cf0404d..89777e8 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -83,6 +83,7 @@ typedef enum {
     DispHTMLInputElement_tid,
     DispHTMLLocation_tid,
     DispHTMLNavigator_tid,
+    DispHTMLObjectElement_tid,
     DispHTMLOptionElement_tid,
     DispHTMLScreen_tid,
     DispHTMLScriptElement_tid,
@@ -127,6 +128,7 @@ typedef enum {
     IHTMLImgElement_tid,
     IHTMLInputElement_tid,
     IHTMLLocation_tid,
+    IHTMLObjectElement_tid,
     IHTMLOptionElement_tid,
     IHTMLRect_tid,
     IHTMLScreen_tid,
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index ad7e224..94e3fcc 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -435,7 +435,7 @@ static const elem_type_info_t elem_type_infos[] = {
     {"IFRAME",    iframe_iids,      &DIID_DispHTMLIFrame},
     {"FORM",      form_iids,        &DIID_DispHTMLFormElement},
     {"FRAME",     frame_iids,       &DIID_DispHTMLFrameElement},
-    {"OBJECT",    object_iids,      NULL}
+    {"OBJECT",    object_iids,      &DIID_DispHTMLObjectElement}
 };
 
 static const char *dbgstr_guid(REFIID riid)




More information about the wine-cvs mailing list