Module: wine Branch: master Commit: 09bdb5fb1beb6e97a8a8e722603a1f3d7dd745b4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=09bdb5fb1beb6e97a8a8e72260...
Author: Jacek Caban jacek@codeweavers.com Date: Fri May 7 15:20:56 2010 +0200
mshtml: Added IHTMLInputElement::put_type implementation.
---
dlls/mshtml/htmlinput.c | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 1b8d1c5..b07f9e6 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -106,8 +106,24 @@ static HRESULT WINAPI HTMLInputElement_Invoke(IHTMLInputElement *iface, DISPID d static HRESULT WINAPI HTMLInputElement_put_type(IHTMLInputElement *iface, BSTR v) { HTMLInputElement *This = HTMLINPUT_THIS(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString type_str; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + /* + * FIXME: + * On IE setting type works only on dynamically created elements before adding them to DOM tree. + */ + nsAString_InitDepend(&type_str, v); + nsres = nsIDOMHTMLInputElement_SetType(This->nsinput, &type_str); + nsAString_Finish(&type_str); + if(NS_FAILED(nsres)) { + ERR("SetType failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; }
static HRESULT WINAPI HTMLInputElement_get_type(IHTMLInputElement *iface, BSTR *p)