[PATCH v5 2/2] mshtml: Populate the element props properly.
Jacek Caban
jacek at codeweavers.com
Wed Nov 10 09:29:24 CST 2021
Hi Gabriel,
On 11/9/21 10:00 PM, Gabriel Ivăncescu wrote:
> --- a/dlls/mshtml/htmlelem.c
> +++ b/dlls/mshtml/htmlelem.c
> @@ -6516,7 +6516,10 @@ static HRESULT HTMLElement_populate_props(DispatchEx *dispex)
> } else
> V_BSTR(&value) = NULL;
>
> - IHTMLElement_setAttribute(&This->IHTMLElement_iface, name, value, 0);
> + hres = IDispatchEx_GetDispID(&dispex->IDispatchEx_iface, name, fdexNameEnsure | fdexNameCaseInsensitive, &id);
> + if(SUCCEEDED(hres))
> + set_elem_attr_value_by_dispid(This, id, &value);
While this is probably the right thing for compat modes <IE9, later
modes should not really need it. They should not expose attributes as JS
properties, see the attached test. I think that entire
HTMLElement_populate_props should be no-op on IE9+. That means that
current attributes collection will not work for those cases, but AFICS
it's already broken. The right fix for attributes collection would be to
have its variant based on something like nsIDOMMozNamedAttrMap.
Thanks,
Jacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211110/74bc078f/attachment.bin>
More information about the wine-devel
mailing list