Commit 869b4477 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Skip fixups in get_nsstyle_property_var in IE9+ mode.

parent 8b998a7d
...@@ -53,7 +53,7 @@ static inline HRESULT get_current_style_property(HTMLCurrentStyle *current_style ...@@ -53,7 +53,7 @@ static inline HRESULT get_current_style_property(HTMLCurrentStyle *current_style
static inline HRESULT get_current_style_property_var(HTMLCurrentStyle *This, styleid_t sid, VARIANT *v) static inline HRESULT get_current_style_property_var(HTMLCurrentStyle *This, styleid_t sid, VARIANT *v)
{ {
return get_nsstyle_property_var(This->nsstyle, sid, v); return get_nsstyle_property_var(This->nsstyle, sid, COMPAT_MODE_QUIRKS, v);
} }
static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle *iface) static inline HTMLCurrentStyle *impl_from_IHTMLCurrentStyle(IHTMLCurrentStyle *iface)
......
...@@ -685,22 +685,21 @@ HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, ...@@ -685,22 +685,21 @@ HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
return hres; return hres;
} }
HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, VARIANT *p) HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, compat_mode_t compat_mode, VARIANT *p)
{ {
unsigned flags = style_tbl[sid].flags;
nsAString str_value; nsAString str_value;
const PRUnichar *value; const PRUnichar *value;
BOOL set = FALSE; BOOL set = FALSE;
unsigned flags;
HRESULT hres = S_OK; HRESULT hres = S_OK;
flags = style_tbl[sid].flags;
nsAString_Init(&str_value, NULL); nsAString_Init(&str_value, NULL);
get_nsstyle_attr_nsval(nsstyle, sid, &str_value); get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
nsAString_GetData(&str_value, &value); nsAString_GetData(&str_value, &value);
if(flags & ATTR_STR_TO_INT) { if((flags & ATTR_STR_TO_INT) && (*value || compat_mode < COMPAT_MODE_IE9)) {
const PRUnichar *ptr = value; const PRUnichar *ptr = value;
BOOL neg = FALSE; BOOL neg = FALSE;
INT i = 0; INT i = 0;
...@@ -723,7 +722,7 @@ HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t s ...@@ -723,7 +722,7 @@ HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t s
if(!set) { if(!set) {
BSTR str; BSTR str;
hres = nsstyle_to_bstr(value, flags, &str); hres = nsstyle_to_bstr(value, compat_mode < COMPAT_MODE_IE9 ? flags : 0, &str);
if(SUCCEEDED(hres)) { if(SUCCEEDED(hres)) {
V_VT(p) = VT_BSTR; V_VT(p) = VT_BSTR;
V_BSTR(p) = str; V_BSTR(p) = str;
...@@ -743,7 +742,7 @@ static inline HRESULT get_style_property(HTMLStyle *This, styleid_t sid, BSTR *p ...@@ -743,7 +742,7 @@ static inline HRESULT get_style_property(HTMLStyle *This, styleid_t sid, BSTR *p
static inline HRESULT get_style_property_var(HTMLStyle *This, styleid_t sid, VARIANT *v) static inline HRESULT get_style_property_var(HTMLStyle *This, styleid_t sid, VARIANT *v)
{ {
return get_nsstyle_property_var(This->nsstyle, sid, v); return get_nsstyle_property_var(This->nsstyle, sid, dispex_compat_mode(&This->dispex), v);
} }
static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p) static HRESULT check_style_attr_value(HTMLStyle *This, styleid_t sid, LPCWSTR exval, VARIANT_BOOL *p)
......
...@@ -124,7 +124,7 @@ typedef enum { ...@@ -124,7 +124,7 @@ typedef enum {
HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN; HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN;
HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration*,styleid_t,compat_mode_t,BSTR*) DECLSPEC_HIDDEN; HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration*,styleid_t,compat_mode_t,BSTR*) DECLSPEC_HIDDEN;
HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration*,styleid_t,VARIANT*) DECLSPEC_HIDDEN; HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration*,styleid_t,compat_mode_t,VARIANT*) DECLSPEC_HIDDEN;
HRESULT get_elem_style(HTMLElement*,styleid_t,BSTR*) DECLSPEC_HIDDEN; HRESULT get_elem_style(HTMLElement*,styleid_t,BSTR*) DECLSPEC_HIDDEN;
HRESULT set_elem_style(HTMLElement*,styleid_t,const WCHAR*) DECLSPEC_HIDDEN; HRESULT set_elem_style(HTMLElement*,styleid_t,const WCHAR*) DECLSPEC_HIDDEN;
...@@ -1715,9 +1715,7 @@ static void test_body_style(IHTMLStyle *style) ...@@ -1715,9 +1715,7 @@ static void test_body_style(IHTMLStyle *style)
ok(V_VT(&v) == VT_I4, "V_VT(v)=%d\n", V_VT(&v)); ok(V_VT(&v) == VT_I4, "V_VT(v)=%d\n", V_VT(&v));
ok(!V_I4(&v), "V_I4(v) != 0\n"); ok(!V_I4(&v), "V_I4(v) != 0\n");
}else { }else {
todo_wine
ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v)); ok(V_VT(&v) == VT_BSTR, "V_VT(v)=%d\n", V_VT(&v));
if(V_VT(&v) == VT_BSTR) todo_wine
ok(!V_BSTR(&v), "zIndex = %s\n", wine_dbgstr_w(V_BSTR(&v))); ok(!V_BSTR(&v), "zIndex = %s\n", wine_dbgstr_w(V_BSTR(&v)));
} }
VariantClear(&v); VariantClear(&v);
......
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