Closed Bug 1666537 Opened 4 years ago Closed 4 years ago

getSelection().modify("extend", "left", "lineboundary") in mixed RTL context behaves wrong

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: saschanaz, Assigned: saschanaz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

  • An RTL line with only LTR text nodes: It always goes right regardless of the second parameter
  • An RTL line that ends with LTR text node: It ignores the last node and terminates before it. This also happens when dragging by mouse to the left, but it shouldn't.

Putting this in Layout module as the core issue is in nsIFrame::PeekOffsetForLineEdge.

Assignee: nobody → krosylight

Previously it peeked to the visually leftmost/rightmost position, while such position can actually be a middle of the line in mixed bidi context. This patch corrects the behavior.

Attachment #9177625 - Attachment description: Bug 1666537 - Peek logical line end even in bidi context → Bug 1666537 - Peek logical line end also in bidi context
Attachment #9177625 - Attachment description: Bug 1666537 - Peek logical line end also in bidi context → Bug 1666537 - Peek logical line end in bidi context
Attachment #9177625 - Attachment description: Bug 1666537 - Peek logical line end in bidi context → Bug 1666537 - Peek logical line end in bidi context r=emilio
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9b0c73503e38 Peek logical line end in bidi context r=emilio,jfkthame
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/25790 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Blocks: 1653893
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: