mshtml: Pass style id instead of flags to var_to_styleval.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9f75fb0cef
commit
a471f648ca
|
@ -437,7 +437,7 @@ static HRESULT set_nsstyle_property(nsIDOMCSSStyleDeclaration *nsstyle, styleid_
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT var_to_styleval(const VARIANT *v, WCHAR *buf, DWORD flags, const WCHAR **ret)
|
||||
static HRESULT var_to_styleval(const VARIANT *v, styleid_t sid, WCHAR *buf, const WCHAR **ret)
|
||||
{
|
||||
switch(V_VT(v)) {
|
||||
case VT_NULL:
|
||||
|
@ -453,6 +453,7 @@ static HRESULT var_to_styleval(const VARIANT *v, WCHAR *buf, DWORD flags, const
|
|||
return S_OK;
|
||||
|
||||
case VT_I4: {
|
||||
unsigned flags = style_tbl[sid].flags;
|
||||
static const WCHAR formatW[] = {'%','d',0};
|
||||
static const WCHAR hex_formatW[] = {'#','%','0','6','x',0};
|
||||
|
||||
|
@ -481,7 +482,7 @@ static HRESULT set_style_property_var(HTMLStyle *style, styleid_t sid, VARIANT *
|
|||
HRESULT hres;
|
||||
|
||||
flags = style_tbl[sid].flags;
|
||||
hres = var_to_styleval(value, buf, flags, &val);
|
||||
hres = var_to_styleval(value, sid, buf, &val);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
|
@ -1152,7 +1153,7 @@ static HRESULT WINAPI HTMLStyle_put_backgroundPositionX(IHTMLStyle *iface, VARIA
|
|||
|
||||
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
|
||||
|
||||
hres = var_to_styleval(&v, buf, ATTR_FIX_PX, &val);
|
||||
hres = var_to_styleval(&v, STYLEID_BACKGROUND_POSITION_X, buf, &val);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
|
@ -1245,7 +1246,7 @@ static HRESULT WINAPI HTMLStyle_put_backgroundPositionY(IHTMLStyle *iface, VARIA
|
|||
|
||||
TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
|
||||
|
||||
hres = var_to_styleval(&v, buf, ATTR_FIX_PX, &val);
|
||||
hres = var_to_styleval(&v, STYLEID_BACKGROUND_POSITION_Y, buf, &val);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
|
|
Loading…
Reference in New Issue