Jacek Caban : mshtml:
Added get_scrollWidth and get_scrollHeight implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Aug 17 06:30:47 CDT 2007
Module: wine
Branch: master
Commit: dab6474b66fdb468663809e2e8982cc1c921260f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dab6474b66fdb468663809e2e8982cc1c921260f
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Aug 17 02:39:19 2007 +0200
mshtml: Added get_scrollWidth and get_scrollHeight implementation.
---
dlls/mshtml/htmltextcont.c | 40 ++++++++++++++++++++++++++++++++++++----
1 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmltextcont.c b/dlls/mshtml/htmltextcont.c
index 42f0805..ed079db 100644
--- a/dlls/mshtml/htmltextcont.c
+++ b/dlls/mshtml/htmltextcont.c
@@ -101,15 +101,47 @@ static HRESULT WINAPI HTMLTextContainer_createControlRange(IHTMLTextContainer *i
static HRESULT WINAPI HTMLTextContainer_get_scrollHeight(IHTMLTextContainer *iface, long *p)
{
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsIDOMNSHTMLElement *nselem;
+ PRInt32 height;
+ 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;
}
static HRESULT WINAPI HTMLTextContainer_get_scrollWidth(IHTMLTextContainer *iface, long *p)
{
HTMLTextContainer *This = HTMLTEXTCONT_THIS(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ 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;
}
static HRESULT WINAPI HTMLTextContainer_put_scrollTop(IHTMLTextContainer *iface, long v)
More information about the wine-cvs
mailing list