Commit 39bc0bcf authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added IHTMLFrameBase::frameBorder implementation.

parent 7e35abdd
......@@ -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)
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment