Module: wine Branch: master Commit: e1a553e3283c3b1c888fa2f46496ac711aea09ad URL: http://source.winehq.org/git/wine.git/?a=commit;h=e1a553e3283c3b1c888fa2f464...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Jul 28 22:02:01 2008 +0200
mshtml: Forward IHTMLTextContainer::get_scroll[Hight|Width] implementation to IHTMLElement2.
---
dlls/mshtml/htmltextcont.c | 32 ++------------------------------ 1 files changed, 2 insertions(+), 30 deletions(-)
diff --git a/dlls/mshtml/htmltextcont.c b/dlls/mshtml/htmltextcont.c index f6f7c8b..c5141bc 100644 --- a/dlls/mshtml/htmltextcont.c +++ b/dlls/mshtml/htmltextcont.c @@ -101,47 +101,19 @@ static HRESULT WINAPI HTMLTextContainer_createControlRange(IHTMLTextContainer *i static HRESULT WINAPI HTMLTextContainer_get_scrollHeight(IHTMLTextContainer *iface, long *p) { HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface); - nsIDOMNSHTMLElement *nselem; - PRInt32 height = 0; - nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
- nsres = nsIDOMElement_QueryInterface(This->element.nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); - if(NS_SUCCEEDED(nsres)) { - nsIDOMNSHTMLElement_GetScrollHeight(nselem, &height); - nsIDOMNSHTMLElement_Release(nselem); - }else { - ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); - } - - *p = height; - TRACE("*p = %ld\n", *p); - - return S_OK; + return IHTMLElement2_get_scrollHeight(HTMLELEM2(&This->element), p); }
static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *iface, long *p) { HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface); - nsIDOMNSHTMLElement *nselem; - PRInt32 width = 0; - nsresult nsres;
TRACE("(%p)->(%p)\n", This, p);
- nsres = nsIDOMElement_QueryInterface(This->element.nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); - if(NS_SUCCEEDED(nsres)) { - nsIDOMNSHTMLElement_GetScrollWidth(nselem, &width); - nsIDOMNSHTMLElement_Release(nselem); - }else { - ERR("Could not get nsIDOMNSHTMLElement interface: %08x\n", nsres); - } - - *p = width; - TRACE("*p = %ld\n", *p); - - return S_OK; + return IHTMLElement2_get_scrollWidth(HTMLELEM2(&This->element), p); }
static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, long v)