mshtml: Added elements IDispatchEx implementation.

This commit is contained in:
Jacek Caban 2008-04-23 16:45:52 +02:00 committed by Alexandre Julliard
parent 22eb495aaf
commit d5059b8303
4 changed files with 31 additions and 0 deletions

View File

@ -52,11 +52,15 @@ static struct list dispex_data_list = LIST_INIT(dispex_data_list);
static REFIID tid_ids[] = {
&IID_NULL,
&DIID_DispHTMLDocument,
&DIID_DispHTMLUnknownElement,
&DIID_DispHTMLWindow2,
&IID_IHTMLDocument2,
&IID_IHTMLDocument3,
&IID_IHTMLDocument4,
&IID_IHTMLDocument5,
&IID_IHTMLDOMNode,
&IID_IHTMLElement,
&IID_IHTMLElement2,
&IID_IHTMLWindow2,
&IID_IHTMLWindow3,
&IID_IOmNavigator

View File

@ -1282,6 +1282,17 @@ static const NodeImplVtbl HTMLElementImplVtbl = {
HTMLElement_destructor
};
static dispex_static_data_t HTMLElement_dispex = {
DispHTMLUnknownElement_tid,
NULL,
{
IHTMLDOMNode_tid,
IHTMLElement_tid,
IHTMLElement2_tid,
0
}
};
void HTMLElement_Init(HTMLElement *This)
{
This->node.vtbl = &HTMLElementImplVtbl;
@ -1344,6 +1355,9 @@ HTMLElement *HTMLElement_Create(nsIDOMNode *nsnode)
ret->nselem = nselem;
if(!ret->node.dispex.data)
init_dispex(&ret->node.dispex, (IUnknown*)HTMLELEM(ret), &HTMLElement_dispex);
return ret;
}

View File

@ -313,6 +313,14 @@ HRESULT HTMLDOMNode_QI(HTMLDOMNode *This, REFIID riid, void **ppv)
}else if(IsEqualGUID(&IID_IDispatch, riid)) {
TRACE("(%p)->(IID_IDispatch %p)\n", This, ppv);
*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)) {
TRACE("(%p)->(IID_IHTMLDOMNode %p)\n", This, ppv);
*ppv = HTMLDOMNODE(This);

View File

@ -62,11 +62,15 @@ typedef struct event_target_t event_target_t;
typedef enum {
NULL_tid,
DispHTMLDocument_tid,
DispHTMLUnknownElement_tid,
DispHTMLWindow2_tid,
IHTMLDocument2_tid,
IHTMLDocument3_tid,
IHTMLDocument4_tid,
IHTMLDocument5_tid,
IHTMLDOMNode_tid,
IHTMLElement_tid,
IHTMLElement2_tid,
IHTMLWindow2_tid,
IHTMLWindow3_tid,
IOmNavigator_tid,
@ -293,6 +297,7 @@ typedef struct {
} NodeImplVtbl;
struct HTMLDOMNode {
DispatchEx dispex;
const IHTMLDOMNodeVtbl *lpHTMLDOMNodeVtbl;
const NodeImplVtbl *vtbl;