Re: mshtml: Implement HTMLElement2 get_scrollLeft
Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> writes:
@@ -831,8 +831,31 @@ static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v) static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p) { HTMLElement *This = HTMLELEM2_THIS(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsIDOMNSHTMLElement *nselem; + PRInt32 left = 0; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + if(!This->nselem) { + FIXME("NULL nselem\n"); + return E_NOTIMPL; + } + + nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + if(NS_SUCCEEDED(nsres)) { + nsres = nsIDOMNSHTMLElement_GetScrollLeft(nselem, &left); + nsIDOMNSHTMLElement_Release(nselem); + if(NS_FAILED(nsres)) + ERR("GetScrollLeft failed: %08x\n", nsres); + }else { + ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); + }
Printing an ERR is not a substitute for handling errors, you can't just continue as if nothing happened. Or if the error really can be legitimately ignored then you shouldn't have an ERR. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard