Closed Bug 1808828 Opened 1 year ago Closed 1 year ago

[CTW] Y coordinate incorrect for lines other than the first inside <pre><code>

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: Jamie, Assigned: morgan)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ctw-m4])

Attachments

(1 file)

Spun off bug 1801756 comment 30.

This is very similar to bug 1797222, but for some reason, the fix there doesn't work in this case.

STR:

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

Impact: This breaks NVDA mouse tracking when this occurs; e.g. in Bugzilla comment code blocks.

This also has the effect that the JAWS cursor cannot access the line that has ab in it. Only cd is visible to JAWS. JaWS uses the bounds to create a virtual screen representation for the JAWS cursor from the accessibles in Firefox, since GDI hooking or other screen scraping methods don't work anyway. This would also cause simulated clicks to go to wrong places.

This is not specific to <code>. It also happens with <span>:
data:text/html,<pre><span>a%0ab%0ac
Curiously, if you use a non-inline element, things work as expected:
data:text/html,<pre><div>a%0ab%0ac
So there's something weird going on with intervening inline elements here.

Assignee: nobody → mreschenberg
Whiteboard: [ctw-m4]
Blocks: 1809695
Blocks: 1809699
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9f8d4babe01d
Compute ancestor transform for continuations that span multiple subtrees r=Jamie
Blocks: 1809761
Pushed by mreschenberg@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/204114ab86ad
Compute ancestor transform for continuations that span multiple subtrees r=Jamie
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: