[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:
> +        IServiceProvider_Release(sp);
> +    }
> +
> +    if (SUCCEEDED(hr) && acc2)
> +        return acc2;
> +
> +    IAccessible_AddRef(acc);
> +    return acc;
> +}
> +
> +/*
> + * Compare role, state, child count, and location properties of the two
> + * IAccessibles. If all four are successfully retrieved and are equal, this is
> + * considered a match.
> + */
> +static BOOL msaa_acc_prop_match(IAccessible *acc, IAccessible *acc2, BOOL *matched)
You're essentially returning a tri-state here, split over two `BOOL`s.  It might be better to return an `HRESULT` using `S_OK`, `S_FALSE` and something else to signify a hard mismatch. At the very least expand the comment to explain what the two `BOOL`s mean.

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



More information about the wine-devel mailing list