mshtml: Forward IHTMLTextContainer::get_scrollTop to IHTMLElement2.
This commit is contained in:
parent
4d89c62eab
commit
985115d804
|
@ -128,8 +128,10 @@ static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface,
|
||||||
static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, long *p)
|
static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, long *p)
|
||||||
{
|
{
|
||||||
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
|
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
|
||||||
return E_NOTIMPL;
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
return IHTMLElement2_get_scrollTop(HTMLELEM2(&This->element), p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, long v)
|
static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, long v)
|
||||||
|
|
|
@ -1018,13 +1018,22 @@ static long _elem_get_scroll_width(unsigned line, IUnknown *unk)
|
||||||
static long _elem_get_scroll_top(unsigned line, IUnknown *unk)
|
static long _elem_get_scroll_top(unsigned line, IUnknown *unk)
|
||||||
{
|
{
|
||||||
IHTMLElement2 *elem = _get_elem2_iface(line, unk);
|
IHTMLElement2 *elem = _get_elem2_iface(line, unk);
|
||||||
long l = -1;
|
IHTMLTextContainer *txtcont;
|
||||||
|
long l = -1, l2 = -1;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
hres = IHTMLElement2_get_scrollTop(elem, &l);
|
hres = IHTMLElement2_get_scrollTop(elem, &l);
|
||||||
ok_(__FILE__,line) (hres == S_OK, "get_scrollTop failed: %08x\n", hres);
|
ok_(__FILE__,line) (hres == S_OK, "get_scrollTop failed: %08x\n", hres);
|
||||||
IHTMLElement2_Release(elem);
|
IHTMLElement2_Release(elem);
|
||||||
|
|
||||||
|
hres = IUnknown_QueryInterface(unk, &IID_IHTMLTextContainer, (void**)&txtcont);
|
||||||
|
ok_(__FILE__,line) (hres == S_OK, "Could not get IHTMLTextContainer: %08x\n", hres);
|
||||||
|
|
||||||
|
hres = IHTMLTextContainer_get_scrollTop(txtcont, &l2);
|
||||||
|
IHTMLTextContainer_Release(txtcont);
|
||||||
|
ok_(__FILE__,line) (hres == S_OK, "IHTMLTextContainer::get_scrollTop failed: %ld\n", l2);
|
||||||
|
ok_(__FILE__,line) (l == l2, "unexpected top %ld, expected %ld\n", l2, l);
|
||||||
|
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue