Jacek Caban : mshtml: Added IHTMLElement:scrollIntoView implementation.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 4 15:29:39 CDT 2014
Module: wine
Branch: master
Commit: bf10dd3ee4d5df7c19245bbdbee68cb6327bd133
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bf10dd3ee4d5df7c19245bbdbee68cb6327bd133
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Jul 31 20:54:23 2014 +0200
mshtml: Added IHTMLElement:scrollIntoView implementation.
---
dlls/mshtml/htmlelem.c | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index 8378d74..a02baa7 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -851,8 +851,31 @@ static HRESULT WINAPI HTMLElement_get_onselectstart(IHTMLElement *iface, VARIANT
static HRESULT WINAPI HTMLElement_scrollIntoView(IHTMLElement *iface, VARIANT varargStart)
{
HTMLElement *This = impl_from_IHTMLElement(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_variant(&varargStart));
- return E_NOTIMPL;
+ cpp_bool start = TRUE;
+ nsresult nsres;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_variant(&varargStart));
+
+ switch(V_VT(&varargStart)) {
+ case VT_EMPTY:
+ case VT_ERROR:
+ break;
+ case VT_BOOL:
+ start = V_BOOL(&varargStart) != VARIANT_FALSE;
+ break;
+ default:
+ FIXME("Unsupported argument %s\n", debugstr_variant(&varargStart));
+ }
+
+ if(!This->nselem) {
+ FIXME("Unsupported for comments\n");
+ return E_NOTIMPL;
+ }
+
+ nsres = nsIDOMHTMLElement_ScrollIntoView(This->nselem, start, 1);
+ assert(nsres == NS_OK);
+
+ return S_OK;
}
static HRESULT WINAPI HTMLElement_contains(IHTMLElement *iface, IHTMLElement *pChild,
More information about the wine-cvs
mailing list