Commit 166f1999 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added implementation of put_scrollTop and put_scrollLeft.

parent 82676b99
...@@ -115,8 +115,21 @@ static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *ifac ...@@ -115,8 +115,21 @@ static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *ifac
static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, long v) static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, long v)
{ {
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface); HTMLTextContainer *This = HTMLTEXTCONT_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->element->nselem, &IID_nsIDOMNSHTMLElement,
(void**)&nselem);
if(NS_SUCCEEDED(nsres)) {
nsIDOMNSHTMLElement_SetScrollTop(nselem, v);
nsIDOMNSHTMLElement_Release(nselem);
}else {
ERR("Could not get nsIDOMNSHTMLElement interface: %08lx\n", nsres);
}
return S_OK;
} }
static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, long *p) static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, long *p)
...@@ -129,8 +142,21 @@ static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, ...@@ -129,8 +142,21 @@ static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface,
static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, long v) static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, long v)
{ {
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface); HTMLTextContainer *This = HTMLTEXTCONT_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->element->nselem, &IID_nsIDOMNSHTMLElement,
(void**)&nselem);
if(NS_SUCCEEDED(nsres)) {
nsIDOMNSHTMLElement_SetScrollLeft(nselem, v);
nsIDOMNSHTMLElement_Release(nselem);
}else {
ERR("Could not get nsIDOMNSHTMLElement interface: %08lx\n", nsres);
}
return S_OK;
} }
static HRESULT WINAPI HTMLTextContainer_get_scrollLeft(IHTMLTextContainer *iface, long *p) static HRESULT WINAPI HTMLTextContainer_get_scrollLeft(IHTMLTextContainer *iface, long *p)
......
...@@ -465,6 +465,30 @@ interface nsIDOMHTMLElement : nsIDOMElement ...@@ -465,6 +465,30 @@ interface nsIDOMHTMLElement : nsIDOMElement
[ [
object, object,
uuid(da83b2ec-8264-4410-8496-ada3acd2ae42)
]
interface nsIDOMNSHTMLElement : nsISupports
{
nsresult GetOffsetTop(PRInt32 *aOffsetTop);
nsresult GetOffsetLeft(PRInt32 *aOffsetLeft);
nsresult GetOffsetWidth(PRInt32 *aOffsetWidth);
nsresult GetOffsetHeight(PRInt32 *aOffsetHeight);
nsresult GetOffsetParent(nsIDOMElement **aOffsetParent);
nsresult GetInnerHTML(nsAString *aInnerHTML);
nsresult SetInnerHTML(const nsAString *aInnerHTML);
nsresult GetScrollTop(PRInt32 *aScrollTop);
nsresult SetScrollTop(PRInt32 aScrollTop);
nsresult GetScrollLeft(PRInt32 *aScrollLeft);
nsresult SetScrollLeft(PRInt32 aScrollLeft);
nsresult GetScrollHeight(PRInt32 *aScrollHeight);
nsresult GetScrollWidth(PRInt32 *aScrollWidth);
nsresult GetClientHeight(PRInt32 *aClientHeight);
nsresult GetClientWidth(PRInt32 *aClientWidth);
nsresult ScrollIntoView(PRBool top);
}
[
object,
uuid(a6cf9075-15b3-11d2-932e-00805f8add32) uuid(a6cf9075-15b3-11d2-932e-00805f8add32)
] ]
interface nsIDOMDocument : nsIDOMNode interface nsIDOMDocument : nsIDOMNode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment