mshtml: Use variant_to_nsstr in IHTMLIFrameElement2::put_width.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
190762cbaa
commit
7e30161184
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue