From 5dee1a3f8917dfa82b4365280292177c4b8c59e5 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 15 Jun 2017 13:47:57 +0200 Subject: [PATCH] mshtml: Added IHTMLInputTextElement2::setSelectionRange implementation. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/htmlinput.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 3dcded9e614..06b0d09526b 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1329,8 +1329,21 @@ static HRESULT WINAPI HTMLInputTextElement2_get_selectionEnd(IHTMLInputTextEleme static HRESULT WINAPI HTMLInputTextElement2_setSelectionRange(IHTMLInputTextElement2 *iface, LONG start, LONG end) { HTMLInputElement *This = impl_from_IHTMLInputTextElement2(iface); - FIXME("(%p)->(%d %d)\n", This, start, end); - return E_NOTIMPL; + nsAString none_str; + nsresult nsres; + + static const WCHAR noneW[] = {'n','o','n','e',0}; + + TRACE("(%p)->(%d %d)\n", This, start, end); + + nsAString_InitDepend(&none_str, noneW); + nsres = nsIDOMHTMLInputElement_SetSelectionRange(This->nsinput, start, end, &none_str); + nsAString_Finish(&none_str); + if(NS_FAILED(nsres)) { + ERR("SetSelectionRange failed: %08x\n", nsres); + return E_FAIL; + } + return S_OK; } static const IHTMLInputTextElement2Vtbl HTMLInputTextElement2Vtbl = {