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

mshtml: Implement GetMemberName for custom props.

parent 3ea5a319
......@@ -1825,6 +1825,12 @@ static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BS
if(!ensure_real_info(This))
return E_OUTOFMEMORY;
if(is_custom_dispid(id)) {
if(This->info->desc->vtbl && This->info->desc->vtbl->get_name)
return This->info->desc->vtbl->get_name(This, id, pbstrName);
return DISP_E_MEMBERNOTFOUND;
}
if(is_dynamic_dispid(id)) {
DWORD idx = id - DISPID_DYNPROP_0;
......
......@@ -889,6 +889,7 @@ static const NodeImplVtbl HTMLAnchorElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLAnchorElement_traverse,
HTMLAnchorElement_unlink
};
......
......@@ -993,6 +993,7 @@ static const NodeImplVtbl HTMLBodyElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLBodyElement_traverse,
HTMLBodyElement_unlink,
HTMLBodyElement_is_text_edit,
......
......@@ -5800,6 +5800,7 @@ static const NodeImplVtbl HTMLDocumentNodeImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLDocumentNode_traverse,
HTMLDocumentNode_unlink
};
......@@ -5823,6 +5824,17 @@ static inline HTMLDocumentNode *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLDocumentNode, node.event_target.dispex);
}
static HRESULT HTMLDocumentNode_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLDocumentNode *This = impl_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
if(!This->nsdoc || idx >= This->elem_vars_cnt)
return DISP_E_MEMBERNOTFOUND;
return (*name = SysAllocString(This->elem_vars[idx])) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLDocumentNode_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -5920,6 +5932,7 @@ static const event_target_vtbl_t HTMLDocumentNode_event_target_vtbl = {
{
NULL,
NULL,
HTMLDocumentNode_get_name,
HTMLDocumentNode_invoke,
NULL,
HTMLDocumentNode_get_compat_mode,
......
......@@ -1107,6 +1107,21 @@ static HRESULT HTMLRectCollection_get_dispid(DispatchEx *dispex, BSTR name, DWOR
return S_OK;
}
static HRESULT HTMLRectCollection_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLRectCollection *This = HTMLRectCollection_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
UINT32 len = 0;
WCHAR buf[11];
nsIDOMClientRectList_GetLength(This->rect_list, &len);
if(idx >= len)
return DISP_E_MEMBERNOTFOUND;
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", idx);
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLRectCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -1148,6 +1163,7 @@ static HRESULT HTMLRectCollection_invoke(DispatchEx *dispex, DISPID id, LCID lci
static const dispex_static_data_vtbl_t HTMLRectCollection_dispex_vtbl = {
NULL,
HTMLRectCollection_get_dispid,
HTMLRectCollection_get_name,
HTMLRectCollection_invoke,
NULL
};
......@@ -6808,6 +6824,17 @@ static HRESULT HTMLElement_get_dispid(DispatchEx *dispex, BSTR name,
return DISP_E_UNKNOWNNAME;
}
static 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;
}
static HRESULT HTMLElement_invoke(DispatchEx *dispex, DISPID id, LCID lcid,
WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei,
IServiceProvider *caller)
......@@ -7181,6 +7208,7 @@ static event_target_vtbl_t HTMLElement_event_target_vtbl = {
{
NULL,
HTMLElement_get_dispid,
HTMLElement_get_name,
HTMLElement_invoke,
NULL,
NULL,
......@@ -7852,6 +7880,16 @@ static HRESULT HTMLFiltersCollection_get_dispid(DispatchEx *dispex, BSTR name, D
return S_OK;
}
static HRESULT HTMLFiltersCollection_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
WCHAR buf[11];
UINT len;
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", idx);
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLFiltersCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -7868,6 +7906,7 @@ static HRESULT HTMLFiltersCollection_invoke(DispatchEx *dispex, DISPID id, LCID
static const dispex_static_data_vtbl_t HTMLFiltersCollection_dispex_vtbl = {
NULL,
HTMLFiltersCollection_get_dispid,
HTMLFiltersCollection_get_name,
HTMLFiltersCollection_invoke,
NULL
};
......@@ -8577,6 +8616,15 @@ static HRESULT HTMLAttributeCollection_get_dispid(DispatchEx *dispex, BSTR name,
return S_OK;
}
static HRESULT HTMLAttributeCollection_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLAttributeCollection *This = HTMLAttributeCollection_from_DispatchEx(dispex);
FIXME("(%p)->(%lx %p)\n", This, id, name);
return E_NOTIMPL;
}
static HRESULT HTMLAttributeCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid,
WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -8614,6 +8662,7 @@ static HRESULT HTMLAttributeCollection_invoke(DispatchEx *dispex, DISPID id, LCI
static const dispex_static_data_vtbl_t HTMLAttributeCollection_dispex_vtbl = {
NULL,
HTMLAttributeCollection_get_dispid,
HTMLAttributeCollection_get_name,
HTMLAttributeCollection_invoke,
NULL
};
......
......@@ -581,6 +581,20 @@ static HRESULT HTMLElementCollection_get_dispid(DispatchEx *dispex, BSTR name, D
return S_OK;
}
static HRESULT HTMLElementCollection_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLElementCollection *This = impl_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
WCHAR buf[11];
UINT len;
if(idx >= This->len)
return DISP_E_MEMBERNOTFOUND;
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", idx);
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLElementCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -610,6 +624,7 @@ static HRESULT HTMLElementCollection_invoke(DispatchEx *dispex, DISPID id, LCID
static const dispex_static_data_vtbl_t HTMLElementColection_dispex_vtbl = {
NULL,
HTMLElementCollection_get_dispid,
HTMLElementCollection_get_name,
HTMLElementCollection_invoke,
NULL
};
......
......@@ -898,6 +898,31 @@ static HRESULT HTMLFormElement_get_dispid(HTMLDOMNode *iface,
return hres;
}
static HRESULT HTMLFormElement_dispex_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
{
HTMLFormElement *This = impl_from_HTMLDOMNode(iface);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
nsIDOMHTMLCollection *elements;
nsresult nsres;
UINT32 len = 0;
WCHAR buf[11];
nsres = nsIDOMHTMLFormElement_GetElements(This->nsform, &elements);
if(NS_FAILED(nsres))
return map_nsresult(nsres);
nsres = nsIDOMHTMLCollection_GetLength(elements, &len);
nsIDOMHTMLCollection_Release(elements);
if(NS_FAILED(nsres))
return map_nsresult(nsres);
if(idx >= len)
return DISP_E_MEMBERNOTFOUND;
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", idx);
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLFormElement_invoke(HTMLDOMNode *iface,
DISPID id, LCID lcid, WORD flags, DISPPARAMS *params, VARIANT *res,
EXCEPINFO *ei, IServiceProvider *caller)
......@@ -967,6 +992,7 @@ static const NodeImplVtbl HTMLFormElementImplVtbl = {
NULL,
NULL,
HTMLFormElement_get_dispid,
HTMLFormElement_dispex_get_name,
HTMLFormElement_invoke,
NULL,
HTMLFormElement_traverse,
......
......@@ -942,6 +942,19 @@ static HRESULT HTMLFrameElement_get_dispid(HTMLDOMNode *iface, BSTR name,
return search_window_props(This->framebase.content_window->base.inner_window, name, grfdex, pid);
}
static HRESULT HTMLFrameElement_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
{
HTMLFrameElement *This = frame_from_HTMLDOMNode(iface);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
if(!This->framebase.content_window ||
idx >= This->framebase.content_window->base.inner_window->global_prop_cnt)
return DISP_E_MEMBERNOTFOUND;
*name = SysAllocString(This->framebase.content_window->base.inner_window->global_props[idx].name);
return *name ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLFrameElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid,
WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -1008,6 +1021,7 @@ static const NodeImplVtbl HTMLFrameElementImplVtbl = {
HTMLFrameElement_get_document,
HTMLFrameElement_get_readystate,
HTMLFrameElement_get_dispid,
HTMLFrameElement_get_name,
HTMLFrameElement_invoke,
HTMLFrameElement_bind_to_tree,
HTMLFrameElement_traverse,
......@@ -1514,6 +1528,19 @@ static HRESULT HTMLIFrame_get_dispid(HTMLDOMNode *iface, BSTR name,
return search_window_props(This->framebase.content_window->base.inner_window, name, grfdex, pid);
}
static HRESULT HTMLIFrame_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
{
HTMLIFrame *This = iframe_from_HTMLDOMNode(iface);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
if(!This->framebase.content_window ||
idx >= This->framebase.content_window->base.inner_window->global_prop_cnt)
return DISP_E_MEMBERNOTFOUND;
*name = SysAllocString(This->framebase.content_window->base.inner_window->global_props[idx].name);
return *name ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLIFrame_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid,
WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -1587,6 +1614,7 @@ static const NodeImplVtbl HTMLIFrameImplVtbl = {
HTMLIFrame_get_document,
HTMLIFrame_get_readystate,
HTMLIFrame_get_dispid,
HTMLIFrame_get_name,
HTMLIFrame_invoke,
HTMLIFrame_bind_to_tree,
HTMLIFrame_traverse,
......
......@@ -358,6 +358,7 @@ static const NodeImplVtbl HTMLHtmlElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLHtmlElement_is_settable
};
......
......@@ -720,6 +720,7 @@ static const NodeImplVtbl HTMLImgElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLImgElement_traverse,
HTMLImgElement_unlink
};
......
......@@ -1429,6 +1429,7 @@ static const NodeImplVtbl HTMLInputElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLInputElement_traverse,
HTMLInputElement_unlink,
HTMLInputElement_is_text_edit
......@@ -1973,6 +1974,7 @@ static const NodeImplVtbl HTMLButtonElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLButtonElement_traverse,
HTMLButtonElement_unlink,
HTMLButtonElement_is_text_edit
......
......@@ -436,6 +436,7 @@ static const NodeImplVtbl HTMLLinkElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLLinkElement_traverse,
HTMLLinkElement_unlink
};
......
......@@ -386,6 +386,21 @@ static HRESULT HTMLDOMChildrenCollection_get_dispid(DispatchEx *dispex, BSTR nam
return S_OK;
}
static HRESULT HTMLDOMChildrenCollection_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLDOMChildrenCollection *This = impl_from_DispatchEx(dispex);
DWORD idx = id - DISPID_CHILDCOL_0;
UINT32 len = 0;
WCHAR buf[11];
nsIDOMNodeList_GetLength(This->nslist, &len);
if(idx >= len)
return DISP_E_MEMBERNOTFOUND;
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", idx);
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLDOMChildrenCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -419,6 +434,7 @@ static HRESULT HTMLDOMChildrenCollection_invoke(DispatchEx *dispex, DISPID id, L
static const dispex_static_data_vtbl_t HTMLDOMChildrenCollection_dispex_vtbl = {
NULL,
HTMLDOMChildrenCollection_get_dispid,
HTMLDOMChildrenCollection_get_name,
HTMLDOMChildrenCollection_invoke,
NULL
};
......
......@@ -709,6 +709,15 @@ static HRESULT HTMLObjectElement_get_dispid(HTMLDOMNode *iface, BSTR name,
return get_plugin_dispid(&This->plugin_container, name, pid);
}
static HRESULT HTMLObjectElement_dispex_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
{
HTMLObjectElement *This = impl_from_HTMLDOMNode(iface);
FIXME("(%p)->(%lx %p)\n", This, id, name);
return E_NOTIMPL;
}
static HRESULT HTMLObjectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid,
WORD flags, DISPPARAMS *params, VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -753,6 +762,7 @@ static const NodeImplVtbl HTMLObjectElementImplVtbl = {
NULL,
HTMLObjectElement_get_readystate,
HTMLObjectElement_get_dispid,
HTMLObjectElement_dispex_get_name,
HTMLObjectElement_invoke,
NULL,
HTMLObjectElement_traverse,
......
......@@ -447,6 +447,7 @@ static const NodeImplVtbl HTMLScriptElementImplVtbl = {
HTMLScriptElement_get_readystate,
NULL,
NULL,
NULL,
HTMLScriptElement_bind_to_tree,
HTMLScriptElement_traverse,
HTMLScriptElement_unlink
......
......@@ -406,6 +406,7 @@ static const NodeImplVtbl HTMLOptionElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLOptionElement_traverse,
HTMLOptionElement_unlink
};
......@@ -1400,6 +1401,19 @@ static HRESULT HTMLSelectElement_get_dispid(HTMLDOMNode *iface, BSTR name, DWORD
return S_OK;
}
static HRESULT HTMLSelectElement_dispex_get_name(HTMLDOMNode *iface, DISPID id, BSTR *name)
{
DWORD idx = id - DISPID_OPTIONCOL_0;
WCHAR buf[11];
UINT len;
if(idx > MSHTML_CUSTOM_DISPID_CNT)
return DISP_E_MEMBERNOTFOUND;
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", idx);
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLSelectElement_invoke(HTMLDOMNode *iface, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -1467,6 +1481,7 @@ static const NodeImplVtbl HTMLSelectElementImplVtbl = {
NULL,
NULL,
HTMLSelectElement_get_dispid,
HTMLSelectElement_dispex_get_name,
HTMLSelectElement_invoke,
NULL,
HTMLSelectElement_traverse,
......
......@@ -936,6 +936,17 @@ static HRESULT HTMLStorage_get_dispid(DispatchEx *dispex, BSTR name, DWORD flags
return get_prop(This, name, dispid);
}
static HRESULT HTMLStorage_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLStorage *This = impl_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
if(idx >= This->num_props)
return DISP_E_MEMBERNOTFOUND;
return (*name = SysAllocString(This->props[idx])) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLStorage_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -1002,6 +1013,7 @@ static HRESULT HTMLStorage_delete(DispatchEx *dispex, DISPID id)
static const dispex_static_data_vtbl_t HTMLStorage_dispex_vtbl = {
NULL,
HTMLStorage_get_dispid,
HTMLStorage_get_name,
HTMLStorage_invoke,
HTMLStorage_delete,
NULL
......
......@@ -453,6 +453,7 @@ static const NodeImplVtbl HTMLStyleElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLStyleElement_traverse,
HTMLStyleElement_unlink
};
......
......@@ -410,6 +410,21 @@ static HRESULT HTMLStyleSheetRulesCollection_get_dispid(DispatchEx *dispex, BSTR
return S_OK;
}
static HRESULT HTMLStyleSheetRulesCollection_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLStyleSheetRulesCollection *This = HTMLStyleSheetRulesCollection_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
UINT32 len = 0;
WCHAR buf[11];
nsIDOMCSSRuleList_GetLength(This->nslist, &len);
if(idx >= len)
return DISP_E_MEMBERNOTFOUND;
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", idx);
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLStyleSheetRulesCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -453,6 +468,7 @@ static HRESULT HTMLStyleSheetRulesCollection_invoke(DispatchEx *dispex, DISPID i
static const dispex_static_data_vtbl_t HTMLStyleSheetRulesCollection_dispex_vtbl = {
NULL,
HTMLStyleSheetRulesCollection_get_dispid,
HTMLStyleSheetRulesCollection_get_name,
HTMLStyleSheetRulesCollection_invoke
};
static const tid_t HTMLStyleSheetRulesCollection_iface_tids[] = {
......@@ -821,6 +837,21 @@ static HRESULT HTMLStyleSheetsCollection_get_dispid(DispatchEx *dispex, BSTR nam
return S_OK;
}
static HRESULT HTMLStyleSheetsCollection_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLStyleSheetsCollection *This = HTMLStyleSheetsCollection_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
UINT32 len = 0;
WCHAR buf[11];
nsIDOMStyleSheetList_GetLength(This->nslist, &len);
if(idx >= len)
return DISP_E_MEMBERNOTFOUND;
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", idx);
return (*name = SysAllocStringLen(buf, len)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLStyleSheetsCollection_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -864,6 +895,7 @@ static HRESULT HTMLStyleSheetsCollection_invoke(DispatchEx *dispex, DISPID id, L
static const dispex_static_data_vtbl_t HTMLStyleSheetsCollection_dispex_vtbl = {
NULL,
HTMLStyleSheetsCollection_get_dispid,
HTMLStyleSheetsCollection_get_name,
HTMLStyleSheetsCollection_invoke
};
static const tid_t HTMLStyleSheetsCollection_iface_tids[] = {
......
......@@ -509,6 +509,7 @@ static const NodeImplVtbl HTMLTableCellImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLTableCell_traverse,
HTMLTableCell_unlink
};
......@@ -954,6 +955,7 @@ static const NodeImplVtbl HTMLTableRowImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLTableRow_traverse,
HTMLTableRow_unlink
};
......@@ -1985,6 +1987,7 @@ static const NodeImplVtbl HTMLTableImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLTable_traverse,
HTMLTable_unlink
};
......
......@@ -467,6 +467,7 @@ static const NodeImplVtbl HTMLTextAreaElementImplVtbl = {
NULL,
NULL,
NULL,
NULL,
HTMLTextAreaElement_traverse,
HTMLTextAreaElement_unlink,
HTMLTextAreaElement_is_text_edit
......
......@@ -3754,6 +3754,17 @@ static inline HTMLInnerWindow *impl_from_DispatchEx(DispatchEx *iface)
return CONTAINING_RECORD(iface, HTMLInnerWindow, event_target.dispex);
}
static HRESULT HTMLWindow_get_name(DispatchEx *dispex, DISPID id, BSTR *name)
{
HTMLInnerWindow *This = impl_from_DispatchEx(dispex);
DWORD idx = id - MSHTML_DISPID_CUSTOM_MIN;
if(idx >= This->global_prop_cnt)
return DISP_E_MEMBERNOTFOUND;
return (*name = SysAllocString(This->global_props[idx].name)) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT HTMLWindow_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD flags, DISPPARAMS *params,
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
{
......@@ -3953,6 +3964,7 @@ static const event_target_vtbl_t HTMLWindow_event_target_vtbl = {
{
NULL,
NULL,
HTMLWindow_get_name,
HTMLWindow_invoke,
NULL,
HTMLWindow_get_compat_mode,
......
......@@ -333,6 +333,7 @@ typedef struct DispatchEx DispatchEx;
typedef struct {
HRESULT (*value)(DispatchEx*,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT (*get_dispid)(DispatchEx*,BSTR,DWORD,DISPID*);
HRESULT (*get_name)(DispatchEx*,DISPID,BSTR*);
HRESULT (*invoke)(DispatchEx*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT (*delete)(DispatchEx*,DISPID);
compat_mode_t (*get_compat_mode)(DispatchEx*);
......@@ -804,6 +805,7 @@ typedef struct {
HRESULT (*get_document)(HTMLDOMNode*,IDispatch**);
HRESULT (*get_readystate)(HTMLDOMNode*,BSTR*);
HRESULT (*get_dispid)(HTMLDOMNode*,BSTR,DWORD,DISPID*);
HRESULT (*get_name)(HTMLDOMNode*,DISPID,BSTR*);
HRESULT (*invoke)(HTMLDOMNode*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
HRESULT (*bind_to_tree)(HTMLDOMNode*);
void (*traverse)(HTMLDOMNode*,nsCycleCollectionTraversalCallback*);
......
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