Commit 8b998a7d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Skip fixups in get_nsstyle_property in IE9+ mode.

parent 889ccb88
......@@ -48,7 +48,7 @@ struct HTMLCurrentStyle {
static inline HRESULT get_current_style_property(HTMLCurrentStyle *current_style, styleid_t sid, BSTR *p)
{
return get_nsstyle_property(current_style->nsstyle, sid, p);
return get_nsstyle_property(current_style->nsstyle, sid, COMPAT_MODE_QUIRKS, p);
}
static inline HRESULT get_current_style_property_var(HTMLCurrentStyle *This, styleid_t sid, VARIANT *v)
......
......@@ -667,7 +667,7 @@ static HRESULT nsstyle_to_bstr(const WCHAR *val, DWORD flags, BSTR *p)
return S_OK;
}
HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, BSTR *p)
HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, compat_mode_t compat_mode, BSTR *p)
{
nsAString str_value;
const PRUnichar *value;
......@@ -678,7 +678,7 @@ HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
get_nsstyle_attr_nsval(nsstyle, sid, &str_value);
nsAString_GetData(&str_value, &value);
hres = nsstyle_to_bstr(value, style_tbl[sid].flags, p);
hres = nsstyle_to_bstr(value, compat_mode < COMPAT_MODE_IE9 ? style_tbl[sid].flags : 0, p);
nsAString_Finish(&str_value);
TRACE("%s -> %s\n", debugstr_w(style_tbl[sid].name), debugstr_w(*p));
......@@ -738,7 +738,7 @@ HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t s
static inline HRESULT get_style_property(HTMLStyle *This, styleid_t sid, BSTR *p)
{
return get_nsstyle_property(This->nsstyle, sid, p);
return get_nsstyle_property(This->nsstyle, sid, dispex_compat_mode(&This->dispex), p);
}
static inline HRESULT get_style_property_var(HTMLStyle *This, styleid_t sid, VARIANT *v)
......@@ -4796,7 +4796,7 @@ HRESULT get_elem_style(HTMLElement *elem, styleid_t styleid, BSTR *ret)
if(FAILED(hres))
return hres;
hres = get_nsstyle_property(style, styleid, ret);
hres = get_nsstyle_property(style, styleid, COMPAT_MODE_IE11, ret);
nsIDOMCSSStyleDeclaration_Release(style);
return hres;
}
......
......@@ -123,7 +123,7 @@ typedef enum {
HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) DECLSPEC_HIDDEN;
HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration*,styleid_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_elem_style(HTMLElement*,styleid_t,BSTR*) DECLSPEC_HIDDEN;
......
......@@ -704,7 +704,6 @@ static void test_style6(IHTMLStyle6 *style)
if(compat_mode < COMPAT_IE9)
ok(str && !*str, "outline = %s\n", wine_dbgstr_w(str));
else
todo_wine
ok(!str, "outline = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
......@@ -2524,7 +2523,6 @@ static void test_body_style(IHTMLStyle *style)
hres = IHTMLStyle_get_clip(style, &str);
ok(hres == S_OK, "get_clip failed: %08x\n", hres);
todo_wine_if(compat_mode >= COMPAT_IE9)
ok(!strcmp_wa(str, compat_mode < COMPAT_IE9 ? "rect(0px 1px 500px 505px)" : "rect(0px, 1px, 500px, 505px)"),
"clip = %s\n", wine_dbgstr_w(str));
SysFreeString(str);
......
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