mshtml: Added IHTMLLabelElement stub implementation.
This commit is contained in:
parent
0f9885448e
commit
99a86766a0
@ -45,6 +45,7 @@ static const WCHAR headW[] = {'H','E','A','D',0};
|
|||||||
static const WCHAR iframeW[] = {'I','F','R','A','M','E',0};
|
static const WCHAR iframeW[] = {'I','F','R','A','M','E',0};
|
||||||
static const WCHAR imgW[] = {'I','M','G',0};
|
static const WCHAR imgW[] = {'I','M','G',0};
|
||||||
static const WCHAR inputW[] = {'I','N','P','U','T',0};
|
static const WCHAR inputW[] = {'I','N','P','U','T',0};
|
||||||
|
static const WCHAR labelW[] = {'L','A','B','E','L',0};
|
||||||
static const WCHAR linkW[] = {'L','I','N','K',0};
|
static const WCHAR linkW[] = {'L','I','N','K',0};
|
||||||
static const WCHAR metaW[] = {'M','E','T','A',0};
|
static const WCHAR metaW[] = {'M','E','T','A',0};
|
||||||
static const WCHAR objectW[] = {'O','B','J','E','C','T',0};
|
static const WCHAR objectW[] = {'O','B','J','E','C','T',0};
|
||||||
@ -73,6 +74,7 @@ static const tag_desc_t tag_descs[] = {
|
|||||||
{iframeW, HTMLIFrame_Create},
|
{iframeW, HTMLIFrame_Create},
|
||||||
{imgW, HTMLImgElement_Create},
|
{imgW, HTMLImgElement_Create},
|
||||||
{inputW, HTMLInputElement_Create},
|
{inputW, HTMLInputElement_Create},
|
||||||
|
{labelW, HTMLLabelElement_Create},
|
||||||
{linkW, HTMLLinkElement_Create},
|
{linkW, HTMLLinkElement_Create},
|
||||||
{metaW, HTMLMetaElement_Create},
|
{metaW, HTMLMetaElement_Create},
|
||||||
{objectW, HTMLObjectElement_Create},
|
{objectW, HTMLObjectElement_Create},
|
||||||
|
@ -1239,3 +1239,174 @@ HRESULT HTMLInputElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem
|
|||||||
*elem = &ret->element;
|
*elem = &ret->element;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
HTMLElement element;
|
||||||
|
|
||||||
|
IHTMLLabelElement IHTMLLabelElement_iface;
|
||||||
|
} HTMLLabelElement;
|
||||||
|
|
||||||
|
static inline HTMLLabelElement *impl_from_IHTMLLabelElement(IHTMLLabelElement *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, HTMLLabelElement, IHTMLLabelElement_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI HTMLLabelElement_QueryInterface(IHTMLLabelElement *iface,
|
||||||
|
REFIID riid, void **ppv)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
|
||||||
|
return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI HTMLLabelElement_AddRef(IHTMLLabelElement *iface)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
|
||||||
|
return IHTMLDOMNode_AddRef(&This->element.node.IHTMLDOMNode_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI HTMLLabelElement_Release(IHTMLLabelElement *iface)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
|
||||||
|
return IHTMLDOMNode_Release(&This->element.node.IHTMLDOMNode_iface);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI HTMLLabelElement_GetTypeInfoCount(IHTMLLabelElement *iface, UINT *pctinfo)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
|
||||||
|
return IDispatchEx_GetTypeInfoCount(&This->element.node.dispex.IDispatchEx_iface, pctinfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI HTMLLabelElement_GetTypeInfo(IHTMLLabelElement *iface, UINT iTInfo,
|
||||||
|
LCID lcid, ITypeInfo **ppTInfo)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
|
||||||
|
return IDispatchEx_GetTypeInfo(&This->element.node.dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI HTMLLabelElement_GetIDsOfNames(IHTMLLabelElement *iface, REFIID riid,
|
||||||
|
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
|
||||||
|
return IDispatchEx_GetIDsOfNames(&This->element.node.dispex.IDispatchEx_iface, riid, rgszNames,
|
||||||
|
cNames, lcid, rgDispId);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI HTMLLabelElement_Invoke(IHTMLLabelElement *iface, DISPID dispIdMember,
|
||||||
|
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
||||||
|
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
|
||||||
|
return IDispatchEx_Invoke(&This->element.node.dispex.IDispatchEx_iface, dispIdMember, riid,
|
||||||
|
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI HTMLLabelElement_put_htmlFor(IHTMLLabelElement *iface, BSTR v)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI HTMLLabelElement_get_htmlFor(IHTMLLabelElement *iface, BSTR *p)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
FIXME("(%p)->(%p)\n", This, p);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI HTMLLabelElement_put_accessKey(IHTMLLabelElement *iface, BSTR v)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI HTMLLabelElement_get_accessKey(IHTMLLabelElement *iface, BSTR *p)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = impl_from_IHTMLLabelElement(iface);
|
||||||
|
FIXME("(%p)->(%p)\n", This, p);
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const IHTMLLabelElementVtbl HTMLLabelElementVtbl = {
|
||||||
|
HTMLLabelElement_QueryInterface,
|
||||||
|
HTMLLabelElement_AddRef,
|
||||||
|
HTMLLabelElement_Release,
|
||||||
|
HTMLLabelElement_GetTypeInfoCount,
|
||||||
|
HTMLLabelElement_GetTypeInfo,
|
||||||
|
HTMLLabelElement_GetIDsOfNames,
|
||||||
|
HTMLLabelElement_Invoke,
|
||||||
|
HTMLLabelElement_put_htmlFor,
|
||||||
|
HTMLLabelElement_get_htmlFor,
|
||||||
|
HTMLLabelElement_put_accessKey,
|
||||||
|
HTMLLabelElement_get_accessKey
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline HTMLLabelElement *label_from_HTMLDOMNode(HTMLDOMNode *iface)
|
||||||
|
{
|
||||||
|
return CONTAINING_RECORD(iface, HTMLLabelElement, element.node);
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT HTMLLabelElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *This = label_from_HTMLDOMNode(iface);
|
||||||
|
|
||||||
|
*ppv = NULL;
|
||||||
|
|
||||||
|
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||||
|
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||||
|
*ppv = &This->IHTMLLabelElement_iface;
|
||||||
|
}else if(IsEqualGUID(&IID_IHTMLLabelElement, riid)) {
|
||||||
|
TRACE("(%p)->(IID_IHTMLLabelElement %p)\n", This, ppv);
|
||||||
|
*ppv = &This->IHTMLLabelElement_iface;
|
||||||
|
}else {
|
||||||
|
return HTMLElement_QI(&This->element.node, riid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
|
IUnknown_AddRef((IUnknown*)*ppv);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const NodeImplVtbl HTMLLabelElementImplVtbl = {
|
||||||
|
HTMLLabelElement_QI,
|
||||||
|
HTMLElement_destructor,
|
||||||
|
HTMLElement_clone,
|
||||||
|
HTMLElement_handle_event,
|
||||||
|
HTMLElement_get_attr_col,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const tid_t HTMLLabelElement_iface_tids[] = {
|
||||||
|
HTMLELEMENT_TIDS,
|
||||||
|
IHTMLLabelElement_tid,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
|
static dispex_static_data_t HTMLLabelElement_dispex = {
|
||||||
|
NULL,
|
||||||
|
DispHTMLLabelElement_tid,
|
||||||
|
NULL,
|
||||||
|
HTMLLabelElement_iface_tids
|
||||||
|
};
|
||||||
|
|
||||||
|
HRESULT HTMLLabelElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem, HTMLElement **elem)
|
||||||
|
{
|
||||||
|
HTMLLabelElement *ret;
|
||||||
|
|
||||||
|
ret = heap_alloc_zero(sizeof(*ret));
|
||||||
|
if(!ret)
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
ret->IHTMLLabelElement_iface.lpVtbl = &HTMLLabelElementVtbl;
|
||||||
|
ret->element.node.vtbl = &HTMLLabelElementImplVtbl;
|
||||||
|
|
||||||
|
HTMLElement_Init(&ret->element, doc, nselem, &HTMLLabelElement_dispex);
|
||||||
|
*elem = &ret->element;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
@ -92,6 +92,7 @@ typedef struct event_target_t event_target_t;
|
|||||||
XDIID(DispHTMLIFrame) \
|
XDIID(DispHTMLIFrame) \
|
||||||
XDIID(DispHTMLImg) \
|
XDIID(DispHTMLImg) \
|
||||||
XDIID(DispHTMLInputElement) \
|
XDIID(DispHTMLInputElement) \
|
||||||
|
XDIID(DispHTMLLabelElement) \
|
||||||
XDIID(DispHTMLLinkElement) \
|
XDIID(DispHTMLLinkElement) \
|
||||||
XDIID(DispHTMLLocation) \
|
XDIID(DispHTMLLocation) \
|
||||||
XDIID(DispHTMLMetaElement) \
|
XDIID(DispHTMLMetaElement) \
|
||||||
@ -152,6 +153,7 @@ typedef struct event_target_t event_target_t;
|
|||||||
XIID(IHTMLImageElementFactory) \
|
XIID(IHTMLImageElementFactory) \
|
||||||
XIID(IHTMLImgElement) \
|
XIID(IHTMLImgElement) \
|
||||||
XIID(IHTMLInputElement) \
|
XIID(IHTMLInputElement) \
|
||||||
|
XIID(IHTMLLabelElement) \
|
||||||
XIID(IHTMLLinkElement) \
|
XIID(IHTMLLinkElement) \
|
||||||
XIID(IHTMLLocation) \
|
XIID(IHTMLLocation) \
|
||||||
XIID(IHTMLMetaElement) \
|
XIID(IHTMLMetaElement) \
|
||||||
@ -873,6 +875,7 @@ HRESULT HTMLIFrame_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DE
|
|||||||
HRESULT HTMLStyleElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
HRESULT HTMLStyleElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
||||||
HRESULT HTMLImgElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
HRESULT HTMLImgElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
||||||
HRESULT HTMLInputElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
HRESULT HTMLInputElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
||||||
|
HRESULT HTMLLabelElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
||||||
HRESULT HTMLLinkElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
HRESULT HTMLLinkElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
||||||
HRESULT HTMLMetaElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
HRESULT HTMLMetaElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
||||||
HRESULT HTMLObjectElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
HRESULT HTMLObjectElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**) DECLSPEC_HIDDEN;
|
||||||
|
@ -51,6 +51,7 @@ static const char elem_test_str[] =
|
|||||||
"<link id=\"linkid\"></head>"
|
"<link id=\"linkid\"></head>"
|
||||||
"<body onload=\"Testing()\">text test<!-- a comment -->"
|
"<body onload=\"Testing()\">text test<!-- a comment -->"
|
||||||
"<a id=\"a\" href=\"http://test\" name=\"x\">link</a>"
|
"<a id=\"a\" href=\"http://test\" name=\"x\">link</a>"
|
||||||
|
"<label for=\"in\" id=\"labelid\">Label:</label>"
|
||||||
"<input id=\"in\" class=\"testclass\" tabIndex=\"2\" title=\"test title\" />"
|
"<input id=\"in\" class=\"testclass\" tabIndex=\"2\" title=\"test title\" />"
|
||||||
"<select id=\"s\"><option id=\"x\" value=\"val1\">opt1</option><option id=\"y\">opt2</option></select>"
|
"<select id=\"s\"><option id=\"x\" value=\"val1\">opt1</option><option id=\"y\">opt2</option></select>"
|
||||||
"<textarea id=\"X\">text text</textarea>"
|
"<textarea id=\"X\">text text</textarea>"
|
||||||
@ -126,7 +127,8 @@ typedef enum {
|
|||||||
ET_DIV,
|
ET_DIV,
|
||||||
ET_META,
|
ET_META,
|
||||||
ET_NOSCRIPT,
|
ET_NOSCRIPT,
|
||||||
ET_LINK
|
ET_LINK,
|
||||||
|
ET_LABEL
|
||||||
} elem_type_t;
|
} elem_type_t;
|
||||||
|
|
||||||
static const IID * const none_iids[] = {
|
static const IID * const none_iids[] = {
|
||||||
@ -205,6 +207,13 @@ static const IID * const input_iids[] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const IID * const label_iids[] = {
|
||||||
|
ELEM_IFACES,
|
||||||
|
&IID_IHTMLLabelElement,
|
||||||
|
&IID_IConnectionPointContainer,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
static const IID * const select_iids[] = {
|
static const IID * const select_iids[] = {
|
||||||
ELEM_IFACES,
|
ELEM_IFACES,
|
||||||
&IID_IHTMLSelectElement,
|
&IID_IHTMLSelectElement,
|
||||||
@ -447,7 +456,8 @@ static const elem_type_info_t elem_type_infos[] = {
|
|||||||
{"DIV", elem_iids, NULL},
|
{"DIV", elem_iids, NULL},
|
||||||
{"META", meta_iids, &DIID_DispHTMLMetaElement},
|
{"META", meta_iids, &DIID_DispHTMLMetaElement},
|
||||||
{"NOSCRIPT", elem_iids, NULL /*&DIID_DispHTMLNoShowElement*/},
|
{"NOSCRIPT", elem_iids, NULL /*&DIID_DispHTMLNoShowElement*/},
|
||||||
{"LINK", link_iids, &DIID_DispHTMLLinkElement}
|
{"LINK", link_iids, &DIID_DispHTMLLinkElement},
|
||||||
|
{"LABEL", label_iids, &DIID_DispHTMLLabelElement}
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *dbgstr_guid(REFIID riid)
|
static const char *dbgstr_guid(REFIID riid)
|
||||||
@ -5714,6 +5724,7 @@ static void test_elems(IHTMLDocument2 *doc)
|
|||||||
ET_BODY,
|
ET_BODY,
|
||||||
ET_COMMENT,
|
ET_COMMENT,
|
||||||
ET_A,
|
ET_A,
|
||||||
|
ET_LABEL,
|
||||||
ET_INPUT,
|
ET_INPUT,
|
||||||
ET_SELECT,
|
ET_SELECT,
|
||||||
ET_OPTION,
|
ET_OPTION,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user