Module: wine Branch: master Commit: aebefe17bf0a2c5f54b82f05a7d671b8aacb66f6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=aebefe17bf0a2c5f54b82f05a7... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 15 13:47:47 2017 +0200 mshtml: Added IHTMLInputTextElement2::selectionEnd property implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlinput.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 00f714d..3dcded9 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1296,15 +1296,34 @@ static HRESULT WINAPI HTMLInputTextElement2_get_selectionStart(IHTMLInputTextEle static HRESULT WINAPI HTMLInputTextElement2_put_selectionEnd(IHTMLInputTextElement2 *iface, LONG v) { HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - FIXME("(%p)->(%d)\n", This, v); - return E_NOTIMPL; + nsresult nsres; + + TRACE("(%p)->(%d)\n", This, v); + + nsres = nsIDOMHTMLInputElement_SetSelectionEnd(This->nsinput, v); + if(NS_FAILED(nsres)) { + ERR("SetSelectionEnd failed: %08x\n", nsres); + return E_FAIL; + } + return S_OK; } static HRESULT WINAPI HTMLInputTextElement2_get_selectionEnd(IHTMLInputTextElement2 *iface, LONG *p) { HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + INT32 selection_end; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMHTMLInputElement_GetSelectionEnd(This->nsinput, &selection_end); + if(NS_FAILED(nsres)) { + ERR("GetSelectionEnd failed: %08x\n", nsres); + return E_FAIL; + } + + *p = selection_end; + return S_OK; } static HRESULT WINAPI HTMLInputTextElement2_setSelectionRange(IHTMLInputTextElement2 *iface, LONG start, LONG end)