mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 23:20:43 +00:00
mshtml: Skip fixups in get_nsstyle_property_var in IE9+ mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8b998a7dd7
commit
869b447764
|
@ -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)
|
||||
{
|
||||
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)
|
||||
|
|
|
@ -685,22 +685,21 @@ HRESULT get_nsstyle_property(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid,
|
|||
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;
|
||||
const PRUnichar *value;
|
||||
BOOL set = FALSE;
|
||||
unsigned flags;
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
flags = style_tbl[sid].flags;
|
||||
nsAString_Init(&str_value, NULL);
|
||||
|
||||
get_nsstyle_attr_nsval(nsstyle, sid, &str_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;
|
||||
BOOL neg = FALSE;
|
||||
INT i = 0;
|
||||
|
@ -723,7 +722,7 @@ HRESULT get_nsstyle_property_var(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t s
|
|||
if(!set) {
|
||||
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)) {
|
||||
V_VT(p) = VT_BSTR;
|
||||
V_BSTR(p) = str;
|
||||
|
@ -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)
|
||||
{
|
||||
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)
|
||||
|
|
|
@ -124,7 +124,7 @@ typedef enum {
|
|||
HRESULT HTMLStyle_Create(HTMLElement*,HTMLStyle**) 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 set_elem_style(HTMLElement*,styleid_t,const WCHAR*) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -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_I4(&v), "V_I4(v) != 0\n");
|
||||
}else {
|
||||
todo_wine
|
||||
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)));
|
||||
}
|
||||
VariantClear(&v);
|
||||
|
|
Loading…
Reference in a new issue