[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    mshtml #4: Added IDispatchEx support to HTMLDOMChildrenCollection.
From:       Jacek Caban <jacek () codeweavers ! com>
Date:       2008-04-30 16:18:09
Message-ID: 48189BC1.8090302 () codeweavers ! com
[Download RAW message or body]

---
  dlls/mshtml/dispex.c         |    2 ++
  dlls/mshtml/htmlnode.c       |   16 ++++++++++++++++
  dlls/mshtml/mshtml_private.h |    2 ++
  3 files changed, 20 insertions(+), 0 deletions(-)

["c55ce53886f097f231716f1a16bba2f6d7023831.diff" (text/x-patch)]

diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index 6f17a9d..f0cfc59 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -51,6 +51,7 @@ static struct list dispex_data_list = LIST_INIT(dispex_data_list);
 
 static REFIID tid_ids[] = {
     &IID_NULL,
+    &DIID_DispDOMChildrenCollection,
     &DIID_DispHTMLDocument,
     &DIID_DispHTMLDOMTextNode,
     &DIID_DispHTMLElementCollection,
@@ -62,6 +63,7 @@ static REFIID tid_ids[] = {
     &IID_IHTMLDocument3,
     &IID_IHTMLDocument4,
     &IID_IHTMLDocument5,
+    &IID_IHTMLDOMChildrenCollection,
     &IID_IHTMLDOMNode,
     &IID_IHTMLDOMNode2,
     &IID_IHTMLDOMTextNode,
diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c
index dbb35e1..1a9bea3 100644
--- a/dlls/mshtml/htmlnode.c
+++ b/dlls/mshtml/htmlnode.c
@@ -32,6 +32,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
 
 typedef struct {
+    DispatchEx dispex;
     const IHTMLDOMChildrenCollectionVtbl  *lpIHTMLDOMChildrenCollectionVtbl;
 
     LONG ref;
@@ -58,6 +59,9 @@ static HRESULT WINAPI HTMLDOMChildrenCollection_QueryInterface(IHTMLDOMChildrenC
     }else if(IsEqualGUID(&IID_IDispatch, riid)) {
         TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
         *ppv = HTMLCHILDCOL(This);
+    }else if(IsEqualGUID(&IID_IDispatchEx, riid)) {
+        TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv);
+        *ppv = DISPATCHEX(&This->dispex);
     }else if(IsEqualGUID(&IID_IHTMLDOMChildrenCollection, riid)) {
         TRACE("(%p)->(IID_IHTMLDOMChildrenCollection %p)\n", This, ppv);
         *ppv = HTMLCHILDCOL(This);
@@ -189,6 +193,16 @@ static const IHTMLDOMChildrenCollectionVtbl HTMLDOMChildrenCollectionVtbl = {
     HTMLDOMChildrenCollection_item
 };
 
+static dispex_static_data_t HTMLDOMChildrenCollection_dispex = {
+    NULL,
+    DispDOMChildrenCollection_tid,
+    NULL,
+    {
+        IHTMLDOMChildrenCollection_tid,
+        0
+    }
+};
+
 static IHTMLDOMChildrenCollection *create_child_collection(HTMLDocument *doc, nsIDOMNodeList *nslist)
 {
     HTMLDOMChildrenCollection *ret;
@@ -201,6 +215,8 @@ static IHTMLDOMChildrenCollection *create_child_collection(HTMLDocument *doc, ns
     ret->nslist = nslist;
     ret->doc = doc;
 
+    init_dispex(&ret->dispex, (IUnknown*)HTMLCHILDCOL(ret), &HTMLDOMChildrenCollection_dispex);
+
     return HTMLCHILDCOL(ret);
 }
 
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 55c0090..92d63a2 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -61,6 +61,7 @@ typedef struct event_target_t event_target_t;
 /* NOTE: make sure to keep in sync with dispex.c */
 typedef enum {
     NULL_tid,
+    DispDOMChildrenCollection_tid,
     DispHTMLDocument_tid,
     DispHTMLDOMTextNode_tid,
     DispHTMLElementCollection_tid,
@@ -72,6 +73,7 @@ typedef enum {
     IHTMLDocument3_tid,
     IHTMLDocument4_tid,
     IHTMLDocument5_tid,
+    IHTMLDOMChildrenCollection_tid,
     IHTMLDOMNode_tid,
     IHTMLDOMNode2_tid,
     IHTMLDOMTextNode_tid,





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic