Module: wine Branch: master Commit: cbfef31895b3d689e3baa75cf8a1bcab12a38fe5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=cbfef31895b3d689e3baa75cf8... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Aug 17 02:39:56 2007 +0200 mshtml: Added IHTMLTxtRange::select implementation. --- dlls/mshtml/txtrange.c | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index ee5cbe7..373b7b6 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -337,8 +337,24 @@ static HRESULT WINAPI HTMLTxtRange_moveEnd(IHTMLTxtRange *iface, BSTR Unit, static HRESULT WINAPI HTMLTxtRange_select(IHTMLTxtRange *iface) { HTMLTxtRange *This = HTMLTXTRANGE_THIS(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + + TRACE("(%p)\n", This); + + if(This->doc->nscontainer) { + nsIDOMWindow *dom_window = NULL; + nsISelection *nsselection; + + nsIWebBrowser_GetContentDOMWindow(This->doc->nscontainer->webbrowser, &dom_window); + nsIDOMWindow_GetSelection(dom_window, &nsselection); + nsIDOMWindow_Release(dom_window); + + nsISelection_RemoveAllRanges(nsselection); + nsISelection_AddRange(nsselection, This->nsrange); + + nsISelection_Release(nsselection); + } + + return S_OK; } static HRESULT WINAPI HTMLTxtRange_pasteHTML(IHTMLTxtRange *iface, BSTR html)