Commit 30d20475 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IDispatchEx support to HTMLDOMChildrenCollection.

parent 6da1c730
......@@ -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,
......
......@@ -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);
}
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment