Commit 85750f09 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

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

parent a5ab4bae
......@@ -6886,17 +6886,6 @@ void HTMLElement_destructor(DispatchEx *dispex)
HTMLDOMNode_destructor(&This->node.event_target.dispex);
}
HRESULT HTMLElement_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLElement *This = impl_from_DispatchEx(dispex);
if(This->node.vtbl->get_name)
return This->node.vtbl->get_name(&This->node, id, name);
ERR("(%p): element has no get_name method\n", This);
return DISP_E_MEMBERNOTFOUND;
}
HRESULT HTMLElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res,
EXCEPINFO *ei, IServiceProvider *caller)
{
......
......@@ -145,7 +145,6 @@ ConnectionPointContainer *HTMLElement_get_cp_container(DispatchEx*);
IHTMLEventObj *HTMLElement_set_current_event(DispatchEx*,IHTMLEventObj*);
#define HTMLELEMENT_DISPEX_VTBL_ENTRIES \
.get_name = HTMLElement_get_name, \
.invoke = HTMLElement_invoke, \
.populate_props = HTMLElement_populate_props
......
......@@ -902,9 +902,9 @@ static HRESULT HTMLFormElement_get_dispid(DispatchEx *dispex, BSTR name, DWORD g
return hres;
}
static HRESULT HTMLFormElement_dispex_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
static HRESULT HTMLFormElement_dispex_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLFormElement *This = impl_from_HTMLDOMNode(iface);
HTMLFormElement *This = impl_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
nsIDOMHTMLCollection *elements;
nsresult nsres;
......@@ -967,7 +967,6 @@ static const NodeImplVtbl HTMLFormElementImplVtbl = {
.clone = HTMLElement_clone,
.handle_event = HTMLFormElement_handle_event,
.get_attr_col = HTMLElement_get_attr_col,
.get_name = HTMLFormElement_dispex_get_name,
.invoke = HTMLFormElement_invoke,
};
......@@ -979,6 +978,7 @@ static const event_target_vtbl_t HTMLFormElement_event_target_vtbl = {
.traverse = HTMLFormElement_traverse,
.unlink = HTMLFormElement_unlink,
.get_dispid = HTMLFormElement_get_dispid,
.get_name = HTMLFormElement_dispex_get_name,
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
......
......@@ -974,9 +974,9 @@ static HRESULT HTMLFrameElement_get_dispid(DispatchEx *dispex, BSTR name, DWORD
return search_window_props(This->framebase.content_window->base.inner_window, name, grfdex, dispid);
}
static HRESULT HTMLFrameElement_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
static HRESULT HTMLFrameElement_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLFrameElement *This = frame_from_HTMLDOMNode(iface);
HTMLFrameElement *This = frame_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
if(!This->framebase.content_window ||
......@@ -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,
.get_name = HTMLFrameElement_get_name,
.invoke = HTMLFrameElement_invoke,
.bind_to_tree = HTMLFrameElement_bind_to_tree,
};
......@@ -1022,6 +1021,7 @@ static const event_target_vtbl_t HTMLFrameElement_event_target_vtbl = {
.traverse = HTMLFrameElement_traverse,
.unlink = HTMLFrameElement_unlink,
.get_dispid = HTMLFrameElement_get_dispid,
.get_name = HTMLFrameElement_get_name,
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
......@@ -1564,9 +1564,9 @@ static HRESULT HTMLIFrame_get_dispid(DispatchEx *dispex, BSTR name, DWORD grfdex
return search_window_props(This->framebase.content_window->base.inner_window, name, grfdex, dispid);
}
static HRESULT HTMLIFrame_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
static HRESULT HTMLIFrame_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLIFrame *This = iframe_from_HTMLDOMNode(iface);
HTMLIFrame *This = iframe_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
if(!This->framebase.content_window ||
......@@ -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,
.get_name = HTMLIFrame_get_name,
.invoke = HTMLIFrame_invoke,
.bind_to_tree = HTMLIFrame_bind_to_tree,
};
......@@ -1612,6 +1611,7 @@ static const event_target_vtbl_t HTMLIFrame_event_target_vtbl = {
.traverse = HTMLIFrame_traverse,
.unlink = HTMLIFrame_unlink,
.get_dispid = HTMLIFrame_get_dispid,
.get_name = HTMLIFrame_get_name,
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
......
......@@ -719,9 +719,9 @@ static HRESULT HTMLObjectElement_get_dispid(DispatchEx *dispex, BSTR name, DWORD
return get_plugin_dispid(&This->plugin_container, name, dispid);
}
static HRESULT HTMLObjectElement_dispex_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
static HRESULT HTMLObjectElement_dispex_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLObjectElement *This = impl_from_HTMLDOMNode(iface);
HTMLObjectElement *This = impl_from_DispatchEx(dispex);
FIXME("(%p)->(%lx %p)\n", This, id, name);
......@@ -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,
.get_name = HTMLObjectElement_dispex_get_name,
.invoke = HTMLObjectElement_invoke,
};
......@@ -757,6 +756,7 @@ static const event_target_vtbl_t HTMLObjectElement_event_target_vtbl = {
.traverse = HTMLObjectElement_traverse,
.unlink = HTMLObjectElement_unlink,
.get_dispid = HTMLObjectElement_get_dispid,
.get_name = HTMLObjectElement_dispex_get_name,
},
HTMLELEMENT_EVENT_TARGET_VTBL_ENTRIES,
};
......
......@@ -1373,7 +1373,7 @@ static HRESULT HTMLSelectElement_get_dispid(DispatchEx *dispex, BSTR name, DWORD
return S_OK;
}
static HRESULT HTMLSelectElement_dispex_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
static HRESULT HTMLSelectElement_dispex_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
DWORD idx = id - DISPID_OPTIONCOL_0;
WCHAR buf[11];
......@@ -1427,7 +1427,6 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = {
.get_attr_col = HTMLElement_get_attr_col,
.put_disabled = HTMLSelectElementImpl_put_disabled,
.get_disabled = HTMLSelectElementImpl_get_disabled,
.get_name = HTMLSelectElement_dispex_get_name,
.invoke = HTMLSelectElement_invoke,
};
......@@ -1439,6 +1438,7 @@ static const event_target_vtbl_t HTMLSelectElement_event_target_vtbl = {
.traverse = HTMLSelectElement_traverse,
.unlink = HTMLSelectElement_unlink,
.get_dispid = HTMLSelectElement_get_dispid,
.get_name = HTMLSelectElement_dispex_get_name,
},
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 (*get_name)(HTMLDOMNode*,DISPID,BSTR*);
HRESULT (*invoke)(HTMLDOMNode*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT (*bind_to_tree)(HTMLDOMNode*);
BOOL (*is_text_edit)(HTMLDOMNode*);
......@@ -1209,7 +1208,6 @@ void HTMLDOMNode_init_dispex_info(dispex_data_t*,compat_mode_t);
void *HTMLElement_query_interface(DispatchEx*,REFIID);
void HTMLElement_destructor(DispatchEx*);
HRESULT HTMLElement_get_name(DispatchEx*,DISPID,BSTR*);
HRESULT HTMLElement_invoke(DispatchEx*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT HTMLElement_populate_props(DispatchEx*);
HRESULT HTMLElement_clone(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
......
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