Commit add03f99 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLButtonElement::disabled implementation.

parent 39fa807b
......@@ -1552,15 +1552,35 @@ static HRESULT WINAPI HTMLButtonElement_get_status(IHTMLButtonElement *iface, VA
static HRESULT WINAPI HTMLButtonElement_put_disabled(IHTMLButtonElement *iface, VARIANT_BOOL v)
{
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
FIXME("(%p)->(%x)\n", This, v);
return E_NOTIMPL;
nsresult nsres;
TRACE("(%p)->(%x)\n", This, v);
nsres = nsIDOMHTMLButtonElement_SetDisabled(This->nsbutton, !!v);
if(NS_FAILED(nsres)) {
ERR("SetDisabled failed: %08x\n", nsres);
return E_FAIL;
}
return S_OK;
}
static HRESULT WINAPI HTMLButtonElement_get_disabled(IHTMLButtonElement *iface, VARIANT_BOOL *p)
{
HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
cpp_bool disabled;
nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
nsres = nsIDOMHTMLButtonElement_GetDisabled(This->nsbutton, &disabled);
if(NS_FAILED(nsres)) {
ERR("GetDisabled failed: %08x\n", nsres);
return E_FAIL;
}
*p = disabled ? VARIANT_TRUE : VARIANT_FALSE;
return S_OK;
}
static HRESULT WINAPI HTMLButtonElement_get_form(IHTMLButtonElement *iface, IHTMLFormElement **p)
......@@ -1623,6 +1643,18 @@ static HRESULT HTMLButtonElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
return S_OK;
}
static HRESULT HTMLButtonElementImpl_put_disabled(HTMLDOMNode *iface, VARIANT_BOOL v)
{
HTMLButtonElement *This = button_from_HTMLDOMNode(iface);
return IHTMLButtonElement_put_disabled(&This->IHTMLButtonElement_iface, v);
}
static HRESULT HTMLButtonElementImpl_get_disabled(HTMLDOMNode *iface, VARIANT_BOOL *p)
{
HTMLButtonElement *This = button_from_HTMLDOMNode(iface);
return IHTMLButtonElement_get_disabled(&This->IHTMLButtonElement_iface, p);
}
static const NodeImplVtbl HTMLButtonElementImplVtbl = {
HTMLButtonElement_QI,
HTMLElement_destructor,
......@@ -1630,6 +1662,10 @@ static const NodeImplVtbl HTMLButtonElementImplVtbl = {
HTMLElement_clone,
HTMLElement_handle_event,
HTMLElement_get_attr_col,
NULL,
NULL,
HTMLButtonElementImpl_put_disabled,
HTMLButtonElementImpl_get_disabled
};
static const tid_t HTMLButtonElement_iface_tids[] = {
......
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