Commit d5059b83 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added elements IDispatchEx implementation.

parent 22eb495a
...@@ -52,11 +52,15 @@ static struct list dispex_data_list = LIST_INIT(dispex_data_list); ...@@ -52,11 +52,15 @@ static struct list dispex_data_list = LIST_INIT(dispex_data_list);
static REFIID tid_ids[] = { static REFIID tid_ids[] = {
&IID_NULL, &IID_NULL,
&DIID_DispHTMLDocument, &DIID_DispHTMLDocument,
&DIID_DispHTMLUnknownElement,
&DIID_DispHTMLWindow2, &DIID_DispHTMLWindow2,
&IID_IHTMLDocument2, &IID_IHTMLDocument2,
&IID_IHTMLDocument3, &IID_IHTMLDocument3,
&IID_IHTMLDocument4, &IID_IHTMLDocument4,
&IID_IHTMLDocument5, &IID_IHTMLDocument5,
&IID_IHTMLDOMNode,
&IID_IHTMLElement,
&IID_IHTMLElement2,
&IID_IHTMLWindow2, &IID_IHTMLWindow2,
&IID_IHTMLWindow3, &IID_IHTMLWindow3,
&IID_IOmNavigator &IID_IOmNavigator
......
...@@ -1282,6 +1282,17 @@ static const NodeImplVtbl HTMLElementImplVtbl = { ...@@ -1282,6 +1282,17 @@ static const NodeImplVtbl HTMLElementImplVtbl = {
HTMLElement_destructor HTMLElement_destructor
}; };
static dispex_static_data_t HTMLElement_dispex = {
DispHTMLUnknownElement_tid,
NULL,
{
IHTMLDOMNode_tid,
IHTMLElement_tid,
IHTMLElement2_tid,
0
}
};
void HTMLElement_Init(HTMLElement *This) void HTMLElement_Init(HTMLElement *This)
{ {
This->node.vtbl = &HTMLElementImplVtbl; This->node.vtbl = &HTMLElementImplVtbl;
...@@ -1344,6 +1355,9 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode) ...@@ -1344,6 +1355,9 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode)
ret->nselem = nselem; ret->nselem = nselem;
if(!ret->node.dispex.data)
init_dispex(&ret->node.dispex, (IUnknown*)HTMLELEM(ret), &HTMLElement_dispex);
return ret; return ret;
} }
......
...@@ -313,6 +313,14 @@ HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv) ...@@ -313,6 +313,14 @@ HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
}else if(IsEqualGUID(&IID_IDispatch, riid)) { }else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv); TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*ppv = HTMLDOMNODE(This); *ppv = HTMLDOMNODE(This);
}else if(IsEqualGUID(&IID_IDispatchEx, riid)) {
if(This->dispex.data) {
TRACE("(%p)->(IID_IDispatchEx %p)\n", This, ppv);
*ppv = DISPATCHEX(&This->dispex);
}else {
FIXME("(%p)->(IID_IDispatchEx %p)\n", This, ppv);
return E_NOINTERFACE;
}
}else if(IsEqualGUID(&IID_IHTMLDOMNode, riid)) { }else if(IsEqualGUID(&IID_IHTMLDOMNode, riid)) {
TRACE("(%p)->(IID_IHTMLDOMNode %p)\n", This, ppv); TRACE("(%p)->(IID_IHTMLDOMNode %p)\n", This, ppv);
*ppv = HTMLDOMNODE(This); *ppv = HTMLDOMNODE(This);
......
...@@ -62,11 +62,15 @@ typedef struct event_target_t event_target_t; ...@@ -62,11 +62,15 @@ typedef struct event_target_t event_target_t;
typedef enum { typedef enum {
NULL_tid, NULL_tid,
DispHTMLDocument_tid, DispHTMLDocument_tid,
DispHTMLUnknownElement_tid,
DispHTMLWindow2_tid, DispHTMLWindow2_tid,
IHTMLDocument2_tid, IHTMLDocument2_tid,
IHTMLDocument3_tid, IHTMLDocument3_tid,
IHTMLDocument4_tid, IHTMLDocument4_tid,
IHTMLDocument5_tid, IHTMLDocument5_tid,
IHTMLDOMNode_tid,
IHTMLElement_tid,
IHTMLElement2_tid,
IHTMLWindow2_tid, IHTMLWindow2_tid,
IHTMLWindow3_tid, IHTMLWindow3_tid,
IOmNavigator_tid, IOmNavigator_tid,
...@@ -293,6 +297,7 @@ typedef struct { ...@@ -293,6 +297,7 @@ typedef struct {
} NodeImplVtbl; } NodeImplVtbl;
struct HTMLDOMNode { struct HTMLDOMNode {
DispatchEx dispex;
const IHTMLDOMNodeVtbl *lpHTMLDOMNodeVtbl; const IHTMLDOMNodeVtbl *lpHTMLDOMNodeVtbl;
const NodeImplVtbl *vtbl; const NodeImplVtbl *vtbl;
......
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