diff --git a/dlls/mshtml/htmlframe.c b/dlls/mshtml/htmlframe.c index 0c07f0c6775..e451f030453 100644 --- a/dlls/mshtml/htmlframe.c +++ b/dlls/mshtml/htmlframe.c @@ -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)) { diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 5ef27ede89c..7b19271ad4c 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -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;