Closed Bug 1901466 Opened 8 months ago Closed 14 days ago

[UIA] Implement ITextRangeProvider::FindText

Categories

(Core :: Disability Access APIs, task)

Desktop
Windows
task

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: Jamie, Assigned: nlapre)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This will allow UIA clients to efficiently search for a string of text.

Assigning to you, Nathan, since you mentioned you were starting to think about this. Feel free to unassign though if you don't end up working on it imminently.

Assignee: nobody → nlapre

This revision implements ITextRangeProvider::FindText on UiaTextRange.
The function searches for a given string in the text range, forwards or
backwards, case-sensitive or not. The algorithm to do so uses a single
pass to build the range's text string plus an acceleration structure for
lookup later. It then calls Find (or RFind) on the maybe-lowercased
string before using that resulting index to binary search the
acceleration structure for the proper start and end indices of the
search string. Once it has those associated Accessibles, it builds a
text range and returns it.

This revision also implements tests for this functionality.

Pushed by nlapre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0452af7ffce8 Implement ITextRangeProvider::FindText, r=Jamie
Status: NEW → RESOLVED
Closed: 14 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: