Open Bug 1809699 Opened 2 years ago Updated 2 years ago

[CTW] Consider simplifying char rect caching by using a line iterator

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

People

(Reporter: morgan, Unassigned)

References

(Blocks 2 open bugs)

Details

From this phab revision:

It feels like we're doing a lot of manual positioning that maybe we could get for free if we queried the right parts of the frame tree. I wonder if we'd be better off using a line iterator here? Because lines are relative to their containing frame, and they duplicate the positional information stored on those intervening inline frames.

Something to consider! Jamie's thoughts:

If you think a line iterator would be cleaner, that seems reasonable to me. We'd have to watch for two things though:

  1. I forget the specifics of how line iterators work, but we'd need to make sure we only processed lines in the same DOM text leaf. For example: data:text/html,<pre>a%0ab<span>c</span> When handling the "a\nb" text leaf, we wouldn't want to accidentally include "c", which is on the same line but a different text leaf.
  2. Care is needed to avoid performance problems with line iterators in large blocks. See bug 1771060
Type: defect → task
Blocks: cleana11y
You need to log in before you can comment on or make changes to this bug.