mshtml: Use dispex_to_string when retrieving the value of an object.
Rather than always returning "[object]" in every mode. Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c667bbe80a
commit
d9eb90e6ab
|
@ -715,15 +715,17 @@ HRESULT dispex_get_dynid(DispatchEx *This, const WCHAR *name, DISPID *id)
|
||||||
static HRESULT dispex_value(DispatchEx *This, LCID lcid, WORD flags, DISPPARAMS *params,
|
static HRESULT dispex_value(DispatchEx *This, LCID lcid, WORD flags, DISPPARAMS *params,
|
||||||
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
|
VARIANT *res, EXCEPINFO *ei, IServiceProvider *caller)
|
||||||
{
|
{
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
if(This->info->desc->vtbl && This->info->desc->vtbl->value)
|
if(This->info->desc->vtbl && This->info->desc->vtbl->value)
|
||||||
return This->info->desc->vtbl->value(This, lcid, flags, params, res, ei, caller);
|
return This->info->desc->vtbl->value(This, lcid, flags, params, res, ei, caller);
|
||||||
|
|
||||||
switch(flags) {
|
switch(flags) {
|
||||||
case DISPATCH_PROPERTYGET:
|
case DISPATCH_PROPERTYGET:
|
||||||
V_VT(res) = VT_BSTR;
|
V_VT(res) = VT_BSTR;
|
||||||
V_BSTR(res) = SysAllocString(L"[object]");
|
hres = dispex_to_string(This, &V_BSTR(res));
|
||||||
if(!V_BSTR(res))
|
if(FAILED(hres))
|
||||||
return E_OUTOFMEMORY;
|
return hres;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FIXME("Unimplemented flags %x\n", flags);
|
FIXME("Unimplemented flags %x\n", flags);
|
||||||
|
@ -1305,9 +1307,9 @@ static HRESULT function_invoke(DispatchEx *This, func_info_t *func, WORD flags,
|
||||||
if(func->id == DISPID_VALUE) {
|
if(func->id == DISPID_VALUE) {
|
||||||
BSTR ret;
|
BSTR ret;
|
||||||
|
|
||||||
ret = SysAllocString(L"[object]");
|
hres = dispex_to_string(This, &ret);
|
||||||
if(!ret)
|
if(FAILED(hres))
|
||||||
return E_OUTOFMEMORY;
|
return hres;
|
||||||
|
|
||||||
V_VT(res) = VT_BSTR;
|
V_VT(res) = VT_BSTR;
|
||||||
V_BSTR(res) = ret;
|
V_BSTR(res) = ret;
|
||||||
|
|
|
@ -107,7 +107,11 @@ static const char noscript_str[] =
|
||||||
"<body><noscript><div>test</div></noscript></body></html>";
|
"<body><noscript><div>test</div></noscript></body></html>";
|
||||||
static const char doctype_str[] =
|
static const char doctype_str[] =
|
||||||
"<!DOCTYPE html>"
|
"<!DOCTYPE html>"
|
||||||
"<html><head><title>emptydiv test</title></head>"
|
"<html>"
|
||||||
|
" <head>"
|
||||||
|
" <meta http-equiv=\"x-ua-compatible\" content=\"IE=8\" />"
|
||||||
|
" <title>emptydiv test</title>"
|
||||||
|
" </head>"
|
||||||
"<body><div id=\"divid\"></div></body></html>";
|
"<body><div id=\"divid\"></div></body></html>";
|
||||||
|
|
||||||
static WCHAR characterW[] = {'c','h','a','r','a','c','t','e','r',0};
|
static WCHAR characterW[] = {'c','h','a','r','a','c','t','e','r',0};
|
||||||
|
|
Loading…
Reference in New Issue