Closed Bug 1797222 Opened 2 years ago Closed 2 years ago

[CTW] Wrong y coordinate reported for text on lines other than the first

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: Jamie, Assigned: morgan)

References

Details

(Whiteboard: [ctw-m3])

Attachments

(1 file)

STR:

  1. Open this test case:
    data:text/html,<textarea>ab%0acd
  2. Get the Accessible for the textarea.
  3. Call CharBounds on it with offset 0. Note the coordinates.
  4. Call CharBounds on it with offset 3.
    • Expected: Large y coordinate (because offset 3 is on the second line).
    • Actual: The y coordinate is the same as in step 3).

This is not specific to textarea; you can also reproduce it with <pre>. However, if you use a <br>, so you have two separate text nodes, this works as expected:
data:text/html,<pre>ab<br>cd
I'm guessing there's something weird going on with continuations here.

Practical impact: This breaks Windows Text Cursor Indicator in multi line text boxes, which uses these coordinates to draw its cursor.

Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/06d6c10bc5d7
Make char rects relative to their continuation before caching r=Jamie
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
Regressions: 1765790
Blocks: 1799578
Blocks: 1808828
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: