[PATCH v8 04/11] jscript: Use string hint when retrieving the default value primitive in IE10+.
Jacek Caban
jacek at codeweavers.com
Fri Nov 26 09:37:06 CST 2021
On 11/26/21 12:52 PM, Gabriel Ivăncescu wrote:
> On 25/11/2021 22:11, Jacek Caban wrote:
>> Hi Gabriel,
>>
>> On 11/25/21 3:00 PM, Gabriel Ivăncescu wrote:
>>> diff --git a/dlls/mshtml/tests/documentmode.js
>>> b/dlls/mshtml/tests/documentmode.js
>>> index 08fcde4..c2fd8bd 100644
>>> --- a/dlls/mshtml/tests/documentmode.js
>>> +++ b/dlls/mshtml/tests/documentmode.js
>>> @@ -1136,7 +1136,6 @@ sync_test("elem_attr", function() {
>>> ok(r === (v < 8 ? arr : (v < 9 ? "arrval" : null)), "testattr
>>> with custom valueOf = " + r);
>>> elem.setAttribute("testattr", arr);
>>> r = elem.getAttribute("testattr");
>>> - todo_wine_if(v >= 10).
>>> ok(r === (v < 8 ? arr : (v < 10 ? "arrval" : "42")), "testattr
>>> after setAttribute with custom valueOf = " + r);
>>> ok(elem.testattr === arr, "elem.testattr after setAttribute
>>> with custom valueOf = " + elem.testattr);
>>> r = elem.removeAttribute("testattr");
>>
>>
>> This test seems too little to back such change. For example, another
>> likely explanation for the observed behaviour is that setAttribute
>> does explicit conversion to string with proper hints.
>>
>>
>
> How should I do that? Looking up toString like I had originally, or
> something else? Or do I need an internal interface? (in which case,
> I'll have to integrate it somehow to the proxy patches...)
As I suggested earlier, look at IVariantChangeType. change_type() should
already do what you need. The only problem is that you don't have a
caller context in setAttribute(). It's, however, available to hooks, so
maybe we could do the conversion in a hook.
Thanks,
Jacek
More information about the wine-devel
mailing list