Closed Bug 1649575 Opened 4 years ago Closed 4 years ago

Introduce basic TextMarker and TextMarkerRange support

Categories

(Core :: Disability Access APIs, defect, P1)

All
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

(Whiteboard: [mac2020_1])

Attachments

(6 files)

The apple text API is big. As an initial pass this bug will support some basic attributes:

  • AXStartTextMarker
  • AXEndTextMarker
  • AXSelectedTextMarkerRange

... and the following parameterized attributes:

  • AXLengthForTextMarkerRange
  • AXStringForTextMarkerRange
  • AXTextMarkerRangeForUnorderedTextMarkers

These attributes return the same values from any object in content (they are document relative). Therefore this will be implemented in a delegate associated with the content doc.

Assignee: nobody → eitan
Status: NEW → ASSIGNED

AXTextMarker and AXTextMarkerRange are opaque types that are not queried or
manipulated by the AT. For tests, we need to be able to retrieve them,
and pass them back.

This patch generalizes the wrapper we already had in nsIAccessibleMacInterface
and allows other types to be wrapped.

Depends on D81757

The delegate is associated with accessible documents (either local or remote).

I made a separate protocol for all the text marker stuff as it really is a seperate API.

Depends on D81758

These classes do a few things:

  1. They implement and abstract common text operations, for example:
    (a) comparing two markers to know which one precedes the other.
    (b) text retrieval for ranges
    (c) geometric bounds for ranges
    (d) etc.
  2. They can be converted to and from AXTextMarker(Range)s. Since the AXTextMarker
    should not contain a raw pointer since there is a potential for use-after-free,
    we need to lookup the referenced accessible in its document to know that it still exists.

Note: mozTextAccessible got pushed to another unified source file, so we need to
declare some stuff for it. Ideally we would be detecting these kinds of things sooner.

Depends on D81759

This is a seperate patch because of the complexity.

Depends on D81760

Pushed by eisaacson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/989a2e803809 Part 1: Add comparators to AccessibleOrProxy. r=Jamie https://hg.mozilla.org/integration/autoland/rev/65f8e705d730 Part 2: Wrap opaque NSObjects for testing. r=morgan https://hg.mozilla.org/integration/autoland/rev/0441d1553b6b Part 3: Introduce MOXTextMarkerDelegate. r=morgan https://hg.mozilla.org/integration/autoland/rev/9bc12053de5e Part 4: Introduce GeckoTextMarker and GeckoTextMarkerRange. r=morgan https://hg.mozilla.org/integration/autoland/rev/10a97d7a432d Part 5: Implement string building for GeckoTextMarkerRange. r=morgan https://hg.mozilla.org/integration/autoland/rev/6770e14bb2de Part 6: Introduce browser test for basic text API. r=morgan.
Regressions: 1650740
Regressions: 1657193
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: