Jacek Caban : mshtml: Added IHTMLFrameBase::frameBorder implementation.
Alexandre Julliard
julliard at winehq.org
Mon Jul 23 13:54:24 CDT 2012
Module: wine
Branch: master
Commit: 39bc0bcf2551030d9d76a6a178ef52d5a40cc22d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=39bc0bcf2551030d9d76a6a178ef52d5a40cc22d
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Jul 23 14:04:19 2012 +0200
mshtml: Added IHTMLFrameBase::frameBorder implementation.
---
dlls/mshtml/htmlframebase.c | 42 ++++++++++++++++++++++++++++++++++++++----
dlls/mshtml/tests/dom.c | 13 +++++++++++++
2 files changed, 51 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmlframebase.c b/dlls/mshtml/htmlframebase.c
index a5344ec..bc00761 100644
--- a/dlls/mshtml/htmlframebase.c
+++ b/dlls/mshtml/htmlframebase.c
@@ -190,15 +190,49 @@ static HRESULT WINAPI HTMLFrameBase_get_border(IHTMLFrameBase *iface, VARIANT *p
static HRESULT WINAPI HTMLFrameBase_put_frameBorder(IHTMLFrameBase *iface, BSTR v)
{
HTMLFrameBase *This = impl_from_IHTMLFrameBase(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
- return E_NOTIMPL;
+ nsAString nsstr;
+ nsresult nsres;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(v));
+
+ if(!This->nsframe && !This->nsiframe) {
+ ERR("No attached ns frame object\n");
+ return E_UNEXPECTED;
+ }
+
+ nsAString_InitDepend(&nsstr, v);
+ if(This->nsframe)
+ nsres = nsIDOMHTMLFrameElement_SetFrameBorder(This->nsframe, &nsstr);
+ else
+ nsres = nsIDOMHTMLIFrameElement_SetFrameBorder(This->nsiframe, &nsstr);
+ nsAString_Finish(&nsstr);
+ if(NS_FAILED(nsres)) {
+ ERR("SetFrameBorder failed: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ return S_OK;
}
static HRESULT WINAPI HTMLFrameBase_get_frameBorder(IHTMLFrameBase *iface, BSTR *p)
{
HTMLFrameBase *This = impl_from_IHTMLFrameBase(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsAString nsstr;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ if(!This->nsframe && !This->nsiframe) {
+ ERR("No attached ns frame object\n");
+ return E_UNEXPECTED;
+ }
+
+ nsAString_Init(&nsstr, NULL);
+ if(This->nsframe)
+ nsres = nsIDOMHTMLFrameElement_GetFrameBorder(This->nsframe, &nsstr);
+ else
+ nsres = nsIDOMHTMLIFrameElement_GetFrameBorder(This->nsiframe, &nsstr);
+ return return_nsstr(nsres, &nsstr, p);
}
static HRESULT WINAPI HTMLFrameBase_put_frameSpacing(IHTMLFrameBase *iface, VARIANT v)
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index eef5114..8907a98 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -4239,6 +4239,19 @@ static void test_framebase(IUnknown *unk)
ok(!strcmp_wa(str, "no"), "get_scrolling should have given 'no', gave: %s\n", wine_dbgstr_w(str));
SysFreeString(str);
+ hres = IHTMLFrameBase_get_frameBorder(fbase, &str);
+ ok(hres == S_OK, "get_frameBorder failed: %08x\n", hres);
+ ok(!str, "frameBorder = %s\n", wine_dbgstr_w(str));
+
+ str = a2bstr("1");
+ hres = IHTMLFrameBase_put_frameBorder(fbase, str);
+ ok(hres == S_OK, "put_frameBorder failed: %08x\n", hres);
+ SysFreeString(str);
+
+ hres = IHTMLFrameBase_get_frameBorder(fbase, &str);
+ ok(hres == S_OK, "get_frameBorder failed: %08x\n", hres);
+ ok(!strcmp_wa(str, "1"), "frameBorder = %s, expected \"1\"\n", wine_dbgstr_w(str));
+
IHTMLFrameBase_Release(fbase);
}
More information about the wine-cvs
mailing list