Commit 5b59ba0c authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Use the dispex's invoke for all nodes.

parent 85750f09
......@@ -6886,19 +6886,6 @@ void HTMLElement_destructor(DispatchEx *dispex)
HTMLDOMNode_destructor(&This->node.event_target.dispex);
}
HRESULT HTMLElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res,
EXCEPINFO *ei, IServiceProvider *caller)
{
HTMLElement *This = impl_from_DispatchEx(dispex);
if(This->node.vtbl->invoke)
return This->node.vtbl->invoke(&This->node, id, lcid, flags,
params, res, ei, caller);
ERR("(%p): element has no invoke method\n", This);
return E_NOTIMPL;
}
HRESULT HTMLElement_populate_props(DispatchEx *dispex)
{
HTMLElement *This = impl_from_DispatchEx(dispex);
......
......@@ -145,7 +145,6 @@ ConnectionPointContainer *HTMLElement_get_cp_container(DispatchEx*);
IHTMLEventObj *HTMLElement_set_current_event(DispatchEx*,IHTMLEventObj*);
#define HTMLELEMENT_DISPEX_VTBL_ENTRIES \
.invoke = HTMLElement_invoke, \
.populate_props = HTMLElement_populate_props
#define HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES \
......
......@@ -927,10 +927,10 @@ static HRESULT HTMLFormElement_dispex_get_name(DispatchEx *dispex, DISPID id, BS
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLFormElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
static HRESULT HTMLFormElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
HTMLFormElement *This = impl_from_HTMLDOMNode(iface);
HTMLFormElement *This = impl_from_DispatchEx(dispex);
IDispatch *ret;
HRESULT hres;
......@@ -967,7 +967,6 @@ static const NodeImplVtbl HTMLFormElementImplVtbl = {
.clone = HTMLElement_clone,
.handle_event = HTMLFormElement_handle_event,
.get_attr_col = HTMLElement_get_attr_col,
.invoke = HTMLFormElement_invoke,
};
static const event_target_vtbl_t HTMLFormElement_event_target_vtbl = {
......@@ -979,6 +978,7 @@ static const event_target_vtbl_t HTMLFormElement_event_target_vtbl = {
.unlink = HTMLFormElement_unlink,
.get_dispid = HTMLFormElement_get_dispid,
.get_name = HTMLFormElement_dispex_get_name,
.invoke = HTMLFormElement_invoke
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
......
......@@ -987,10 +987,10 @@ static HRESULT HTMLFrameElement_get_name(DispatchEx *dispex, DISPID id, BSTR *na
return *name ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLFrameElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
static HRESULT HTMLFrameElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
HTMLFrameElement *This = frame_from_HTMLDOMNode(iface);
HTMLFrameElement *This = frame_from_DispatchEx(dispex);
if(!This->framebase.content_window) {
ERR("no content window to invoke on\n");
......@@ -1009,7 +1009,6 @@ static const NodeImplVtbl HTMLFrameElementImplVtbl = {
.get_attr_col = HTMLElement_get_attr_col,
.get_document = HTMLFrameElement_get_document,
.get_readystate = HTMLFrameElement_get_readystate,
.invoke = HTMLFrameElement_invoke,
.bind_to_tree = HTMLFrameElement_bind_to_tree,
};
......@@ -1022,6 +1021,7 @@ static const event_target_vtbl_t HTMLFrameElement_event_target_vtbl = {
.unlink = HTMLFrameElement_unlink,
.get_dispid = HTMLFrameElement_get_dispid,
.get_name = HTMLFrameElement_get_name,
.invoke = HTMLFrameElement_invoke
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
......@@ -1577,10 +1577,10 @@ static HRESULT HTMLIFrame_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
return *name ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLIFrame_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
static HRESULT HTMLIFrame_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
HTMLIFrame *This = iframe_from_HTMLDOMNode(iface);
HTMLIFrame *This = iframe_from_DispatchEx(dispex);
if(!This->framebase.content_window) {
ERR("no content window to invoke on\n");
......@@ -1599,7 +1599,6 @@ static const NodeImplVtbl HTMLIFrameImplVtbl = {
.get_attr_col = HTMLElement_get_attr_col,
.get_document = HTMLIFrame_get_document,
.get_readystate = HTMLIFrame_get_readystate,
.invoke = HTMLIFrame_invoke,
.bind_to_tree = HTMLIFrame_bind_to_tree,
};
......@@ -1612,6 +1611,7 @@ static const event_target_vtbl_t HTMLIFrame_event_target_vtbl = {
.unlink = HTMLIFrame_unlink,
.get_dispid = HTMLIFrame_get_dispid,
.get_name = HTMLIFrame_get_name,
.invoke = HTMLIFrame_invoke
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
......
......@@ -728,10 +728,10 @@ static HRESULT HTMLObjectElement_dispex_get_name(DispatchEx *dispex, DISPID id,
return E_NOTIMPL;
}
static HRESULT HTMLObjectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
static HRESULT HTMLObjectElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
HTMLObjectElement *This = impl_from_HTMLDOMNode(iface);
HTMLObjectElement *This = impl_from_DispatchEx(dispex);
TRACE("(%p)->(%ld)\n", This, id);
......@@ -745,7 +745,6 @@ static const NodeImplVtbl HTMLObjectElementImplVtbl = {
.handle_event = HTMLElement_handle_event,
.get_attr_col = HTMLElement_get_attr_col,
.get_readystate = HTMLObjectElement_get_readystate,
.invoke = HTMLObjectElement_invoke,
};
static const event_target_vtbl_t HTMLObjectElement_event_target_vtbl = {
......@@ -757,6 +756,7 @@ static const event_target_vtbl_t HTMLObjectElement_event_target_vtbl = {
.unlink = HTMLObjectElement_unlink,
.get_dispid = HTMLObjectElement_get_dispid,
.get_name = HTMLObjectElement_dispex_get_name,
.invoke = HTMLObjectElement_invoke
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
......
......@@ -341,11 +341,6 @@ static const IHTMLOptionElementVtbl HTMLOptionElementVtbl = {
HTMLOptionElement_get_form
};
static inline HTMLOptionElement *HTMLOptionElement_from_HTMLDOMNode(HTMLDOMNode *iface)
{
return CONTAINING_RECORD(iface, HTMLOptionElement, element.node);
}
static inline HTMLOptionElement *HTMLOptionElement_from_DispatchEx(DispatchEx *iface)
{
return CONTAINING_RECORD(iface, HTMLOptionElement, element.node.event_target.dispex);
......@@ -1386,10 +1381,10 @@ static HRESULT HTMLSelectElement_dispex_get_name(DispatchEx *dispex, DISPID id,
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLSelectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
static HRESULT HTMLSelectElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
HTMLSelectElement *This = impl_from_HTMLDOMNode(iface);
HTMLSelectElement *This = impl_from_DispatchEx(dispex);
TRACE("(%p)->(%lx %lx %x %p %p %p %p)\n", This, id, lcid, flags, params, res, ei, caller);
......@@ -1427,7 +1422,6 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = {
.get_attr_col = HTMLElement_get_attr_col,
.put_disabled = HTMLSelectElementImpl_put_disabled,
.get_disabled = HTMLSelectElementImpl_get_disabled,
.invoke = HTMLSelectElement_invoke,
};
static const event_target_vtbl_t HTMLSelectElement_event_target_vtbl = {
......@@ -1439,6 +1433,7 @@ static const event_target_vtbl_t HTMLSelectElement_event_target_vtbl = {
.unlink = HTMLSelectElement_unlink,
.get_dispid = HTMLSelectElement_get_dispid,
.get_name = HTMLSelectElement_dispex_get_name,
.invoke = HTMLSelectElement_invoke
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
......
......@@ -822,7 +822,6 @@ typedef struct {
HRESULT (*get_disabled)(HTMLDOMNode*,VARIANT_BOOL*);
HRESULT (*get_document)(HTMLDOMNode*,IDispatch**);
HRESULT (*get_readystate)(HTMLDOMNode*,BSTR*);
HRESULT (*invoke)(HTMLDOMNode*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT (*bind_to_tree)(HTMLDOMNode*);
BOOL (*is_text_edit)(HTMLDOMNode*);
BOOL (*is_settable)(HTMLDOMNode*,DISPID);
......@@ -1208,7 +1207,6 @@ void HTMLDOMNode_init_dispex_info(dispex_data_t*,compat_mode_t);
void *HTMLElement_query_interface(DispatchEx*,REFIID);
void HTMLElement_destructor(DispatchEx*);
HRESULT HTMLElement_invoke(DispatchEx*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT HTMLElement_populate_props(DispatchEx*);
HRESULT HTMLElement_clone(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
HRESULT HTMLElement_get_attr_col(HTMLDOMNode*,HTMLAttributeCollection**);
......
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