From a471f648ca3297e4a4f98438d7f24c24fb47f4d7 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 27 Aug 2018 13:50:16 +0200 Subject: [PATCH] mshtml: Pass style id instead of flags to var_to_styleval. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/htmlstyle.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index 2437b75baba..272b6443f80 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -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;