[PATCH v11 06/10] mshtml: Associate props with attributes for IE8 mode, but keep them stringified.

Gabriel Ivăncescu gabrielopcode at gmail.com
Wed Dec 1 07:36:57 CST 2021


On 30/11/2021 22:59, Jacek Caban wrote:
> Hi Gabriel,
> 
> On 11/29/21 5:31 PM, Gabriel Ivăncescu wrote:
>> +static inline WCHAR *translate_attr_name(WCHAR *attr_name, 
>> compat_mode_t compat_mode)
>> +{
>> +    WCHAR *ret = attr_name;
>> +
>> +    if(compat_mode >= COMPAT_MODE_IE8 && !wcsicmp(attr_name, L"class"))
>> +        ret = (WCHAR*)L"className";
>> +    return ret;
>> +}
> 
> 
> Please avoid this cast.
> 
> 
>> +                if(get_dispid_type(dispid) == DISPEXPROP_BUILTIN) {
>> +                    VariantClear(AttributeValue);
>> +                    V_VT(AttributeValue) = VT_NULL;
>> +                    return S_OK;
>> +                }
> 
> 
> It's not right in general, see the attached test. I'm not expecting that 
> you implement all those IE8-specific things (in fact, I don't think we 
> need to care too much about it), but the patch in its current shape can 
> break things. Could you just remove this if() and live todo_wines?
> 
> 

Sure, not a problem. My only fear was that it *adds* a todo_wine without 
that code to existing tests, but as you said that's not very important 
and it was also a side-effect of a former coincidence just working 
right, so I hope adding it isn't too much of a problem.



More information about the wine-devel mailing list