Closed Bug 1901464 Opened 1 year ago Closed 10 months ago

[UIA] Implement ITextProvider::GetVisibleRanges

Categories

(Core :: Disability Access APIs, task)

Desktop
Windows
task

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox136 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

This will allow UIA clients to determine text that is currently visible on screen.

Assignee: nobody → jteh

This will be used in a subsequent patch to fetch the sub-ranges for visible lines.

This is currently only used by GetSelection, but it will be used by GetVisibleRanges in a subsequent patch.
There is a slight functionality change here: if there are no ranges, this returns an empty array.
GetSelection is unclear about what should be done here, but the documentation for GetVisibleRanges explicitly states an empty array should be returned, so that's what we do.
GetSelection previously left the SAFEARRAY pointer uninitialised in this case, which is definitely nasty and unsafe.

Blocks: 1945010
Attachment #9462700 - Attachment description: Bug 1901464 part 3: Implement ITextProvider::GetVisibleLines. → Bug 1901464 part 3: Implement ITextProvider::GetVisibleRanges.
Whiteboard: [remind-landing 2025-02-04]
Whiteboard: [remind-landing 2025-02-04]
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b38ef52a5079 part 1: TextLeafRange::WalkLineRects: Pass the TextLeafRange for each line to the callback. r=nlapre https://hg.mozilla.org/integration/autoland/rev/1b0d7e5377bb part 2: Refactor UiaText code to convert an array of TextLeafRanges to a SAFEARRAY of UiaTextRanges into a utility function. r=nlapre https://hg.mozilla.org/integration/autoland/rev/e63c3cb08527 part 3: Implement ITextProvider::GetVisibleRanges. r=nlapre
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: