[PATCH v2 0/3] MR216: uiautomationcore: More UiaProviderFromIAccessible work.

Huw Davies (@huw) wine at gitlab.winehq.org
Fri Jun 10 01:58:14 CDT 2022


Huw Davies (@huw) commented about dlls/uiautomationcore/uia_provider.c:
> +
> +    if (!msaa_acc_prop_match(acc, acc2, &matched))
> +        goto exit;
> +
> +    variant_init_i4(&cid, CHILDID_SELF);
> +    hr = IAccessible_get_accName(acc, cid, &name[0]);
> +    if (SUCCEEDED(hr))
> +    {
> +        hr = IAccessible_get_accName(acc2, cid, &name[1]);
> +        if (SUCCEEDED(hr))
> +        {
> +            if ((!(!name[0] && !name[1]) && (!name[0] || !name[1])) ||
> +                    ((name[0] && name[1]) && wcscmp(name[0], name[1])))
> +                matched = FALSE;
> +            else
> +                matched = TRUE;
This `if` condition is challenging to decipher.  Perhaps it would be simpler comparing `!!name[0]` with `!!name[1]`, or breaking this out into a series of `if` statements.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/216#note_1801



More information about the wine-devel mailing list