Commit 7e301611 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Use variant_to_nsstr in IHTMLIFrameElement2::put_width.

parent 190762cb
......@@ -1278,15 +1278,14 @@ static HRESULT WINAPI HTMLIFrameElement2_put_width(IHTMLIFrameElement2 *iface, V
HTMLIFrame *This = impl_from_IHTMLIFrameElement2(iface);
nsAString nsstr;
nsresult nsres;
HRESULT hres;
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
if(V_VT(&v) != VT_BSTR) {
FIXME("Unsupported %s\n", debugstr_variant(&v));
return E_NOTIMPL;
}
hres = variant_to_nsstr(&v, FALSE, &nsstr);
if(FAILED(hres))
return hres;
nsAString_InitDepend(&nsstr, V_BSTR(&v));
nsres = nsIDOMHTMLIFrameElement_SetWidth(This->framebase.nsiframe, &nsstr);
nsAString_Finish(&nsstr);
if(NS_FAILED(nsres)) {
......
......@@ -8264,6 +8264,12 @@ static void test_iframe_elem(IHTMLElement *elem)
test_iframe_width(elem, L"70%");
test_framebase_src(elem, L"about:blank");
V_VT(&v) = VT_I4;
V_I4(&v) = 110;
hres = IHTMLIFrameElement2_put_width(iframe2, v);
ok(hres == S_OK, "put_height failed: %08x\n", hres);
test_iframe_width(elem, L"110");
str = SysAllocString(L"text/html");
V_VT(&errv) = VT_ERROR;
disp = NULL;
......
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