Module: wine Branch: master Commit: 410abcfb25c0a64464d0e1fef843b03aebfcf8a2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=410abcfb25c0a64464d0e1fef8...
Author: Jacek Caban jacek@codeweavers.com Date: Sun Sep 9 20:18:28 2007 +0200
mshtml: Added IHTMLTxtRange::isEqual implementation.
---
dlls/mshtml/txtrange.c | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index c29b3c9..2821e02 100644 --- a/dlls/mshtml/txtrange.c +++ b/dlls/mshtml/txtrange.c @@ -366,8 +366,31 @@ static HRESULT WINAPI HTMLTxtRange_isEqual(IHTMLTxtRange *iface, IHTMLTxtRange * VARIANT_BOOL *IsEqual) { HTMLTxtRange *This = HTMLTXTRANGE_THIS(iface); - FIXME("(%p)->(%p %p)\n", This, Range, IsEqual); - return E_NOTIMPL; + HTMLTxtRange *src_range; + PRInt16 nsret = 0; + nsresult nsres; + + TRACE("(%p)->(%p %p)\n", This, Range, IsEqual); + + *IsEqual = VARIANT_FALSE; + + src_range = get_range_object(This->doc, Range); + if(!src_range) + return E_FAIL; + + nsres = nsIDOMRange_CompareBoundaryPoints(This->nsrange, NS_START_TO_START, + src_range->nsrange, &nsret); + if(NS_SUCCEEDED(nsres) && !nsret) { + nsres = nsIDOMRange_CompareBoundaryPoints(This->nsrange, NS_END_TO_END, + src_range->nsrange, &nsret); + if(NS_SUCCEEDED(nsres) && !nsret) + *IsEqual = VARIANT_TRUE; + } + + if(NS_FAILED(nsres)) + ERR("CompareBoundaryPoints failed: %08x\n", nsres); + + return S_OK; }
static HRESULT WINAPI HTMLTxtRange_scrollIntoView(IHTMLTxtRange *iface, VARIANT_BOOL fStart)