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)
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,
HTMLElement_clone,
HTMLElement_handle_event,
HTMLElement_get_attr_col,
+ NULL,
+ NULL,
+ HTMLButtonElementImpl_put_disabled,
+ HTMLButtonElementImpl_get_disabled
};
static const tid_t HTMLButtonElement_iface_tids[] = {