Jacek Caban : mshtml: Skip fixups in get_nsstyle_property in IE9+ mode.
Alexandre Julliard
julliard at winehq.org
Wed Aug 29 16:10:44 CDT 2018
Module: wine
Branch: master
Commit: 8b998a7dd7c0b5128eb3a7b02757f38e718620a1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8b998a7dd7c0b5128eb3a7b02757f38e718620a1
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Aug 29 14:10:13 2018 +0200
mshtml: Skip fixups in get_nsstyle_property in IE9+ mode.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/htmlcurstyle.c | 2 +-
dlls/mshtml/htmlstyle.c | 8 ++++----
dlls/mshtml/htmlstyle.h | 2 +-
dlls/mshtml/tests/style.c | 2 --
4 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c
index c2e3ee3..007be63 100644
--- a/dlls/mshtml/htmlcurstyle.c
+++ b/dlls/mshtml/htmlcurstyle.c
@@ -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)
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c
index 7fa126d..4ec24a3 100644
--- a/dlls/mshtml/htmlstyle.c
+++ b/dlls/mshtml/htmlstyle.c
@@ -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;
}
diff --git a/dlls/mshtml/htmlstyle.h b/dlls/mshtml/htmlstyle.h
index 10f0de5..ac0db1c 100644
--- a/dlls/mshtml/htmlstyle.h
+++ b/dlls/mshtml/htmlstyle.h
@@ -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;
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c
index 1a22d54..51b44fb 100644
--- a/dlls/mshtml/tests/style.c
+++ b/dlls/mshtml/tests/style.c
@@ -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);
More information about the wine-cvs
mailing list