Open Bug 1919329 Opened 23 days ago Updated 22 days ago

Remove/rework unexplained TextLeafPoint fallback in HyperTextAccessibleBase::OffsetAtPoint

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

People

(Reporter: nlapre, Unassigned)

References

(Blocks 1 open bug)

Details

In HyperTextAccessibleBase::OffsetAtPoint, we have some code that hit tests each character rect in a range to see where the screen point lies. In that code, we fall back to mStart for reasons that we don't fully understand. With this revision, that logic is factored out into function TextLeafPointAtScreenPoint that preserves the fallback behavior. The issue is, we're not totally sure why we need to preserve that behavior in the first place.

Ideally, the function would fall back to a default-constructed TextLeafPoint, since that makes the most sense for arbitrary consumers of the code. Some consumers, such as UIA's RangeFromPoint, do need the "fall back to mStart" behavior. We should create a solution that works for all of these consumers.

See discussion on the aforementioned patch here.

Blocks: cleana11y
You need to log in before you can comment on or make changes to this bug.