mshtml: Add stub for HTMLElement classList property.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2021-07-19 15:53:15 +03:00 committed by Alexandre Julliard
parent dc8ef75904
commit e3263aa01d
4 changed files with 104 additions and 0 deletions

View File

@ -6065,6 +6065,8 @@ HRESULT HTMLElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
*ppv = &This->IProvideMultipleClassInfo_iface;
}else if(IsEqualGUID(&IID_IProvideMultipleClassInfo, riid)) {
*ppv = &This->IProvideMultipleClassInfo_iface;
}else if(IsEqualGUID(&IID_IWineHTMLElementPrivate, riid)) {
*ppv = &This->IWineHTMLElementPrivate_iface;
}else {
return HTMLDOMNode_QI(&This->node, riid, ppv);
}
@ -6366,7 +6368,10 @@ void HTMLElement_init_dispex_info(dispex_data_t *info, compat_mode_t mode)
}
if(mode >= COMPAT_MODE_IE10)
{
dispex_info_add_interface(info, IHTMLElement7_tid, NULL);
dispex_info_add_interface(info, IWineHTMLElementPrivate_tid, NULL);
}
}
static const tid_t HTMLElement_iface_tids[] = {
@ -6390,6 +6395,88 @@ static event_target_vtbl_t HTMLElement_event_target_vtbl = {
HTMLElement_set_current_event
};
static inline HTMLElement *impl_from_IWineHTMLElementPrivateVtbl(IWineHTMLElementPrivate *iface)
{
return CONTAINING_RECORD(iface, HTMLElement, IWineHTMLElementPrivate_iface);
}
static HRESULT WINAPI htmlelement_private_QueryInterface(IWineHTMLElementPrivate *iface,
REFIID riid, void **ppv)
{
HTMLElement *This = impl_from_IWineHTMLElementPrivateVtbl(iface);
return IHTMLElement_QueryInterface(&This->IHTMLElement_iface, riid, ppv);
}
static ULONG WINAPI htmlelement_private_AddRef(IWineHTMLElementPrivate *iface)
{
HTMLElement *This = impl_from_IWineHTMLElementPrivateVtbl(iface);
return IHTMLElement_AddRef(&This->IHTMLElement_iface);
}
static ULONG WINAPI htmlelement_private_Release(IWineHTMLElementPrivate *iface)
{
HTMLElement *This = impl_from_IWineHTMLElementPrivateVtbl(iface);
return IHTMLElement_Release(&This->IHTMLElement_iface);
}
static HRESULT WINAPI htmlelement_private_GetTypeInfoCount(IWineHTMLElementPrivate *iface, UINT *pctinfo)
{
HTMLElement *This = impl_from_IWineHTMLElementPrivateVtbl(iface);
return HTMLElement_GetTypeInfoCount(&This->IHTMLElement_iface, pctinfo);
}
static HRESULT WINAPI htmlelement_private_GetTypeInfo(IWineHTMLElementPrivate *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
HTMLElement *This = impl_from_IWineHTMLElementPrivateVtbl(iface);
return HTMLElement_GetTypeInfo(&This->IHTMLElement_iface, iTInfo, lcid, ppTInfo);
}
static HRESULT WINAPI htmlelement_private_GetIDsOfNames(IWineHTMLElementPrivate *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
HTMLElement *This = impl_from_IWineHTMLElementPrivateVtbl(iface);
return HTMLElement_GetIDsOfNames(&This->IHTMLElement_iface, riid, rgszNames, cNames, lcid,
rgDispId);
}
static HRESULT WINAPI htmlelement_private_Invoke(IWineHTMLElementPrivate *iface, DISPID dispIdMember,
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
HTMLElement *This = impl_from_IWineHTMLElementPrivateVtbl(iface);
return HTMLElement_Invoke(&This->IHTMLElement_iface, dispIdMember, riid, lcid, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr);
}
static HRESULT WINAPI htmlelement_private_get_classList(IWineHTMLElementPrivate *iface, IDispatch **class_list)
{
FIXME("iface %p, class_list %p stub.\n", iface, class_list);
*class_list = NULL;
return S_OK;
}
static const IWineHTMLElementPrivateVtbl WineHTMLElementPrivateVtbl = {
htmlelement_private_QueryInterface,
htmlelement_private_AddRef,
htmlelement_private_Release,
htmlelement_private_GetTypeInfoCount,
htmlelement_private_GetTypeInfo,
htmlelement_private_GetIDsOfNames,
htmlelement_private_Invoke,
htmlelement_private_get_classList,
};
static dispex_static_data_t HTMLElement_dispex = {
&HTMLElement_event_target_vtbl.dispex_vtbl,
DispHTMLUnknownElement_tid,
@ -6409,6 +6496,7 @@ void HTMLElement_Init(HTMLElement *This, HTMLDocumentNode *doc, nsIDOMElement *n
This->IElementSelector_iface.lpVtbl = &ElementSelectorVtbl;
This->IElementTraversal_iface.lpVtbl = &ElementTraversalVtbl;
This->IProvideMultipleClassInfo_iface.lpVtbl = &ProvideMultipleClassInfoVtbl;
This->IWineHTMLElementPrivate_iface.lpVtbl = &WineHTMLElementPrivateVtbl;
if(dispex_data && !dispex_data->vtbl)
dispex_data->vtbl = &HTMLElement_event_target_vtbl.dispex_vtbl;

View File

@ -273,6 +273,7 @@ typedef struct EventTarget EventTarget;
XIID(ISVGTextContentElement)
#define PRIVATE_TID_LIST \
XIID(IWineHTMLElementPrivate) \
XIID(IWineHTMLWindowPrivate) \
XIID(IWineMSHTMLConsole)
@ -828,6 +829,7 @@ typedef struct {
IElementSelector IElementSelector_iface;
IElementTraversal IElementTraversal_iface;
IProvideMultipleClassInfo IProvideMultipleClassInfo_iface;
IWineHTMLElementPrivate IWineHTMLElementPrivate_iface;
nsIDOMElement *dom_element; /* NULL for legacy comments represented as HTML elements */
nsIDOMHTMLElement *html_element; /* NULL for non-HTML elements (like SVG elements) */

View File

@ -89,4 +89,17 @@ interface IWineHTMLWindowPrivate : IDispatch
HRESULT console([retval, out] IDispatch **console);
}
[
odl,
oleautomation,
dual,
hidden,
uuid(465908fd-f394-489f-b7a3-4c00fbbe9eec)
]
interface IWineHTMLElementPrivate : IDispatch
{
[propget, id(1)]
HRESULT classList([retval, out] IDispatch **class_list);
}
} /* library MSHTML_private */

View File

@ -57,6 +57,7 @@ sync_test("elem_props", function() {
test_exposed("sheet", v >= 9);
test_exposed("readyState", v < 11);
test_exposed("styleSheet", v < 11);
test_exposed("classList", v >= 10);
});
sync_test("doc_props", function() {