[PATCH v4 12/14] mshtml: Implement HTMLDocument's toString properly.

Gabriel Ivăncescu gabrielopcode at gmail.com
Fri Oct 8 06:38:18 CDT 2021


On 07/10/2021 22:13, Jacek Caban wrote:
> Hi Gabriel,
> 
> On 10/7/21 3:52 PM, Gabriel Ivăncescu wrote:
>> diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
>> index 96a776d..59135f6 100644
>> --- a/dlls/mshtml/dispex.c
>> +++ b/dlls/mshtml/dispex.c
>> @@ -1502,6 +1502,10 @@ HRESULT dispex_to_string(DispatchEx *dispex, 
>> BSTR *ret)
>>       if(compat_mode < COMPAT_MODE_IE9)
>>           p--;
>>       else {
>> +        if(dispex->info->desc->vtbl && 
>> dispex->info->desc->vtbl->get_compat_name) {
>> +            const WCHAR *tmp = 
>> dispex->info->desc->vtbl->get_compat_name(compat_mode);
>> +            if(tmp) name = tmp;
>> +        }
> 
> 
> I think it would be good to try harder to avoid this. I'm not sure if 
> those differences are something we need to worry now, but this callback 
> should not really be needed. If we need this, then we could use 
> separated dispex descriptors for different document modes (but I'm not 
> sure it's worth it, using IE11 names seems good enough).
> 
> 
> Thanks,
> 
> Jacek
> 

Yeah but then I wouldn't be able to test it. I also had an idea to 
encode multiple names in the string itself (see attached diff), but I'm 
guessing that's too much of a hack?

If not, I'll have to skip the tests though, right? Or should I use 
separate dispex descriptors?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 2318 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211008/8cb71b5c/attachment-0001.bin>


More information about the wine-devel mailing list