Commit b93e29f0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added support for non-integer values in get_nsstyle_pixel_val.

parent 7bb36372
......@@ -664,9 +664,14 @@ static HRESULT get_nsstyle_pixel_val(HTMLStyle *This, styleid_t sid, LONG *p)
if(value) {
*p = strtolW(value, &ptr, 10);
if(*ptr == '.') {
/* Skip all digits. We have tests showing that we should not round the value. */
while(isdigitW(*++ptr));
}
if(*ptr && strcmpW(ptr, pxW)) {
nsAString_Finish(&str_value);
FIXME("only px values are currently supported\n");
FIXME("%s: only px values are currently supported\n", debugstr_w(value));
hres = E_NOTIMPL;
}
}else {
......
......@@ -961,6 +961,17 @@ static void test_body_style(IHTMLStyle *style)
ok(!strcmp_wa(V_BSTR(&v), "3px"), "V_BSTR(v) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = a2bstr("4.99");
hres = IHTMLStyle_put_left(style, v);
ok(hres == S_OK, "put_left failed: %08x\n", hres);
VariantClear(&v);
l = 0xdeadbeef;
hres = IHTMLStyle_get_pixelLeft(style, &l);
ok(hres == S_OK, "get_pixelLeft failed: %08x\n", hres);
ok(l == 4, "pixelLeft = %d\n", l);
V_VT(&v) = VT_NULL;
hres = IHTMLStyle_put_left(style, v);
ok(hres == S_OK, "put_left failed: %08x\n", hres);
......
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