Jacek Caban : mshtml: Added IDispatchEx support for HTMLIFrame.

Alexandre Julliard julliard at winehq.org
Wed Oct 8 08:32:49 CDT 2008


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Oct  7 14:44:50 2008 -0500

mshtml: Added IDispatchEx support for HTMLIFrame.

---

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

diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index a55ef74..9d77f97 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -73,6 +73,7 @@ static REFIID tid_ids[] = {
     &DIID_DispHTMLDOMTextNode,
     &DIID_DispHTMLElementCollection,
     &DIID_DispHTMLGenericElement,
+    &DIID_DispHTMLIFrame,
     &DIID_DispHTMLImg,
     &DIID_DispHTMLInputElement,
     &DIID_DispHTMLOptionElement,
@@ -99,6 +100,7 @@ static REFIID tid_ids[] = {
     &IID_IHTMLElement3,
     &IID_IHTMLElement4,
     &IID_IHTMLElementCollection,
+    &IID_IHTMLFrameBase2,
     &IID_IHTMLGenericElement,
     &IID_IHTMLImgElement,
     &IID_IHTMLInputElement,
diff --git a/dlls/mshtml/htmliframe.c b/dlls/mshtml/htmliframe.c
index 5d1fff7..232cbfb 100644
--- a/dlls/mshtml/htmliframe.c
+++ b/dlls/mshtml/htmliframe.c
@@ -209,6 +209,23 @@ static const NodeImplVtbl HTMLIFrameImplVtbl = {
     HTMLIFrame_destructor
 };
 
+static const tid_t HTMLIFrame_iface_tids[] = {
+    IHTMLDOMNode_tid,
+    IHTMLDOMNode2_tid,
+    IHTMLElement_tid,
+    IHTMLElement2_tid,
+    IHTMLElement3_tid,
+    IHTMLFrameBase2_tid,
+    0
+};
+
+static dispex_static_data_t HTMLIFrame_dispex = {
+    NULL,
+    DispHTMLIFrame_tid,
+    NULL,
+    HTMLIFrame_iface_tids
+};
+
 HTMLElement *HTMLIFrame_Create(nsIDOMHTMLElement *nselem)
 {
     HTMLIFrame *ret;
@@ -219,6 +236,7 @@ HTMLElement *HTMLIFrame_Create(nsIDOMHTMLElement *nselem)
     ret->lpIHTMLFrameBase2Vtbl = &HTMLIFrameBase2Vtbl;
     ret->element.node.vtbl = &HTMLIFrameImplVtbl;
 
+    init_dispex(&ret->element.node.dispex, (IUnknown*)HTMLFRAMEBASE2(ret), &HTMLIFrame_dispex);
     HTMLElement_Init(&ret->element);
 
     nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLIFrameElement, (void**)&ret->nsiframe);
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 55ea9c5..b90d07a 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -69,6 +69,7 @@ typedef enum {
     DispHTMLDOMTextNode_tid,
     DispHTMLElementCollection_tid,
     DispHTMLGenericElement_tid,
+    DispHTMLIFrame_tid,
     DispHTMLImg_tid,
     DispHTMLInputElement_tid,
     DispHTMLOptionElement_tid,
@@ -95,6 +96,7 @@ typedef enum {
     IHTMLElement3_tid,
     IHTMLElement4_tid,
     IHTMLElementCollection_tid,
+    IHTMLFrameBase2_tid,
     IHTMLGenericElement_tid,
     IHTMLImgElement_tid,
     IHTMLInputElement_tid,
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 0415d08..925d98f 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -344,7 +344,7 @@ static const elem_type_info_t elem_type_infos[] = {
     {"IMG",       img_iids,         &DIID_DispHTMLImg},
     {"TR",        tr_iids,          &DIID_DispHTMLTableRow},
     {"TD",        td_iids,          NULL},
-    {"IFRAME",    iframe_iids,      NULL}
+    {"IFRAME",    iframe_iids,      &DIID_DispHTMLIFrame}
 };
 
 static const char *dbgstr_w(LPCWSTR str)




More information about the wine-cvs mailing list