Closed Bug 1901462 Opened 2 years ago Closed 2 years ago

[UIA] Support ITextRangeProvider::GetBoundingRectangles

Categories

(Core :: Disability Access APIs, task)

Desktop
Windows
task

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: Jamie, Assigned: nlapre)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

This will allow UIA clients to retrieve screen coordinates for text.

This revision implements GetBoundingRectangles by walking the text range line by
line, adding each line rect to an output array, then returning that array to UIA
clients. Since this logic was tied up in TextLeafRange::Bounds, this revision
first creates function WalkLineRects which encapsulates the logic of walking
a TextLeafRange line-by-line. Then, it uses that function to rewrite Bounds and
implement new function LineRects, which stores all non-empty onscreen line rects
in an nsTArray and returns them. The implementation of GetBoundingRectangles has
been filled out; it's mostly straightforward but contains some SAFEARRAY work
since UIA expects rects as doubles, rather than our internal uint32_t
representation. Finally, this revision adds a test for GetBoundingRectangles.

Assignee: nobody → nlapre
Status: NEW → ASSIGNED
Pushed by nlapre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1529b1ae43b3 Implement UIA ITextRangeProvider::GetBoundingRectangles, r=Jamie
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: