Jacek Caban : mshtml: Forward IHTMLTextContainer:: put_scrollTop and put_scrollLeft calls to IHTMLElement2 interface.
Alexandre Julliard
julliard at winehq.org
Thu Sep 27 09:27:25 CDT 2007
Module: wine
Branch: master
Commit: e27f1854401abed773c3cb498fb76c829214c921
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e27f1854401abed773c3cb498fb76c829214c921
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Sep 26 20:44:54 2007 +0200
mshtml: Forward IHTMLTextContainer::put_scrollTop and put_scrollLeft calls to IHTMLElement2 interface.
---
dlls/mshtml/htmltextcont.c | 26 ++------------------------
1 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/dlls/mshtml/htmltextcont.c b/dlls/mshtml/htmltextcont.c
index 20bdeab..07c0081 100644
--- a/dlls/mshtml/htmltextcont.c
+++ b/dlls/mshtml/htmltextcont.c
@@ -147,21 +147,10 @@ static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *ifac
static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, long v)
{
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
- nsIDOMNSHTMLElement *nselem;
- 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: %08x\n", nsres);
- }
-
- return S_OK;
+ return IHTMLElement2_put_scrollTop(HTMLELEM2(&This->element), v);
}
static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface, long *p)
@@ -174,21 +163,10 @@ static HRESULT WINAPI HTMLTextContainer_get_scrollTop(IHTMLTextContainer *iface,
static HRESULT WINAPI HTMLTextContainer_put_scrollLeft(IHTMLTextContainer *iface, long v)
{
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
- nsIDOMNSHTMLElement *nselem;
- 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: %08x\n", nsres);
- }
-
- return S_OK;
+ return IHTMLElement2_put_scrollLeft(HTMLELEM2(&This->element), v);
}
static HRESULT WINAPI HTMLTextContainer_get_scrollLeft(IHTMLTextContainer *iface, long *p)
More information about the wine-cvs
mailing list