Jacek Caban (@jacek) commented about dlls/mshtml/htmlelem.c:
HTMLDOMAttribute *iter, *ret = NULL; struct list *list = &attrs->attrs; unsigned i = 0;
- LIST_FOR_EACH_ENTRY(iter, list, HTMLDOMAttribute, entry) { - if(iter->dispid == dispid) { - ret = iter; - break; + if(nsattr) { + LIST_FOR_EACH_ENTRY(iter, list, HTMLDOMAttribute, entry) { + if(iter->node.nsnode == (nsIDOMNode*)nsattr) { + ret = iter; + break; + } + i++; + }
When you have `nsattr`, you could simply use `get_node()` to retrieve the corresponding `HTMLDOMAttribute`. More generally, in standard compatibility modes, it would be nice if we could rely on mechanisms like this or `nsIDOMMozNamedAttrMap` for most tasks instead of using the list. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6971#note_89953