Closed Bug 1881195 Opened 8 months ago Closed 7 months ago

[UIA] Implement IsControlElement property

Categories

(Core :: Disability Access APIs, task)

Desktop
Windows
task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

In bug 1777875 comment 12 and bug 1876192 comment 12, we saw UIA tree walks spending a ridiculous amount of time processing object attributes with a regular expression trying to determine whether something is a control element:

9 std::basic_regex<unsigned short, std::regex_traits<unsigned short> >::_Reset<unsigned short const*>(unsigned short const*, unsigned short const*, std::regex_constants::syntax_option_type, std::forward_iterator_tag), running count is 507 samples (5.2%), self count is 0 samples
10 Acc2AttributeParser::GetAttributeValue(unsigned short const*), running count is 507 samples (5.2%), self count is 0 samples
11 MsaaProxy::GetLiveSetting(IAccessible2*), running count is 355 samples (3.7%), self count is 0 samples
12 MsaaProxy::GetIsControlElementPropertyValue(IAccessible2*), running count is 355 samples (3.7%), self count is 0 samples
13 MsaaProxy::GetPropertyValueFromAcc2(int), running count is 355 samples (3.7%), self count is 0 samples
14 MsaaProxy::GetPropertyValue(int, tagVARIANT*), running count is 355 samples (3.7%), self count is 0 samples
15 UiaNode::ProviderGetPropertyValue(int, int, IRawElementProviderSimple*, int, PropertyInfo const*, tagVARIANT*), running count is 355 samples (3.7%), self count is 0 samples
16 InProcClientAPIStub::UiaNode_GetPropertyValues(char*), running count is 355 samples (3.7%), self count is 0 samples

(Profile)

While our UIA implementation is very rudimentary and is based on IAccessibleEx, it seems UIA does query our implementation even if the UIA -> IA2 proxy is being used, but it still uses the proxy for anything we don't provide. Therefore, I'm hoping we can get an early win by implementing support for properties like IsControlElement which are commonly accessed in tree walks and clearly have a very suboptimal implementation in the proxy.

So, let's start with IsControlElement and work from there.

Blocks: 1777875
See Also: → 1876192

Exactly what should be a control element on the web and what shouldn't isn't really documented anywhere.
So, this is a little based on ideas from Chromium and a little based on my own understanding of how this should ideally work.
This will definitely need to be tweaked as we further develop UIA.
For now, the primary aim is to avoid the performance cliff caused by the UIA -> IA2 proxy's suboptimal implementation of IsControlElement.
We map IsContentElement to IsControlElement, just as Chromium does.

Assignee: nobody → jteh
Status: NEW → ASSIGNED
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d7a8fe8d8a7d Implement IsControlElement and IsContentElement UIA properties. r=nlapre
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: