mshtml: Added IHTMLElement2::put_scrollTop and put_scrollLeft implementation.

This commit is contained in:
Jacek Caban 2007-09-26 20:44:37 +02:00 committed by Alexandre Julliard
parent cb776f7d5b
commit 0a0d72ac5d
1 changed files with 28 additions and 4 deletions

View File

@ -626,8 +626,20 @@ static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, long *p
static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v) static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, long v)
{ {
HTMLElement *This = HTMLELEM2_THIS(iface); HTMLElement *This = HTMLELEM2_THIS(iface);
FIXME("(%p)->(%ld)\n", This, v); nsIDOMNSHTMLElement *nselem;
return E_NOTIMPL; 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) 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) static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, long v)
{ {
HTMLElement *This = HTMLELEM2_THIS(iface); HTMLElement *This = HTMLELEM2_THIS(iface);
FIXME("(%p)->()\n", This); nsIDOMNSHTMLElement *nselem;
return E_NOTIMPL; 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) static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, long *p)