Module: wine Branch: master Commit: 0a0d72ac5d5bc3a5943eefdd78360051bb5b0b3c URL: http://source.winehq.org/git/wine.git/?a=commit;h=0a0d72ac5d5bc3a5943eefdd78...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Sep 26 20:44:37 2007 +0200
mshtml: Added IHTMLElement2::put_scrollTop and put_scrollLeft implementation.
---
dlls/mshtml/htmlelem2.c | 32 ++++++++++++++++++++++++++++---- 1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlelem2.c b/dlls/mshtml/htmlelem2.c index 5b25086..1d1fcfa 100644 --- a/dlls/mshtml/htmlelem2.c +++ b/dlls/mshtml/htmlelem2.c @@ -626,8 +626,20 @@ static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v) { HTMLElement *This = HTMLELEM2_THIS(iface); - FIXME("(%p)->(%ld)\n", This, v); - return E_NOTIMPL; + nsIDOMNSHTMLElement *nselem; + nsresult nsres; + + TRACE("(%p)->(%ld)\n", This, v); + + nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + if(NS_SUCCEEDED(nsres)) { + nsIDOMNSHTMLElement_SetScrollTop(nselem, v); + nsIDOMNSHTMLElement_Release(nselem); + }else { + ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); + } + + return S_OK; }
static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p) @@ -640,8 +652,20 @@ static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, long *p) static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v) { HTMLElement *This = HTMLELEM2_THIS(iface); - FIXME("(%p)->()\n", This); - return E_NOTIMPL; + nsIDOMNSHTMLElement *nselem; + nsresult nsres; + + TRACE("(%p)->(%ld)\n", This, v); + + nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + if(NS_SUCCEEDED(nsres)) { + nsIDOMNSHTMLElement_SetScrollLeft(nselem, v); + nsIDOMNSHTMLElement_Release(nselem); + }else { + ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); + } + + return S_OK; }
static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p)