Jacek Caban : mshtml: Support argument type conversion for functions with dual interface return type.
Alexandre Julliard
julliard at winehq.org
Mon Apr 15 16:26:41 CDT 2019
Module: wine
Branch: master
Commit: 40c74cf33620e7a690c829a3eb32d18449c3aa10
URL: https://source.winehq.org/git/wine.git/?a=commit;h=40c74cf33620e7a690c829a3eb32d18449c3aa10
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Apr 15 16:39:27 2019 +0200
mshtml: Support argument type conversion for functions with dual interface return type.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/dispex.c | 10 +++++++---
dlls/mshtml/tests/elements.js | 2 ++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index 30b3580..e637f13 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -302,12 +302,11 @@ static void add_func_info(dispex_data_t *data, tid_t tid, const FUNCDESC *desc,
if(!info->arg_types)
return;
-
for(i=0; i < info->argc; i++)
info->arg_types[i] = desc->lprgelemdescParam[i].tdesc.vt;
info->prop_vt = desc->elemdescFunc.tdesc.vt;
- if(info->prop_vt != VT_VOID && !is_arg_type_supported(info->prop_vt)) {
+ if(info->prop_vt != VT_VOID && info->prop_vt != VT_PTR && !is_arg_type_supported(info->prop_vt)) {
TRACE("%s: return type %d\n", debugstr_w(info->name), info->prop_vt);
return; /* Fallback to ITypeInfo::Invoke */
}
@@ -1197,8 +1196,13 @@ static HRESULT invoke_builtin_function(DispatchEx *This, func_info_t *func, DISP
case vt: \
V_BYREF(&ret_ref) = &access(&retv); \
break
- BUILTIN_TYPES_SWITCH;
+ BUILTIN_ARG_TYPES_SWITCH;
#undef CASE_VT
+ case VT_PTR:
+ V_VT(&retv) = VT_DISPATCH;
+ V_VT(&ret_ref) = VT_BYREF | VT_DISPATCH;
+ V_BYREF(&ret_ref) = &V_DISPATCH(&retv);
+ break;
default:
assert(0);
}
diff --git a/dlls/mshtml/tests/elements.js b/dlls/mshtml/tests/elements.js
index 1423e3b..4c647d6 100644
--- a/dlls/mshtml/tests/elements.js
+++ b/dlls/mshtml/tests/elements.js
@@ -374,6 +374,8 @@ function test_style_properties() {
elem.style.zIndex = 4;
ok(computed_style.zIndex === 4, "computed_style.zIndex = " + computed_style.zIndex);
+ window.getComputedStyle(elem, null);
+
next_test();
}
More information about the wine-cvs
mailing list