mshtml: Added IHTMLEventObj::get_type implementation.
This commit is contained in:
parent
a6ee270f0f
commit
145d53e2ac
|
@ -128,6 +128,7 @@ typedef struct {
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
|
||||||
HTMLDOMNode *target;
|
HTMLDOMNode *target;
|
||||||
|
const event_info_t *type;
|
||||||
} HTMLEventObj;
|
} HTMLEventObj;
|
||||||
|
|
||||||
#define HTMLEVENTOBJ(x) ((IHTMLEventObj*) &(x)->lpIHTMLEventObjVtbl)
|
#define HTMLEVENTOBJ(x) ((IHTMLEventObj*) &(x)->lpIHTMLEventObjVtbl)
|
||||||
|
@ -315,8 +316,11 @@ static HRESULT WINAPI HTMLEventObj_get_button(IHTMLEventObj *iface, LONG *p)
|
||||||
static HRESULT WINAPI HTMLEventObj_get_type(IHTMLEventObj *iface, BSTR *p)
|
static HRESULT WINAPI HTMLEventObj_get_type(IHTMLEventObj *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLEventObj *This = HTMLEVENTOBJ_THIS(iface);
|
HTMLEventObj *This = HTMLEVENTOBJ_THIS(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
*p = SysAllocString(This->type->name);
|
||||||
|
return *p ? S_OK : E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLEventObj_get_qualifier(IHTMLEventObj *iface, BSTR *p)
|
static HRESULT WINAPI HTMLEventObj_get_qualifier(IHTMLEventObj *iface, BSTR *p)
|
||||||
|
@ -445,13 +449,14 @@ static dispex_static_data_t HTMLEventObj_dispex = {
|
||||||
HTMLEventObj_iface_tids
|
HTMLEventObj_iface_tids
|
||||||
};
|
};
|
||||||
|
|
||||||
static IHTMLEventObj *create_event(HTMLDOMNode *target)
|
static IHTMLEventObj *create_event(HTMLDOMNode *target, eventid_t eid)
|
||||||
{
|
{
|
||||||
HTMLEventObj *ret;
|
HTMLEventObj *ret;
|
||||||
|
|
||||||
ret = heap_alloc(sizeof(*ret));
|
ret = heap_alloc(sizeof(*ret));
|
||||||
ret->lpIHTMLEventObjVtbl = &HTMLEventObjVtbl;
|
ret->lpIHTMLEventObjVtbl = &HTMLEventObjVtbl;
|
||||||
ret->ref = 1;
|
ret->ref = 1;
|
||||||
|
ret->type = event_info+eid;
|
||||||
ret->target = target;
|
ret->target = target;
|
||||||
IHTMLDOMNode_AddRef(HTMLDOMNODE(target));
|
IHTMLDOMNode_AddRef(HTMLDOMNODE(target));
|
||||||
|
|
||||||
|
@ -499,7 +504,7 @@ void fire_event(HTMLDocument *doc, eventid_t eid, nsIDOMNode *target)
|
||||||
}
|
}
|
||||||
|
|
||||||
prev_event = doc->window->event;
|
prev_event = doc->window->event;
|
||||||
event_obj = doc->window->event = create_event(get_node(doc, target, TRUE));
|
event_obj = doc->window->event = create_event(get_node(doc, target, TRUE), eid);
|
||||||
nsnode = target;
|
nsnode = target;
|
||||||
nsIDOMNode_AddRef(nsnode);
|
nsIDOMNode_AddRef(nsnode);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue